diff --git "a/assets/index-DiduAcFU.js" "b/assets/index-DiduAcFU.js" new file mode 100644--- /dev/null +++ "b/assets/index-DiduAcFU.js" @@ -0,0 +1,3723 @@ +var e0t=Object.defineProperty;var Tve=e=>{throw TypeError(e)};var t0t=(e,t,n)=>t in e?e0t(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Le=(e,t,n)=>t0t(e,typeof t!="symbol"?t+"":t,n),bq=(e,t,n)=>t.has(e)||Tve("Cannot "+n);var It=(e,t,n)=>(bq(e,t,"read from private field"),n?n.call(e):t.get(e)),mo=(e,t,n)=>t.has(e)?Tve("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Br=(e,t,n,r)=>(bq(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),yi=(e,t,n)=>(bq(e,t,"access private method"),n);var xL=(e,t,n,r)=>({set _(o){Br(e,t,o,n)},get _(){return It(e,t,r)}});function n0t(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var wL=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vq={exports:{}},hT={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var kve;function r0t(){if(kve)return hT;kve=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var a=null;if(i!==void 0&&(a=""+i),o.key!==void 0&&(a=""+o.key),"key"in o){i={};for(var l in o)l!=="key"&&(i[l]=o[l])}else i=o;return o=i.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:i}}return hT.Fragment=t,hT.jsx=n,hT.jsxs=n,hT}var Mve;function o0t(){return Mve||(Mve=1,vq.exports=r0t()),vq.exports}var s=o0t(),xq={exports:{}},Ko={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Rve;function i0t(){if(Rve)return Ko;Rve=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),h=Symbol.iterator;function m(B){return B===null||typeof B!="object"?null:(B=h&&B[h]||B["@@iterator"],typeof B=="function"?B:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,y={};function v(B,$,K){this.props=B,this.context=$,this.refs=y,this.updater=K||g}v.prototype.isReactComponent={},v.prototype.setState=function(B,$){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,$,"setState")},v.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function x(){}x.prototype=v.prototype;function S(B,$,K){this.props=B,this.context=$,this.refs=y,this.updater=K||g}var C=S.prototype=new x;C.constructor=S,b(C,v.prototype),C.isPureReactComponent=!0;var _=Array.isArray;function N(){}var E={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function A(B,$,K){var q=K.ref;return{$$typeof:e,type:B,key:$,ref:q!==void 0?q:null,props:K}}function R(B,$){return A(B.type,$,B.props)}function k(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function T(B){var $={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(K){return $[K]})}var D=/\/+/g;function O(B,$){return typeof B=="object"&&B!==null&&B.key!=null?T(""+B.key):$.toString(36)}function z(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(N,N):(B.status="pending",B.then(function($){B.status==="pending"&&(B.status="fulfilled",B.value=$)},function($){B.status==="pending"&&(B.status="rejected",B.reason=$)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function F(B,$,K,q,Z){var J=typeof B;(J==="undefined"||J==="boolean")&&(B=null);var oe=!1;if(B===null)oe=!0;else switch(J){case"bigint":case"string":case"number":oe=!0;break;case"object":switch(B.$$typeof){case e:case t:oe=!0;break;case d:return oe=B._init,F(oe(B._payload),$,K,q,Z)}}if(oe)return Z=Z(B),oe=q===""?"."+O(B,0):q,_(Z)?(K="",oe!=null&&(K=oe.replace(D,"$&/")+"/"),F(Z,$,K,"",function(ue){return ue})):Z!=null&&(k(Z)&&(Z=R(Z,K+(Z.key==null||B&&B.key===Z.key?"":(""+Z.key).replace(D,"$&/")+"/")+oe)),$.push(Z)),1;oe=0;var de=q===""?".":q+":";if(_(B))for(var ae=0;ae>>1,Y=F[W];if(0>>1;Wo(K,G))qo(Z,K)?(F[W]=Z,F[q]=G,W=q):(F[W]=K,F[$]=G,W=$);else if(qo(Z,G))F[W]=Z,F[q]=G,W=q;else break e}}return U}function o(F,U){var G=F.sortIndex-U.sortIndex;return G!==0?G:F.id-U.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,f=null,h=3,m=!1,g=!1,b=!1,y=!1,v=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function C(F){for(var U=n(u);U!==null;){if(U.callback===null)r(u);else if(U.startTime<=F)r(u),U.sortIndex=U.expirationTime,t(c,U);else break;U=n(u)}}function _(F){if(b=!1,C(F),!g)if(n(c)!==null)g=!0,N||(N=!0,T());else{var U=n(u);U!==null&&z(_,U.startTime-F)}}var N=!1,E=-1,I=5,A=-1;function R(){return y?!0:!(e.unstable_now()-AF&&R());){var W=f.callback;if(typeof W=="function"){f.callback=null,h=f.priorityLevel;var Y=W(f.expirationTime<=F);if(F=e.unstable_now(),typeof Y=="function"){f.callback=Y,C(F),U=!0;break t}f===n(c)&&r(c),C(F)}else r(c);f=n(c)}if(f!==null)U=!0;else{var B=n(u);B!==null&&z(_,B.startTime-F),U=!1}}break e}finally{f=null,h=G,m=!1}U=void 0}}finally{U?T():N=!1}}}var T;if(typeof S=="function")T=function(){S(k)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,O=D.port2;D.port1.onmessage=k,T=function(){O.postMessage(null)}}else T=function(){v(k,0)};function z(F,U){E=v(function(){F(e.unstable_now())},U)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125W?(F.sortIndex=G,t(u,F),n(c)===null&&F===n(u)&&(b?(x(E),E=-1):b=!0,z(_,G-W))):(F.sortIndex=Y,t(c,F),g||m||(g=!0,N||(N=!0,T()))),F},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(F){var U=h;return function(){var G=h;h=U;try{return F.apply(this,arguments)}finally{h=G}}}})(Cq)),Cq}var Lve;function s0t(){return Lve||(Lve=1,Sq.exports=a0t()),Sq.exports}var _q={exports:{}},Vf={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var $ve;function l0t(){if($ve)return Vf;$ve=1;var e=wI();function t(c){var u="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_q.exports=l0t(),_q.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Bve;function c0t(){if(Bve)return mT;Bve=1;var e=s0t(),t=wI(),n=i8e();function r(w){var j="https://react.dev/errors/"+w;if(1Y||(w.current=W[Y],W[Y]=null,Y--)}function K(w,j){Y++,W[Y]=w.current,w.current=j}var q=B(null),Z=B(null),J=B(null),oe=B(null);function de(w,j){switch(K(J,j),K(Z,w),K(q,null),j.nodeType){case 9:case 11:w=(w=j.documentElement)&&(w=w.namespaceURI)?eve(w):0;break;default:if(w=j.tagName,j=j.namespaceURI)j=eve(j),w=tve(j,w);else switch(w){case"svg":w=1;break;case"math":w=2;break;default:w=0}}$(q),K(q,w)}function ae(){$(q),$(Z),$(J)}function ue(w){w.memoizedState!==null&&K(oe,w);var j=q.current,M=tve(j,w.type);j!==M&&(K(Z,w),K(q,M))}function ce(w){Z.current===w&&($(q),$(Z)),oe.current===w&&($(oe),uT._currentValue=G)}var se,me;function fe(w){if(se===void 0)try{throw Error()}catch(M){var j=M.stack.trim().match(/\n( *(at )?)/);se=j&&j[1]||"",me=-1)":-1re||_t[V]!==yn[re]){var Bn=` +`+_t[V].replace(" at new "," at ");return w.displayName&&Bn.includes("")&&(Bn=Bn.replace("",w.displayName)),Bn}while(1<=V&&0<=re);break}}}finally{te=!1,Error.prepareStackTrace=M}return(M=w?w.displayName||w.name:"")?fe(M):""}function ve(w,j){switch(w.tag){case 26:case 27:case 5:return fe(w.type);case 16:return fe("Lazy");case 13:return w.child!==j&&j!==null?fe("Suspense Fallback"):fe("Suspense");case 19:return fe("SuspenseList");case 0:case 15:return ye(w.type,!1);case 11:return ye(w.type.render,!1);case 1:return ye(w.type,!0);case 31:return fe("Activity");default:return""}}function ge(w){try{var j="",M=null;do j+=ve(w,M),M=w,w=w.return;while(w);return j}catch(V){return` +Error generating stack: `+V.message+` +`+V.stack}}var Ee=Object.prototype.hasOwnProperty,xe=e.unstable_scheduleCallback,Ne=e.unstable_cancelCallback,_e=e.unstable_shouldYield,Be=e.unstable_requestPaint,Te=e.unstable_now,Ge=e.unstable_getCurrentPriorityLevel,Ze=e.unstable_ImmediatePriority,ht=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,ft=e.unstable_LowPriority,Qe=e.unstable_IdlePriority,De=e.log,st=e.unstable_setDisableYieldValue,vt=null,qe=null;function Ye(w){if(typeof De=="function"&&st(w),qe&&typeof qe.setStrictMode=="function")try{qe.setStrictMode(vt,w)}catch{}}var mt=Math.clz32?Math.clz32:gt,Et=Math.log,vn=Math.LN2;function gt(w){return w>>>=0,w===0?32:31-(Et(w)/vn|0)|0}var Fe=256,$e=262144,nt=4194304;function wt(w){var j=w&42;if(j!==0)return j;switch(w&-w){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return w&261888;case 262144:case 524288:case 1048576:case 2097152:return w&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return w&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return w}}function Dt(w,j,M){var V=w.pendingLanes;if(V===0)return 0;var re=0,le=w.suspendedLanes,je=w.pingedLanes;w=w.warmLanes;var We=V&134217727;return We!==0?(V=We&~le,V!==0?re=wt(V):(je&=We,je!==0?re=wt(je):M||(M=We&~w,M!==0&&(re=wt(M))))):(We=V&~le,We!==0?re=wt(We):je!==0?re=wt(je):M||(M=V&~w,M!==0&&(re=wt(M)))),re===0?0:j!==0&&j!==re&&(j&le)===0&&(le=re&-re,M=j&-j,le>=M||le===32&&(M&4194048)!==0)?j:re}function on(w,j){return(w.pendingLanes&~(w.suspendedLanes&~w.pingedLanes)&j)===0}function jn(w,j){switch(w){case 1:case 2:case 4:case 8:case 64:return j+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return j+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function kt(){var w=nt;return nt<<=1,(nt&62914560)===0&&(nt=4194304),w}function pn(w){for(var j=[],M=0;31>M;M++)j.push(w);return j}function tt(w,j){w.pendingLanes|=j,j!==268435456&&(w.suspendedLanes=0,w.pingedLanes=0,w.warmLanes=0)}function jt(w,j,M,V,re,le){var je=w.pendingLanes;w.pendingLanes=M,w.suspendedLanes=0,w.pingedLanes=0,w.warmLanes=0,w.expiredLanes&=M,w.entangledLanes&=M,w.errorRecoveryDisabledLanes&=M,w.shellSuspendCounter=0;var We=w.entanglements,_t=w.expirationTimes,yn=w.hiddenUpdates;for(M=je&~M;0"u")return null;try{return w.activeElement||w.body}catch{return w.body}}var gr=/[\n"\\]/g;function vr(w){return w.replace(gr,function(j){return"\\"+j.charCodeAt(0).toString(16)+" "})}function zi(w,j,M,V,re,le,je,We){w.name="",je!=null&&typeof je!="function"&&typeof je!="symbol"&&typeof je!="boolean"?w.type=je:w.removeAttribute("type"),j!=null?je==="number"?(j===0&&w.value===""||w.value!=j)&&(w.value=""+bn(j)):w.value!==""+bn(j)&&(w.value=""+bn(j)):je!=="submit"&&je!=="reset"||w.removeAttribute("value"),j!=null?li(w,je,bn(j)):M!=null?li(w,je,bn(M)):V!=null&&w.removeAttribute("value"),re==null&&le!=null&&(w.defaultChecked=!!le),re!=null&&(w.checked=re&&typeof re!="function"&&typeof re!="symbol"),We!=null&&typeof We!="function"&&typeof We!="symbol"&&typeof We!="boolean"?w.name=""+bn(We):w.removeAttribute("name")}function Vo(w,j,M,V,re,le,je,We){if(le!=null&&typeof le!="function"&&typeof le!="symbol"&&typeof le!="boolean"&&(w.type=le),j!=null||M!=null){if(!(le!=="submit"&&le!=="reset"||j!=null)){rr(w);return}M=M!=null?""+bn(M):"",j=j!=null?""+bn(j):M,We||j===w.value||(w.value=j),w.defaultValue=j}V=V??re,V=typeof V!="function"&&typeof V!="symbol"&&!!V,w.checked=We?w.checked:!!V,w.defaultChecked=!!V,je!=null&&typeof je!="function"&&typeof je!="symbol"&&typeof je!="boolean"&&(w.name=je),rr(w)}function li(w,j,M){j==="number"&&dn(w.ownerDocument)===w||w.defaultValue===""+M||(w.defaultValue=""+M)}function lo(w,j,M,V){if(w=w.options,j){j={};for(var re=0;re"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Df=!1;if(Xs)try{var Mc={};Object.defineProperty(Mc,"passive",{get:function(){Df=!0}}),window.addEventListener("test",Mc,Mc),window.removeEventListener("test",Mc,Mc)}catch{Df=!1}var wl=null,Ju=null,ca=null;function Qu(){if(ca)return ca;var w,j=Ju,M=j.length,V,re="value"in wl?wl.value:wl.textContent,le=re.length;for(w=0;w=Od),il=" ",Xn=!1;function pt(w,j){switch(w){case"keyup":return gc.indexOf(j.keyCode)!==-1;case"keydown":return j.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wt(w){return w=w.detail,typeof w=="object"&&"data"in w?w.data:null}var xn=!1;function Pn(w,j){switch(w){case"compositionend":return Wt(j);case"keypress":return j.which!==32?null:(Xn=!0,il);case"textInput":return w=j.data,w===il&&Xn?null:w;default:return null}}function Un(w,j){if(xn)return w==="compositionend"||!cf&&pt(w,j)?(w=Qu(),ca=Ju=wl=null,xn=!1,w):null;switch(w){case"paste":return null;case"keypress":if(!(j.ctrlKey||j.altKey||j.metaKey)||j.ctrlKey&&j.altKey){if(j.char&&1=j)return{node:M,offset:j-w};w=V}e:{for(;M;){if(M.nextSibling){M=M.nextSibling;break e}M=M.parentNode}M=void 0}M=Fm(M)}}function bp(w,j){return w&&j?w===j?!0:w&&w.nodeType===3?!1:j&&j.nodeType===3?bp(w,j.parentNode):"contains"in w?w.contains(j):w.compareDocumentPosition?!!(w.compareDocumentPosition(j)&16):!1:!1}function $f(w){w=w!=null&&w.ownerDocument!=null&&w.ownerDocument.defaultView!=null?w.ownerDocument.defaultView:window;for(var j=dn(w.document);j instanceof w.HTMLIFrameElement;){try{var M=typeof j.contentWindow.location.href=="string"}catch{M=!1}if(M)w=j.contentWindow;else break;j=dn(w.document)}return j}function td(w){var j=w&&w.nodeName&&w.nodeName.toLowerCase();return j&&(j==="input"&&(w.type==="text"||w.type==="search"||w.type==="tel"||w.type==="url"||w.type==="password")||j==="textarea"||w.contentEditable==="true")}var Yp=Xs&&"documentMode"in document&&11>=document.documentMode,nd=null,Xp=null,Ou=null,rd=!1;function ta(w,j,M){var V=M.window===M?M.document:M.nodeType===9?M:M.ownerDocument;rd||nd==null||nd!==dn(V)||(V=nd,"selectionStart"in V&&td(V)?V={start:V.selectionStart,end:V.selectionEnd}:(V=(V.ownerDocument&&V.ownerDocument.defaultView||window).getSelection(),V={anchorNode:V.anchorNode,anchorOffset:V.anchorOffset,focusNode:V.focusNode,focusOffset:V.focusOffset}),Ou&&Kp(Ou,V)||(Ou=V,V=iL(Xp,"onSelect"),0>=je,re-=je,Kn=1<<32-mt(j)+re|M<ui?(Ui=co,co=null):Ui=co.sibling;var Ta=Cn(rn,co,gn[ui],Yn);if(Ta===null){co===null&&(co=Ui);break}w&&co&&Ta.alternate===null&&j(rn,co),$t=le(Ta,$t,ui),Aa===null?vo=Ta:Aa.sibling=Ta,Aa=Ta,co=Ui}if(ui===gn.length)return M(rn,co),Ci&&eo(rn,ui),vo;if(co===null){for(;uiui?(Ui=co,co=null):Ui=co.sibling;var W1=Cn(rn,co,Ta.value,Yn);if(W1===null){co===null&&(co=Ui);break}w&&co&&W1.alternate===null&&j(rn,co),$t=le(W1,$t,ui),Aa===null?vo=W1:Aa.sibling=W1,Aa=W1,co=Ui}if(Ta.done)return M(rn,co),Ci&&eo(rn,ui),vo;if(co===null){for(;!Ta.done;ui++,Ta=gn.next())Ta=Zn(rn,Ta.value,Yn),Ta!==null&&($t=le(Ta,$t,ui),Aa===null?vo=Ta:Aa.sibling=Ta,Aa=Ta);return Ci&&eo(rn,ui),vo}for(co=V(co);!Ta.done;ui++,Ta=gn.next())Ta=kn(co,rn,ui,Ta.value,Yn),Ta!==null&&(w&&Ta.alternate!==null&&co.delete(Ta.key===null?ui:Ta.key),$t=le(Ta,$t,ui),Aa===null?vo=Ta:Aa.sibling=Ta,Aa=Ta);return w&&co.forEach(function(Qgt){return j(rn,Qgt)}),Ci&&eo(rn,ui),vo}function $s(rn,$t,gn,Yn){if(typeof gn=="object"&&gn!==null&&gn.type===b&&gn.key===null&&(gn=gn.props.children),typeof gn=="object"&&gn!==null){switch(gn.$$typeof){case m:e:{for(var vo=gn.key;$t!==null;){if($t.key===vo){if(vo=gn.type,vo===b){if($t.tag===7){M(rn,$t.sibling),Yn=re($t,gn.props.children),Yn.return=rn,rn=Yn;break e}}else if($t.elementType===vo||typeof vo=="object"&&vo!==null&&vo.$$typeof===I&&sn(vo)===$t.type){M(rn,$t.sibling),Yn=re($t,gn.props),Lo(Yn,gn),Yn.return=rn,rn=Yn;break e}M(rn,$t);break}else j(rn,$t);$t=$t.sibling}gn.type===b?(Yn=Bm(gn.props.children,rn.mode,Yn,gn.key),Yn.return=rn,rn=Yn):(Yn=e0(gn.type,gn.key,gn.props,null,rn.mode,Yn),Lo(Yn,gn),Yn.return=rn,rn=Yn)}return je(rn);case g:e:{for(vo=gn.key;$t!==null;){if($t.key===vo)if($t.tag===4&&$t.stateNode.containerInfo===gn.containerInfo&&$t.stateNode.implementation===gn.implementation){M(rn,$t.sibling),Yn=re($t,gn.children||[]),Yn.return=rn,rn=Yn;break e}else{M(rn,$t);break}else j(rn,$t);$t=$t.sibling}Yn=Ey(gn,rn.mode,Yn),Yn.return=rn,rn=Yn}return je(rn);case I:return gn=sn(gn),$s(rn,$t,gn,Yn)}if(z(gn))return to(rn,$t,gn,Yn);if(T(gn)){if(vo=T(gn),typeof vo!="function")throw Error(r(150));return gn=vo.call(gn),Io(rn,$t,gn,Yn)}if(typeof gn.then=="function")return $s(rn,$t,Ur(gn),Yn);if(gn.$$typeof===S)return $s(rn,$t,aN(rn,gn),Yn);Jr(rn,gn)}return typeof gn=="string"&&gn!==""||typeof gn=="number"||typeof gn=="bigint"?(gn=""+gn,$t!==null&&$t.tag===6?(M(rn,$t.sibling),Yn=re($t,gn),Yn.return=rn,rn=Yn):(M(rn,$t),Yn=Ny(gn,rn.mode,Yn),Yn.return=rn,rn=Yn),je(rn)):M(rn,$t)}return function(rn,$t,gn,Yn){try{ro=0;var vo=$s(rn,$t,gn,Yn);return er=null,vo}catch(co){if(co===Ot||co===ct)throw co;var Aa=hu(29,co,null,rn.mode);return Aa.lanes=Yn,Aa.return=rn,Aa}finally{}}}var Js=Ti(!0),qo=Ti(!1),Gr=!1;function _r(w){w.updateQueue={baseState:w.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _l(w,j){w=w.updateQueue,j.updateQueue===w&&(j.updateQueue={baseState:w.baseState,firstBaseUpdate:w.firstBaseUpdate,lastBaseUpdate:w.lastBaseUpdate,shared:w.shared,callbacks:null})}function Eo(w){return{lane:w,tag:0,payload:null,callback:null,next:null}}function ti(w,j,M){var V=w.updateQueue;if(V===null)return null;if(V=V.shared,(Ua&2)!==0){var re=V.pending;return re===null?j.next=j:(j.next=re.next,re.next=j),V.pending=j,j=pu(w),Gh(w,null,M),j}return Uh(w,V,j,M),pu(w)}function Ha(w,j,M){if(j=j.updateQueue,j!==null&&(j=j.shared,(M&4194048)!==0)){var V=j.lanes;V&=w.pendingLanes,M|=V,j.lanes=M,Xt(w,M)}}function gu(w,j){var M=w.updateQueue,V=w.alternate;if(V!==null&&(V=V.updateQueue,M===V)){var re=null,le=null;if(M=M.firstBaseUpdate,M!==null){do{var je={lane:M.lane,tag:M.tag,payload:M.payload,callback:null,next:null};le===null?re=le=je:le=le.next=je,M=M.next}while(M!==null);le===null?re=le=j:le=le.next=j}else re=le=j;M={baseState:V.baseState,firstBaseUpdate:re,lastBaseUpdate:le,shared:V.shared,callbacks:V.callbacks},w.updateQueue=M;return}w=M.lastBaseUpdate,w===null?M.firstBaseUpdate=j:w.next=j,M.lastBaseUpdate=j}var sd=!1;function Os(){if(sd){var w=ie;if(w!==null)throw w}}function Lc(w,j,M,V){sd=!1;var re=w.updateQueue;Gr=!1;var le=re.firstBaseUpdate,je=re.lastBaseUpdate,We=re.shared.pending;if(We!==null){re.shared.pending=null;var _t=We,yn=_t.next;_t.next=null,je===null?le=yn:je.next=yn,je=_t;var Bn=w.alternate;Bn!==null&&(Bn=Bn.updateQueue,We=Bn.lastBaseUpdate,We!==je&&(We===null?Bn.firstBaseUpdate=yn:We.next=yn,Bn.lastBaseUpdate=_t))}if(le!==null){var Zn=re.baseState;je=0,Bn=yn=_t=null,We=le;do{var Cn=We.lane&-536870913,kn=Cn!==We.lane;if(kn?(Vi&Cn)===Cn:(V&Cn)===Cn){Cn!==0&&Cn===Q&&(sd=!0),Bn!==null&&(Bn=Bn.next={lane:0,tag:We.tag,payload:We.payload,callback:null,next:null});e:{var to=w,Io=We;Cn=j;var $s=M;switch(Io.tag){case 1:if(to=Io.payload,typeof to=="function"){Zn=to.call($s,Zn,Cn);break e}Zn=to;break e;case 3:to.flags=to.flags&-65537|128;case 0:if(to=Io.payload,Cn=typeof to=="function"?to.call($s,Zn,Cn):to,Cn==null)break e;Zn=f({},Zn,Cn);break e;case 2:Gr=!0}}Cn=We.callback,Cn!==null&&(w.flags|=64,kn&&(w.flags|=8192),kn=re.callbacks,kn===null?re.callbacks=[Cn]:kn.push(Cn))}else kn={lane:Cn,tag:We.tag,payload:We.payload,callback:We.callback,next:null},Bn===null?(yn=Bn=kn,_t=Zn):Bn=Bn.next=kn,je|=Cn;if(We=We.next,We===null){if(We=re.shared.pending,We===null)break;kn=We,We=kn.next,kn.next=null,re.lastBaseUpdate=kn,re.shared.pending=null}}while(!0);Bn===null&&(_t=Zn),re.baseState=_t,re.firstBaseUpdate=yn,re.lastBaseUpdate=Bn,le===null&&(re.shared.lanes=0),D1|=je,w.lanes=je,w.memoizedState=Zn}}function Ld(w,j){if(typeof w!="function")throw Error(r(191,w));w.call(j)}function $c(w,j){var M=w.callbacks;if(M!==null)for(w.callbacks=null,w=0;wle?le:8;var je=F.T,We={};F.T=We,gW(w,!1,j,M);try{var _t=re(),yn=F.S;if(yn!==null&&yn(We,_t),_t!==null&&typeof _t=="object"&&typeof _t.then=="function"){var Bn=Re(_t,V);qA(w,j,Bn,Yh(w))}else qA(w,j,V,Yh(w))}catch(Zn){qA(w,j,{then:function(){},status:"rejected",reason:Zn},Yh())}finally{U.p=le,je!==null&&We.types!==null&&(je.types=We.types),F.T=je}}function Kmt(){}function hW(w,j,M,V){if(w.tag!==5)throw Error(r(476));var re=Nye(w).queue;jye(w,re,j,G,M===null?Kmt:function(){return Eye(w),M(V)})}function Nye(w){var j=w.memoizedState;if(j!==null)return j;j={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hm,lastRenderedState:G},next:null};var M={};return j.next={memoizedState:M,baseState:M,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hm,lastRenderedState:M},next:null},w.memoizedState=j,w=w.alternate,w!==null&&(w.memoizedState=j),j}function Eye(w){var j=Nye(w);j.next===null&&(j=w.alternate.memoizedState),qA(w,j.next.queue,{},Yh())}function mW(){return ad(uT)}function Pye(){return Wl().memoizedState}function Iye(){return Wl().memoizedState}function Ymt(w){for(var j=w.return;j!==null;){switch(j.tag){case 24:case 3:var M=Yh();w=Eo(M);var V=ti(j,w,M);V!==null&&(ah(V,j,M),Ha(V,j,M)),j={cache:I1()},w.payload=j;return}j=j.return}}function Xmt(w,j,M){var V=Yh();M={lane:V,revertLane:0,gesture:null,action:M,hasEagerState:!1,eagerState:null,next:null},BD(w)?Tye(j,M):(M=j1(w,j,M,V),M!==null&&(ah(M,w,V),kye(M,j,V)))}function Aye(w,j,M){var V=Yh();qA(w,j,M,V)}function qA(w,j,M,V){var re={lane:V,revertLane:0,gesture:null,action:M,hasEagerState:!1,eagerState:null,next:null};if(BD(w))Tye(j,re);else{var le=w.alternate;if(w.lanes===0&&(le===null||le.lanes===0)&&(le=j.lastRenderedReducer,le!==null))try{var je=j.lastRenderedState,We=le(je,M);if(re.hasEagerState=!0,re.eagerState=We,Hl(We,je))return Uh(w,j,re,0),Qs===null&&_y(),!1}catch{}finally{}if(M=j1(w,j,re,V),M!==null)return ah(M,w,V),kye(M,j,V),!0}return!1}function gW(w,j,M,V){if(V={lane:2,revertLane:KW(),gesture:null,action:V,hasEagerState:!1,eagerState:null,next:null},BD(w)){if(j)throw Error(r(479))}else j=j1(w,M,V,2),j!==null&&ah(j,w,2)}function BD(w){var j=w.alternate;return w===ho||j!==null&&j===ho}function Tye(w,j){th=Hf=!0;var M=w.pending;M===null?j.next=j:(j.next=M.next,M.next=j),w.pending=j}function kye(w,j,M){if((M&4194048)!==0){var V=j.lanes;V&=w.pendingLanes,M|=V,j.lanes=M,Xt(w,M)}}var KA={readContext:ad,use:A1,useCallback:Ds,useContext:Ds,useEffect:Ds,useImperativeHandle:Ds,useLayoutEffect:Ds,useInsertionEffect:Ds,useMemo:Ds,useReducer:Ds,useRef:Ds,useState:Ds,useDebugValue:Ds,useDeferredValue:Ds,useTransition:Ds,useSyncExternalStore:Ds,useId:Ds,useHostTransitionStatus:Ds,useFormState:Ds,useActionState:Ds,useOptimistic:Ds,useMemoCache:Ds,useCacheRefresh:Ds};KA.useEffectEvent=Ds;var Mye={readContext:ad,use:A1,useCallback:function(w,j){return Du().memoizedState=[w,j===void 0?null:j],w},useContext:ad,useEffect:gye,useImperativeHandle:function(w,j,M){M=M!=null?M.concat([w]):null,k1(4194308,4,xye.bind(null,j,w),M)},useLayoutEffect:function(w,j){return k1(4194308,4,w,j)},useInsertionEffect:function(w,j){k1(4,2,w,j)},useMemo:function(w,j){var M=Du();j=j===void 0?null:j;var V=w();if(mf){Ye(!0);try{w()}finally{Ye(!1)}}return M.memoizedState=[V,j],V},useReducer:function(w,j,M){var V=Du();if(M!==void 0){var re=M(j);if(mf){Ye(!0);try{M(j)}finally{Ye(!1)}}}else re=j;return V.memoizedState=V.baseState=re,w={pending:null,lanes:0,dispatch:null,lastRenderedReducer:w,lastRenderedState:re},V.queue=w,w=w.dispatch=Xmt.bind(null,ho,w),[V.memoizedState,w]},useRef:function(w){var j=Du();return w={current:w},j.memoizedState=w},useState:function(w){w=Dy(w);var j=w.queue,M=Aye.bind(null,ho,j);return j.dispatch=M,[w.memoizedState,M]},useDebugValue:fW,useDeferredValue:function(w,j){var M=Du();return pW(M,w,j)},useTransition:function(){var w=Dy(!1);return w=jye.bind(null,ho,w.queue,!0,!1),Du().memoizedState=w,[!1,w]},useSyncExternalStore:function(w,j,M){var V=ho,re=Du();if(Ci){if(M===void 0)throw Error(r(407));M=M()}else{if(M=j(),Qs===null)throw Error(r(349));(Vi&127)!==0||r0(V,j,M)}re.memoizedState=M;var le={value:M,getSnapshot:j};return re.queue=le,gye(UA.bind(null,V,le,w),[w]),V.flags|=2048,mv(9,{destroy:void 0},VA.bind(null,V,le,M,j),null),M},useId:function(){var w=Du(),j=Qs.identifierPrefix;if(Ci){var M=wr,V=Kn;M=(V&~(1<<32-mt(V)-1)).toString(32)+M,j="_"+j+"R_"+M,M=zc++,0<\/script>",le=le.removeChild(le.firstChild);break;case"select":le=typeof V.is=="string"?je.createElement("select",{is:V.is}):je.createElement("select"),V.multiple?le.multiple=!0:V.size&&(le.size=V.size);break;default:le=typeof V.is=="string"?je.createElement(re,{is:V.is}):je.createElement(re)}}le[Ht]=j,le[Tt]=V;e:for(je=j.child;je!==null;){if(je.tag===5||je.tag===6)le.appendChild(je.stateNode);else if(je.tag!==4&&je.tag!==27&&je.child!==null){je.child.return=je,je=je.child;continue}if(je===j)break e;for(;je.sibling===null;){if(je.return===null||je.return===j)break e;je=je.return}je.sibling.return=je.return,je=je.sibling}j.stateNode=le;e:switch(yf(le,re,V),re){case"button":case"input":case"select":case"textarea":V=!!V.autoFocus;break e;case"img":V=!0;break e;default:V=!1}V&&yv(j)}}return El(j),AW(j,j.type,w===null?null:w.memoizedProps,j.pendingProps,M),null;case 6:if(w&&j.stateNode!=null)w.memoizedProps!==V&&yv(j);else{if(typeof V!="string"&&j.stateNode===null)throw Error(r(166));if(w=J.current,Ul(j)){if(w=j.stateNode,M=j.memoizedProps,V=null,re=da,re!==null)switch(re.tag){case 27:case 5:V=re.memoizedProps}w[Ht]=j,w=!!(w.nodeValue===M||V!==null&&V.suppressHydrationWarning===!0||Jbe(w.nodeValue,M)),w||zm(j,!0)}else w=aL(w).createTextNode(V),w[Ht]=j,j.stateNode=w}return El(j),null;case 31:if(M=j.memoizedState,w===null||w.memoizedState!==null){if(V=Ul(j),M!==null){if(w===null){if(!V)throw Error(r(318));if(w=j.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(r(557));w[Ht]=j}else t0(),(j.flags&128)===0&&(j.memoizedState=null),j.flags|=4;El(j),w=!1}else M=SC(),w!==null&&w.memoizedState!==null&&(w.memoizedState.hydrationErrors=M),w=!0;if(!w)return j.flags&256?(bs(j),j):(bs(j),null);if((j.flags&128)!==0)throw Error(r(558))}return El(j),null;case 13:if(V=j.memoizedState,w===null||w.memoizedState!==null&&w.memoizedState.dehydrated!==null){if(re=Ul(j),V!==null&&V.dehydrated!==null){if(w===null){if(!re)throw Error(r(318));if(re=j.memoizedState,re=re!==null?re.dehydrated:null,!re)throw Error(r(317));re[Ht]=j}else t0(),(j.flags&128)===0&&(j.memoizedState=null),j.flags|=4;El(j),re=!1}else re=SC(),w!==null&&w.memoizedState!==null&&(w.memoizedState.hydrationErrors=re),re=!0;if(!re)return j.flags&256?(bs(j),j):(bs(j),null)}return bs(j),(j.flags&128)!==0?(j.lanes=M,j):(M=V!==null,w=w!==null&&w.memoizedState!==null,M&&(V=j.child,re=null,V.alternate!==null&&V.alternate.memoizedState!==null&&V.alternate.memoizedState.cachePool!==null&&(re=V.alternate.memoizedState.cachePool.pool),le=null,V.memoizedState!==null&&V.memoizedState.cachePool!==null&&(le=V.memoizedState.cachePool.pool),le!==re&&(V.flags|=2048)),M!==w&&M&&(j.child.flags|=8192),GD(j,j.updateQueue),El(j),null);case 4:return ae(),w===null&&JW(j.stateNode.containerInfo),El(j),null;case 10:return eh(j.type),El(j),null;case 19:if($(na),V=j.memoizedState,V===null)return El(j),null;if(re=(j.flags&128)!==0,le=V.rendering,le===null)if(re)XA(V,!1);else{if(Hc!==0||w!==null&&(w.flags&128)!==0)for(w=j.child;w!==null;){if(le=$d(w),le!==null){for(j.flags|=128,XA(V,!1),w=le.updateQueue,j.updateQueue=w,GD(j,w),j.subtreeFlags=0,w=M,M=j.child;M!==null;)jy(M,w),M=M.sibling;return K(na,na.current&1|2),Ci&&eo(j,V.treeForkCount),j.child}w=w.sibling}V.tail!==null&&Te()>XD&&(j.flags|=128,re=!0,XA(V,!1),j.lanes=4194304)}else{if(!re)if(w=$d(le),w!==null){if(j.flags|=128,re=!0,w=w.updateQueue,j.updateQueue=w,GD(j,w),XA(V,!0),V.tail===null&&V.tailMode==="hidden"&&!le.alternate&&!Ci)return El(j),null}else 2*Te()-V.renderingStartTime>XD&&M!==536870912&&(j.flags|=128,re=!0,XA(V,!1),j.lanes=4194304);V.isBackwards?(le.sibling=j.child,j.child=le):(w=V.last,w!==null?w.sibling=le:j.child=le,V.last=le)}return V.tail!==null?(w=V.tail,V.rendering=w,V.tail=w.sibling,V.renderingStartTime=Te(),w.sibling=null,M=na.current,K(na,re?M&1|2:M&1),Ci&&eo(j,V.treeForkCount),w):(El(j),null);case 22:case 23:return bs(j),yu(),V=j.memoizedState!==null,w!==null?w.memoizedState!==null!==V&&(j.flags|=8192):V&&(j.flags|=8192),V?(M&536870912)!==0&&(j.flags&128)===0&&(El(j),j.subtreeFlags&6&&(j.flags|=8192)):El(j),M=j.updateQueue,M!==null&&GD(j,M.retryQueue),M=null,w!==null&&w.memoizedState!==null&&w.memoizedState.cachePool!==null&&(M=w.memoizedState.cachePool.pool),V=null,j.memoizedState!==null&&j.memoizedState.cachePool!==null&&(V=j.memoizedState.cachePool.pool),V!==M&&(j.flags|=2048),w!==null&&$(Ue),null;case 24:return M=null,w!==null&&(M=w.memoizedState.cache),j.memoizedState.cache!==M&&(j.flags|=2048),eh(yc),El(j),null;case 25:return null;case 30:return null}throw Error(r(156,j.tag))}function tgt(w,j){switch(Cl(j),j.tag){case 1:return w=j.flags,w&65536?(j.flags=w&-65537|128,j):null;case 3:return eh(yc),ae(),w=j.flags,(w&65536)!==0&&(w&128)===0?(j.flags=w&-65537|128,j):null;case 26:case 27:case 5:return ce(j),null;case 31:if(j.memoizedState!==null){if(bs(j),j.alternate===null)throw Error(r(340));t0()}return w=j.flags,w&65536?(j.flags=w&-65537|128,j):null;case 13:if(bs(j),w=j.memoizedState,w!==null&&w.dehydrated!==null){if(j.alternate===null)throw Error(r(340));t0()}return w=j.flags,w&65536?(j.flags=w&-65537|128,j):null;case 19:return $(na),null;case 4:return ae(),null;case 10:return eh(j.type),null;case 22:case 23:return bs(j),yu(),w!==null&&$(Ue),w=j.flags,w&65536?(j.flags=w&-65537|128,j):null;case 24:return eh(yc),null;case 25:return null;default:return null}}function rbe(w,j){switch(Cl(j),j.tag){case 3:eh(yc),ae();break;case 26:case 27:case 5:ce(j);break;case 4:ae();break;case 31:j.memoizedState!==null&&bs(j);break;case 13:bs(j);break;case 19:$(na);break;case 10:eh(j.type);break;case 22:case 23:bs(j),yu(),w!==null&&$(Ue);break;case 24:eh(yc)}}function ZA(w,j){try{var M=j.updateQueue,V=M!==null?M.lastEffect:null;if(V!==null){var re=V.next;M=re;do{if((M.tag&w)===w){V=void 0;var le=M.create,je=M.inst;V=le(),je.destroy=V}M=M.next}while(M!==re)}}catch(We){xs(j,j.return,We)}}function R1(w,j,M){try{var V=j.updateQueue,re=V!==null?V.lastEffect:null;if(re!==null){var le=re.next;V=le;do{if((V.tag&w)===w){var je=V.inst,We=je.destroy;if(We!==void 0){je.destroy=void 0,re=j;var _t=M,yn=We;try{yn()}catch(Bn){xs(re,_t,Bn)}}}V=V.next}while(V!==le)}}catch(Bn){xs(j,j.return,Bn)}}function obe(w){var j=w.updateQueue;if(j!==null){var M=w.stateNode;try{$c(j,M)}catch(V){xs(w,w.return,V)}}}function ibe(w,j,M){M.props=EC(w.type,w.memoizedProps),M.state=w.memoizedState;try{M.componentWillUnmount()}catch(V){xs(w,j,V)}}function JA(w,j){try{var M=w.ref;if(M!==null){switch(w.tag){case 26:case 27:case 5:var V=w.stateNode;break;case 30:V=w.stateNode;break;default:V=w.stateNode}typeof M=="function"?w.refCleanup=M(V):M.current=V}}catch(re){xs(w,j,re)}}function Ly(w,j){var M=w.ref,V=w.refCleanup;if(M!==null)if(typeof V=="function")try{V()}catch(re){xs(w,j,re)}finally{w.refCleanup=null,w=w.alternate,w!=null&&(w.refCleanup=null)}else if(typeof M=="function")try{M(null)}catch(re){xs(w,j,re)}else M.current=null}function abe(w){var j=w.type,M=w.memoizedProps,V=w.stateNode;try{e:switch(j){case"button":case"input":case"select":case"textarea":M.autoFocus&&V.focus();break e;case"img":M.src?V.src=M.src:M.srcSet&&(V.srcset=M.srcSet)}}catch(re){xs(w,w.return,re)}}function TW(w,j,M){try{var V=w.stateNode;Cgt(V,w.type,M,j),V[Tt]=j}catch(re){xs(w,w.return,re)}}function sbe(w){return w.tag===5||w.tag===3||w.tag===26||w.tag===27&&z1(w.type)||w.tag===4}function kW(w){e:for(;;){for(;w.sibling===null;){if(w.return===null||sbe(w.return))return null;w=w.return}for(w.sibling.return=w.return,w=w.sibling;w.tag!==5&&w.tag!==6&&w.tag!==18;){if(w.tag===27&&z1(w.type)||w.flags&2||w.child===null||w.tag===4)continue e;w.child.return=w,w=w.child}if(!(w.flags&2))return w.stateNode}}function MW(w,j,M){var V=w.tag;if(V===5||V===6)w=w.stateNode,j?(M.nodeType===9?M.body:M.nodeName==="HTML"?M.ownerDocument.body:M).insertBefore(w,j):(j=M.nodeType===9?M.body:M.nodeName==="HTML"?M.ownerDocument.body:M,j.appendChild(w),M=M._reactRootContainer,M!=null||j.onclick!==null||(j.onclick=Ba));else if(V!==4&&(V===27&&z1(w.type)&&(M=w.stateNode,j=null),w=w.child,w!==null))for(MW(w,j,M),w=w.sibling;w!==null;)MW(w,j,M),w=w.sibling}function WD(w,j,M){var V=w.tag;if(V===5||V===6)w=w.stateNode,j?M.insertBefore(w,j):M.appendChild(w);else if(V!==4&&(V===27&&z1(w.type)&&(M=w.stateNode),w=w.child,w!==null))for(WD(w,j,M),w=w.sibling;w!==null;)WD(w,j,M),w=w.sibling}function lbe(w){var j=w.stateNode,M=w.memoizedProps;try{for(var V=w.type,re=j.attributes;re.length;)j.removeAttributeNode(re[0]);yf(j,V,M),j[Ht]=w,j[Tt]=M}catch(le){xs(w,w.return,le)}}var bv=!1,$u=!1,RW=!1,cbe=typeof WeakSet=="function"?WeakSet:Set,Fd=null;function ngt(w,j){if(w=w.containerInfo,tq=pL,w=$f(w),td(w)){if("selectionStart"in w)var M={start:w.selectionStart,end:w.selectionEnd};else e:{M=(M=w.ownerDocument)&&M.defaultView||window;var V=M.getSelection&&M.getSelection();if(V&&V.rangeCount!==0){M=V.anchorNode;var re=V.anchorOffset,le=V.focusNode;V=V.focusOffset;try{M.nodeType,le.nodeType}catch{M=null;break e}var je=0,We=-1,_t=-1,yn=0,Bn=0,Zn=w,Cn=null;t:for(;;){for(var kn;Zn!==M||re!==0&&Zn.nodeType!==3||(We=je+re),Zn!==le||V!==0&&Zn.nodeType!==3||(_t=je+V),Zn.nodeType===3&&(je+=Zn.nodeValue.length),(kn=Zn.firstChild)!==null;)Cn=Zn,Zn=kn;for(;;){if(Zn===w)break t;if(Cn===M&&++yn===re&&(We=je),Cn===le&&++Bn===V&&(_t=je),(kn=Zn.nextSibling)!==null)break;Zn=Cn,Cn=Zn.parentNode}Zn=kn}M=We===-1||_t===-1?null:{start:We,end:_t}}else M=null}M=M||{start:0,end:0}}else M=null;for(nq={focusedElem:w,selectionRange:M},pL=!1,Fd=j;Fd!==null;)if(j=Fd,w=j.child,(j.subtreeFlags&1028)!==0&&w!==null)w.return=j,Fd=w;else for(;Fd!==null;){switch(j=Fd,le=j.alternate,w=j.flags,j.tag){case 0:if((w&4)!==0&&(w=j.updateQueue,w=w!==null?w.events:null,w!==null))for(M=0;M title"))),yf(le,V,M),le[Ht]=w,Fn(le),V=le;break e;case"link":var je=mve("link","href",re).get(V+(M.href||""));if(je){for(var We=0;We$s&&(je=$s,$s=Io,Io=je);var rn=Vh(We,Io),$t=Vh(We,$s);if(rn&&$t&&(kn.rangeCount!==1||kn.anchorNode!==rn.node||kn.anchorOffset!==rn.offset||kn.focusNode!==$t.node||kn.focusOffset!==$t.offset)){var gn=Zn.createRange();gn.setStart(rn.node,rn.offset),kn.removeAllRanges(),Io>$s?(kn.addRange(gn),kn.extend($t.node,$t.offset)):(gn.setEnd($t.node,$t.offset),kn.addRange(gn))}}}}for(Zn=[],kn=We;kn=kn.parentNode;)kn.nodeType===1&&Zn.push({element:kn,left:kn.scrollLeft,top:kn.scrollTop});for(typeof We.focus=="function"&&We.focus(),We=0;WeM?32:M,F.T=null,M=zW,zW=null;var le=$1,je=Cv;if(ld=0,wN=$1=null,Cv=0,(Ua&6)!==0)throw Error(r(331));var We=Ua;if(Ua|=4,xbe(le.current),ybe(le,le.current,je,M),Ua=We,oT(0,!1),qe&&typeof qe.onPostCommitFiberRoot=="function")try{qe.onPostCommitFiberRoot(vt,le)}catch{}return!0}finally{U.p=re,F.T=V,$be(w,j)}}function Bbe(w,j,M){j=H(M,j),j=xW(w.stateNode,j,2),w=ti(w,j,2),w!==null&&(tt(w,2),$y(w))}function xs(w,j,M){if(w.tag===3)Bbe(w,w,M);else for(;j!==null;){if(j.tag===3){Bbe(j,w,M);break}else if(j.tag===1){var V=j.stateNode;if(typeof j.type.getDerivedStateFromError=="function"||typeof V.componentDidCatch=="function"&&(L1===null||!L1.has(V))){w=H(M,w),M=zye(2),V=ti(j,M,2),V!==null&&(Hye(M,V,j,w),tt(V,2),$y(V));break}}j=j.return}}function GW(w,j,M){var V=w.pingCache;if(V===null){V=w.pingCache=new igt;var re=new Set;V.set(j,re)}else re=V.get(j),re===void 0&&(re=new Set,V.set(j,re));re.has(M)||(LW=!0,re.add(M),w=ugt.bind(null,w,j,M),j.then(w,w))}function ugt(w,j,M){var V=w.pingCache;V!==null&&V.delete(j),w.pingedLanes|=w.suspendedLanes&M,w.warmLanes&=~M,Qs===w&&(Vi&M)===M&&(Hc===4||Hc===3&&(Vi&62914560)===Vi&&300>Te()-YD?(Ua&2)===0&&SN(w,0):$W|=M,xN===Vi&&(xN=0)),$y(w)}function zbe(w,j){j===0&&(j=kt()),w=Bf(w,j),w!==null&&(tt(w,j),$y(w))}function dgt(w){var j=w.memoizedState,M=0;j!==null&&(M=j.retryLane),zbe(w,M)}function fgt(w,j){var M=0;switch(w.tag){case 31:case 13:var V=w.stateNode,re=w.memoizedState;re!==null&&(M=re.retryLane);break;case 19:V=w.stateNode;break;case 22:V=w.stateNode._retryCache;break;default:throw Error(r(314))}V!==null&&V.delete(j),zbe(w,M)}function pgt(w,j){return xe(w,j)}var nL=null,_N=null,WW=!1,rL=!1,qW=!1,B1=0;function $y(w){w!==_N&&w.next===null&&(_N===null?nL=_N=w:_N=_N.next=w),rL=!0,WW||(WW=!0,mgt())}function oT(w,j){if(!qW&&rL){qW=!0;do for(var M=!1,V=nL;V!==null;){if(w!==0){var re=V.pendingLanes;if(re===0)var le=0;else{var je=V.suspendedLanes,We=V.pingedLanes;le=(1<<31-mt(42|w)+1)-1,le&=re&~(je&~We),le=le&201326741?le&201326741|1:le?le|2:0}le!==0&&(M=!0,Gbe(V,le))}else le=Vi,le=Dt(V,V===Qs?le:0,V.cancelPendingCommit!==null||V.timeoutHandle!==-1),(le&3)===0||on(V,le)||(M=!0,Gbe(V,le));V=V.next}while(M);qW=!1}}function hgt(){Hbe()}function Hbe(){rL=WW=!1;var w=0;B1!==0&&jgt()&&(w=B1);for(var j=Te(),M=null,V=nL;V!==null;){var re=V.next,le=Vbe(V,j);le===0?(V.next=null,M===null?nL=re:M.next=re,re===null&&(_N=M)):(M=V,(w!==0||(le&3)!==0)&&(rL=!0)),V=re}ld!==0&&ld!==5||oT(w),B1!==0&&(B1=0)}function Vbe(w,j){for(var M=w.suspendedLanes,V=w.pingedLanes,re=w.expirationTimes,le=w.pendingLanes&-62914561;0We)break;var Bn=_t.transferSize,Zn=_t.initiatorType;Bn&&Qbe(Zn)&&(_t=_t.responseEnd,je+=Bn*(_t"u"?null:document;function dve(w,j,M){var V=jN;if(V&&typeof j=="string"&&j){var re=vr(j);re='link[rel="'+w+'"][href="'+re+'"]',typeof M=="string"&&(re+='[crossorigin="'+M+'"]'),uve.has(re)||(uve.add(re),w={rel:w,crossOrigin:M,href:j},V.querySelector(re)===null&&(j=V.createElement("link"),yf(j,"link",w),Fn(j),V.head.appendChild(j)))}}function Rgt(w){_v.D(w),dve("dns-prefetch",w,null)}function Ogt(w,j){_v.C(w,j),dve("preconnect",w,j)}function Dgt(w,j,M){_v.L(w,j,M);var V=jN;if(V&&w&&j){var re='link[rel="preload"][as="'+vr(j)+'"]';j==="image"&&M&&M.imageSrcSet?(re+='[imagesrcset="'+vr(M.imageSrcSet)+'"]',typeof M.imageSizes=="string"&&(re+='[imagesizes="'+vr(M.imageSizes)+'"]')):re+='[href="'+vr(w)+'"]';var le=re;switch(j){case"style":le=NN(w);break;case"script":le=EN(w)}Gm.has(le)||(w=f({rel:"preload",href:j==="image"&&M&&M.imageSrcSet?void 0:w,as:j},M),Gm.set(le,w),V.querySelector(re)!==null||j==="style"&&V.querySelector(lT(le))||j==="script"&&V.querySelector(cT(le))||(j=V.createElement("link"),yf(j,"link",w),Fn(j),V.head.appendChild(j)))}}function Lgt(w,j){_v.m(w,j);var M=jN;if(M&&w){var V=j&&typeof j.as=="string"?j.as:"script",re='link[rel="modulepreload"][as="'+vr(V)+'"][href="'+vr(w)+'"]',le=re;switch(V){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":le=EN(w)}if(!Gm.has(le)&&(w=f({rel:"modulepreload",href:w},j),Gm.set(le,w),M.querySelector(re)===null)){switch(V){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(M.querySelector(cT(le)))return}V=M.createElement("link"),yf(V,"link",w),Fn(V),M.head.appendChild(V)}}}function $gt(w,j,M){_v.S(w,j,M);var V=jN;if(V&&w){var re=Tn(V).hoistableStyles,le=NN(w);j=j||"default";var je=re.get(le);if(!je){var We={loading:0,preload:null};if(je=V.querySelector(lT(le)))We.loading=5;else{w=f({rel:"stylesheet",href:w,"data-precedence":j},M),(M=Gm.get(le))&&cq(w,M);var _t=je=V.createElement("link");Fn(_t),yf(_t,"link",w),_t._p=new Promise(function(yn,Bn){_t.onload=yn,_t.onerror=Bn}),_t.addEventListener("load",function(){We.loading|=1}),_t.addEventListener("error",function(){We.loading|=2}),We.loading|=4,lL(je,j,V)}je={type:"stylesheet",instance:je,count:1,state:We},re.set(le,je)}}}function Fgt(w,j){_v.X(w,j);var M=jN;if(M&&w){var V=Tn(M).hoistableScripts,re=EN(w),le=V.get(re);le||(le=M.querySelector(cT(re)),le||(w=f({src:w,async:!0},j),(j=Gm.get(re))&&uq(w,j),le=M.createElement("script"),Fn(le),yf(le,"link",w),M.head.appendChild(le)),le={type:"script",instance:le,count:1,state:null},V.set(re,le))}}function Bgt(w,j){_v.M(w,j);var M=jN;if(M&&w){var V=Tn(M).hoistableScripts,re=EN(w),le=V.get(re);le||(le=M.querySelector(cT(re)),le||(w=f({src:w,async:!0,type:"module"},j),(j=Gm.get(re))&&uq(w,j),le=M.createElement("script"),Fn(le),yf(le,"link",w),M.head.appendChild(le)),le={type:"script",instance:le,count:1,state:null},V.set(re,le))}}function fve(w,j,M,V){var re=(re=J.current)?sL(re):null;if(!re)throw Error(r(446));switch(w){case"meta":case"title":return null;case"style":return typeof M.precedence=="string"&&typeof M.href=="string"?(j=NN(M.href),M=Tn(re).hoistableStyles,V=M.get(j),V||(V={type:"style",instance:null,count:0,state:null},M.set(j,V)),V):{type:"void",instance:null,count:0,state:null};case"link":if(M.rel==="stylesheet"&&typeof M.href=="string"&&typeof M.precedence=="string"){w=NN(M.href);var le=Tn(re).hoistableStyles,je=le.get(w);if(je||(re=re.ownerDocument||re,je={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},le.set(w,je),(le=re.querySelector(lT(w)))&&!le._p&&(je.instance=le,je.state.loading=5),Gm.has(w)||(M={rel:"preload",as:"style",href:M.href,crossOrigin:M.crossOrigin,integrity:M.integrity,media:M.media,hrefLang:M.hrefLang,referrerPolicy:M.referrerPolicy},Gm.set(w,M),le||zgt(re,w,M,je.state))),j&&V===null)throw Error(r(528,""));return je}if(j&&V!==null)throw Error(r(529,""));return null;case"script":return j=M.async,M=M.src,typeof M=="string"&&j&&typeof j!="function"&&typeof j!="symbol"?(j=EN(M),M=Tn(re).hoistableScripts,V=M.get(j),V||(V={type:"script",instance:null,count:0,state:null},M.set(j,V)),V):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,w))}}function NN(w){return'href="'+vr(w)+'"'}function lT(w){return'link[rel="stylesheet"]['+w+"]"}function pve(w){return f({},w,{"data-precedence":w.precedence,precedence:null})}function zgt(w,j,M,V){w.querySelector('link[rel="preload"][as="style"]['+j+"]")?V.loading=1:(j=w.createElement("link"),V.preload=j,j.addEventListener("load",function(){return V.loading|=1}),j.addEventListener("error",function(){return V.loading|=2}),yf(j,"link",M),Fn(j),w.head.appendChild(j))}function EN(w){return'[src="'+vr(w)+'"]'}function cT(w){return"script[async]"+w}function hve(w,j,M){if(j.count++,j.instance===null)switch(j.type){case"style":var V=w.querySelector('style[data-href~="'+vr(M.href)+'"]');if(V)return j.instance=V,Fn(V),V;var re=f({},M,{"data-href":M.href,"data-precedence":M.precedence,href:null,precedence:null});return V=(w.ownerDocument||w).createElement("style"),Fn(V),yf(V,"style",re),lL(V,M.precedence,w),j.instance=V;case"stylesheet":re=NN(M.href);var le=w.querySelector(lT(re));if(le)return j.state.loading|=4,j.instance=le,Fn(le),le;V=pve(M),(re=Gm.get(re))&&cq(V,re),le=(w.ownerDocument||w).createElement("link"),Fn(le);var je=le;return je._p=new Promise(function(We,_t){je.onload=We,je.onerror=_t}),yf(le,"link",V),j.state.loading|=4,lL(le,M.precedence,w),j.instance=le;case"script":return le=EN(M.src),(re=w.querySelector(cT(le)))?(j.instance=re,Fn(re),re):(V=M,(re=Gm.get(le))&&(V=f({},M),uq(V,re)),w=w.ownerDocument||w,re=w.createElement("script"),Fn(re),yf(re,"link",V),w.head.appendChild(re),j.instance=re);case"void":return null;default:throw Error(r(443,j.type))}else j.type==="stylesheet"&&(j.state.loading&4)===0&&(V=j.instance,j.state.loading|=4,lL(V,M.precedence,w));return j.instance}function lL(w,j,M){for(var V=M.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),re=V.length?V[V.length-1]:null,le=re,je=0;je title"):null)}function Hgt(w,j,M){if(M===1||j.itemProp!=null)return!1;switch(w){case"meta":case"title":return!0;case"style":if(typeof j.precedence!="string"||typeof j.href!="string"||j.href==="")break;return!0;case"link":if(typeof j.rel!="string"||typeof j.href!="string"||j.href===""||j.onLoad||j.onError)break;switch(j.rel){case"stylesheet":return w=j.disabled,typeof j.precedence=="string"&&w==null;default:return!0}case"script":if(j.async&&typeof j.async!="function"&&typeof j.async!="symbol"&&!j.onLoad&&!j.onError&&j.src&&typeof j.src=="string")return!0}return!1}function yve(w){return!(w.type==="stylesheet"&&(w.state.loading&3)===0)}function Vgt(w,j,M,V){if(M.type==="stylesheet"&&(typeof V.media!="string"||matchMedia(V.media).matches!==!1)&&(M.state.loading&4)===0){if(M.instance===null){var re=NN(V.href),le=j.querySelector(lT(re));if(le){j=le._p,j!==null&&typeof j=="object"&&typeof j.then=="function"&&(w.count++,w=uL.bind(w),j.then(w,w)),M.state.loading|=4,M.instance=le,Fn(le);return}le=j.ownerDocument||j,V=pve(V),(re=Gm.get(re))&&cq(V,re),le=le.createElement("link"),Fn(le);var je=le;je._p=new Promise(function(We,_t){je.onload=We,je.onerror=_t}),yf(le,"link",V),M.instance=le}w.stylesheets===null&&(w.stylesheets=new Map),w.stylesheets.set(M,j),(j=M.state.preload)&&(M.state.loading&3)===0&&(w.count++,M=uL.bind(w),j.addEventListener("load",M),j.addEventListener("error",M))}}var dq=0;function Ugt(w,j){return w.stylesheets&&w.count===0&&fL(w,w.stylesheets),0dq?50:800)+j);return w.unsuspend=M,function(){w.unsuspend=null,clearTimeout(V),clearTimeout(re)}}:null}function uL(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fL(this,this.stylesheets);else if(this.unsuspend){var w=this.unsuspend;this.unsuspend=null,w()}}}var dL=null;function fL(w,j){w.stylesheets=null,w.unsuspend!==null&&(w.count++,dL=new Map,j.forEach(Ggt,w),dL=null,uL.call(w))}function Ggt(w,j){if(!(j.state.loading&4)){var M=dL.get(w);if(M)var V=M.get(null);else{M=new Map,dL.set(w,M);for(var re=w.querySelectorAll("link[data-precedence],style[data-precedence]"),le=0;le"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),wq.exports=c0t(),wq.exports}var a8e=u0t();const d0t=Pc(a8e),f0t=({details:e,hideSensitive:t=!0})=>{const[n,r]=Pe.useState(!t);if(!e)return s.jsx("div",{children:"No ACH details available."});const o=c=>c?c.length<=4?"****":`****${c.slice(-4)}`:"N/A",i=n?e.routingNumber:o(e.routingNumber),a=n?e.realAccountNumber:o(e.realAccountNumber),l=()=>{r(c=>!c)};return s.jsxs("div",{className:"ach-details-display p-4 border rounded-lg bg-gray-50 shadow-sm",children:[s.jsx("h3",{className:"text-lg font-semibold mb-3 text-gray-700",children:"ACH Payment Details"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between items-center border-b pb-2",children:[s.jsx("span",{className:"text-sm font-medium text-gray-600",children:"Routing Number:"}),s.jsx("span",{className:`font-mono text-base ${n?"text-green-700":"text-red-500"}`,"data-testid":"routing-number",children:i})]}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-sm font-medium text-gray-600",children:"Account Number:"}),s.jsx("span",{className:`font-mono text-base ${n?"text-green-700":"text-red-500"}`,"data-testid":"account-number",children:a})]})]}),t&&s.jsx("button",{onClick:l,className:"mt-4 text-sm px-3 py-1 rounded-md transition-colors duration-150",style:{backgroundColor:n?"#fcd34d":"#3b82f6",color:n?"#1f2937":"white"},"data-testid":"toggle-visibility-button",children:n?"Hide Sensitive Details":"Show Full Details"}),!t&&s.jsx("p",{className:"mt-4 text-xs text-gray-500",children:"Note: Details are displayed in full as configured by component props."})]})},p0t=Object.freeze(Object.defineProperty({__proto__:null,default:f0t},Symbol.toStringTag,{value:"Module"}));/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */let h0t,m0t;function g0t(){return{geminiUrl:h0t,vertexUrl:m0t}}function y0t(e,t,n,r){var o,i;if(!(e!=null&&e.baseUrl)){const a=g0t();return t?(o=a.vertexUrl)!==null&&o!==void 0?o:n:(i=a.geminiUrl)!==null&&i!==void 0?i:r}return e.baseUrl}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class a1{}function zr(e,t){const n=/\{([^}]+)\}/g;return e.replace(n,(r,o)=>{if(Object.prototype.hasOwnProperty.call(t,o)){const i=t[o];return i!=null?String(i):""}else throw new Error(`Key '${o}' not found in valueMap.`)})}function ee(e,t,n){for(let i=0;i({}));else throw new Error(`Value must be a list given an array path ${a}`);if(Array.isArray(e[l])){const c=e[l];if(Array.isArray(n))for(let u=0;uX(l,t.slice(r+1),n)):n}else return n}else e=e[o]}return e}catch(r){if(r instanceof TypeError)return n;throw r}}function b0t(e,t){for(const[n,r]of Object.entries(t)){const o=n.split("."),i=r.split("."),a=new Set;let l=-1;for(let c=0;cl)for(let c=l;c=t.length||typeof e!="object"||e===null)return;const i=t[r];if(i.endsWith("[]")){const a=i.slice(0,-2),l=e;if(a in l&&Array.isArray(l[a]))for(const c of l[a])pee(c,t,n,r+1,o)}else if(i==="*"){if(typeof e=="object"&&e!==null&&!Array.isArray(e)){const a=e,l=Object.keys(a).filter(u=>!u.startsWith("_")&&!o.has(u)),c={};for(const u of l)c[u]=a[u];for(const[u,d]of Object.entries(c)){const f=[];for(const h of n.slice(r))h==="*"?f.push(u):f.push(h);ee(a,f,d)}for(const u of l)delete a[u]}}else{const a=e;i in a&&pee(a[i],t,n,r+1,o)}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function Ole(e){if(typeof e!="string")throw new Error("fromImageBytes must be a string");return e}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function v0t(e){const t={},n=X(e,["operationName"]);n!=null&&ee(t,["operationName"],n);const r=X(e,["resourceName"]);return r!=null&&ee(t,["_url","resourceName"],r),t}function x0t(e){const t={},n=X(e,["name"]);n!=null&&ee(t,["name"],n);const r=X(e,["metadata"]);r!=null&&ee(t,["metadata"],r);const o=X(e,["done"]);o!=null&&ee(t,["done"],o);const i=X(e,["error"]);i!=null&&ee(t,["error"],i);const a=X(e,["response","generateVideoResponse"]);return a!=null&&ee(t,["response"],S0t(a)),t}function w0t(e){const t={},n=X(e,["name"]);n!=null&&ee(t,["name"],n);const r=X(e,["metadata"]);r!=null&&ee(t,["metadata"],r);const o=X(e,["done"]);o!=null&&ee(t,["done"],o);const i=X(e,["error"]);i!=null&&ee(t,["error"],i);const a=X(e,["response"]);return a!=null&&ee(t,["response"],C0t(a)),t}function S0t(e){const t={},n=X(e,["generatedSamples"]);if(n!=null){let i=n;Array.isArray(i)&&(i=i.map(a=>_0t(a))),ee(t,["generatedVideos"],i)}const r=X(e,["raiMediaFilteredCount"]);r!=null&&ee(t,["raiMediaFilteredCount"],r);const o=X(e,["raiMediaFilteredReasons"]);return o!=null&&ee(t,["raiMediaFilteredReasons"],o),t}function C0t(e){const t={},n=X(e,["videos"]);if(n!=null){let i=n;Array.isArray(i)&&(i=i.map(a=>j0t(a))),ee(t,["generatedVideos"],i)}const r=X(e,["raiMediaFilteredCount"]);r!=null&&ee(t,["raiMediaFilteredCount"],r);const o=X(e,["raiMediaFilteredReasons"]);return o!=null&&ee(t,["raiMediaFilteredReasons"],o),t}function _0t(e){const t={},n=X(e,["video"]);return n!=null&&ee(t,["video"],T0t(n)),t}function j0t(e){const t={},n=X(e,["_self"]);return n!=null&&ee(t,["video"],k0t(n)),t}function N0t(e){const t={},n=X(e,["operationName"]);return n!=null&&ee(t,["_url","operationName"],n),t}function E0t(e){const t={},n=X(e,["operationName"]);return n!=null&&ee(t,["_url","operationName"],n),t}function P0t(e){const t={},n=X(e,["name"]);n!=null&&ee(t,["name"],n);const r=X(e,["metadata"]);r!=null&&ee(t,["metadata"],r);const o=X(e,["done"]);o!=null&&ee(t,["done"],o);const i=X(e,["error"]);i!=null&&ee(t,["error"],i);const a=X(e,["response"]);return a!=null&&ee(t,["response"],I0t(a)),t}function I0t(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["parent"]);r!=null&&ee(t,["parent"],r);const o=X(e,["documentName"]);return o!=null&&ee(t,["documentName"],o),t}function s8e(e){const t={},n=X(e,["name"]);n!=null&&ee(t,["name"],n);const r=X(e,["metadata"]);r!=null&&ee(t,["metadata"],r);const o=X(e,["done"]);o!=null&&ee(t,["done"],o);const i=X(e,["error"]);i!=null&&ee(t,["error"],i);const a=X(e,["response"]);return a!=null&&ee(t,["response"],A0t(a)),t}function A0t(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["parent"]);r!=null&&ee(t,["parent"],r);const o=X(e,["documentName"]);return o!=null&&ee(t,["documentName"],o),t}function T0t(e){const t={},n=X(e,["uri"]);n!=null&&ee(t,["uri"],n);const r=X(e,["encodedVideo"]);r!=null&&ee(t,["videoBytes"],Ole(r));const o=X(e,["encoding"]);return o!=null&&ee(t,["mimeType"],o),t}function k0t(e){const t={},n=X(e,["gcsUri"]);n!=null&&ee(t,["uri"],n);const r=X(e,["bytesBase64Encoded"]);r!=null&&ee(t,["videoBytes"],Ole(r));const o=X(e,["mimeType"]);return o!=null&&ee(t,["mimeType"],o),t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */var Hve;(function(e){e.OUTCOME_UNSPECIFIED="OUTCOME_UNSPECIFIED",e.OUTCOME_OK="OUTCOME_OK",e.OUTCOME_FAILED="OUTCOME_FAILED",e.OUTCOME_DEADLINE_EXCEEDED="OUTCOME_DEADLINE_EXCEEDED"})(Hve||(Hve={}));var Vve;(function(e){e.LANGUAGE_UNSPECIFIED="LANGUAGE_UNSPECIFIED",e.PYTHON="PYTHON"})(Vve||(Vve={}));var Uve;(function(e){e.SCHEDULING_UNSPECIFIED="SCHEDULING_UNSPECIFIED",e.SILENT="SILENT",e.WHEN_IDLE="WHEN_IDLE",e.INTERRUPT="INTERRUPT"})(Uve||(Uve={}));var Hn;(function(e){e.TYPE_UNSPECIFIED="TYPE_UNSPECIFIED",e.STRING="STRING",e.NUMBER="NUMBER",e.INTEGER="INTEGER",e.BOOLEAN="BOOLEAN",e.ARRAY="ARRAY",e.OBJECT="OBJECT",e.NULL="NULL"})(Hn||(Hn={}));var Gve;(function(e){e.MODE_UNSPECIFIED="MODE_UNSPECIFIED",e.MODE_DYNAMIC="MODE_DYNAMIC"})(Gve||(Gve={}));var Wve;(function(e){e.API_SPEC_UNSPECIFIED="API_SPEC_UNSPECIFIED",e.SIMPLE_SEARCH="SIMPLE_SEARCH",e.ELASTIC_SEARCH="ELASTIC_SEARCH"})(Wve||(Wve={}));var qve;(function(e){e.AUTH_TYPE_UNSPECIFIED="AUTH_TYPE_UNSPECIFIED",e.NO_AUTH="NO_AUTH",e.API_KEY_AUTH="API_KEY_AUTH",e.HTTP_BASIC_AUTH="HTTP_BASIC_AUTH",e.GOOGLE_SERVICE_ACCOUNT_AUTH="GOOGLE_SERVICE_ACCOUNT_AUTH",e.OAUTH="OAUTH",e.OIDC_AUTH="OIDC_AUTH"})(qve||(qve={}));var Kve;(function(e){e.HTTP_IN_UNSPECIFIED="HTTP_IN_UNSPECIFIED",e.HTTP_IN_QUERY="HTTP_IN_QUERY",e.HTTP_IN_HEADER="HTTP_IN_HEADER",e.HTTP_IN_PATH="HTTP_IN_PATH",e.HTTP_IN_BODY="HTTP_IN_BODY",e.HTTP_IN_COOKIE="HTTP_IN_COOKIE"})(Kve||(Kve={}));var Yve;(function(e){e.PHISH_BLOCK_THRESHOLD_UNSPECIFIED="PHISH_BLOCK_THRESHOLD_UNSPECIFIED",e.BLOCK_LOW_AND_ABOVE="BLOCK_LOW_AND_ABOVE",e.BLOCK_MEDIUM_AND_ABOVE="BLOCK_MEDIUM_AND_ABOVE",e.BLOCK_HIGH_AND_ABOVE="BLOCK_HIGH_AND_ABOVE",e.BLOCK_HIGHER_AND_ABOVE="BLOCK_HIGHER_AND_ABOVE",e.BLOCK_VERY_HIGH_AND_ABOVE="BLOCK_VERY_HIGH_AND_ABOVE",e.BLOCK_ONLY_EXTREMELY_HIGH="BLOCK_ONLY_EXTREMELY_HIGH"})(Yve||(Yve={}));var Xve;(function(e){e.THINKING_LEVEL_UNSPECIFIED="THINKING_LEVEL_UNSPECIFIED",e.LOW="LOW",e.HIGH="HIGH"})(Xve||(Xve={}));var Zve;(function(e){e.HARM_CATEGORY_UNSPECIFIED="HARM_CATEGORY_UNSPECIFIED",e.HARM_CATEGORY_HARASSMENT="HARM_CATEGORY_HARASSMENT",e.HARM_CATEGORY_HATE_SPEECH="HARM_CATEGORY_HATE_SPEECH",e.HARM_CATEGORY_SEXUALLY_EXPLICIT="HARM_CATEGORY_SEXUALLY_EXPLICIT",e.HARM_CATEGORY_DANGEROUS_CONTENT="HARM_CATEGORY_DANGEROUS_CONTENT",e.HARM_CATEGORY_CIVIC_INTEGRITY="HARM_CATEGORY_CIVIC_INTEGRITY",e.HARM_CATEGORY_IMAGE_HATE="HARM_CATEGORY_IMAGE_HATE",e.HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT="HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT",e.HARM_CATEGORY_IMAGE_HARASSMENT="HARM_CATEGORY_IMAGE_HARASSMENT",e.HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT="HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT",e.HARM_CATEGORY_JAILBREAK="HARM_CATEGORY_JAILBREAK"})(Zve||(Zve={}));var Jve;(function(e){e.HARM_BLOCK_METHOD_UNSPECIFIED="HARM_BLOCK_METHOD_UNSPECIFIED",e.SEVERITY="SEVERITY",e.PROBABILITY="PROBABILITY"})(Jve||(Jve={}));var Qve;(function(e){e.HARM_BLOCK_THRESHOLD_UNSPECIFIED="HARM_BLOCK_THRESHOLD_UNSPECIFIED",e.BLOCK_LOW_AND_ABOVE="BLOCK_LOW_AND_ABOVE",e.BLOCK_MEDIUM_AND_ABOVE="BLOCK_MEDIUM_AND_ABOVE",e.BLOCK_ONLY_HIGH="BLOCK_ONLY_HIGH",e.BLOCK_NONE="BLOCK_NONE",e.OFF="OFF"})(Qve||(Qve={}));var exe;(function(e){e.FINISH_REASON_UNSPECIFIED="FINISH_REASON_UNSPECIFIED",e.STOP="STOP",e.MAX_TOKENS="MAX_TOKENS",e.SAFETY="SAFETY",e.RECITATION="RECITATION",e.LANGUAGE="LANGUAGE",e.OTHER="OTHER",e.BLOCKLIST="BLOCKLIST",e.PROHIBITED_CONTENT="PROHIBITED_CONTENT",e.SPII="SPII",e.MALFORMED_FUNCTION_CALL="MALFORMED_FUNCTION_CALL",e.IMAGE_SAFETY="IMAGE_SAFETY",e.UNEXPECTED_TOOL_CALL="UNEXPECTED_TOOL_CALL",e.IMAGE_PROHIBITED_CONTENT="IMAGE_PROHIBITED_CONTENT",e.NO_IMAGE="NO_IMAGE"})(exe||(exe={}));var txe;(function(e){e.HARM_PROBABILITY_UNSPECIFIED="HARM_PROBABILITY_UNSPECIFIED",e.NEGLIGIBLE="NEGLIGIBLE",e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH"})(txe||(txe={}));var nxe;(function(e){e.HARM_SEVERITY_UNSPECIFIED="HARM_SEVERITY_UNSPECIFIED",e.HARM_SEVERITY_NEGLIGIBLE="HARM_SEVERITY_NEGLIGIBLE",e.HARM_SEVERITY_LOW="HARM_SEVERITY_LOW",e.HARM_SEVERITY_MEDIUM="HARM_SEVERITY_MEDIUM",e.HARM_SEVERITY_HIGH="HARM_SEVERITY_HIGH"})(nxe||(nxe={}));var rxe;(function(e){e.URL_RETRIEVAL_STATUS_UNSPECIFIED="URL_RETRIEVAL_STATUS_UNSPECIFIED",e.URL_RETRIEVAL_STATUS_SUCCESS="URL_RETRIEVAL_STATUS_SUCCESS",e.URL_RETRIEVAL_STATUS_ERROR="URL_RETRIEVAL_STATUS_ERROR",e.URL_RETRIEVAL_STATUS_PAYWALL="URL_RETRIEVAL_STATUS_PAYWALL",e.URL_RETRIEVAL_STATUS_UNSAFE="URL_RETRIEVAL_STATUS_UNSAFE"})(rxe||(rxe={}));var oxe;(function(e){e.BLOCKED_REASON_UNSPECIFIED="BLOCKED_REASON_UNSPECIFIED",e.SAFETY="SAFETY",e.OTHER="OTHER",e.BLOCKLIST="BLOCKLIST",e.PROHIBITED_CONTENT="PROHIBITED_CONTENT",e.IMAGE_SAFETY="IMAGE_SAFETY",e.MODEL_ARMOR="MODEL_ARMOR",e.JAILBREAK="JAILBREAK"})(oxe||(oxe={}));var ixe;(function(e){e.TRAFFIC_TYPE_UNSPECIFIED="TRAFFIC_TYPE_UNSPECIFIED",e.ON_DEMAND="ON_DEMAND",e.PROVISIONED_THROUGHPUT="PROVISIONED_THROUGHPUT"})(ixe||(ixe={}));var N7;(function(e){e.MODALITY_UNSPECIFIED="MODALITY_UNSPECIFIED",e.TEXT="TEXT",e.IMAGE="IMAGE",e.AUDIO="AUDIO"})(N7||(N7={}));var axe;(function(e){e.MEDIA_RESOLUTION_UNSPECIFIED="MEDIA_RESOLUTION_UNSPECIFIED",e.MEDIA_RESOLUTION_LOW="MEDIA_RESOLUTION_LOW",e.MEDIA_RESOLUTION_MEDIUM="MEDIA_RESOLUTION_MEDIUM",e.MEDIA_RESOLUTION_HIGH="MEDIA_RESOLUTION_HIGH"})(axe||(axe={}));var sxe;(function(e){e.TUNING_MODE_UNSPECIFIED="TUNING_MODE_UNSPECIFIED",e.TUNING_MODE_FULL="TUNING_MODE_FULL",e.TUNING_MODE_PEFT_ADAPTER="TUNING_MODE_PEFT_ADAPTER"})(sxe||(sxe={}));var lxe;(function(e){e.ADAPTER_SIZE_UNSPECIFIED="ADAPTER_SIZE_UNSPECIFIED",e.ADAPTER_SIZE_ONE="ADAPTER_SIZE_ONE",e.ADAPTER_SIZE_TWO="ADAPTER_SIZE_TWO",e.ADAPTER_SIZE_FOUR="ADAPTER_SIZE_FOUR",e.ADAPTER_SIZE_EIGHT="ADAPTER_SIZE_EIGHT",e.ADAPTER_SIZE_SIXTEEN="ADAPTER_SIZE_SIXTEEN",e.ADAPTER_SIZE_THIRTY_TWO="ADAPTER_SIZE_THIRTY_TWO"})(lxe||(lxe={}));var hee;(function(e){e.JOB_STATE_UNSPECIFIED="JOB_STATE_UNSPECIFIED",e.JOB_STATE_QUEUED="JOB_STATE_QUEUED",e.JOB_STATE_PENDING="JOB_STATE_PENDING",e.JOB_STATE_RUNNING="JOB_STATE_RUNNING",e.JOB_STATE_SUCCEEDED="JOB_STATE_SUCCEEDED",e.JOB_STATE_FAILED="JOB_STATE_FAILED",e.JOB_STATE_CANCELLING="JOB_STATE_CANCELLING",e.JOB_STATE_CANCELLED="JOB_STATE_CANCELLED",e.JOB_STATE_PAUSED="JOB_STATE_PAUSED",e.JOB_STATE_EXPIRED="JOB_STATE_EXPIRED",e.JOB_STATE_UPDATING="JOB_STATE_UPDATING",e.JOB_STATE_PARTIALLY_SUCCEEDED="JOB_STATE_PARTIALLY_SUCCEEDED"})(hee||(hee={}));var cxe;(function(e){e.TUNING_TASK_UNSPECIFIED="TUNING_TASK_UNSPECIFIED",e.TUNING_TASK_I2V="TUNING_TASK_I2V",e.TUNING_TASK_T2V="TUNING_TASK_T2V",e.TUNING_TASK_R2V="TUNING_TASK_R2V"})(cxe||(cxe={}));var uxe;(function(e){e.MEDIA_RESOLUTION_UNSPECIFIED="MEDIA_RESOLUTION_UNSPECIFIED",e.MEDIA_RESOLUTION_LOW="MEDIA_RESOLUTION_LOW",e.MEDIA_RESOLUTION_MEDIUM="MEDIA_RESOLUTION_MEDIUM",e.MEDIA_RESOLUTION_HIGH="MEDIA_RESOLUTION_HIGH"})(uxe||(uxe={}));var dxe;(function(e){e.FEATURE_SELECTION_PREFERENCE_UNSPECIFIED="FEATURE_SELECTION_PREFERENCE_UNSPECIFIED",e.PRIORITIZE_QUALITY="PRIORITIZE_QUALITY",e.BALANCED="BALANCED",e.PRIORITIZE_COST="PRIORITIZE_COST"})(dxe||(dxe={}));var fxe;(function(e){e.UNSPECIFIED="UNSPECIFIED",e.BLOCKING="BLOCKING",e.NON_BLOCKING="NON_BLOCKING"})(fxe||(fxe={}));var pxe;(function(e){e.MODE_UNSPECIFIED="MODE_UNSPECIFIED",e.MODE_DYNAMIC="MODE_DYNAMIC"})(pxe||(pxe={}));var hxe;(function(e){e.ENVIRONMENT_UNSPECIFIED="ENVIRONMENT_UNSPECIFIED",e.ENVIRONMENT_BROWSER="ENVIRONMENT_BROWSER"})(hxe||(hxe={}));var mxe;(function(e){e.MODE_UNSPECIFIED="MODE_UNSPECIFIED",e.AUTO="AUTO",e.ANY="ANY",e.NONE="NONE",e.VALIDATED="VALIDATED"})(mxe||(mxe={}));var gxe;(function(e){e.BLOCK_LOW_AND_ABOVE="BLOCK_LOW_AND_ABOVE",e.BLOCK_MEDIUM_AND_ABOVE="BLOCK_MEDIUM_AND_ABOVE",e.BLOCK_ONLY_HIGH="BLOCK_ONLY_HIGH",e.BLOCK_NONE="BLOCK_NONE"})(gxe||(gxe={}));var yxe;(function(e){e.DONT_ALLOW="DONT_ALLOW",e.ALLOW_ADULT="ALLOW_ADULT",e.ALLOW_ALL="ALLOW_ALL"})(yxe||(yxe={}));var bxe;(function(e){e.auto="auto",e.en="en",e.ja="ja",e.ko="ko",e.hi="hi",e.zh="zh",e.pt="pt",e.es="es"})(bxe||(bxe={}));var vxe;(function(e){e.MASK_MODE_DEFAULT="MASK_MODE_DEFAULT",e.MASK_MODE_USER_PROVIDED="MASK_MODE_USER_PROVIDED",e.MASK_MODE_BACKGROUND="MASK_MODE_BACKGROUND",e.MASK_MODE_FOREGROUND="MASK_MODE_FOREGROUND",e.MASK_MODE_SEMANTIC="MASK_MODE_SEMANTIC"})(vxe||(vxe={}));var xxe;(function(e){e.CONTROL_TYPE_DEFAULT="CONTROL_TYPE_DEFAULT",e.CONTROL_TYPE_CANNY="CONTROL_TYPE_CANNY",e.CONTROL_TYPE_SCRIBBLE="CONTROL_TYPE_SCRIBBLE",e.CONTROL_TYPE_FACE_MESH="CONTROL_TYPE_FACE_MESH"})(xxe||(xxe={}));var wxe;(function(e){e.SUBJECT_TYPE_DEFAULT="SUBJECT_TYPE_DEFAULT",e.SUBJECT_TYPE_PERSON="SUBJECT_TYPE_PERSON",e.SUBJECT_TYPE_ANIMAL="SUBJECT_TYPE_ANIMAL",e.SUBJECT_TYPE_PRODUCT="SUBJECT_TYPE_PRODUCT"})(wxe||(wxe={}));var Sxe;(function(e){e.EDIT_MODE_DEFAULT="EDIT_MODE_DEFAULT",e.EDIT_MODE_INPAINT_REMOVAL="EDIT_MODE_INPAINT_REMOVAL",e.EDIT_MODE_INPAINT_INSERTION="EDIT_MODE_INPAINT_INSERTION",e.EDIT_MODE_OUTPAINT="EDIT_MODE_OUTPAINT",e.EDIT_MODE_CONTROLLED_EDITING="EDIT_MODE_CONTROLLED_EDITING",e.EDIT_MODE_STYLE="EDIT_MODE_STYLE",e.EDIT_MODE_BGSWAP="EDIT_MODE_BGSWAP",e.EDIT_MODE_PRODUCT_IMAGE="EDIT_MODE_PRODUCT_IMAGE"})(Sxe||(Sxe={}));var Cxe;(function(e){e.FOREGROUND="FOREGROUND",e.BACKGROUND="BACKGROUND",e.PROMPT="PROMPT",e.SEMANTIC="SEMANTIC",e.INTERACTIVE="INTERACTIVE"})(Cxe||(Cxe={}));var _xe;(function(e){e.ASSET="ASSET",e.STYLE="STYLE"})(_xe||(_xe={}));var jxe;(function(e){e.INSERT="INSERT",e.REMOVE="REMOVE",e.REMOVE_STATIC="REMOVE_STATIC",e.OUTPAINT="OUTPAINT"})(jxe||(jxe={}));var Nxe;(function(e){e.OPTIMIZED="OPTIMIZED",e.LOSSLESS="LOSSLESS"})(Nxe||(Nxe={}));var Exe;(function(e){e.SUPERVISED_FINE_TUNING="SUPERVISED_FINE_TUNING",e.PREFERENCE_TUNING="PREFERENCE_TUNING"})(Exe||(Exe={}));var Pxe;(function(e){e.STATE_UNSPECIFIED="STATE_UNSPECIFIED",e.STATE_PENDING="STATE_PENDING",e.STATE_ACTIVE="STATE_ACTIVE",e.STATE_FAILED="STATE_FAILED"})(Pxe||(Pxe={}));var Ixe;(function(e){e.STATE_UNSPECIFIED="STATE_UNSPECIFIED",e.PROCESSING="PROCESSING",e.ACTIVE="ACTIVE",e.FAILED="FAILED"})(Ixe||(Ixe={}));var Axe;(function(e){e.SOURCE_UNSPECIFIED="SOURCE_UNSPECIFIED",e.UPLOADED="UPLOADED",e.GENERATED="GENERATED"})(Axe||(Axe={}));var Txe;(function(e){e.TURN_COMPLETE_REASON_UNSPECIFIED="TURN_COMPLETE_REASON_UNSPECIFIED",e.MALFORMED_FUNCTION_CALL="MALFORMED_FUNCTION_CALL",e.RESPONSE_REJECTED="RESPONSE_REJECTED",e.NEED_MORE_INPUT="NEED_MORE_INPUT"})(Txe||(Txe={}));var kxe;(function(e){e.MODALITY_UNSPECIFIED="MODALITY_UNSPECIFIED",e.TEXT="TEXT",e.IMAGE="IMAGE",e.VIDEO="VIDEO",e.AUDIO="AUDIO",e.DOCUMENT="DOCUMENT"})(kxe||(kxe={}));var Mxe;(function(e){e.START_SENSITIVITY_UNSPECIFIED="START_SENSITIVITY_UNSPECIFIED",e.START_SENSITIVITY_HIGH="START_SENSITIVITY_HIGH",e.START_SENSITIVITY_LOW="START_SENSITIVITY_LOW"})(Mxe||(Mxe={}));var Rxe;(function(e){e.END_SENSITIVITY_UNSPECIFIED="END_SENSITIVITY_UNSPECIFIED",e.END_SENSITIVITY_HIGH="END_SENSITIVITY_HIGH",e.END_SENSITIVITY_LOW="END_SENSITIVITY_LOW"})(Rxe||(Rxe={}));var Oxe;(function(e){e.ACTIVITY_HANDLING_UNSPECIFIED="ACTIVITY_HANDLING_UNSPECIFIED",e.START_OF_ACTIVITY_INTERRUPTS="START_OF_ACTIVITY_INTERRUPTS",e.NO_INTERRUPTION="NO_INTERRUPTION"})(Oxe||(Oxe={}));var Dxe;(function(e){e.TURN_COVERAGE_UNSPECIFIED="TURN_COVERAGE_UNSPECIFIED",e.TURN_INCLUDES_ONLY_ACTIVITY="TURN_INCLUDES_ONLY_ACTIVITY",e.TURN_INCLUDES_ALL_INPUT="TURN_INCLUDES_ALL_INPUT"})(Dxe||(Dxe={}));var Lxe;(function(e){e.SCALE_UNSPECIFIED="SCALE_UNSPECIFIED",e.C_MAJOR_A_MINOR="C_MAJOR_A_MINOR",e.D_FLAT_MAJOR_B_FLAT_MINOR="D_FLAT_MAJOR_B_FLAT_MINOR",e.D_MAJOR_B_MINOR="D_MAJOR_B_MINOR",e.E_FLAT_MAJOR_C_MINOR="E_FLAT_MAJOR_C_MINOR",e.E_MAJOR_D_FLAT_MINOR="E_MAJOR_D_FLAT_MINOR",e.F_MAJOR_D_MINOR="F_MAJOR_D_MINOR",e.G_FLAT_MAJOR_E_FLAT_MINOR="G_FLAT_MAJOR_E_FLAT_MINOR",e.G_MAJOR_E_MINOR="G_MAJOR_E_MINOR",e.A_FLAT_MAJOR_F_MINOR="A_FLAT_MAJOR_F_MINOR",e.A_MAJOR_G_FLAT_MINOR="A_MAJOR_G_FLAT_MINOR",e.B_FLAT_MAJOR_G_MINOR="B_FLAT_MAJOR_G_MINOR",e.B_MAJOR_A_FLAT_MINOR="B_MAJOR_A_FLAT_MINOR"})(Lxe||(Lxe={}));var $xe;(function(e){e.MUSIC_GENERATION_MODE_UNSPECIFIED="MUSIC_GENERATION_MODE_UNSPECIFIED",e.QUALITY="QUALITY",e.DIVERSITY="DIVERSITY",e.VOCALIZATION="VOCALIZATION"})($xe||($xe={}));var HE;(function(e){e.PLAYBACK_CONTROL_UNSPECIFIED="PLAYBACK_CONTROL_UNSPECIFIED",e.PLAY="PLAY",e.PAUSE="PAUSE",e.STOP="STOP",e.RESET_CONTEXT="RESET_CONTEXT"})(HE||(HE={}));class mee{constructor(t){const n={};for(const r of t.headers.entries())n[r[0]]=r[1];this.headers=n,this.responseInternal=t}json(){return this.responseInternal.json()}}class gT{get text(){var t,n,r,o,i,a,l,c;if(((o=(r=(n=(t=this.candidates)===null||t===void 0?void 0:t[0])===null||n===void 0?void 0:n.content)===null||r===void 0?void 0:r.parts)===null||o===void 0?void 0:o.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning text from the first one.");let u="",d=!1;const f=[];for(const h of(c=(l=(a=(i=this.candidates)===null||i===void 0?void 0:i[0])===null||a===void 0?void 0:a.content)===null||l===void 0?void 0:l.parts)!==null&&c!==void 0?c:[]){for(const[m,g]of Object.entries(h))m!=="text"&&m!=="thought"&&m!=="thoughtSignature"&&(g!==null||g!==void 0)&&f.push(m);if(typeof h.text=="string"){if(typeof h.thought=="boolean"&&h.thought)continue;d=!0,u+=h.text}}return f.length>0&&console.warn(`there are non-text parts ${f} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`),d?u:void 0}get data(){var t,n,r,o,i,a,l,c;if(((o=(r=(n=(t=this.candidates)===null||t===void 0?void 0:t[0])===null||n===void 0?void 0:n.content)===null||r===void 0?void 0:r.parts)===null||o===void 0?void 0:o.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning data from the first one.");let u="";const d=[];for(const f of(c=(l=(a=(i=this.candidates)===null||i===void 0?void 0:i[0])===null||a===void 0?void 0:a.content)===null||l===void 0?void 0:l.parts)!==null&&c!==void 0?c:[]){for(const[h,m]of Object.entries(f))h!=="inlineData"&&(m!==null||m!==void 0)&&d.push(h);f.inlineData&&typeof f.inlineData.data=="string"&&(u+=atob(f.inlineData.data))}return d.length>0&&console.warn(`there are non-data parts ${d} in the response, returning concatenation of all data parts. Please refer to the non data parts for a full response from model.`),u.length>0?btoa(u):void 0}get functionCalls(){var t,n,r,o,i,a,l,c;if(((o=(r=(n=(t=this.candidates)===null||t===void 0?void 0:t[0])===null||n===void 0?void 0:n.content)===null||r===void 0?void 0:r.parts)===null||o===void 0?void 0:o.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning function calls from the first one.");const u=(c=(l=(a=(i=this.candidates)===null||i===void 0?void 0:i[0])===null||a===void 0?void 0:a.content)===null||l===void 0?void 0:l.parts)===null||c===void 0?void 0:c.filter(d=>d.functionCall).map(d=>d.functionCall).filter(d=>d!==void 0);if((u==null?void 0:u.length)!==0)return u}get executableCode(){var t,n,r,o,i,a,l,c,u;if(((o=(r=(n=(t=this.candidates)===null||t===void 0?void 0:t[0])===null||n===void 0?void 0:n.content)===null||r===void 0?void 0:r.parts)===null||o===void 0?void 0:o.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning executable code from the first one.");const d=(c=(l=(a=(i=this.candidates)===null||i===void 0?void 0:i[0])===null||a===void 0?void 0:a.content)===null||l===void 0?void 0:l.parts)===null||c===void 0?void 0:c.filter(f=>f.executableCode).map(f=>f.executableCode).filter(f=>f!==void 0);if((d==null?void 0:d.length)!==0)return(u=d==null?void 0:d[0])===null||u===void 0?void 0:u.code}get codeExecutionResult(){var t,n,r,o,i,a,l,c,u;if(((o=(r=(n=(t=this.candidates)===null||t===void 0?void 0:t[0])===null||n===void 0?void 0:n.content)===null||r===void 0?void 0:r.parts)===null||o===void 0?void 0:o.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning code execution result from the first one.");const d=(c=(l=(a=(i=this.candidates)===null||i===void 0?void 0:i[0])===null||a===void 0?void 0:a.content)===null||l===void 0?void 0:l.parts)===null||c===void 0?void 0:c.filter(f=>f.codeExecutionResult).map(f=>f.codeExecutionResult).filter(f=>f!==void 0);if((d==null?void 0:d.length)!==0)return(u=d==null?void 0:d[0])===null||u===void 0?void 0:u.output}}class Fxe{}class Bxe{}class M0t{}class R0t{}class O0t{}class D0t{}class zxe{}class Hxe{}class Vxe{}class L0t{}class E7{_fromAPIResponse({apiResponse:t,_isVertexAI:n}){const r=new E7;let o;const i=t;return n?o=w0t(i):o=x0t(i),Object.assign(r,o),r}}class Uxe{}class Gxe{}class Wxe{}class qxe{}class $0t{}class F0t{}class B0t{}class Dle{_fromAPIResponse({apiResponse:t,_isVertexAI:n}){const r=new Dle,i=P0t(t);return Object.assign(r,i),r}}class z0t{}class H0t{}class V0t{}class Kxe{}class U0t{get text(){var t,n,r;let o="",i=!1;const a=[];for(const l of(r=(n=(t=this.serverContent)===null||t===void 0?void 0:t.modelTurn)===null||n===void 0?void 0:n.parts)!==null&&r!==void 0?r:[]){for(const[c,u]of Object.entries(l))c!=="text"&&c!=="thought"&&u!==null&&a.push(c);if(typeof l.text=="string"){if(typeof l.thought=="boolean"&&l.thought)continue;i=!0,o+=l.text}}return a.length>0&&console.warn(`there are non-text parts ${a} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`),i?o:void 0}get data(){var t,n,r;let o="";const i=[];for(const a of(r=(n=(t=this.serverContent)===null||t===void 0?void 0:t.modelTurn)===null||n===void 0?void 0:n.parts)!==null&&r!==void 0?r:[]){for(const[l,c]of Object.entries(a))l!=="inlineData"&&c!==null&&i.push(l);a.inlineData&&typeof a.inlineData.data=="string"&&(o+=atob(a.inlineData.data))}return i.length>0&&console.warn(`there are non-data parts ${i} in the response, returning concatenation of all data parts. Please refer to the non data parts for a full response from model.`),o.length>0?btoa(o):void 0}}class G0t{get audioChunk(){if(this.serverContent&&this.serverContent.audioChunks&&this.serverContent.audioChunks.length>0)return this.serverContent.audioChunks[0]}}class Lle{_fromAPIResponse({apiResponse:t,_isVertexAI:n}){const r=new Lle,i=s8e(t);return Object.assign(r,i),r}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function Oa(e,t){if(!t||typeof t!="string")throw new Error("model is required and must be a string");if(t.includes("..")||t.includes("?")||t.includes("&"))throw new Error("invalid model parameter");if(e.isVertexAI()){if(t.startsWith("publishers/")||t.startsWith("projects/")||t.startsWith("models/"))return t;if(t.indexOf("/")>=0){const n=t.split("/",2);return`publishers/${n[0]}/models/${n[1]}`}else return`publishers/google/models/${t}`}else return t.startsWith("models/")||t.startsWith("tunedModels/")?t:`models/${t}`}function l8e(e,t){const n=Oa(e,t);return n?n.startsWith("publishers/")&&e.isVertexAI()?`projects/${e.getProject()}/locations/${e.getLocation()}/${n}`:n.startsWith("models/")&&e.isVertexAI()?`projects/${e.getProject()}/locations/${e.getLocation()}/publishers/google/${n}`:n:""}function c8e(e){return Array.isArray(e)?e.map(t=>P7(t)):[P7(e)]}function P7(e){if(typeof e=="object"&&e!==null)return e;throw new Error(`Could not parse input as Blob. Unsupported blob type: ${typeof e}`)}function u8e(e){const t=P7(e);if(t.mimeType&&t.mimeType.startsWith("image/"))return t;throw new Error(`Unsupported mime type: ${t.mimeType}`)}function d8e(e){const t=P7(e);if(t.mimeType&&t.mimeType.startsWith("audio/"))return t;throw new Error(`Unsupported mime type: ${t.mimeType}`)}function Yxe(e){if(e==null)throw new Error("PartUnion is required");if(typeof e=="object")return e;if(typeof e=="string")return{text:e};throw new Error(`Unsupported part type: ${typeof e}`)}function f8e(e){if(e==null||Array.isArray(e)&&e.length===0)throw new Error("PartListUnion is required");return Array.isArray(e)?e.map(t=>Yxe(t)):[Yxe(e)]}function gee(e){return e!=null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)}function Xxe(e){return e!=null&&typeof e=="object"&&"functionCall"in e}function Zxe(e){return e!=null&&typeof e=="object"&&"functionResponse"in e}function ip(e){if(e==null)throw new Error("ContentUnion is required");return gee(e)?e:{role:"user",parts:f8e(e)}}function $le(e,t){if(!t)return[];if(e.isVertexAI()&&Array.isArray(t))return t.flatMap(n=>{const r=ip(n);return r.parts&&r.parts.length>0&&r.parts[0].text!==void 0?[r.parts[0].text]:[]});if(e.isVertexAI()){const n=ip(t);return n.parts&&n.parts.length>0&&n.parts[0].text!==void 0?[n.parts[0].text]:[]}return Array.isArray(t)?t.map(n=>ip(n)):[ip(t)]}function Sg(e){if(e==null||Array.isArray(e)&&e.length===0)throw new Error("contents are required");if(!Array.isArray(e)){if(Xxe(e)||Zxe(e))throw new Error("To specify functionCall or functionResponse parts, please wrap them in a Content object, specifying the role for them");return[ip(e)]}const t=[],n=[],r=gee(e[0]);for(const o of e){const i=gee(o);if(i!=r)throw new Error("Mixing Content and Parts is not supported, please group the parts into a the appropriate Content objects and specify the roles for them");if(i)t.push(o);else{if(Xxe(o)||Zxe(o))throw new Error("To specify functionCall or functionResponse parts, please wrap them, and any other parts, in Content objects as appropriate, specifying the role for them");n.push(o)}}return r||t.push({role:"user",parts:f8e(n)}),t}function W0t(e,t){e.includes("null")&&(t.nullable=!0);const n=e.filter(r=>r!=="null");if(n.length===1)t.type=Object.values(Hn).includes(n[0].toUpperCase())?n[0].toUpperCase():Hn.TYPE_UNSPECIFIED;else{t.anyOf=[];for(const r of n)t.anyOf.push({type:Object.values(Hn).includes(r.toUpperCase())?r.toUpperCase():Hn.TYPE_UNSPECIFIED})}}function b5(e){const t={},n=["items"],r=["anyOf"],o=["properties"];if(e.type&&e.anyOf)throw new Error("type and anyOf cannot be both populated.");const i=e.anyOf;i!=null&&i.length==2&&(i[0].type==="null"?(t.nullable=!0,e=i[1]):i[1].type==="null"&&(t.nullable=!0,e=i[0])),e.type instanceof Array&&W0t(e.type,t);for(const[a,l]of Object.entries(e))if(l!=null)if(a=="type"){if(l==="null")throw new Error("type: null can not be the only possible type for the field.");if(l instanceof Array)continue;t.type=Object.values(Hn).includes(l.toUpperCase())?l.toUpperCase():Hn.TYPE_UNSPECIFIED}else if(n.includes(a))t[a]=b5(l);else if(r.includes(a)){const c=[];for(const u of l){if(u.type=="null"){t.nullable=!0;continue}c.push(b5(u))}t[a]=c}else if(o.includes(a)){const c={};for(const[u,d]of Object.entries(l))c[u]=b5(d);t[a]=c}else{if(a==="additionalProperties")continue;t[a]=l}return t}function Fle(e){return b5(e)}function Ble(e){if(typeof e=="object")return e;if(typeof e=="string")return{voiceConfig:{prebuiltVoiceConfig:{voiceName:e}}};throw new Error(`Unsupported speechConfig type: ${typeof e}`)}function zle(e){if("multiSpeakerVoiceConfig"in e)throw new Error("multiSpeakerVoiceConfig is not supported in the live API.");return e}function SI(e){if(e.functionDeclarations)for(const t of e.functionDeclarations)t.parameters&&(Object.keys(t.parameters).includes("$schema")?t.parametersJsonSchema||(t.parametersJsonSchema=t.parameters,delete t.parameters):t.parameters=b5(t.parameters)),t.response&&(Object.keys(t.response).includes("$schema")?t.responseJsonSchema||(t.responseJsonSchema=t.response,delete t.response):t.response=b5(t.response));return e}function CI(e){if(e==null)throw new Error("tools is required");if(!Array.isArray(e))throw new Error("tools is required and must be an array of Tools");const t=[];for(const n of e)t.push(n);return t}function q0t(e,t,n,r=1){const o=!t.startsWith(`${n}/`)&&t.split("/").length===r;return e.isVertexAI()?t.startsWith("projects/")?t:t.startsWith("locations/")?`projects/${e.getProject()}/${t}`:t.startsWith(`${n}/`)?`projects/${e.getProject()}/locations/${e.getLocation()}/${t}`:o?`projects/${e.getProject()}/locations/${e.getLocation()}/${n}/${t}`:t:o?`${n}/${t}`:t}function s1(e,t){if(typeof t!="string")throw new Error("name must be a string");return q0t(e,t,"cachedContents")}function p8e(e){switch(e){case"STATE_UNSPECIFIED":return"JOB_STATE_UNSPECIFIED";case"CREATING":return"JOB_STATE_RUNNING";case"ACTIVE":return"JOB_STATE_SUCCEEDED";case"FAILED":return"JOB_STATE_FAILED";default:return e}}function QS(e){return Ole(e)}function K0t(e){return e!=null&&typeof e=="object"&&"name"in e}function Y0t(e){return e!=null&&typeof e=="object"&&"video"in e}function X0t(e){return e!=null&&typeof e=="object"&&"uri"in e}function h8e(e){var t;let n;if(K0t(e)&&(n=e.name),!(X0t(e)&&(n=e.uri,n===void 0))&&!(Y0t(e)&&(n=(t=e.video)===null||t===void 0?void 0:t.uri,n===void 0))){if(typeof e=="string"&&(n=e),n===void 0)throw new Error("Could not extract file name from the provided input.");if(n.startsWith("https://")){const o=n.split("files/")[1].match(/[a-z0-9]+/);if(o===null)throw new Error(`Could not extract file name from URI ${n}`);n=o[0]}else n.startsWith("files/")&&(n=n.split("files/")[1]);return n}}function m8e(e,t){let n;return e.isVertexAI()?n=t?"publishers/google/models":"models":n=t?"models":"tunedModels",n}function g8e(e){for(const t of["models","tunedModels","publisherModels"])if(Z0t(e,t))return e[t];return[]}function Z0t(e,t){return e!==null&&typeof e=="object"&&t in e}function J0t(e,t={}){const n=e,r={name:n.name,description:n.description,parametersJsonSchema:n.inputSchema};return n.outputSchema&&(r.responseJsonSchema=n.outputSchema),t.behavior&&(r.behavior=t.behavior),{functionDeclarations:[r]}}function Q0t(e,t={}){const n=[],r=new Set;for(const o of e){const i=o.name;if(r.has(i))throw new Error(`Duplicate function name ${i} found in MCP tools. Please ensure function names are unique.`);r.add(i);const a=J0t(o,t);a.functionDeclarations&&n.push(...a.functionDeclarations)}return{functionDeclarations:n}}function y8e(e,t){let n;if(typeof t=="string")if(e.isVertexAI())if(t.startsWith("gs://"))n={format:"jsonl",gcsUri:[t]};else if(t.startsWith("bq://"))n={format:"bigquery",bigqueryUri:t};else throw new Error(`Unsupported string source for Vertex AI: ${t}`);else if(t.startsWith("files/"))n={fileName:t};else throw new Error(`Unsupported string source for Gemini API: ${t}`);else if(Array.isArray(t)){if(e.isVertexAI())throw new Error("InlinedRequest[] is not supported in Vertex AI.");n={inlinedRequests:t}}else n=t;const r=[n.gcsUri,n.bigqueryUri].filter(Boolean).length,o=[n.inlinedRequests,n.fileName].filter(Boolean).length;if(e.isVertexAI()){if(o>0||r!==1)throw new Error("Exactly one of `gcsUri` or `bigqueryUri` must be set for Vertex AI.")}else if(r>0||o!==1)throw new Error("Exactly one of `inlinedRequests`, `fileName`, must be set for Gemini API.");return n}function eyt(e){if(typeof e!="string")return e;const t=e;if(t.startsWith("gs://"))return{format:"jsonl",gcsUri:t};if(t.startsWith("bq://"))return{format:"bigquery",bigqueryUri:t};throw new Error(`Unsupported destination: ${t}`)}function b8e(e){if(typeof e!="object"||e===null)return{};const t=e,n=t.inlinedResponses;if(typeof n!="object"||n===null)return e;const o=n.inlinedResponses;if(!Array.isArray(o)||o.length===0)return e;let i=!1;for(const a of o){if(typeof a!="object"||a===null)continue;const c=a.response;if(typeof c!="object"||c===null)continue;if(c.embedding!==void 0){i=!0;break}}return i&&(t.inlinedEmbedContentResponses=t.inlinedResponses,delete t.inlinedResponses),e}function _I(e,t){const n=t;if(!e.isVertexAI()){if(/batches\/[^/]+$/.test(n))return n.split("/").pop();throw new Error(`Invalid batch job name: ${n}.`)}if(/^projects\/[^/]+\/locations\/[^/]+\/batchPredictionJobs\/[^/]+$/.test(n))return n.split("/").pop();if(/^\d+$/.test(n))return n;throw new Error(`Invalid batch job name: ${n}.`)}function v8e(e){const t=e;return t==="BATCH_STATE_UNSPECIFIED"?"JOB_STATE_UNSPECIFIED":t==="BATCH_STATE_PENDING"?"JOB_STATE_PENDING":t==="BATCH_STATE_RUNNING"?"JOB_STATE_RUNNING":t==="BATCH_STATE_SUCCEEDED"?"JOB_STATE_SUCCEEDED":t==="BATCH_STATE_FAILED"?"JOB_STATE_FAILED":t==="BATCH_STATE_CANCELLED"?"JOB_STATE_CANCELLED":t==="BATCH_STATE_EXPIRED"?"JOB_STATE_EXPIRED":t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function tyt(e){const t={},n=X(e,["responsesFile"]);n!=null&&ee(t,["fileName"],n);const r=X(e,["inlinedResponses","inlinedResponses"]);if(r!=null){let i=r;Array.isArray(i)&&(i=i.map(a=>Oyt(a))),ee(t,["inlinedResponses"],i)}const o=X(e,["inlinedEmbedContentResponses","inlinedResponses"]);if(o!=null){let i=o;Array.isArray(i)&&(i=i.map(a=>a)),ee(t,["inlinedEmbedContentResponses"],i)}return t}function nyt(e){const t={},n=X(e,["predictionsFormat"]);n!=null&&ee(t,["format"],n);const r=X(e,["gcsDestination","outputUriPrefix"]);r!=null&&ee(t,["gcsUri"],r);const o=X(e,["bigqueryDestination","outputUri"]);return o!=null&&ee(t,["bigqueryUri"],o),t}function ryt(e){const t={},n=X(e,["format"]);n!=null&&ee(t,["predictionsFormat"],n);const r=X(e,["gcsUri"]);r!=null&&ee(t,["gcsDestination","outputUriPrefix"],r);const o=X(e,["bigqueryUri"]);if(o!=null&&ee(t,["bigqueryDestination","outputUri"],o),X(e,["fileName"])!==void 0)throw new Error("fileName parameter is not supported in Vertex AI.");if(X(e,["inlinedResponses"])!==void 0)throw new Error("inlinedResponses parameter is not supported in Vertex AI.");if(X(e,["inlinedEmbedContentResponses"])!==void 0)throw new Error("inlinedEmbedContentResponses parameter is not supported in Vertex AI.");return t}function YF(e){const t={},n=X(e,["name"]);n!=null&&ee(t,["name"],n);const r=X(e,["metadata","displayName"]);r!=null&&ee(t,["displayName"],r);const o=X(e,["metadata","state"]);o!=null&&ee(t,["state"],v8e(o));const i=X(e,["metadata","createTime"]);i!=null&&ee(t,["createTime"],i);const a=X(e,["metadata","endTime"]);a!=null&&ee(t,["endTime"],a);const l=X(e,["metadata","updateTime"]);l!=null&&ee(t,["updateTime"],l);const c=X(e,["metadata","model"]);c!=null&&ee(t,["model"],c);const u=X(e,["metadata","output"]);return u!=null&&ee(t,["dest"],tyt(b8e(u))),t}function yee(e){const t={},n=X(e,["name"]);n!=null&&ee(t,["name"],n);const r=X(e,["displayName"]);r!=null&&ee(t,["displayName"],r);const o=X(e,["state"]);o!=null&&ee(t,["state"],v8e(o));const i=X(e,["error"]);i!=null&&ee(t,["error"],i);const a=X(e,["createTime"]);a!=null&&ee(t,["createTime"],a);const l=X(e,["startTime"]);l!=null&&ee(t,["startTime"],l);const c=X(e,["endTime"]);c!=null&&ee(t,["endTime"],c);const u=X(e,["updateTime"]);u!=null&&ee(t,["updateTime"],u);const d=X(e,["model"]);d!=null&&ee(t,["model"],d);const f=X(e,["inputConfig"]);f!=null&&ee(t,["src"],oyt(f));const h=X(e,["outputConfig"]);h!=null&&ee(t,["dest"],nyt(b8e(h)));const m=X(e,["completionStats"]);return m!=null&&ee(t,["completionStats"],m),t}function oyt(e){const t={},n=X(e,["instancesFormat"]);n!=null&&ee(t,["format"],n);const r=X(e,["gcsSource","uris"]);r!=null&&ee(t,["gcsUri"],r);const o=X(e,["bigquerySource","inputUri"]);return o!=null&&ee(t,["bigqueryUri"],o),t}function iyt(e,t){const n={};if(X(t,["format"])!==void 0)throw new Error("format parameter is not supported in Gemini API.");if(X(t,["gcsUri"])!==void 0)throw new Error("gcsUri parameter is not supported in Gemini API.");if(X(t,["bigqueryUri"])!==void 0)throw new Error("bigqueryUri parameter is not supported in Gemini API.");const r=X(t,["fileName"]);r!=null&&ee(n,["fileName"],r);const o=X(t,["inlinedRequests"]);if(o!=null){let i=o;Array.isArray(i)&&(i=i.map(a=>Ryt(e,a))),ee(n,["requests","requests"],i)}return n}function ayt(e){const t={},n=X(e,["format"]);n!=null&&ee(t,["instancesFormat"],n);const r=X(e,["gcsUri"]);r!=null&&ee(t,["gcsSource","uris"],r);const o=X(e,["bigqueryUri"]);if(o!=null&&ee(t,["bigquerySource","inputUri"],o),X(e,["fileName"])!==void 0)throw new Error("fileName parameter is not supported in Vertex AI.");if(X(e,["inlinedRequests"])!==void 0)throw new Error("inlinedRequests parameter is not supported in Vertex AI.");return t}function syt(e){const t={},n=X(e,["data"]);if(n!=null&&ee(t,["data"],n),X(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const r=X(e,["mimeType"]);return r!=null&&ee(t,["mimeType"],r),t}function lyt(e,t){const n={},r=X(t,["name"]);return r!=null&&ee(n,["_url","name"],_I(e,r)),n}function cyt(e,t){const n={},r=X(t,["name"]);return r!=null&&ee(n,["_url","name"],_I(e,r)),n}function uyt(e){const t={},n=X(e,["content"]);n!=null&&ee(t,["content"],n);const r=X(e,["citationMetadata"]);r!=null&&ee(t,["citationMetadata"],dyt(r));const o=X(e,["tokenCount"]);o!=null&&ee(t,["tokenCount"],o);const i=X(e,["finishReason"]);i!=null&&ee(t,["finishReason"],i);const a=X(e,["avgLogprobs"]);a!=null&&ee(t,["avgLogprobs"],a);const l=X(e,["groundingMetadata"]);l!=null&&ee(t,["groundingMetadata"],l);const c=X(e,["index"]);c!=null&&ee(t,["index"],c);const u=X(e,["logprobsResult"]);u!=null&&ee(t,["logprobsResult"],u);const d=X(e,["safetyRatings"]);if(d!=null){let h=d;Array.isArray(h)&&(h=h.map(m=>m)),ee(t,["safetyRatings"],h)}const f=X(e,["urlContextMetadata"]);return f!=null&&ee(t,["urlContextMetadata"],f),t}function dyt(e){const t={},n=X(e,["citationSources"]);if(n!=null){let r=n;Array.isArray(r)&&(r=r.map(o=>o)),ee(t,["citations"],r)}return t}function x8e(e){const t={},n=X(e,["parts"]);if(n!=null){let o=n;Array.isArray(o)&&(o=o.map(i=>Hyt(i))),ee(t,["parts"],o)}const r=X(e,["role"]);return r!=null&&ee(t,["role"],r),t}function fyt(e,t){const n={},r=X(e,["displayName"]);if(t!==void 0&&r!=null&&ee(t,["batch","displayName"],r),X(e,["dest"])!==void 0)throw new Error("dest parameter is not supported in Gemini API.");return n}function pyt(e,t){const n={},r=X(e,["displayName"]);t!==void 0&&r!=null&&ee(t,["displayName"],r);const o=X(e,["dest"]);return t!==void 0&&o!=null&&ee(t,["outputConfig"],ryt(eyt(o))),n}function Jxe(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["src"]);o!=null&&ee(n,["batch","inputConfig"],iyt(e,y8e(e,o)));const i=X(t,["config"]);return i!=null&&fyt(i,n),n}function hyt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["model"],Oa(e,r));const o=X(t,["src"]);o!=null&&ee(n,["inputConfig"],ayt(y8e(e,o)));const i=X(t,["config"]);return i!=null&&pyt(i,n),n}function myt(e,t){const n={},r=X(e,["displayName"]);return t!==void 0&&r!=null&&ee(t,["batch","displayName"],r),n}function gyt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["src"]);o!=null&&ee(n,["batch","inputConfig"],Cyt(e,o));const i=X(t,["config"]);return i!=null&&myt(i,n),n}function yyt(e,t){const n={},r=X(t,["name"]);return r!=null&&ee(n,["_url","name"],_I(e,r)),n}function byt(e,t){const n={},r=X(t,["name"]);return r!=null&&ee(n,["_url","name"],_I(e,r)),n}function vyt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["name"]);r!=null&&ee(t,["name"],r);const o=X(e,["done"]);o!=null&&ee(t,["done"],o);const i=X(e,["error"]);return i!=null&&ee(t,["error"],i),t}function xyt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["name"]);r!=null&&ee(t,["name"],r);const o=X(e,["done"]);o!=null&&ee(t,["done"],o);const i=X(e,["error"]);return i!=null&&ee(t,["error"],i),t}function wyt(e,t){const n={},r=X(t,["contents"]);if(r!=null){let i=$le(e,r);Array.isArray(i)&&(i=i.map(a=>a)),ee(n,["requests[]","request","content"],i)}const o=X(t,["config"]);return o!=null&&(ee(n,["_self"],Syt(o,n)),b0t(n,{"requests[].*":"requests[].request.*"})),n}function Syt(e,t){const n={},r=X(e,["taskType"]);t!==void 0&&r!=null&&ee(t,["requests[]","taskType"],r);const o=X(e,["title"]);t!==void 0&&o!=null&&ee(t,["requests[]","title"],o);const i=X(e,["outputDimensionality"]);if(t!==void 0&&i!=null&&ee(t,["requests[]","outputDimensionality"],i),X(e,["mimeType"])!==void 0)throw new Error("mimeType parameter is not supported in Gemini API.");if(X(e,["autoTruncate"])!==void 0)throw new Error("autoTruncate parameter is not supported in Gemini API.");return n}function Cyt(e,t){const n={},r=X(t,["fileName"]);r!=null&&ee(n,["file_name"],r);const o=X(t,["inlinedRequests"]);return o!=null&&ee(n,["requests"],wyt(e,o)),n}function _yt(e){const t={};if(X(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const n=X(e,["fileUri"]);n!=null&&ee(t,["fileUri"],n);const r=X(e,["mimeType"]);return r!=null&&ee(t,["mimeType"],r),t}function jyt(e){const t={},n=X(e,["id"]);n!=null&&ee(t,["id"],n);const r=X(e,["args"]);r!=null&&ee(t,["args"],r);const o=X(e,["name"]);if(o!=null&&ee(t,["name"],o),X(e,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(X(e,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return t}function Nyt(e){const t={},n=X(e,["mode"]);n!=null&&ee(t,["mode"],n);const r=X(e,["allowedFunctionNames"]);if(r!=null&&ee(t,["allowedFunctionNames"],r),X(e,["streamFunctionCallArguments"])!==void 0)throw new Error("streamFunctionCallArguments parameter is not supported in Gemini API.");return t}function Eyt(e,t,n){const r={},o=X(t,["systemInstruction"]);n!==void 0&&o!=null&&ee(n,["systemInstruction"],x8e(ip(o)));const i=X(t,["temperature"]);i!=null&&ee(r,["temperature"],i);const a=X(t,["topP"]);a!=null&&ee(r,["topP"],a);const l=X(t,["topK"]);l!=null&&ee(r,["topK"],l);const c=X(t,["candidateCount"]);c!=null&&ee(r,["candidateCount"],c);const u=X(t,["maxOutputTokens"]);u!=null&&ee(r,["maxOutputTokens"],u);const d=X(t,["stopSequences"]);d!=null&&ee(r,["stopSequences"],d);const f=X(t,["responseLogprobs"]);f!=null&&ee(r,["responseLogprobs"],f);const h=X(t,["logprobs"]);h!=null&&ee(r,["logprobs"],h);const m=X(t,["presencePenalty"]);m!=null&&ee(r,["presencePenalty"],m);const g=X(t,["frequencyPenalty"]);g!=null&&ee(r,["frequencyPenalty"],g);const b=X(t,["seed"]);b!=null&&ee(r,["seed"],b);const y=X(t,["responseMimeType"]);y!=null&&ee(r,["responseMimeType"],y);const v=X(t,["responseSchema"]);v!=null&&ee(r,["responseSchema"],Fle(v));const x=X(t,["responseJsonSchema"]);if(x!=null&&ee(r,["responseJsonSchema"],x),X(t,["routingConfig"])!==void 0)throw new Error("routingConfig parameter is not supported in Gemini API.");if(X(t,["modelSelectionConfig"])!==void 0)throw new Error("modelSelectionConfig parameter is not supported in Gemini API.");const S=X(t,["safetySettings"]);if(n!==void 0&&S!=null){let T=S;Array.isArray(T)&&(T=T.map(D=>Vyt(D))),ee(n,["safetySettings"],T)}const C=X(t,["tools"]);if(n!==void 0&&C!=null){let T=CI(C);Array.isArray(T)&&(T=T.map(D=>Gyt(SI(D)))),ee(n,["tools"],T)}const _=X(t,["toolConfig"]);if(n!==void 0&&_!=null&&ee(n,["toolConfig"],Uyt(_)),X(t,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");const N=X(t,["cachedContent"]);n!==void 0&&N!=null&&ee(n,["cachedContent"],s1(e,N));const E=X(t,["responseModalities"]);E!=null&&ee(r,["responseModalities"],E);const I=X(t,["mediaResolution"]);I!=null&&ee(r,["mediaResolution"],I);const A=X(t,["speechConfig"]);if(A!=null&&ee(r,["speechConfig"],Ble(A)),X(t,["audioTimestamp"])!==void 0)throw new Error("audioTimestamp parameter is not supported in Gemini API.");const R=X(t,["thinkingConfig"]);R!=null&&ee(r,["thinkingConfig"],R);const k=X(t,["imageConfig"]);return k!=null&&ee(r,["imageConfig"],Myt(k)),r}function Pyt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["candidates"]);if(r!=null){let c=r;Array.isArray(c)&&(c=c.map(u=>uyt(u))),ee(t,["candidates"],c)}const o=X(e,["modelVersion"]);o!=null&&ee(t,["modelVersion"],o);const i=X(e,["promptFeedback"]);i!=null&&ee(t,["promptFeedback"],i);const a=X(e,["responseId"]);a!=null&&ee(t,["responseId"],a);const l=X(e,["usageMetadata"]);return l!=null&&ee(t,["usageMetadata"],l),t}function Iyt(e,t){const n={},r=X(t,["name"]);return r!=null&&ee(n,["_url","name"],_I(e,r)),n}function Ayt(e,t){const n={},r=X(t,["name"]);return r!=null&&ee(n,["_url","name"],_I(e,r)),n}function Tyt(e){const t={};if(X(e,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const n=X(e,["enableWidget"]);return n!=null&&ee(t,["enableWidget"],n),t}function kyt(e){const t={};if(X(e,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(X(e,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const n=X(e,["timeRangeFilter"]);return n!=null&&ee(t,["timeRangeFilter"],n),t}function Myt(e){const t={},n=X(e,["aspectRatio"]);n!=null&&ee(t,["aspectRatio"],n);const r=X(e,["imageSize"]);if(r!=null&&ee(t,["imageSize"],r),X(e,["outputMimeType"])!==void 0)throw new Error("outputMimeType parameter is not supported in Gemini API.");if(X(e,["outputCompressionQuality"])!==void 0)throw new Error("outputCompressionQuality parameter is not supported in Gemini API.");return t}function Ryt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["request","model"],Oa(e,r));const o=X(t,["contents"]);if(o!=null){let l=Sg(o);Array.isArray(l)&&(l=l.map(c=>x8e(c))),ee(n,["request","contents"],l)}const i=X(t,["metadata"]);i!=null&&ee(n,["metadata"],i);const a=X(t,["config"]);return a!=null&&ee(n,["request","generationConfig"],Eyt(e,a,X(n,["request"],{}))),n}function Oyt(e){const t={},n=X(e,["response"]);n!=null&&ee(t,["response"],Pyt(n));const r=X(e,["error"]);return r!=null&&ee(t,["error"],r),t}function Dyt(e,t){const n={},r=X(e,["pageSize"]);t!==void 0&&r!=null&&ee(t,["_query","pageSize"],r);const o=X(e,["pageToken"]);if(t!==void 0&&o!=null&&ee(t,["_query","pageToken"],o),X(e,["filter"])!==void 0)throw new Error("filter parameter is not supported in Gemini API.");return n}function Lyt(e,t){const n={},r=X(e,["pageSize"]);t!==void 0&&r!=null&&ee(t,["_query","pageSize"],r);const o=X(e,["pageToken"]);t!==void 0&&o!=null&&ee(t,["_query","pageToken"],o);const i=X(e,["filter"]);return t!==void 0&&i!=null&&ee(t,["_query","filter"],i),n}function $yt(e){const t={},n=X(e,["config"]);return n!=null&&Dyt(n,t),t}function Fyt(e){const t={},n=X(e,["config"]);return n!=null&&Lyt(n,t),t}function Byt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["nextPageToken"]);r!=null&&ee(t,["nextPageToken"],r);const o=X(e,["operations"]);if(o!=null){let i=o;Array.isArray(i)&&(i=i.map(a=>YF(a))),ee(t,["batchJobs"],i)}return t}function zyt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["nextPageToken"]);r!=null&&ee(t,["nextPageToken"],r);const o=X(e,["batchPredictionJobs"]);if(o!=null){let i=o;Array.isArray(i)&&(i=i.map(a=>yee(a))),ee(t,["batchJobs"],i)}return t}function Hyt(e){const t={},n=X(e,["mediaResolution"]);n!=null&&ee(t,["mediaResolution"],n);const r=X(e,["codeExecutionResult"]);r!=null&&ee(t,["codeExecutionResult"],r);const o=X(e,["executableCode"]);o!=null&&ee(t,["executableCode"],o);const i=X(e,["fileData"]);i!=null&&ee(t,["fileData"],_yt(i));const a=X(e,["functionCall"]);a!=null&&ee(t,["functionCall"],jyt(a));const l=X(e,["functionResponse"]);l!=null&&ee(t,["functionResponse"],l);const c=X(e,["inlineData"]);c!=null&&ee(t,["inlineData"],syt(c));const u=X(e,["text"]);u!=null&&ee(t,["text"],u);const d=X(e,["thought"]);d!=null&&ee(t,["thought"],d);const f=X(e,["thoughtSignature"]);f!=null&&ee(t,["thoughtSignature"],f);const h=X(e,["videoMetadata"]);return h!=null&&ee(t,["videoMetadata"],h),t}function Vyt(e){const t={},n=X(e,["category"]);if(n!=null&&ee(t,["category"],n),X(e,["method"])!==void 0)throw new Error("method parameter is not supported in Gemini API.");const r=X(e,["threshold"]);return r!=null&&ee(t,["threshold"],r),t}function Uyt(e){const t={},n=X(e,["functionCallingConfig"]);n!=null&&ee(t,["functionCallingConfig"],Nyt(n));const r=X(e,["retrievalConfig"]);return r!=null&&ee(t,["retrievalConfig"],r),t}function Gyt(e){const t={},n=X(e,["functionDeclarations"]);if(n!=null){let d=n;Array.isArray(d)&&(d=d.map(f=>f)),ee(t,["functionDeclarations"],d)}if(X(e,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const r=X(e,["googleSearchRetrieval"]);r!=null&&ee(t,["googleSearchRetrieval"],r);const o=X(e,["computerUse"]);o!=null&&ee(t,["computerUse"],o);const i=X(e,["fileSearch"]);i!=null&&ee(t,["fileSearch"],i);const a=X(e,["codeExecution"]);if(a!=null&&ee(t,["codeExecution"],a),X(e,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const l=X(e,["googleMaps"]);l!=null&&ee(t,["googleMaps"],Tyt(l));const c=X(e,["googleSearch"]);c!=null&&ee(t,["googleSearch"],kyt(c));const u=X(e,["urlContext"]);return u!=null&&ee(t,["urlContext"],u),t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */var Rx;(function(e){e.PAGED_ITEM_BATCH_JOBS="batchJobs",e.PAGED_ITEM_MODELS="models",e.PAGED_ITEM_TUNING_JOBS="tuningJobs",e.PAGED_ITEM_FILES="files",e.PAGED_ITEM_CACHED_CONTENTS="cachedContents",e.PAGED_ITEM_FILE_SEARCH_STORES="fileSearchStores",e.PAGED_ITEM_DOCUMENTS="documents"})(Rx||(Rx={}));let wj=class{constructor(t,n,r,o){this.pageInternal=[],this.paramsInternal={},this.requestInternal=n,this.init(t,r,o)}init(t,n,r){var o,i;this.nameInternal=t,this.pageInternal=n[this.nameInternal]||[],this.sdkHttpResponseInternal=n==null?void 0:n.sdkHttpResponse,this.idxInternal=0;let a={config:{}};!r||Object.keys(r).length===0?a={config:{}}:typeof r=="object"?a=Object.assign({},r):a=r,a.config&&(a.config.pageToken=n.nextPageToken),this.paramsInternal=a,this.pageInternalSize=(i=(o=a.config)===null||o===void 0?void 0:o.pageSize)!==null&&i!==void 0?i:this.pageInternal.length}initNextPage(t){this.init(this.nameInternal,t,this.paramsInternal)}get page(){return this.pageInternal}get name(){return this.nameInternal}get pageSize(){return this.pageInternalSize}get sdkHttpResponse(){return this.sdkHttpResponseInternal}get params(){return this.paramsInternal}get pageLength(){return this.pageInternal.length}getItem(t){return this.pageInternal[t]}[Symbol.asyncIterator](){return{next:async()=>{if(this.idxInternal>=this.pageLength)if(this.hasNextPage())await this.nextPage();else return{value:void 0,done:!0};const t=this.getItem(this.idxInternal);return this.idxInternal+=1,{value:t,done:!1}},return:async()=>({value:void 0,done:!0})}}async nextPage(){if(!this.hasNextPage())throw new Error("No more pages to fetch.");const t=await this.requestInternal(this.params);return this.initNextPage(t),this.page}hasNextPage(){var t;return((t=this.params.config)===null||t===void 0?void 0:t.pageToken)!==void 0}};/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Wyt extends a1{constructor(t){super(),this.apiClient=t,this.list=async(n={})=>new wj(Rx.PAGED_ITEM_BATCH_JOBS,r=>this.listInternal(r),await this.listInternal(n),n),this.create=async n=>(this.apiClient.isVertexAI()&&(n.config=this.formatDestination(n.src,n.config)),this.createInternal(n)),this.createEmbeddings=async n=>{if(console.warn("batches.createEmbeddings() is experimental and may change without notice."),this.apiClient.isVertexAI())throw new Error("Vertex AI does not support batches.createEmbeddings.");return this.createEmbeddingsInternal(n)}}createInlinedGenerateContentRequest(t){const n=Jxe(this.apiClient,t),r=n._url,o=zr("{model}:batchGenerateContent",r),l=n.batch.inputConfig.requests,c=l.requests,u=[];for(const d of c){const f=Object.assign({},d);if(f.systemInstruction){const h=f.systemInstruction;delete f.systemInstruction;const m=f.request;m.systemInstruction=h,f.request=m}u.push(f)}return l.requests=u,delete n.config,delete n._url,delete n._query,{path:o,body:n}}getGcsUri(t){if(typeof t=="string")return t.startsWith("gs://")?t:void 0;if(!Array.isArray(t)&&t.gcsUri&&t.gcsUri.length>0)return t.gcsUri[0]}getBigqueryUri(t){if(typeof t=="string")return t.startsWith("bq://")?t:void 0;if(!Array.isArray(t))return t.bigqueryUri}formatDestination(t,n){const r=n?Object.assign({},n):{},o=Date.now().toString();if(r.displayName||(r.displayName=`genaiBatchJob_${o}`),r.dest===void 0){const i=this.getGcsUri(t),a=this.getBigqueryUri(t);if(i)i.endsWith(".jsonl")?r.dest=`${i.slice(0,-6)}/dest`:r.dest=`${i}_dest_${o}`;else if(a)r.dest=`${a}_dest_${o}`;else throw new Error("Unsupported source for Vertex AI: No GCS or BigQuery URI found.")}return r}async createInternal(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=hyt(this.apiClient,t);return l=zr("batchPredictionJobs",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json()),a.then(d=>yee(d))}else{const u=Jxe(this.apiClient,t);return l=zr("{model}:batchGenerateContent",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),a.then(d=>YF(d))}}async createEmbeddingsInternal(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const l=gyt(this.apiClient,t);return i=zr("{model}:asyncBatchEmbedContent",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json()),o.then(c=>YF(c))}}async get(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=Ayt(this.apiClient,t);return l=zr("batchPredictionJobs/{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json()),a.then(d=>yee(d))}else{const u=Iyt(this.apiClient,t);return l=zr("batches/{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),a.then(d=>YF(d))}}async cancel(t){var n,r,o,i;let a="",l={};if(this.apiClient.isVertexAI()){const c=cyt(this.apiClient,t);a=zr("batchPredictionJobs/{name}:cancel",c._url),l=c._query,delete c._url,delete c._query,await this.apiClient.request({path:a,queryParams:l,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal})}else{const c=lyt(this.apiClient,t);a=zr("batches/{name}:cancel",c._url),l=c._query,delete c._url,delete c._query,await this.apiClient.request({path:a,queryParams:l,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal})}}async listInternal(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=Fyt(t);return l=zr("batchPredictionJobs",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=zyt(d),h=new Kxe;return Object.assign(h,f),h})}else{const u=$yt(t);return l=zr("batches",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=Byt(d),h=new Kxe;return Object.assign(h,f),h})}}async delete(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=byt(this.apiClient,t);return l=zr("batchPredictionJobs/{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"DELETE",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>xyt(d))}else{const u=yyt(this.apiClient,t);return l=zr("batches/{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"DELETE",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>vyt(d))}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function qyt(e){const t={},n=X(e,["data"]);if(n!=null&&ee(t,["data"],n),X(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const r=X(e,["mimeType"]);return r!=null&&ee(t,["mimeType"],r),t}function Qxe(e){const t={},n=X(e,["parts"]);if(n!=null){let o=n;Array.isArray(o)&&(o=o.map(i=>gbt(i))),ee(t,["parts"],o)}const r=X(e,["role"]);return r!=null&&ee(t,["role"],r),t}function Kyt(e,t){const n={},r=X(e,["ttl"]);t!==void 0&&r!=null&&ee(t,["ttl"],r);const o=X(e,["expireTime"]);t!==void 0&&o!=null&&ee(t,["expireTime"],o);const i=X(e,["displayName"]);t!==void 0&&i!=null&&ee(t,["displayName"],i);const a=X(e,["contents"]);if(t!==void 0&&a!=null){let d=Sg(a);Array.isArray(d)&&(d=d.map(f=>Qxe(f))),ee(t,["contents"],d)}const l=X(e,["systemInstruction"]);t!==void 0&&l!=null&&ee(t,["systemInstruction"],Qxe(ip(l)));const c=X(e,["tools"]);if(t!==void 0&&c!=null){let d=c;Array.isArray(d)&&(d=d.map(f=>bbt(f))),ee(t,["tools"],d)}const u=X(e,["toolConfig"]);if(t!==void 0&&u!=null&&ee(t,["toolConfig"],ybt(u)),X(e,["kmsKeyName"])!==void 0)throw new Error("kmsKeyName parameter is not supported in Gemini API.");return n}function Yyt(e,t){const n={},r=X(e,["ttl"]);t!==void 0&&r!=null&&ee(t,["ttl"],r);const o=X(e,["expireTime"]);t!==void 0&&o!=null&&ee(t,["expireTime"],o);const i=X(e,["displayName"]);t!==void 0&&i!=null&&ee(t,["displayName"],i);const a=X(e,["contents"]);if(t!==void 0&&a!=null){let f=Sg(a);Array.isArray(f)&&(f=f.map(h=>h)),ee(t,["contents"],f)}const l=X(e,["systemInstruction"]);t!==void 0&&l!=null&&ee(t,["systemInstruction"],ip(l));const c=X(e,["tools"]);if(t!==void 0&&c!=null){let f=c;Array.isArray(f)&&(f=f.map(h=>vbt(h))),ee(t,["tools"],f)}const u=X(e,["toolConfig"]);t!==void 0&&u!=null&&ee(t,["toolConfig"],u);const d=X(e,["kmsKeyName"]);return t!==void 0&&d!=null&&ee(t,["encryption_spec","kmsKeyName"],d),n}function Xyt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["model"],l8e(e,r));const o=X(t,["config"]);return o!=null&&Kyt(o,n),n}function Zyt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["model"],l8e(e,r));const o=X(t,["config"]);return o!=null&&Yyt(o,n),n}function Jyt(e,t){const n={},r=X(t,["name"]);return r!=null&&ee(n,["_url","name"],s1(e,r)),n}function Qyt(e,t){const n={},r=X(t,["name"]);return r!=null&&ee(n,["_url","name"],s1(e,r)),n}function ebt(e){const t={},n=X(e,["sdkHttpResponse"]);return n!=null&&ee(t,["sdkHttpResponse"],n),t}function tbt(e){const t={},n=X(e,["sdkHttpResponse"]);return n!=null&&ee(t,["sdkHttpResponse"],n),t}function nbt(e){const t={};if(X(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const n=X(e,["fileUri"]);n!=null&&ee(t,["fileUri"],n);const r=X(e,["mimeType"]);return r!=null&&ee(t,["mimeType"],r),t}function rbt(e){const t={},n=X(e,["id"]);n!=null&&ee(t,["id"],n);const r=X(e,["args"]);r!=null&&ee(t,["args"],r);const o=X(e,["name"]);if(o!=null&&ee(t,["name"],o),X(e,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(X(e,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return t}function obt(e){const t={},n=X(e,["mode"]);n!=null&&ee(t,["mode"],n);const r=X(e,["allowedFunctionNames"]);if(r!=null&&ee(t,["allowedFunctionNames"],r),X(e,["streamFunctionCallArguments"])!==void 0)throw new Error("streamFunctionCallArguments parameter is not supported in Gemini API.");return t}function ibt(e){const t={};if(X(e,["behavior"])!==void 0)throw new Error("behavior parameter is not supported in Vertex AI.");const n=X(e,["description"]);n!=null&&ee(t,["description"],n);const r=X(e,["name"]);r!=null&&ee(t,["name"],r);const o=X(e,["parameters"]);o!=null&&ee(t,["parameters"],o);const i=X(e,["parametersJsonSchema"]);i!=null&&ee(t,["parametersJsonSchema"],i);const a=X(e,["response"]);a!=null&&ee(t,["response"],a);const l=X(e,["responseJsonSchema"]);return l!=null&&ee(t,["responseJsonSchema"],l),t}function abt(e,t){const n={},r=X(t,["name"]);return r!=null&&ee(n,["_url","name"],s1(e,r)),n}function sbt(e,t){const n={},r=X(t,["name"]);return r!=null&&ee(n,["_url","name"],s1(e,r)),n}function lbt(e){const t={};if(X(e,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const n=X(e,["enableWidget"]);return n!=null&&ee(t,["enableWidget"],n),t}function cbt(e){const t={};if(X(e,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(X(e,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const n=X(e,["timeRangeFilter"]);return n!=null&&ee(t,["timeRangeFilter"],n),t}function ubt(e,t){const n={},r=X(e,["pageSize"]);t!==void 0&&r!=null&&ee(t,["_query","pageSize"],r);const o=X(e,["pageToken"]);return t!==void 0&&o!=null&&ee(t,["_query","pageToken"],o),n}function dbt(e,t){const n={},r=X(e,["pageSize"]);t!==void 0&&r!=null&&ee(t,["_query","pageSize"],r);const o=X(e,["pageToken"]);return t!==void 0&&o!=null&&ee(t,["_query","pageToken"],o),n}function fbt(e){const t={},n=X(e,["config"]);return n!=null&&ubt(n,t),t}function pbt(e){const t={},n=X(e,["config"]);return n!=null&&dbt(n,t),t}function hbt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["nextPageToken"]);r!=null&&ee(t,["nextPageToken"],r);const o=X(e,["cachedContents"]);if(o!=null){let i=o;Array.isArray(i)&&(i=i.map(a=>a)),ee(t,["cachedContents"],i)}return t}function mbt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["nextPageToken"]);r!=null&&ee(t,["nextPageToken"],r);const o=X(e,["cachedContents"]);if(o!=null){let i=o;Array.isArray(i)&&(i=i.map(a=>a)),ee(t,["cachedContents"],i)}return t}function gbt(e){const t={},n=X(e,["mediaResolution"]);n!=null&&ee(t,["mediaResolution"],n);const r=X(e,["codeExecutionResult"]);r!=null&&ee(t,["codeExecutionResult"],r);const o=X(e,["executableCode"]);o!=null&&ee(t,["executableCode"],o);const i=X(e,["fileData"]);i!=null&&ee(t,["fileData"],nbt(i));const a=X(e,["functionCall"]);a!=null&&ee(t,["functionCall"],rbt(a));const l=X(e,["functionResponse"]);l!=null&&ee(t,["functionResponse"],l);const c=X(e,["inlineData"]);c!=null&&ee(t,["inlineData"],qyt(c));const u=X(e,["text"]);u!=null&&ee(t,["text"],u);const d=X(e,["thought"]);d!=null&&ee(t,["thought"],d);const f=X(e,["thoughtSignature"]);f!=null&&ee(t,["thoughtSignature"],f);const h=X(e,["videoMetadata"]);return h!=null&&ee(t,["videoMetadata"],h),t}function ybt(e){const t={},n=X(e,["functionCallingConfig"]);n!=null&&ee(t,["functionCallingConfig"],obt(n));const r=X(e,["retrievalConfig"]);return r!=null&&ee(t,["retrievalConfig"],r),t}function bbt(e){const t={},n=X(e,["functionDeclarations"]);if(n!=null){let d=n;Array.isArray(d)&&(d=d.map(f=>f)),ee(t,["functionDeclarations"],d)}if(X(e,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const r=X(e,["googleSearchRetrieval"]);r!=null&&ee(t,["googleSearchRetrieval"],r);const o=X(e,["computerUse"]);o!=null&&ee(t,["computerUse"],o);const i=X(e,["fileSearch"]);i!=null&&ee(t,["fileSearch"],i);const a=X(e,["codeExecution"]);if(a!=null&&ee(t,["codeExecution"],a),X(e,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const l=X(e,["googleMaps"]);l!=null&&ee(t,["googleMaps"],lbt(l));const c=X(e,["googleSearch"]);c!=null&&ee(t,["googleSearch"],cbt(c));const u=X(e,["urlContext"]);return u!=null&&ee(t,["urlContext"],u),t}function vbt(e){const t={},n=X(e,["functionDeclarations"]);if(n!=null){let f=n;Array.isArray(f)&&(f=f.map(h=>ibt(h))),ee(t,["functionDeclarations"],f)}const r=X(e,["retrieval"]);r!=null&&ee(t,["retrieval"],r);const o=X(e,["googleSearchRetrieval"]);o!=null&&ee(t,["googleSearchRetrieval"],o);const i=X(e,["computerUse"]);if(i!=null&&ee(t,["computerUse"],i),X(e,["fileSearch"])!==void 0)throw new Error("fileSearch parameter is not supported in Vertex AI.");const a=X(e,["codeExecution"]);a!=null&&ee(t,["codeExecution"],a);const l=X(e,["enterpriseWebSearch"]);l!=null&&ee(t,["enterpriseWebSearch"],l);const c=X(e,["googleMaps"]);c!=null&&ee(t,["googleMaps"],c);const u=X(e,["googleSearch"]);u!=null&&ee(t,["googleSearch"],u);const d=X(e,["urlContext"]);return d!=null&&ee(t,["urlContext"],d),t}function xbt(e,t){const n={},r=X(e,["ttl"]);t!==void 0&&r!=null&&ee(t,["ttl"],r);const o=X(e,["expireTime"]);return t!==void 0&&o!=null&&ee(t,["expireTime"],o),n}function wbt(e,t){const n={},r=X(e,["ttl"]);t!==void 0&&r!=null&&ee(t,["ttl"],r);const o=X(e,["expireTime"]);return t!==void 0&&o!=null&&ee(t,["expireTime"],o),n}function Sbt(e,t){const n={},r=X(t,["name"]);r!=null&&ee(n,["_url","name"],s1(e,r));const o=X(t,["config"]);return o!=null&&xbt(o,n),n}function Cbt(e,t){const n={},r=X(t,["name"]);r!=null&&ee(n,["_url","name"],s1(e,r));const o=X(t,["config"]);return o!=null&&wbt(o,n),n}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class _bt extends a1{constructor(t){super(),this.apiClient=t,this.list=async(n={})=>new wj(Rx.PAGED_ITEM_CACHED_CONTENTS,r=>this.listInternal(r),await this.listInternal(n),n)}async create(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=Zyt(this.apiClient,t);return l=zr("cachedContents",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json()),a.then(d=>d)}else{const u=Xyt(this.apiClient,t);return l=zr("cachedContents",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),a.then(d=>d)}}async get(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=sbt(this.apiClient,t);return l=zr("{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json()),a.then(d=>d)}else{const u=abt(this.apiClient,t);return l=zr("{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),a.then(d=>d)}}async delete(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=Qyt(this.apiClient,t);return l=zr("{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"DELETE",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=tbt(d),h=new Wxe;return Object.assign(h,f),h})}else{const u=Jyt(this.apiClient,t);return l=zr("{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"DELETE",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=ebt(d),h=new Wxe;return Object.assign(h,f),h})}}async update(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=Cbt(this.apiClient,t);return l=zr("{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"PATCH",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json()),a.then(d=>d)}else{const u=Sbt(this.apiClient,t);return l=zr("{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"PATCH",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),a.then(d=>d)}}async listInternal(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=pbt(t);return l=zr("cachedContents",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=mbt(d),h=new qxe;return Object.assign(h,f),h})}else{const u=fbt(t);return l=zr("cachedContents",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=hbt(d),h=new qxe;return Object.assign(h,f),h})}}}function e1e(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Tl(e){return this instanceof Tl?(this.v=e,this):new Tl(e)}function v5(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",a),o[Symbol.asyncIterator]=function(){return this},o;function a(m){return function(g){return Promise.resolve(g).then(m,f)}}function l(m,g){r[m]&&(o[m]=function(b){return new Promise(function(y,v){i.push([m,b,y,v])>1||c(m,b)})},g&&(o[m]=g(o[m])))}function c(m,g){try{u(r[m](g))}catch(b){h(i[0][3],b)}}function u(m){m.value instanceof Tl?Promise.resolve(m.value.v).then(d,f):h(i[0][2],m)}function d(m){c("next",m)}function f(m){c("throw",m)}function h(m,g){m(g),i.shift(),i.length&&c(i[0][0],i[0][1])}}function d4(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof e1e=="function"?e1e(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(a){return new Promise(function(l,c){a=e[i](a),o(l,c,a.done,a.value)})}}function o(i,a,l,c){Promise.resolve(c).then(function(u){i({value:u,done:l})},a)}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function jbt(e){var t;if(e.candidates==null||e.candidates.length===0)return!1;const n=(t=e.candidates[0])===null||t===void 0?void 0:t.content;return n===void 0?!1:w8e(n)}function w8e(e){if(e.parts===void 0||e.parts.length===0)return!1;for(const t of e.parts)if(t===void 0||Object.keys(t).length===0)return!1;return!0}function Nbt(e){if(e.length!==0){for(const t of e)if(t.role!=="user"&&t.role!=="model")throw new Error(`Role must be user or model, but got ${t.role}.`)}}function t1e(e){if(e===void 0||e.length===0)return[];const t=[],n=e.length;let r=0;for(;r{var i,a,l;const c=await o,u=(a=(i=c.candidates)===null||i===void 0?void 0:i[0])===null||a===void 0?void 0:a.content,d=c.automaticFunctionCallingHistory,f=this.getHistory(!0).length;let h=[];d!=null&&(h=(l=d.slice(f))!==null&&l!==void 0?l:[]);const m=u?[u]:[];this.recordHistory(r,m,h)})(),await this.sendPromise.catch(()=>{this.sendPromise=Promise.resolve()}),o}async sendMessageStream(t){var n;await this.sendPromise;const r=ip(t.message),o=this.modelsModule.generateContentStream({model:this.model,contents:this.getHistory(!0).concat(r),config:(n=t.config)!==null&&n!==void 0?n:this.config});this.sendPromise=o.then(()=>{}).catch(()=>{});const i=await o;return this.processStreamResponse(i,r)}getHistory(t=!1){const n=t?t1e(this.history):this.history;return structuredClone(n)}processStreamResponse(t,n){var r,o;return v5(this,arguments,function*(){var a,l,c,u;const d=[];try{for(var f=!0,h=d4(t),m;m=yield Tl(h.next()),a=m.done,!a;f=!0){u=m.value,f=!1;const g=u;if(jbt(g)){const b=(o=(r=g.candidates)===null||r===void 0?void 0:r[0])===null||o===void 0?void 0:o.content;b!==void 0&&d.push(b)}yield yield Tl(g)}}catch(g){l={error:g}}finally{try{!f&&!a&&(c=h.return)&&(yield Tl(c.call(h)))}finally{if(l)throw l.error}}this.recordHistory(n,d)})}recordHistory(t,n,r){let o=[];n.length>0&&n.every(i=>i.role!==void 0)?o=n:o.push({role:"model",parts:[]}),r&&r.length>0?this.history.push(...t1e(r)):this.history.push(t),this.history.push(...o)}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class G9 extends Error{constructor(t){super(t.message),this.name="ApiError",this.status=t.status,Object.setPrototypeOf(this,G9.prototype)}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function Ibt(e){const t={},n=X(e,["file"]);return n!=null&&ee(t,["file"],n),t}function Abt(e){const t={},n=X(e,["sdkHttpResponse"]);return n!=null&&ee(t,["sdkHttpResponse"],n),t}function Tbt(e){const t={},n=X(e,["name"]);return n!=null&&ee(t,["_url","file"],h8e(n)),t}function kbt(e){const t={},n=X(e,["sdkHttpResponse"]);return n!=null&&ee(t,["sdkHttpResponse"],n),t}function Mbt(e){const t={},n=X(e,["name"]);return n!=null&&ee(t,["_url","file"],h8e(n)),t}function Rbt(e,t){const n={},r=X(e,["pageSize"]);t!==void 0&&r!=null&&ee(t,["_query","pageSize"],r);const o=X(e,["pageToken"]);return t!==void 0&&o!=null&&ee(t,["_query","pageToken"],o),n}function Obt(e){const t={},n=X(e,["config"]);return n!=null&&Rbt(n,t),t}function Dbt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["nextPageToken"]);r!=null&&ee(t,["nextPageToken"],r);const o=X(e,["files"]);if(o!=null){let i=o;Array.isArray(i)&&(i=i.map(a=>a)),ee(t,["files"],i)}return t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Lbt extends a1{constructor(t){super(),this.apiClient=t,this.list=async(n={})=>new wj(Rx.PAGED_ITEM_FILES,r=>this.listInternal(r),await this.listInternal(n),n)}async upload(t){if(this.apiClient.isVertexAI())throw new Error("Vertex AI does not support uploading files. You can share files through a GCS bucket.");return this.apiClient.uploadFile(t.file,t.config).then(n=>n)}async download(t){await this.apiClient.downloadFile(t)}async listInternal(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const l=Obt(t);return i=zr("files",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json().then(u=>{const d=u;return d.sdkHttpResponse={headers:c.headers},d})),o.then(c=>{const u=Dbt(c),d=new z0t;return Object.assign(d,u),d})}}async createInternal(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const l=Ibt(t);return i=zr("upload/v1beta/files",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json()),o.then(c=>{const u=Abt(c),d=new H0t;return Object.assign(d,u),d})}}async get(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const l=Mbt(t);return i=zr("files/{file}",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json()),o.then(c=>c)}}async delete(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const l=Tbt(t);return i=zr("files/{file}",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"DELETE",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json().then(u=>{const d=u;return d.sdkHttpResponse={headers:c.headers},d})),o.then(c=>{const u=kbt(c),d=new V0t;return Object.assign(d,u),d})}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function XF(e){const t={},n=X(e,["data"]);if(n!=null&&ee(t,["data"],n),X(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const r=X(e,["mimeType"]);return r!=null&&ee(t,["mimeType"],r),t}function $bt(e){const t={},n=X(e,["parts"]);if(n!=null){let o=n;Array.isArray(o)&&(o=o.map(i=>evt(i))),ee(t,["parts"],o)}const r=X(e,["role"]);return r!=null&&ee(t,["role"],r),t}function Fbt(e){const t={};if(X(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const n=X(e,["fileUri"]);n!=null&&ee(t,["fileUri"],n);const r=X(e,["mimeType"]);return r!=null&&ee(t,["mimeType"],r),t}function Bbt(e){const t={},n=X(e,["id"]);n!=null&&ee(t,["id"],n);const r=X(e,["args"]);r!=null&&ee(t,["args"],r);const o=X(e,["name"]);if(o!=null&&ee(t,["name"],o),X(e,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(X(e,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return t}function zbt(e){const t={};if(X(e,["behavior"])!==void 0)throw new Error("behavior parameter is not supported in Vertex AI.");const n=X(e,["description"]);n!=null&&ee(t,["description"],n);const r=X(e,["name"]);r!=null&&ee(t,["name"],r);const o=X(e,["parameters"]);o!=null&&ee(t,["parameters"],o);const i=X(e,["parametersJsonSchema"]);i!=null&&ee(t,["parametersJsonSchema"],i);const a=X(e,["response"]);a!=null&&ee(t,["response"],a);const l=X(e,["responseJsonSchema"]);return l!=null&&ee(t,["responseJsonSchema"],l),t}function Hbt(e){const t={},n=X(e,["modelSelectionConfig"]);n!=null&&ee(t,["modelConfig"],n);const r=X(e,["responseJsonSchema"]);r!=null&&ee(t,["responseJsonSchema"],r);const o=X(e,["audioTimestamp"]);o!=null&&ee(t,["audioTimestamp"],o);const i=X(e,["candidateCount"]);i!=null&&ee(t,["candidateCount"],i);const a=X(e,["enableAffectiveDialog"]);a!=null&&ee(t,["enableAffectiveDialog"],a);const l=X(e,["frequencyPenalty"]);l!=null&&ee(t,["frequencyPenalty"],l);const c=X(e,["logprobs"]);c!=null&&ee(t,["logprobs"],c);const u=X(e,["maxOutputTokens"]);u!=null&&ee(t,["maxOutputTokens"],u);const d=X(e,["mediaResolution"]);d!=null&&ee(t,["mediaResolution"],d);const f=X(e,["presencePenalty"]);f!=null&&ee(t,["presencePenalty"],f);const h=X(e,["responseLogprobs"]);h!=null&&ee(t,["responseLogprobs"],h);const m=X(e,["responseMimeType"]);m!=null&&ee(t,["responseMimeType"],m);const g=X(e,["responseModalities"]);g!=null&&ee(t,["responseModalities"],g);const b=X(e,["responseSchema"]);b!=null&&ee(t,["responseSchema"],b);const y=X(e,["routingConfig"]);y!=null&&ee(t,["routingConfig"],y);const v=X(e,["seed"]);v!=null&&ee(t,["seed"],v);const x=X(e,["speechConfig"]);x!=null&&ee(t,["speechConfig"],S8e(x));const S=X(e,["stopSequences"]);S!=null&&ee(t,["stopSequences"],S);const C=X(e,["temperature"]);C!=null&&ee(t,["temperature"],C);const _=X(e,["thinkingConfig"]);_!=null&&ee(t,["thinkingConfig"],_);const N=X(e,["topK"]);N!=null&&ee(t,["topK"],N);const E=X(e,["topP"]);if(E!=null&&ee(t,["topP"],E),X(e,["enableEnhancedCivicAnswers"])!==void 0)throw new Error("enableEnhancedCivicAnswers parameter is not supported in Vertex AI.");return t}function Vbt(e){const t={};if(X(e,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const n=X(e,["enableWidget"]);return n!=null&&ee(t,["enableWidget"],n),t}function Ubt(e){const t={};if(X(e,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(X(e,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const n=X(e,["timeRangeFilter"]);return n!=null&&ee(t,["timeRangeFilter"],n),t}function Gbt(e,t){const n={},r=X(e,["generationConfig"]);t!==void 0&&r!=null&&ee(t,["setup","generationConfig"],r);const o=X(e,["responseModalities"]);t!==void 0&&o!=null&&ee(t,["setup","generationConfig","responseModalities"],o);const i=X(e,["temperature"]);t!==void 0&&i!=null&&ee(t,["setup","generationConfig","temperature"],i);const a=X(e,["topP"]);t!==void 0&&a!=null&&ee(t,["setup","generationConfig","topP"],a);const l=X(e,["topK"]);t!==void 0&&l!=null&&ee(t,["setup","generationConfig","topK"],l);const c=X(e,["maxOutputTokens"]);t!==void 0&&c!=null&&ee(t,["setup","generationConfig","maxOutputTokens"],c);const u=X(e,["mediaResolution"]);t!==void 0&&u!=null&&ee(t,["setup","generationConfig","mediaResolution"],u);const d=X(e,["seed"]);t!==void 0&&d!=null&&ee(t,["setup","generationConfig","seed"],d);const f=X(e,["speechConfig"]);t!==void 0&&f!=null&&ee(t,["setup","generationConfig","speechConfig"],zle(f));const h=X(e,["thinkingConfig"]);t!==void 0&&h!=null&&ee(t,["setup","generationConfig","thinkingConfig"],h);const m=X(e,["enableAffectiveDialog"]);t!==void 0&&m!=null&&ee(t,["setup","generationConfig","enableAffectiveDialog"],m);const g=X(e,["systemInstruction"]);t!==void 0&&g!=null&&ee(t,["setup","systemInstruction"],$bt(ip(g)));const b=X(e,["tools"]);if(t!==void 0&&b!=null){let N=CI(b);Array.isArray(N)&&(N=N.map(E=>nvt(SI(E)))),ee(t,["setup","tools"],N)}const y=X(e,["sessionResumption"]);t!==void 0&&y!=null&&ee(t,["setup","sessionResumption"],tvt(y));const v=X(e,["inputAudioTranscription"]);t!==void 0&&v!=null&&ee(t,["setup","inputAudioTranscription"],v);const x=X(e,["outputAudioTranscription"]);t!==void 0&&x!=null&&ee(t,["setup","outputAudioTranscription"],x);const S=X(e,["realtimeInputConfig"]);t!==void 0&&S!=null&&ee(t,["setup","realtimeInputConfig"],S);const C=X(e,["contextWindowCompression"]);t!==void 0&&C!=null&&ee(t,["setup","contextWindowCompression"],C);const _=X(e,["proactivity"]);return t!==void 0&&_!=null&&ee(t,["setup","proactivity"],_),n}function Wbt(e,t){const n={},r=X(e,["generationConfig"]);t!==void 0&&r!=null&&ee(t,["setup","generationConfig"],Hbt(r));const o=X(e,["responseModalities"]);t!==void 0&&o!=null&&ee(t,["setup","generationConfig","responseModalities"],o);const i=X(e,["temperature"]);t!==void 0&&i!=null&&ee(t,["setup","generationConfig","temperature"],i);const a=X(e,["topP"]);t!==void 0&&a!=null&&ee(t,["setup","generationConfig","topP"],a);const l=X(e,["topK"]);t!==void 0&&l!=null&&ee(t,["setup","generationConfig","topK"],l);const c=X(e,["maxOutputTokens"]);t!==void 0&&c!=null&&ee(t,["setup","generationConfig","maxOutputTokens"],c);const u=X(e,["mediaResolution"]);t!==void 0&&u!=null&&ee(t,["setup","generationConfig","mediaResolution"],u);const d=X(e,["seed"]);t!==void 0&&d!=null&&ee(t,["setup","generationConfig","seed"],d);const f=X(e,["speechConfig"]);t!==void 0&&f!=null&&ee(t,["setup","generationConfig","speechConfig"],S8e(zle(f)));const h=X(e,["thinkingConfig"]);t!==void 0&&h!=null&&ee(t,["setup","generationConfig","thinkingConfig"],h);const m=X(e,["enableAffectiveDialog"]);t!==void 0&&m!=null&&ee(t,["setup","generationConfig","enableAffectiveDialog"],m);const g=X(e,["systemInstruction"]);t!==void 0&&g!=null&&ee(t,["setup","systemInstruction"],ip(g));const b=X(e,["tools"]);if(t!==void 0&&b!=null){let N=CI(b);Array.isArray(N)&&(N=N.map(E=>rvt(SI(E)))),ee(t,["setup","tools"],N)}const y=X(e,["sessionResumption"]);t!==void 0&&y!=null&&ee(t,["setup","sessionResumption"],y);const v=X(e,["inputAudioTranscription"]);t!==void 0&&v!=null&&ee(t,["setup","inputAudioTranscription"],v);const x=X(e,["outputAudioTranscription"]);t!==void 0&&x!=null&&ee(t,["setup","outputAudioTranscription"],x);const S=X(e,["realtimeInputConfig"]);t!==void 0&&S!=null&&ee(t,["setup","realtimeInputConfig"],S);const C=X(e,["contextWindowCompression"]);t!==void 0&&C!=null&&ee(t,["setup","contextWindowCompression"],C);const _=X(e,["proactivity"]);return t!==void 0&&_!=null&&ee(t,["setup","proactivity"],_),n}function qbt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["setup","model"],Oa(e,r));const o=X(t,["config"]);return o!=null&&ee(n,["config"],Gbt(o,n)),n}function Kbt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["setup","model"],Oa(e,r));const o=X(t,["config"]);return o!=null&&ee(n,["config"],Wbt(o,n)),n}function Ybt(e){const t={},n=X(e,["musicGenerationConfig"]);return n!=null&&ee(t,["musicGenerationConfig"],n),t}function Xbt(e){const t={},n=X(e,["weightedPrompts"]);if(n!=null){let r=n;Array.isArray(r)&&(r=r.map(o=>o)),ee(t,["weightedPrompts"],r)}return t}function Zbt(e){const t={},n=X(e,["media"]);if(n!=null){let u=c8e(n);Array.isArray(u)&&(u=u.map(d=>XF(d))),ee(t,["mediaChunks"],u)}const r=X(e,["audio"]);r!=null&&ee(t,["audio"],XF(d8e(r)));const o=X(e,["audioStreamEnd"]);o!=null&&ee(t,["audioStreamEnd"],o);const i=X(e,["video"]);i!=null&&ee(t,["video"],XF(u8e(i)));const a=X(e,["text"]);a!=null&&ee(t,["text"],a);const l=X(e,["activityStart"]);l!=null&&ee(t,["activityStart"],l);const c=X(e,["activityEnd"]);return c!=null&&ee(t,["activityEnd"],c),t}function Jbt(e){const t={},n=X(e,["media"]);if(n!=null){let u=c8e(n);Array.isArray(u)&&(u=u.map(d=>d)),ee(t,["mediaChunks"],u)}const r=X(e,["audio"]);r!=null&&ee(t,["audio"],d8e(r));const o=X(e,["audioStreamEnd"]);o!=null&&ee(t,["audioStreamEnd"],o);const i=X(e,["video"]);i!=null&&ee(t,["video"],u8e(i));const a=X(e,["text"]);a!=null&&ee(t,["text"],a);const l=X(e,["activityStart"]);l!=null&&ee(t,["activityStart"],l);const c=X(e,["activityEnd"]);return c!=null&&ee(t,["activityEnd"],c),t}function Qbt(e){const t={},n=X(e,["setupComplete"]);n!=null&&ee(t,["setupComplete"],n);const r=X(e,["serverContent"]);r!=null&&ee(t,["serverContent"],r);const o=X(e,["toolCall"]);o!=null&&ee(t,["toolCall"],o);const i=X(e,["toolCallCancellation"]);i!=null&&ee(t,["toolCallCancellation"],i);const a=X(e,["usageMetadata"]);a!=null&&ee(t,["usageMetadata"],ovt(a));const l=X(e,["goAway"]);l!=null&&ee(t,["goAway"],l);const c=X(e,["sessionResumptionUpdate"]);return c!=null&&ee(t,["sessionResumptionUpdate"],c),t}function evt(e){const t={},n=X(e,["mediaResolution"]);n!=null&&ee(t,["mediaResolution"],n);const r=X(e,["codeExecutionResult"]);r!=null&&ee(t,["codeExecutionResult"],r);const o=X(e,["executableCode"]);o!=null&&ee(t,["executableCode"],o);const i=X(e,["fileData"]);i!=null&&ee(t,["fileData"],Fbt(i));const a=X(e,["functionCall"]);a!=null&&ee(t,["functionCall"],Bbt(a));const l=X(e,["functionResponse"]);l!=null&&ee(t,["functionResponse"],l);const c=X(e,["inlineData"]);c!=null&&ee(t,["inlineData"],XF(c));const u=X(e,["text"]);u!=null&&ee(t,["text"],u);const d=X(e,["thought"]);d!=null&&ee(t,["thought"],d);const f=X(e,["thoughtSignature"]);f!=null&&ee(t,["thoughtSignature"],f);const h=X(e,["videoMetadata"]);return h!=null&&ee(t,["videoMetadata"],h),t}function tvt(e){const t={},n=X(e,["handle"]);if(n!=null&&ee(t,["handle"],n),X(e,["transparent"])!==void 0)throw new Error("transparent parameter is not supported in Gemini API.");return t}function S8e(e){const t={},n=X(e,["languageCode"]);n!=null&&ee(t,["languageCode"],n);const r=X(e,["voiceConfig"]);if(r!=null&&ee(t,["voiceConfig"],r),X(e,["multiSpeakerVoiceConfig"])!==void 0)throw new Error("multiSpeakerVoiceConfig parameter is not supported in Vertex AI.");return t}function nvt(e){const t={},n=X(e,["functionDeclarations"]);if(n!=null){let d=n;Array.isArray(d)&&(d=d.map(f=>f)),ee(t,["functionDeclarations"],d)}if(X(e,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const r=X(e,["googleSearchRetrieval"]);r!=null&&ee(t,["googleSearchRetrieval"],r);const o=X(e,["computerUse"]);o!=null&&ee(t,["computerUse"],o);const i=X(e,["fileSearch"]);i!=null&&ee(t,["fileSearch"],i);const a=X(e,["codeExecution"]);if(a!=null&&ee(t,["codeExecution"],a),X(e,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const l=X(e,["googleMaps"]);l!=null&&ee(t,["googleMaps"],Vbt(l));const c=X(e,["googleSearch"]);c!=null&&ee(t,["googleSearch"],Ubt(c));const u=X(e,["urlContext"]);return u!=null&&ee(t,["urlContext"],u),t}function rvt(e){const t={},n=X(e,["functionDeclarations"]);if(n!=null){let f=n;Array.isArray(f)&&(f=f.map(h=>zbt(h))),ee(t,["functionDeclarations"],f)}const r=X(e,["retrieval"]);r!=null&&ee(t,["retrieval"],r);const o=X(e,["googleSearchRetrieval"]);o!=null&&ee(t,["googleSearchRetrieval"],o);const i=X(e,["computerUse"]);if(i!=null&&ee(t,["computerUse"],i),X(e,["fileSearch"])!==void 0)throw new Error("fileSearch parameter is not supported in Vertex AI.");const a=X(e,["codeExecution"]);a!=null&&ee(t,["codeExecution"],a);const l=X(e,["enterpriseWebSearch"]);l!=null&&ee(t,["enterpriseWebSearch"],l);const c=X(e,["googleMaps"]);c!=null&&ee(t,["googleMaps"],c);const u=X(e,["googleSearch"]);u!=null&&ee(t,["googleSearch"],u);const d=X(e,["urlContext"]);return d!=null&&ee(t,["urlContext"],d),t}function ovt(e){const t={},n=X(e,["promptTokenCount"]);n!=null&&ee(t,["promptTokenCount"],n);const r=X(e,["cachedContentTokenCount"]);r!=null&&ee(t,["cachedContentTokenCount"],r);const o=X(e,["candidatesTokenCount"]);o!=null&&ee(t,["responseTokenCount"],o);const i=X(e,["toolUsePromptTokenCount"]);i!=null&&ee(t,["toolUsePromptTokenCount"],i);const a=X(e,["thoughtsTokenCount"]);a!=null&&ee(t,["thoughtsTokenCount"],a);const l=X(e,["totalTokenCount"]);l!=null&&ee(t,["totalTokenCount"],l);const c=X(e,["promptTokensDetails"]);if(c!=null){let m=c;Array.isArray(m)&&(m=m.map(g=>g)),ee(t,["promptTokensDetails"],m)}const u=X(e,["cacheTokensDetails"]);if(u!=null){let m=u;Array.isArray(m)&&(m=m.map(g=>g)),ee(t,["cacheTokensDetails"],m)}const d=X(e,["candidatesTokensDetails"]);if(d!=null){let m=d;Array.isArray(m)&&(m=m.map(g=>g)),ee(t,["responseTokensDetails"],m)}const f=X(e,["toolUsePromptTokensDetails"]);if(f!=null){let m=f;Array.isArray(m)&&(m=m.map(g=>g)),ee(t,["toolUsePromptTokensDetails"],m)}const h=X(e,["trafficType"]);return h!=null&&ee(t,["trafficType"],h),t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function ivt(e){const t={},n=X(e,["data"]);if(n!=null&&ee(t,["data"],n),X(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const r=X(e,["mimeType"]);return r!=null&&ee(t,["mimeType"],r),t}function avt(e){const t={},n=X(e,["content"]);n!=null&&ee(t,["content"],n);const r=X(e,["citationMetadata"]);r!=null&&ee(t,["citationMetadata"],svt(r));const o=X(e,["tokenCount"]);o!=null&&ee(t,["tokenCount"],o);const i=X(e,["finishReason"]);i!=null&&ee(t,["finishReason"],i);const a=X(e,["avgLogprobs"]);a!=null&&ee(t,["avgLogprobs"],a);const l=X(e,["groundingMetadata"]);l!=null&&ee(t,["groundingMetadata"],l);const c=X(e,["index"]);c!=null&&ee(t,["index"],c);const u=X(e,["logprobsResult"]);u!=null&&ee(t,["logprobsResult"],u);const d=X(e,["safetyRatings"]);if(d!=null){let h=d;Array.isArray(h)&&(h=h.map(m=>m)),ee(t,["safetyRatings"],h)}const f=X(e,["urlContextMetadata"]);return f!=null&&ee(t,["urlContextMetadata"],f),t}function svt(e){const t={},n=X(e,["citationSources"]);if(n!=null){let r=n;Array.isArray(r)&&(r=r.map(o=>o)),ee(t,["citations"],r)}return t}function lvt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["contents"]);if(o!=null){let i=Sg(o);Array.isArray(i)&&(i=i.map(a=>a)),ee(n,["contents"],i)}return n}function cvt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["tokensInfo"]);if(r!=null){let o=r;Array.isArray(o)&&(o=o.map(i=>i)),ee(t,["tokensInfo"],o)}return t}function uvt(e){const t={},n=X(e,["values"]);n!=null&&ee(t,["values"],n);const r=X(e,["statistics"]);return r!=null&&ee(t,["statistics"],dvt(r)),t}function dvt(e){const t={},n=X(e,["truncated"]);n!=null&&ee(t,["truncated"],n);const r=X(e,["token_count"]);return r!=null&&ee(t,["tokenCount"],r),t}function W9(e){const t={},n=X(e,["parts"]);if(n!=null){let o=n;Array.isArray(o)&&(o=o.map(i=>xxt(i))),ee(t,["parts"],o)}const r=X(e,["role"]);return r!=null&&ee(t,["role"],r),t}function fvt(e){const t={},n=X(e,["controlType"]);n!=null&&ee(t,["controlType"],n);const r=X(e,["enableControlImageComputation"]);return r!=null&&ee(t,["computeControl"],r),t}function pvt(e){const t={};if(X(e,["systemInstruction"])!==void 0)throw new Error("systemInstruction parameter is not supported in Gemini API.");if(X(e,["tools"])!==void 0)throw new Error("tools parameter is not supported in Gemini API.");if(X(e,["generationConfig"])!==void 0)throw new Error("generationConfig parameter is not supported in Gemini API.");return t}function hvt(e,t){const n={},r=X(e,["systemInstruction"]);t!==void 0&&r!=null&&ee(t,["systemInstruction"],ip(r));const o=X(e,["tools"]);if(t!==void 0&&o!=null){let a=o;Array.isArray(a)&&(a=a.map(l=>E8e(l))),ee(t,["tools"],a)}const i=X(e,["generationConfig"]);return t!==void 0&&i!=null&&ee(t,["generationConfig"],ixt(i)),n}function mvt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["contents"]);if(o!=null){let a=Sg(o);Array.isArray(a)&&(a=a.map(l=>W9(l))),ee(n,["contents"],a)}const i=X(t,["config"]);return i!=null&&pvt(i),n}function gvt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["contents"]);if(o!=null){let a=Sg(o);Array.isArray(a)&&(a=a.map(l=>l)),ee(n,["contents"],a)}const i=X(t,["config"]);return i!=null&&hvt(i,n),n}function yvt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["totalTokens"]);r!=null&&ee(t,["totalTokens"],r);const o=X(e,["cachedContentTokenCount"]);return o!=null&&ee(t,["cachedContentTokenCount"],o),t}function bvt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["totalTokens"]);return r!=null&&ee(t,["totalTokens"],r),t}function vvt(e,t){const n={},r=X(t,["model"]);return r!=null&&ee(n,["_url","name"],Oa(e,r)),n}function xvt(e,t){const n={},r=X(t,["model"]);return r!=null&&ee(n,["_url","name"],Oa(e,r)),n}function wvt(e){const t={},n=X(e,["sdkHttpResponse"]);return n!=null&&ee(t,["sdkHttpResponse"],n),t}function Svt(e){const t={},n=X(e,["sdkHttpResponse"]);return n!=null&&ee(t,["sdkHttpResponse"],n),t}function Cvt(e,t){const n={},r=X(e,["outputGcsUri"]);t!==void 0&&r!=null&&ee(t,["parameters","storageUri"],r);const o=X(e,["negativePrompt"]);t!==void 0&&o!=null&&ee(t,["parameters","negativePrompt"],o);const i=X(e,["numberOfImages"]);t!==void 0&&i!=null&&ee(t,["parameters","sampleCount"],i);const a=X(e,["aspectRatio"]);t!==void 0&&a!=null&&ee(t,["parameters","aspectRatio"],a);const l=X(e,["guidanceScale"]);t!==void 0&&l!=null&&ee(t,["parameters","guidanceScale"],l);const c=X(e,["seed"]);t!==void 0&&c!=null&&ee(t,["parameters","seed"],c);const u=X(e,["safetyFilterLevel"]);t!==void 0&&u!=null&&ee(t,["parameters","safetySetting"],u);const d=X(e,["personGeneration"]);t!==void 0&&d!=null&&ee(t,["parameters","personGeneration"],d);const f=X(e,["includeSafetyAttributes"]);t!==void 0&&f!=null&&ee(t,["parameters","includeSafetyAttributes"],f);const h=X(e,["includeRaiReason"]);t!==void 0&&h!=null&&ee(t,["parameters","includeRaiReason"],h);const m=X(e,["language"]);t!==void 0&&m!=null&&ee(t,["parameters","language"],m);const g=X(e,["outputMimeType"]);t!==void 0&&g!=null&&ee(t,["parameters","outputOptions","mimeType"],g);const b=X(e,["outputCompressionQuality"]);t!==void 0&&b!=null&&ee(t,["parameters","outputOptions","compressionQuality"],b);const y=X(e,["addWatermark"]);t!==void 0&&y!=null&&ee(t,["parameters","addWatermark"],y);const v=X(e,["labels"]);t!==void 0&&v!=null&&ee(t,["labels"],v);const x=X(e,["editMode"]);t!==void 0&&x!=null&&ee(t,["parameters","editMode"],x);const S=X(e,["baseSteps"]);return t!==void 0&&S!=null&&ee(t,["parameters","editConfig","baseSteps"],S),n}function _vt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["prompt"]);o!=null&&ee(n,["instances[0]","prompt"],o);const i=X(t,["referenceImages"]);if(i!=null){let l=i;Array.isArray(l)&&(l=l.map(c=>Nxt(c))),ee(n,["instances[0]","referenceImages"],l)}const a=X(t,["config"]);return a!=null&&Cvt(a,n),n}function jvt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["predictions"]);if(r!=null){let o=r;Array.isArray(o)&&(o=o.map(i=>q9(i))),ee(t,["generatedImages"],o)}return t}function Nvt(e,t){const n={},r=X(e,["taskType"]);t!==void 0&&r!=null&&ee(t,["requests[]","taskType"],r);const o=X(e,["title"]);t!==void 0&&o!=null&&ee(t,["requests[]","title"],o);const i=X(e,["outputDimensionality"]);if(t!==void 0&&i!=null&&ee(t,["requests[]","outputDimensionality"],i),X(e,["mimeType"])!==void 0)throw new Error("mimeType parameter is not supported in Gemini API.");if(X(e,["autoTruncate"])!==void 0)throw new Error("autoTruncate parameter is not supported in Gemini API.");return n}function Evt(e,t){const n={},r=X(e,["taskType"]);t!==void 0&&r!=null&&ee(t,["instances[]","task_type"],r);const o=X(e,["title"]);t!==void 0&&o!=null&&ee(t,["instances[]","title"],o);const i=X(e,["outputDimensionality"]);t!==void 0&&i!=null&&ee(t,["parameters","outputDimensionality"],i);const a=X(e,["mimeType"]);t!==void 0&&a!=null&&ee(t,["instances[]","mimeType"],a);const l=X(e,["autoTruncate"]);return t!==void 0&&l!=null&&ee(t,["parameters","autoTruncate"],l),n}function Pvt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["contents"]);if(o!=null){let l=$le(e,o);Array.isArray(l)&&(l=l.map(c=>c)),ee(n,["requests[]","content"],l)}const i=X(t,["config"]);i!=null&&Nvt(i,n);const a=X(t,["model"]);return a!==void 0&&ee(n,["requests[]","model"],Oa(e,a)),n}function Ivt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["contents"]);if(o!=null){let a=$le(e,o);Array.isArray(a)&&(a=a.map(l=>l)),ee(n,["instances[]","content"],a)}const i=X(t,["config"]);return i!=null&&Evt(i,n),n}function Avt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["embeddings"]);if(r!=null){let i=r;Array.isArray(i)&&(i=i.map(a=>a)),ee(t,["embeddings"],i)}const o=X(e,["metadata"]);return o!=null&&ee(t,["metadata"],o),t}function Tvt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["predictions[]","embeddings"]);if(r!=null){let i=r;Array.isArray(i)&&(i=i.map(a=>uvt(a))),ee(t,["embeddings"],i)}const o=X(e,["metadata"]);return o!=null&&ee(t,["metadata"],o),t}function kvt(e){const t={},n=X(e,["endpoint"]);n!=null&&ee(t,["name"],n);const r=X(e,["deployedModelId"]);return r!=null&&ee(t,["deployedModelId"],r),t}function Mvt(e){const t={};if(X(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const n=X(e,["fileUri"]);n!=null&&ee(t,["fileUri"],n);const r=X(e,["mimeType"]);return r!=null&&ee(t,["mimeType"],r),t}function Rvt(e){const t={},n=X(e,["id"]);n!=null&&ee(t,["id"],n);const r=X(e,["args"]);r!=null&&ee(t,["args"],r);const o=X(e,["name"]);if(o!=null&&ee(t,["name"],o),X(e,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(X(e,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return t}function Ovt(e){const t={},n=X(e,["mode"]);n!=null&&ee(t,["mode"],n);const r=X(e,["allowedFunctionNames"]);if(r!=null&&ee(t,["allowedFunctionNames"],r),X(e,["streamFunctionCallArguments"])!==void 0)throw new Error("streamFunctionCallArguments parameter is not supported in Gemini API.");return t}function Dvt(e){const t={};if(X(e,["behavior"])!==void 0)throw new Error("behavior parameter is not supported in Vertex AI.");const n=X(e,["description"]);n!=null&&ee(t,["description"],n);const r=X(e,["name"]);r!=null&&ee(t,["name"],r);const o=X(e,["parameters"]);o!=null&&ee(t,["parameters"],o);const i=X(e,["parametersJsonSchema"]);i!=null&&ee(t,["parametersJsonSchema"],i);const a=X(e,["response"]);a!=null&&ee(t,["response"],a);const l=X(e,["responseJsonSchema"]);return l!=null&&ee(t,["responseJsonSchema"],l),t}function Lvt(e,t,n){const r={},o=X(t,["systemInstruction"]);n!==void 0&&o!=null&&ee(n,["systemInstruction"],W9(ip(o)));const i=X(t,["temperature"]);i!=null&&ee(r,["temperature"],i);const a=X(t,["topP"]);a!=null&&ee(r,["topP"],a);const l=X(t,["topK"]);l!=null&&ee(r,["topK"],l);const c=X(t,["candidateCount"]);c!=null&&ee(r,["candidateCount"],c);const u=X(t,["maxOutputTokens"]);u!=null&&ee(r,["maxOutputTokens"],u);const d=X(t,["stopSequences"]);d!=null&&ee(r,["stopSequences"],d);const f=X(t,["responseLogprobs"]);f!=null&&ee(r,["responseLogprobs"],f);const h=X(t,["logprobs"]);h!=null&&ee(r,["logprobs"],h);const m=X(t,["presencePenalty"]);m!=null&&ee(r,["presencePenalty"],m);const g=X(t,["frequencyPenalty"]);g!=null&&ee(r,["frequencyPenalty"],g);const b=X(t,["seed"]);b!=null&&ee(r,["seed"],b);const y=X(t,["responseMimeType"]);y!=null&&ee(r,["responseMimeType"],y);const v=X(t,["responseSchema"]);v!=null&&ee(r,["responseSchema"],Fle(v));const x=X(t,["responseJsonSchema"]);if(x!=null&&ee(r,["responseJsonSchema"],x),X(t,["routingConfig"])!==void 0)throw new Error("routingConfig parameter is not supported in Gemini API.");if(X(t,["modelSelectionConfig"])!==void 0)throw new Error("modelSelectionConfig parameter is not supported in Gemini API.");const S=X(t,["safetySettings"]);if(n!==void 0&&S!=null){let T=S;Array.isArray(T)&&(T=T.map(D=>Ext(D))),ee(n,["safetySettings"],T)}const C=X(t,["tools"]);if(n!==void 0&&C!=null){let T=CI(C);Array.isArray(T)&&(T=T.map(D=>Rxt(SI(D)))),ee(n,["tools"],T)}const _=X(t,["toolConfig"]);if(n!==void 0&&_!=null&&ee(n,["toolConfig"],Mxt(_)),X(t,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");const N=X(t,["cachedContent"]);n!==void 0&&N!=null&&ee(n,["cachedContent"],s1(e,N));const E=X(t,["responseModalities"]);E!=null&&ee(r,["responseModalities"],E);const I=X(t,["mediaResolution"]);I!=null&&ee(r,["mediaResolution"],I);const A=X(t,["speechConfig"]);if(A!=null&&ee(r,["speechConfig"],Ble(A)),X(t,["audioTimestamp"])!==void 0)throw new Error("audioTimestamp parameter is not supported in Gemini API.");const R=X(t,["thinkingConfig"]);R!=null&&ee(r,["thinkingConfig"],R);const k=X(t,["imageConfig"]);return k!=null&&ee(r,["imageConfig"],uxt(k)),r}function $vt(e,t,n){const r={},o=X(t,["systemInstruction"]);n!==void 0&&o!=null&&ee(n,["systemInstruction"],ip(o));const i=X(t,["temperature"]);i!=null&&ee(r,["temperature"],i);const a=X(t,["topP"]);a!=null&&ee(r,["topP"],a);const l=X(t,["topK"]);l!=null&&ee(r,["topK"],l);const c=X(t,["candidateCount"]);c!=null&&ee(r,["candidateCount"],c);const u=X(t,["maxOutputTokens"]);u!=null&&ee(r,["maxOutputTokens"],u);const d=X(t,["stopSequences"]);d!=null&&ee(r,["stopSequences"],d);const f=X(t,["responseLogprobs"]);f!=null&&ee(r,["responseLogprobs"],f);const h=X(t,["logprobs"]);h!=null&&ee(r,["logprobs"],h);const m=X(t,["presencePenalty"]);m!=null&&ee(r,["presencePenalty"],m);const g=X(t,["frequencyPenalty"]);g!=null&&ee(r,["frequencyPenalty"],g);const b=X(t,["seed"]);b!=null&&ee(r,["seed"],b);const y=X(t,["responseMimeType"]);y!=null&&ee(r,["responseMimeType"],y);const v=X(t,["responseSchema"]);v!=null&&ee(r,["responseSchema"],Fle(v));const x=X(t,["responseJsonSchema"]);x!=null&&ee(r,["responseJsonSchema"],x);const S=X(t,["routingConfig"]);S!=null&&ee(r,["routingConfig"],S);const C=X(t,["modelSelectionConfig"]);C!=null&&ee(r,["modelConfig"],C);const _=X(t,["safetySettings"]);if(n!==void 0&&_!=null){let F=_;Array.isArray(F)&&(F=F.map(U=>U)),ee(n,["safetySettings"],F)}const N=X(t,["tools"]);if(n!==void 0&&N!=null){let F=CI(N);Array.isArray(F)&&(F=F.map(U=>E8e(SI(U)))),ee(n,["tools"],F)}const E=X(t,["toolConfig"]);n!==void 0&&E!=null&&ee(n,["toolConfig"],E);const I=X(t,["labels"]);n!==void 0&&I!=null&&ee(n,["labels"],I);const A=X(t,["cachedContent"]);n!==void 0&&A!=null&&ee(n,["cachedContent"],s1(e,A));const R=X(t,["responseModalities"]);R!=null&&ee(r,["responseModalities"],R);const k=X(t,["mediaResolution"]);k!=null&&ee(r,["mediaResolution"],k);const T=X(t,["speechConfig"]);T!=null&&ee(r,["speechConfig"],N8e(Ble(T)));const D=X(t,["audioTimestamp"]);D!=null&&ee(r,["audioTimestamp"],D);const O=X(t,["thinkingConfig"]);O!=null&&ee(r,["thinkingConfig"],O);const z=X(t,["imageConfig"]);return z!=null&&ee(r,["imageConfig"],dxt(z)),r}function n1e(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["contents"]);if(o!=null){let a=Sg(o);Array.isArray(a)&&(a=a.map(l=>W9(l))),ee(n,["contents"],a)}const i=X(t,["config"]);return i!=null&&ee(n,["generationConfig"],Lvt(e,i,n)),n}function r1e(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["contents"]);if(o!=null){let a=Sg(o);Array.isArray(a)&&(a=a.map(l=>l)),ee(n,["contents"],a)}const i=X(t,["config"]);return i!=null&&ee(n,["generationConfig"],$vt(e,i,n)),n}function o1e(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["candidates"]);if(r!=null){let c=r;Array.isArray(c)&&(c=c.map(u=>avt(u))),ee(t,["candidates"],c)}const o=X(e,["modelVersion"]);o!=null&&ee(t,["modelVersion"],o);const i=X(e,["promptFeedback"]);i!=null&&ee(t,["promptFeedback"],i);const a=X(e,["responseId"]);a!=null&&ee(t,["responseId"],a);const l=X(e,["usageMetadata"]);return l!=null&&ee(t,["usageMetadata"],l),t}function i1e(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["candidates"]);if(r!=null){let u=r;Array.isArray(u)&&(u=u.map(d=>d)),ee(t,["candidates"],u)}const o=X(e,["createTime"]);o!=null&&ee(t,["createTime"],o);const i=X(e,["modelVersion"]);i!=null&&ee(t,["modelVersion"],i);const a=X(e,["promptFeedback"]);a!=null&&ee(t,["promptFeedback"],a);const l=X(e,["responseId"]);l!=null&&ee(t,["responseId"],l);const c=X(e,["usageMetadata"]);return c!=null&&ee(t,["usageMetadata"],c),t}function Fvt(e,t){const n={};if(X(e,["outputGcsUri"])!==void 0)throw new Error("outputGcsUri parameter is not supported in Gemini API.");if(X(e,["negativePrompt"])!==void 0)throw new Error("negativePrompt parameter is not supported in Gemini API.");const r=X(e,["numberOfImages"]);t!==void 0&&r!=null&&ee(t,["parameters","sampleCount"],r);const o=X(e,["aspectRatio"]);t!==void 0&&o!=null&&ee(t,["parameters","aspectRatio"],o);const i=X(e,["guidanceScale"]);if(t!==void 0&&i!=null&&ee(t,["parameters","guidanceScale"],i),X(e,["seed"])!==void 0)throw new Error("seed parameter is not supported in Gemini API.");const a=X(e,["safetyFilterLevel"]);t!==void 0&&a!=null&&ee(t,["parameters","safetySetting"],a);const l=X(e,["personGeneration"]);t!==void 0&&l!=null&&ee(t,["parameters","personGeneration"],l);const c=X(e,["includeSafetyAttributes"]);t!==void 0&&c!=null&&ee(t,["parameters","includeSafetyAttributes"],c);const u=X(e,["includeRaiReason"]);t!==void 0&&u!=null&&ee(t,["parameters","includeRaiReason"],u);const d=X(e,["language"]);t!==void 0&&d!=null&&ee(t,["parameters","language"],d);const f=X(e,["outputMimeType"]);t!==void 0&&f!=null&&ee(t,["parameters","outputOptions","mimeType"],f);const h=X(e,["outputCompressionQuality"]);if(t!==void 0&&h!=null&&ee(t,["parameters","outputOptions","compressionQuality"],h),X(e,["addWatermark"])!==void 0)throw new Error("addWatermark parameter is not supported in Gemini API.");if(X(e,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");const m=X(e,["imageSize"]);if(t!==void 0&&m!=null&&ee(t,["parameters","sampleImageSize"],m),X(e,["enhancePrompt"])!==void 0)throw new Error("enhancePrompt parameter is not supported in Gemini API.");return n}function Bvt(e,t){const n={},r=X(e,["outputGcsUri"]);t!==void 0&&r!=null&&ee(t,["parameters","storageUri"],r);const o=X(e,["negativePrompt"]);t!==void 0&&o!=null&&ee(t,["parameters","negativePrompt"],o);const i=X(e,["numberOfImages"]);t!==void 0&&i!=null&&ee(t,["parameters","sampleCount"],i);const a=X(e,["aspectRatio"]);t!==void 0&&a!=null&&ee(t,["parameters","aspectRatio"],a);const l=X(e,["guidanceScale"]);t!==void 0&&l!=null&&ee(t,["parameters","guidanceScale"],l);const c=X(e,["seed"]);t!==void 0&&c!=null&&ee(t,["parameters","seed"],c);const u=X(e,["safetyFilterLevel"]);t!==void 0&&u!=null&&ee(t,["parameters","safetySetting"],u);const d=X(e,["personGeneration"]);t!==void 0&&d!=null&&ee(t,["parameters","personGeneration"],d);const f=X(e,["includeSafetyAttributes"]);t!==void 0&&f!=null&&ee(t,["parameters","includeSafetyAttributes"],f);const h=X(e,["includeRaiReason"]);t!==void 0&&h!=null&&ee(t,["parameters","includeRaiReason"],h);const m=X(e,["language"]);t!==void 0&&m!=null&&ee(t,["parameters","language"],m);const g=X(e,["outputMimeType"]);t!==void 0&&g!=null&&ee(t,["parameters","outputOptions","mimeType"],g);const b=X(e,["outputCompressionQuality"]);t!==void 0&&b!=null&&ee(t,["parameters","outputOptions","compressionQuality"],b);const y=X(e,["addWatermark"]);t!==void 0&&y!=null&&ee(t,["parameters","addWatermark"],y);const v=X(e,["labels"]);t!==void 0&&v!=null&&ee(t,["labels"],v);const x=X(e,["imageSize"]);t!==void 0&&x!=null&&ee(t,["parameters","sampleImageSize"],x);const S=X(e,["enhancePrompt"]);return t!==void 0&&S!=null&&ee(t,["parameters","enhancePrompt"],S),n}function zvt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["prompt"]);o!=null&&ee(n,["instances[0]","prompt"],o);const i=X(t,["config"]);return i!=null&&Fvt(i,n),n}function Hvt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["prompt"]);o!=null&&ee(n,["instances[0]","prompt"],o);const i=X(t,["config"]);return i!=null&&Bvt(i,n),n}function Vvt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["predictions"]);if(r!=null){let i=r;Array.isArray(i)&&(i=i.map(a=>txt(a))),ee(t,["generatedImages"],i)}const o=X(e,["positivePromptSafetyAttributes"]);return o!=null&&ee(t,["positivePromptSafetyAttributes"],_8e(o)),t}function Uvt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["predictions"]);if(r!=null){let i=r;Array.isArray(i)&&(i=i.map(a=>q9(a))),ee(t,["generatedImages"],i)}const o=X(e,["positivePromptSafetyAttributes"]);return o!=null&&ee(t,["positivePromptSafetyAttributes"],j8e(o)),t}function Gvt(e,t){const n={},r=X(e,["numberOfVideos"]);if(t!==void 0&&r!=null&&ee(t,["parameters","sampleCount"],r),X(e,["outputGcsUri"])!==void 0)throw new Error("outputGcsUri parameter is not supported in Gemini API.");if(X(e,["fps"])!==void 0)throw new Error("fps parameter is not supported in Gemini API.");const o=X(e,["durationSeconds"]);if(t!==void 0&&o!=null&&ee(t,["parameters","durationSeconds"],o),X(e,["seed"])!==void 0)throw new Error("seed parameter is not supported in Gemini API.");const i=X(e,["aspectRatio"]);t!==void 0&&i!=null&&ee(t,["parameters","aspectRatio"],i);const a=X(e,["resolution"]);t!==void 0&&a!=null&&ee(t,["parameters","resolution"],a);const l=X(e,["personGeneration"]);if(t!==void 0&&l!=null&&ee(t,["parameters","personGeneration"],l),X(e,["pubsubTopic"])!==void 0)throw new Error("pubsubTopic parameter is not supported in Gemini API.");const c=X(e,["negativePrompt"]);t!==void 0&&c!=null&&ee(t,["parameters","negativePrompt"],c);const u=X(e,["enhancePrompt"]);if(t!==void 0&&u!=null&&ee(t,["parameters","enhancePrompt"],u),X(e,["generateAudio"])!==void 0)throw new Error("generateAudio parameter is not supported in Gemini API.");const d=X(e,["lastFrame"]);t!==void 0&&d!=null&&ee(t,["instances[0]","lastFrame"],K9(d));const f=X(e,["referenceImages"]);if(t!==void 0&&f!=null){let h=f;Array.isArray(h)&&(h=h.map(m=>qxt(m))),ee(t,["instances[0]","referenceImages"],h)}if(X(e,["mask"])!==void 0)throw new Error("mask parameter is not supported in Gemini API.");if(X(e,["compressionQuality"])!==void 0)throw new Error("compressionQuality parameter is not supported in Gemini API.");return n}function Wvt(e,t){const n={},r=X(e,["numberOfVideos"]);t!==void 0&&r!=null&&ee(t,["parameters","sampleCount"],r);const o=X(e,["outputGcsUri"]);t!==void 0&&o!=null&&ee(t,["parameters","storageUri"],o);const i=X(e,["fps"]);t!==void 0&&i!=null&&ee(t,["parameters","fps"],i);const a=X(e,["durationSeconds"]);t!==void 0&&a!=null&&ee(t,["parameters","durationSeconds"],a);const l=X(e,["seed"]);t!==void 0&&l!=null&&ee(t,["parameters","seed"],l);const c=X(e,["aspectRatio"]);t!==void 0&&c!=null&&ee(t,["parameters","aspectRatio"],c);const u=X(e,["resolution"]);t!==void 0&&u!=null&&ee(t,["parameters","resolution"],u);const d=X(e,["personGeneration"]);t!==void 0&&d!=null&&ee(t,["parameters","personGeneration"],d);const f=X(e,["pubsubTopic"]);t!==void 0&&f!=null&&ee(t,["parameters","pubsubTopic"],f);const h=X(e,["negativePrompt"]);t!==void 0&&h!=null&&ee(t,["parameters","negativePrompt"],h);const m=X(e,["enhancePrompt"]);t!==void 0&&m!=null&&ee(t,["parameters","enhancePrompt"],m);const g=X(e,["generateAudio"]);t!==void 0&&g!=null&&ee(t,["parameters","generateAudio"],g);const b=X(e,["lastFrame"]);t!==void 0&&b!=null&&ee(t,["instances[0]","lastFrame"],ly(b));const y=X(e,["referenceImages"]);if(t!==void 0&&y!=null){let S=y;Array.isArray(S)&&(S=S.map(C=>Kxt(C))),ee(t,["instances[0]","referenceImages"],S)}const v=X(e,["mask"]);t!==void 0&&v!=null&&ee(t,["instances[0]","mask"],Wxt(v));const x=X(e,["compressionQuality"]);return t!==void 0&&x!=null&&ee(t,["parameters","compressionQuality"],x),n}function qvt(e){const t={},n=X(e,["name"]);n!=null&&ee(t,["name"],n);const r=X(e,["metadata"]);r!=null&&ee(t,["metadata"],r);const o=X(e,["done"]);o!=null&&ee(t,["done"],o);const i=X(e,["error"]);i!=null&&ee(t,["error"],i);const a=X(e,["response","generateVideoResponse"]);return a!=null&&ee(t,["response"],Zvt(a)),t}function Kvt(e){const t={},n=X(e,["name"]);n!=null&&ee(t,["name"],n);const r=X(e,["metadata"]);r!=null&&ee(t,["metadata"],r);const o=X(e,["done"]);o!=null&&ee(t,["done"],o);const i=X(e,["error"]);i!=null&&ee(t,["error"],i);const a=X(e,["response"]);return a!=null&&ee(t,["response"],Jvt(a)),t}function Yvt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["prompt"]);o!=null&&ee(n,["instances[0]","prompt"],o);const i=X(t,["image"]);i!=null&&ee(n,["instances[0]","image"],K9(i));const a=X(t,["video"]);a!=null&&ee(n,["instances[0]","video"],P8e(a));const l=X(t,["source"]);l!=null&&Qvt(l,n);const c=X(t,["config"]);return c!=null&&Gvt(c,n),n}function Xvt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["prompt"]);o!=null&&ee(n,["instances[0]","prompt"],o);const i=X(t,["image"]);i!=null&&ee(n,["instances[0]","image"],ly(i));const a=X(t,["video"]);a!=null&&ee(n,["instances[0]","video"],I8e(a));const l=X(t,["source"]);l!=null&&ext(l,n);const c=X(t,["config"]);return c!=null&&Wvt(c,n),n}function Zvt(e){const t={},n=X(e,["generatedSamples"]);if(n!=null){let i=n;Array.isArray(i)&&(i=i.map(a=>rxt(a))),ee(t,["generatedVideos"],i)}const r=X(e,["raiMediaFilteredCount"]);r!=null&&ee(t,["raiMediaFilteredCount"],r);const o=X(e,["raiMediaFilteredReasons"]);return o!=null&&ee(t,["raiMediaFilteredReasons"],o),t}function Jvt(e){const t={},n=X(e,["videos"]);if(n!=null){let i=n;Array.isArray(i)&&(i=i.map(a=>oxt(a))),ee(t,["generatedVideos"],i)}const r=X(e,["raiMediaFilteredCount"]);r!=null&&ee(t,["raiMediaFilteredCount"],r);const o=X(e,["raiMediaFilteredReasons"]);return o!=null&&ee(t,["raiMediaFilteredReasons"],o),t}function Qvt(e,t){const n={},r=X(e,["prompt"]);t!==void 0&&r!=null&&ee(t,["instances[0]","prompt"],r);const o=X(e,["image"]);t!==void 0&&o!=null&&ee(t,["instances[0]","image"],K9(o));const i=X(e,["video"]);return t!==void 0&&i!=null&&ee(t,["instances[0]","video"],P8e(i)),n}function ext(e,t){const n={},r=X(e,["prompt"]);t!==void 0&&r!=null&&ee(t,["instances[0]","prompt"],r);const o=X(e,["image"]);t!==void 0&&o!=null&&ee(t,["instances[0]","image"],ly(o));const i=X(e,["video"]);return t!==void 0&&i!=null&&ee(t,["instances[0]","video"],I8e(i)),n}function txt(e){const t={},n=X(e,["_self"]);n!=null&&ee(t,["image"],fxt(n));const r=X(e,["raiFilteredReason"]);r!=null&&ee(t,["raiFilteredReason"],r);const o=X(e,["_self"]);return o!=null&&ee(t,["safetyAttributes"],_8e(o)),t}function q9(e){const t={},n=X(e,["_self"]);n!=null&&ee(t,["image"],C8e(n));const r=X(e,["raiFilteredReason"]);r!=null&&ee(t,["raiFilteredReason"],r);const o=X(e,["_self"]);o!=null&&ee(t,["safetyAttributes"],j8e(o));const i=X(e,["prompt"]);return i!=null&&ee(t,["enhancedPrompt"],i),t}function nxt(e){const t={},n=X(e,["_self"]);n!=null&&ee(t,["mask"],C8e(n));const r=X(e,["labels"]);if(r!=null){let o=r;Array.isArray(o)&&(o=o.map(i=>i)),ee(t,["labels"],o)}return t}function rxt(e){const t={},n=X(e,["video"]);return n!=null&&ee(t,["video"],Uxt(n)),t}function oxt(e){const t={},n=X(e,["_self"]);return n!=null&&ee(t,["video"],Gxt(n)),t}function ixt(e){const t={},n=X(e,["modelSelectionConfig"]);n!=null&&ee(t,["modelConfig"],n);const r=X(e,["responseJsonSchema"]);r!=null&&ee(t,["responseJsonSchema"],r);const o=X(e,["audioTimestamp"]);o!=null&&ee(t,["audioTimestamp"],o);const i=X(e,["candidateCount"]);i!=null&&ee(t,["candidateCount"],i);const a=X(e,["enableAffectiveDialog"]);a!=null&&ee(t,["enableAffectiveDialog"],a);const l=X(e,["frequencyPenalty"]);l!=null&&ee(t,["frequencyPenalty"],l);const c=X(e,["logprobs"]);c!=null&&ee(t,["logprobs"],c);const u=X(e,["maxOutputTokens"]);u!=null&&ee(t,["maxOutputTokens"],u);const d=X(e,["mediaResolution"]);d!=null&&ee(t,["mediaResolution"],d);const f=X(e,["presencePenalty"]);f!=null&&ee(t,["presencePenalty"],f);const h=X(e,["responseLogprobs"]);h!=null&&ee(t,["responseLogprobs"],h);const m=X(e,["responseMimeType"]);m!=null&&ee(t,["responseMimeType"],m);const g=X(e,["responseModalities"]);g!=null&&ee(t,["responseModalities"],g);const b=X(e,["responseSchema"]);b!=null&&ee(t,["responseSchema"],b);const y=X(e,["routingConfig"]);y!=null&&ee(t,["routingConfig"],y);const v=X(e,["seed"]);v!=null&&ee(t,["seed"],v);const x=X(e,["speechConfig"]);x!=null&&ee(t,["speechConfig"],N8e(x));const S=X(e,["stopSequences"]);S!=null&&ee(t,["stopSequences"],S);const C=X(e,["temperature"]);C!=null&&ee(t,["temperature"],C);const _=X(e,["thinkingConfig"]);_!=null&&ee(t,["thinkingConfig"],_);const N=X(e,["topK"]);N!=null&&ee(t,["topK"],N);const E=X(e,["topP"]);if(E!=null&&ee(t,["topP"],E),X(e,["enableEnhancedCivicAnswers"])!==void 0)throw new Error("enableEnhancedCivicAnswers parameter is not supported in Vertex AI.");return t}function axt(e,t){const n={},r=X(t,["model"]);return r!=null&&ee(n,["_url","name"],Oa(e,r)),n}function sxt(e,t){const n={},r=X(t,["model"]);return r!=null&&ee(n,["_url","name"],Oa(e,r)),n}function lxt(e){const t={};if(X(e,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const n=X(e,["enableWidget"]);return n!=null&&ee(t,["enableWidget"],n),t}function cxt(e){const t={};if(X(e,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(X(e,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const n=X(e,["timeRangeFilter"]);return n!=null&&ee(t,["timeRangeFilter"],n),t}function uxt(e){const t={},n=X(e,["aspectRatio"]);n!=null&&ee(t,["aspectRatio"],n);const r=X(e,["imageSize"]);if(r!=null&&ee(t,["imageSize"],r),X(e,["outputMimeType"])!==void 0)throw new Error("outputMimeType parameter is not supported in Gemini API.");if(X(e,["outputCompressionQuality"])!==void 0)throw new Error("outputCompressionQuality parameter is not supported in Gemini API.");return t}function dxt(e){const t={},n=X(e,["aspectRatio"]);n!=null&&ee(t,["aspectRatio"],n);const r=X(e,["imageSize"]);r!=null&&ee(t,["imageSize"],r);const o=X(e,["outputMimeType"]);o!=null&&ee(t,["imageOutputOptions","mimeType"],o);const i=X(e,["outputCompressionQuality"]);return i!=null&&ee(t,["imageOutputOptions","compressionQuality"],i),t}function fxt(e){const t={},n=X(e,["bytesBase64Encoded"]);n!=null&&ee(t,["imageBytes"],QS(n));const r=X(e,["mimeType"]);return r!=null&&ee(t,["mimeType"],r),t}function C8e(e){const t={},n=X(e,["gcsUri"]);n!=null&&ee(t,["gcsUri"],n);const r=X(e,["bytesBase64Encoded"]);r!=null&&ee(t,["imageBytes"],QS(r));const o=X(e,["mimeType"]);return o!=null&&ee(t,["mimeType"],o),t}function K9(e){const t={};if(X(e,["gcsUri"])!==void 0)throw new Error("gcsUri parameter is not supported in Gemini API.");const n=X(e,["imageBytes"]);n!=null&&ee(t,["bytesBase64Encoded"],QS(n));const r=X(e,["mimeType"]);return r!=null&&ee(t,["mimeType"],r),t}function ly(e){const t={},n=X(e,["gcsUri"]);n!=null&&ee(t,["gcsUri"],n);const r=X(e,["imageBytes"]);r!=null&&ee(t,["bytesBase64Encoded"],QS(r));const o=X(e,["mimeType"]);return o!=null&&ee(t,["mimeType"],o),t}function pxt(e,t,n){const r={},o=X(t,["pageSize"]);n!==void 0&&o!=null&&ee(n,["_query","pageSize"],o);const i=X(t,["pageToken"]);n!==void 0&&i!=null&&ee(n,["_query","pageToken"],i);const a=X(t,["filter"]);n!==void 0&&a!=null&&ee(n,["_query","filter"],a);const l=X(t,["queryBase"]);return n!==void 0&&l!=null&&ee(n,["_url","models_url"],m8e(e,l)),r}function hxt(e,t,n){const r={},o=X(t,["pageSize"]);n!==void 0&&o!=null&&ee(n,["_query","pageSize"],o);const i=X(t,["pageToken"]);n!==void 0&&i!=null&&ee(n,["_query","pageToken"],i);const a=X(t,["filter"]);n!==void 0&&a!=null&&ee(n,["_query","filter"],a);const l=X(t,["queryBase"]);return n!==void 0&&l!=null&&ee(n,["_url","models_url"],m8e(e,l)),r}function mxt(e,t){const n={},r=X(t,["config"]);return r!=null&&pxt(e,r,n),n}function gxt(e,t){const n={},r=X(t,["config"]);return r!=null&&hxt(e,r,n),n}function yxt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["nextPageToken"]);r!=null&&ee(t,["nextPageToken"],r);const o=X(e,["_self"]);if(o!=null){let i=g8e(o);Array.isArray(i)&&(i=i.map(a=>bee(a))),ee(t,["models"],i)}return t}function bxt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["nextPageToken"]);r!=null&&ee(t,["nextPageToken"],r);const o=X(e,["_self"]);if(o!=null){let i=g8e(o);Array.isArray(i)&&(i=i.map(a=>vee(a))),ee(t,["models"],i)}return t}function vxt(e){const t={},n=X(e,["maskMode"]);n!=null&&ee(t,["maskMode"],n);const r=X(e,["segmentationClasses"]);r!=null&&ee(t,["maskClasses"],r);const o=X(e,["maskDilation"]);return o!=null&&ee(t,["dilation"],o),t}function bee(e){const t={},n=X(e,["name"]);n!=null&&ee(t,["name"],n);const r=X(e,["displayName"]);r!=null&&ee(t,["displayName"],r);const o=X(e,["description"]);o!=null&&ee(t,["description"],o);const i=X(e,["version"]);i!=null&&ee(t,["version"],i);const a=X(e,["_self"]);a!=null&&ee(t,["tunedModelInfo"],Oxt(a));const l=X(e,["inputTokenLimit"]);l!=null&&ee(t,["inputTokenLimit"],l);const c=X(e,["outputTokenLimit"]);c!=null&&ee(t,["outputTokenLimit"],c);const u=X(e,["supportedGenerationMethods"]);u!=null&&ee(t,["supportedActions"],u);const d=X(e,["temperature"]);d!=null&&ee(t,["temperature"],d);const f=X(e,["maxTemperature"]);f!=null&&ee(t,["maxTemperature"],f);const h=X(e,["topP"]);h!=null&&ee(t,["topP"],h);const m=X(e,["topK"]);m!=null&&ee(t,["topK"],m);const g=X(e,["thinking"]);return g!=null&&ee(t,["thinking"],g),t}function vee(e){const t={},n=X(e,["name"]);n!=null&&ee(t,["name"],n);const r=X(e,["displayName"]);r!=null&&ee(t,["displayName"],r);const o=X(e,["description"]);o!=null&&ee(t,["description"],o);const i=X(e,["versionId"]);i!=null&&ee(t,["version"],i);const a=X(e,["deployedModels"]);if(a!=null){let f=a;Array.isArray(f)&&(f=f.map(h=>kvt(h))),ee(t,["endpoints"],f)}const l=X(e,["labels"]);l!=null&&ee(t,["labels"],l);const c=X(e,["_self"]);c!=null&&ee(t,["tunedModelInfo"],Dxt(c));const u=X(e,["defaultCheckpointId"]);u!=null&&ee(t,["defaultCheckpointId"],u);const d=X(e,["checkpoints"]);if(d!=null){let f=d;Array.isArray(f)&&(f=f.map(h=>h)),ee(t,["checkpoints"],f)}return t}function xxt(e){const t={},n=X(e,["mediaResolution"]);n!=null&&ee(t,["mediaResolution"],n);const r=X(e,["codeExecutionResult"]);r!=null&&ee(t,["codeExecutionResult"],r);const o=X(e,["executableCode"]);o!=null&&ee(t,["executableCode"],o);const i=X(e,["fileData"]);i!=null&&ee(t,["fileData"],Mvt(i));const a=X(e,["functionCall"]);a!=null&&ee(t,["functionCall"],Rvt(a));const l=X(e,["functionResponse"]);l!=null&&ee(t,["functionResponse"],l);const c=X(e,["inlineData"]);c!=null&&ee(t,["inlineData"],ivt(c));const u=X(e,["text"]);u!=null&&ee(t,["text"],u);const d=X(e,["thought"]);d!=null&&ee(t,["thought"],d);const f=X(e,["thoughtSignature"]);f!=null&&ee(t,["thoughtSignature"],f);const h=X(e,["videoMetadata"]);return h!=null&&ee(t,["videoMetadata"],h),t}function wxt(e){const t={},n=X(e,["productImage"]);return n!=null&&ee(t,["image"],ly(n)),t}function Sxt(e,t){const n={},r=X(e,["numberOfImages"]);t!==void 0&&r!=null&&ee(t,["parameters","sampleCount"],r);const o=X(e,["baseSteps"]);t!==void 0&&o!=null&&ee(t,["parameters","baseSteps"],o);const i=X(e,["outputGcsUri"]);t!==void 0&&i!=null&&ee(t,["parameters","storageUri"],i);const a=X(e,["seed"]);t!==void 0&&a!=null&&ee(t,["parameters","seed"],a);const l=X(e,["safetyFilterLevel"]);t!==void 0&&l!=null&&ee(t,["parameters","safetySetting"],l);const c=X(e,["personGeneration"]);t!==void 0&&c!=null&&ee(t,["parameters","personGeneration"],c);const u=X(e,["addWatermark"]);t!==void 0&&u!=null&&ee(t,["parameters","addWatermark"],u);const d=X(e,["outputMimeType"]);t!==void 0&&d!=null&&ee(t,["parameters","outputOptions","mimeType"],d);const f=X(e,["outputCompressionQuality"]);t!==void 0&&f!=null&&ee(t,["parameters","outputOptions","compressionQuality"],f);const h=X(e,["enhancePrompt"]);t!==void 0&&h!=null&&ee(t,["parameters","enhancePrompt"],h);const m=X(e,["labels"]);return t!==void 0&&m!=null&&ee(t,["labels"],m),n}function Cxt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["source"]);o!=null&&jxt(o,n);const i=X(t,["config"]);return i!=null&&Sxt(i,n),n}function _xt(e){const t={},n=X(e,["predictions"]);if(n!=null){let r=n;Array.isArray(r)&&(r=r.map(o=>q9(o))),ee(t,["generatedImages"],r)}return t}function jxt(e,t){const n={},r=X(e,["prompt"]);t!==void 0&&r!=null&&ee(t,["instances[0]","prompt"],r);const o=X(e,["personImage"]);t!==void 0&&o!=null&&ee(t,["instances[0]","personImage","image"],ly(o));const i=X(e,["productImages"]);if(t!==void 0&&i!=null){let a=i;Array.isArray(a)&&(a=a.map(l=>wxt(l))),ee(t,["instances[0]","productImages"],a)}return n}function Nxt(e){const t={},n=X(e,["referenceImage"]);n!=null&&ee(t,["referenceImage"],ly(n));const r=X(e,["referenceId"]);r!=null&&ee(t,["referenceId"],r);const o=X(e,["referenceType"]);o!=null&&ee(t,["referenceType"],o);const i=X(e,["maskImageConfig"]);i!=null&&ee(t,["maskImageConfig"],vxt(i));const a=X(e,["controlImageConfig"]);a!=null&&ee(t,["controlImageConfig"],fvt(a));const l=X(e,["styleImageConfig"]);l!=null&&ee(t,["styleImageConfig"],l);const c=X(e,["subjectImageConfig"]);return c!=null&&ee(t,["subjectImageConfig"],c),t}function _8e(e){const t={},n=X(e,["safetyAttributes","categories"]);n!=null&&ee(t,["categories"],n);const r=X(e,["safetyAttributes","scores"]);r!=null&&ee(t,["scores"],r);const o=X(e,["contentType"]);return o!=null&&ee(t,["contentType"],o),t}function j8e(e){const t={},n=X(e,["safetyAttributes","categories"]);n!=null&&ee(t,["categories"],n);const r=X(e,["safetyAttributes","scores"]);r!=null&&ee(t,["scores"],r);const o=X(e,["contentType"]);return o!=null&&ee(t,["contentType"],o),t}function Ext(e){const t={},n=X(e,["category"]);if(n!=null&&ee(t,["category"],n),X(e,["method"])!==void 0)throw new Error("method parameter is not supported in Gemini API.");const r=X(e,["threshold"]);return r!=null&&ee(t,["threshold"],r),t}function Pxt(e){const t={},n=X(e,["image"]);return n!=null&&ee(t,["image"],ly(n)),t}function Ixt(e,t){const n={},r=X(e,["mode"]);t!==void 0&&r!=null&&ee(t,["parameters","mode"],r);const o=X(e,["maxPredictions"]);t!==void 0&&o!=null&&ee(t,["parameters","maxPredictions"],o);const i=X(e,["confidenceThreshold"]);t!==void 0&&i!=null&&ee(t,["parameters","confidenceThreshold"],i);const a=X(e,["maskDilation"]);t!==void 0&&a!=null&&ee(t,["parameters","maskDilation"],a);const l=X(e,["binaryColorThreshold"]);t!==void 0&&l!=null&&ee(t,["parameters","binaryColorThreshold"],l);const c=X(e,["labels"]);return t!==void 0&&c!=null&&ee(t,["labels"],c),n}function Axt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["source"]);o!=null&&kxt(o,n);const i=X(t,["config"]);return i!=null&&Ixt(i,n),n}function Txt(e){const t={},n=X(e,["predictions"]);if(n!=null){let r=n;Array.isArray(r)&&(r=r.map(o=>nxt(o))),ee(t,["generatedMasks"],r)}return t}function kxt(e,t){const n={},r=X(e,["prompt"]);t!==void 0&&r!=null&&ee(t,["instances[0]","prompt"],r);const o=X(e,["image"]);t!==void 0&&o!=null&&ee(t,["instances[0]","image"],ly(o));const i=X(e,["scribbleImage"]);return t!==void 0&&i!=null&&ee(t,["instances[0]","scribble"],Pxt(i)),n}function N8e(e){const t={},n=X(e,["languageCode"]);n!=null&&ee(t,["languageCode"],n);const r=X(e,["voiceConfig"]);if(r!=null&&ee(t,["voiceConfig"],r),X(e,["multiSpeakerVoiceConfig"])!==void 0)throw new Error("multiSpeakerVoiceConfig parameter is not supported in Vertex AI.");return t}function Mxt(e){const t={},n=X(e,["functionCallingConfig"]);n!=null&&ee(t,["functionCallingConfig"],Ovt(n));const r=X(e,["retrievalConfig"]);return r!=null&&ee(t,["retrievalConfig"],r),t}function Rxt(e){const t={},n=X(e,["functionDeclarations"]);if(n!=null){let d=n;Array.isArray(d)&&(d=d.map(f=>f)),ee(t,["functionDeclarations"],d)}if(X(e,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const r=X(e,["googleSearchRetrieval"]);r!=null&&ee(t,["googleSearchRetrieval"],r);const o=X(e,["computerUse"]);o!=null&&ee(t,["computerUse"],o);const i=X(e,["fileSearch"]);i!=null&&ee(t,["fileSearch"],i);const a=X(e,["codeExecution"]);if(a!=null&&ee(t,["codeExecution"],a),X(e,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const l=X(e,["googleMaps"]);l!=null&&ee(t,["googleMaps"],lxt(l));const c=X(e,["googleSearch"]);c!=null&&ee(t,["googleSearch"],cxt(c));const u=X(e,["urlContext"]);return u!=null&&ee(t,["urlContext"],u),t}function E8e(e){const t={},n=X(e,["functionDeclarations"]);if(n!=null){let f=n;Array.isArray(f)&&(f=f.map(h=>Dvt(h))),ee(t,["functionDeclarations"],f)}const r=X(e,["retrieval"]);r!=null&&ee(t,["retrieval"],r);const o=X(e,["googleSearchRetrieval"]);o!=null&&ee(t,["googleSearchRetrieval"],o);const i=X(e,["computerUse"]);if(i!=null&&ee(t,["computerUse"],i),X(e,["fileSearch"])!==void 0)throw new Error("fileSearch parameter is not supported in Vertex AI.");const a=X(e,["codeExecution"]);a!=null&&ee(t,["codeExecution"],a);const l=X(e,["enterpriseWebSearch"]);l!=null&&ee(t,["enterpriseWebSearch"],l);const c=X(e,["googleMaps"]);c!=null&&ee(t,["googleMaps"],c);const u=X(e,["googleSearch"]);u!=null&&ee(t,["googleSearch"],u);const d=X(e,["urlContext"]);return d!=null&&ee(t,["urlContext"],d),t}function Oxt(e){const t={},n=X(e,["baseModel"]);n!=null&&ee(t,["baseModel"],n);const r=X(e,["createTime"]);r!=null&&ee(t,["createTime"],r);const o=X(e,["updateTime"]);return o!=null&&ee(t,["updateTime"],o),t}function Dxt(e){const t={},n=X(e,["labels","google-vertex-llm-tuning-base-model-id"]);n!=null&&ee(t,["baseModel"],n);const r=X(e,["createTime"]);r!=null&&ee(t,["createTime"],r);const o=X(e,["updateTime"]);return o!=null&&ee(t,["updateTime"],o),t}function Lxt(e,t){const n={},r=X(e,["displayName"]);t!==void 0&&r!=null&&ee(t,["displayName"],r);const o=X(e,["description"]);t!==void 0&&o!=null&&ee(t,["description"],o);const i=X(e,["defaultCheckpointId"]);return t!==void 0&&i!=null&&ee(t,["defaultCheckpointId"],i),n}function $xt(e,t){const n={},r=X(e,["displayName"]);t!==void 0&&r!=null&&ee(t,["displayName"],r);const o=X(e,["description"]);t!==void 0&&o!=null&&ee(t,["description"],o);const i=X(e,["defaultCheckpointId"]);return t!==void 0&&i!=null&&ee(t,["defaultCheckpointId"],i),n}function Fxt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","name"],Oa(e,r));const o=X(t,["config"]);return o!=null&&Lxt(o,n),n}function Bxt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["config"]);return o!=null&&$xt(o,n),n}function zxt(e,t){const n={},r=X(e,["outputGcsUri"]);t!==void 0&&r!=null&&ee(t,["parameters","storageUri"],r);const o=X(e,["safetyFilterLevel"]);t!==void 0&&o!=null&&ee(t,["parameters","safetySetting"],o);const i=X(e,["personGeneration"]);t!==void 0&&i!=null&&ee(t,["parameters","personGeneration"],i);const a=X(e,["includeRaiReason"]);t!==void 0&&a!=null&&ee(t,["parameters","includeRaiReason"],a);const l=X(e,["outputMimeType"]);t!==void 0&&l!=null&&ee(t,["parameters","outputOptions","mimeType"],l);const c=X(e,["outputCompressionQuality"]);t!==void 0&&c!=null&&ee(t,["parameters","outputOptions","compressionQuality"],c);const u=X(e,["enhanceInputImage"]);t!==void 0&&u!=null&&ee(t,["parameters","upscaleConfig","enhanceInputImage"],u);const d=X(e,["imagePreservationFactor"]);t!==void 0&&d!=null&&ee(t,["parameters","upscaleConfig","imagePreservationFactor"],d);const f=X(e,["labels"]);t!==void 0&&f!=null&&ee(t,["labels"],f);const h=X(e,["numberOfImages"]);t!==void 0&&h!=null&&ee(t,["parameters","sampleCount"],h);const m=X(e,["mode"]);return t!==void 0&&m!=null&&ee(t,["parameters","mode"],m),n}function Hxt(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["_url","model"],Oa(e,r));const o=X(t,["image"]);o!=null&&ee(n,["instances[0]","image"],ly(o));const i=X(t,["upscaleFactor"]);i!=null&&ee(n,["parameters","upscaleConfig","upscaleFactor"],i);const a=X(t,["config"]);return a!=null&&zxt(a,n),n}function Vxt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["predictions"]);if(r!=null){let o=r;Array.isArray(o)&&(o=o.map(i=>q9(i))),ee(t,["generatedImages"],o)}return t}function Uxt(e){const t={},n=X(e,["uri"]);n!=null&&ee(t,["uri"],n);const r=X(e,["encodedVideo"]);r!=null&&ee(t,["videoBytes"],QS(r));const o=X(e,["encoding"]);return o!=null&&ee(t,["mimeType"],o),t}function Gxt(e){const t={},n=X(e,["gcsUri"]);n!=null&&ee(t,["uri"],n);const r=X(e,["bytesBase64Encoded"]);r!=null&&ee(t,["videoBytes"],QS(r));const o=X(e,["mimeType"]);return o!=null&&ee(t,["mimeType"],o),t}function Wxt(e){const t={},n=X(e,["image"]);n!=null&&ee(t,["_self"],ly(n));const r=X(e,["maskMode"]);return r!=null&&ee(t,["maskMode"],r),t}function qxt(e){const t={},n=X(e,["image"]);n!=null&&ee(t,["image"],K9(n));const r=X(e,["referenceType"]);return r!=null&&ee(t,["referenceType"],r),t}function Kxt(e){const t={},n=X(e,["image"]);n!=null&&ee(t,["image"],ly(n));const r=X(e,["referenceType"]);return r!=null&&ee(t,["referenceType"],r),t}function P8e(e){const t={},n=X(e,["uri"]);n!=null&&ee(t,["uri"],n);const r=X(e,["videoBytes"]);r!=null&&ee(t,["encodedVideo"],QS(r));const o=X(e,["mimeType"]);return o!=null&&ee(t,["encoding"],o),t}function I8e(e){const t={},n=X(e,["uri"]);n!=null&&ee(t,["gcsUri"],n);const r=X(e,["videoBytes"]);r!=null&&ee(t,["bytesBase64Encoded"],QS(r));const o=X(e,["mimeType"]);return o!=null&&ee(t,["mimeType"],o),t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function Yxt(e,t){const n={},r=X(e,["displayName"]);return t!==void 0&&r!=null&&ee(t,["displayName"],r),n}function Xxt(e){const t={},n=X(e,["config"]);return n!=null&&Yxt(n,t),t}function Zxt(e,t){const n={},r=X(e,["force"]);return t!==void 0&&r!=null&&ee(t,["_query","force"],r),n}function Jxt(e){const t={},n=X(e,["name"]);n!=null&&ee(t,["_url","name"],n);const r=X(e,["config"]);return r!=null&&Zxt(r,t),t}function Qxt(e){const t={},n=X(e,["name"]);return n!=null&&ee(t,["_url","name"],n),t}function e1t(e,t){const n={},r=X(e,["customMetadata"]);if(t!==void 0&&r!=null){let i=r;Array.isArray(i)&&(i=i.map(a=>a)),ee(t,["customMetadata"],i)}const o=X(e,["chunkingConfig"]);return t!==void 0&&o!=null&&ee(t,["chunkingConfig"],o),n}function t1t(e){const t={},n=X(e,["name"]);n!=null&&ee(t,["name"],n);const r=X(e,["metadata"]);r!=null&&ee(t,["metadata"],r);const o=X(e,["done"]);o!=null&&ee(t,["done"],o);const i=X(e,["error"]);i!=null&&ee(t,["error"],i);const a=X(e,["response"]);return a!=null&&ee(t,["response"],r1t(a)),t}function n1t(e){const t={},n=X(e,["fileSearchStoreName"]);n!=null&&ee(t,["_url","file_search_store_name"],n);const r=X(e,["fileName"]);r!=null&&ee(t,["fileName"],r);const o=X(e,["config"]);return o!=null&&e1t(o,t),t}function r1t(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["parent"]);r!=null&&ee(t,["parent"],r);const o=X(e,["documentName"]);return o!=null&&ee(t,["documentName"],o),t}function o1t(e,t){const n={},r=X(e,["pageSize"]);t!==void 0&&r!=null&&ee(t,["_query","pageSize"],r);const o=X(e,["pageToken"]);return t!==void 0&&o!=null&&ee(t,["_query","pageToken"],o),n}function i1t(e){const t={},n=X(e,["config"]);return n!=null&&o1t(n,t),t}function a1t(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["nextPageToken"]);r!=null&&ee(t,["nextPageToken"],r);const o=X(e,["fileSearchStores"]);if(o!=null){let i=o;Array.isArray(i)&&(i=i.map(a=>a)),ee(t,["fileSearchStores"],i)}return t}function A8e(e,t){const n={},r=X(e,["mimeType"]);t!==void 0&&r!=null&&ee(t,["mimeType"],r);const o=X(e,["displayName"]);t!==void 0&&o!=null&&ee(t,["displayName"],o);const i=X(e,["customMetadata"]);if(t!==void 0&&i!=null){let l=i;Array.isArray(l)&&(l=l.map(c=>c)),ee(t,["customMetadata"],l)}const a=X(e,["chunkingConfig"]);return t!==void 0&&a!=null&&ee(t,["chunkingConfig"],a),n}function s1t(e){const t={},n=X(e,["fileSearchStoreName"]);n!=null&&ee(t,["_url","file_search_store_name"],n);const r=X(e,["config"]);return r!=null&&A8e(r,t),t}function l1t(e){const t={},n=X(e,["sdkHttpResponse"]);return n!=null&&ee(t,["sdkHttpResponse"],n),t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const c1t="Content-Type",u1t="X-Server-Timeout",d1t="User-Agent",xee="x-goog-api-client",f1t="1.31.0",p1t=`google-genai-sdk/${f1t}`,h1t="v1beta1",m1t="v1beta",a1e=/^\s*data: (.*)(?:\n\n|\r\r|\r\n\r\n)/;class g1t{constructor(t){var n,r;this.clientOptions=Object.assign(Object.assign({},t),{project:t.project,location:t.location,apiKey:t.apiKey,vertexai:t.vertexai});const o={};this.clientOptions.vertexai?(o.apiVersion=(n=this.clientOptions.apiVersion)!==null&&n!==void 0?n:h1t,o.baseUrl=this.baseUrlFromProjectLocation(),this.normalizeAuthParameters()):(o.apiVersion=(r=this.clientOptions.apiVersion)!==null&&r!==void 0?r:m1t,o.baseUrl="https://generativelanguage.googleapis.com/"),o.headers=this.getDefaultHeaders(),this.clientOptions.httpOptions=o,t.httpOptions&&(this.clientOptions.httpOptions=this.patchHttpOptions(o,t.httpOptions))}baseUrlFromProjectLocation(){return this.clientOptions.project&&this.clientOptions.location&&this.clientOptions.location!=="global"?`https://${this.clientOptions.location}-aiplatform.googleapis.com/`:"https://aiplatform.googleapis.com/"}normalizeAuthParameters(){if(this.clientOptions.project&&this.clientOptions.location){this.clientOptions.apiKey=void 0;return}this.clientOptions.project=void 0,this.clientOptions.location=void 0}isVertexAI(){var t;return(t=this.clientOptions.vertexai)!==null&&t!==void 0?t:!1}getProject(){return this.clientOptions.project}getLocation(){return this.clientOptions.location}getApiVersion(){if(this.clientOptions.httpOptions&&this.clientOptions.httpOptions.apiVersion!==void 0)return this.clientOptions.httpOptions.apiVersion;throw new Error("API version is not set.")}getBaseUrl(){if(this.clientOptions.httpOptions&&this.clientOptions.httpOptions.baseUrl!==void 0)return this.clientOptions.httpOptions.baseUrl;throw new Error("Base URL is not set.")}getRequestUrl(){return this.getRequestUrlInternal(this.clientOptions.httpOptions)}getHeaders(){if(this.clientOptions.httpOptions&&this.clientOptions.httpOptions.headers!==void 0)return this.clientOptions.httpOptions.headers;throw new Error("Headers are not set.")}getRequestUrlInternal(t){if(!t||t.baseUrl===void 0||t.apiVersion===void 0)throw new Error("HTTP options are not correctly set.");const r=[t.baseUrl.endsWith("/")?t.baseUrl.slice(0,-1):t.baseUrl];return t.apiVersion&&t.apiVersion!==""&&r.push(t.apiVersion),r.join("/")}getBaseResourcePath(){return`projects/${this.clientOptions.project}/locations/${this.clientOptions.location}`}getApiKey(){return this.clientOptions.apiKey}getWebsocketBaseUrl(){const t=this.getBaseUrl(),n=new URL(t);return n.protocol=n.protocol=="http:"?"ws":"wss",n.toString()}setBaseUrl(t){if(this.clientOptions.httpOptions)this.clientOptions.httpOptions.baseUrl=t;else throw new Error("HTTP options are not correctly set.")}constructUrl(t,n,r){const o=[this.getRequestUrlInternal(n)];return r&&o.push(this.getBaseResourcePath()),t!==""&&o.push(t),new URL(`${o.join("/")}`)}shouldPrependVertexProjectPath(t){return!(this.clientOptions.apiKey||!this.clientOptions.vertexai||t.path.startsWith("projects/")||t.httpMethod==="GET"&&t.path.startsWith("publishers/google/models"))}async request(t){let n=this.clientOptions.httpOptions;t.httpOptions&&(n=this.patchHttpOptions(this.clientOptions.httpOptions,t.httpOptions));const r=this.shouldPrependVertexProjectPath(t),o=this.constructUrl(t.path,n,r);if(t.queryParams)for(const[a,l]of Object.entries(t.queryParams))o.searchParams.append(a,String(l));let i={};if(t.httpMethod==="GET"){if(t.body&&t.body!=="{}")throw new Error("Request body should be empty for GET request, but got non empty request body")}else i.body=t.body;return i=await this.includeExtraHttpOptionsToRequestInit(i,n,o.toString(),t.abortSignal),this.unaryApiCall(o,i,t.httpMethod)}patchHttpOptions(t,n){const r=JSON.parse(JSON.stringify(t));for(const[o,i]of Object.entries(n))typeof i=="object"?r[o]=Object.assign(Object.assign({},r[o]),i):i!==void 0&&(r[o]=i);return r}async requestStream(t){let n=this.clientOptions.httpOptions;t.httpOptions&&(n=this.patchHttpOptions(this.clientOptions.httpOptions,t.httpOptions));const r=this.shouldPrependVertexProjectPath(t),o=this.constructUrl(t.path,n,r);(!o.searchParams.has("alt")||o.searchParams.get("alt")!=="sse")&&o.searchParams.set("alt","sse");let i={};return i.body=t.body,i=await this.includeExtraHttpOptionsToRequestInit(i,n,o.toString(),t.abortSignal),this.streamApiCall(o,i,t.httpMethod)}async includeExtraHttpOptionsToRequestInit(t,n,r,o){if(n&&n.timeout||o){const i=new AbortController,a=i.signal;if(n.timeout&&(n==null?void 0:n.timeout)>0){const l=setTimeout(()=>i.abort(),n.timeout);l&&typeof l.unref=="function"&&l.unref()}o&&o.addEventListener("abort",()=>{i.abort()}),t.signal=a}return n&&n.extraBody!==null&&y1t(t,n.extraBody),t.headers=await this.getHeadersInternal(n,r),t}async unaryApiCall(t,n,r){return this.apiCall(t.toString(),Object.assign(Object.assign({},n),{method:r})).then(async o=>(await s1e(o),new mee(o))).catch(o=>{throw o instanceof Error?o:new Error(JSON.stringify(o))})}async streamApiCall(t,n,r){return this.apiCall(t.toString(),Object.assign(Object.assign({},n),{method:r})).then(async o=>(await s1e(o),this.processStreamResponse(o))).catch(o=>{throw o instanceof Error?o:new Error(JSON.stringify(o))})}processStreamResponse(t){var n;return v5(this,arguments,function*(){const o=(n=t==null?void 0:t.body)===null||n===void 0?void 0:n.getReader(),i=new TextDecoder("utf-8");if(!o)throw new Error("Response body is empty");try{let a="";for(;;){const{done:l,value:c}=yield Tl(o.read());if(l){if(a.trim().length>0)throw new Error("Incomplete JSON segment at the end");break}const u=i.decode(c,{stream:!0});try{const f=JSON.parse(u);if("error"in f){const h=JSON.parse(JSON.stringify(f.error)),m=h.status,g=h.code,b=`got status: ${m}. ${JSON.stringify(f)}`;if(g>=400&&g<600)throw new G9({message:b,status:g})}}catch(f){if(f.name==="ApiError")throw f}a+=u;let d=a.match(a1e);for(;d;){const f=d[1];try{const h=new Response(f,{headers:t==null?void 0:t.headers,status:t==null?void 0:t.status,statusText:t==null?void 0:t.statusText});yield yield Tl(new mee(h)),a=a.slice(d[0].length),d=a.match(a1e)}catch(h){throw new Error(`exception parsing stream chunk ${f}. ${h}`)}}}}finally{o.releaseLock()}})}async apiCall(t,n){return fetch(t,n).catch(r=>{throw new Error(`exception ${r} sending request`)})}getDefaultHeaders(){const t={},n=p1t+" "+this.clientOptions.userAgentExtra;return t[d1t]=n,t[xee]=n,t[c1t]="application/json",t}async getHeadersInternal(t,n){const r=new Headers;if(t&&t.headers){for(const[o,i]of Object.entries(t.headers))r.append(o,i);t.timeout&&t.timeout>0&&r.append(u1t,String(Math.ceil(t.timeout/1e3)))}return await this.clientOptions.auth.addAuthHeaders(r,n),r}getFileName(t){var n;let r="";return typeof t=="string"&&(r=t.replace(/[/\\]+$/,""),r=(n=r.split(/[/\\]/).pop())!==null&&n!==void 0?n:""),r}async uploadFile(t,n){var r;const o={};n!=null&&(o.mimeType=n.mimeType,o.name=n.name,o.displayName=n.displayName),o.name&&!o.name.startsWith("files/")&&(o.name=`files/${o.name}`);const i=this.clientOptions.uploader,a=await i.stat(t);o.sizeBytes=String(a.size);const l=(r=n==null?void 0:n.mimeType)!==null&&r!==void 0?r:a.type;if(l===void 0||l==="")throw new Error("Can not determine mimeType. Please provide mimeType in the config.");o.mimeType=l;const c={file:o},u=this.getFileName(t),d=zr("upload/v1beta/files",c._url),f=await this.fetchUploadUrl(d,o.sizeBytes,o.mimeType,u,c,n==null?void 0:n.httpOptions);return i.upload(t,f,this)}async uploadFileToFileSearchStore(t,n,r){var o;const i=this.clientOptions.uploader,a=await i.stat(n),l=String(a.size),c=(o=r==null?void 0:r.mimeType)!==null&&o!==void 0?o:a.type;if(c===void 0||c==="")throw new Error("Can not determine mimeType. Please provide mimeType in the config.");const u=`upload/v1beta/${t}:uploadToFileSearchStore`,d=this.getFileName(n),f={};r!=null&&A8e(r,f);const h=await this.fetchUploadUrl(u,l,c,d,f,r==null?void 0:r.httpOptions);return i.uploadToFileSearchStore(n,h,this)}async downloadFile(t){await this.clientOptions.downloader.download(t,this)}async fetchUploadUrl(t,n,r,o,i,a){var l;let c={};a?c=a:c={apiVersion:"",headers:Object.assign({"Content-Type":"application/json","X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${n}`,"X-Goog-Upload-Header-Content-Type":`${r}`},o?{"X-Goog-Upload-File-Name":o}:{})};const u=await this.request({path:t,body:JSON.stringify(i),httpMethod:"POST",httpOptions:c});if(!u||!(u!=null&&u.headers))throw new Error("Server did not return an HttpResponse or the returned HttpResponse did not have headers.");const d=(l=u==null?void 0:u.headers)===null||l===void 0?void 0:l["x-goog-upload-url"];if(d===void 0)throw new Error("Failed to get upload url. Server did not return the x-google-upload-url in the headers");return d}}async function s1e(e){var t;if(e===void 0)throw new Error("response is undefined");if(!e.ok){const n=e.status;let r;!((t=e.headers.get("content-type"))===null||t===void 0)&&t.includes("application/json")?r=await e.json():r={error:{message:await e.text(),code:e.status,status:e.statusText}};const o=JSON.stringify(r);throw n>=400&&n<600?new G9({message:o,status:n}):new Error(o)}}function y1t(e,t){if(!t||Object.keys(t).length===0)return;if(e.body instanceof Blob){console.warn("includeExtraBodyToRequestInit: extraBody provided but current request body is a Blob. extraBody will be ignored as merging is not supported for Blob bodies.");return}let n={};if(typeof e.body=="string"&&e.body.length>0)try{const i=JSON.parse(e.body);if(typeof i=="object"&&i!==null&&!Array.isArray(i))n=i;else{console.warn("includeExtraBodyToRequestInit: Original request body is valid JSON but not a non-array object. Skip applying extraBody to the request body.");return}}catch{console.warn("includeExtraBodyToRequestInit: Original request body is not valid JSON. Skip applying extraBody to the request body.");return}function r(i,a){const l=Object.assign({},i);for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const u=a[c],d=l[c];u&&typeof u=="object"&&!Array.isArray(u)&&d&&typeof d=="object"&&!Array.isArray(d)?l[c]=r(d,u):(d&&u&&typeof d!=typeof u&&console.warn(`includeExtraBodyToRequestInit:deepMerge: Type mismatch for key "${c}". Original type: ${typeof d}, New type: ${typeof u}. Overwriting.`),l[c]=u)}return l}const o=r(n,t);e.body=JSON.stringify(o)}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const b1t="mcp_used/unknown";let v1t=!1;function T8e(e){for(const t of e)if(x1t(t)||typeof t=="object"&&"inputSchema"in t)return!0;return v1t}function k8e(e){var t;const n=(t=e[xee])!==null&&t!==void 0?t:"";e[xee]=(n+` ${b1t}`).trimStart()}function x1t(e){return e!==null&&typeof e=="object"&&e instanceof Hle}function w1t(e,t=100){return v5(this,arguments,function*(){let r,o=0;for(;o0)return;const i={},a=[];for(const d of this.mcpClients)try{for(var l=!0,c=(n=void 0,d4(w1t(d))),u;u=await c.next(),t=u.done,!t;l=!0){o=u.value,l=!1;const f=o;a.push(f);const h=f.name;if(i[h])throw new Error(`Duplicate function name ${h} found in MCP tools. Please ensure function names are unique.`);i[h]=d}}catch(f){n={error:f}}finally{try{!l&&!t&&(r=c.return)&&await r.call(c)}finally{if(n)throw n.error}}this.mcpTools=a,this.functionNameToMcpClient=i}async tool(){return await this.initialize(),Q0t(this.mcpTools,this.config)}async callTool(t){await this.initialize();const n=[];for(const r of t)if(r.name in this.functionNameToMcpClient){const o=this.functionNameToMcpClient[r.name];let i;this.config.timeout&&(i={timeout:this.config.timeout});const a=await o.callTool({name:r.name,arguments:r.args},void 0,i);n.push({functionResponse:{name:r.name,response:a.isError?{error:a}:a}})}return n}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */async function S1t(e,t,n){const r=new G0t;let o;n.data instanceof Blob?o=JSON.parse(await n.data.text()):o=JSON.parse(n.data),Object.assign(r,o),t(r)}class C1t{constructor(t,n,r){this.apiClient=t,this.auth=n,this.webSocketFactory=r}async connect(t){var n,r;if(this.apiClient.isVertexAI())throw new Error("Live music is not supported for Vertex AI.");console.warn("Live music generation is experimental and may change in future versions.");const o=this.apiClient.getWebsocketBaseUrl(),i=this.apiClient.getApiVersion(),a=N1t(this.apiClient.getDefaultHeaders()),l=this.apiClient.getApiKey(),c=`${o}/ws/google.ai.generativelanguage.${i}.GenerativeService.BidiGenerateMusic?key=${l}`;let u=()=>{};const d=new Promise(S=>{u=S}),f=t.callbacks,h=function(){u({})},m=this.apiClient,g={onopen:h,onmessage:S=>{S1t(m,f.onmessage,S)},onerror:(n=f==null?void 0:f.onerror)!==null&&n!==void 0?n:function(S){},onclose:(r=f==null?void 0:f.onclose)!==null&&r!==void 0?r:function(S){}},b=this.webSocketFactory.create(c,j1t(a),g);b.connect(),await d;const x={setup:{model:Oa(this.apiClient,t.model)}};return b.send(JSON.stringify(x)),new _1t(b,this.apiClient)}}class _1t{constructor(t,n){this.conn=t,this.apiClient=n}async setWeightedPrompts(t){if(!t.weightedPrompts||Object.keys(t.weightedPrompts).length===0)throw new Error("Weighted prompts must be set and contain at least one entry.");const n=Xbt(t);this.conn.send(JSON.stringify({clientContent:n}))}async setMusicGenerationConfig(t){t.musicGenerationConfig||(t.musicGenerationConfig={});const n=Ybt(t);this.conn.send(JSON.stringify(n))}sendPlaybackControl(t){const n={playbackControl:t};this.conn.send(JSON.stringify(n))}play(){this.sendPlaybackControl(HE.PLAY)}pause(){this.sendPlaybackControl(HE.PAUSE)}stop(){this.sendPlaybackControl(HE.STOP)}resetContext(){this.sendPlaybackControl(HE.RESET_CONTEXT)}close(){this.conn.close()}}function j1t(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function N1t(e){const t=new Headers;for(const[n,r]of Object.entries(e))t.append(n,r);return t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const E1t="FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.";async function P1t(e,t,n){const r=new U0t;let o;n.data instanceof Blob?o=await n.data.text():n.data instanceof ArrayBuffer?o=new TextDecoder().decode(n.data):o=n.data;const i=JSON.parse(o);if(e.isVertexAI()){const a=Qbt(i);Object.assign(r,a)}else Object.assign(r,i);t(r)}class I1t{constructor(t,n,r){this.apiClient=t,this.auth=n,this.webSocketFactory=r,this.music=new C1t(this.apiClient,this.auth,this.webSocketFactory)}async connect(t){var n,r,o,i,a,l;if(t.config&&t.config.httpOptions)throw new Error("The Live module does not support httpOptions at request-level in LiveConnectConfig yet. Please use the client-level httpOptions configuration instead.");const c=this.apiClient.getWebsocketBaseUrl(),u=this.apiClient.getApiVersion();let d;const f=this.apiClient.getHeaders();t.config&&t.config.tools&&T8e(t.config.tools)&&k8e(f);const h=M1t(f);if(this.apiClient.isVertexAI())d=`${c}/ws/google.cloud.aiplatform.${u}.LlmBidiService/BidiGenerateContent`,await this.auth.addAuthHeaders(h,d);else{const A=this.apiClient.getApiKey();let R="BidiGenerateContent",k="key";A!=null&&A.startsWith("auth_tokens/")&&(console.warn("Warning: Ephemeral token support is experimental and may change in future versions."),u!=="v1alpha"&&console.warn("Warning: The SDK's ephemeral token support is in v1alpha only. Please use const ai = new GoogleGenAI({apiKey: token.name, httpOptions: { apiVersion: 'v1alpha' }}); before session connection."),R="BidiGenerateContentConstrained",k="access_token"),d=`${c}/ws/google.ai.generativelanguage.${u}.GenerativeService.${R}?${k}=${A}`}let m=()=>{};const g=new Promise(A=>{m=A}),b=t.callbacks,y=function(){var A;(A=b==null?void 0:b.onopen)===null||A===void 0||A.call(b),m({})},v=this.apiClient,x={onopen:y,onmessage:A=>{P1t(v,b.onmessage,A)},onerror:(n=b==null?void 0:b.onerror)!==null&&n!==void 0?n:function(A){},onclose:(r=b==null?void 0:b.onclose)!==null&&r!==void 0?r:function(A){}},S=this.webSocketFactory.create(d,k1t(h),x);S.connect(),await g;let C=Oa(this.apiClient,t.model);if(this.apiClient.isVertexAI()&&C.startsWith("publishers/")){const A=this.apiClient.getProject(),R=this.apiClient.getLocation();C=`projects/${A}/locations/${R}/`+C}let _={};this.apiClient.isVertexAI()&&((o=t.config)===null||o===void 0?void 0:o.responseModalities)===void 0&&(t.config===void 0?t.config={responseModalities:[N7.AUDIO]}:t.config.responseModalities=[N7.AUDIO]),!((i=t.config)===null||i===void 0)&&i.generationConfig&&console.warn("Setting `LiveConnectConfig.generation_config` is deprecated, please set the fields on `LiveConnectConfig` directly. This will become an error in a future version (not before Q3 2025).");const N=(l=(a=t.config)===null||a===void 0?void 0:a.tools)!==null&&l!==void 0?l:[],E=[];for(const A of N)if(this.isCallableTool(A)){const R=A;E.push(await R.tool())}else E.push(A);E.length>0&&(t.config.tools=E);const I={model:C,config:t.config,callbacks:t.callbacks};return this.apiClient.isVertexAI()?_=Kbt(this.apiClient,I):_=qbt(this.apiClient,I),delete _.config,S.send(JSON.stringify(_)),new T1t(S,this.apiClient)}isCallableTool(t){return"callTool"in t&&typeof t.callTool=="function"}}const A1t={turnComplete:!0};class T1t{constructor(t,n){this.conn=t,this.apiClient=n}tLiveClientContent(t,n){if(n.turns!==null&&n.turns!==void 0){let r=[];try{r=Sg(n.turns),t.isVertexAI()||(r=r.map(o=>W9(o)))}catch{throw new Error(`Failed to parse client content "turns", type: '${typeof n.turns}'`)}return{clientContent:{turns:r,turnComplete:n.turnComplete}}}return{clientContent:{turnComplete:n.turnComplete}}}tLiveClienttToolResponse(t,n){let r=[];if(n.functionResponses==null)throw new Error("functionResponses is required.");if(Array.isArray(n.functionResponses)?r=n.functionResponses:r=[n.functionResponses],r.length===0)throw new Error("functionResponses is required.");for(const i of r){if(typeof i!="object"||i===null||!("name"in i)||!("response"in i))throw new Error(`Could not parse function response, type '${typeof i}'.`);if(!t.isVertexAI()&&!("id"in i))throw new Error(E1t)}return{toolResponse:{functionResponses:r}}}sendClientContent(t){t=Object.assign(Object.assign({},A1t),t);const n=this.tLiveClientContent(this.apiClient,t);this.conn.send(JSON.stringify(n))}sendRealtimeInput(t){let n={};this.apiClient.isVertexAI()?n={realtimeInput:Jbt(t)}:n={realtimeInput:Zbt(t)},this.conn.send(JSON.stringify(n))}sendToolResponse(t){if(t.functionResponses==null)throw new Error("Tool response parameters are required.");const n=this.tLiveClienttToolResponse(this.apiClient,t);this.conn.send(JSON.stringify(n))}close(){this.conn.close()}}function k1t(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function M1t(e){const t=new Headers;for(const[n,r]of Object.entries(e))t.append(n,r);return t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const l1e=10;function c1e(e){var t,n,r;if(!((t=e==null?void 0:e.automaticFunctionCalling)===null||t===void 0)&&t.disable)return!0;let o=!1;for(const a of(n=e==null?void 0:e.tools)!==null&&n!==void 0?n:[])if(x5(a)){o=!0;break}if(!o)return!0;const i=(r=e==null?void 0:e.automaticFunctionCalling)===null||r===void 0?void 0:r.maximumRemoteCalls;return i&&(i<0||!Number.isInteger(i))||i==0?(console.warn("Invalid maximumRemoteCalls value provided for automatic function calling. Disabled automatic function calling. Please provide a valid integer value greater than 0. maximumRemoteCalls provided:",i),!0):!1}function x5(e){return"callTool"in e&&typeof e.callTool=="function"}function R1t(e){var t,n,r;return(r=(n=(t=e.config)===null||t===void 0?void 0:t.tools)===null||n===void 0?void 0:n.some(o=>x5(o)))!==null&&r!==void 0?r:!1}function u1e(e){var t;const n=[];return!((t=e==null?void 0:e.config)===null||t===void 0)&&t.tools&&e.config.tools.forEach((r,o)=>{if(x5(r))return;const i=r;i.functionDeclarations&&i.functionDeclarations.length>0&&n.push(o)}),n}function d1e(e){var t;return!(!((t=e==null?void 0:e.automaticFunctionCalling)===null||t===void 0)&&t.ignoreCallHistory)}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class O1t extends a1{constructor(t){super(),this.apiClient=t,this.generateContent=async n=>{var r,o,i,a,l;const c=await this.processParamsMaybeAddMcpUsage(n);if(this.maybeMoveToResponseJsonSchem(n),!R1t(n)||c1e(n.config))return await this.generateContentInternal(c);const u=u1e(n);if(u.length>0){const b=u.map(y=>`tools[${y}]`).join(", ");throw new Error(`Automatic function calling with CallableTools (or MCP objects) and basic FunctionDeclarations is not yet supported. Incompatible tools found at ${b}.`)}let d,f;const h=Sg(c.contents),m=(i=(o=(r=c.config)===null||r===void 0?void 0:r.automaticFunctionCalling)===null||o===void 0?void 0:o.maximumRemoteCalls)!==null&&i!==void 0?i:l1e;let g=0;for(;g{var r,o,i,a,l;if(this.maybeMoveToResponseJsonSchem(n),c1e(n.config)){const f=await this.processParamsMaybeAddMcpUsage(n);return await this.generateContentStreamInternal(f)}const c=u1e(n);if(c.length>0){const f=c.map(h=>`tools[${h}]`).join(", ");throw new Error(`Incompatible tools found at ${f}. Automatic function calling with CallableTools (or MCP objects) and basic FunctionDeclarations" is not yet supported.`)}const u=(i=(o=(r=n==null?void 0:n.config)===null||r===void 0?void 0:r.toolConfig)===null||o===void 0?void 0:o.functionCallingConfig)===null||i===void 0?void 0:i.streamFunctionCallArguments,d=(l=(a=n==null?void 0:n.config)===null||a===void 0?void 0:a.automaticFunctionCalling)===null||l===void 0?void 0:l.disable;if(u&&!d)throw new Error("Running in streaming mode with 'streamFunctionCallArguments' enabled, this feature is not compatible with automatic function calling (AFC). Please set 'config.automaticFunctionCalling.disable' to true to disable AFC or leave 'config.toolConfig.functionCallingConfig.streamFunctionCallArguments' to be undefined or set to false to disable streaming function call arguments feature.");return await this.processAfcStream(n)},this.generateImages=async n=>await this.generateImagesInternal(n).then(r=>{var o;let i;const a=[];if(r!=null&&r.generatedImages)for(const c of r.generatedImages)c&&(c!=null&&c.safetyAttributes)&&((o=c==null?void 0:c.safetyAttributes)===null||o===void 0?void 0:o.contentType)==="Positive Prompt"?i=c==null?void 0:c.safetyAttributes:a.push(c);let l;return i?l={generatedImages:a,positivePromptSafetyAttributes:i,sdkHttpResponse:r.sdkHttpResponse}:l={generatedImages:a,sdkHttpResponse:r.sdkHttpResponse},l}),this.list=async n=>{var r;const a={config:Object.assign(Object.assign({},{queryBase:!0}),n==null?void 0:n.config)};if(this.apiClient.isVertexAI()&&!a.config.queryBase){if(!((r=a.config)===null||r===void 0)&&r.filter)throw new Error("Filtering tuned models list for Vertex AI is not currently supported");a.config.filter="labels.tune-type:*"}return new wj(Rx.PAGED_ITEM_MODELS,l=>this.listInternal(l),await this.listInternal(a),a)},this.editImage=async n=>{const r={model:n.model,prompt:n.prompt,referenceImages:[],config:n.config};return n.referenceImages&&n.referenceImages&&(r.referenceImages=n.referenceImages.map(o=>o.toReferenceImageAPI())),await this.editImageInternal(r)},this.upscaleImage=async n=>{let r={numberOfImages:1,mode:"upscale"};n.config&&(r=Object.assign(Object.assign({},r),n.config));const o={model:n.model,image:n.image,upscaleFactor:n.upscaleFactor,config:r};return await this.upscaleImageInternal(o)},this.generateVideos=async n=>{var r,o,i,a,l,c;if((n.prompt||n.image||n.video)&&n.source)throw new Error("Source and prompt/image/video are mutually exclusive. Please only use source.");return this.apiClient.isVertexAI()||(!((r=n.video)===null||r===void 0)&&r.uri&&(!((o=n.video)===null||o===void 0)&&o.videoBytes)?n.video={uri:n.video.uri,mimeType:n.video.mimeType}:!((a=(i=n.source)===null||i===void 0?void 0:i.video)===null||a===void 0)&&a.uri&&(!((c=(l=n.source)===null||l===void 0?void 0:l.video)===null||c===void 0)&&c.videoBytes)&&(n.source.video={uri:n.source.video.uri,mimeType:n.source.video.mimeType})),await this.generateVideosInternal(n)}}maybeMoveToResponseJsonSchem(t){t.config&&t.config.responseSchema&&(t.config.responseJsonSchema||Object.keys(t.config.responseSchema).includes("$schema")&&(t.config.responseJsonSchema=t.config.responseSchema,delete t.config.responseSchema))}async processParamsMaybeAddMcpUsage(t){var n,r,o;const i=(n=t.config)===null||n===void 0?void 0:n.tools;if(!i)return t;const a=await Promise.all(i.map(async c=>x5(c)?await c.tool():c)),l={model:t.model,contents:t.contents,config:Object.assign(Object.assign({},t.config),{tools:a})};if(l.config.tools=a,t.config&&t.config.tools&&T8e(t.config.tools)){const c=(o=(r=t.config.httpOptions)===null||r===void 0?void 0:r.headers)!==null&&o!==void 0?o:{};let u=Object.assign({},c);Object.keys(u).length===0&&(u=this.apiClient.getDefaultHeaders()),k8e(u),l.config.httpOptions=Object.assign(Object.assign({},t.config.httpOptions),{headers:u})}return l}async initAfcToolsMap(t){var n,r,o;const i=new Map;for(const a of(r=(n=t.config)===null||n===void 0?void 0:n.tools)!==null&&r!==void 0?r:[])if(x5(a)){const l=a,c=await l.tool();for(const u of(o=c.functionDeclarations)!==null&&o!==void 0?o:[]){if(!u.name)throw new Error("Function declaration name is required.");if(i.has(u.name))throw new Error(`Duplicate tool declaration name: ${u.name}`);i.set(u.name,l)}}return i}async processAfcStream(t){var n,r,o;const i=(o=(r=(n=t.config)===null||n===void 0?void 0:n.automaticFunctionCalling)===null||r===void 0?void 0:r.maximumRemoteCalls)!==null&&o!==void 0?o:l1e;let a=!1,l=0;const c=await this.initAfcToolsMap(t);return(function(u,d,f){var h,m;return v5(this,arguments,function*(){for(var g,b,y,v;l0){a=!0;const A=new gT;A.candidates=[{content:{role:"user",parts:E}}],yield yield Tl(A);const R=[];R.push(...I),R.push({role:"user",parts:E});const k=Sg(f.contents).concat(R);f.contents=k}else break}})})(this,c,t)}async generateContentInternal(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=r1e(this.apiClient,t);return l=zr("{model}:generateContent",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=i1e(d),h=new gT;return Object.assign(h,f),h})}else{const u=n1e(this.apiClient,t);return l=zr("{model}:generateContent",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=o1e(d),h=new gT;return Object.assign(h,f),h})}}async generateContentStreamInternal(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=r1e(this.apiClient,t);return l=zr("{model}:streamGenerateContent?alt=sse",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.requestStream({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}),a.then(function(f){return v5(this,arguments,function*(){var h,m,g,b;try{for(var y=!0,v=d4(f),x;x=yield Tl(v.next()),h=x.done,!h;y=!0){b=x.value,y=!1;const S=b,C=i1e(yield Tl(S.json()));C.sdkHttpResponse={headers:S.headers};const _=new gT;Object.assign(_,C),yield yield Tl(_)}}catch(S){m={error:S}}finally{try{!y&&!h&&(g=v.return)&&(yield Tl(g.call(v)))}finally{if(m)throw m.error}}})})}else{const u=n1e(this.apiClient,t);return l=zr("{model}:streamGenerateContent?alt=sse",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.requestStream({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}),a.then(function(f){return v5(this,arguments,function*(){var h,m,g,b;try{for(var y=!0,v=d4(f),x;x=yield Tl(v.next()),h=x.done,!h;y=!0){b=x.value,y=!1;const S=b,C=o1e(yield Tl(S.json()));C.sdkHttpResponse={headers:S.headers};const _=new gT;Object.assign(_,C),yield yield Tl(_)}}catch(S){m={error:S}}finally{try{!y&&!h&&(g=v.return)&&(yield Tl(g.call(v)))}finally{if(m)throw m.error}}})})}}async embedContent(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=Ivt(this.apiClient,t);return l=zr("{model}:predict",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=Tvt(d),h=new Fxe;return Object.assign(h,f),h})}else{const u=Pvt(this.apiClient,t);return l=zr("{model}:batchEmbedContents",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=Avt(d),h=new Fxe;return Object.assign(h,f),h})}}async generateImagesInternal(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=Hvt(this.apiClient,t);return l=zr("{model}:predict",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=Uvt(d),h=new Bxe;return Object.assign(h,f),h})}else{const u=zvt(this.apiClient,t);return l=zr("{model}:predict",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=Vvt(d),h=new Bxe;return Object.assign(h,f),h})}}async editImageInternal(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI()){const l=_vt(this.apiClient,t);return i=zr("{model}:predict",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json().then(u=>{const d=u;return d.sdkHttpResponse={headers:c.headers},d})),o.then(c=>{const u=jvt(c),d=new M0t;return Object.assign(d,u),d})}else throw new Error("This method is only supported by the Vertex AI.")}async upscaleImageInternal(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI()){const l=Hxt(this.apiClient,t);return i=zr("{model}:predict",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json().then(u=>{const d=u;return d.sdkHttpResponse={headers:c.headers},d})),o.then(c=>{const u=Vxt(c),d=new R0t;return Object.assign(d,u),d})}else throw new Error("This method is only supported by the Vertex AI.")}async recontextImage(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI()){const l=Cxt(this.apiClient,t);return i=zr("{model}:predict",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json()),o.then(c=>{const u=_xt(c),d=new O0t;return Object.assign(d,u),d})}else throw new Error("This method is only supported by the Vertex AI.")}async segmentImage(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI()){const l=Axt(this.apiClient,t);return i=zr("{model}:predict",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json()),o.then(c=>{const u=Txt(c),d=new D0t;return Object.assign(d,u),d})}else throw new Error("This method is only supported by the Vertex AI.")}async get(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=sxt(this.apiClient,t);return l=zr("{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json()),a.then(d=>vee(d))}else{const u=axt(this.apiClient,t);return l=zr("{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),a.then(d=>bee(d))}}async listInternal(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=gxt(this.apiClient,t);return l=zr("{models_url}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=bxt(d),h=new zxe;return Object.assign(h,f),h})}else{const u=mxt(this.apiClient,t);return l=zr("{models_url}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=yxt(d),h=new zxe;return Object.assign(h,f),h})}}async update(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=Bxt(this.apiClient,t);return l=zr("{model}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"PATCH",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json()),a.then(d=>vee(d))}else{const u=Fxt(this.apiClient,t);return l=zr("{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"PATCH",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),a.then(d=>bee(d))}}async delete(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=xvt(this.apiClient,t);return l=zr("{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"DELETE",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=Svt(d),h=new Hxe;return Object.assign(h,f),h})}else{const u=vvt(this.apiClient,t);return l=zr("{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"DELETE",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=wvt(d),h=new Hxe;return Object.assign(h,f),h})}}async countTokens(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=gvt(this.apiClient,t);return l=zr("{model}:countTokens",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=bvt(d),h=new Vxe;return Object.assign(h,f),h})}else{const u=mvt(this.apiClient,t);return l=zr("{model}:countTokens",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=yvt(d),h=new Vxe;return Object.assign(h,f),h})}}async computeTokens(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI()){const l=lvt(this.apiClient,t);return i=zr("{model}:computeTokens",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json().then(u=>{const d=u;return d.sdkHttpResponse={headers:c.headers},d})),o.then(c=>{const u=cvt(c),d=new L0t;return Object.assign(d,u),d})}else throw new Error("This method is only supported by the Vertex AI.")}async generateVideosInternal(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=Xvt(this.apiClient,t);return l=zr("{model}:predictLongRunning",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json()),a.then(d=>{const f=Kvt(d),h=new E7;return Object.assign(h,f),h})}else{const u=Yvt(this.apiClient,t);return l=zr("{model}:predictLongRunning",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),a.then(d=>{const f=qvt(d),h=new E7;return Object.assign(h,f),h})}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class D1t extends a1{constructor(t){super(),this.apiClient=t}async getVideosOperation(t){const n=t.operation,r=t.config;if(n.name===void 0||n.name==="")throw new Error("Operation name is required.");if(this.apiClient.isVertexAI()){const o=n.name.split("/operations/")[0];let i;r&&"httpOptions"in r&&(i=r.httpOptions);const a=await this.fetchPredictVideosOperationInternal({operationName:n.name,resourceName:o,config:{httpOptions:i}});return n._fromAPIResponse({apiResponse:a,_isVertexAI:!0})}else{const o=await this.getVideosOperationInternal({operationName:n.name,config:r});return n._fromAPIResponse({apiResponse:o,_isVertexAI:!1})}}async get(t){const n=t.operation,r=t.config;if(n.name===void 0||n.name==="")throw new Error("Operation name is required.");if(this.apiClient.isVertexAI()){const o=n.name.split("/operations/")[0];let i;r&&"httpOptions"in r&&(i=r.httpOptions);const a=await this.fetchPredictVideosOperationInternal({operationName:n.name,resourceName:o,config:{httpOptions:i}});return n._fromAPIResponse({apiResponse:a,_isVertexAI:!0})}else{const o=await this.getVideosOperationInternal({operationName:n.name,config:r});return n._fromAPIResponse({apiResponse:o,_isVertexAI:!1})}}async getVideosOperationInternal(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=E0t(t);return l=zr("{operationName}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json()),a}else{const u=N0t(t);return l=zr("{operationName}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json()),a}}async fetchPredictVideosOperationInternal(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI()){const l=v0t(t);return i=zr("{resourceName}:fetchPredictOperation",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json()),o}else throw new Error("This method is only supported by the Vertex AI.")}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function L1t(e){const t={},n=X(e,["data"]);if(n!=null&&ee(t,["data"],n),X(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const r=X(e,["mimeType"]);return r!=null&&ee(t,["mimeType"],r),t}function $1t(e){const t={},n=X(e,["parts"]);if(n!=null){let o=n;Array.isArray(o)&&(o=o.map(i=>q1t(i))),ee(t,["parts"],o)}const r=X(e,["role"]);return r!=null&&ee(t,["role"],r),t}function F1t(e,t,n){const r={},o=X(t,["expireTime"]);n!==void 0&&o!=null&&ee(n,["expireTime"],o);const i=X(t,["newSessionExpireTime"]);n!==void 0&&i!=null&&ee(n,["newSessionExpireTime"],i);const a=X(t,["uses"]);n!==void 0&&a!=null&&ee(n,["uses"],a);const l=X(t,["liveConnectConstraints"]);n!==void 0&&l!=null&&ee(n,["bidiGenerateContentSetup"],W1t(e,l));const c=X(t,["lockAdditionalFields"]);return n!==void 0&&c!=null&&ee(n,["fieldMask"],c),r}function B1t(e,t){const n={},r=X(t,["config"]);return r!=null&&ee(n,["config"],F1t(e,r,n)),n}function z1t(e){const t={};if(X(e,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const n=X(e,["fileUri"]);n!=null&&ee(t,["fileUri"],n);const r=X(e,["mimeType"]);return r!=null&&ee(t,["mimeType"],r),t}function H1t(e){const t={},n=X(e,["id"]);n!=null&&ee(t,["id"],n);const r=X(e,["args"]);r!=null&&ee(t,["args"],r);const o=X(e,["name"]);if(o!=null&&ee(t,["name"],o),X(e,["partialArgs"])!==void 0)throw new Error("partialArgs parameter is not supported in Gemini API.");if(X(e,["willContinue"])!==void 0)throw new Error("willContinue parameter is not supported in Gemini API.");return t}function V1t(e){const t={};if(X(e,["authConfig"])!==void 0)throw new Error("authConfig parameter is not supported in Gemini API.");const n=X(e,["enableWidget"]);return n!=null&&ee(t,["enableWidget"],n),t}function U1t(e){const t={};if(X(e,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");if(X(e,["blockingConfidence"])!==void 0)throw new Error("blockingConfidence parameter is not supported in Gemini API.");const n=X(e,["timeRangeFilter"]);return n!=null&&ee(t,["timeRangeFilter"],n),t}function G1t(e,t){const n={},r=X(e,["generationConfig"]);t!==void 0&&r!=null&&ee(t,["setup","generationConfig"],r);const o=X(e,["responseModalities"]);t!==void 0&&o!=null&&ee(t,["setup","generationConfig","responseModalities"],o);const i=X(e,["temperature"]);t!==void 0&&i!=null&&ee(t,["setup","generationConfig","temperature"],i);const a=X(e,["topP"]);t!==void 0&&a!=null&&ee(t,["setup","generationConfig","topP"],a);const l=X(e,["topK"]);t!==void 0&&l!=null&&ee(t,["setup","generationConfig","topK"],l);const c=X(e,["maxOutputTokens"]);t!==void 0&&c!=null&&ee(t,["setup","generationConfig","maxOutputTokens"],c);const u=X(e,["mediaResolution"]);t!==void 0&&u!=null&&ee(t,["setup","generationConfig","mediaResolution"],u);const d=X(e,["seed"]);t!==void 0&&d!=null&&ee(t,["setup","generationConfig","seed"],d);const f=X(e,["speechConfig"]);t!==void 0&&f!=null&&ee(t,["setup","generationConfig","speechConfig"],zle(f));const h=X(e,["thinkingConfig"]);t!==void 0&&h!=null&&ee(t,["setup","generationConfig","thinkingConfig"],h);const m=X(e,["enableAffectiveDialog"]);t!==void 0&&m!=null&&ee(t,["setup","generationConfig","enableAffectiveDialog"],m);const g=X(e,["systemInstruction"]);t!==void 0&&g!=null&&ee(t,["setup","systemInstruction"],$1t(ip(g)));const b=X(e,["tools"]);if(t!==void 0&&b!=null){let N=CI(b);Array.isArray(N)&&(N=N.map(E=>Y1t(SI(E)))),ee(t,["setup","tools"],N)}const y=X(e,["sessionResumption"]);t!==void 0&&y!=null&&ee(t,["setup","sessionResumption"],K1t(y));const v=X(e,["inputAudioTranscription"]);t!==void 0&&v!=null&&ee(t,["setup","inputAudioTranscription"],v);const x=X(e,["outputAudioTranscription"]);t!==void 0&&x!=null&&ee(t,["setup","outputAudioTranscription"],x);const S=X(e,["realtimeInputConfig"]);t!==void 0&&S!=null&&ee(t,["setup","realtimeInputConfig"],S);const C=X(e,["contextWindowCompression"]);t!==void 0&&C!=null&&ee(t,["setup","contextWindowCompression"],C);const _=X(e,["proactivity"]);return t!==void 0&&_!=null&&ee(t,["setup","proactivity"],_),n}function W1t(e,t){const n={},r=X(t,["model"]);r!=null&&ee(n,["setup","model"],Oa(e,r));const o=X(t,["config"]);return o!=null&&ee(n,["config"],G1t(o,n)),n}function q1t(e){const t={},n=X(e,["mediaResolution"]);n!=null&&ee(t,["mediaResolution"],n);const r=X(e,["codeExecutionResult"]);r!=null&&ee(t,["codeExecutionResult"],r);const o=X(e,["executableCode"]);o!=null&&ee(t,["executableCode"],o);const i=X(e,["fileData"]);i!=null&&ee(t,["fileData"],z1t(i));const a=X(e,["functionCall"]);a!=null&&ee(t,["functionCall"],H1t(a));const l=X(e,["functionResponse"]);l!=null&&ee(t,["functionResponse"],l);const c=X(e,["inlineData"]);c!=null&&ee(t,["inlineData"],L1t(c));const u=X(e,["text"]);u!=null&&ee(t,["text"],u);const d=X(e,["thought"]);d!=null&&ee(t,["thought"],d);const f=X(e,["thoughtSignature"]);f!=null&&ee(t,["thoughtSignature"],f);const h=X(e,["videoMetadata"]);return h!=null&&ee(t,["videoMetadata"],h),t}function K1t(e){const t={},n=X(e,["handle"]);if(n!=null&&ee(t,["handle"],n),X(e,["transparent"])!==void 0)throw new Error("transparent parameter is not supported in Gemini API.");return t}function Y1t(e){const t={},n=X(e,["functionDeclarations"]);if(n!=null){let d=n;Array.isArray(d)&&(d=d.map(f=>f)),ee(t,["functionDeclarations"],d)}if(X(e,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const r=X(e,["googleSearchRetrieval"]);r!=null&&ee(t,["googleSearchRetrieval"],r);const o=X(e,["computerUse"]);o!=null&&ee(t,["computerUse"],o);const i=X(e,["fileSearch"]);i!=null&&ee(t,["fileSearch"],i);const a=X(e,["codeExecution"]);if(a!=null&&ee(t,["codeExecution"],a),X(e,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");const l=X(e,["googleMaps"]);l!=null&&ee(t,["googleMaps"],V1t(l));const c=X(e,["googleSearch"]);c!=null&&ee(t,["googleSearch"],U1t(c));const u=X(e,["urlContext"]);return u!=null&&ee(t,["urlContext"],u),t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function X1t(e){const t=[];for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const r=e[n];if(typeof r=="object"&&r!=null&&Object.keys(r).length>0){const o=Object.keys(r).map(i=>`${n}.${i}`);t.push(...o)}else t.push(n)}return t.join(",")}function Z1t(e,t){let n=null;const r=e.bidiGenerateContentSetup;if(typeof r=="object"&&r!==null&&"setup"in r){const i=r.setup;typeof i=="object"&&i!==null?(e.bidiGenerateContentSetup=i,n=i):delete e.bidiGenerateContentSetup}else r!==void 0&&delete e.bidiGenerateContentSetup;const o=e.fieldMask;if(n){const i=X1t(n);if(Array.isArray(t==null?void 0:t.lockAdditionalFields)&&(t==null?void 0:t.lockAdditionalFields.length)===0)i?e.fieldMask=i:delete e.fieldMask;else if(t!=null&&t.lockAdditionalFields&&t.lockAdditionalFields.length>0&&o!==null&&Array.isArray(o)&&o.length>0){const a=["temperature","topK","topP","maxOutputTokens","responseModalities","seed","speechConfig"];let l=[];o.length>0&&(l=o.map(u=>a.includes(u)?`generationConfig.${u}`:u));const c=[];i&&c.push(i),l.length>0&&c.push(...l),c.length>0?e.fieldMask=c.join(","):delete e.fieldMask}else delete e.fieldMask}else o!==null&&Array.isArray(o)&&o.length>0?e.fieldMask=o.join(","):delete e.fieldMask;return e}class J1t extends a1{constructor(t){super(),this.apiClient=t}async create(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI())throw new Error("The client.tokens.create method is only supported by the Gemini Developer API.");{const l=B1t(this.apiClient,t);i=zr("auth_tokens",l._url),a=l._query,delete l.config,delete l._url,delete l._query;const c=Z1t(l,t.config);return o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(c),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(u=>u.json()),o.then(u=>u)}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function Q1t(e,t){const n={},r=X(e,["force"]);return t!==void 0&&r!=null&&ee(t,["_query","force"],r),n}function ewt(e){const t={},n=X(e,["name"]);n!=null&&ee(t,["_url","name"],n);const r=X(e,["config"]);return r!=null&&Q1t(r,t),t}function twt(e){const t={},n=X(e,["name"]);return n!=null&&ee(t,["_url","name"],n),t}function nwt(e,t){const n={},r=X(e,["pageSize"]);t!==void 0&&r!=null&&ee(t,["_query","pageSize"],r);const o=X(e,["pageToken"]);return t!==void 0&&o!=null&&ee(t,["_query","pageToken"],o),n}function rwt(e){const t={},n=X(e,["parent"]);n!=null&&ee(t,["_url","parent"],n);const r=X(e,["config"]);return r!=null&&nwt(r,t),t}function owt(e){const t={},n=X(e,["sdkHttpResponse"]);n!=null&&ee(t,["sdkHttpResponse"],n);const r=X(e,["nextPageToken"]);r!=null&&ee(t,["nextPageToken"],r);const o=X(e,["documents"]);if(o!=null){let i=o;Array.isArray(i)&&(i=i.map(a=>a)),ee(t,["documents"],i)}return t}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class iwt extends a1{constructor(t){super(),this.apiClient=t,this.list=async n=>new wj(Rx.PAGED_ITEM_DOCUMENTS,r=>this.listInternal({parent:n.parent,config:r.config}),await this.listInternal(n),n)}async get(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const l=twt(t);return i=zr("{name}",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json()),o.then(c=>c)}}async delete(t){var n,r;let o="",i={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const a=ewt(t);o=zr("{name}",a._url),i=a._query,delete a._url,delete a._query,await this.apiClient.request({path:o,queryParams:i,body:JSON.stringify(a),httpMethod:"DELETE",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal})}}async listInternal(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const l=rwt(t);return i=zr("{parent}/documents",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json()),o.then(c=>{const u=owt(c),d=new $0t;return Object.assign(d,u),d})}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class awt extends a1{constructor(t,n=new iwt(t)){super(),this.apiClient=t,this.documents=n,this.list=async(r={})=>new wj(Rx.PAGED_ITEM_FILE_SEARCH_STORES,o=>this.listInternal(o),await this.listInternal(r),r)}async uploadToFileSearchStore(t){if(this.apiClient.isVertexAI())throw new Error("Vertex AI does not support uploading files to a file search store.");return this.apiClient.uploadFileToFileSearchStore(t.fileSearchStoreName,t.file,t.config)}async create(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const l=Xxt(t);return i=zr("fileSearchStores",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json()),o.then(c=>c)}}async get(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const l=Qxt(t);return i=zr("{name}",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json()),o.then(c=>c)}}async delete(t){var n,r;let o="",i={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const a=Jxt(t);o=zr("{name}",a._url),i=a._query,delete a._url,delete a._query,await this.apiClient.request({path:o,queryParams:i,body:JSON.stringify(a),httpMethod:"DELETE",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal})}}async listInternal(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const l=i1t(t);return i=zr("fileSearchStores",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json()),o.then(c=>{const u=a1t(c),d=new F0t;return Object.assign(d,u),d})}}async uploadToFileSearchStoreInternal(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const l=s1t(t);return i=zr("upload/v1beta/{file_search_store_name}:uploadToFileSearchStore",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json()),o.then(c=>{const u=l1t(c),d=new B0t;return Object.assign(d,u),d})}}async importFile(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const l=n1t(t);return i=zr("{file_search_store_name}:importFile",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json()),o.then(c=>{const u=t1t(c),d=new Dle;return Object.assign(d,u),d})}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */function swt(e,t){const n={},r=X(e,["name"]);return r!=null&&ee(n,["_url","name"],r),n}function lwt(e,t){const n={},r=X(e,["name"]);return r!=null&&ee(n,["_url","name"],r),n}function cwt(e,t){const n={},r=X(e,["sdkHttpResponse"]);return r!=null&&ee(n,["sdkHttpResponse"],r),n}function uwt(e,t){const n={},r=X(e,["sdkHttpResponse"]);return r!=null&&ee(n,["sdkHttpResponse"],r),n}function dwt(e,t,n){const r={};if(X(e,["validationDataset"])!==void 0)throw new Error("validationDataset parameter is not supported in Gemini API.");const o=X(e,["tunedModelDisplayName"]);if(t!==void 0&&o!=null&&ee(t,["displayName"],o),X(e,["description"])!==void 0)throw new Error("description parameter is not supported in Gemini API.");const i=X(e,["epochCount"]);t!==void 0&&i!=null&&ee(t,["tuningTask","hyperparameters","epochCount"],i);const a=X(e,["learningRateMultiplier"]);if(a!=null&&ee(r,["tuningTask","hyperparameters","learningRateMultiplier"],a),X(e,["exportLastCheckpointOnly"])!==void 0)throw new Error("exportLastCheckpointOnly parameter is not supported in Gemini API.");if(X(e,["preTunedModelCheckpointId"])!==void 0)throw new Error("preTunedModelCheckpointId parameter is not supported in Gemini API.");if(X(e,["adapterSize"])!==void 0)throw new Error("adapterSize parameter is not supported in Gemini API.");const l=X(e,["batchSize"]);t!==void 0&&l!=null&&ee(t,["tuningTask","hyperparameters","batchSize"],l);const c=X(e,["learningRate"]);if(t!==void 0&&c!=null&&ee(t,["tuningTask","hyperparameters","learningRate"],c),X(e,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");if(X(e,["beta"])!==void 0)throw new Error("beta parameter is not supported in Gemini API.");return r}function fwt(e,t,n){const r={};let o=X(n,["config","method"]);if(o===void 0&&(o="SUPERVISED_FINE_TUNING"),o==="SUPERVISED_FINE_TUNING"){const m=X(e,["validationDataset"]);t!==void 0&&m!=null&&ee(t,["supervisedTuningSpec"],f1e(m))}else if(o==="PREFERENCE_TUNING"){const m=X(e,["validationDataset"]);t!==void 0&&m!=null&&ee(t,["preferenceOptimizationSpec"],f1e(m))}const i=X(e,["tunedModelDisplayName"]);t!==void 0&&i!=null&&ee(t,["tunedModelDisplayName"],i);const a=X(e,["description"]);t!==void 0&&a!=null&&ee(t,["description"],a);let l=X(n,["config","method"]);if(l===void 0&&(l="SUPERVISED_FINE_TUNING"),l==="SUPERVISED_FINE_TUNING"){const m=X(e,["epochCount"]);t!==void 0&&m!=null&&ee(t,["supervisedTuningSpec","hyperParameters","epochCount"],m)}else if(l==="PREFERENCE_TUNING"){const m=X(e,["epochCount"]);t!==void 0&&m!=null&&ee(t,["preferenceOptimizationSpec","hyperParameters","epochCount"],m)}let c=X(n,["config","method"]);if(c===void 0&&(c="SUPERVISED_FINE_TUNING"),c==="SUPERVISED_FINE_TUNING"){const m=X(e,["learningRateMultiplier"]);t!==void 0&&m!=null&&ee(t,["supervisedTuningSpec","hyperParameters","learningRateMultiplier"],m)}else if(c==="PREFERENCE_TUNING"){const m=X(e,["learningRateMultiplier"]);t!==void 0&&m!=null&&ee(t,["preferenceOptimizationSpec","hyperParameters","learningRateMultiplier"],m)}let u=X(n,["config","method"]);if(u===void 0&&(u="SUPERVISED_FINE_TUNING"),u==="SUPERVISED_FINE_TUNING"){const m=X(e,["exportLastCheckpointOnly"]);t!==void 0&&m!=null&&ee(t,["supervisedTuningSpec","exportLastCheckpointOnly"],m)}else if(u==="PREFERENCE_TUNING"){const m=X(e,["exportLastCheckpointOnly"]);t!==void 0&&m!=null&&ee(t,["preferenceOptimizationSpec","exportLastCheckpointOnly"],m)}let d=X(n,["config","method"]);if(d===void 0&&(d="SUPERVISED_FINE_TUNING"),d==="SUPERVISED_FINE_TUNING"){const m=X(e,["adapterSize"]);t!==void 0&&m!=null&&ee(t,["supervisedTuningSpec","hyperParameters","adapterSize"],m)}else if(d==="PREFERENCE_TUNING"){const m=X(e,["adapterSize"]);t!==void 0&&m!=null&&ee(t,["preferenceOptimizationSpec","hyperParameters","adapterSize"],m)}if(X(e,["batchSize"])!==void 0)throw new Error("batchSize parameter is not supported in Vertex AI.");if(X(e,["learningRate"])!==void 0)throw new Error("learningRate parameter is not supported in Vertex AI.");const f=X(e,["labels"]);t!==void 0&&f!=null&&ee(t,["labels"],f);const h=X(e,["beta"]);return t!==void 0&&h!=null&&ee(t,["preferenceOptimizationSpec","hyperParameters","beta"],h),r}function pwt(e,t){const n={},r=X(e,["baseModel"]);r!=null&&ee(n,["baseModel"],r);const o=X(e,["preTunedModel"]);o!=null&&ee(n,["preTunedModel"],o);const i=X(e,["trainingDataset"]);i!=null&&_wt(i);const a=X(e,["config"]);return a!=null&&dwt(a,n),n}function hwt(e,t){const n={},r=X(e,["baseModel"]);r!=null&&ee(n,["baseModel"],r);const o=X(e,["preTunedModel"]);o!=null&&ee(n,["preTunedModel"],o);const i=X(e,["trainingDataset"]);i!=null&&jwt(i,n,t);const a=X(e,["config"]);return a!=null&&fwt(a,n,t),n}function mwt(e,t){const n={},r=X(e,["name"]);return r!=null&&ee(n,["_url","name"],r),n}function gwt(e,t){const n={},r=X(e,["name"]);return r!=null&&ee(n,["_url","name"],r),n}function ywt(e,t,n){const r={},o=X(e,["pageSize"]);t!==void 0&&o!=null&&ee(t,["_query","pageSize"],o);const i=X(e,["pageToken"]);t!==void 0&&i!=null&&ee(t,["_query","pageToken"],i);const a=X(e,["filter"]);return t!==void 0&&a!=null&&ee(t,["_query","filter"],a),r}function bwt(e,t,n){const r={},o=X(e,["pageSize"]);t!==void 0&&o!=null&&ee(t,["_query","pageSize"],o);const i=X(e,["pageToken"]);t!==void 0&&i!=null&&ee(t,["_query","pageToken"],i);const a=X(e,["filter"]);return t!==void 0&&a!=null&&ee(t,["_query","filter"],a),r}function vwt(e,t){const n={},r=X(e,["config"]);return r!=null&&ywt(r,n),n}function xwt(e,t){const n={},r=X(e,["config"]);return r!=null&&bwt(r,n),n}function wwt(e,t){const n={},r=X(e,["sdkHttpResponse"]);r!=null&&ee(n,["sdkHttpResponse"],r);const o=X(e,["nextPageToken"]);o!=null&&ee(n,["nextPageToken"],o);const i=X(e,["tunedModels"]);if(i!=null){let a=i;Array.isArray(a)&&(a=a.map(l=>M8e(l))),ee(n,["tuningJobs"],a)}return n}function Swt(e,t){const n={},r=X(e,["sdkHttpResponse"]);r!=null&&ee(n,["sdkHttpResponse"],r);const o=X(e,["nextPageToken"]);o!=null&&ee(n,["nextPageToken"],o);const i=X(e,["tuningJobs"]);if(i!=null){let a=i;Array.isArray(a)&&(a=a.map(l=>wee(l))),ee(n,["tuningJobs"],a)}return n}function Cwt(e,t){const n={},r=X(e,["name"]);r!=null&&ee(n,["model"],r);const o=X(e,["name"]);return o!=null&&ee(n,["endpoint"],o),n}function _wt(e,t){const n={};if(X(e,["gcsUri"])!==void 0)throw new Error("gcsUri parameter is not supported in Gemini API.");if(X(e,["vertexDatasetResource"])!==void 0)throw new Error("vertexDatasetResource parameter is not supported in Gemini API.");const r=X(e,["examples"]);if(r!=null){let o=r;Array.isArray(o)&&(o=o.map(i=>i)),ee(n,["examples","examples"],o)}return n}function jwt(e,t,n){const r={};let o=X(n,["config","method"]);if(o===void 0&&(o="SUPERVISED_FINE_TUNING"),o==="SUPERVISED_FINE_TUNING"){const a=X(e,["gcsUri"]);t!==void 0&&a!=null&&ee(t,["supervisedTuningSpec","trainingDatasetUri"],a)}else if(o==="PREFERENCE_TUNING"){const a=X(e,["gcsUri"]);t!==void 0&&a!=null&&ee(t,["preferenceOptimizationSpec","trainingDatasetUri"],a)}let i=X(n,["config","method"]);if(i===void 0&&(i="SUPERVISED_FINE_TUNING"),i==="SUPERVISED_FINE_TUNING"){const a=X(e,["vertexDatasetResource"]);t!==void 0&&a!=null&&ee(t,["supervisedTuningSpec","trainingDatasetUri"],a)}else if(i==="PREFERENCE_TUNING"){const a=X(e,["vertexDatasetResource"]);t!==void 0&&a!=null&&ee(t,["preferenceOptimizationSpec","trainingDatasetUri"],a)}if(X(e,["examples"])!==void 0)throw new Error("examples parameter is not supported in Vertex AI.");return r}function M8e(e,t){const n={},r=X(e,["sdkHttpResponse"]);r!=null&&ee(n,["sdkHttpResponse"],r);const o=X(e,["name"]);o!=null&&ee(n,["name"],o);const i=X(e,["state"]);i!=null&&ee(n,["state"],p8e(i));const a=X(e,["createTime"]);a!=null&&ee(n,["createTime"],a);const l=X(e,["tuningTask","startTime"]);l!=null&&ee(n,["startTime"],l);const c=X(e,["tuningTask","completeTime"]);c!=null&&ee(n,["endTime"],c);const u=X(e,["updateTime"]);u!=null&&ee(n,["updateTime"],u);const d=X(e,["description"]);d!=null&&ee(n,["description"],d);const f=X(e,["baseModel"]);f!=null&&ee(n,["baseModel"],f);const h=X(e,["_self"]);return h!=null&&ee(n,["tunedModel"],Cwt(h)),n}function wee(e,t){const n={},r=X(e,["sdkHttpResponse"]);r!=null&&ee(n,["sdkHttpResponse"],r);const o=X(e,["name"]);o!=null&&ee(n,["name"],o);const i=X(e,["state"]);i!=null&&ee(n,["state"],p8e(i));const a=X(e,["createTime"]);a!=null&&ee(n,["createTime"],a);const l=X(e,["startTime"]);l!=null&&ee(n,["startTime"],l);const c=X(e,["endTime"]);c!=null&&ee(n,["endTime"],c);const u=X(e,["updateTime"]);u!=null&&ee(n,["updateTime"],u);const d=X(e,["error"]);d!=null&&ee(n,["error"],d);const f=X(e,["description"]);f!=null&&ee(n,["description"],f);const h=X(e,["baseModel"]);h!=null&&ee(n,["baseModel"],h);const m=X(e,["tunedModel"]);m!=null&&ee(n,["tunedModel"],m);const g=X(e,["preTunedModel"]);g!=null&&ee(n,["preTunedModel"],g);const b=X(e,["supervisedTuningSpec"]);b!=null&&ee(n,["supervisedTuningSpec"],b);const y=X(e,["preferenceOptimizationSpec"]);y!=null&&ee(n,["preferenceOptimizationSpec"],y);const v=X(e,["tuningDataStats"]);v!=null&&ee(n,["tuningDataStats"],v);const x=X(e,["encryptionSpec"]);x!=null&&ee(n,["encryptionSpec"],x);const S=X(e,["partnerModelTuningSpec"]);S!=null&&ee(n,["partnerModelTuningSpec"],S);const C=X(e,["customBaseModel"]);C!=null&&ee(n,["customBaseModel"],C);const _=X(e,["experiment"]);_!=null&&ee(n,["experiment"],_);const N=X(e,["labels"]);N!=null&&ee(n,["labels"],N);const E=X(e,["outputUri"]);E!=null&&ee(n,["outputUri"],E);const I=X(e,["pipelineJob"]);I!=null&&ee(n,["pipelineJob"],I);const A=X(e,["serviceAccount"]);A!=null&&ee(n,["serviceAccount"],A);const R=X(e,["tunedModelDisplayName"]);R!=null&&ee(n,["tunedModelDisplayName"],R);const k=X(e,["veoTuningSpec"]);return k!=null&&ee(n,["veoTuningSpec"],k),n}function Nwt(e,t){const n={},r=X(e,["sdkHttpResponse"]);r!=null&&ee(n,["sdkHttpResponse"],r);const o=X(e,["name"]);o!=null&&ee(n,["name"],o);const i=X(e,["metadata"]);i!=null&&ee(n,["metadata"],i);const a=X(e,["done"]);a!=null&&ee(n,["done"],a);const l=X(e,["error"]);return l!=null&&ee(n,["error"],l),n}function f1e(e,t){const n={},r=X(e,["gcsUri"]);r!=null&&ee(n,["validationDatasetUri"],r);const o=X(e,["vertexDatasetResource"]);return o!=null&&ee(n,["validationDatasetUri"],o),n}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Ewt extends a1{constructor(t){super(),this.apiClient=t,this.list=async(n={})=>new wj(Rx.PAGED_ITEM_TUNING_JOBS,r=>this.listInternal(r),await this.listInternal(n),n),this.get=async n=>await this.getInternal(n),this.tune=async n=>{var r;if(this.apiClient.isVertexAI())if(n.baseModel.startsWith("projects/")){const o={tunedModelName:n.baseModel};!((r=n.config)===null||r===void 0)&&r.preTunedModelCheckpointId&&(o.checkpointId=n.config.preTunedModelCheckpointId);const i=Object.assign(Object.assign({},n),{preTunedModel:o});return i.baseModel=void 0,await this.tuneInternal(i)}else{const o=Object.assign({},n);return await this.tuneInternal(o)}else{const o=Object.assign({},n),i=await this.tuneMldevInternal(o);let a="";return i.metadata!==void 0&&i.metadata.tunedModel!==void 0?a=i.metadata.tunedModel:i.name!==void 0&&i.name.includes("/operations/")&&(a=i.name.split("/operations/")[0]),{name:a,state:hee.JOB_STATE_QUEUED}}}}async getInternal(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=gwt(t);return l=zr("{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>wee(d))}else{const u=mwt(t);return l=zr("{name}",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>M8e(d))}}async listInternal(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=xwt(t);return l=zr("tuningJobs",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=Swt(d),h=new Uxe;return Object.assign(h,f),h})}else{const u=vwt(t);return l=zr("tunedModels",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"GET",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=wwt(d),h=new Uxe;return Object.assign(h,f),h})}}async cancel(t){var n,r,o,i;let a,l="",c={};if(this.apiClient.isVertexAI()){const u=lwt(t);return l=zr("{name}:cancel",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=uwt(d),h=new Gxe;return Object.assign(h,f),h})}else{const u=swt(t);return l=zr("{name}:cancel",u._url),c=u._query,delete u._url,delete u._query,a=this.apiClient.request({path:l,queryParams:c,body:JSON.stringify(u),httpMethod:"POST",httpOptions:(o=t.config)===null||o===void 0?void 0:o.httpOptions,abortSignal:(i=t.config)===null||i===void 0?void 0:i.abortSignal}).then(d=>d.json().then(f=>{const h=f;return h.sdkHttpResponse={headers:d.headers},h})),a.then(d=>{const f=cwt(d),h=new Gxe;return Object.assign(h,f),h})}}async tuneInternal(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI()){const l=hwt(t,t);return i=zr("tuningJobs",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json().then(u=>{const d=u;return d.sdkHttpResponse={headers:c.headers},d})),o.then(c=>wee(c))}else throw new Error("This method is only supported by the Vertex AI.")}async tuneMldevInternal(t){var n,r;let o,i="",a={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const l=pwt(t);return i=zr("tunedModels",l._url),a=l._query,delete l._url,delete l._query,o=this.apiClient.request({path:i,queryParams:a,body:JSON.stringify(l),httpMethod:"POST",httpOptions:(n=t.config)===null||n===void 0?void 0:n.httpOptions,abortSignal:(r=t.config)===null||r===void 0?void 0:r.abortSignal}).then(c=>c.json().then(u=>{const d=u;return d.sdkHttpResponse={headers:c.headers},d})),o.then(c=>Nwt(c))}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Pwt{async download(t,n){throw new Error("Download to file is not supported in the browser, please use a browser compliant download like an tag.")}}const Iwt=1024*1024*8,Awt=3,Twt=1e3,kwt=2,I7="x-goog-upload-status";async function Mwt(e,t,n){var r;const o=await R8e(e,t,n),i=await(o==null?void 0:o.json());if(((r=o==null?void 0:o.headers)===null||r===void 0?void 0:r[I7])!=="final")throw new Error("Failed to upload file: Upload status is not finalized.");return i.file}async function Rwt(e,t,n){var r;const o=await R8e(e,t,n),i=await(o==null?void 0:o.json());if(((r=o==null?void 0:o.headers)===null||r===void 0?void 0:r[I7])!=="final")throw new Error("Failed to upload file: Upload status is not finalized.");const a=s8e(i),l=new Lle;return Object.assign(l,a),l}async function R8e(e,t,n){var r,o;let i=0,a=0,l=new mee(new Response),c="upload";for(i=e.size;a=i&&(c+=", finalize");let f=0,h=Twt;for(;fsetTimeout(t,e))}class Lwt{async upload(t,n,r){if(typeof t=="string")throw new Error("File path is not supported in browser uploader.");return await Mwt(t,n,r)}async uploadToFileSearchStore(t,n,r){if(typeof t=="string")throw new Error("File path is not supported in browser uploader.");return await Rwt(t,n,r)}async stat(t){if(typeof t=="string")throw new Error("File path is not supported in browser uploader.");return await Owt(t)}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class $wt{create(t,n,r){return new Fwt(t,n,r)}}class Fwt{constructor(t,n,r){this.url=t,this.headers=n,this.callbacks=r}connect(){this.ws=new WebSocket(this.url),this.ws.onopen=this.callbacks.onopen,this.ws.onerror=this.callbacks.onerror,this.ws.onclose=this.callbacks.onclose,this.ws.onmessage=this.callbacks.onmessage}send(t){if(this.ws===void 0)throw new Error("WebSocket is not connected");this.ws.send(t)}close(){if(this.ws===void 0)throw new Error("WebSocket is not connected");this.ws.close()}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const p1e="x-goog-api-key";class Bwt{constructor(t){this.apiKey=t}async addAuthHeaders(t,n){if(t.get(p1e)===null){if(this.apiKey.startsWith("auth_tokens/"))throw new Error("Ephemeral tokens are only supported by the live API.");if(!this.apiKey)throw new Error("API key is missing. Please provide a valid API key.");t.append(p1e,this.apiKey)}}}/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */const zwt="gl-node/";class vm{constructor(t){var n;if(t.apiKey==null)throw new Error("An API Key must be set when running in a browser");if(t.project||t.location)throw new Error("Vertex AI project based authentication is not supported on browser runtimes. Please do not provide a project or location.");this.vertexai=(n=t.vertexai)!==null&&n!==void 0?n:!1,this.apiKey=t.apiKey;const r=y0t(t.httpOptions,t.vertexai,void 0,void 0);r&&(t.httpOptions?t.httpOptions.baseUrl=r:t.httpOptions={baseUrl:r}),this.apiVersion=t.apiVersion,this.httpOptions=t.httpOptions;const o=new Bwt(this.apiKey);this.apiClient=new g1t({auth:o,apiVersion:this.apiVersion,apiKey:this.apiKey,vertexai:this.vertexai,httpOptions:this.httpOptions,userAgentExtra:zwt+"web",uploader:new Lwt,downloader:new Pwt}),this.models=new O1t(this.apiClient),this.live=new I1t(this.apiClient,o,new $wt),this.batches=new Wyt(this.apiClient),this.chats=new Ebt(this.models,this.apiClient),this.caches=new _bt(this.apiClient),this.files=new Lbt(this.apiClient),this.operations=new D1t(this.apiClient),this.authTokens=new J1t(this.apiClient),this.tunings=new Ewt(this.apiClient),this.fileSearchStores=new awt(this.apiClient)}}const Hwt=e=>{switch(e){case"outline":return"bg-transparent border-2 border-gray-600/80 shadow-md";case"ghost":return"bg-transparent border-none shadow-none";case"interactive":return"bg-gray-800/50 backdrop-blur-sm border border-gray-700/60 rounded-xl shadow-lg transition-all duration-300 hover:bg-gray-800/80 hover:border-cyan-500/80 hover:shadow-cyan-500/10 cursor-pointer";case"default":default:return"bg-gray-800/50 backdrop-blur-sm border border-gray-700/60 rounded-xl shadow-lg"}},Vwt=e=>{switch(e){case"sm":return"p-3";case"md":return"p-6";case"lg":return"p-8";case"none":return"p-0";default:return"p-6"}},Uwt=()=>s.jsxs("div",{className:"space-y-4 animate-pulse p-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"h-6 bg-gray-700 rounded-md w-1/3"}),s.jsx("div",{className:"h-6 bg-gray-700 rounded-full w-6"})]}),s.jsxs("div",{className:"space-y-3 pt-4",children:[s.jsx("div",{className:"h-4 bg-gray-700 rounded-md w-full"}),s.jsx("div",{className:"h-4 bg-gray-700 rounded-md w-5/6"}),s.jsx("div",{className:"h-4 bg-gray-700 rounded-md w-3/4"})]}),s.jsxs("div",{className:"space-y-3 pt-6",children:[s.jsx("div",{className:"h-4 bg-gray-700 rounded-md w-1/2"}),s.jsx("div",{className:"h-4 bg-gray-700 rounded-md w-4/6"})]})]}),Gwt=({message:e,onRetry:t})=>s.jsxs("div",{className:"flex flex-col items-center justify-center text-center p-6 bg-red-900/20 border-t border-b border-red-500/20",children:[s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-12 w-12 text-red-400 mb-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),s.jsx("h4",{className:"text-lg font-semibold text-red-200",children:"An Error Occurred"}),s.jsx("p",{className:"text-red-300 mt-1 mb-4 max-w-md",children:e}),t&&s.jsx("button",{onClick:t,className:"px-4 py-2 bg-red-500/50 hover:bg-red-500 text-white rounded-lg text-sm font-medium transition-colors",children:"Retry"})]}),Wwt=({title:e,titleTooltip:t,subtitle:n,icon:r,isCollapsible:o,isCollapsed:i,toggleCollapse:a,actions:l})=>{if(!e&&!n&&(!l||l.length===0)&&!o&&!r)return null;const c=d=>{o&&d.target.closest("button")===null&&a()},u=o?"cursor-pointer":"cursor-default";return s.jsxs("div",{className:`flex items-start justify-between ${u} ${e||n||r?"pb-4":""}`,onClick:c,children:[s.jsxs("div",{className:"flex items-center flex-1 pr-4 min-w-0",children:[r&&s.jsx("div",{className:"mr-3 flex-shrink-0",children:r}),s.jsxs("div",{className:"min-w-0",children:[e&&s.jsxs("div",{className:"flex items-center",children:[s.jsx("h3",{className:"text-xl font-semibold text-gray-100 truncate",children:e}),t&&s.jsx("span",{className:"ml-2 text-gray-500 hover:text-gray-300 cursor-help",title:t,children:s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})]}),n&&s.jsx("p",{className:"text-sm text-gray-400 mt-1 truncate",children:n})]})]}),s.jsxs("div",{className:"flex items-center space-x-2 flex-shrink-0",children:[l&&l.map(d=>s.jsx("button",{onClick:d.onClick,"aria-label":d.label,disabled:d.disabled,className:"p-1.5 text-gray-400 hover:text-white hover:bg-gray-700/50 rounded-full transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:Pe.cloneElement(d.icon,{className:"h-5 w-5"})},d.id)),o&&s.jsx("button",{onClick:d=>{d.stopPropagation(),a()},"aria-label":i?"Expand section":"Collapse section",className:"p-1.5 text-gray-400 hover:text-white hover:bg-gray-700/50 rounded-full transition-colors",children:s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:`h-5 w-5 transition-transform duration-300 ${i?"rotate-0":"rotate-180"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 15l7-7 7 7"})})})]})]})},qwt=({children:e})=>e?s.jsx("div",{className:"pt-4 border-t border-gray-700/60",children:e}):null,At=({title:e,titleTooltip:t,subtitle:n,icon:r,children:o,className:i="",style:a,variant:l="default",padding:c="md",headerActions:u,footerContent:d,isCollapsible:f=!1,defaultCollapsed:h=!1,isLoading:m=!1,errorState:g=null,onRetry:b,loadingIndicator:y,onClick:v,isMetric:x=!1})=>{const[S,C]=p.useState(f&&h),_=p.useRef(null),[N,E]=p.useState("auto"),I=p.useCallback(()=>{f&&C(O=>!O)},[f]);p.useEffect(()=>{f&&(S?E(0):requestAnimationFrame(()=>{const O=_.current;O&&E(O.scrollHeight)}))},[S,S,f,o]),p.useEffect(()=>{!f&&S&&C(!1)},[f,S]);const A=Hwt(l),k=Vwt(x&&c==="md"?"sm":c),T=` + ${A} + ${i} + overflow-hidden + `,D=()=>{if(m)return y||s.jsx(Uwt,{});if(g)return s.jsx(Gwt,{message:g,onRetry:b});const O={height:f?N:"auto"},z=(e||n||r||u)&&!x;return s.jsx("div",{style:O,className:`transition-[height] duration-500 ease-in-out overflow-hidden ${f?"relative":""}`,"aria-hidden":S,children:s.jsx("div",{ref:_,className:f?"absolute top-0 left-0 right-0":"",children:s.jsx("div",{className:z?"pt-4":"",children:o})})})};return s.jsx("div",{className:T.trim().replace(/\s+/g," "),style:a,onClick:v,children:s.jsxs("div",{className:`${k} ${x?"text-center":""}`,children:[s.jsx(Wwt,{title:e,titleTooltip:t,subtitle:n,icon:r,isCollapsible:f,isCollapsed:!!S,toggleCollapse:I,actions:u}),s.jsx("div",{className:` + ${m||g?k:""} + ${(m||g)&&!(e||n||r||u)?"p-0":""} + `,children:m||g?D():s.jsxs(s.Fragment,{children:[D(),s.jsx(qwt,{children:d})]})})]})})},Kwt=Object.freeze(Object.defineProperty({__proto__:null,default:At},Symbol.toStringTag,{value:"Module"}));var Ywt={};const SL=["Initializing Quantum Video Synthesis Engine (QVSE)...","Analyzing Semantic Intent Vectors (SIV)...","Pre-rendering Scene Graph Topology...","Executing Temporal Coherence Algorithms...","Calibrating Stylistic Neural Filters...","Optimizing Data Stream Compression (DSC)...","Finalizing Sovereign Asset Manifest (SAM)..."],Xwt=60,O8e=1,Zwt=50;class D8e{constructor(){Le(this,"projects",[]);Le(this,"latency",150);Le(this,"STORAGE_KEY","ai_ad_studio_enterprise_projects_v2");this.loadFromLocalStorage()}async simulateLatency(t=this.latency){const n=t+Math.random()*100;return new Promise(r=>setTimeout(r,n))}saveToLocalStorage(){try{localStorage.setItem(this.STORAGE_KEY,JSON.stringify(this.projects))}catch(t){console.error("CRITICAL: Failed to persist projects to local storage:",t)}}loadFromLocalStorage(){try{const t=localStorage.getItem(this.STORAGE_KEY);t?this.projects=JSON.parse(t):this.initializeDefaultData()}catch(t){console.error("CRITICAL: Failed to load projects from local storage. Starting fresh:",t),this.initializeDefaultData()}}initializeDefaultData(){const t={id:`proj_${Date.now()}`,name:"Q1 2025 Launch Campaign",clientName:"Global Dynamics Corp.",creationDate:new Date().toISOString(),lastModified:new Date().toISOString(),assets:[],aiSummary:"Initial project setup for high-impact video advertising targeting Gen Z demographics."};this.projects.push(t),this.saveToLocalStorage()}async getProjects(){return await this.simulateLatency(),JSON.parse(JSON.stringify(this.projects)).slice(0,Zwt)}async getProjectById(t){await this.simulateLatency();const n=this.projects.find(r=>r.id===t);return n?JSON.parse(JSON.stringify(n)):null}async createProject(t,n="Unassigned Client"){await this.simulateLatency();const r={id:`proj_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,name:t,clientName:n,creationDate:new Date().toISOString(),lastModified:new Date().toISOString(),assets:[],aiSummary:`New project initialized for ${t}. Awaiting director input.`};return this.projects.push(r),this.saveToLocalStorage(),{...r}}async renameProject(t,n){await this.simulateLatency();const r=this.projects.find(o=>o.id===t);return r?(r.name=n,r.lastModified=new Date().toISOString(),this.saveToLocalStorage(),{...r}):null}async deleteProject(t){await this.simulateLatency();const n=this.projects.length;return this.projects=this.projects.filter(r=>r.id!==t),this.saveToLocalStorage(),this.projects.lengtha.id===t);if(!r)throw new Error("Project not found during asset addition");const o=new Date().toISOString(),i={...n,id:`asset_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,projectId:t,creationDate:o,lastAccessed:o};return r.assets.unshift(i),r.lastModified=o,this.saveToLocalStorage(),{...i}}async deleteAsset(t,n){await this.simulateLatency();const r=this.projects.find(o=>o.id===t);if(r){const o=r.assets.length;return r.assets=r.assets.filter(i=>i.id!==n),r.lastModified=new Date().toISOString(),this.saveToLocalStorage(),r.assets.lengtho.id===t);if(r){const o=r.assets.find(i=>i.id===n);if(o)return o.isFavorite=!o.isFavorite,o.lastAccessed=new Date().toISOString(),r.lastModified=new Date().toISOString(),this.saveToLocalStorage(),{...o}}return null}async updateAssetAccessTime(t,n){await this.simulateLatency(50);const r=this.projects.find(o=>o.id===t);if(r){const o=r.assets.find(i=>i.id===n);o&&(o.lastAccessed=new Date().toISOString(),r.lastModified=new Date().toISOString(),this.saveToLocalStorage())}}}const Hv=new D8e,A7=()=>`id_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,Jwt=(e,t=2)=>{if(e===0)return"0 Bytes";const n=1024,r=t<0?0:t,o=["Bytes","KB","MB","GB","TB","PB"],i=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,i)).toFixed(r))+" "+o[i]},See=e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"})}catch{return"Invalid Timestamp"}},Qwt=e=>{switch(e){case"16:9":return"aspect-[16/9]";case"9:16":return"aspect-[9/16]";case"1:1":return"aspect-square";case"4:5":return"aspect-[4/5]";case"21:9":return"aspect-[21/9]";case"3:2":return"aspect-[3/2]";case"2:3":return"aspect-[2/3]";default:return"aspect-video"}},Vle=(e,t,n)=>{if(e==="single_prompt")return`[SINGLE_SHOT_AD] ${t}`;if(e==="storyboard_sequence"){const r=n.map((o,i)=>`Scene ${i+1} (${o.duration}s): [VISUAL_FOCUS] ${o.prompt}. [DIRECTOR_NOTES] ${o.aiDirectorNotes||"Maintain visual consistency with previous scene."}`).join(" ||| ");return`[STORYBOARD_AD] Total Scenes: ${n.length}. Sequence: ${r}`}return t},h1e={projects:[],currentProjectId:null,isLoading:!0,error:null,config:{apiKey:null,theme:"dark",autoSave:!0,aiQuotaRemaining:1e4,defaultSettings:{model:"veo-3.1-ultra-hq",aspectRatio:"16:9",duration:10,negativePrompt:"blurry, low quality, watermark, text, artifacts, noise, low frame rate",seed:-1,stylizationStrength:75,motionControl:"dynamic",fidelityLevel:"high_res",audioStyle:"cinematic_orchestral"}}},eSt=(e,t)=>{switch(t.type){case"SET_PROJECTS":const n=t.payload.length>0?t.payload[0].id:null;return{...e,projects:t.payload,currentProjectId:e.currentProjectId&&t.payload.some(i=>i.id===e.currentProjectId)?e.currentProjectId:n,isLoading:!1};case"SET_CURRENT_PROJECT":return{...e,currentProjectId:t.payload};case"ADD_PROJECT":return{...e,projects:[...e.projects,t.payload]};case"UPDATE_PROJECT":return{...e,projects:e.projects.map(i=>i.id===t.payload.id?t.payload:i)};case"REMOVE_PROJECT":const r=e.projects.filter(i=>i.id!==t.payload),o=e.currentProjectId===t.payload?r.length>0?r[0].id:null:e.currentProjectId;return{...e,projects:r,currentProjectId:o};case"ADD_ASSET":case"REMOVE_ASSET":case"UPDATE_ASSET":return{...e,projects:e.projects.map(i=>{if(i.id!==t.payload.projectId)return i;let a;return t.type==="ADD_ASSET"?a=[t.payload.asset,...i.assets]:t.type==="REMOVE_ASSET"?a=i.assets.filter(l=>l.id!==t.payload.assetId):a=i.assets.map(l=>l.id===t.payload.asset.id?t.payload.asset:l),{...i,assets:a,lastModified:new Date().toISOString()}})};case"UPDATE_CONFIG":return{...e,config:{...e.config,...t.payload}};case"SET_LOADING":return{...e,isLoading:t.payload};case"SET_ERROR":return{...e,error:t.payload,isLoading:!1};case"UPDATE_PROJECT_SUMMARY":return{...e,projects:e.projects.map(i=>i.id===t.payload.projectId?{...i,aiSummary:t.payload.summary,lastModified:new Date().toISOString()}:i)};default:return e}},L8e=({projects:e,currentProjectId:t,onSelectProject:n,onCreateProject:r,onDeleteProject:o,onRenameProject:i})=>{const[a,l]=p.useState(""),[c,u]=p.useState(""),[d,f]=p.useState(null),[h,m]=p.useState(""),g=()=>{a.trim()&&(r(a.trim(),c.trim()||"Unassigned Client"),l(""),u(""))},b=y=>{h.trim()&&d&&i(y,h.trim()),f(null),m("")};return s.jsxs("div",{className:"bg-gray-900 border-r border-gray-700 w-72 p-4 flex flex-col h-full shadow-2xl",children:[s.jsx("h3",{className:"text-2xl font-extrabold text-cyan-400 mb-4 border-b border-gray-700 pb-2",children:"Project Nexus"}),s.jsxs("div",{className:"mb-4 p-3 bg-gray-800/70 rounded-lg border border-gray-700",children:[s.jsx("h4",{className:"text-sm font-semibold text-gray-300 mb-2",children:"New Initiative"}),s.jsx("input",{type:"text",value:a,onChange:y=>l(y.target.value),onKeyPress:y=>y.key==="Enter"&&g(),placeholder:"Project Name (e.g., Q2 Campaign)",className:"w-full bg-gray-700 border border-gray-600 rounded-md p-2 text-sm text-white mb-2 focus:ring-cyan-500"}),s.jsx("input",{type:"text",value:c,onChange:y=>u(y.target.value),onKeyPress:y=>y.key==="Enter"&&g(),placeholder:"Client Name (Optional)",className:"w-full bg-gray-700 border border-gray-600 rounded-md p-2 text-sm text-white mb-2 focus:ring-cyan-500"}),s.jsx("button",{onClick:g,disabled:!a.trim(),className:"w-full bg-cyan-700 hover:bg-cyan-600 text-white p-2 rounded-md text-sm font-medium disabled:opacity-30",children:"Initiate Project"})]}),s.jsxs("h4",{className:"text-md font-semibold text-gray-300 mb-2 uppercase tracking-wider",children:["Active Projects (",e.length,")"]}),s.jsx("ul",{className:"space-y-1 overflow-y-auto flex-grow custom-scrollbar",children:e.map(y=>s.jsx("li",{children:s.jsxs("div",{className:`group flex flex-col p-2 rounded-lg cursor-pointer transition-colors ${t===y.id?"bg-cyan-700/50 text-white shadow-lg border border-cyan-500":"text-gray-300 hover:bg-gray-800/50 border border-transparent"}`,onClick:()=>n(y.id),children:[s.jsxs("div",{className:"flex items-center justify-between w-full",children:[d===y.id?s.jsx("input",{type:"text",value:h,onChange:v=>m(v.target.value),onBlur:()=>b(y.id),onKeyPress:v=>v.key==="Enter"&&b(y.id),className:"bg-gray-600 text-white w-full text-sm p-1 rounded focus:outline-none",autoFocus:!0}):s.jsx("span",{className:"truncate font-medium text-sm",children:y.name}),s.jsxs("div",{className:"flex items-center space-x-1 ml-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[s.jsx("button",{title:"Rename",onClick:v=>{v.stopPropagation(),f(y.id),m(y.name)},className:"text-gray-400 hover:text-yellow-400 text-xs p-1",children:"Edit"}),s.jsx("button",{title:"Delete",onClick:v=>{v.stopPropagation(),window.confirm(`Confirm deletion of Project: "${y.name}"?`)&&o(y.id)},className:"text-gray-400 hover:text-red-500 text-xs p-1",children:"Delete"})]})]}),s.jsxs("p",{className:"text-xs text-gray-400 mt-0.5 truncate",children:["Client: ",y.clientName]})]})},y.id))})]})},$8e=({settings:e,onSettingsChange:t,isGenerating:n,aiQuota:r})=>{const o=(a,l)=>{t({[a]:parseInt(l,10)})},i=(a,l)=>{t({[a]:l})};return s.jsx(At,{title:"AI Generation Matrix Configuration",className:"shadow-xl border-cyan-800/50",children:s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:[s.jsxs("div",{className:"col-span-2 lg:col-span-1",children:[s.jsx("label",{className:"block text-xs font-medium text-cyan-400 mb-1 uppercase",children:"AI Model Core"}),s.jsxs("select",{value:e.model,onChange:a=>i("model",a.target.value),disabled:n,className:"w-full bg-gray-700 border border-gray-600 rounded-lg p-2 text-white text-sm focus:ring-cyan-500",children:[s.jsx("option",{value:"veo-3.1-ultra-hq",children:"Veo 3.1 (Ultra HQ)"}),s.jsx("option",{value:"imagen-video-4-pro",children:"Imagen Video 4 (Pro)"}),s.jsx("option",{value:"lumiere-hd-001-enterprise",children:"Lumiere HD (Enterprise)"}),s.jsx("option",{value:"phoenix-v2-stable",children:"Phoenix v2 (Stable)"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium text-cyan-400 mb-1 uppercase",children:"Output Ratio"}),s.jsxs("select",{value:e.aspectRatio,onChange:a=>i("aspectRatio",a.target.value),disabled:n,className:"w-full bg-gray-700 border border-gray-600 rounded-lg p-2 text-white text-sm",children:[s.jsx("option",{value:"16:9",children:"16:9 (Widescreen)"}),s.jsx("option",{value:"9:16",children:"9:16 (Vertical/Mobile)"}),s.jsx("option",{value:"1:1",children:"1:1 (Square)"}),s.jsx("option",{value:"4:5",children:"4:5 (Portrait)"}),s.jsx("option",{value:"21:9",children:"21:9 (Cinematic)"}),s.jsx("option",{value:"3:2",children:"3:2 (Standard Photo)"}),s.jsx("option",{value:"2:3",children:"2:3 (Poster)"})]})]}),s.jsxs("div",{children:[s.jsxs("label",{className:"block text-xs font-medium text-cyan-400 mb-1 uppercase",children:["Duration (s): ",e.duration]}),s.jsx("input",{type:"range",min:O8e,max:30,step:"1",value:e.duration,onChange:a=>o("duration",a.target.value),disabled:n,className:"w-full h-2 bg-gray-600 rounded-lg appearance-none cursor-pointer [&::-webkit-slider-thumb]:bg-cyan-500 [&::-moz-range-thumb]:bg-cyan-500"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium text-cyan-400 mb-1 uppercase",children:"Fidelity Level"}),s.jsxs("select",{value:e.fidelityLevel,onChange:a=>i("fidelityLevel",a.target.value),disabled:n,className:"w-full bg-gray-700 border border-gray-600 rounded-lg p-2 text-white text-sm",children:[s.jsx("option",{value:"standard",children:"Standard (Fast)"}),s.jsx("option",{value:"high_res",children:"High Resolution"}),s.jsx("option",{value:"4k_preview",children:"4K Preview (High Cost)"})]})]}),s.jsxs("div",{className:"col-span-2 lg:col-span-1",children:[s.jsxs("label",{className:"block text-xs font-medium text-cyan-400 mb-1 uppercase",children:["Creativity/Adherence: ",e.stylizationStrength,"%"]}),s.jsx("input",{type:"range",min:"0",max:"100",step:"1",value:e.stylizationStrength,onChange:a=>o("stylizationStrength",a.target.value),disabled:n,className:"w-full h-2 bg-gray-600 rounded-lg appearance-none cursor-pointer [&::-webkit-slider-thumb]:bg-cyan-500 [&::-moz-range-thumb]:bg-cyan-500"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium text-cyan-400 mb-1 uppercase",children:"Motion Profile"}),s.jsxs("select",{value:e.motionControl,onChange:a=>i("motionControl",a.target.value),disabled:n,className:"w-full bg-gray-700 border border-gray-600 rounded-lg p-2 text-white text-sm",children:[s.jsx("option",{value:"dynamic",children:"Dynamic (Complex)"}),s.jsx("option",{value:"smooth",children:"Smooth (Subtle)"}),s.jsx("option",{value:"default",children:"Default"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium text-cyan-400 mb-1 uppercase",children:"Audio Track"}),s.jsxs("select",{value:e.audioStyle,onChange:a=>i("audioStyle",a.target.value),disabled:n,className:"w-full bg-gray-700 border border-gray-600 rounded-lg p-2 text-white text-sm",children:[s.jsx("option",{value:"none",children:"None (Muted)"}),s.jsx("option",{value:"cinematic_orchestral",children:"Cinematic Orchestral"}),s.jsx("option",{value:"upbeat_synthwave",children:"Upbeat Synthwave"}),s.jsx("option",{value:"corporate_minimal",children:"Corporate Minimal"})]})]}),s.jsxs("div",{className:"col-span-2 lg:col-span-1",children:[s.jsx("label",{className:"block text-xs font-medium text-cyan-400 mb-1 uppercase",children:"Seed (Deterministic)"}),s.jsxs("div",{className:"flex",children:[s.jsx("input",{type:"number",value:e.seed===-1?"":e.seed,onChange:a=>t({seed:parseInt(a.target.value,10)||-1}),placeholder:"Random (-1)",disabled:n,className:"w-full bg-gray-700 border border-gray-600 rounded-l-lg p-2 text-white text-sm"}),s.jsx("button",{onClick:()=>t({seed:-1}),title:"Use Random Seed",className:"bg-gray-600 hover:bg-gray-500 p-2 rounded-r-lg text-sm font-bold",children:"Random"})]})]}),s.jsxs("div",{className:"col-span-2 lg:col-span-1",children:[s.jsx("label",{className:"block text-xs font-medium text-gray-400 mb-1 uppercase",children:"AI Compute Quota"}),s.jsxs("div",{className:"w-full bg-gray-700 rounded-lg h-8 flex items-center",children:[s.jsx("div",{className:`h-full rounded-l-lg text-xs font-bold flex items-center px-2 transition-all duration-500 ${r>1e3?"bg-green-600":r>200?"bg-yellow-600":"bg-red-600"}`,style:{width:`${Math.min(100,r/1e4*100)}%`},children:r.toLocaleString()}),s.jsx("span",{className:"text-xs text-gray-300 px-2 flex-shrink-0",children:"/ 10,000"})]})]}),s.jsxs("div",{className:"col-span-full",children:[s.jsx("label",{className:"block text-xs font-medium text-cyan-400 mb-1 uppercase",children:"Negative Prompt (Artifact Suppression)"}),s.jsx("input",{type:"text",value:e.negativePrompt,onChange:a=>i("negativePrompt",a.target.value),placeholder:"e.g., blurry, text, watermark, ugly, low resolution",disabled:n,className:"w-full bg-gray-700 border border-gray-600 rounded-lg p-2 text-white text-sm"})]})]})})},F8e=({assets:e,onDelete:t,onToggleFavorite:n,onSelect:r})=>e.length===0?s.jsxs("div",{className:"text-center py-16 text-gray-500 border border-dashed border-gray-700 rounded-lg",children:[s.jsx("p",{className:"text-lg mb-2",children:"Asset Repository Empty"}),s.jsx("p",{children:"Generate your first video asset using the controls above to populate this library."})]}):s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-4",children:e.map(o=>s.jsxs("div",{className:"group relative aspect-video bg-gray-800 rounded-xl overflow-hidden border border-gray-700 hover:border-cyan-500 transition-all duration-200 shadow-lg",children:[s.jsx("div",{className:"w-full h-full bg-gray-900 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-gray-500",children:"Preview Unavailable"})}),s.jsxs("div",{className:"absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex flex-col justify-between p-2",children:[s.jsxs("div",{className:"flex justify-end space-x-2",children:[s.jsx("button",{title:"Favorite",onClick:()=>n(o.id),className:`text-xl ${o.isFavorite?"text-yellow-400":"text-white/70 hover:text-white"}`,children:o.isFavorite?"★":"☆"}),s.jsx("button",{title:"Delete Asset",onClick:()=>t(o.id),className:"text-white/70 hover:text-red-500",children:"Delete"})]}),s.jsxs("div",{className:"bg-black/50 p-1 rounded-md",children:[s.jsxs("p",{className:"text-xs text-white truncate font-mono",children:[o.id.substring(0,8),"..."]}),s.jsxs("p",{className:"text-[10px] text-gray-400 mt-0.5",children:["Cost: ",o.costCredits," Credits"]}),s.jsx("button",{onClick:()=>r(o),className:"mt-1 w-full text-xs bg-cyan-600/80 hover:bg-cyan-500 text-white py-1 rounded transition-colors",children:"Analyze & View"})]})]})]},o.id))}),B8e=({scenes:e,setScenes:t,isGenerating:n,onGenerateDirectorSummary:r,onScenePromptChange:o,onSceneNotesChange:i,onSceneDurationChange:a})=>{const[l,c]=p.useState(!1),u=()=>{t(m=>[...m,{id:A7(),prompt:"",aiDirectorNotes:"",duration:5}])},d=m=>{t(g=>g.filter(b=>b.id!==m))},f=p.useMemo(()=>e.reduce((m,g)=>m+g.duration,0),[e]),h=p.useCallback(async()=>{if(n)return;c(!0);const m=Vle("storyboard_sequence","",e);try{const g=await r(m);alert(`AI Director Summary Generated: +${g}`)}catch{alert("Failed to generate director summary.")}finally{c(!1)}},[n,e,r]);return s.jsxs("div",{className:"space-y-4 p-3 bg-gray-800/50 rounded-xl border border-gray-700",children:[s.jsx("h4",{className:"text-lg font-semibold text-white border-b border-gray-700 pb-2",children:"Storyboard Sequence Editor"}),s.jsx("div",{className:"space-y-4 max-h-96 overflow-y-auto custom-scrollbar pr-2",children:e.map((m,g)=>s.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-gray-700/50 rounded-lg shadow-inner border border-gray-600",children:[s.jsx("span",{className:"font-extrabold text-lg text-cyan-400 mt-2 w-6 flex-shrink-0",children:g+1}),s.jsxs("div",{className:"flex-grow space-y-2",children:[s.jsx("textarea",{value:m.prompt,onChange:b=>o(m.id,b.target.value),placeholder:`Scene ${g+1} Visual Description...`,className:"w-full h-16 bg-gray-800 border border-gray-600 rounded-lg p-2 text-white text-sm focus:ring-cyan-500",disabled:n}),s.jsx("textarea",{value:m.aiDirectorNotes,onChange:b=>i(m.id,b.target.value),placeholder:"AI Director Notes (e.g., Camera movement, lighting style, character emotion)...",className:"w-full h-12 bg-gray-800 border border-gray-600 rounded-lg p-2 text-white text-xs italic focus:ring-yellow-500",disabled:n}),s.jsxs("div",{className:"flex items-center space-x-2 pt-1",children:[s.jsx("label",{className:"text-xs text-gray-400",children:"Duration:"}),s.jsx("input",{type:"range",min:O8e,max:Xwt,value:m.duration,onChange:b=>a(m.id,parseInt(b.target.value,10)),disabled:n,className:"w-32 h-1 bg-gray-600 rounded-lg appearance-none cursor-pointer [&::-webkit-slider-thumb]:bg-cyan-500 [&::-moz-range-thumb]:bg-cyan-500"}),s.jsxs("span",{className:"text-xs text-white w-8 font-bold",children:[m.duration,"s"]})]})]}),s.jsx("button",{onClick:()=>d(m.id),disabled:n||e.length<=1,title:"Remove Scene",className:"text-gray-400 hover:text-red-500 disabled:opacity-30 mt-2 p-1",children:"X"})]},m.id))}),s.jsxs("div",{className:"flex justify-between items-center pt-3 border-t border-gray-700",children:[s.jsx("button",{onClick:u,disabled:n||e.length>=20,className:"py-2 px-4 text-sm bg-gray-600 hover:bg-gray-500 text-white rounded-lg disabled:opacity-50 flex items-center space-x-1",children:s.jsx("span",{children:"+ Add Scene Block"})}),s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("button",{onClick:h,disabled:n||l,className:"py-2 px-4 text-sm bg-yellow-700/50 hover:bg-yellow-700 text-white rounded-lg disabled:opacity-50 flex items-center space-x-1",children:l?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"animate-spin rounded-full h-3 w-3 border-b-2 border-white"}),s.jsx("span",{children:"AI Directing..."})]}):s.jsx("span",{children:"Synthesize Director Notes"})}),s.jsxs("p",{className:"text-sm text-gray-400",children:["Total Estimated Duration: ",s.jsxs("span",{className:"font-bold text-white",children:[f,"s"]})]})]})]})]})},z8e=()=>{const[e,t]=p.useState("A hyper-realistic, cinematic 15-second commercial showcasing a self-driving electric vehicle navigating a rain-slicked Tokyo street at midnight, emphasizing speed and safety."),[n,r]=p.useState("idle"),[o,i]=p.useState(null),[a,l]=p.useState(null),[c,u]=p.useState(0),[d,f]=p.useState(null),[h,m]=p.useReducer(eSt,h1e),[g,b]=p.useState(h1e.config.defaultSettings),[y,v]=p.useState("single_prompt"),[x,S]=p.useState([{id:A7(),prompt:"Extreme close-up on a single raindrop hitting a polished chrome surface.",aiDirectorNotes:"Shallow depth of field, high contrast.",duration:3},{id:A7(),prompt:"Wide shot of the vehicle accelerating smoothly away from a blurred neon sign.",aiDirectorNotes:"Smooth tracking shot, cinematic color grading.",duration:7}]),[C,_]=p.useState(null),N=n==="generating"||n==="polling",E=p.useRef(null),I=p.useMemo(()=>h.projects.find(Y=>Y.id===h.currentProjectId),[h.projects,h.currentProjectId]),A=p.useMemo(()=>(I==null?void 0:I.assets)||[],[I]);p.useEffect(()=>{Hv.getProjects().then(B=>{m({type:"SET_PROJECTS",payload:B})}).catch(B=>{m({type:"SET_ERROR",payload:"System initialization failed: Cannot load project manifest."}),console.error(B)});const Y=Ywt.REACT_APP_API_KEY||localStorage.getItem("google_genai_api_key");Y&&m({type:"UPDATE_CONFIG",payload:{apiKey:Y}})},[]),p.useEffect(()=>()=>{d&&clearInterval(d)},[d]),p.useEffect(()=>()=>{o&&o.startsWith("blob:")&&URL.revokeObjectURL(o)},[o]);const R=p.useCallback(Y=>{m({type:"UPDATE_CONFIG",payload:Y})},[]),k=()=>{var B;const Y=(B=E.current)==null?void 0:B.value;Y&&Y.length>20?(localStorage.setItem("google_genai_api_key",Y),R({apiKey:Y}),l(null),alert("API Key successfully registered. System ready for secure connection.")):l("Invalid key format detected. Key must be substantial.")},T=p.useCallback(async(Y,B)=>{try{m({type:"SET_LOADING",payload:!0});const $=await Hv.createProject(Y,B);m({type:"ADD_PROJECT",payload:$}),m({type:"SET_CURRENT_PROJECT",payload:$.id})}catch{m({type:"SET_ERROR",payload:"Failed to initiate new project."})}finally{m({type:"SET_LOADING",payload:!1})}},[]),D=p.useCallback(async Y=>{try{m({type:"SET_LOADING",payload:!0}),await Hv.deleteProject(Y),m({type:"REMOVE_PROJECT",payload:Y})}catch{m({type:"SET_ERROR",payload:"Failed to decommission project."})}finally{m({type:"SET_LOADING",payload:!1})}},[]),O=p.useCallback(async(Y,B)=>{try{const $=await Hv.renameProject(Y,B);$&&m({type:"UPDATE_PROJECT",payload:$})}catch{m({type:"SET_ERROR",payload:"Failed to rename project."})}},[]),z=p.useCallback(async Y=>{if(I)try{await Hv.deleteAsset(I.id,Y),m({type:"REMOVE_ASSET",payload:{projectId:I.id,assetId:Y}}),(C==null?void 0:C.id)===Y&&_(null)}catch{m({type:"SET_ERROR",payload:"Failed to purge asset."})}},[I,C]),F=p.useCallback(async Y=>{if(I)try{const B=await Hv.toggleFavoriteAsset(I.id,Y);B&&m({type:"UPDATE_ASSET",payload:{projectId:I.id,asset:B}})}catch{m({type:"SET_ERROR",payload:"Failed to update asset metadata."})}},[I]),U=p.useCallback(async Y=>{await Hv.updateAssetAccessTime(Y.projectId,Y.id),m({type:"UPDATE_ASSET",payload:{projectId:Y.projectId,asset:{...Y,lastAccessed:new Date().toISOString()}}}),_(Y)},[]),G=p.useCallback(async Y=>{var q,Z,J,oe,de;if(!h.config.apiKey)throw new Error("API Key missing for AI Director.");const B=new vm({apiKey:h.config.apiKey}),$=`Analyze the following video generation sequence prompt and generate a concise, high-level summary of the intended visual narrative, target emotion, and required technical execution style. + PROMPT: ${Y}`;return((de=(oe=(J=(Z=(q=(await B.models.generateContent({model:"gemini-2.5-flash",contents:[{role:"user",parts:[{text:$}]}],config:{temperature:.3}})).candidates)==null?void 0:q[0])==null?void 0:Z.content)==null?void 0:J.parts)==null?void 0:oe[0])==null?void 0:de.text)||"Summary generation failed or returned empty."},[h.config.apiKey]),W=async()=>{var $,K,q,Z;if(!h.config.apiKey){l("Authentication Failure: API Key is required for compute access."),r("error");return}if(!I){l("Project Context Missing: Select or create a project before generation."),r("error");return}if(h.config.aiQuotaRemaining<=0){l("Quota Exhausted: Compute resources are unavailable. Contact administration for quota refresh."),r("error");return}r("generating"),l(null),o&&o.startsWith("blob:")&&URL.revokeObjectURL(o),i(null),u(0),d&&clearInterval(d);const Y=Vle(y,e,x),B=y==="storyboard_sequence"?500:100;try{const J=new vm({apiKey:h.config.apiKey}),oe={model:g.model,prompt:Y,config:{numberOfVideos:1,aspectRatio:g.aspectRatio,duration:y==="single_prompt"?g.duration:void 0,fidelity:g.fidelityLevel,stylization:g.stylizationStrength/100,motionProfile:g.motionControl,audioTrack:g.audioStyle,seed:g.seed,negativePrompt:g.negativePrompt}};console.log(`Executing ${y} generation with payload:`,oe);let de=await J.models.generateVideos(oe);r("polling");const ae=window.setInterval(()=>{u(ce=>(ce+1)%SL.length)},2e3);for(f(ae);!de.done;)await new Promise(ce=>setTimeout(ce,8e3)),de=await J.operations.getVideosOperation({operation:de});if(clearInterval(ae),f(null),de.error)throw new Error(`Generation failed at backend: ${de.error.message||"Unknown Backend Error"}`);const ue=(Z=(q=(K=($=de.response)==null?void 0:$.generatedVideos)==null?void 0:K[0])==null?void 0:q.video)==null?void 0:Z.uri;if(ue){u(SL.length-1);const ce=await fetch(`${ue}&key=${h.config.apiKey}`);if(!ce.ok)throw new Error(`Download Protocol Error: Failed to retrieve asset (${ce.statusText})`);const se=await ce.blob(),me=URL.createObjectURL(se);i(me),r("done");const fe={assetType:"video",url:me,prompt:Y,settings:g,generationMode:y,storyboard:y==="storyboard_sequence"?x:void 0,isFavorite:!1,costCredits:B},te=await Hv.addAssetToProject(I.id,fe);m({type:"ADD_ASSET",payload:{projectId:I.id,asset:te}}),R({aiQuotaRemaining:Math.max(0,h.config.aiQuotaRemaining-B)})}else throw new Error("Generation Success, but Asset Manifest was empty.")}catch(J){console.error("Generation Pipeline Interrupted:",J),l(String((J==null?void 0:J.message)||"A critical error halted the generation pipeline.")),r("error"),d&&(clearInterval(d),f(null))}};return h.isLoading?s.jsx("div",{className:"h-screen w-screen flex items-center justify-center bg-gray-900",children:s.jsxs("div",{className:"text-center text-white",children:[s.jsx("div",{className:"animate-pulse text-3xl mb-2",children:"Initializing Sovereign Compute Layer..."}),s.jsx("p",{className:"text-cyan-400",children:"Establishing secure connection to GenAI Fabric."})]})}):h.config.apiKey?s.jsxs("div",{className:"flex h-screen overflow-hidden bg-gray-950 text-white",children:[s.jsx(L8e,{projects:h.projects,currentProjectId:h.currentProjectId,onSelectProject:Y=>m({type:"SET_CURRENT_PROJECT",payload:Y}),onCreateProject:T,onDeleteProject:D,onRenameProject:O}),s.jsxs("main",{className:"flex-1 p-6 space-y-6 overflow-y-auto custom-scrollbar",children:[s.jsxs("header",{className:"flex justify-between items-center pb-4 border-b border-gray-800 sticky top-0 bg-gray-950 z-10",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("h1",{className:"text-4xl font-extrabold tracking-tighter text-white",children:"AI Video Synthesis Platform"}),s.jsxs("p",{className:"text-sm text-gray-400",children:["Current Context: ",(I==null?void 0:I.name)||"System Initialization"]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("p",{className:"text-sm font-medium text-cyan-400",children:["Quota Remaining: ",h.config.aiQuotaRemaining.toLocaleString()]}),s.jsx("button",{onClick:()=>R({apiKey:null}),className:"text-xs text-red-400 hover:text-red-300 mt-1",children:"Revoke API Key"})]})]}),I?s.jsxs(s.Fragment,{children:[s.jsxs(At,{title:`Generation Module: ${I.name}`,className:"bg-gray-900/70 border-l-4 border-cyan-500 shadow-2xl",children:[s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"lg:col-span-1 space-y-4",children:[s.jsxs("div",{className:"flex bg-gray-800 rounded-lg p-1 shadow-inner",children:[s.jsx("button",{onClick:()=>v("single_prompt"),className:`flex-1 py-2 rounded-lg text-sm font-semibold transition-all ${y==="single_prompt"?"bg-cyan-600 shadow-md":"text-gray-300 hover:bg-gray-700"}`,children:"Single Prompt"}),s.jsx("button",{onClick:()=>v("storyboard_sequence"),className:`flex-1 py-2 rounded-lg text-sm font-semibold transition-all ${y==="storyboard_sequence"?"bg-cyan-600 shadow-md":"text-gray-300 hover:bg-gray-700"}`,children:"Storyboard Sequence"})]}),s.jsx($8e,{settings:g,onSettingsChange:Y=>b(B=>({...B,...Y})),isGenerating:N,aiQuota:h.config.aiQuotaRemaining})]}),s.jsx("div",{className:"lg:col-span-2 space-y-4",children:s.jsx(At,{title:y==="single_prompt"?"Primary Prompt Input (Max 500 Chars)":"Project AI Summary",className:"h-full",children:y==="single_prompt"?s.jsx("textarea",{value:e,onChange:Y=>t(Y.target.value),placeholder:"Describe the scene, style, and required action with high detail...",maxLength:500,className:"w-full h-40 bg-gray-800 border border-gray-700 rounded-lg p-3 text-white focus:ring-cyan-500 resize-none"}):s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-sm text-gray-400 italic",children:I.aiSummary||"Click 'Synthesize Director Notes' below to generate a narrative summary based on your storyboard."}),s.jsx("p",{className:"text-xs text-gray-500",children:"(This summary is stored as the project's high-level objective.)"})]})})})]}),y==="storyboard_sequence"&&s.jsx("div",{className:"mt-6",children:s.jsx(B8e,{scenes:x,setScenes:S,isGenerating:N,onGenerateDirectorSummary:G,onScenePromptChange:(Y,B)=>S($=>$.map(K=>K.id===Y?{...K,prompt:B}:K)),onSceneNotesChange:(Y,B)=>S($=>$.map(K=>K.id===Y?{...K,aiDirectorNotes:B}:K)),onSceneDurationChange:(Y,B)=>S($=>$.map(K=>K.id===Y?{...K,duration:B}:K))})}),s.jsx("div",{className:"mt-6 pt-4 border-t border-gray-800 flex justify-center",children:s.jsx("button",{onClick:W,disabled:N||y==="single_prompt"&&!e.trim()||y==="storyboard_sequence"&&x.some(Y=>!Y.prompt.trim()),className:"w-1/2 py-3 text-lg font-bold bg-green-600 hover:bg-green-500 text-white rounded-xl shadow-lg transition-all disabled:bg-gray-600 disabled:cursor-not-allowed transform hover:scale-[1.01]",children:n==="polling"?s.jsxs("div",{className:"flex items-center justify-center space-x-3",children:[s.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-white"}),s.jsxs("span",{children:["Processing... (",SL[c],")"]})]}):n==="generating"?s.jsx("span",{children:"Initiating Compute Sequence..."}):s.jsx("span",{children:"Execute Generation Run"})})}),a&&s.jsxs("div",{className:"mt-4 p-3 bg-red-900/50 border border-red-600 rounded-lg text-sm text-red-300",children:["ERROR: ",a]})]}),s.jsx(At,{title:"Real-Time Preview & Output",className:"bg-gray-900/70 border-l-4 border-gray-500 shadow-xl",children:s.jsx("div",{className:"mx-auto max-h-[60vh] w-full bg-black rounded-xl flex items-center justify-center border border-gray-700 overflow-hidden",children:n==="done"&&o?s.jsx("video",{src:o,controls:!0,autoPlay:!0,muted:!0,loop:!0,className:"w-full h-full object-contain rounded-xl"}):n==="polling"||n==="generating"?s.jsxs("div",{className:"text-center p-12",children:[s.jsxs("div",{className:"relative w-20 h-20 mx-auto mb-4",children:[s.jsx("div",{className:"absolute inset-0 border-8 border-cyan-500/20 rounded-full"}),s.jsx("div",{className:"absolute inset-2 border-8 border-t-cyan-500 border-transparent rounded-full animate-spin"})]}),s.jsx("p",{className:"text-xl font-semibold text-cyan-300",children:"Rendering Frame Sequence..."}),s.jsx("p",{className:"text-sm text-gray-400 mt-1",children:SL[c]})]}):a?s.jsx("p",{className:"text-red-400 p-8 text-center text-lg",children:"Generation Failed. Review error log above."}):s.jsx("p",{className:"text-gray-600 p-12 text-lg",children:"Output Preview Window. Awaiting first successful generation."})})}),s.jsx(At,{title:`Asset Repository (${A.length} Items)`,className:"bg-gray-900/70 border-l-4 border-yellow-500 shadow-xl",children:s.jsx(F8e,{assets:A,onDelete:z,onToggleFavorite:F,onSelect:U})})]}):s.jsx("div",{className:"flex items-center justify-center h-[70vh] bg-gray-900/50 rounded-xl border border-dashed border-gray-700",children:s.jsxs("div",{className:"text-center p-10",children:[s.jsx("p",{className:"text-2xl font-semibold text-gray-400 mb-3",children:"No Active Project Context"}),s.jsx("p",{className:"text-gray-500",children:"Use the Project Nexus sidebar to create a new campaign or select an existing one."})]})})]}),C&&s.jsx("div",{className:"fixed inset-0 bg-black/80 z-50 flex items-center justify-center backdrop-blur-sm",onClick:()=>_(null),children:s.jsxs("div",{className:"bg-gray-800 rounded-xl max-w-5xl w-[90%] md:w-[80%] p-6 space-y-6 shadow-3xl border border-cyan-600/50",onClick:Y=>Y.stopPropagation(),children:[s.jsxs("div",{className:"flex justify-between items-center border-b border-gray-700 pb-3",children:[s.jsxs("h3",{className:"text-2xl font-bold text-white",children:["Asset Manifest Viewer: ",C.id.substring(0,12)]}),s.jsx("button",{onClick:()=>_(null),className:"text-gray-400 hover:text-white text-2xl p-1",children:"×"})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-3",children:[s.jsx("div",{className:"aspect-video bg-black rounded-lg border border-gray-600 overflow-hidden",children:s.jsx("video",{src:C.url,controls:!0,autoPlay:!0,loop:!0,muted:!0,className:"w-full h-full object-contain"})}),s.jsxs("p",{className:"text-sm text-gray-400 italic",children:["Asset Type: ",C.assetType]})]}),s.jsxs("div",{className:"lg:col-span-1 text-sm space-y-3 bg-gray-700/30 p-4 rounded-lg",children:[s.jsx("h4",{className:"font-bold text-cyan-300 border-b border-gray-600 pb-1 mb-2",children:"Generation Metadata"}),s.jsxs("p",{children:[s.jsx("strong",{children:"Created:"})," ",See(C.creationDate)]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Last Accessed:"})," ",See(C.lastAccessed)]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Estimated Cost:"})," ",s.jsxs("span",{className:"text-yellow-300",children:[C.costCredits," Credits"]})]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Favorite:"})," ",C.isFavorite?"Yes":"No"]}),s.jsx("h4",{className:"font-bold text-cyan-300 border-b border-gray-600 pb-1 mt-4 mb-2",children:"Settings Snapshot"}),s.jsxs("p",{children:[s.jsx("strong",{children:"Model:"})," ",C.settings.model]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Ratio:"})," ",C.settings.aspectRatio]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Style Strength:"})," ",C.settings.stylizationStrength,"%"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Motion:"})," ",C.settings.motionControl]}),C.generationMode==="storyboard_sequence"&&C.storyboard&&s.jsxs(s.Fragment,{children:[s.jsxs("h4",{className:"font-bold text-cyan-300 border-b border-gray-600 pb-1 mt-4 mb-2",children:["Storyboard Breakdown (",C.storyboard.length," Scenes)"]}),s.jsx("div",{className:"max-h-40 overflow-y-auto space-y-1 pr-1",children:C.storyboard.map((Y,B)=>s.jsxs("p",{className:"text-xs bg-gray-800 p-1 rounded truncate",children:[B+1,". (",Y.duration,"s) ",Y.prompt.substring(0,40),"..."]},Y.id))})]})]})]}),s.jsxs("div",{className:"flex justify-end space-x-4 pt-4 border-t border-gray-700",children:[s.jsx("a",{href:C.url,download:`ad_asset_${C.id}.mp4`,className:"py-2 px-4 bg-gray-600 hover:bg-gray-500 text-white rounded-lg font-medium",children:"Download Raw Asset"}),s.jsx("button",{onClick:()=>{F(C.id),_(Y=>Y?{...Y,isFavorite:!Y.isFavorite}:null)},className:`py-2 px-4 rounded-lg font-medium transition-colors ${C.isFavorite?"bg-yellow-600 hover:bg-yellow-700":"bg-gray-500 hover:bg-gray-400"} text-white`,children:C.isFavorite?"Unmark Favorite":"Mark as Favorite"}),s.jsx("button",{onClick:()=>{window.confirm("Permanently delete this asset?")&&(z(C.id),_(null))},className:"py-2 px-4 bg-red-700 hover:bg-red-600 text-white rounded-lg font-medium",children:"Delete Asset"})]})]})})]}):s.jsx("div",{className:"h-screen w-screen flex items-center justify-center bg-gray-900",children:s.jsxs("div",{className:"max-w-lg w-full bg-gray-800 p-10 rounded-xl shadow-2xl border border-red-700/50",children:[s.jsx("h2",{className:"text-3xl font-extrabold text-red-400 mb-4",children:"ACCESS DENIED: Authentication Required"}),s.jsx("p",{className:"text-gray-300 mb-6",children:"The AI Core requires a valid API key for resource allocation and computation. Input your credentials below to proceed."}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("input",{ref:E,type:"password",placeholder:"Enter Google GenAI API Key (e.g., AIzaSy...)",className:"w-full bg-gray-700 border border-gray-600 rounded-lg p-3 text-white focus:ring-red-500 focus:border-red-500"}),a&&s.jsx("p",{className:"text-sm text-red-400",children:a}),s.jsx("button",{onClick:k,className:"w-full py-3 bg-red-700 hover:bg-red-600 text-white rounded-lg font-bold transition-colors",children:"Authorize Compute Access"})]})]})})},tSt=Object.freeze(Object.defineProperty({__proto__:null,AssetGrid:F8e,GenerationControls:$8e,MockBackendAPI:D8e,ProjectSidebar:L8e,StoryboardEditor:B8e,default:z8e,formatBytes:Jwt,formatDate:See,generateUniqueId:A7,getAspectRatioClass:Qwt,mockApi:Hv,synthesizeDirectorPrompt:Vle},Symbol.toStringTag,{value:"Module"})),vf=[];for(let e=0;e<256;++e)vf.push((e+256).toString(16).slice(1));function nSt(e,t=0){return(vf[e[t+0]]+vf[e[t+1]]+vf[e[t+2]]+vf[e[t+3]]+"-"+vf[e[t+4]]+vf[e[t+5]]+"-"+vf[e[t+6]]+vf[e[t+7]]+"-"+vf[e[t+8]]+vf[e[t+9]]+"-"+vf[e[t+10]]+vf[e[t+11]]+vf[e[t+12]]+vf[e[t+13]]+vf[e[t+14]]+vf[e[t+15]]).toLowerCase()}let jq;const rSt=new Uint8Array(16);function oSt(){if(!jq){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");jq=crypto.getRandomValues.bind(crypto)}return jq(rSt)}const iSt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),m1e={randomUUID:iSt};function aSt(e,t,n){var o;e=e||{};const r=e.random??((o=e.rng)==null?void 0:o.call(e))??oSt();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,nSt(r)}function VE(e,t,n){return m1e.randomUUID&&!e?m1e.randomUUID():aSt(e)}var ot=(e=>(e.Dashboard="dashboard",e.Transactions="transactions",e.SendMoney="send-money",e.Budgets="capital-allocation",e.FinancialGoals="strategic-goals",e.CreditHealth="credit-resonance",e.Personalization="interface-will",e.Accounts="accounts-overview",e.Investments="portfolio-overview",e.Crypto="web3-crypto",e.CryptoWeb3="web3-crypto",e.AlgoTradingLab="algo-trading-lab",e.ForexArena="forex-arena",e.CommoditiesExchange="commodities",e.RealEstateEmpire="real-estate",e.ArtCollectibles="art-collectibles",e.DerivativesDesk="derivatives",e.VentureCapital="venture-capital",e.PrivateEquity="private-equity",e.TaxOptimization="tax-optimization",e.LegacyBuilder="legacy-architect",e.SovereignWealth="sovereign-wealth-sim",e.QuantumAssets="quantum-assets",e.CitibankAccounts="citi-accounts",e.CitibankAccountProxy="citi-account-proxy",e.CitibankBillPay="citi-bill-payment",e.CitibankCrossBorder="citi-cross-border",e.CitibankPayeeManagement="citi-payee-mgmt",e.CitibankStandingInstructions="citi-standing-instructions",e.CitibankDeveloperTools="citi-dev-tools",e.CitibankEligibility="citi-eligibility-check",e.CitibankUnmaskedData="citi-secure-data-view",e.PlaidMainDashboard="plaid-overview",e.DataNetwork="plaid-overview",e.PlaidIdentity="plaid-identity-verification",e.PlaidCRAMonitoring="plaid-cra-monitoring",e.PlaidInstitutions="plaid-institutions-explorer",e.PlaidItemManagement="plaid-item-management",e.CorporateCommand="corporate-command",e.ModernTreasury="modern-treasury",e.Treasury="treasury-capital",e.CardPrograms="marqeta-cards",e.Payments="stripe-payments",e.StripeNexus="stripe-nexus",e.CounterpartyDashboard="counterparties",e.VirtualAccounts="virtual-accounts",e.CorporateActions="corporate-actions",e.CreditNoteLedger="credit-notes",e.ReconciliationHub="reconciliation-hub",e.GEINDashboard="gein-dashboard",e.CardholderManagement="cardholder-mgmt",e.VentureCapitalDeskView="vc-desk-view",e.AIAdvisor="ai-advisor",e.AIInsights="predictive-insights",e.QuantumWeaver="quantum-weaver",e.AgentMarketplace="agent-marketplace",e.AIAdStudio="ai-ad-studio",e.GlobalPositionMap="global-position-map",e.GlobalSsiHub="global-ssi-hub",e.SecurityCompliance="security-compliance",e.DeveloperHub="developer-hub",e.SchemaExplorer="iso-20022-explorer",e.ResourceGraph="resource-graph",e.TheVision="the-vision",e.ApiPlayground="api-playground",e.ComplianceOracle="compliance-oracle",e.CustomerDashboard="customer-dashboard",e.VerificationReports="verification-reports",e.FinancialReporting="financial-reporting",e.StripeNexusDashboard="stripe-nexus-admin",e.AccountDetails="account-details",e.AccountList="account-list",e.AccountStatementGrid="account-statement-grid",e.AccountsView="accounts-view",e.AccountVerificationModal="account-verification-modal",e.ACHDetailsDisplay="ach-details-display",e.AICommandLog="ai-command-log",e.AIPredictionWidget="ai-prediction-widget",e.AssetCatalog="asset-catalog",e.AutomatedSweepRules="automated-sweep-rules",e.BalanceReportChart="balance-report-chart",e.BalanceTransactionTable="balance-transaction-table",e.CardDesignVisualizer="card-design-visualizer",e.ChargeDetailModal="charge-detail-modal",e.ChargeList="charge-list",e.ConductorConfigurationView="conductor-configuration-view",e.CounterpartyDetails="counterparty-details",e.CounterpartyForm="counterparty-form",e.DisruptionIndexMeter="disruption-index-meter",e.DocumentUploader="document-uploader",e.DownloadLink="download-link",e.EarlyFraudWarningFeed="early-fraud-warning-feed",e.ElectionChoiceForm="election-choice-form",e.EventNotificationCard="event-notification-card",e.ExpectedPaymentsTable="expected-payments-table",e.ExternalAccountCard="external-account-card",e.ExternalAccountForm="external-account-form",e.ExternalAccountsTable="external-accounts-table",e.FinancialAccountCard="financial-account-card",e.IncomingPaymentDetailList="incoming-payment-detail-list",e.InvoiceFinancingRequest="invoice-financing-request",e.PaymentInitiationForm="payment-initiation-form",e.PaymentMethodDetails="payment-method-details",e.PaymentOrderForm="payment-order-form",e.PayoutsDashboard="payouts-dashboard",e.PnLChart="pnl-chart",e.RefundForm="refund-form",e.RemittanceInfoEditor="remittance-info-editor",e.ReportingView="reporting-view",e.ReportRunGenerator="report-run-generator",e.ReportStatusIndicator="report-status-indicator",e.SsiEditorForm="ssi-editor-form",e.StripeNexusView="stripe-nexus-view",e.StripeStatusBadge="stripe-status-badge",e.StructuredPurposeInput="structured-purpose-input",e.SubscriptionList="subscription-list",e.TimeSeriesChart="time-series-chart",e.TradeConfirmationModal="trade-confirmation-modal",e.TransactionFilter="transaction-filter",e.TransactionList="transaction-list",e.TreasuryTransactionList="treasury-transaction-list",e.UniversalObjectInspector="universal-object-inspector",e.VirtualAccountForm="virtual-account-form",e.VirtualAccountsTable="virtual-accounts-table",e.VoiceControl="voice-control",e.WebhookSimulator="webhook-simulator",e.TheBook="the-book",e.KnowledgeBase="knowledge-base",e.Settings="settings",e.SSO="sso",e.ConciergeService="concierge-service",e.Philanthropy="philanthropy",e.OpenBanking="open-banking",e.FinancialDemocracy="financial-democracy",e.APIStatus="api-status",e.APIIntegration="api-integration",e.APIConsole="api-console",e.SecurityCenter="security-center",e.Security="security",e.AIStrategy="ai-strategy",e.Goals="financial-goals",e.Rewards="rewards",e.CardCustomization="card-customization",e))(ot||{});const Mi=e=>"/"+e.toLowerCase().replace(/\s+/g,"-").replace(/[()&]/g,"").replace(/-+/g,"-");Mi("Dashboard"),Mi("Transactions"),Mi("Send Money"),Mi("Budgets"),Mi("Financial Goals"),Mi("Credit Health");Mi("Investments"),Mi("Crypto & Web3"),Mi("Algo-Trading Lab"),Mi("Forex Arena"),Mi("Commodities Exchange"),Mi("Real Estate Empire"),Mi("Art & Collectibles"),Mi("Derivatives Desk"),Mi("Venture Capital Desk"),Mi("Private Equity Lounge"),Mi("Tax Optimization"),Mi("Legacy Builder"),Mi("Corporate Command"),Mi("Modern Treasury"),Mi("Card Programs (Marqeta)"),Mi("Data Network (Plaid)"),Mi("Payments (Stripe)"),Mi("Single Sign-On (SSO)"),Mi("Open Banking"),Mi("API Status"),Mi("AI Financial Advisor"),Mi("Quantum Weaver AI"),Mi("Agent Marketplace"),Mi("AI Ad Studio"),Mi("Card Customization"),Mi("Financial Democracy"),Mi("Concierge Service"),Mi("Philanthropy Hub"),Mi("Sovereign Wealth Sim"),Mi("Security Center"),Mi("Personalization"),Mi("The Vision");const sSt=[{id:"1",type:"expense",category:"Dining",description:"Coffee Shop",amount:12.5,date:"2024-07-21",carbonFootprint:1.2},{id:"2",type:"income",category:"Salary",description:"Paycheck",amount:2500,date:"2024-07-20"},{id:"3",type:"expense",category:"Shopping",description:"Online Store",amount:89.99,date:"2024-07-19",carbonFootprint:8.5},{id:"4",type:"expense",category:"Utilities",description:"Electricity Bill",amount:75.3,date:"2024-07-18",carbonFootprint:15.3},{id:"5",type:"expense",category:"Transport",description:"Gas Station",amount:55,date:"2024-07-18",carbonFootprint:25.1},{id:"6",type:"income",category:"Freelance",description:"Project ABC",amount:500,date:"2024-07-17"},{id:"7",type:"expense",category:"Groceries",description:"Supermarket",amount:124.5,date:"2024-07-16",carbonFootprint:12.8},{id:"8",type:"expense",category:"Entertainment",description:"Movie Tickets",amount:30,date:"2024-07-15",carbonFootprint:3.5},{id:"9",type:"income",category:"Salary",description:"Paycheck",amount:2500,date:"2024-06-20"},{id:"10",type:"expense",category:"Rent",description:"Monthly Rent",amount:1200,date:"2024-06-01",carbonFootprint:5},{id:"11",type:"expense",category:"Shopping",description:"New Tech Gadget",amount:299.99,date:"2024-06-15",carbonFootprint:14.2},{id:"12",type:"expense",category:"Dining",description:"Fancy Dinner",amount:150,date:"2024-06-10",carbonFootprint:8.1},{id:"13",type:"income",category:"Salary",description:"Paycheck",amount:2500,date:"2024-05-20"},{id:"14",type:"expense",category:"Travel",description:"Flight Tickets",amount:450,date:"2024-05-12",carbonFootprint:200.5},{id:"15",type:"expense",category:"Rent",description:"Monthly Rent",amount:1200,date:"2024-05-01",carbonFootprint:5},{id:"16",type:"income",category:"Salary",description:"Paycheck",amount:2500,date:"2024-04-20"},{id:"17",type:"expense",category:"Rent",description:"Monthly Rent",amount:1200,date:"2024-04-01",carbonFootprint:5}],lSt=[{name:"Stocks",value:4e4,color:"#06b6d4",performanceYTD:15.2},{name:"Bonds",value:25e3,color:"#6366f1",performanceYTD:4.1},{name:"Crypto",value:15e3,color:"#f59e0b",performanceYTD:45.8},{name:"Real Estate",value:2e4,color:"#10b981",performanceYTD:8.5}],cSt=[{id:"dining",name:"Dining",limit:400,spent:280,color:"#f59e0b"},{id:"shopping",name:"Shopping",limit:600,spent:410.5,color:"#6366f1"},{id:"transport",name:"Transport",limit:200,spent:95.2,color:"#10b981"},{id:"utilities",name:"Utilities",limit:250,spent:185.7,color:"#06b6d4"}],uSt=[{id:"sub1",name:"QuantumFlix",amount:15.99,nextPayment:"2024-08-01",iconName:"video"},{id:"sub2",name:"SynthWave Music",amount:9.99,nextPayment:"2024-08-05",iconName:"music"},{id:"sub3",name:"CyberCloud Pro",amount:24.99,nextPayment:"2024-08-10",iconName:"cloud"}],dSt={score:780,change:5,rating:"Excellent"},fSt=[{id:"bill1",name:"Credit Card",amount:345.8,dueDate:"2024-08-15"},{id:"bill2",name:"Internet",amount:80,dueDate:"2024-08-20"},{id:"bill3",name:"Car Payment",amount:450,dueDate:"2024-08-25"}],pSt=[{id:"goal1",name:"Cyberpunk Vacation",target:5e3,saved:3250,iconName:"plane"},{id:"goal2",name:"New Hoverboard",target:2500,saved:800,iconName:"rocket"}],hSt=[{ticker:"QNTM",name:"Quantum Corp",price:450.75,change:12.55},{ticker:"CYBR",name:"Cyberdyne Systems",price:1024.1,change:50.12},{ticker:"NRLNK",name:"NeuroLink Inc.",price:875.3,change:-5.6}],mSt=[{id:"ctx1",cardId:"corp1",holderName:"Alex Chen",merchant:"Cloud Services Inc.",amount:199.99,status:"Approved",timestamp:"2m ago",date:new Date().toISOString()},{id:"ctx2",cardId:"corp2",holderName:"Brenda Rodriguez",merchant:"Steakhouse Prime",amount:345.5,status:"Approved",timestamp:"5m ago",date:new Date().toISOString()},{id:"ctx3",cardId:"corp4",holderName:"Diana Wells",merchant:"Office Supplies Co.",amount:89.2,status:"Pending",timestamp:"8m ago",date:new Date().toISOString()},{id:"ctx4",cardId:"corp1",holderName:"Alex Chen",merchant:"CodeEditor Pro",amount:49,status:"Approved",timestamp:"1h ago",date:new Date().toISOString()},{id:"ctx5",cardId:"corp2",holderName:"Brenda Rodriguez",merchant:"Airport Taxi",amount:75,status:"Approved",timestamp:"3h ago",date:new Date().toISOString()}],gSt=[{id:"1",message:"Your credit score has increased by 5 points!",timestamp:"2h ago",read:!1,view:ot.CreditHealth},{id:"2",message:'A large purchase of $299.99 at "New Tech Gadget" was detected.',timestamp:"1d ago",read:!1,view:ot.Transactions},{id:"3",message:"You have earned 150 reward points from your recent spending.",timestamp:"3d ago",read:!0,view:ot.Rewards},{id:"4",message:'Your "Dining" budget is at 85% capacity.',timestamp:"4d ago",read:!0,view:ot.Budgets}],ySt=[{provider:"Plaid",status:"Operational",responseTime:120},{provider:"Stripe",status:"Operational",responseTime:85},{provider:"Marqeta",status:"Operational",responseTime:150},{provider:"Modern Treasury",status:"Operational",responseTime:110},{provider:"Google Gemini",status:"Degraded Performance",responseTime:450}],bSt=[{id:"po_001",counterpartyId:"cp_1",counterpartyName:"Cloud Services Inc.",accountId:"ext_1",amount:199.99,currency:"USD",direction:"debit",status:"needs_approval",date:"2024-07-23",type:"ACH"},{id:"po_002",counterpartyId:"cp_2",counterpartyName:"Office Supplies Co.",accountId:"ext_2",amount:89.2,currency:"USD",direction:"debit",status:"approved",date:"2024-07-22",type:"ACH"}],vSt=[{id:"inv_1",invoiceNumber:"INV-2024-07-001",counterpartyName:"Client Bravo",dueDate:"2024-07-15",amount:7500,status:"overdue"},{id:"inv_2",invoiceNumber:"INV-2024-08-002",counterpartyName:"Client Charlie",dueDate:"2024-08-10",amount:12e3,status:"unpaid"},{id:"inv_3",invoiceNumber:"INV-2024-06-003",counterpartyName:"Client Delta",dueDate:"2024-06-25",amount:2500,status:"paid"}],xSt=[{id:"case_1",reason:"Transaction over $10,000",entityType:"PaymentOrder",entityId:"po_003",status:"open",openedDate:"2024-07-21"}],wSt=[{id:"anom_1",description:"Unusually Large Payment to New Counterparty",details:'A payment of $15,000 was made to "QuantumLeap Marketing", a counterparty with no prior transaction history. The amount is 5x larger than the average initial payment to a new vendor.',severity:"High",status:"New",entityType:"PaymentOrder",entityId:"po_005",entityDescription:"PO #po_005 to QuantumLeap Marketing",timestamp:"2024-07-23 10:45 AM",riskScore:85},{id:"anom_2",description:"High-Frequency Spending on Corporate Card",details:"Corporate card ending in 8431 (Alex Chen) was used 12 times in a 2-hour window. This pattern is anomalous compared to the typical usage of 2-3 transactions per day.",severity:"Medium",status:"New",entityType:"CorporateCard",entityId:"corp1",entityDescription:"Card **** 8431 (Alex Chen)",timestamp:"2024-07-23 09:30 AM",riskScore:62}],Xi=p.createContext(void 0),Ule=({children:e})=>{const[t,n]=p.useState(!0),[r,o]=p.useState(null),[i,a]=p.useState(ot.Dashboard),[l,c]=p.useState([]),[u,d]=p.useState([]),[f,h]=p.useState([]),[m,g]=p.useState({score:0,change:0,rating:"---"}),[b,y]=p.useState([]),[v,x]=p.useState([]),[S,C]=p.useState([]),[_,N]=p.useState([]),[E,I]=p.useState([]),[A,R]=p.useState([]),[k,T]=p.useState([]),[D,O]=p.useState([]),[z,F]=p.useState([]),[U,G]=p.useState([]),[W,Y]=p.useState([]),[B,$]=p.useState([]),[K,q]=p.useState(null),[Z,J]=p.useState(null),[oe]=p.useState(null),[de]=p.useState(null),[ae,ue]=p.useState(null),[ce,se]=p.useState(null),[me,fe]=p.useState(null),[te,ye]=p.useState(null),[ve,ge]=p.useState([]),[Ee,xe]=p.useState(null),[Ne,_e]=p.useState(null),[Be,Te]=p.useState([]),[Ge,Ze]=p.useState([]),[ht,Oe]=p.useState([]),[ft,Qe]=p.useState([]),[De,st]=p.useState([]),[vt,qe]=p.useState([]),[Ye,mt]=p.useState([]),[Et,vn]=p.useState([]),[gt,Fe]=p.useState([]),[$e,nt]=p.useState([]),[wt,Dt]=p.useState([]),[on,jn]=p.useState(!1),[kt,pn]=p.useState({host:"localhost",port:"5432",username:"postgres",password:"password",databaseName:"sovereign_bank",sslMode:"require",connectionStatus:"disconnected"}),[tt,jt]=p.useState({status:"idle",activeTask:null,logs:[]}),[Nn,Xt]=p.useState(!1);p.useEffect(()=>{const Lt=async()=>{const bn=()=>{console.warn("Using static fallback data for initialization."),c(sSt),d(lSt),h(cSt),g(dSt),y(fSt),x(pSt),N(hSt),R(gSt),O(bSt),F(vSt),G(xSt),Y(mSt),$(ySt),T(uSt),S.length===0&&C([])};if(!K){console.log("No Gemini API Key found. Loading fallback data."),bn(),Jt(),n(!1);return}try{const ar=new vm({apiKey:K}),Tr={type:Hn.OBJECT,properties:{transactions:{type:Hn.ARRAY,items:{type:Hn.OBJECT,properties:{id:{type:Hn.STRING},type:{type:Hn.STRING},category:{type:Hn.STRING},description:{type:Hn.STRING},amount:{type:Hn.NUMBER},date:{type:Hn.STRING},carbonFootprint:{type:Hn.NUMBER}}}},assets:{type:Hn.ARRAY,items:{type:Hn.OBJECT,properties:{name:{type:Hn.STRING},value:{type:Hn.NUMBER},color:{type:Hn.STRING},performanceYTD:{type:Hn.NUMBER}}}},budgets:{type:Hn.ARRAY,items:{type:Hn.OBJECT,properties:{id:{type:Hn.STRING},name:{type:Hn.STRING},limit:{type:Hn.NUMBER},spent:{type:Hn.NUMBER},color:{type:Hn.STRING}}}},creditScore:{type:Hn.OBJECT,properties:{score:{type:Hn.INTEGER},change:{type:Hn.INTEGER},rating:{type:Hn.STRING}}},upcomingBills:{type:Hn.ARRAY,items:{type:Hn.OBJECT,properties:{id:{type:Hn.STRING},name:{type:Hn.STRING},amount:{type:Hn.NUMBER},dueDate:{type:Hn.STRING}}}},savingsGoals:{type:Hn.ARRAY,items:{type:Hn.OBJECT,properties:{id:{type:Hn.STRING},name:{type:Hn.STRING},target:{type:Hn.NUMBER},saved:{type:Hn.NUMBER},iconName:{type:Hn.STRING}}}},marketMovers:{type:Hn.ARRAY,items:{type:Hn.OBJECT,properties:{ticker:{type:Hn.STRING},name:{type:Hn.STRING},price:{type:Hn.NUMBER},change:{type:Hn.NUMBER}}}},financialGoals:{type:Hn.ARRAY,items:{type:Hn.OBJECT,properties:{id:{type:Hn.STRING},name:{type:Hn.STRING},targetAmount:{type:Hn.NUMBER},targetDate:{type:Hn.STRING},currentAmount:{type:Hn.NUMBER},iconName:{type:Hn.STRING},startDate:{type:Hn.STRING},status:{type:Hn.STRING}}}},notifications:{type:Hn.ARRAY,items:{type:Hn.OBJECT,properties:{id:{type:Hn.STRING},message:{type:Hn.STRING},timestamp:{type:Hn.STRING},read:{type:Hn.BOOLEAN},view:{type:Hn.STRING}}}},apiStatus:{type:Hn.ARRAY,items:{type:Hn.OBJECT,properties:{provider:{type:Hn.STRING},status:{type:Hn.STRING},responseTime:{type:Hn.NUMBER}}}},paymentOrders:{type:Hn.ARRAY,items:{type:Hn.OBJECT,properties:{id:{type:Hn.STRING},counterpartyName:{type:Hn.STRING},amount:{type:Hn.NUMBER},currency:{type:Hn.STRING},direction:{type:Hn.STRING},status:{type:Hn.STRING},date:{type:Hn.STRING},type:{type:Hn.STRING}}}},invoices:{type:Hn.ARRAY,items:{type:Hn.OBJECT,properties:{id:{type:Hn.STRING},invoiceNumber:{type:Hn.STRING},counterpartyName:{type:Hn.STRING},dueDate:{type:Hn.STRING},amount:{type:Hn.NUMBER},status:{type:Hn.STRING}}}},complianceCases:{type:Hn.ARRAY,items:{type:Hn.OBJECT,properties:{id:{type:Hn.STRING},reason:{type:Hn.STRING},entityType:{type:Hn.STRING},entityId:{type:Hn.STRING},status:{type:Hn.STRING},openedDate:{type:Hn.STRING}}}},corporateTransactions:{type:Hn.ARRAY,items:{type:Hn.OBJECT,properties:{id:{type:Hn.STRING},cardId:{type:Hn.STRING},holderName:{type:Hn.STRING},merchant:{type:Hn.STRING},amount:{type:Hn.NUMBER},status:{type:Hn.STRING},timestamp:{type:Hn.STRING},date:{type:Hn.STRING}}}},subscriptions:{type:Hn.ARRAY,items:{type:Hn.OBJECT,properties:{id:{type:Hn.STRING},name:{type:Hn.STRING},amount:{type:Hn.NUMBER},nextPayment:{type:Hn.STRING},iconName:{type:Hn.STRING}}}}}},lr=await ar.models.generateContent({model:"gemini-2.5-flash",contents:`Generate a cohesive and realistic set of mock financial data for a visionary fintech user named "James B. O'Callaghan III". The data should populate a next-generation banking dashboard. It should reflect the activities of a high-net-worth, tech-savvy individual involved in personal finance, investments, and corporate treasury operations. The data must be internally consistent (e.g., transaction amounts relate to budget spending) and adhere strictly to the provided JSON schema. Generate a rich and interesting dataset including about 15 transactions over the last few months, 4 asset classes, 4 budget categories, a few financial goals, some corporate transactions, and other relevant data points to create a compelling demo.`,config:{responseMimeType:"application/json",responseSchema:Tr}}),dn=JSON.parse(lr.text);c(dn.transactions||[]),d(dn.assets||[]),h(dn.budgets||[]),g(dn.creditScore||{score:780,change:5,rating:"Excellent"}),y(dn.upcomingBills||[]),x(dn.savingsGoals||[]),C((dn.financialGoals||[]).map(gr=>({...gr,plan:null,contributions:[],recurringContributions:[],linkedGoals:[]}))),N(dn.marketMovers||[]),R(dn.notifications||[]),O(dn.paymentOrders||[]),F(dn.invoices||[]),G(dn.complianceCases||[]),Y(dn.corporateTransactions||[]),$(dn.apiStatus||[]),T(dn.subscriptions||[]),Jt()}catch(ar){console.error("Failed to generate initial mock data via AI:",ar),bn(),Jt()}finally{n(!1)}},Jt=()=>{Oe([{metricName:"OverallSecurityScore",currentValue:"0.85"}]),Qe([{id:"log-1",timestamp:new Date().toISOString(),userId:"user-1",action:"LOGIN",targetResource:"System",success:!0}]),st([]),qe([{policyId:"pol-1",policyName:"Default Privacy",scope:"Global",isActive:!0,lastReviewed:new Date().toISOString()}]),mt([{id:"key-1",keyName:"Default Key",creationDate:new Date().toISOString(),scopes:["read"]}]),vn([]),Fe([]),nt([]),ge([{ticker:"BTC",name:"Bitcoin",value:45e3,amount:1.5,color:"#F7931A"}]),Te([]),xe({balance:1.5,address:"0x123...abc"})};Lt()},[K]);const ln=p.useCallback(Lt=>{pn(Jt=>({...Jt,...Lt}))},[]),un=p.useCallback(async()=>{pn(Lt=>({...Lt,connectionStatus:"connecting"}));try{if(await new Promise(Jt=>setTimeout(Jt,2e3)),Math.random()>.1)pn(Jt=>({...Jt,connectionStatus:"connected"}));else throw new Error("Connection timeout")}catch{pn(Jt=>({...Jt,connectionStatus:"error"}))}},[]),Kt=p.useCallback(async Lt=>{jt({status:"running",activeTask:Lt,logs:[`Initializing WebDriver for task: ${Lt}...`]});const Jt=["Launching browser...","Navigating...","Injecting tokens...","Scraping data...","Standardizing format...","Closing session."];for(const bn of Jt)await new Promise(ar=>setTimeout(ar,1200)),jt(ar=>({...ar,logs:[...ar.logs,`[${new Date().toLocaleTimeString()}] ${bn}`]}));jt(bn=>({...bn,status:"completed",logs:[...bn.logs,"Task completed successfully."]})),setTimeout(()=>jt(bn=>({...bn,status:"idle",activeTask:null})),5e3)},[]),On=Lt=>c(Jt=>[Lt,...Jt]),Pr=(Lt,Jt)=>h(bn=>bn.map(ar=>ar.id===Lt?{...ar,spent:Jt}:ar)),ur=(Lt,Jt)=>h(bn=>[...bn,{id:VE(),name:Lt,limit:Jt,spent:0,color:"#3b82f6"}]),Ht=Lt=>R(Jt=>Jt.map(bn=>bn.id===Lt?{...bn,read:!0}:bn)),Tt=(Lt,Jt)=>{Xt(!0),setTimeout(()=>{I(bn=>[...bn,{id:Jt.institution.institution_id,name:Jt.institution.name,mask:"****",type:"linked"}]),Xt(!1),c(bn=>[...bn,{id:`new-${Date.now()}`,type:"expense",category:"Transfer",description:`Import from ${Jt.institution.name}`,amount:0,date:new Date().toISOString().split("T")[0]}])},3e3)},Zt=Lt=>q(Lt),Ut=(Lt,Jt)=>{ue(Lt),se(Jt)},Sn=async Lt=>{if(!K)return"AI Offline. Please configure API Key.";try{return(await new vm({apiKey:K}).models.generateContent({model:"gemini-2.5-flash",contents:Lt})).text}catch(Jt){return console.error("AI Processing Error:",Jt),"AI Processing Error."}},Mn=Lt=>{const Jt={...Lt,id:VE(),currentAmount:0,plan:null,contributions:[],recurringContributions:[],linkedGoals:[],status:"on_track"};C(bn=>[...bn,Jt])},lt=(Lt,Jt)=>C(bn=>bn.map(ar=>ar.id===Lt?{...ar,...Jt}:ar)),bt={isLoading:t,error:r,activeView:i,setActiveView:a,transactions:l,assets:u,budgets:f,creditScore:m,upcomingBills:b,savingsGoals:v,financialGoals:S,marketMovers:_,linkedAccounts:E,notifications:A,subscriptions:k,paymentOrders:D,invoices:z,complianceCases:U,corporateTransactions:W,plaidApiKey:de,plaidClientId:oe,stripeApiKey:Z,geminiApiKey:K,marqetaApiToken:ae,marqetaApiSecret:ce,modernTreasuryApiKey:me,modernTreasuryOrganizationId:te,dbConfig:kt,updateDbConfig:ln,connectDatabase:un,webDriverStatus:tt,launchWebDriver:Kt,addTransaction:On,updateBudget:Pr,addBudget:ur,markNotificationRead:Ht,setGeminiApiKey:Zt,setModernTreasuryApiKey:fe,setModernTreasuryOrganizationId:ye,setMarqetaCredentials:Ut,addFinancialGoal:Mn,generateGoalPlan:async Lt=>{const Jt=S.find(ar=>ar.id===Lt);if(!Jt||!K)return;const bn=`Based on the financial goal "${Jt.name}" to save $${Jt.targetAmount} by ${Jt.targetDate}, create a concise, actionable plan. Current amount is $${Jt.currentAmount}. Provide a JSON response with: "summary" (string), "monthlyContribution" (number), and "actionableSteps" (array of 3 strings).`;try{const Tr=await new vm({apiKey:K}).models.generateContent({model:"gemini-2.5-flash",contents:bn,config:{responseMimeType:"application/json"}}),rr=JSON.parse(Tr.text),lr={summary:rr.summary,monthlyContribution:rr.monthlyContribution,actionableSteps:rr.actionableSteps,feasibilitySummary:"",steps:rr.actionableSteps.map(dn=>({title:dn.split(" ")[0],description:dn,category:"General"}))};lt(Lt,{plan:lr})}catch(ar){console.error("Error generating goal plan:",ar),lt(Lt,{plan:{summary:"Error generating plan.",monthlyContribution:0,actionableSteps:[],feasibilitySummary:"",steps:[]}})}},addContributionToGoal:(Lt,Jt)=>{const bn={id:VE(),amount:Jt,date:new Date().toISOString().split("T")[0],type:"manual"};C(ar=>ar.map(Tr=>Tr.id===Lt?{...Tr,currentAmount:Tr.currentAmount+Jt,contributions:[bn,...Tr.contributions]}:Tr))},addRecurringContributionToGoal:(Lt,Jt)=>{const bn={...Jt,id:VE()};C(ar=>ar.map(Tr=>Tr.id===Lt?{...Tr,recurringContributions:[...Tr.recurringContributions||[],bn]}:Tr))},updateRecurringContributionInGoal:(Lt,Jt,bn)=>{C(ar=>ar.map(Tr=>Tr.id!==Lt?Tr:{...Tr,recurringContributions:(Tr.recurringContributions||[]).map(rr=>rr.id===Jt?{...rr,...bn}:rr)}))},deleteRecurringContributionFromGoal:(Lt,Jt)=>{C(bn=>bn.map(ar=>ar.id!==Lt?ar:{...ar,recurringContributions:(ar.recurringContributions||[]).filter(Tr=>Tr.id!==Jt)}))},updateFinancialGoal:lt,linkGoals:(Lt,Jt,bn,ar)=>{const Tr={id:Jt,relationshipType:bn,triggerAmount:ar};C(rr=>rr.map(lr=>lr.id===Lt?{...lr,linkedGoals:[...lr.linkedGoals||[],Tr]}:lr))},unlinkGoals:(Lt,Jt)=>{C(bn=>bn.map(ar=>ar.id===Lt?{...ar,linkedGoals:(ar.linkedGoals||[]).filter(Tr=>Tr.id!==Jt)}:ar))},impactData:{treesPlanted:124,progressToNextTree:65},gamification:{score:1250,level:5,levelName:"Financial Architect",progress:45,credits:500},rewardPoints:{balance:45200,lastEarned:150,lastRedeemed:0,currency:"PTS"},creditFactors:[{name:"Payment History",status:"Good",description:"On time"},{name:"Utilization",status:"Excellent",description:"Low usage"}],apiStatus:B,handlePlaidSuccess:Tt,isImportingData:Nn,userProfile:{name:"James B. O'Callaghan III",email:"visionary@idgaf.ai"},askSovereignAI:Sn,broadcastEvent:(Lt,Jt)=>console.log(`[EventBus] ${Lt}:`,Jt),cryptoAssets:ve,walletInfo:Ee,virtualCard:Ne,nftAssets:Be,connectWallet:Lt=>{console.log("Connected wallet",Lt),xe({address:"0x123...",balance:10})},disconnectWallet:()=>{xe(null)},detectedProviders:Ge,issueCard:()=>{_e({cardNumber:"4242 4242 4242 4242",holderName:"J. Doe",expiry:"12/25"})},buyCrypto:(Lt,Jt)=>{console.log(`Bought ${Lt} ${Jt}`)},showSystemAlert:(Lt,Jt)=>console.log(`ALERT [${Jt}]: ${Lt}`),unlinkAccount:Lt=>I(Jt=>Jt.filter(bn=>bn.id!==Lt)),securityMetrics:ht,auditLogs:ft,threatAlerts:De,dataSharingPolicies:vt,apiKeys:Ye,trustedContacts:Et,securityAwarenessModules:gt,transactionRules:$e,marqetaCardProducts:wt,fetchMarqetaProducts:()=>{jn(!0),setTimeout(()=>{Dt([{token:"mq_1",name:"Standard Debit",active:!0,start_date:"2023-01-01",config:{fulfillment:{bin_prefix:"123456",fulfillment_provider:"arrow",payment_instrument:"physical"},poi:{other:{allow:!0}},jit_funding:{program_funding_source:{enabled:!0}}}},{token:"mq_2",name:"Virtual Rewards",active:!0,start_date:"2023-05-01",config:{fulfillment:{bin_prefix:"654321",fulfillment_provider:"virtual",payment_instrument:"virtual"},poi:{other:{allow:!1}},jit_funding:{program_funding_source:{enabled:!0}}}}]),jn(!1)},1e3)},isMarqetaLoading:on};return s.jsx(Xi.Provider,{value:bt,children:e})},H8e=()=>{const e=p.useContext(Xi),[t,n]=p.useState(""),[r,o]=p.useState('Welcome to your personal AI Financial Advisor. I can help you understand complex financial topics, analyze your portfolio, or simulate investment strategies. What would you like to learn about today? For example, you could ask "Explain dollar-cost averaging" or "Analyze my risk tolerance".'),[i,a]=p.useState(!1),l=async()=>{if(t.trim()){a(!0);try{if(e!=null&&e.geminiApiKey){const u=await new vm({apiKey:e.geminiApiKey}).models.generateContent({model:"gemini-2.5-flash",contents:t});o(u.text)}else setTimeout(()=>{o(`I have analyzed your request: "${t}". Based on your current portfolio, I recommend diversifying into index funds to mitigate risk.`),a(!1)},1e3)}catch(c){console.error("AI Advisor Error:",c),o("I'm sorry, I encountered an error processing your request.")}finally{a(!1),n("")}}};return s.jsxs("div",{className:"space-y-6",children:[s.jsx("h2",{className:"text-3xl font-bold text-white tracking-wider",children:"AI Financial Advisor"}),s.jsx(At,{title:"Strategic Counsel",children:s.jsxs("div",{className:"h-96 flex flex-col",children:[s.jsxs("div",{className:"flex-grow p-4 bg-gray-900/50 rounded-lg mb-4 overflow-y-auto border border-gray-700",children:[s.jsx("p",{className:"text-gray-300 whitespace-pre-wrap",children:r}),i&&s.jsx("p",{className:"text-cyan-400 mt-2 animate-pulse",children:"Analyzing financial data..."})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:t,onChange:c=>n(c.target.value),onKeyPress:c=>c.key==="Enter"&&l(),className:"flex-grow p-3 bg-gray-800 border border-gray-600 rounded-lg text-white focus:outline-none focus:border-cyan-500",placeholder:"Ask for advice..."}),s.jsx("button",{onClick:l,disabled:i,className:"px-6 py-3 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg font-bold disabled:opacity-50",children:"Send"})]})]})})]})},SSt=Object.freeze(Object.defineProperty({__proto__:null,default:H8e},Symbol.toStringTag,{value:"Module"})),CSt=[{id:1,command:"Generate Q4 2023 balance report for 'Operating Account'",timestamp:"2 minutes ago",status:"Completed"},{id:2,command:"Initiate a $10,000 wire transfer to 'Vendor ABC'",timestamp:"15 minutes ago",status:"Completed"},{id:3,command:"List all pending payment orders over $5,000",timestamp:"1 hour ago",status:"Completed"},{id:4,command:"Create a new virtual account for 'Project Phoenix'",timestamp:"3 hours ago",status:"Failed"},{id:5,command:"Analyze cash flow trends for the last 90 days",timestamp:"5 hours ago",status:"Pending"},{id:6,command:"Reconcile expected payments from 'Client XYZ'",timestamp:"yesterday",status:"Completed"},{id:7,command:"Summarize transaction activity for the past 7 days",timestamp:"yesterday",status:"Completed"},{id:8,command:"Find transaction with reference number 'XYZ123'",timestamp:"2 days ago",status:"Completed"}],g1e=()=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-green-500",viewBox:"0 0 20 20",fill:"currentColor",children:s.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),_St=()=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-red-500",viewBox:"0 0 20 20",fill:"currentColor",children:s.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),jSt=()=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-yellow-500",viewBox:"0 0 20 20",fill:"currentColor",children:s.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.414-1.415L11 9.586V6z",clipRule:"evenodd"})}),NSt=e=>{switch(e){case"Completed":return{Icon:g1e,bgColor:"bg-green-100 dark:bg-green-900/30"};case"Failed":return{Icon:_St,bgColor:"bg-red-100 dark:bg-red-900/30"};case"Pending":return{Icon:jSt,bgColor:"bg-yellow-100 dark:bg-yellow-900/30"};default:return{Icon:g1e,bgColor:"bg-gray-100 dark:bg-gray-700"}}},ESt=()=>s.jsxs("div",{className:"bg-white dark:bg-gray-900/50 border border-gray-200 dark:border-gray-800 shadow-sm rounded-lg p-4 sm:p-6 h-full flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"AI Command Log"}),s.jsx("a",{href:"#",className:"text-sm font-medium text-blue-600 hover:underline dark:text-blue-500",children:"View all"})]}),s.jsx("div",{className:"flex-grow overflow-y-auto -mr-4 pr-4",children:s.jsx("ul",{className:"space-y-4",children:CSt.map((e,t)=>{const{Icon:n,bgColor:r}=NSt(e.status);return s.jsx("li",{children:s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsx("div",{className:`flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center ${r}`,children:s.jsx(n,{})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-gray-800 dark:text-gray-100 leading-tight",children:e.command}),s.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:[e.timestamp," · ",e.status]})]})]})},e.id)})})})]}),PSt=Object.freeze(Object.defineProperty({__proto__:null,default:ESt},Symbol.toStringTag,{value:"Module"}));function V8e(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t{var{children:n,width:r,height:o,viewBox:i,className:a,style:l,title:c,desc:u}=e,d=RSt(e,MSt),f=i||{width:r,height:o,x:0,y:0},h=Ae("recharts-surface",a);return p.createElement("svg",Cee({},Tf(d),{className:h,width:r,height:o,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),p.createElement("title",null,c),p.createElement("desc",null,u),n)}),DSt=["children","className"];function _ee(){return _ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:n,className:r}=e,o=LSt(e,DSt),i=Ae("recharts-layer",r);return p.createElement("g",_ee({className:i},Tf(o),{ref:t}),n)}),au=i8e();const Yw=Pc(au);var W8e=p.createContext(null),FSt=()=>p.useContext(W8e);function fl(e){return function(){return e}}const q8e=Math.cos,T7=Math.sin,cy=Math.sqrt,k7=Math.PI,Y9=2*k7,jee=Math.PI,Nee=2*jee,QC=1e-6,BSt=Nee-QC;function K8e(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return K8e;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;oQC)if(!(Math.abs(f*c-u*d)>QC)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-a,g=o-l,b=c*c+u*u,y=m*m+g*g,v=Math.sqrt(b),x=Math.sqrt(h),S=i*Math.tan((jee-Math.acos((b+h-y)/(2*v*x)))/2),C=S/x,_=S/v;Math.abs(C-1)>QC&&this._append`L${t+C*d},${n+C*f}`,this._append`A${i},${i},0,0,${+(f*m>d*g)},${this._x1=t+_*c},${this._y1=n+_*u}`}}arc(t,n,r,o,i,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(o),c=r*Math.sin(o),u=t+l,d=n+c,f=1^a,h=a?o-i:i-o;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>QC||Math.abs(this._y1-d)>QC)&&this._append`L${u},${d}`,r&&(h<0&&(h=h%Nee+Nee),h>BSt?this._append`A${r},${r},0,1,${f},${t-l},${n-c}A${r},${r},0,1,${f},${this._x1=u},${this._y1=d}`:h>QC&&this._append`A${r},${r},0,${+(h>=jee)},${f},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}};function qle(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new HSt(t)}function Kle(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Y8e(e){this._context=e}Y8e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function X9(e){return new Y8e(e)}function X8e(e){return e[0]}function Z8e(e){return e[1]}function J8e(e,t){var n=fl(!0),r=null,o=X9,i=null,a=qle(l);e=typeof e=="function"?e:e===void 0?X8e:fl(e),t=typeof t=="function"?t:t===void 0?Z8e:fl(t);function l(c){var u,d=(c=Kle(c)).length,f,h=!1,m;for(r==null&&(i=o(m=a())),u=0;u<=d;++u)!(u=m;--g)l.point(S[g],C[g]);l.lineEnd(),l.areaEnd()}v&&(S[h]=+e(y,h,f),C[h]=+t(y,h,f),l.point(r?+r(y,h,f):S[h],n?+n(y,h,f):C[h]))}if(x)return l=null,x+""||null}function d(){return J8e().defined(o).curve(a).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:fl(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:fl(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:fl(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:fl(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:fl(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:fl(+f),u):n},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(n)},u.lineX1=function(){return d().x(r).y(t)},u.defined=function(f){return arguments.length?(o=typeof f=="function"?f:fl(!!f),u):o},u.curve=function(f){return arguments.length?(a=f,i!=null&&(l=a(i)),u):a},u.context=function(f){return arguments.length?(f==null?i=l=null:l=a(i=f),u):i},u}class Q8e{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function VSt(e){return new Q8e(e,!0)}function USt(e){return new Q8e(e,!1)}const Yle={draw(e,t){const n=cy(t/k7);e.moveTo(n,0),e.arc(0,0,n,0,Y9)}},GSt={draw(e,t){const n=cy(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},e7e=cy(1/3),WSt=e7e*2,qSt={draw(e,t){const n=cy(t/WSt),r=n*e7e;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},KSt={draw(e,t){const n=cy(t),r=-n/2;e.rect(r,r,n,n)}},YSt=.8908130915292852,t7e=T7(k7/10)/T7(7*k7/10),XSt=T7(Y9/10)*t7e,ZSt=-q8e(Y9/10)*t7e,JSt={draw(e,t){const n=cy(t*YSt),r=XSt*n,o=ZSt*n;e.moveTo(0,-n),e.lineTo(r,o);for(let i=1;i<5;++i){const a=Y9*i/5,l=q8e(a),c=T7(a);e.lineTo(c*n,-l*n),e.lineTo(l*r-c*o,c*r+l*o)}e.closePath()}},Nq=cy(3),QSt={draw(e,t){const n=-cy(t/(Nq*3));e.moveTo(0,n*2),e.lineTo(-Nq*n,-n),e.lineTo(Nq*n,-n),e.closePath()}},Wm=-.5,qm=cy(3)/2,Eee=1/cy(12),eCt=(Eee/2+1)*3,tCt={draw(e,t){const n=cy(t/eCt),r=n/2,o=n*Eee,i=r,a=n*Eee+n,l=-i,c=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(l,c),e.lineTo(Wm*r-qm*o,qm*r+Wm*o),e.lineTo(Wm*i-qm*a,qm*i+Wm*a),e.lineTo(Wm*l-qm*c,qm*l+Wm*c),e.lineTo(Wm*r+qm*o,Wm*o-qm*r),e.lineTo(Wm*i+qm*a,Wm*a-qm*i),e.lineTo(Wm*l+qm*c,Wm*c-qm*l),e.closePath()}};function nCt(e,t){let n=null,r=qle(o);e=typeof e=="function"?e:fl(e||Yle),t=typeof t=="function"?t:fl(t===void 0?64:+t);function o(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return o.type=function(i){return arguments.length?(e=typeof i=="function"?i:fl(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:fl(+i),o):t},o.context=function(i){return arguments.length?(n=i??null,o):n},o}function M7(){}function R7(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function n7e(e){this._context=e}n7e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:R7(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:R7(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function rCt(e){return new n7e(e)}function r7e(e){this._context=e}r7e.prototype={areaStart:M7,areaEnd:M7,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:R7(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oCt(e){return new r7e(e)}function o7e(e){this._context=e}o7e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:R7(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iCt(e){return new o7e(e)}function i7e(e){this._context=e}i7e.prototype={areaStart:M7,areaEnd:M7,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function aCt(e){return new i7e(e)}function y1e(e){return e<0?-1:1}function b1e(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),l=(i*o+a*r)/(r+o);return(y1e(i)+y1e(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(l))||0}function v1e(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Eq(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,l=(i-r)/3;e._context.bezierCurveTo(r+l,o+l*t,i-l,a-l*n,i,a)}function O7(e){this._context=e}O7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Eq(this,this._t0,v1e(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Eq(this,v1e(this,n=b1e(this,e,t)),n);break;default:Eq(this,this._t0,n=b1e(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function a7e(e){this._context=new s7e(e)}(a7e.prototype=Object.create(O7.prototype)).point=function(e,t){O7.prototype.point.call(this,t,e)};function s7e(e){this._context=e}s7e.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}};function sCt(e){return new O7(e)}function lCt(e){return new a7e(e)}function l7e(e){this._context=e}l7e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=x1e(e),o=x1e(t),i=0,a=1;a=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[n-1]=(e[n]+o[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function uCt(e){return new Z9(e,.5)}function dCt(e){return new Z9(e,0)}function fCt(e){return new Z9(e,1)}function cP(e,t){if((a=e.length)>1)for(var n=1,r,o,i=e[t[0]],a,l=i.length;n=0;)n[t]=t;return n}function pCt(e,t){return e[t]}function hCt(e){const t=[];return t.key=e,t}function mCt(){var e=fl([]),t=Pee,n=cP,r=pCt;function o(i){var a=Array.from(e.apply(this,arguments),hCt),l,c=a.length,u=-1,d;for(const f of i)for(l=0,++u;l0){for(var n,r,o=0,i=e[0].length,a;o0){for(var n=0,r=e[t[0]],o,i=r.length;n0)||!((i=(o=e[t[0]]).length)>0))){for(var n=0,r=1,o,i,a;re===0?0:e>0?1:-1,Ih=e=>typeof e=="number"&&e!=+e,Ox=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Yr=e=>(typeof e=="number"||e instanceof Number)&&!Ih(e),Pg=e=>Yr(e)||typeof e=="string",CCt=0,wM=e=>{var t=++CCt;return"".concat(e||"").concat(t)},cp=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Yr(t)&&typeof t!="string")return r;var i;if(Ox(t)){if(n==null)return r;var a=t.indexOf("%");i=n*parseFloat(t.slice(0,a))/100}else i=+t;return Ih(i)&&(i=r),o&&n!=null&&i>n&&(i=n),i},u7e=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;rr&&(typeof t=="function"?t(r):S_(r,t))===n)}var _Ct=e=>{for(var t=e.length,n=0,r=0,o=0,i=0,a=1/0,l=-1/0,c=0,u=0,d=0;de===null||typeof e>"u",A3=e=>ls(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function jCt(e){return e!=null}function T3(){}var NCt=["type","size","sizeType"];function Iee(){return Iee=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t="symbol".concat(A3(e));return f7e[t]||Yle},RCt=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*kCt;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},OCt=(e,t)=>{f7e["symbol".concat(A3(e))]=t},J9=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,o=ACt(e,NCt),i=I1e(I1e({},o),{},{type:t,size:n,sizeType:r}),a="circle";typeof t=="string"&&(a=t);var l=()=>{var h=MCt(a),m=nCt().type(h).size(RCt(n,r,a)),g=m();if(g!==null)return g},{className:c,cx:u,cy:d}=i,f=Tf(i);return Yr(u)&&Yr(d)&&Yr(n)?p.createElement("path",Iee({},f,{className:Ae("recharts-symbols",c),transform:"translate(".concat(u,", ").concat(d,")"),d:l()})):null};J9.registerSymbol=OCt;var p7e=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Qle=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(p.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(o=>{Gle(o)&&(r[o]=(i=>n[o](n,i)))}),r},DCt=(e,t,n)=>r=>(e(t,n,r),null),jI=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(o=>{var i=e[o];Gle(o)&&typeof i=="function"&&(r||(r={}),r[o]=DCt(i,t,n))}),r},LCt=e=>Array.isArray(e)&&e.length>0;function A1e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function $Ct(e){for(var t=1;t(a[l]===void 0&&r[l]!==void 0&&(a[l]=r[l]),a),n);return i}function D7(){return D7=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var h=d.formatter||o,m=Ae({"recharts-legend-item":!0,["legend-item-".concat(f)]:!0,inactive:d.inactive});if(d.type==="none")return null;var g=d.inactive?i:d.color,b=h?h(d.value,d,f):d.value;return p.createElement("li",D7({className:m,style:c,key:"legend-item-".concat(f)},jI(e,d,f)),p.createElement(Wle,{width:n,height:n,viewBox:l,style:u,"aria-label":"".concat(b," legend icon")},p.createElement(qCt,{data:d,iconType:a,inactiveColor:i})),p.createElement("span",{className:"recharts-legend-item-text",style:{color:g}},b))})}var YCt=e=>{var t=Fl(e,WCt),{payload:n,layout:r,align:o}=t;if(!n||!n.length)return null;var i={padding:0,margin:0,textAlign:r==="horizontal"?o:"left"};return p.createElement("ul",{className:"recharts-default-legend",style:i},p.createElement(KCt,D7({},t,{payload:n})))},Oq={},Dq={},k1e;function XCt(){return k1e||(k1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const o=new Map;for(let i=0;i=0}e.isLength=t})(Bq)),Bq}var O1e;function ece(){return O1e||(O1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ZCt();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(Fq)),Fq}var zq={},D1e;function JCt(){return D1e||(D1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(zq)),zq}var L1e;function QCt(){return L1e||(L1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ece(),n=JCt();function r(o){return n.isObjectLike(o)&&t.isArrayLike(o)}e.isArrayLikeObject=r})($q)),$q}var Hq={},Vq={},$1e;function e2t(){return $1e||($1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Jle();function n(r){return function(o){return t.get(o,r)}}e.property=n})(Vq)),Vq}var Uq={},Gq={},Wq={},qq={},F1e;function m7e(){return F1e||(F1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(qq)),qq}var Kq={},B1e;function g7e(){return B1e||(B1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(Kq)),Kq}var Yq={},z1e;function y7e(){return z1e||(z1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.eq=t})(Yq)),Yq}var H1e;function t2t(){return H1e||(H1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m7e(),n=g7e(),r=y7e();function o(d,f,h){return typeof h!="function"?o(d,f,()=>{}):i(d,f,function m(g,b,y,v,x,S){const C=h(g,b,y,v,x,S);return C!==void 0?!!C:i(g,b,m,S)},new Map)}function i(d,f,h,m){if(f===d)return!0;switch(typeof f){case"object":return a(d,f,h,m);case"function":return Object.keys(f).length>0?i(d,{...f},h,m):r.eq(d,f);default:return t.isObject(d)?typeof f=="string"?f==="":!0:r.eq(d,f)}}function a(d,f,h,m){if(f==null)return!0;if(Array.isArray(f))return c(d,f,h,m);if(f instanceof Map)return l(d,f,h,m);if(f instanceof Set)return u(d,f,h,m);const g=Object.keys(f);if(d==null)return g.length===0;if(g.length===0)return!0;if(m!=null&&m.has(f))return m.get(f)===d;m==null||m.set(f,d);try{for(let b=0;b{})}e.isMatch=n})(Gq)),Gq}var Xq={},Zq={},Jq={},U1e;function n2t(){return U1e||(U1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(Jq)),Jq}var Qq={},G1e;function v7e(){return G1e||(G1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(Qq)),Qq}var eK={},W1e;function x7e(){return W1e||(W1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",o="[object Boolean]",i="[object Arguments]",a="[object Symbol]",l="[object Date]",c="[object Map]",u="[object Set]",d="[object Array]",f="[object Function]",h="[object ArrayBuffer]",m="[object Object]",g="[object Error]",b="[object DataView]",y="[object Uint8Array]",v="[object Uint8ClampedArray]",x="[object Uint16Array]",S="[object Uint32Array]",C="[object BigUint64Array]",_="[object Int8Array]",N="[object Int16Array]",E="[object Int32Array]",I="[object BigInt64Array]",A="[object Float32Array]",R="[object Float64Array]";e.argumentsTag=i,e.arrayBufferTag=h,e.arrayTag=d,e.bigInt64ArrayTag=I,e.bigUint64ArrayTag=C,e.booleanTag=o,e.dataViewTag=b,e.dateTag=l,e.errorTag=g,e.float32ArrayTag=A,e.float64ArrayTag=R,e.functionTag=f,e.int16ArrayTag=N,e.int32ArrayTag=E,e.int8ArrayTag=_,e.mapTag=c,e.numberTag=r,e.objectTag=m,e.regexpTag=t,e.setTag=u,e.stringTag=n,e.symbolTag=a,e.uint16ArrayTag=x,e.uint32ArrayTag=S,e.uint8ArrayTag=y,e.uint8ClampedArrayTag=v})(eK)),eK}var tK={},q1e;function r2t(){return q1e||(q1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(tK)),tK}var K1e;function w7e(){return K1e||(K1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=n2t(),n=v7e(),r=x7e(),o=g7e(),i=r2t();function a(d,f){return l(d,void 0,d,new Map,f)}function l(d,f,h,m=new Map,g=void 0){const b=g==null?void 0:g(d,f,h,m);if(b!==void 0)return b;if(o.isPrimitive(d))return d;if(m.has(d))return m.get(d);if(Array.isArray(d)){const y=new Array(d.length);m.set(d,y);for(let v=0;vt.isMatch(i,o)}e.matches=r})(Uq)),Uq}var nK={},rK={},oK={},Z1e;function a2t(){return Z1e||(Z1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=w7e(),n=x7e();function r(o,i){return t.cloneDeepWith(o,(a,l,c,u)=>{const d=i==null?void 0:i(a,l,c,u);if(d!==void 0)return d;if(typeof o=="object")switch(Object.prototype.toString.call(o)){case n.numberTag:case n.stringTag:case n.booleanTag:{const f=new o.constructor(o==null?void 0:o.valueOf());return t.copyProperties(f,o),f}case n.argumentsTag:{const f={};return t.copyProperties(f,o),f.length=o.length,f[Symbol.iterator]=o[Symbol.iterator],f}default:return}})}e.cloneDeepWith=r})(oK)),oK}var J1e;function s2t(){return J1e||(J1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=a2t();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(rK)),rK}var iK={},aK={},Q1e;function S7e(){return Q1e||(Q1e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,o=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return fK.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,fK}var lwe;function _7e(){return lwe||(lwe=1,dK.exports=m2t()),dK.exports}/** + * @license React + * use-sync-external-store-shim/with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var cwe;function g2t(){if(cwe)return uK;cwe=1;var e=wI(),t=_7e();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,l=e.useMemo,c=e.useDebugValue;return uK.useSyncExternalStoreWithSelector=function(u,d,f,h,m){var g=i(null);if(g.current===null){var b={hasValue:!1,value:null};g.current=b}else b=g.current;g=l(function(){function v(N){if(!x){if(x=!0,S=N,N=h(N),m!==void 0&&b.hasValue){var E=b.value;if(m(E,N))return C=E}return C=N}if(E=C,r(S,N))return E;var I=h(N);return m!==void 0&&m(E,I)?(S=N,E):(S=N,C=I)}var x=!1,S,C,_=f===void 0?null:f;return[function(){return v(d())},_===null?void 0:function(){return v(_())}]},[d,f,h,m]);var y=o(u,g[0],g[1]);return a(function(){b.hasValue=!0,b.value=y},[y]),c(y),y},uK}var uwe;function y2t(){return uwe||(uwe=1,cK.exports=g2t()),cK.exports}var tce=y2t();const b2t=Pc(tce);var nce=p.createContext(null),v2t=e=>e,nl=()=>{var e=p.useContext(nce);return e?e.store.dispatch:v2t},ZF=()=>{},x2t=()=>ZF,w2t=(e,t)=>e===t;function Hr(e){var t=p.useContext(nce);return tce.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:x2t,t?t.store.getState:ZF,t?t.store.getState:ZF,t?e:ZF,w2t)}var L7=Symbol("NOT_FOUND");function S2t(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function C2t(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function _2t(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var dwe=e=>Array.isArray(e)?e:[e];function j2t(e){const t=Array.isArray(e[0])?e[0]:e;return _2t(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function N2t(e,t){const n=[],{length:r}=e;for(let o=0;ot(l,u.key));if(c>-1){const u=n[c];return c>0&&(n.splice(c,1),n.unshift(u)),u.value}return L7}function o(l,c){r(l)===L7&&(n.unshift({key:l,value:c}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var I2t=(e,t)=>e===t;function A2t(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;ii(m.value,d));h&&(d=h.value,l!==0&&l--)}c.put(arguments,d)}return d}return u.clearCache=()=>{c.clear(),u.resetResultsCount()},u.resultsCount=()=>l,u.resetResultsCount=()=>{l=0},u}var T2t=class{constructor(e){this.value=e}deref(){return this.value}},k2t=typeof WeakRef<"u"?WeakRef:T2t,M2t=0,fwe=1;function _L(){return{s:M2t,v:void 0,o:null,p:null}}function j7e(e,t={}){let n=_L();const{resultEqualityCheck:r}=t;let o,i=0;function a(){var f;let l=n;const{length:c}=arguments;for(let h=0,m=c;h{n=_L(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function N7e(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,a=0,l,c={},u=o.pop();typeof u=="object"&&(c=u,u=o.pop()),S2t(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...c},{memoize:f,memoizeOptions:h=[],argsMemoize:m=j7e,argsMemoizeOptions:g=[]}=d,b=dwe(h),y=dwe(g),v=j2t(o),x=f(function(){return i++,u.apply(null,arguments)},...b),S=m(function(){a++;const _=N2t(v,arguments);return l=x.apply(null,_),l},...y);return Object.assign(S,{resultFunc:u,memoizedResultFunc:x,dependencies:v,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>l,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var fn=N7e(j7e),R2t=Object.assign((e,t=fn)=>{C2t(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((a,l,c)=>(a[n[c]]=l,a),{}))},{withTypes:()=>R2t}),pK={},hK={},mK={},pwe;function O2t(){return pwe||(pwe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,o,i)=>{if(r!==o){const a=t(r),l=t(o);if(a===l&&a===0){if(ro)return i==="desc"?-1:1}return i==="desc"?l-a:a-l}return 0};e.compareValues=n})(mK)),mK}var gK={},yK={},hwe;function E7e(){return hwe||(hwe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(yK)),yK}var mwe;function D2t(){return mwe||(mwe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=E7e(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(i,a){return Array.isArray(i)?!1:typeof i=="number"||typeof i=="boolean"||i==null||t.isSymbol(i)?!0:typeof i=="string"&&(r.test(i)||!n.test(i))||a!=null&&Object.hasOwn(a,i)}e.isKey=o})(gK)),gK}var gwe;function L2t(){return gwe||(gwe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=O2t(),n=D2t(),r=Zle();function o(i,a,l,c){if(i==null)return[];l=c?void 0:l,Array.isArray(i)||(i=Object.values(i)),Array.isArray(a)||(a=a==null?[null]:[a]),a.length===0&&(a=[null]),Array.isArray(l)||(l=l==null?[]:[l]),l=l.map(m=>String(m));const u=(m,g)=>{let b=m;for(let y=0;yg==null||m==null?g:typeof m=="object"&&"key"in m?Object.hasOwn(g,m.key)?g[m.key]:u(g,m.path):typeof m=="function"?m(g):Array.isArray(m)?u(g,m):typeof g=="object"?g[m]:g,f=a.map(m=>(Array.isArray(m)&&m.length===1&&(m=m[0]),m==null||typeof m=="function"||Array.isArray(m)||n.isKey(m)?m:{key:m,path:r.toPath(m)}));return i.map(m=>({original:m,criteria:f.map(g=>d(g,m))})).slice().sort((m,g)=>{for(let b=0;bm.original)}e.orderBy=o})(hK)),hK}var bK={},ywe;function $2t(){return ywe||(ywe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const o=[],i=Math.floor(r),a=(l,c)=>{for(let u=0;u1&&r.isIterateeCall(i,a[0],a[1])?a=[]:l>2&&r.isIterateeCall(a[0],a[1],a[2])&&(a=[a[0]]),t.orderBy(i,n.flatten(a),["asc"])}e.sortBy=o})(pK)),pK}var xK,xwe;function B2t(){return xwe||(xwe=1,xK=F2t().sortBy),xK}var z2t=B2t();const Q9=Pc(z2t);var I7e=e=>e.legend.settings,H2t=e=>e.legend.size,V2t=e=>e.legend.payload,U2t=fn([V2t,I7e],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?Q9(r,n):r});function G2t(){return Hr(U2t)}var jL=1;function A7e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=p.useState({height:0,left:0,top:0,width:0}),r=p.useCallback(o=>{if(o!=null){var i=o.getBoundingClientRect(),a={height:i.height,left:i.left,top:i.top,width:i.width};(Math.abs(a.height-t.height)>jL||Math.abs(a.left-t.left)>jL||Math.abs(a.top-t.top)>jL||Math.abs(a.width-t.width)>jL)&&n({height:a.height,left:a.left,top:a.top,width:a.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function qd(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var W2t=typeof Symbol=="function"&&Symbol.observable||"@@observable",wwe=W2t,wK=()=>Math.random().toString(36).substring(7).split("").join("."),q2t={INIT:`@@redux/INIT${wK()}`,REPLACE:`@@redux/REPLACE${wK()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${wK()}`},$7=q2t;function oce(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ice(e,t,n){if(typeof e!="function")throw new Error(qd(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(qd(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(qd(1));return n(ice)(e,t)}let r=e,o=t,i=new Map,a=i,l=0,c=!1;function u(){a===i&&(a=new Map,i.forEach((y,v)=>{a.set(v,y)}))}function d(){if(c)throw new Error(qd(3));return o}function f(y){if(typeof y!="function")throw new Error(qd(4));if(c)throw new Error(qd(5));let v=!0;u();const x=l++;return a.set(x,y),function(){if(v){if(c)throw new Error(qd(6));v=!1,u(),a.delete(x),i=null}}}function h(y){if(!oce(y))throw new Error(qd(7));if(typeof y.type>"u")throw new Error(qd(8));if(typeof y.type!="string")throw new Error(qd(17));if(c)throw new Error(qd(9));try{c=!0,o=r(o,y)}finally{c=!1}return(i=a).forEach(x=>{x()}),y}function m(y){if(typeof y!="function")throw new Error(qd(10));r=y,h({type:$7.REPLACE})}function g(){const y=f;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(qd(11));function x(){const C=v;C.next&&C.next(d())}return x(),{unsubscribe:y(x)}},[wwe](){return this}}}return h({type:$7.INIT}),{dispatch:h,subscribe:f,getState:d,replaceReducer:m,[wwe]:g}}function K2t(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:$7.INIT})>"u")throw new Error(qd(12));if(typeof n(void 0,{type:$7.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(qd(13))})}function T7e(e){const t=Object.keys(e),n={};for(let i=0;i"u")throw l&&l.type,new Error(qd(14));u[f]=g,c=c||g!==m}return c=c||r.length!==Object.keys(a).length,c?u:a}}function Swe(e,t){return function(...n){return t(e.apply(this,n))}}function Cwe(e,t){if(typeof e=="function")return Swe(e,t);if(typeof e!="object"||e===null)throw new Error(qd(16));const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=Swe(o,t))}return n}function SM(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function k7e(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(qd(15))};const a={getState:o.getState,dispatch:(c,...u)=>i(c,...u)},l=e.map(c=>c(a));return i=SM(...l)(o.dispatch),{...o,dispatch:i}}}function M7e(e){return oce(e)&&"type"in e&&typeof e.type=="string"}var R7e=Symbol.for("immer-nothing"),_we=Symbol.for("immer-draftable"),Dp=Symbol.for("immer-state");function P0(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var pm=Object,uP=pm.getPrototypeOf,F7="constructor",eH="prototype",Aee="configurable",B7="enumerable",JF="writable",CM="value",Dx=e=>!!e&&!!e[Dp];function Z0(e){var t;return e?O7e(e)||tH(e)||!!e[_we]||!!((t=e[F7])!=null&&t[_we])||nH(e)||rH(e):!1}var Y2t=pm[eH][F7].toString(),jwe=new WeakMap;function O7e(e){if(!e||!ace(e))return!1;const t=uP(e);if(t===null||t===pm[eH])return!0;const n=pm.hasOwnProperty.call(t,F7)&&t[F7];if(n===Object)return!0;if(!TE(n))return!1;let r=jwe.get(n);return r===void 0&&(r=Function.toString.call(n),jwe.set(n,r)),r===Y2t}function k3(e,t,n=!0){M3(e)===0?(n?Reflect.ownKeys(e):pm.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((r,o)=>t(o,r,e))}function M3(e){const t=e[Dp];return t?t.type_:tH(e)?1:nH(e)?2:rH(e)?3:0}var Nwe=(e,t,n=M3(e))=>n===2?e.has(t):pm[eH].hasOwnProperty.call(e,t),Tee=(e,t,n=M3(e))=>n===2?e.get(t):e[t],z7=(e,t,n,r=M3(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function X2t(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var tH=Array.isArray,nH=e=>e instanceof Map,rH=e=>e instanceof Set,ace=e=>typeof e=="object",TE=e=>typeof e=="function",SK=e=>typeof e=="boolean",Jv=e=>e.copy_||e.base_,sce=e=>e.modified_?e.copy_:e.base_;function kee(e,t){if(nH(e))return new Map(e);if(rH(e))return new Set(e);if(tH(e))return Array[eH].slice.call(e);const n=O7e(e);if(t===!0||t==="class_only"&&!n){const r=pm.getOwnPropertyDescriptors(e);delete r[Dp];let o=Reflect.ownKeys(r);for(let i=0;i1&&pm.defineProperties(e,{set:NL,add:NL,clear:NL,delete:NL}),pm.freeze(e),t&&k3(e,(n,r)=>{lce(r,!0)},!1)),e}function Z2t(){P0(2)}var NL={[CM]:Z2t};function oH(e){return e===null||!ace(e)?!0:pm.isFrozen(e)}var H7="MapSet",Mee="Patches",D7e={};function dP(e){const t=D7e[e];return t||P0(0,e),t}var J2t=e=>!!D7e[e],_M,L7e=()=>_M,Q2t=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:J2t(H7)?dP(H7):void 0});function Ewe(e,t){t&&(e.patchPlugin_=dP(Mee),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ree(e){Oee(e),e.drafts_.forEach(e_t),e.drafts_=null}function Oee(e){e===_M&&(_M=e.parent_)}var Pwe=e=>_M=Q2t(_M,e);function e_t(e){const t=e[Dp];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Iwe(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Dp].modified_&&(Ree(t),P0(4)),Z0(e)&&(e=Awe(t,e));const{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(n[Dp].base_,e,t)}else e=Awe(t,n);return t_t(t,e,!0),Ree(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==R7e?e:void 0}function Awe(e,t){if(oH(t))return t;const n=t[Dp];if(!n)return cce(t,e.handledSet_,e);if(!iH(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);B7e(n,e)}return n.copy_}function t_t(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&lce(t,n)}function $7e(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var iH=(e,t)=>e.scope_===t,n_t=[];function F7e(e,t,n,r){const o=Jv(e),i=e.type_;if(r!==void 0&&Tee(o,r,i)===t){z7(o,r,n,i);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;k3(o,(c,u)=>{if(Dx(u)){const d=l.get(u)||[];d.push(c),l.set(u,d)}})}const a=e.draftLocations_.get(t)??n_t;for(const l of a)z7(o,l,n,i)}function r_t(e,t,n){e.callbacks_.push(function(o){var l;const i=t;if(!i||!iH(i,o))return;(l=o.mapSetPlugin_)==null||l.fixSetContents(i);const a=sce(i);F7e(e,i.draft_??i,a,n),B7e(i,o)})}function B7e(e,t){var r;if(e.modified_&&!e.finalized_&&(e.type_===3||(((r=e.assigned_)==null?void 0:r.size)??0)>0)){const{patchPlugin_:o}=t;if(o){const i=o.getPath(e);i&&o.generatePatches_(e,i,t)}$7e(e)}}function o_t(e,t,n){const{scope_:r}=e;if(Dx(n)){const o=n[Dp];iH(o,r)&&o.callbacks_.push(function(){QF(e);const a=sce(o);F7e(e,n,a,t)})}else Z0(n)&&e.callbacks_.push(function(){const i=Jv(e);Tee(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&cce(Tee(e.copy_,t,e.type_),r.handledSet_,r)})}function cce(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Dx(e)||t.has(e)||!Z0(e)||oH(e)||(t.add(e),k3(e,(r,o)=>{if(Dx(o)){const i=o[Dp];if(iH(i,n)){const a=sce(i);z7(e,r,a,e.type_),$7e(i)}}else Z0(o)&&cce(o,t,n)})),e}function i_t(e,t){const n=tH(e),r={type_:n?1:0,scope_:t?t.scope_:L7e(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=r,i=uce;n&&(o=[r],i=jM);const{revoke:a,proxy:l}=Proxy.revocable(o,i);return r.draft_=l,r.revoke_=a,[l,r]}var uce={get(e,t){if(t===Dp)return e;const n=Jv(e);if(!Nwe(n,t,e.type_))return a_t(e,n,t);const r=n[t];if(e.finalized_||!Z0(r))return r;if(r===CK(e.base_,t)){QF(e);const o=e.type_===1?+t:t,i=Lee(e.scope_,r,e,o);return e.copy_[o]=i}return r},has(e,t){return t in Jv(e)},ownKeys(e){return Reflect.ownKeys(Jv(e))},set(e,t,n){const r=z7e(Jv(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=CK(Jv(e),t),i=o==null?void 0:o[Dp];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(X2t(n,o)&&(n!==void 0||Nwe(e.base_,t,e.type_)))return!0;QF(e),Dee(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),o_t(e,t,n)),!0},deleteProperty(e,t){return QF(e),CK(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Dee(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Jv(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[JF]:!0,[Aee]:e.type_!==1||t!=="length",[B7]:r[B7],[CM]:n[t]}},defineProperty(){P0(11)},getPrototypeOf(e){return uP(e.base_)},setPrototypeOf(){P0(12)}},jM={};k3(uce,(e,t)=>{jM[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}});jM.deleteProperty=function(e,t){return jM.set.call(this,e,t,void 0)};jM.set=function(e,t,n){return uce.set.call(this,e[0],t,n,e[0])};function CK(e,t){const n=e[Dp];return(n?Jv(n):e)[t]}function a_t(e,t,n){var o;const r=z7e(t,n);return r?CM in r?r[CM]:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function z7e(e,t){if(!(t in e))return;let n=uP(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=uP(n)}}function Dee(e){e.modified_||(e.modified_=!0,e.parent_&&Dee(e.parent_))}function QF(e){e.copy_||(e.assigned_=new Map,e.copy_=kee(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var s_t=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,o)=>{if(TE(n)&&!TE(r)){const a=r;r=n;const l=this;return function(u=a,...d){return l.produce(u,f=>r.call(this,f,...d))}}TE(r)||P0(6),o!==void 0&&!TE(o)&&P0(7);let i;if(Z0(n)){const a=Pwe(this),l=Lee(a,n,void 0);let c=!0;try{i=r(l),c=!1}finally{c?Ree(a):Oee(a)}return Ewe(a,o),Iwe(i,a)}else if(!n||!ace(n)){if(i=r(n),i===void 0&&(i=n),i===R7e&&(i=void 0),this.autoFreeze_&&lce(i,!0),o){const a=[],l=[];dP(Mee).generateReplacementPatches_(n,i,{patches_:a,inversePatches_:l}),o(a,l)}return i}else P0(1,n)},this.produceWithPatches=(n,r)=>{if(TE(n))return(l,...c)=>this.produceWithPatches(l,u=>n(u,...c));let o,i;return[this.produce(n,r,(l,c)=>{o=l,i=c}),o,i]},SK(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),SK(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),SK(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Z0(t)||P0(8),Dx(t)&&(t=z0(t));const n=Pwe(this),r=Lee(n,t,void 0);return r[Dp].isManual_=!0,Oee(n),r}finishDraft(t,n){const r=t&&t[Dp];(!r||!r.isManual_)&&P0(9);const{scope_:o}=r;return Ewe(o,n),Iwe(void 0,o)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const i=n[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(n=n.slice(r+1));const o=dP(Mee).applyPatches_;return Dx(t)?o(t,n):this.produce(t,i=>o(i,n))}};function Lee(e,t,n,r){const[o,i]=nH(t)?dP(H7).proxyMap_(t,n):rH(t)?dP(H7).proxySet_(t,n):i_t(t,n);return((n==null?void 0:n.scope_)??L7e()).drafts_.push(o),i.callbacks_=(n==null?void 0:n.callbacks_)??[],i.key_=r,n&&r!==void 0?r_t(n,i,r):i.callbacks_.push(function(c){var d;(d=c.mapSetPlugin_)==null||d.fixSetContents(i);const{patchPlugin_:u}=c;i.modified_&&u&&u.generatePatches_(i,[],c)}),o}function z0(e){return Dx(e)||P0(10,e),H7e(e)}function H7e(e){if(!Z0(e)||oH(e))return e;const t=e[Dp];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=kee(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=kee(e,!0);return k3(n,(o,i)=>{z7(n,o,H7e(i))},r),t&&(t.finalized_=!1),n}var l_t=new s_t,V7e=l_t.produce;function U7e(e){return({dispatch:n,getState:r})=>o=>i=>typeof i=="function"?i(n,r,e):o(i)}var c_t=U7e(),u_t=U7e,d_t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?SM:SM.apply(null,arguments)};function Ig(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(xm(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>M7e(r)&&r.type===e,n}var G7e=class Ak extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ak.prototype)}static get[Symbol.species](){return Ak}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ak(...t[0].concat(this)):new Ak(...t.concat(this))}};function Twe(e){return Z0(e)?V7e(e,()=>{}):e}function EL(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function f_t(e){return typeof e=="boolean"}var p_t=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{};let a=new G7e;return n&&(f_t(n)?a.push(c_t):a.push(u_t(n.extraArgument))),a},W7e="RTK_autoBatch",Zl=()=>e=>({payload:e,meta:{[W7e]:!0}}),kwe=e=>t=>{setTimeout(t,e)},q7e=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,a=!1;const l=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:kwe(10):e.type==="callback"?e.queueNotification:kwe(e.timeout),u=()=>{a=!1,i&&(i=!1,l.forEach(d=>d()))};return Object.assign({},r,{subscribe(d){const f=()=>o&&d(),h=r.subscribe(f);return l.add(d),()=>{h(),l.delete(d)}},dispatch(d){var f;try{return o=!((f=d==null?void 0:d.meta)!=null&&f[W7e]),i=!o,i&&(a||(a=!0,c(u))),r.dispatch(d)}finally{o=!0}}})},h_t=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new G7e(e);return r&&o.push(q7e(typeof r=="object"?r:void 0)),o};function m_t(e){const t=p_t(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(oce(n))l=T7e(n);else throw new Error(xm(1));let c;typeof r=="function"?c=r(t):c=t();let u=SM;o&&(u=d_t({trace:!1,...typeof o=="object"&&o}));const d=k7e(...c),f=h_t(d);let h=typeof a=="function"?a(f):f();const m=u(...h);return ice(l,i,m)}function K7e(e){const t={},n=[];let r;const o={addCase(i,a){const l=typeof i=="string"?i:i.type;if(!l)throw new Error(xm(28));if(l in t)throw new Error(xm(29));return t[l]=a,o},addAsyncThunk(i,a){return a.pending&&(t[i.pending.type]=a.pending),a.rejected&&(t[i.rejected.type]=a.rejected),a.fulfilled&&(t[i.fulfilled.type]=a.fulfilled),a.settled&&n.push({matcher:i.settled,reducer:a.settled}),o},addMatcher(i,a){return n.push({matcher:i,reducer:a}),o},addDefaultCase(i){return r=i,o}};return e(o),[t,n,r]}function g_t(e){return typeof e=="function"}function y_t(e,t){let[n,r,o]=K7e(t),i;if(g_t(e))i=()=>Twe(e());else{const l=Twe(e);i=()=>l}function a(l=i(),c){let u=[n[c.type],...r.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return u.filter(d=>!!d).length===0&&(u=[o]),u.reduce((d,f)=>{if(f)if(Dx(d)){const m=f(d,c);return m===void 0?d:m}else{if(Z0(d))return V7e(d,h=>f(h,c));{const h=f(d,c);if(h===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return d},l)}return a.getInitialState=i,a}var b_t="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",v_t=(e=21)=>{let t="",n=e;for(;n--;)t+=b_t[Math.random()*64|0];return t},x_t=Symbol.for("rtk-slice-createasyncthunk");function w_t(e,t){return`${e}/${t}`}function S_t({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[x_t];return function(o){const{name:i,reducerPath:a=i}=o;if(!i)throw new Error(xm(11));const l=(typeof o.reducers=="function"?o.reducers(__t()):o.reducers)||{},c=Object.keys(l),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(C,_){const N=typeof C=="string"?C:C.type;if(!N)throw new Error(xm(12));if(N in u.sliceCaseReducersByType)throw new Error(xm(13));return u.sliceCaseReducersByType[N]=_,d},addMatcher(C,_){return u.sliceMatchers.push({matcher:C,reducer:_}),d},exposeAction(C,_){return u.actionCreators[C]=_,d},exposeCaseReducer(C,_){return u.sliceCaseReducersByName[C]=_,d}};c.forEach(C=>{const _=l[C],N={reducerName:C,type:w_t(i,C),createNotation:typeof o.reducers=="function"};N_t(_)?P_t(N,_,d,t):j_t(N,_,d)});function f(){const[C={},_=[],N=void 0]=typeof o.extraReducers=="function"?K7e(o.extraReducers):[o.extraReducers],E={...C,...u.sliceCaseReducersByType};return y_t(o.initialState,I=>{for(let A in E)I.addCase(A,E[A]);for(let A of u.sliceMatchers)I.addMatcher(A.matcher,A.reducer);for(let A of _)I.addMatcher(A.matcher,A.reducer);N&&I.addDefaultCase(N)})}const h=C=>C,m=new Map,g=new WeakMap;let b;function y(C,_){return b||(b=f()),b(C,_)}function v(){return b||(b=f()),b.getInitialState()}function x(C,_=!1){function N(I){let A=I[C];return typeof A>"u"&&_&&(A=EL(g,N,v)),A}function E(I=h){const A=EL(m,_,()=>new WeakMap);return EL(A,I,()=>{const R={};for(const[k,T]of Object.entries(o.selectors??{}))R[k]=C_t(T,I,()=>EL(g,I,v),_);return R})}return{reducerPath:C,getSelectors:E,get selectors(){return E(N)},selectSlice:N}}const S={name:i,reducer:y,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...x(a),injectInto(C,{reducerPath:_,...N}={}){const E=_??a;return C.inject({reducerPath:E,reducer:y},N),{...S,...x(E,!0)}}};return S}}function C_t(e,t,n,r){function o(i,...a){let l=t(i);return typeof l>"u"&&r&&(l=n()),e(l,...a)}return o.unwrapped=e,o}var Oh=S_t();function __t(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function j_t({type:e,reducerName:t,createNotation:n},r,o){let i,a;if("reducer"in r){if(n&&!E_t(r))throw new Error(xm(17));i=r.reducer,a=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?Ig(e,a):Ig(e))}function N_t(e){return e._reducerDefinitionType==="asyncThunk"}function E_t(e){return e._reducerDefinitionType==="reducerWithPrepare"}function P_t({type:e,reducerName:t},n,r,o){if(!o)throw new Error(xm(18));const{payloadCreator:i,fulfilled:a,pending:l,rejected:c,settled:u,options:d}=n,f=o(e,i,d);r.exposeAction(t,f),a&&r.addCase(f.fulfilled,a),l&&r.addCase(f.pending,l),c&&r.addCase(f.rejected,c),u&&r.addMatcher(f.settled,u),r.exposeCaseReducer(t,{fulfilled:a||PL,pending:l||PL,rejected:c||PL,settled:u||PL})}function PL(){}var I_t="task",Y7e="listener",X7e="completed",dce="cancelled",A_t=`task-${dce}`,T_t=`task-${X7e}`,$ee=`${Y7e}-${dce}`,k_t=`${Y7e}-${X7e}`,aH=class{constructor(e){Le(this,"name","TaskAbortError");Le(this,"message");this.code=e,this.message=`${I_t} ${dce} (reason: ${e})`}},fce=(e,t)=>{if(typeof e!="function")throw new TypeError(xm(32))},V7=()=>{},Z7e=(e,t=V7)=>(e.catch(t),e),J7e=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Z2=e=>{if(e.aborted)throw new aH(e.reason)};function Q7e(e,t){let n=V7;return new Promise((r,o)=>{const i=()=>o(new aH(e.reason));if(e.aborted){i();return}n=J7e(e,i),t.finally(()=>n()).then(r,o)}).finally(()=>{n=V7})}var M_t=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof aH?"cancelled":"rejected",error:n}}finally{t==null||t()}},U7=e=>t=>Z7e(Q7e(e,t).then(n=>(Z2(e),n))),eBe=e=>{const t=U7(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:w5}=Object,Mwe={},sH="listenerMiddleware",R_t=(e,t)=>{const n=r=>J7e(e,()=>r.abort(e.reason));return(r,o)=>{fce(r);const i=new AbortController;n(i);const a=M_t(async()=>{Z2(e),Z2(i.signal);const l=await r({pause:U7(i.signal),delay:eBe(i.signal),signal:i.signal});return Z2(i.signal),l},()=>i.abort(T_t));return o!=null&&o.autoJoin&&t.push(a.catch(V7)),{result:U7(e)(a),cancel(){i.abort(A_t)}}}},O_t=(e,t)=>{const n=async(r,o)=>{Z2(t);let i=()=>{};const l=[new Promise((c,u)=>{let d=e({predicate:r,effect:(f,h)=>{h.unsubscribe(),c([f,h.getState(),h.getOriginalState()])}});i=()=>{d(),u()}})];o!=null&&l.push(new Promise(c=>setTimeout(c,o,null)));try{const c=await Q7e(t,Promise.race(l));return Z2(t),c}finally{i()}};return(r,o)=>Z7e(n(r,o))},tBe=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:i}=e;if(t)o=Ig(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(xm(21));return fce(i),{predicate:o,type:t,effect:i}},nBe=w5(e=>{const{type:t,predicate:n,effect:r}=tBe(e);return{id:v_t(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(xm(22))}}},{withTypes:()=>nBe}),Rwe=(e,t)=>{const{type:n,effect:r,predicate:o}=tBe(t);return Array.from(e.values()).find(i=>(typeof n=="string"?i.type===n:i.predicate===o)&&i.effect===r)},Fee=e=>{e.pending.forEach(t=>{t.abort($ee)})},D_t=(e,t)=>()=>{for(const n of t.keys())Fee(n);e.clear()},Owe=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},rBe=w5(Ig(`${sH}/add`),{withTypes:()=>rBe}),L_t=Ig(`${sH}/removeAll`),oBe=w5(Ig(`${sH}/remove`),{withTypes:()=>oBe}),$_t=(...e)=>{console.error(`${sH}/error`,...e)},R3=(e={})=>{const t=new Map,n=new Map,r=m=>{const g=n.get(m)??0;n.set(m,g+1)},o=m=>{const g=n.get(m)??1;g===1?n.delete(m):n.set(m,g-1)},{extra:i,onError:a=$_t}=e;fce(a);const l=m=>(m.unsubscribe=()=>t.delete(m.id),t.set(m.id,m),g=>{m.unsubscribe(),g!=null&&g.cancelActive&&Fee(m)}),c=m=>{const g=Rwe(t,m)??nBe(m);return l(g)};w5(c,{withTypes:()=>c});const u=m=>{const g=Rwe(t,m);return g&&(g.unsubscribe(),m.cancelActive&&Fee(g)),!!g};w5(u,{withTypes:()=>u});const d=async(m,g,b,y)=>{const v=new AbortController,x=O_t(c,v.signal),S=[];try{m.pending.add(v),r(m),await Promise.resolve(m.effect(g,w5({},b,{getOriginalState:y,condition:(C,_)=>x(C,_).then(Boolean),take:x,delay:eBe(v.signal),pause:U7(v.signal),extra:i,signal:v.signal,fork:R_t(v.signal,S),unsubscribe:m.unsubscribe,subscribe:()=>{t.set(m.id,m)},cancelActiveListeners:()=>{m.pending.forEach((C,_,N)=>{C!==v&&(C.abort($ee),N.delete(C))})},cancel:()=>{v.abort($ee),m.pending.delete(v)},throwIfCancelled:()=>{Z2(v.signal)}})))}catch(C){C instanceof aH||Owe(a,C,{raisedBy:"effect"})}finally{await Promise.all(S),v.abort(k_t),o(m),m.pending.delete(v)}},f=D_t(t,n);return{middleware:m=>g=>b=>{if(!M7e(b))return g(b);if(rBe.match(b))return c(b.payload);if(L_t.match(b)){f();return}if(oBe.match(b))return u(b.payload);let y=m.getState();const v=()=>{if(y===Mwe)throw new Error(xm(23));return y};let x;try{if(x=g(b),t.size>0){const S=m.getState(),C=Array.from(t.values());for(const _ of C){let N=!1;try{N=_.predicate(b,S,y)}catch(E){N=!1,Owe(a,E,{raisedBy:"predicate"})}N&&d(_,b,m,v)}}}finally{y=Mwe}return x},startListening:c,stopListening:u,clearListeners:f}};function xm(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var F_t={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},iBe=Oh({name:"chartLayout",initialState:F_t,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,o,i;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(o=t.payload.bottom)!==null&&o!==void 0?o:0,e.margin.left=(i=t.payload.left)!==null&&i!==void 0?i:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:B_t,setLayout:z_t,setChartSize:H_t,setScale:V_t}=iBe.actions,U_t=iBe.reducer;function aBe(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function Dwe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function UE(e){for(var t=1;t{if(t&&n){var{width:r,height:o}=n,{align:i,verticalAlign:a,layout:l}=t;if((l==="vertical"||l==="horizontal"&&a==="middle")&&i!=="center"&&Yr(e[i]))return UE(UE({},e),{},{[i]:e[i]+(r||0)});if((l==="horizontal"||l==="vertical"&&i==="center")&&a!=="middle"&&Yr(e[a]))return UE(UE({},e),{},{[a]:e[a]+(o||0)})}return e},qb=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",sBe=(e,t,n,r)=>{if(r)return e.map(l=>l.coordinate);var o,i,a=e.map(l=>(l.coordinate===t&&(o=!0),l.coordinate===n&&(i=!0),l.coordinate));return o||a.push(t),i||a.push(n),a},lBe=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:o,range:i,scale:a,realScaleType:l,isCategorical:c,categoricalDomain:u,tickCount:d,ticks:f,niceTicks:h,axisType:m}=e;if(!a)return null;var g=l==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,b=o==="category"&&a.bandwidth?a.bandwidth()/g:0;if(b=m==="angleAxis"&&i&&i.length>=2?Zd(i[0]-i[1])*2*b:b,f||h){var y=(f||h||[]).map((v,x)=>{var S=r?r.indexOf(v):v;return{coordinate:a(S)+b,value:v,offset:b,index:x}});return y.filter(v=>!Ih(v.coordinate))}return c&&u?u.map((v,x)=>({coordinate:a(v)+b,value:v,index:x,offset:b})):a.ticks&&d!=null?a.ticks(d).map((v,x)=>({coordinate:a(v)+b,value:v,offset:b,index:x})):a.domain().map((v,x)=>({coordinate:a(v)+b,value:r?r[v]:v,index:x,offset:b}))},Lwe=1e-4,Y_t=e=>{var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),o=Math.min(r[0],r[1])-Lwe,i=Math.max(r[0],r[1])+Lwe,a=e(t[0]),l=e(t[n-1]);(ai||li)&&e.domain([t[0],t[n-1]])}},X_t=(e,t)=>{if(!t||t.length!==2||!Yr(t[0])||!Yr(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!Yr(e[0])||e[0]r)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n=0?(e[a][n][0]=o,e[a][n][1]=o+l,o=e[a][n][1]):(e[a][n][0]=i,e[a][n][1]=i+l,i=e[a][n][1])}},J_t=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n=0?(e[i][n][0]=o,e[i][n][1]=o+a,o=e[i][n][1]):(e[i][n][0]=0,e[i][n][1]=0)}},Q_t={sign:Z_t,expand:gCt,none:cP,silhouette:yCt,wiggle:bCt,positive:J_t},ejt=(e,t,n)=>{var r=Q_t[n],o=mCt().keys(t).value((i,a)=>Number(Na(i,a,0))).order(Pee).offset(r);return o(e)};function cBe(e){return e==null?void 0:String(e)}function fP(e){var{axis:t,ticks:n,bandSize:r,entry:o,index:i,dataKey:a}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ls(o[t.dataKey])){var l=d7e(n,"value",o[t.dataKey]);if(l)return l.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var c=Na(o,ls(a)?t.dataKey:a);return ls(c)?null:t.scale(c)}var $we=e=>{var{axis:t,ticks:n,offset:r,bandSize:o,entry:i,index:a}=e;if(t.type==="category")return n[a]?n[a].coordinate+r:null;var l=Na(i,t.dataKey,t.scale.domain()[a]);return ls(l)?null:t.scale(l)-o/2+r},tjt=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return r<=0&&o>=0?0:o<0?o:r}return n[0]},njt=e=>{var t=e.flat(2).filter(Yr);return[Math.min(...t),Math.max(...t)]},rjt=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],ojt=(e,t,n)=>{if(e!=null)return rjt(Object.keys(e).reduce((r,o)=>{var i=e[o],{stackedData:a}=i,l=a.reduce((c,u)=>{var d=aBe(u,t,n),f=njt(d);return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],r[0]),Math.max(l[1],r[1])]},[1/0,-1/0]))},Fwe=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Bwe=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,TS=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var o=Q9(t,d=>d.coordinate),i=1/0,a=1,l=o.length;a{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},ajt=(e,t)=>t==="centric"?e.angle:e.radius,l1=e=>e.layout.width,c1=e=>e.layout.height,sjt=e=>e.layout.scale,uBe=e=>e.layout.margin,lH=fn(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),cH=fn(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),pce="data-recharts-item-index",hce="data-recharts-item-data-key",O3=60;function Hwe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function IL(e){for(var t=1;te.brush.height;function fjt(e){var t=cH(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var o=typeof r.width=="number"?r.width:O3;return n+o}return n},0)}function pjt(e){var t=cH(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var o=typeof r.width=="number"?r.width:O3;return n+o}return n},0)}function hjt(e){var t=lH(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function mjt(e){var t=lH(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Nd=fn([l1,c1,uBe,djt,fjt,pjt,hjt,mjt,I7e,H2t],(e,t,n,r,o,i,a,l,c,u)=>{var d={left:(n.left||0)+o,right:(n.right||0)+i},f={top:(n.top||0)+a,bottom:(n.bottom||0)+l},h=IL(IL({},f),d),m=h.bottom;h.bottom+=r,h=K_t(h,c,u);var g=e-h.left-h.right,b=t-h.top-h.bottom;return IL(IL({brushBottom:m},h),{},{width:Math.max(g,0),height:Math.max(b,0)})}),gjt=fn(Nd,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),mce=fn(l1,c1,(e,t)=>({x:0,y:0,width:e,height:t})),yjt=p.createContext(null),Tu=()=>p.useContext(yjt)!=null,uH=e=>e.brush,dH=fn([uH,Nd,uBe],(e,t,n)=>({height:e.height,x:Yr(e.x)?e.x:t.left,y:Yr(e.y)?e.y:t.top+t.height+t.brushBottom-((n==null?void 0:n.bottom)||0),width:Yr(e.width)?e.width:t.width})),_K={},jK={},NK={},Vwe;function bjt(){return Vwe||(Vwe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:o,edges:i}={}){let a,l=null;const c=i!=null&&i.includes("leading"),u=i==null||i.includes("trailing"),d=()=>{l!==null&&(n.apply(a,l),a=void 0,l=null)},f=()=>{u&&d(),b()};let h=null;const m=()=>{h!=null&&clearTimeout(h),h=setTimeout(()=>{h=null,f()},r)},g=()=>{h!==null&&(clearTimeout(h),h=null)},b=()=>{g(),a=void 0,l=null},y=()=>{d()},v=function(...x){if(o!=null&&o.aborted)return;a=this,l=x;const S=h==null;m(),c&&S&&d()};return v.schedule=m,v.cancel=b,v.flush=y,o==null||o.addEventListener("abort",b,{once:!0}),v}e.debounce=t})(NK)),NK}var Uwe;function vjt(){return Uwe||(Uwe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bjt();function n(r,o=0,i={}){typeof i!="object"&&(i={});const{leading:a=!1,trailing:l=!0,maxWait:c}=i,u=Array(2);a&&(u[0]="leading"),l&&(u[1]="trailing");let d,f=null;const h=t.debounce(function(...b){d=r.apply(this,b),f=null},o,{edges:u}),m=function(...b){return c!=null&&(f===null&&(f=Date.now()),Date.now()-f>=c)?(d=r.apply(this,b),f=Date.now(),h.cancel(),h.schedule(),d):(h.apply(this,b),d)},g=()=>(h.flush(),d);return m.cancel=h.cancel,m.flush=g,m}e.debounce=n})(jK)),jK}var Gwe;function xjt(){return Gwe||(Gwe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vjt();function n(r,o=0,i={}){const{leading:a=!0,trailing:l=!0}=i;return t.debounce(r,o,{leading:a,maxWait:o,trailing:l})}e.throttle=n})(_K)),_K}var EK,Wwe;function wjt(){return Wwe||(Wwe=1,EK=xjt().throttle),EK}var Sjt=wjt();const Cjt=Pc(Sjt);var G7=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;io[a++]))}},dBe=(e,t,n)=>{var{width:r="100%",height:o="100%",aspect:i,maxHeight:a}=n,l=Ox(r)?e:Number(r),c=Ox(o)?t:Number(o);return i&&i>0&&(l?c=l/i:c&&(l=c*i),a&&c!=null&&c>a&&(c=a)),{calculatedWidth:l,calculatedHeight:c}},_jt={width:0,height:0,overflow:"visible"},jjt={width:0,overflowX:"visible"},Njt={height:0,overflowY:"visible"},Ejt={},Pjt=e=>{var{width:t,height:n}=e,r=Ox(t),o=Ox(n);return r&&o?_jt:r?jjt:o?Njt:Ejt};function Ijt(e){var{width:t,height:n,aspect:r}=e,o=t,i=n;return o===void 0&&i===void 0?(o="100%",i="100%"):o===void 0?o=r&&r>0?void 0:"100%":i===void 0&&(i=r&&r>0?void 0:"100%"),{width:o,height:i}}function As(e){return Number.isFinite(e)}function Db(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Bee(){return Bee=Object.assign?Object.assign.bind():function(e){for(var t=1;t({width:n,height:r}),[n,r]);return Mjt(o)?p.createElement(fBe.Provider,{value:o},t):null}var gce=()=>p.useContext(fBe),Rjt=p.forwardRef((e,t)=>{var{aspect:n,initialDimension:r={width:-1,height:-1},width:o,height:i,minWidth:a=0,minHeight:l,maxHeight:c,children:u,debounce:d=0,id:f,className:h,onResize:m,style:g={}}=e,b=p.useRef(null),y=p.useRef();y.current=m,p.useImperativeHandle(t,()=>b.current);var[v,x]=p.useState({containerWidth:r.width,containerHeight:r.height}),S=p.useCallback((I,A)=>{x(R=>{var k=Math.round(I),T=Math.round(A);return R.containerWidth===k&&R.containerHeight===T?R:{containerWidth:k,containerHeight:T}})},[]);p.useEffect(()=>{if(b.current==null||typeof ResizeObserver>"u")return T3;var I=T=>{var D,{width:O,height:z}=T[0].contentRect;S(O,z),(D=y.current)===null||D===void 0||D.call(y,O,z)};d>0&&(I=Cjt(I,d,{trailing:!0,leading:!1}));var A=new ResizeObserver(I),{width:R,height:k}=b.current.getBoundingClientRect();return S(R,k),A.observe(b.current),()=>{A.disconnect()}},[S,d]);var{containerWidth:C,containerHeight:_}=v;G7(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:N,calculatedHeight:E}=dBe(C,_,{width:o,height:i,aspect:n,maxHeight:c});return G7(N!=null&&N>0||E!=null&&E>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,N,E,o,i,a,l,n),p.createElement("div",{id:f?"".concat(f):void 0,className:Ae("recharts-responsive-container",h),style:Kwe(Kwe({},g),{},{width:o,height:i,minWidth:a,minHeight:l,maxHeight:c}),ref:b},p.createElement("div",{style:Pjt({width:o,height:i})},p.createElement(pBe,{width:N,height:E},u)))}),Oo=p.forwardRef((e,t)=>{var n=gce();if(Db(n.width)&&Db(n.height))return e.children;var{width:r,height:o}=Ijt({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:i,calculatedHeight:a}=dBe(void 0,void 0,{width:r,height:o,aspect:e.aspect,maxHeight:e.maxHeight});return Yr(i)&&Yr(a)?p.createElement(pBe,{width:i,height:a},e.children):p.createElement(Rjt,Bee({},e,{width:r,height:o,ref:t}))});function hBe(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var NI=()=>{var e,t=Tu(),n=Hr(gjt),r=Hr(dH),o=(e=Hr(uH))===null||e===void 0?void 0:e.padding;return!t||!r||!o?n:{width:r.width-o.left-o.right,height:r.height-o.top-o.bottom,x:o.left,y:o.top}},Ojt={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},mBe=()=>{var e;return(e=Hr(Nd))!==null&&e!==void 0?e:Ojt},yce=()=>Hr(l1),bce=()=>Hr(c1),Djt=()=>Hr(e=>e.layout.margin),Fi=e=>e.layout.layoutType,Sj=()=>Hr(Fi),Ljt=()=>{var e=Sj();if(e==="horizontal"||e==="vertical")return e},$jt=()=>{var e=Sj();return e!==void 0},fH=e=>{var t=nl(),n=Tu(),{width:r,height:o}=e,i=gce(),a=r,l=o;return i&&(a=i.width>0?i.width:r,l=i.height>0?i.height:o),p.useEffect(()=>{!n&&Db(a)&&Db(l)&&t(H_t({width:a,height:l}))},[t,n,a,l]),null},gBe=Symbol.for("immer-nothing"),Ywe=Symbol.for("immer-draftable"),Im=Symbol.for("immer-state");function I0(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var NM=Object.getPrototypeOf;function pP(e){return!!e&&!!e[Im]}function C_(e){var t;return e?yBe(e)||Array.isArray(e)||!!e[Ywe]||!!((t=e.constructor)!=null&&t[Ywe])||D3(e)||hH(e):!1}var Fjt=Object.prototype.constructor.toString(),Xwe=new WeakMap;function yBe(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=Xwe.get(n);return r===void 0&&(r=Function.toString.call(n),Xwe.set(n,r)),r===Fjt}function W7(e,t,n=!0){pH(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((r,o)=>t(o,r,e))}function pH(e){const t=e[Im];return t?t.type_:Array.isArray(e)?1:D3(e)?2:hH(e)?3:0}function zee(e,t){return pH(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function bBe(e,t,n){const r=pH(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Bjt(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function D3(e){return e instanceof Map}function hH(e){return e instanceof Set}function e2(e){return e.copy_||e.base_}function Hee(e,t){if(D3(e))return new Map(e);if(hH(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=yBe(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Im];let o=Reflect.ownKeys(r);for(let i=0;i1&&Object.defineProperties(e,{set:AL,add:AL,clear:AL,delete:AL}),Object.freeze(e),t&&Object.values(e).forEach(n=>vce(n,!0))),e}function zjt(){I0(2)}var AL={value:zjt};function mH(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Hjt={};function __(e){const t=Hjt[e];return t||I0(0,e),t}var EM;function vBe(){return EM}function Vjt(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Zwe(e,t){t&&(__("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Vee(e){Uee(e),e.drafts_.forEach(Ujt),e.drafts_=null}function Uee(e){e===EM&&(EM=e.parent_)}function Jwe(e){return EM=Vjt(EM,e)}function Ujt(e){const t=e[Im];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Qwe(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Im].modified_&&(Vee(t),I0(4)),C_(e)&&(e=q7(t,e),t.parent_||K7(t,e)),t.patches_&&__("Patches").generateReplacementPatches_(n[Im].base_,e,t.patches_,t.inversePatches_)):e=q7(t,n,[]),Vee(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==gBe?e:void 0}function q7(e,t,n){if(mH(t))return t;const r=e.immer_.shouldUseStrictIteration(),o=t[Im];if(!o)return W7(t,(i,a)=>eSe(e,o,t,i,a,n),r),t;if(o.scope_!==e)return t;if(!o.modified_)return K7(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const i=o.copy_;let a=i,l=!1;o.type_===3&&(a=new Set(i),i.clear(),l=!0),W7(a,(c,u)=>eSe(e,o,i,c,u,n,l),r),K7(e,i,!1),n&&e.patches_&&__("Patches").generatePatches_(o,n,e.patches_,e.inversePatches_)}return o.copy_}function eSe(e,t,n,r,o,i,a){if(o==null||typeof o!="object"&&!a)return;const l=mH(o);if(!(l&&!a)){if(pP(o)){const c=i&&t&&t.type_!==3&&!zee(t.assigned_,r)?i.concat(r):void 0,u=q7(e,o,c);if(bBe(n,r,u),pP(u))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(C_(o)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===o&&l)return;q7(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(D3(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&K7(e,o)}}}function K7(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vce(t,n)}function Gjt(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:vBe(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=xce;n&&(o=[r],i=PM);const{revoke:a,proxy:l}=Proxy.revocable(o,i);return r.draft_=l,r.revoke_=a,l}var xce={get(e,t){if(t===Im)return e;const n=e2(e);if(!zee(n,t))return Wjt(e,n,t);const r=n[t];return e.finalized_||!C_(r)?r:r===PK(e.base_,t)?(IK(e),e.copy_[t]=Wee(r,e)):r},has(e,t){return t in e2(e)},ownKeys(e){return Reflect.ownKeys(e2(e))},set(e,t,n){const r=xBe(e2(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=PK(e2(e),t),i=o==null?void 0:o[Im];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Bjt(n,o)&&(n!==void 0||zee(e.base_,t)))return!0;IK(e),Gee(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return PK(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,IK(e),Gee(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=e2(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){I0(11)},getPrototypeOf(e){return NM(e.base_)},setPrototypeOf(){I0(12)}},PM={};W7(xce,(e,t)=>{PM[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});PM.deleteProperty=function(e,t){return PM.set.call(this,e,t,void 0)};PM.set=function(e,t,n){return xce.set.call(this,e[0],t,n,e[0])};function PK(e,t){const n=e[Im];return(n?e2(n):e)[t]}function Wjt(e,t,n){var o;const r=xBe(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function xBe(e,t){if(!(t in e))return;let n=NM(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=NM(n)}}function Gee(e){e.modified_||(e.modified_=!0,e.parent_&&Gee(e.parent_))}function IK(e){e.copy_||(e.copy_=Hee(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var qjt=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const a=this;return function(c=i,...u){return a.produce(c,d=>n.call(this,d,...u))}}typeof n!="function"&&I0(6),r!==void 0&&typeof r!="function"&&I0(7);let o;if(C_(t)){const i=Jwe(this),a=Wee(t,void 0);let l=!0;try{o=n(a),l=!1}finally{l?Vee(i):Uee(i)}return Zwe(i,r),Qwe(o,i)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===gBe&&(o=void 0),this.autoFreeze_&&vce(o,!0),r){const i=[],a=[];__("Patches").generateReplacementPatches_(t,o,i,a),r(i,a)}return o}else I0(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...l)=>this.produceWithPatches(a,c=>t(c,...l));let r,o;return[this.produce(t,n,(a,l)=>{r=a,o=l}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){C_(e)||I0(8),pP(e)&&(e=Kjt(e));const t=Jwe(this),n=Wee(e,void 0);return n[Im].isManual_=!0,Uee(t),n}finishDraft(e,t){const n=e&&e[Im];(!n||!n.isManual_)&&I0(9);const{scope_:r}=n;return Zwe(r,t),Qwe(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=__("Patches").applyPatches_;return pP(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Wee(e,t){const n=D3(e)?__("MapSet").proxyMap_(e,t):hH(e)?__("MapSet").proxySet_(e,t):Gjt(e,t);return(t?t.scope_:vBe()).drafts_.push(n),n}function Kjt(e){return pP(e)||I0(10,e),wBe(e)}function wBe(e){if(!C_(e)||mH(e))return e;const t=e[Im];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Hee(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Hee(e,!0);return W7(n,(o,i)=>{bBe(n,o,wBe(i))},r),t&&(t.finalized_=!1),n}var Yjt=new qjt;Yjt.produce;var Xjt={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},SBe=Oh({name:"legend",initialState:Xjt,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:Zl()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,o=z0(e).payload.indexOf(n);o>-1&&(e.payload[o]=r)},prepare:Zl()},removeLegendPayload:{reducer(e,t){var n=z0(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:Zl()}}}),{setLegendSize:tSe,setLegendSettings:Zjt,addLegendPayload:CBe,replaceLegendPayload:_Be,removeLegendPayload:jBe}=SBe.actions,Jjt=SBe.reducer,Qjt=["contextPayload"];function qee(){return qee=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t(Zjt(e))},[t,e]),null}function cNt(e){var t=nl();return p.useEffect(()=>(t(tSe(e)),()=>{t(tSe({width:0,height:0}))}),[t,e]),null}function uNt(e,t,n,r){return e==="vertical"&&Yr(t)?{height:t}:e==="horizontal"?{width:n||r}:null}var dNt={align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function yl(e){var t=Fl(e,dNt),n=G2t(),r=FSt(),o=Djt(),{width:i,height:a,wrapperStyle:l,portal:c}=t,[u,d]=A7e([n]),f=yce(),h=bce();if(f==null||h==null)return null;var m=f-((o==null?void 0:o.left)||0)-((o==null?void 0:o.right)||0),g=uNt(t.layout,a,i,m),b=c?l:hP(hP({position:"absolute",width:(g==null?void 0:g.width)||i||"auto",height:(g==null?void 0:g.height)||a||"auto"},sNt(l,t,o,f,h,u)),l),y=c??r;if(y==null||n==null)return null;var v=p.createElement("div",{className:"recharts-legend-wrapper",style:b,ref:d},p.createElement(lNt,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!c&&p.createElement(cNt,{width:u.width,height:u.height}),p.createElement(aNt,qee({},t,g,{margin:o,chartWidth:f,chartHeight:h,contextPayload:n})));return au.createPortal(v,y)}yl.displayName="Legend";function Kee(){return Kee=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{separator:t=" : ",contentStyle:n={},itemStyle:r={},labelStyle:o={},payload:i,formatter:a,itemSorter:l,wrapperClassName:c,labelClassName:u,label:d,labelFormatter:f,accessibilityLayer:h=!1}=e,m=()=>{if(i&&i.length){var _={padding:0,margin:0},N=(l?Q9(i,l):i).map((E,I)=>{if(E.type==="none")return null;var A=E.formatter||a||mNt,{value:R,name:k}=E,T=R,D=k;if(A){var O=A(R,k,E,I,i);if(Array.isArray(O))[T,D]=O;else if(O!=null)T=O;else return null}var z=AK({display:"block",paddingTop:4,paddingBottom:4,color:E.color||"#000"},r);return p.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(I),style:z},Pg(D)?p.createElement("span",{className:"recharts-tooltip-item-name"},D):null,Pg(D)?p.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,p.createElement("span",{className:"recharts-tooltip-item-value"},T),p.createElement("span",{className:"recharts-tooltip-item-unit"},E.unit||""))});return p.createElement("ul",{className:"recharts-tooltip-item-list",style:_},N)}return null},g=AK({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},n),b=AK({margin:0},o),y=!ls(d),v=y?d:"",x=Ae("recharts-default-tooltip",c),S=Ae("recharts-tooltip-label",u);y&&f&&i!==void 0&&i!==null&&(v=f(d,i));var C=h?{role:"status","aria-live":"assertive"}:{};return p.createElement("div",Kee({className:x,style:g},C),p.createElement("p",{className:S,style:b},p.isValidElement(v)?v:"".concat(v)),m())},yT="recharts-tooltip-wrapper",yNt={visibility:"hidden"};function bNt(e){var{coordinate:t,translateX:n,translateY:r}=e;return Ae(yT,{["".concat(yT,"-right")]:Yr(n)&&t&&Yr(t.x)&&n>=t.x,["".concat(yT,"-left")]:Yr(n)&&t&&Yr(t.x)&&n=t.y,["".concat(yT,"-top")]:Yr(r)&&t&&Yr(t.y)&&r0?o:0),f=n[r]+o;if(t[r])return a[r]?d:f;var h=c[r];if(h==null)return 0;if(a[r]){var m=d,g=h;return my?Math.max(d,h):Math.max(f,h)}function vNt(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function xNt(e){var{allowEscapeViewBox:t,coordinate:n,offsetTopLeft:r,position:o,reverseDirection:i,tooltipBox:a,useTranslate3d:l,viewBox:c}=e,u,d,f;return a.height>0&&a.width>0&&n?(d=oSe({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.width,viewBox:c,viewBoxDimension:c.width}),f=oSe({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.height,viewBox:c,viewBoxDimension:c.height}),u=vNt({translateX:d,translateY:f,useTranslate3d:l})):u=yNt,{cssProperties:u,cssClasses:bNt({translateX:d,translateY:f,coordinate:n})}}function iSe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function TL(e){for(var t=1;t{if(t.key==="Escape"){var n,r,o,i;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(n=(r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==null&&n!==void 0?n:0,y:(o=(i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==null&&o!==void 0?o:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,n;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((n=this.props.coordinate)===null||n===void 0?void 0:n.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:n,animationDuration:r,animationEasing:o,children:i,coordinate:a,hasPayload:l,isAnimationActive:c,offset:u,position:d,reverseDirection:f,useTranslate3d:h,viewBox:m,wrapperStyle:g,lastBoundingBox:b,innerRef:y,hasPortalFromProps:v}=this.props,{cssClasses:x,cssProperties:S}=xNt({allowEscapeViewBox:n,coordinate:a,offsetTopLeft:u,position:d,reverseDirection:f,tooltipBox:{height:b.height,width:b.width},useTranslate3d:h,viewBox:m}),C=v?{}:TL(TL({transition:c&&t?"transform ".concat(r,"ms ").concat(o):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&l?"visible":"hidden",position:"absolute",top:0,left:0}),_=TL(TL({},C),{},{visibility:!this.state.dismissed&&t&&l?"visible":"hidden"},g);return p.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:x,style:_,ref:y},i)}}var NBe=()=>{var e;return(e=Hr(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Xee(){return Xee=Object.assign?Object.assign.bind():function(e){for(var t=1;tAs(e.x)&&As(e.y),cSe=e=>e.base!=null&&Y7(e.base)&&Y7(e),bT=e=>e.x,vT=e=>e.y,ENt=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(A3(e));return(n==="curveMonotone"||n==="curveBump")&&t?lSe["".concat(n).concat(t==="vertical"?"Y":"X")]:lSe[n]||X9},PNt=e=>{var{type:t="linear",points:n=[],baseLine:r,layout:o,connectNulls:i=!1}=e,a=ENt(t,o),l=i?n.filter(Y7):n,c;if(Array.isArray(r)){var u=n.map((m,g)=>sSe(sSe({},m),{},{base:r[g]}));o==="vertical"?c=CL().y(vT).x1(bT).x0(m=>m.base.x):c=CL().x(bT).y1(vT).y0(m=>m.base.y);var d=c.defined(cSe).curve(a),f=i?u.filter(cSe):u;return d(f)}o==="vertical"&&Yr(r)?c=CL().y(vT).x1(bT).x0(r):Yr(r)?c=CL().x(bT).y1(vT).y0(r):c=J8e().x(bT).y(vT);var h=c.defined(Y7).curve(a);return h(l)},J2=e=>{var{className:t,points:n,path:r,pathRef:o}=e;if((!n||!n.length)&&!r)return null;var i=n&&n.length?PNt(e):r;return p.createElement("path",Xee({},Af(e),Qle(e),{className:Ae("recharts-curve",t),d:i===null?void 0:i,ref:o}))},INt=["x","y","top","left","width","height","className"];function Zee(){return Zee=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(o,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n),LNt=e=>{var{x:t=0,y:n=0,top:r=0,left:o=0,width:i=0,height:a=0,className:l}=e,c=RNt(e,INt),u=ANt({x:t,y:n,top:r,left:o,width:i,height:a},c);return!Yr(t)||!Yr(n)||!Yr(i)||!Yr(a)||!Yr(r)||!Yr(o)?null:p.createElement("path",Zee({},Tf(u),{className:Ae("recharts-cross",l),d:DNt(t,n,i,a,r,o)}))};function $Nt(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-o:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-o,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function dSe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function fSe(e){for(var t=1;te.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),EBe=(e,t,n)=>e.map(r=>"".concat(HNt(r)," ").concat(t,"ms ").concat(n)).join(","),VNt=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(o=>r.includes(o))),IM=(e,t)=>Object.keys(t).reduce((n,r)=>fSe(fSe({},n),{},{[r]:e(r,t[r])}),{});function pSe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function gd(e){for(var t=1;te+(t-e)*n,Jee=e=>{var{from:t,to:n}=e;return t!==n},PBe=(e,t,n)=>{var r=IM((o,i)=>{if(Jee(i)){var[a,l]=e(i.from,i.to,i.velocity);return gd(gd({},i),{},{from:a,velocity:l})}return i},t);return n<1?IM((o,i)=>Jee(i)?gd(gd({},i),{},{velocity:X7(i.velocity,r[o].velocity,n),from:X7(i.from,r[o].from,n)}):i,t):PBe(e,r,n-1)};function qNt(e,t,n,r,o,i){var a,l=r.reduce((h,m)=>gd(gd({},h),{},{[m]:{from:e[m],velocity:0,to:t[m]}}),{}),c=()=>IM((h,m)=>m.from,l),u=()=>!Object.values(l).filter(Jee).length,d=null,f=h=>{a||(a=h);var m=h-a,g=m/n.dt;l=PBe(n,l,g),o(gd(gd(gd({},e),t),c())),a=h,u()||(d=i.setTimeout(f))};return()=>(d=i.setTimeout(f),()=>{var h;(h=d)===null||h===void 0||h()})}function KNt(e,t,n,r,o,i,a){var l=null,c=o.reduce((f,h)=>gd(gd({},f),{},{[h]:[e[h],t[h]]}),{}),u,d=f=>{u||(u=f);var h=(f-u)/r,m=IM((b,y)=>X7(...y,n(h)),c);if(i(gd(gd(gd({},e),t),m)),h<1)l=a.setTimeout(d);else{var g=IM((b,y)=>X7(...y,n(1)),c);i(gd(gd(gd({},e),t),g))}};return()=>(l=a.setTimeout(d),()=>{var f;(f=l)===null||f===void 0||f()})}const YNt=(e,t,n,r,o,i)=>{var a=VNt(e,t);return n==null?()=>(o(gd(gd({},e),t)),()=>{}):n.isStepper===!0?qNt(e,t,n,a,o,i):KNt(e,t,n,r,a,o,i)};var Z7=1e-4,IBe=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],ABe=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),hSe=(e,t)=>n=>{var r=IBe(e,t);return ABe(r,n)},XNt=(e,t)=>n=>{var r=IBe(e,t),o=[...r.map((i,a)=>i*a).slice(1),0];return ABe(o,n)},ZNt=function(){for(var t=arguments.length,n=new Array(t),r=0;rparseFloat(l));return[a[0],a[1],a[2],a[3]]}}}return n.length===4?n:[0,0,1,1]},JNt=(e,t,n,r)=>{var o=hSe(e,n),i=hSe(t,r),a=XNt(e,n),l=u=>u>1?1:u<0?0:u,c=u=>{for(var d=u>1?1:u,f=d,h=0;h<8;++h){var m=o(f)-d,g=a(f);if(Math.abs(m-d)0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:o=17}=t,i=(a,l,c)=>{var u=-(a-l)*n,d=c*r,f=c+(u-d)*o/1e3,h=c*o/1e3+a;return Math.abs(h-l){if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return mSe(e);case"spring":return QNt();default:if(e.split("(")[0]==="cubic-bezier")return mSe(e)}return typeof e=="function"?e:null};function tEt(e){var t,n=()=>null,r=!1,o=null,i=a=>{if(!r){if(Array.isArray(a)){if(!a.length)return;var l=a,[c,...u]=l;if(typeof c=="number"){o=e.setTimeout(i.bind(null,u),c);return}i(c),o=e.setTimeout(i.bind(null,u));return}typeof a=="string"&&(t=a,n(t)),typeof a=="object"&&(t=a,n(t)),typeof a=="function"&&a()}};return{stop:()=>{r=!0},start:a=>{r=!1,o&&(o(),o=null),i(a)},subscribe:a=>(n=a,()=>{n=()=>null}),getTimeoutController:()=>e}}class nEt{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),o=null,i=a=>{a-r>=n?t(a):typeof requestAnimationFrame=="function"&&(o=requestAnimationFrame(i))};return o=requestAnimationFrame(i),()=>{o!=null&&cancelAnimationFrame(o)}}}function rEt(){return tEt(new nEt)}var oEt=p.createContext(rEt);function iEt(e,t){var n=p.useContext(oEt);return p.useMemo(()=>t??n(e),[e,t,n])}var aEt=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),EI={devToolsEnabled:!1,isSsr:aEt()},sEt={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},gSe={t:0},TK={t:1};function Cj(e){var t=Fl(e,sEt),{isActive:n,canBegin:r,duration:o,easing:i,begin:a,onAnimationEnd:l,onAnimationStart:c,children:u}=t,d=n==="auto"?!EI.isSsr:n,f=iEt(t.animationId,t.animationManager),[h,m]=p.useState(d?gSe:TK),g=p.useRef(null);return p.useEffect(()=>{d||m(TK)},[d]),p.useEffect(()=>{if(!d||!r)return T3;var b=YNt(gSe,TK,eEt(i),o,m,f.getTimeoutController()),y=()=>{g.current=b()};return f.start([c,a,y,o,l]),()=>{f.stop(),g.current&&g.current(),l()}},[d,r,o,i,a,c,l,f]),u(h.t)}function _j(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=p.useRef(wM(t)),r=p.useRef(e);return r.current!==e&&(n.current=wM(t),r.current=e),n.current}var lEt=["radius"],cEt=["radius"];function ySe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function bSe(e){for(var t=1;t{var i=Math.min(Math.abs(n)/2,Math.abs(r)/2),a=r>=0?1:-1,l=n>=0?1:-1,c=r>=0&&n>=0||r<0&&n<0?1:0,u;if(i>0&&o instanceof Array){for(var d=[0,0,0,0],f=0,h=4;fi?i:o[f];u="M".concat(e,",").concat(t+a*d[0]),d[0]>0&&(u+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(e+l*d[0],",").concat(t)),u+="L ".concat(e+n-l*d[1],",").concat(t),d[1]>0&&(u+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, + `).concat(e+n,",").concat(t+a*d[1])),u+="L ".concat(e+n,",").concat(t+r-a*d[2]),d[2]>0&&(u+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`, + `).concat(e+n-l*d[2],",").concat(t+r)),u+="L ".concat(e+l*d[3],",").concat(t+r),d[3]>0&&(u+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`, + `).concat(e,",").concat(t+r-a*d[3])),u+="Z"}else if(i>0&&o===+o&&o>0){var m=Math.min(i,o);u="M ".concat(e,",").concat(t+a*m,` + A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(e+l*m,",").concat(t,` + L `).concat(e+n-l*m,",").concat(t,` + A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(e+n,",").concat(t+a*m,` + L `).concat(e+n,",").concat(t+r-a*m,` + A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(e+n-l*m,",").concat(t+r,` + L `).concat(e+l*m,",").concat(t+r,` + A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(e,",").concat(t+r-a*m," Z")}else u="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return u},wSe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},TBe=e=>{var t=Fl(e,wSe),n=p.useRef(null),[r,o]=p.useState(-1);p.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var U=n.current.getTotalLength();U&&o(U)}catch{}},[]);var{x:i,y:a,width:l,height:c,radius:u,className:d}=t,{animationEasing:f,animationDuration:h,animationBegin:m,isAnimationActive:g,isUpdateAnimationActive:b}=t,y=p.useRef(l),v=p.useRef(c),x=p.useRef(i),S=p.useRef(a),C=p.useMemo(()=>({x:i,y:a,width:l,height:c,radius:u}),[i,a,l,c,u]),_=_j(C,"rectangle-");if(i!==+i||a!==+a||l!==+l||c!==+c||l===0||c===0)return null;var N=Ae("recharts-rectangle",d);if(!b){var E=Tf(t),{radius:I}=E,A=vSe(E,lEt);return p.createElement("path",J7({},A,{radius:typeof u=="number"?u:void 0,className:N,d:xSe(i,a,l,c,u)}))}var R=y.current,k=v.current,T=x.current,D=S.current,O="0px ".concat(r===-1?1:r,"px"),z="".concat(r,"px 0px"),F=EBe(["strokeDasharray"],h,typeof f=="string"?f:wSe.animationEasing);return p.createElement(Cj,{animationId:_,key:_,canBegin:r>0,duration:h,easing:f,isActive:b,begin:m},U=>{var G=ba(R,l,U),W=ba(k,c,U),Y=ba(T,i,U),B=ba(D,a,U);n.current&&(y.current=G,v.current=W,x.current=Y,S.current=B);var $;g?U>0?$={transition:F,strokeDasharray:z}:$={strokeDasharray:O}:$={strokeDasharray:z};var K=Tf(t),{radius:q}=K,Z=vSe(K,cEt);return p.createElement("path",J7({},Z,{radius:typeof u=="number"?u:void 0,className:N,d:xSe(Y,B,G,W,u),ref:n,style:bSe(bSe({},$),t.style)}))})};function SSe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function CSe(e){for(var t=1;te*180/Math.PI,Wu=(e,t,n,r)=>({x:e+Math.cos(-Q7*r)*n,y:t+Math.sin(-Q7*r)*n}),kBe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},bEt=(e,t)=>{var{x:n,y:r}=e,{x:o,y:i}=t;return Math.sqrt((n-o)**2+(r-i)**2)},vEt=(e,t)=>{var{x:n,y:r}=e,{cx:o,cy:i}=t,a=bEt({x:n,y:r},{x:o,y:i});if(a<=0)return{radius:a,angle:0};var l=(n-o)/a,c=Math.acos(l);return r>i&&(c=2*Math.PI-c),{radius:a,angle:yEt(c),angleInRadian:c}},xEt=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),o=Math.floor(n/360),i=Math.min(r,o);return{startAngle:t-i*360,endAngle:n-i*360}},wEt=(e,t)=>{var{startAngle:n,endAngle:r}=t,o=Math.floor(n/360),i=Math.floor(r/360),a=Math.min(o,i);return e+a*360},SEt=(e,t)=>{var{chartX:n,chartY:r}=e,{radius:o,angle:i}=vEt({x:n,y:r},t),{innerRadius:a,outerRadius:l}=t;if(ol||o===0)return null;var{startAngle:c,endAngle:u}=xEt(t),d=i,f;if(c<=u){for(;d>u;)d-=360;for(;d=c&&d<=u}else{for(;d>c;)d-=360;for(;d=u&&d<=c}return f?CSe(CSe({},t),{},{radius:o,angle:wEt(d,t)}):null};function MBe(e){var{cx:t,cy:n,radius:r,startAngle:o,endAngle:i}=e,a=Wu(t,n,r,o),l=Wu(t,n,r,i);return{points:[a,l],cx:t,cy:n,radius:r,startAngle:o,endAngle:i}}function Qee(){return Qee=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var n=Zd(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},kL=e=>{var{cx:t,cy:n,radius:r,angle:o,sign:i,isExternal:a,cornerRadius:l,cornerIsExternal:c}=e,u=l*(a?1:-1)+r,d=Math.asin(l/u)/Q7,f=c?o:o+i*d,h=Wu(t,n,u,f),m=Wu(t,n,r,f),g=c?o-i*d:o,b=Wu(t,n,u*Math.cos(d*Q7),g);return{center:h,circleTangency:m,lineTangency:b,theta:d}},RBe=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:i,endAngle:a}=e,l=CEt(i,a),c=i+l,u=Wu(t,n,o,i),d=Wu(t,n,o,c),f="M ".concat(u.x,",").concat(u.y,` + A `).concat(o,",").concat(o,`,0, + `).concat(+(Math.abs(l)>180),",").concat(+(i>c),`, + `).concat(d.x,",").concat(d.y,` + `);if(r>0){var h=Wu(t,n,r,i),m=Wu(t,n,r,c);f+="L ".concat(m.x,",").concat(m.y,` + A `).concat(r,",").concat(r,`,0, + `).concat(+(Math.abs(l)>180),",").concat(+(i<=c),`, + `).concat(h.x,",").concat(h.y," Z")}else f+="L ".concat(t,",").concat(n," Z");return f},_Et=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:o,cornerRadius:i,forceCornerRadius:a,cornerIsExternal:l,startAngle:c,endAngle:u}=e,d=Zd(u-c),{circleTangency:f,lineTangency:h,theta:m}=kL({cx:t,cy:n,radius:o,angle:c,sign:d,cornerRadius:i,cornerIsExternal:l}),{circleTangency:g,lineTangency:b,theta:y}=kL({cx:t,cy:n,radius:o,angle:u,sign:-d,cornerRadius:i,cornerIsExternal:l}),v=l?Math.abs(c-u):Math.abs(c-u)-m-y;if(v<0)return a?"M ".concat(h.x,",").concat(h.y,` + a`).concat(i,",").concat(i,",0,0,1,").concat(i*2,`,0 + a`).concat(i,",").concat(i,",0,0,1,").concat(-i*2,`,0 + `):RBe({cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:c,endAngle:u});var x="M ".concat(h.x,",").concat(h.y,` + A`).concat(i,",").concat(i,",0,0,").concat(+(d<0),",").concat(f.x,",").concat(f.y,` + A`).concat(o,",").concat(o,",0,").concat(+(v>180),",").concat(+(d<0),",").concat(g.x,",").concat(g.y,` + A`).concat(i,",").concat(i,",0,0,").concat(+(d<0),",").concat(b.x,",").concat(b.y,` + `);if(r>0){var{circleTangency:S,lineTangency:C,theta:_}=kL({cx:t,cy:n,radius:r,angle:c,sign:d,isExternal:!0,cornerRadius:i,cornerIsExternal:l}),{circleTangency:N,lineTangency:E,theta:I}=kL({cx:t,cy:n,radius:r,angle:u,sign:-d,isExternal:!0,cornerRadius:i,cornerIsExternal:l}),A=l?Math.abs(c-u):Math.abs(c-u)-_-I;if(A<0&&i===0)return"".concat(x,"L").concat(t,",").concat(n,"Z");x+="L".concat(E.x,",").concat(E.y,` + A`).concat(i,",").concat(i,",0,0,").concat(+(d<0),",").concat(N.x,",").concat(N.y,` + A`).concat(r,",").concat(r,",0,").concat(+(A>180),",").concat(+(d>0),",").concat(S.x,",").concat(S.y,` + A`).concat(i,",").concat(i,",0,0,").concat(+(d<0),",").concat(C.x,",").concat(C.y,"Z")}else x+="L".concat(t,",").concat(n,"Z");return x},jEt={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},OBe=e=>{var t=Fl(e,jEt),{cx:n,cy:r,innerRadius:o,outerRadius:i,cornerRadius:a,forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d,className:f}=t;if(i0&&Math.abs(u-d)<360?b=_Et({cx:n,cy:r,innerRadius:o,outerRadius:i,cornerRadius:Math.min(g,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):b=RBe({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:u,endAngle:d}),p.createElement("path",Qee({},Tf(t),{className:h,d:b}))};function NEt(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(p7e(t)){if(e==="centric"){var{cx:r,cy:o,innerRadius:i,outerRadius:a,angle:l}=t,c=Wu(r,o,i,l),u=Wu(r,o,a,l);return[{x:c.x,y:c.y},{x:u.x,y:u.y}]}return MBe(t)}}var kK={},MK={},RK={},_Se;function EEt(){return _Se||(_Se=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=E7e();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(RK)),RK}var jSe;function PEt(){return jSe||(jSe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EEt();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(MK)),MK}var NSe;function IEt(){return NSe||(NSe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=P7e(),n=PEt();function r(o,i,a){a&&typeof a!="number"&&t.isIterateeCall(o,i,a)&&(i=a=void 0),o=n.toFinite(o),i===void 0?(i=o,o=0):i=n.toFinite(i),a=a===void 0?ot?1:e>=t?0:NaN}function kEt(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function wce(e){let t,n,r;e.length!==2?(t=uS,n=(l,c)=>uS(e(l),c),r=(l,c)=>e(l)-c):(t=e===uS||e===kEt?e:MEt,n=e,r=e);function o(l,c,u=0,d=l.length){if(u>>1;n(l[f],c)<0?u=f+1:d=f}while(u>>1;n(l[f],c)<=0?u=f+1:d=f}while(uu&&r(l[f-1],c)>-r(l[f],c)?f-1:f}return{left:o,center:a,right:i}}function MEt(){return 0}function LBe(e){return e===null?NaN:+e}function*REt(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const OEt=wce(uS),L3=OEt.right;wce(LBe).center;class PSe extends Map{constructor(t,n=$Et){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(ISe(this,t))}has(t){return super.has(ISe(this,t))}set(t,n){return super.set(DEt(this,t),n)}delete(t){return super.delete(LEt(this,t))}}function ISe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function DEt({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function LEt({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function $Et(e){return e!==null&&typeof e=="object"?e.valueOf():e}function FEt(e=uS){if(e===uS)return $Be;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function $Be(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const BEt=Math.sqrt(50),zEt=Math.sqrt(10),HEt=Math.sqrt(2);function eB(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=BEt?10:i>=zEt?5:i>=HEt?2:1;let l,c,u;return o<0?(u=Math.pow(10,-o)/a,l=Math.round(e*u),c=Math.round(t*u),l/ut&&--c,u=-u):(u=Math.pow(10,o)*a,l=Math.round(e/u),c=Math.round(t/u),l*ut&&--c),c0))return[];if(e===t)return[e];const r=t=o))return[];const l=i-o+1,c=new Array(l);if(r)if(a<0)for(let u=0;u=r)&&(n=r);return n}function TSe(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function FBe(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=o===void 0?$Be:FEt(o);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,d=Math.log(c),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),m=Math.max(n,Math.floor(t-u*f/c+h)),g=Math.min(r,Math.floor(t+(c-u)*f/c+h));FBe(e,t,m,g,o)}const i=e[t];let a=n,l=r;for(xT(e,n,t),o(e[r],i)>0&&xT(e,n,r);a0;)--l}o(e[n],i)===0?xT(e,n,l):(++l,xT(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function xT(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function VEt(e,t,n){if(e=Float64Array.from(REt(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return TSe(e);if(t>=1)return ASe(e);var r,o=(r-1)*t,i=Math.floor(o),a=ASe(FBe(e,i).subarray(0,i+1)),l=TSe(e.subarray(i+1));return a+(l-a)*(o-i)}}function UEt(e,t,n=LBe){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e),l=+n(e[i+1],i+1,e);return a+(l-a)*(o-i)}}function GEt(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ML(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ML(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=KEt.exec(e))?new wh(t[1],t[2],t[3],1):(t=YEt.exec(e))?new wh(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=XEt.exec(e))?ML(t[1],t[2],t[3],t[4]):(t=ZEt.exec(e))?ML(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=JEt.exec(e))?$Se(t[1],t[2]/100,t[3]/100,1):(t=QEt.exec(e))?$Se(t[1],t[2]/100,t[3]/100,t[4]):kSe.hasOwnProperty(e)?OSe(kSe[e]):e==="transparent"?new wh(NaN,NaN,NaN,0):null}function OSe(e){return new wh(e>>16&255,e>>8&255,e&255,1)}function ML(e,t,n,r){return r<=0&&(e=t=n=NaN),new wh(e,t,n,r)}function n5t(e){return e instanceof $3||(e=j_(e)),e?(e=e.rgb(),new wh(e.r,e.g,e.b,e.opacity)):new wh}function ote(e,t,n,r){return arguments.length===1?n5t(e):new wh(e,t,n,r??1)}function wh(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}_ce(wh,ote,zBe($3,{brighter(e){return e=e==null?tB:Math.pow(tB,e),new wh(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?AM:Math.pow(AM,e),new wh(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wh(Q2(this.r),Q2(this.g),Q2(this.b),nB(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:DSe,formatHex:DSe,formatHex8:r5t,formatRgb:LSe,toString:LSe}));function DSe(){return`#${S2(this.r)}${S2(this.g)}${S2(this.b)}`}function r5t(){return`#${S2(this.r)}${S2(this.g)}${S2(this.b)}${S2((isNaN(this.opacity)?1:this.opacity)*255)}`}function LSe(){const e=nB(this.opacity);return`${e===1?"rgb(":"rgba("}${Q2(this.r)}, ${Q2(this.g)}, ${Q2(this.b)}${e===1?")":`, ${e})`}`}function nB(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Q2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function S2(e){return e=Q2(e),(e<16?"0":"")+e.toString(16)}function $Se(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new A0(e,t,n,r)}function HBe(e){if(e instanceof A0)return new A0(e.h,e.s,e.l,e.opacity);if(e instanceof $3||(e=j_(e)),!e)return new A0;if(e instanceof A0)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,l=i-o,c=(i+o)/2;return l?(t===i?a=(n-r)/l+(n0&&c<1?0:a,new A0(a,l,c,e.opacity)}function o5t(e,t,n,r){return arguments.length===1?HBe(e):new A0(e,t,n,r??1)}function A0(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}_ce(A0,o5t,zBe($3,{brighter(e){return e=e==null?tB:Math.pow(tB,e),new A0(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?AM:Math.pow(AM,e),new A0(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new wh(DK(e>=240?e-240:e+120,o,r),DK(e,o,r),DK(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new A0(FSe(this.h),RL(this.s),RL(this.l),nB(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=nB(this.opacity);return`${e===1?"hsl(":"hsla("}${FSe(this.h)}, ${RL(this.s)*100}%, ${RL(this.l)*100}%${e===1?")":`, ${e})`}`}}));function FSe(e){return e=(e||0)%360,e<0?e+360:e}function RL(e){return Math.max(0,Math.min(1,e||0))}function DK(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const jce=e=>()=>e;function i5t(e,t){return function(n){return e+n*t}}function a5t(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function s5t(e){return(e=+e)==1?VBe:function(t,n){return n-t?a5t(t,n,e):jce(isNaN(t)?n:t)}}function VBe(e,t){var n=t-e;return n?i5t(e,n):jce(isNaN(e)?t:e)}const rB=(function e(t){var n=s5t(t);function r(o,i){var a=n((o=ote(o)).r,(i=ote(i)).r),l=n(o.g,i.g),c=n(o.b,i.b),u=VBe(o.opacity,i.opacity);return function(d){return o.r=a(d),o.g=l(d),o.b=c(d),o.opacity=u(d),o+""}}return r.gamma=e,r})(1);function l5t(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;on&&(i=t.slice(n,i),l[a]?l[a]+=i:l[++a]=i),(r=r[0])===(o=o[0])?l[a]?l[a]+=o:l[++a]=o:(l[++a]=null,c.push({i:a,x:N0(r,o)})),n=LK.lastIndex;return n180?d+=360:d-u>180&&(u+=360),h.push({i:f.push(o(f)+"rotate(",null,r)-2,x:N0(u,d)})):d&&f.push(o(f)+"rotate("+d+r)}function l(u,d,f,h){u!==d?h.push({i:f.push(o(f)+"skewX(",null,r)-2,x:N0(u,d)}):d&&f.push(o(f)+"skewX("+d+r)}function c(u,d,f,h,m,g){if(u!==f||d!==h){var b=m.push(o(m)+"scale(",null,",",null,")");g.push({i:b-4,x:N0(u,f)},{i:b-2,x:N0(d,h)})}else(f!==1||h!==1)&&m.push(o(m)+"scale("+f+","+h+")")}return function(u,d){var f=[],h=[];return u=e(u),d=e(d),i(u.translateX,u.translateY,d.translateX,d.translateY,f,h),a(u.rotate,d.rotate,f,h),l(u.skewX,d.skewX,f,h),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,h),u=d=null,function(m){for(var g=-1,b=h.length,y;++gt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function N5t(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o2?E5t:N5t,c=u=null,f}function f(h){return h==null||isNaN(h=+h)?i:(c||(c=l(e.map(r),t,n)))(r(a(h)))}return f.invert=function(h){return a(o((u||(u=l(t,e.map(r),N0)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,oB),d()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),d()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=Nce,d()},f.clamp=function(h){return arguments.length?(a=h?!0:Ap,d()):a!==Ap},f.interpolate=function(h){return arguments.length?(n=h,d()):n},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,m){return r=h,o=m,d()}}function Ece(){return gH()(Ap,Ap)}function P5t(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function iB(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function mP(e){return e=iB(Math.abs(e)),e?e[1]:NaN}function I5t(e,t){return function(n,r){for(var o=n.length,i=[],a=0,l=e[0],c=0;o>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),i.push(n.substring(o-=l,o+l)),!((c+=l+1)>r));)l=e[a=(a+1)%e.length];return i.reverse().join(t)}}function A5t(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var T5t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function kM(e){if(!(t=T5t.exec(e)))throw new Error("invalid format: "+e);var t;return new Pce({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}kM.prototype=Pce.prototype;function Pce(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Pce.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function k5t(e){e:for(var t=e.length,n=1,r=-1,o;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var qBe;function M5t(e,t){var n=iB(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(qBe=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+iB(e,Math.max(0,t+i-1))[0]}function VSe(e,t){var n=iB(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const USe={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:P5t,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>VSe(e*100,t),r:VSe,s:M5t,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function GSe(e){return e}var WSe=Array.prototype.map,qSe=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function R5t(e){var t=e.grouping===void 0||e.thousands===void 0?GSe:I5t(WSe.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?GSe:A5t(WSe.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f){f=kM(f);var h=f.fill,m=f.align,g=f.sign,b=f.symbol,y=f.zero,v=f.width,x=f.comma,S=f.precision,C=f.trim,_=f.type;_==="n"?(x=!0,_="g"):USe[_]||(S===void 0&&(S=12),C=!0,_="g"),(y||h==="0"&&m==="=")&&(y=!0,h="0",m="=");var N=b==="$"?n:b==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",E=b==="$"?r:/[%p]/.test(_)?a:"",I=USe[_],A=/[defgprs%]/.test(_);S=S===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function R(k){var T=N,D=E,O,z,F;if(_==="c")D=I(k)+D,k="";else{k=+k;var U=k<0||1/k<0;if(k=isNaN(k)?c:I(Math.abs(k),S),C&&(k=k5t(k)),U&&+k==0&&g!=="+"&&(U=!1),T=(U?g==="("?g:l:g==="-"||g==="("?"":g)+T,D=(_==="s"?qSe[8+qBe/3]:"")+D+(U&&g==="("?")":""),A){for(O=-1,z=k.length;++OF||F>57){D=(F===46?o+k.slice(O+1):k.slice(O))+D,k=k.slice(0,O);break}}}x&&!y&&(k=t(k,1/0));var G=T.length+k.length+D.length,W=G>1)+T+k+D+W.slice(G);break;default:k=W+T+k+D;break}return i(k)}return R.toString=function(){return f+""},R}function d(f,h){var m=u((f=kM(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(mP(h)/3)))*3,b=Math.pow(10,-g),y=qSe[8+g/3];return function(v){return m(b*v)+y}}return{format:u,formatPrefix:d}}var DL,Ice,KBe;O5t({thousands:",",grouping:[3],currency:["$",""]});function O5t(e){return DL=R5t(e),Ice=DL.format,KBe=DL.formatPrefix,DL}function D5t(e){return Math.max(0,-mP(Math.abs(e)))}function L5t(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(mP(t)/3)))*3-mP(Math.abs(e)))}function $5t(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,mP(t)-mP(e))+1}function YBe(e,t,n,r){var o=nte(e,t,n),i;switch(r=kM(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=L5t(o,a))&&(r.precision=i),KBe(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=$5t(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=D5t(o))&&(r.precision=i-(r.type==="%")*2);break}}return Ice(r)}function eC(e){var t=e.domain;return e.ticks=function(n){var r=t();return ete(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return YBe(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],l=r[i],c,u,d=10;for(l0;){if(u=tte(a,l,n),u===c)return r[o]=a,r[i]=l,t(r);if(u>0)a=Math.floor(a/u)*u,l=Math.ceil(l/u)*u;else if(u<0)a=Math.ceil(a*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function XBe(){var e=Ece();return e.copy=function(){return F3(e,XBe())},Ug.apply(e,arguments),eC(e)}function ZBe(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,oB),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return ZBe(e).unknown(t)},e=arguments.length?Array.from(e,oB):[0,1],eC(n)}function JBe(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return iMath.pow(e,t)}function V5t(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function XSe(e){return(t,n)=>-e(-t,n)}function Ace(e){const t=e(KSe,YSe),n=t.domain;let r=10,o,i;function a(){return o=V5t(r),i=H5t(r),n()[0]<0?(o=XSe(o),i=XSe(i),e(F5t,B5t)):e(KSe,YSe),t}return t.base=function(l){return arguments.length?(r=+l,a()):r},t.domain=function(l){return arguments.length?(n(l),a()):n()},t.ticks=l=>{const c=n();let u=c[0],d=c[c.length-1];const f=d0){for(;h<=m;++h)for(g=1;gd)break;v.push(b)}}else for(;h<=m;++h)for(g=r-1;g>=1;--g)if(b=h>0?g/i(-h):g*i(h),!(bd)break;v.push(b)}v.length*2{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=kM(c)).precision==null&&(c.trim=!0),c=Ice(c)),l===1/0)return c;const u=Math.max(1,r*l/t.ticks().length);return d=>{let f=d/i(Math.round(o(d)));return f*rn(JBe(n(),{floor:l=>i(Math.floor(o(l))),ceil:l=>i(Math.ceil(o(l)))})),t}function QBe(){const e=Ace(gH()).domain([1,10]);return e.copy=()=>F3(e,QBe()).base(e.base()),Ug.apply(e,arguments),e}function ZSe(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function JSe(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Tce(e){var t=1,n=e(ZSe(t),JSe(t));return n.constant=function(r){return arguments.length?e(ZSe(t=+r),JSe(t)):t},eC(n)}function eze(){var e=Tce(gH());return e.copy=function(){return F3(e,eze()).constant(e.constant())},Ug.apply(e,arguments)}function QSe(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function U5t(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function G5t(e){return e<0?-e*e:e*e}function kce(e){var t=e(Ap,Ap),n=1;function r(){return n===1?e(Ap,Ap):n===.5?e(U5t,G5t):e(QSe(n),QSe(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},eC(t)}function Mce(){var e=kce(gH());return e.copy=function(){return F3(e,Mce()).exponent(e.exponent())},Ug.apply(e,arguments),e}function W5t(){return Mce.apply(null,arguments).exponent(.5)}function eCe(e){return Math.sign(e)*e*e}function q5t(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function tze(){var e=Ece(),t=[0,1],n=!1,r;function o(i){var a=q5t(e(i));return isNaN(a)?r:n?Math.round(a):a}return o.invert=function(i){return e.invert(eCe(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,oB)).map(eCe)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(n=!!i,o):n},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return tze(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Ug.apply(o,arguments),eC(o)}function nze(){var e=[],t=[],n=[],r;function o(){var a=0,l=Math.max(1,t.length);for(n=new Array(l-1);++a0?n[l-1]:e[0],l=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(c){return arguments.length&&(i=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return rze().domain([e,t]).range(o).unknown(i)},Ug.apply(eC(a),arguments)}function oze(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[L3(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return oze().domain(e).range(t).unknown(n)},Ug.apply(o,arguments)}const $K=new Date,FK=new Date;function Ed(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),l=o.ceil(i);return i-a(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,l)=>{const c=[];if(i=o.ceil(i),l=l==null?1:Math.floor(l),!(i0))return c;let u;do c.push(u=new Date(+i)),t(i,l),e(i);while(uEd(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,l)=>{if(a>=a)if(l<0)for(;++l<=0;)for(;t(a,-1),!i(a););else for(;--l>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>($K.setTime(+i),FK.setTime(+a),e($K),e(FK),Math.floor(n($K,FK))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const aB=Ed(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);aB.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ed(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):aB);aB.range;const fx=1e3,yg=fx*60,px=yg*60,Lx=px*24,Rce=Lx*7,tCe=Lx*30,BK=Lx*365,C2=Ed(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*fx)},(e,t)=>(t-e)/fx,e=>e.getUTCSeconds());C2.range;const Oce=Ed(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*fx)},(e,t)=>{e.setTime(+e+t*yg)},(e,t)=>(t-e)/yg,e=>e.getMinutes());Oce.range;const Dce=Ed(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*yg)},(e,t)=>(t-e)/yg,e=>e.getUTCMinutes());Dce.range;const Lce=Ed(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*fx-e.getMinutes()*yg)},(e,t)=>{e.setTime(+e+t*px)},(e,t)=>(t-e)/px,e=>e.getHours());Lce.range;const $ce=Ed(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*px)},(e,t)=>(t-e)/px,e=>e.getUTCHours());$ce.range;const B3=Ed(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*yg)/Lx,e=>e.getDate()-1);B3.range;const yH=Ed(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Lx,e=>e.getUTCDate()-1);yH.range;const ize=Ed(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Lx,e=>Math.floor(e/Lx));ize.range;function jj(e){return Ed(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*yg)/Rce)}const bH=jj(0),sB=jj(1),K5t=jj(2),Y5t=jj(3),gP=jj(4),X5t=jj(5),Z5t=jj(6);bH.range;sB.range;K5t.range;Y5t.range;gP.range;X5t.range;Z5t.range;function Nj(e){return Ed(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Rce)}const vH=Nj(0),lB=Nj(1),J5t=Nj(2),Q5t=Nj(3),yP=Nj(4),ePt=Nj(5),tPt=Nj(6);vH.range;lB.range;J5t.range;Q5t.range;yP.range;ePt.range;tPt.range;const Fce=Ed(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Fce.range;const Bce=Ed(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Bce.range;const $x=Ed(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());$x.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ed(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});$x.range;const Fx=Ed(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Fx.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ed(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Fx.range;function aze(e,t,n,r,o,i){const a=[[C2,1,fx],[C2,5,5*fx],[C2,15,15*fx],[C2,30,30*fx],[i,1,yg],[i,5,5*yg],[i,15,15*yg],[i,30,30*yg],[o,1,px],[o,3,3*px],[o,6,6*px],[o,12,12*px],[r,1,Lx],[r,2,2*Lx],[n,1,Rce],[t,1,tCe],[t,3,3*tCe],[e,1,BK]];function l(u,d,f){const h=dy).right(a,h);if(m===a.length)return e.every(nte(u/BK,d/BK,f));if(m===0)return aB.every(Math.max(nte(u,d,f),1));const[g,b]=a[h/a[m-1][2]53)return null;"w"in se||(se.w=1),"Z"in se?(fe=HK(wT(se.y,0,1)),te=fe.getUTCDay(),fe=te>4||te===0?lB.ceil(fe):lB(fe),fe=yH.offset(fe,(se.V-1)*7),se.y=fe.getUTCFullYear(),se.m=fe.getUTCMonth(),se.d=fe.getUTCDate()+(se.w+6)%7):(fe=zK(wT(se.y,0,1)),te=fe.getDay(),fe=te>4||te===0?sB.ceil(fe):sB(fe),fe=B3.offset(fe,(se.V-1)*7),se.y=fe.getFullYear(),se.m=fe.getMonth(),se.d=fe.getDate()+(se.w+6)%7)}else("W"in se||"U"in se)&&("w"in se||(se.w="u"in se?se.u%7:"W"in se?1:0),te="Z"in se?HK(wT(se.y,0,1)).getUTCDay():zK(wT(se.y,0,1)).getDay(),se.m=0,se.d="W"in se?(se.w+6)%7+se.W*7-(te+5)%7:se.w+se.U*7-(te+6)%7);return"Z"in se?(se.H+=se.Z/100|0,se.M+=se.Z%100,HK(se)):zK(se)}}function I(ae,ue,ce,se){for(var me=0,fe=ue.length,te=ce.length,ye,ve;me=te)return-1;if(ye=ue.charCodeAt(me++),ye===37){if(ye=ue.charAt(me++),ve=_[ye in nCe?ue.charAt(me++):ye],!ve||(se=ve(ae,ce,se))<0)return-1}else if(ye!=ce.charCodeAt(se++))return-1}return se}function A(ae,ue,ce){var se=u.exec(ue.slice(ce));return se?(ae.p=d.get(se[0].toLowerCase()),ce+se[0].length):-1}function R(ae,ue,ce){var se=m.exec(ue.slice(ce));return se?(ae.w=g.get(se[0].toLowerCase()),ce+se[0].length):-1}function k(ae,ue,ce){var se=f.exec(ue.slice(ce));return se?(ae.w=h.get(se[0].toLowerCase()),ce+se[0].length):-1}function T(ae,ue,ce){var se=v.exec(ue.slice(ce));return se?(ae.m=x.get(se[0].toLowerCase()),ce+se[0].length):-1}function D(ae,ue,ce){var se=b.exec(ue.slice(ce));return se?(ae.m=y.get(se[0].toLowerCase()),ce+se[0].length):-1}function O(ae,ue,ce){return I(ae,t,ue,ce)}function z(ae,ue,ce){return I(ae,n,ue,ce)}function F(ae,ue,ce){return I(ae,r,ue,ce)}function U(ae){return a[ae.getDay()]}function G(ae){return i[ae.getDay()]}function W(ae){return c[ae.getMonth()]}function Y(ae){return l[ae.getMonth()]}function B(ae){return o[+(ae.getHours()>=12)]}function $(ae){return 1+~~(ae.getMonth()/3)}function K(ae){return a[ae.getUTCDay()]}function q(ae){return i[ae.getUTCDay()]}function Z(ae){return c[ae.getUTCMonth()]}function J(ae){return l[ae.getUTCMonth()]}function oe(ae){return o[+(ae.getUTCHours()>=12)]}function de(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var ue=N(ae+="",S);return ue.toString=function(){return ae},ue},parse:function(ae){var ue=E(ae+="",!1);return ue.toString=function(){return ae},ue},utcFormat:function(ae){var ue=N(ae+="",C);return ue.toString=function(){return ae},ue},utcParse:function(ae){var ue=E(ae+="",!0);return ue.toString=function(){return ae},ue}}}var nCe={"-":"",_:" ",0:"0"},rf=/^\s*\d+/,sPt=/^%/,lPt=/[\\^$*+?|[\]().{}]/g;function Da(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i[t.toLowerCase(),n]))}function uPt(e,t,n){var r=rf.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function dPt(e,t,n){var r=rf.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function fPt(e,t,n){var r=rf.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function pPt(e,t,n){var r=rf.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function hPt(e,t,n){var r=rf.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function rCe(e,t,n){var r=rf.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function oCe(e,t,n){var r=rf.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function mPt(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function gPt(e,t,n){var r=rf.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function yPt(e,t,n){var r=rf.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function iCe(e,t,n){var r=rf.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function bPt(e,t,n){var r=rf.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function aCe(e,t,n){var r=rf.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function vPt(e,t,n){var r=rf.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function xPt(e,t,n){var r=rf.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function wPt(e,t,n){var r=rf.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function SPt(e,t,n){var r=rf.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function CPt(e,t,n){var r=sPt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function _Pt(e,t,n){var r=rf.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function jPt(e,t,n){var r=rf.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function sCe(e,t){return Da(e.getDate(),t,2)}function NPt(e,t){return Da(e.getHours(),t,2)}function EPt(e,t){return Da(e.getHours()%12||12,t,2)}function PPt(e,t){return Da(1+B3.count($x(e),e),t,3)}function sze(e,t){return Da(e.getMilliseconds(),t,3)}function IPt(e,t){return sze(e,t)+"000"}function APt(e,t){return Da(e.getMonth()+1,t,2)}function TPt(e,t){return Da(e.getMinutes(),t,2)}function kPt(e,t){return Da(e.getSeconds(),t,2)}function MPt(e){var t=e.getDay();return t===0?7:t}function RPt(e,t){return Da(bH.count($x(e)-1,e),t,2)}function lze(e){var t=e.getDay();return t>=4||t===0?gP(e):gP.ceil(e)}function OPt(e,t){return e=lze(e),Da(gP.count($x(e),e)+($x(e).getDay()===4),t,2)}function DPt(e){return e.getDay()}function LPt(e,t){return Da(sB.count($x(e)-1,e),t,2)}function $Pt(e,t){return Da(e.getFullYear()%100,t,2)}function FPt(e,t){return e=lze(e),Da(e.getFullYear()%100,t,2)}function BPt(e,t){return Da(e.getFullYear()%1e4,t,4)}function zPt(e,t){var n=e.getDay();return e=n>=4||n===0?gP(e):gP.ceil(e),Da(e.getFullYear()%1e4,t,4)}function HPt(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Da(t/60|0,"0",2)+Da(t%60,"0",2)}function lCe(e,t){return Da(e.getUTCDate(),t,2)}function VPt(e,t){return Da(e.getUTCHours(),t,2)}function UPt(e,t){return Da(e.getUTCHours()%12||12,t,2)}function GPt(e,t){return Da(1+yH.count(Fx(e),e),t,3)}function cze(e,t){return Da(e.getUTCMilliseconds(),t,3)}function WPt(e,t){return cze(e,t)+"000"}function qPt(e,t){return Da(e.getUTCMonth()+1,t,2)}function KPt(e,t){return Da(e.getUTCMinutes(),t,2)}function YPt(e,t){return Da(e.getUTCSeconds(),t,2)}function XPt(e){var t=e.getUTCDay();return t===0?7:t}function ZPt(e,t){return Da(vH.count(Fx(e)-1,e),t,2)}function uze(e){var t=e.getUTCDay();return t>=4||t===0?yP(e):yP.ceil(e)}function JPt(e,t){return e=uze(e),Da(yP.count(Fx(e),e)+(Fx(e).getUTCDay()===4),t,2)}function QPt(e){return e.getUTCDay()}function eIt(e,t){return Da(lB.count(Fx(e)-1,e),t,2)}function tIt(e,t){return Da(e.getUTCFullYear()%100,t,2)}function nIt(e,t){return e=uze(e),Da(e.getUTCFullYear()%100,t,2)}function rIt(e,t){return Da(e.getUTCFullYear()%1e4,t,4)}function oIt(e,t){var n=e.getUTCDay();return e=n>=4||n===0?yP(e):yP.ceil(e),Da(e.getUTCFullYear()%1e4,t,4)}function iIt(){return"+0000"}function cCe(){return"%"}function uCe(e){return+e}function dCe(e){return Math.floor(+e/1e3)}var IN,dze,fze;aIt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function aIt(e){return IN=aPt(e),dze=IN.format,IN.parse,fze=IN.utcFormat,IN.utcParse,IN}function sIt(e){return new Date(e)}function lIt(e){return e instanceof Date?+e:+new Date(+e)}function zce(e,t,n,r,o,i,a,l,c,u){var d=Ece(),f=d.invert,h=d.domain,m=u(".%L"),g=u(":%S"),b=u("%I:%M"),y=u("%I %p"),v=u("%a %d"),x=u("%b %d"),S=u("%B"),C=u("%Y");function _(N){return(c(N)t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,i)=>VEt(e,i/r))},n.copy=function(){return gze(t).domain(e)},u1.apply(n,arguments)}function wH(){var e=0,t=.5,n=1,r=1,o,i,a,l,c,u=Ap,d,f=!1,h;function m(b){return isNaN(b=+b)?h:(b=.5+((b=+d(b))-i)*(r*be.chartData,Uce=fn([nC],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),II=(e,t,n,r)=>r?Uce(e):nC(e);function kS(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(As(t)&&As(n))return!0}return!1}function fCe(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function xze(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,o,i;if(As(n))o=n;else if(typeof n=="function")return;if(As(r))i=r;else if(typeof r=="function")return;var a=[o,i];if(kS(a))return a}}function pIt(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(kS(r))return fCe(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[o,i]=e,a,l;if(o==="auto")t!=null&&(a=Math.min(...t));else if(Yr(o))a=o;else if(typeof o=="function")try{t!=null&&(a=o(t==null?void 0:t[0]))}catch{}else if(typeof o=="string"&&Fwe.test(o)){var c=Fwe.exec(o);if(c==null||t==null)a=void 0;else{var u=+c[1];a=t[0]-u}}else a=t==null?void 0:t[0];if(i==="auto")t!=null&&(l=Math.max(...t));else if(Yr(i))l=i;else if(typeof i=="function")try{t!=null&&(l=i(t==null?void 0:t[1]))}catch{}else if(typeof i=="string"&&Bwe.test(i)){var d=Bwe.exec(i);if(d==null||t==null)l=void 0;else{var f=+d[1];l=t[1]+f}}else l=t==null?void 0:t[1];var h=[a,l];if(kS(h))return t==null?h:fCe(h,t,n)}}}var AI=1e9,hIt={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Wce,tc=!0,Ag="[DecimalError] ",e_=Ag+"Invalid argument: ",Gce=Ag+"Exponent out of range: ",TI=Math.floor,t2=Math.pow,mIt=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,um,Kd=1e7,Ml=7,wze=9007199254740991,cB=TI(wze/Ml),Qr={};Qr.absoluteValue=Qr.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Qr.comparedTo=Qr.cmp=function(e){var t,n,r,o,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,o=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1};Qr.decimalPlaces=Qr.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Ml;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Qr.dividedBy=Qr.div=function(e){return _x(this,new this.constructor(e))};Qr.dividedToIntegerBy=Qr.idiv=function(e){var t=this,n=t.constructor;return tl(_x(t,new n(e),0,1),n.precision)};Qr.equals=Qr.eq=function(e){return!this.cmp(e)};Qr.exponent=function(){return qu(this)};Qr.greaterThan=Qr.gt=function(e){return this.cmp(e)>0};Qr.greaterThanOrEqualTo=Qr.gte=function(e){return this.cmp(e)>=0};Qr.isInteger=Qr.isint=function(){return this.e>this.d.length-2};Qr.isNegative=Qr.isneg=function(){return this.s<0};Qr.isPositive=Qr.ispos=function(){return this.s>0};Qr.isZero=function(){return this.s===0};Qr.lessThan=Qr.lt=function(e){return this.cmp(e)<0};Qr.lessThanOrEqualTo=Qr.lte=function(e){return this.cmp(e)<1};Qr.logarithm=Qr.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(um))throw Error(Ag+"NaN");if(n.s<1)throw Error(Ag+(n.s?"NaN":"-Infinity"));return n.eq(um)?new r(0):(tc=!1,t=_x(MM(n,i),MM(e,i),i),tc=!0,tl(t,o))};Qr.minus=Qr.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_ze(t,e):Sze(t,(e.s=-e.s,e))};Qr.modulo=Qr.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(Ag+"NaN");return n.s?(tc=!1,t=_x(n,e,0,1).times(e),tc=!0,n.minus(t)):tl(new r(n),o)};Qr.naturalExponential=Qr.exp=function(){return Cze(this)};Qr.naturalLogarithm=Qr.ln=function(){return MM(this)};Qr.negated=Qr.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Qr.plus=Qr.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Sze(t,e):_ze(t,(e.s=-e.s,e))};Qr.precision=Qr.sd=function(e){var t,n,r,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(e_+e);if(t=qu(o)+1,r=o.d.length-1,n=r*Ml+1,r=o.d[r],r){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Qr.squareRoot=Qr.sqrt=function(){var e,t,n,r,o,i,a,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(Ag+"NaN")}for(e=qu(l),tc=!1,o=Math.sqrt(+l),o==0||o==1/0?(t=gb(l.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=TI((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(o.toString()),n=c.precision,o=a=n+3;;)if(i=r,r=i.plus(_x(l,i,a+2)).times(.5),gb(i.d).slice(0,a)===(t=gb(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(tl(i,n+1,0),i.times(i).eq(l)){r=i;break}}else if(t!="9999")break;a+=4}return tc=!0,tl(r,n)};Qr.times=Qr.mul=function(e){var t,n,r,o,i,a,l,c,u,d=this,f=d.constructor,h=d.d,m=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,n=d.e+e.e,c=h.length,u=m.length,c=0;){for(t=0,o=c+r;o>r;)l=i[o]+m[r]*h[o-r-1]+t,i[o--]=l%Kd|0,t=l/Kd|0;i[o]=(i[o]+t)%Kd|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,tc?tl(e,f.precision):e};Qr.toDecimalPlaces=Qr.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Lb(e,0,AI),t===void 0?t=r.rounding:Lb(t,0,8),tl(n,e+qu(n)+1,t))};Qr.toExponential=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=N_(r,!0):(Lb(e,0,AI),t===void 0?t=o.rounding:Lb(t,0,8),r=tl(new o(r),e+1,t),n=N_(r,!0,e+1)),n};Qr.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?N_(o):(Lb(e,0,AI),t===void 0?t=i.rounding:Lb(t,0,8),r=tl(new i(o),e+qu(o)+1,t),n=N_(r.abs(),!1,e+qu(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)};Qr.toInteger=Qr.toint=function(){var e=this,t=e.constructor;return tl(new t(e),qu(e)+1,t.rounding)};Qr.toNumber=function(){return+this};Qr.toPower=Qr.pow=function(e){var t,n,r,o,i,a,l=this,c=l.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(um);if(l=new c(l),!l.s){if(e.s<1)throw Error(Ag+"Infinity");return l}if(l.eq(um))return l;if(r=c.precision,e.eq(um))return tl(l,r);if(t=e.e,n=e.d.length-1,a=t>=n,i=l.s,a){if((n=d<0?-d:d)<=wze){for(o=new c(um),t=Math.ceil(r/Ml+4),tc=!1;n%2&&(o=o.times(l),hCe(o.d,t)),n=TI(n/2),n!==0;)l=l.times(l),hCe(l.d,t);return tc=!0,e.s<0?new c(um).div(o):tl(o,r)}}else if(i<0)throw Error(Ag+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,tc=!1,o=e.times(MM(l,r+u)),tc=!0,o=Cze(o),o.s=i,o};Qr.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?(n=qu(o),r=N_(o,n<=i.toExpNeg||n>=i.toExpPos)):(Lb(e,1,AI),t===void 0?t=i.rounding:Lb(t,0,8),o=tl(new i(o),e,t),n=qu(o),r=N_(o,e<=n||n<=i.toExpNeg,e)),r};Qr.toSignificantDigits=Qr.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Lb(e,1,AI),t===void 0?t=r.rounding:Lb(t,0,8)),tl(new r(n),e,t)};Qr.toString=Qr.valueOf=Qr.val=Qr.toJSON=Qr[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=qu(e),n=e.constructor;return N_(e,t<=n.toExpNeg||t>=n.toExpPos)};function Sze(e,t){var n,r,o,i,a,l,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),tc?tl(t,f):t;if(c=e.d,u=t.d,a=e.e,o=t.e,c=c.slice(),i=a-o,i){for(i<0?(r=c,i=-i,l=u.length):(r=u,o=a,l=c.length),a=Math.ceil(f/Ml),l=a>l?a+1:l+1,i>l&&(i=l,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(l=c.length,i=u.length,l-i<0&&(i=l,r=u,u=c,c=r),n=0;i;)n=(c[--i]=c[i]+u[i]+n)/Kd|0,c[i]%=Kd;for(n&&(c.unshift(n),++o),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=o,tc?tl(t,f):t}function Lb(e,t,n){if(e!==~~e||en)throw Error(e_+e)}function gb(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;ta?1:-1;else for(l=c=0;lo[l]?1:-1;break}return c}function n(r,o,i){for(var a=0;i--;)r[i]-=a,a=r[i]1;)r.shift()}return function(r,o,i,a){var l,c,u,d,f,h,m,g,b,y,v,x,S,C,_,N,E,I,A=r.constructor,R=r.s==o.s?1:-1,k=r.d,T=o.d;if(!r.s)return new A(r);if(!o.s)throw Error(Ag+"Division by zero");for(c=r.e-o.e,E=T.length,_=k.length,m=new A(R),g=m.d=[],u=0;T[u]==(k[u]||0);)++u;if(T[u]>(k[u]||0)&&--c,i==null?x=i=A.precision:a?x=i+(qu(r)-qu(o))+1:x=i,x<0)return new A(0);if(x=x/Ml+2|0,u=0,E==1)for(d=0,T=T[0],x++;(u<_||d)&&x--;u++)S=d*Kd+(k[u]||0),g[u]=S/T|0,d=S%T|0;else{for(d=Kd/(T[0]+1)|0,d>1&&(T=e(T,d),k=e(k,d),E=T.length,_=k.length),C=E,b=k.slice(0,E),y=b.length;y=Kd/2&&++N;do d=0,l=t(T,b,E,y),l<0?(v=b[0],E!=y&&(v=v*Kd+(b[1]||0)),d=v/N|0,d>1?(d>=Kd&&(d=Kd-1),f=e(T,d),h=f.length,y=b.length,l=t(f,b,h,y),l==1&&(d--,n(f,E16)throw Error(Gce+qu(e));if(!e.s)return new d(um);for(tc=!1,l=f,a=new d(.03125);e.abs().gte(.1);)e=e.times(a),u+=5;for(r=Math.log(t2(2,u))/Math.LN10*2+5|0,l+=r,n=o=i=new d(um),d.precision=l;;){if(o=tl(o.times(e),l),n=n.times(++c),a=i.plus(_x(o,n,l)),gb(a.d).slice(0,l)===gb(i.d).slice(0,l)){for(;u--;)i=tl(i.times(i),l);return d.precision=f,t==null?(tc=!0,tl(i,f)):i}i=a}}function qu(e){for(var t=e.e*Ml,n=e.d[0];n>=10;n/=10)t++;return t}function VK(e,t,n){if(t>e.LN10.sd())throw tc=!0,n&&(e.precision=n),Error(Ag+"LN10 precision limit exceeded");return tl(new e(e.LN10),t)}function _w(e){for(var t="";e--;)t+="0";return t}function MM(e,t){var n,r,o,i,a,l,c,u,d,f=1,h=10,m=e,g=m.d,b=m.constructor,y=b.precision;if(m.s<1)throw Error(Ag+(m.s?"NaN":"-Infinity"));if(m.eq(um))return new b(0);if(t==null?(tc=!1,u=y):u=t,m.eq(10))return t==null&&(tc=!0),VK(b,u);if(u+=h,b.precision=u,n=gb(g),r=n.charAt(0),i=qu(m),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=gb(m.d),r=n.charAt(0),f++;i=qu(m),r>1?(m=new b("0."+n),i++):m=new b(r+"."+n.slice(1))}else return c=VK(b,u+2,y).times(i+""),m=MM(new b(r+"."+n.slice(1)),u-h).plus(c),b.precision=y,t==null?(tc=!0,tl(m,y)):m;for(l=a=m=_x(m.minus(um),m.plus(um),u),d=tl(m.times(m),u),o=3;;){if(a=tl(a.times(d),u),c=l.plus(_x(a,new b(o),u)),gb(c.d).slice(0,u)===gb(l.d).slice(0,u))return l=l.times(2),i!==0&&(l=l.plus(VK(b,u+2,y).times(i+""))),l=_x(l,new b(f),u),b.precision=y,t==null?(tc=!0,tl(l,y)):l;l=c,o+=2}}function pCe(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(r,o),t){if(o-=r,n=n-r-1,e.e=TI(n/Ml),e.d=[],r=(n+1)%Ml,n<0&&(r+=Ml),rcB||e.e<-cB))throw Error(Gce+n)}else e.s=0,e.e=0,e.d=[0];return e}function tl(e,t,n){var r,o,i,a,l,c,u,d,f=e.d;for(a=1,i=f[0];i>=10;i/=10)a++;if(r=t-a,r<0)r+=Ml,o=t,u=f[d=0];else{if(d=Math.ceil((r+1)/Ml),i=f.length,d>=i)return e;for(u=i=f[d],a=1;i>=10;i/=10)a++;r%=Ml,o=r-Ml+a}if(n!==void 0&&(i=t2(10,a-o-1),l=u/i%10|0,c=t<0||f[d+1]!==void 0||u%i,c=n<4?(l||c)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||c||n==6&&(r>0?o>0?u/t2(10,a-o):0:f[d-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return c?(i=qu(e),f.length=1,t=t-i-1,f[0]=t2(10,(Ml-t%Ml)%Ml),e.e=TI(-t/Ml)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=d,i=1,d--):(f.length=d+1,i=t2(10,Ml-r),f[d]=o>0?(u/t2(10,a-o)%t2(10,o)|0)*i:0),c)for(;;)if(d==0){(f[0]+=i)==Kd&&(f[0]=1,++e.e);break}else{if(f[d]+=i,f[d]!=Kd)break;f[d--]=0,i=1}for(r=f.length;f[--r]===0;)f.pop();if(tc&&(e.e>cB||e.e<-cB))throw Error(Gce+qu(e));return e}function _ze(e,t){var n,r,o,i,a,l,c,u,d,f,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),tc?tl(t,m):t;if(c=e.d,f=t.d,r=t.e,u=e.e,c=c.slice(),a=u-r,a){for(d=a<0,d?(n=c,a=-a,l=f.length):(n=f,r=u,l=c.length),o=Math.max(Math.ceil(m/Ml),l)+2,a>o&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for(o=c.length,l=f.length,d=o0;--o)c[l++]=0;for(o=f.length;o>a;){if(c[--o]0?i=i.charAt(0)+"."+i.slice(1)+_w(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+_w(-o-1)+i,n&&(r=n-a)>0&&(i+=_w(r))):o>=a?(i+=_w(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+_w(r))):((r=o+1)0&&(o+1===a&&(i+="."),i+=_w(r))),e.s<0?"-"+i:i}function hCe(e,t){if(e.length>t)return e.length=t,!0}function jze(e){var t,n,r;function o(i){var a=this;if(!(a instanceof o))return new o(i);if(a.constructor=o,i instanceof o){a.s=i.s,a.e=i.e,a.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(e_+i);if(i>0)a.s=1;else if(i<0)i=-i,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(i===~~i&&i<1e7){a.e=0,a.d=[i];return}return pCe(a,i.toString())}else if(typeof i!="string")throw Error(e_+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,mIt.test(i))pCe(a,i);else throw Error(e_+i)}if(o.prototype=Qr,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=jze,o.config=o.set=gIt,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(e_+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(e_+n+": "+r);return this}var Wce=jze(hIt);um=new Wce(1);const Ps=Wce;var yIt=e=>e,Nze={},Eze=e=>e===Nze,mCe=e=>function t(){return arguments.length===0||arguments.length===1&&Eze(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},Pze=(e,t)=>e===1?t:mCe(function(){for(var n=arguments.length,r=new Array(n),o=0;oa!==Nze).length;return i>=e?t(...r):Pze(e-i,mCe(function(){for(var a=arguments.length,l=new Array(a),c=0;cEze(d)?l.shift():d);return t(...u,...l)}))}),bIt=e=>Pze(e.length,e),lte=(e,t)=>{for(var n=[],r=e;rArray.isArray(t)?t.map(e):Object.keys(t).map(n=>t[n]).map(e)),xIt=function(){for(var t=arguments.length,n=new Array(t),r=0;rc(l),i(...arguments))}},cte=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join("");function Ize(e){var t;return e===0?t=1:t=Math.floor(new Ps(e).abs().log(10).toNumber())+1,t}function Aze(e,t,n){for(var r=new Ps(e),o=0,i=[];r.lt(t)&&o<1e5;)i.push(r.toNumber()),r=r.add(n),o++;return i}var Tze=e=>{var[t,n]=e,[r,o]=[t,n];return t>n&&([r,o]=[n,t]),[r,o]},kze=(e,t,n)=>{if(e.lte(0))return new Ps(0);var r=Ize(e.toNumber()),o=new Ps(10).pow(r),i=e.div(o),a=r!==1?.05:.1,l=new Ps(Math.ceil(i.div(a).toNumber())).add(n).mul(a),c=l.mul(o);return t?new Ps(c.toNumber()):new Ps(Math.ceil(c.toNumber()))},wIt=(e,t,n)=>{var r=new Ps(1),o=new Ps(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new Ps(10).pow(Ize(e)-1),o=new Ps(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new Ps(Math.floor(e)))}else e===0?o=new Ps(Math.floor((t-1)/2)):n||(o=new Ps(Math.floor(e)));var a=Math.floor((t-1)/2),l=xIt(vIt(c=>o.add(new Ps(c-a).mul(r)).toNumber()),lte);return l(0,t)},Mze=function(t,n,r,o){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new Ps(0),tickMin:new Ps(0),tickMax:new Ps(0)};var a=kze(new Ps(n).sub(t).div(r-1),o,i),l;t<=0&&n>=0?l=new Ps(0):(l=new Ps(t).add(n).div(2),l=l.sub(new Ps(l).mod(a)));var c=Math.ceil(l.sub(t).div(a).toNumber()),u=Math.ceil(new Ps(n).sub(l).div(a).toNumber()),d=c+u+1;return d>r?Mze(t,n,r,o,i+1):(d0?u+(r-d):u,c=n>0?c:c+(r-d)),{step:a,tickMin:l.sub(new Ps(c).mul(a)),tickMax:l.add(new Ps(u).mul(a))})},SIt=function(t){var[n,r]=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(o,2),[l,c]=Tze([n,r]);if(l===-1/0||c===1/0){var u=c===1/0?[l,...lte(0,o-1).map(()=>1/0)]:[...lte(0,o-1).map(()=>-1/0),c];return n>r?cte(u):u}if(l===c)return wIt(l,o,i);var{step:d,tickMin:f,tickMax:h}=Mze(l,c,a,i,0),m=Aze(f,h.add(new Ps(.1).mul(d)),d);return n>r?cte(m):m},CIt=function(t,n){var[r,o]=t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[a,l]=Tze([r,o]);if(a===-1/0||l===1/0)return[r,o];if(a===l)return[a];var c=Math.max(n,2),u=kze(new Ps(l).sub(a).div(c-1),i,0),d=[...Aze(new Ps(a),new Ps(l),u),l];return i===!1&&(d=d.map(f=>Math.round(f))),r>o?cte(d):d},Rze=e=>e.rootProps.maxBarSize,_It=e=>e.rootProps.barGap,Oze=e=>e.rootProps.barCategoryGap,jIt=e=>e.rootProps.barSize,z3=e=>e.rootProps.stackOffset,Dze=e=>e.rootProps.reverseStackOrder,qce=e=>e.options.chartName,Kce=e=>e.rootProps.syncId,Lze=e=>e.rootProps.syncMethod,Yce=e=>e.options.eventEmitter,NIt=e=>e.rootProps.baseValue,nc={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},ax={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},im={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},SH=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},EIt={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:ax.angleAxisId,includeHidden:!1,name:void 0,reversed:ax.reversed,scale:ax.scale,tick:ax.tick,tickCount:void 0,ticks:void 0,type:ax.type,unit:void 0},PIt={allowDataOverflow:im.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:im.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:im.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:im.scale,tick:im.tick,tickCount:im.tickCount,ticks:void 0,type:im.type,unit:void 0},IIt={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:ax.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:ax.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:ax.scale,tick:ax.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},AIt={allowDataOverflow:im.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:im.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:im.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:im.scale,tick:im.tick,tickCount:im.tickCount,ticks:void 0,type:"category",unit:void 0},Xce=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?IIt:EIt,Zce=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?AIt:PIt,CH=e=>e.polarOptions,Jce=fn([l1,c1,Nd],kBe),$ze=fn([CH,Jce],(e,t)=>{if(e!=null)return cp(e.innerRadius,t,0)}),Fze=fn([CH,Jce],(e,t)=>{if(e!=null)return cp(e.outerRadius,t,t*.8)}),TIt=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},Bze=fn([CH],TIt);fn([Xce,Bze],SH);var zze=fn([Jce,$ze,Fze],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});fn([Zce,zze],SH);var Hze=fn([Fi,CH,$ze,Fze,l1,c1],(e,t,n,r,o,i)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:a,cy:l,startAngle:c,endAngle:u}=t;return{cx:cp(a,o,o/2),cy:cp(l,i,i/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:u,clockWise:!1}}}),dc=(e,t)=>t,H3=(e,t,n)=>n;function _H(e){return e==null?void 0:e.id}function Vze(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:o,dataKey:i}=n,a=new Map;return e.forEach(l=>{var c,u=(c=l.data)!==null&&c!==void 0?c:r;if(!(u==null||u.length===0)){var d=_H(l);u.forEach((f,h)=>{var m=i==null||o?h:String(Na(f,i,null)),g=Na(f,l.dataKey,0),b;a.has(m)?b=a.get(m):b={},Object.assign(b,{[d]:g}),a.set(m,b)})}}),Array.from(a.values())}function jH(e){return e.stackId!=null&&e.dataKey!=null}var NH=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function EH(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function kIt(e,t){if(e.length===t.length){for(var n=0;n{var t=Fi(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},kI=e=>e.tooltip.settings.axisId;function gCe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function uB(e){for(var t=1;te.cartesianAxis.xAxis[t],Yb=(e,t)=>{var n=Uze(e,t);return n??Vd},Ud={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:ute,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:O3},Gze=(e,t)=>e.cartesianAxis.yAxis[t],Xb=(e,t)=>{var n=Gze(e,t);return n??Ud},Wze={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},Qce=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??Wze},Ic=(e,t,n)=>{switch(t){case"xAxis":return Yb(e,n);case"yAxis":return Xb(e,n);case"zAxis":return Qce(e,n);case"angleAxis":return Xce(e,n);case"radiusAxis":return Zce(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},DIt=(e,t,n)=>{switch(t){case"xAxis":return Yb(e,n);case"yAxis":return Xb(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},V3=(e,t,n)=>{switch(t){case"xAxis":return Yb(e,n);case"yAxis":return Xb(e,n);case"angleAxis":return Xce(e,n);case"radiusAxis":return Zce(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},qze=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function eue(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var MI=e=>e.graphicalItems.cartesianItems,LIt=fn([dc,H3],eue),tue=(e,t,n)=>e.filter(n).filter(r=>(t==null?void 0:t.includeHidden)===!0?!0:!r.hide),U3=fn([MI,Ic,LIt],tue,{memoizeOptions:{resultEqualityCheck:EH}}),Kze=fn([U3],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(jH)),Yze=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),$It=fn([U3],Yze),nue=e=>e.map(t=>t.data).filter(Boolean).flat(1),FIt=fn([U3],nue,{memoizeOptions:{resultEqualityCheck:EH}}),rue=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:o}=t;return e.length>0?e:n.slice(r,o+1)},oue=fn([FIt,II],rue),iue=(e,t,n)=>(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:Na(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(o=>({value:Na(o,r)}))):e.map(r=>({value:r})),PH=fn([oue,Ic,U3],iue);function Xze(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function e8(e){if(Pg(e)||e instanceof Date){var t=Number(e);if(As(t))return t}}function yCe(e){if(Array.isArray(e)){var t=[e8(e[0]),e8(e[1])];return kS(t)?t:void 0}var n=e8(e);if(n!=null)return[n,n]}function Bx(e){return e.map(e8).filter(jCt)}function BIt(e,t,n){return!n||typeof t!="number"||Ih(t)?[]:n.length?Bx(n.flatMap(r=>{var o=Na(e,r.dataKey),i,a;if(Array.isArray(o)?[i,a]=o:i=a=o,!(!As(i)||!As(a)))return[t-i,t+a]})):[]}var Id=e=>{var t=Pd(e),n=kI(e);return V3(e,t,n)},G3=fn([Id],e=>e==null?void 0:e.dataKey),zIt=fn([Kze,II,Id],Vze),Zze=(e,t,n,r)=>{var o={},i=t.reduce((a,l)=>(l.stackId==null||(a[l.stackId]==null&&(a[l.stackId]=[]),a[l.stackId].push(l)),a),o);return Object.fromEntries(Object.entries(i).map(a=>{var[l,c]=a,u=r?[...c].reverse():c,d=u.map(_H);return[l,{stackedData:ejt(e,d,n),graphicalItems:u}]}))},RM=fn([zIt,Kze,z3,Dze],Zze),Jze=(e,t,n,r)=>{var{dataStartIndex:o,dataEndIndex:i}=t;if(r==null&&n!=="zAxis"){var a=ojt(e,o,i);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},HIt=fn([Ic],e=>e.allowDataOverflow),aue=e=>{var t;if(e==null||!("domain"in e))return ute;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var n=Bx(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:ute},sue=fn([Ic],aue),lue=fn([sue,HIt],xze),VIt=fn([RM,nC,dc,lue],Jze,{memoizeOptions:{resultEqualityCheck:NH}}),IH=e=>e.errorBars,UIt=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>Xze(n,r)),dB=function(){for(var t=arguments.length,n=new Array(t),r=0;r{var i,a;if(n.length>0&&e.forEach(l=>{n.forEach(c=>{var u,d,f=(u=r[c.id])===null||u===void 0?void 0:u.filter(v=>Xze(o,v)),h=Na(l,(d=t.dataKey)!==null&&d!==void 0?d:c.dataKey),m=BIt(l,h,f);if(m.length>=2){var g=Math.min(...m),b=Math.max(...m);(i==null||ga)&&(a=b)}var y=yCe(h);y!=null&&(i=i==null?y[0]:Math.min(i,y[0]),a=a==null?y[1]:Math.max(a,y[1]))})}),(t==null?void 0:t.dataKey)!=null&&e.forEach(l=>{var c=yCe(Na(l,t.dataKey));c!=null&&(i=i==null?c[0]:Math.min(i,c[0]),a=a==null?c[1]:Math.max(a,c[1]))}),As(i)&&As(a))return[i,a]},GIt=fn([oue,Ic,$It,IH,dc],cue,{memoizeOptions:{resultEqualityCheck:NH}});function WIt(e){var{value:t}=e;if(Pg(t)||t instanceof Date)return t}var qIt=(e,t,n)=>{var r=e.map(WIt).filter(o=>o!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&u7e(r))?DBe(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},Qze=e=>e.referenceElements.dots,RI=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),KIt=fn([Qze,dc,H3],RI),e9e=e=>e.referenceElements.areas,YIt=fn([e9e,dc,H3],RI),t9e=e=>e.referenceElements.lines,XIt=fn([t9e,dc,H3],RI),n9e=(e,t)=>{var n=Bx(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},ZIt=fn(KIt,dc,n9e),r9e=(e,t)=>{var n=Bx(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},JIt=fn([YIt,dc],r9e);function QIt(e){var t;if(e.x!=null)return Bx([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:Bx(n)}function eAt(e){var t;if(e.y!=null)return Bx([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:Bx(n)}var o9e=(e,t)=>{var n=e.flatMap(r=>t==="xAxis"?QIt(r):eAt(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},tAt=fn([XIt,dc],o9e),nAt=fn(ZIt,tAt,JIt,(e,t,n)=>dB(e,n,t)),uue=(e,t,n,r,o,i,a,l)=>{if(n!=null)return n;var c=a==="vertical"&&l==="xAxis"||a==="horizontal"&&l==="yAxis",u=c?dB(r,i,o):dB(i,o);return pIt(t,u,e.allowDataOverflow)},rAt=fn([Ic,sue,lue,VIt,GIt,nAt,Fi,dc],uue,{memoizeOptions:{resultEqualityCheck:NH}}),oAt=[0,1],due=(e,t,n,r,o,i,a)=>{if(!((e==null||n==null||n.length===0)&&a===void 0)){var{dataKey:l,type:c}=e,u=qb(t,i);if(u&&l==null){var d;return DBe(0,(d=n==null?void 0:n.length)!==null&&d!==void 0?d:0)}return c==="category"?qIt(r,e,u):o==="expand"?oAt:a}},fue=fn([Ic,Fi,oue,PH,z3,dc,rAt],due),i9e=(e,t,n,r,o)=>{if(e!=null){var{scale:i,type:a}=e;if(i==="auto")return t==="radial"&&o==="radiusAxis"?"band":t==="radial"&&o==="angleAxis"?"linear":a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":a==="category"?"band":"linear";if(typeof i=="string"){var l="scale".concat(A3(i));return l in Tk?l:"point"}}},OI=fn([Ic,Fi,qze,qce,dc],i9e);function iAt(e){if(e!=null){if(e in Tk)return Tk[e]();var t="scale".concat(A3(e));if(t in Tk)return Tk[t]()}}function pue(e,t,n,r){if(!(n==null||r==null)){if(typeof e.scale=="function")return e.scale.copy().domain(n).range(r);var o=iAt(t);if(o!=null){var i=o.domain(n).range(r);return Y_t(i),i}}}var hue=(e,t,n)=>{var r=aue(t);if(!(n!=="auto"&&n!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(r)&&(r[0]==="auto"||r[1]==="auto")&&kS(e))return SIt(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&kS(e))return CIt(e,t.tickCount,t.allowDecimals)}},mue=fn([fue,V3,OI],hue),gue=(e,t,n,r)=>{if(r!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&kS(t)&&Array.isArray(n)&&n.length>0){var o=t[0],i=n[0],a=t[1],l=n[n.length-1];return[Math.min(o,i),Math.max(a,l)]}return t},aAt=fn([Ic,fue,mue,dc],gue),sAt=fn(PH,Ic,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(Bx(e.map(l=>l.value))).sort((l,c)=>l-c);if(r.length<2)return 1/0;var o=r[r.length-1]-r[0];if(o===0)return 1/0;for(var i=0;ir,(e,t,n,r,o)=>{if(!As(e))return 0;var i=t==="vertical"?r.height:r.width;if(o==="gap")return e*i/2;if(o==="no-gap"){var a=cp(n,e*i),l=e*i/2;return l-a-(l-a)/i*a}return 0}),lAt=(e,t)=>{var n=Yb(e,t);return n==null||typeof n.padding!="string"?0:a9e(e,"xAxis",t,n.padding)},cAt=(e,t)=>{var n=Xb(e,t);return n==null||typeof n.padding!="string"?0:a9e(e,"yAxis",t,n.padding)},uAt=fn(Yb,lAt,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:o}=e;return typeof o=="string"?{left:t,right:t}:{left:((n=o.left)!==null&&n!==void 0?n:0)+t,right:((r=o.right)!==null&&r!==void 0?r:0)+t}}),dAt=fn(Xb,cAt,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:o}=e;return typeof o=="string"?{top:t,bottom:t}:{top:((n=o.top)!==null&&n!==void 0?n:0)+t,bottom:((r=o.bottom)!==null&&r!==void 0?r:0)+t}}),fAt=fn([Nd,uAt,dH,uH,(e,t,n)=>n],(e,t,n,r,o)=>{var{padding:i}=r;return o?[i.left,n.width-i.right]:[e.left+t.left,e.left+e.width-t.right]}),pAt=fn([Nd,Fi,dAt,dH,uH,(e,t,n)=>n],(e,t,n,r,o,i)=>{var{padding:a}=o;return i?[r.height-a.bottom,a.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),W3=(e,t,n,r)=>{var o;switch(t){case"xAxis":return fAt(e,n,r);case"yAxis":return pAt(e,n,r);case"zAxis":return(o=Qce(e,n))===null||o===void 0?void 0:o.range;case"angleAxis":return Bze(e);case"radiusAxis":return zze(e,n);default:return}},s9e=fn([Ic,W3],SH),MS=fn([Ic,OI,aAt,s9e],pue);fn([U3,IH,dc],UIt);function l9e(e,t){return e.idt.id?1:0}var AH=(e,t)=>t,TH=(e,t,n)=>n,hAt=fn(lH,AH,TH,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(l9e)),mAt=fn(cH,AH,TH,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(l9e)),c9e=(e,t)=>({width:e.width,height:t.height}),gAt=(e,t)=>{var n=typeof t.width=="number"?t.width:O3;return{width:n,height:e.height}},u9e=fn(Nd,Yb,c9e),yAt=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},bAt=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},vAt=fn(c1,Nd,hAt,AH,TH,(e,t,n,r,o)=>{var i={},a;return n.forEach(l=>{var c=c9e(t,l);a==null&&(a=yAt(t,r,e));var u=r==="top"&&!o||r==="bottom"&&o;i[l.id]=a-Number(u)*c.height,a+=(u?-1:1)*c.height}),i}),xAt=fn(l1,Nd,mAt,AH,TH,(e,t,n,r,o)=>{var i={},a;return n.forEach(l=>{var c=gAt(t,l);a==null&&(a=bAt(t,r,e));var u=r==="left"&&!o||r==="right"&&o;i[l.id]=a-Number(u)*c.width,a+=(u?-1:1)*c.width}),i}),wAt=(e,t)=>{var n=Yb(e,t);if(n!=null)return vAt(e,n.orientation,n.mirror)},SAt=fn([Nd,Yb,wAt,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var o=n==null?void 0:n[r];return o==null?{x:e.left,y:0}:{x:e.left,y:o}}}),CAt=(e,t)=>{var n=Xb(e,t);if(n!=null)return xAt(e,n.orientation,n.mirror)},_At=fn([Nd,Xb,CAt,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var o=n==null?void 0:n[r];return o==null?{x:0,y:e.top}:{x:o,y:e.top}}}),d9e=fn(Nd,Xb,(e,t)=>{var n=typeof t.width=="number"?t.width:O3;return{width:n,height:e.height}}),bCe=(e,t,n)=>{switch(t){case"xAxis":return u9e(e,n).width;case"yAxis":return d9e(e,n).height;default:return}},f9e=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:o,type:i,dataKey:a}=n,l=qb(e,r),c=t.map(u=>u.value);if(a&&l&&i==="category"&&o&&u7e(c))return c}},yue=fn([Fi,PH,Ic,dc],f9e),p9e=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:o,scale:i}=n,a=qb(e,r);if(a&&(o==="number"||i!=="auto"))return t.map(l=>l.value)}},bue=fn([Fi,PH,V3,dc],p9e),vCe=fn([Fi,DIt,OI,MS,yue,bue,W3,mue,dc],(e,t,n,r,o,i,a,l,c)=>{if(t!=null){var u=qb(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:i,duplicateDomain:o,isCategorical:u,niceTicks:l,range:a,realScaleType:n,scale:r}}}),jAt=(e,t,n,r,o,i,a,l,c)=>{if(!(t==null||r==null)){var u=qb(e,c),{type:d,ticks:f,tickCount:h}=t,m=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,g=d==="category"&&r.bandwidth?r.bandwidth()/m:0;g=c==="angleAxis"&&i!=null&&i.length>=2?Zd(i[0]-i[1])*2*g:g;var b=f||o;if(b){var y=b.map((v,x)=>{var S=a?a.indexOf(v):v;return{index:x,coordinate:r(S)+g,value:v,offset:g}});return y.filter(v=>As(v.coordinate))}return u&&l?l.map((v,x)=>({coordinate:r(v)+g,value:v,index:x,offset:g})).filter(v=>As(v.coordinate)):r.ticks?r.ticks(h).map(v=>({coordinate:r(v)+g,value:v,offset:g})):r.domain().map((v,x)=>({coordinate:r(v)+g,value:a?a[v]:v,index:x,offset:g}))}},h9e=fn([Fi,V3,OI,MS,mue,W3,yue,bue,dc],jAt),NAt=(e,t,n,r,o,i,a)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var l=qb(e,a),{tickCount:c}=t,u=0;return u=a==="angleAxis"&&(r==null?void 0:r.length)>=2?Zd(r[0]-r[1])*2*u:u,l&&i?i.map((d,f)=>({coordinate:n(d)+u,value:d,index:f,offset:u})):n.ticks?n.ticks(c).map(d=>({coordinate:n(d)+u,value:d,offset:u})):n.domain().map((d,f)=>({coordinate:n(d)+u,value:o?o[d]:d,index:f,offset:u}))}},Tg=fn([Fi,V3,MS,W3,yue,bue,dc],NAt),kg=fn(Ic,MS,(e,t)=>{if(!(e==null||t==null))return uB(uB({},e),{},{scale:t})}),EAt=fn([Ic,OI,fue,s9e],pue),PAt=fn((e,t,n)=>Qce(e,n),EAt,(e,t)=>{if(!(e==null||t==null))return uB(uB({},e),{},{scale:t})}),IAt=fn([Fi,lH,cH],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),m9e=e=>e.options.defaultTooltipEventType,g9e=e=>e.options.validateTooltipEventTypes;function y9e(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function vue(e,t){var n=m9e(e),r=g9e(e);return y9e(t,n,r)}function AAt(e){return Hr(t=>vue(t,e))}var b9e=(e,t)=>{var n,r=Number(t);if(!(Ih(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},TAt=e=>e.tooltip.settings,Rw={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},kAt={itemInteraction:{click:Rw,hover:Rw},axisInteraction:{click:Rw,hover:Rw},keyboardInteraction:Rw,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},v9e=Oh({name:"tooltip",initialState:kAt,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Zl()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,o=z0(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=r)},prepare:Zl()},removeTooltipEntrySettings:{reducer(e,t){var n=z0(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:Zl()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:MAt,replaceTooltipEntrySettings:RAt,removeTooltipEntrySettings:OAt,setTooltipSettingsState:DAt,setActiveMouseOverItemIndex:x9e,mouseLeaveItem:LAt,mouseLeaveChart:w9e,setActiveClickItemIndex:$At,setMouseOverAxisIndex:S9e,setMouseClickAxisIndex:FAt,setSyncInteraction:dte,setKeyboardInteraction:fte}=v9e.actions,BAt=v9e.reducer;function xCe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function LL(e){for(var t=1;t{if(t==null)return Rw;var o=UAt(e,t,n);if(o==null)return Rw;if(o.active)return o;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var i=e.settings.active===!0;if(GAt(o)){if(i)return LL(LL({},o),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return LL(LL({},Rw),{},{coordinate:o.coordinate})};function WAt(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function qAt(e,t){var n=WAt(e),r=t[0],o=t[1];if(n===void 0)return!1;var i=Math.min(r,o),a=Math.max(r,o);return n>=i&&n<=a}function KAt(e,t,n){if(n==null||t==null)return!0;var r=Na(e,t);return r==null||!kS(n)?!0:qAt(r,n)}var xue=(e,t,n,r)=>{var o=e==null?void 0:e.index;if(o==null)return null;var i=Number(o);if(!As(i))return o;var a=0,l=1/0;t.length>0&&(l=t.length-1);var c=Math.max(a,Math.min(i,l)),u=t[c];return u==null||KAt(u,n,r)?String(c):null},_9e=(e,t,n,r,o,i,a,l)=>{if(!(i==null||l==null)){var c=a[0],u=c==null?void 0:l(c.positions,i);if(u!=null)return u;var d=o==null?void 0:o[Number(i)];if(d)switch(n){case"horizontal":return{x:d.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:d.coordinate}}}},j9e=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var o;return n==="hover"?o=e.itemInteraction.hover.dataKey:o=e.itemInteraction.click.dataKey,o==null&&r!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(i=>{var a;return((a=i.settings)===null||a===void 0?void 0:a.dataKey)===o})},q3=e=>e.options.tooltipPayloadSearcher,DI=e=>e.tooltip;function wCe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function SCe(e){for(var t=1;t{if(!(t==null||i==null)){var{chartData:l,computedData:c,dataStartIndex:u,dataEndIndex:d}=n,f=[];return e.reduce((h,m)=>{var g,{dataDefinedOnItem:b,settings:y}=m,v=JAt(b,l),x=Array.isArray(v)?aBe(v,u,d):v,S=(g=y==null?void 0:y.dataKey)!==null&&g!==void 0?g:r,C=y==null?void 0:y.nameKey,_;if(r&&Array.isArray(x)&&!Array.isArray(x[0])&&a==="axis"?_=d7e(x,r,o):_=i(x,t,c,C),Array.isArray(_))_.forEach(E=>{var I=SCe(SCe({},y),{},{name:E.name,unit:E.unit,color:void 0,fill:void 0});h.push(zwe({tooltipEntrySettings:I,dataKey:E.dataKey,payload:E.payload,value:Na(E.payload,E.dataKey),name:E.name}))});else{var N;h.push(zwe({tooltipEntrySettings:y,dataKey:S,payload:_,value:Na(_,S),name:(N=Na(_,C))!==null&&N!==void 0?N:y==null?void 0:y.name}))}return h},f)}},wue=fn([Id,Fi,qze,qce,Pd],i9e),QAt=fn([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),eTt=fn([Pd,kI],eue),K3=fn([QAt,Id,eTt],tue,{memoizeOptions:{resultEqualityCheck:EH}}),tTt=fn([K3],e=>e.filter(jH)),nTt=fn([K3],nue,{memoizeOptions:{resultEqualityCheck:EH}}),LI=fn([nTt,nC],rue),rTt=fn([tTt,nC,Id],Vze),Sue=fn([LI,Id,K3],iue),E9e=fn([Id],aue),oTt=fn([Id],e=>e.allowDataOverflow),P9e=fn([E9e,oTt],xze),iTt=fn([K3],e=>e.filter(jH)),aTt=fn([rTt,iTt,z3,Dze],Zze),sTt=fn([aTt,nC,Pd,P9e],Jze),lTt=fn([K3],Yze),cTt=fn([LI,Id,lTt,IH,Pd],cue,{memoizeOptions:{resultEqualityCheck:NH}}),uTt=fn([Qze,Pd,kI],RI),dTt=fn([uTt,Pd],n9e),fTt=fn([e9e,Pd,kI],RI),pTt=fn([fTt,Pd],r9e),hTt=fn([t9e,Pd,kI],RI),mTt=fn([hTt,Pd],o9e),gTt=fn([dTt,mTt,pTt],dB),yTt=fn([Id,E9e,P9e,sTt,cTt,gTt,Fi,Pd],uue),Y3=fn([Id,Fi,LI,Sue,z3,Pd,yTt],due),bTt=fn([Y3,Id,wue],hue),vTt=fn([Id,Y3,bTt,Pd],gue),I9e=e=>{var t=Pd(e),n=kI(e),r=!1;return W3(e,t,n,r)},A9e=fn([Id,I9e],SH),T9e=fn([Id,wue,vTt,A9e],pue),xTt=fn([Fi,Sue,Id,Pd],f9e),wTt=fn([Fi,Sue,Id,Pd],p9e),STt=(e,t,n,r,o,i,a,l)=>{if(t){var{type:c}=t,u=qb(e,l);if(r){var d=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,f=c==="category"&&r.bandwidth?r.bandwidth()/d:0;return f=l==="angleAxis"&&o!=null&&(o==null?void 0:o.length)>=2?Zd(o[0]-o[1])*2*f:f,u&&a?a.map((h,m)=>({coordinate:r(h)+f,value:h,index:m,offset:f})):r.domain().map((h,m)=>({coordinate:r(h)+f,value:i?i[h]:h,index:m,offset:f}))}}},d1=fn([Fi,Id,wue,T9e,I9e,xTt,wTt,Pd],STt),Cue=fn([m9e,g9e,TAt],(e,t,n)=>y9e(n.shared,e,t)),k9e=e=>e.tooltip.settings.trigger,_ue=e=>e.tooltip.settings.defaultIndex,X3=fn([DI,Cue,k9e,_ue],C9e),zx=fn([X3,LI,G3,Y3],xue),M9e=fn([d1,zx],b9e),jue=fn([X3],e=>{if(e)return e.dataKey}),CTt=fn([X3],e=>{if(e)return e.graphicalItemId}),R9e=fn([DI,Cue,k9e,_ue],j9e),_Tt=fn([l1,c1,Fi,Nd,d1,_ue,R9e,q3],_9e),jTt=fn([X3,_Tt],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),NTt=fn([X3],e=>e.active),ETt=fn([R9e,zx,nC,G3,M9e,q3,Cue],N9e),PTt=fn([ETt],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function CCe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function _Ce(e){for(var t=1;tHr(Id),MTt=()=>{var e=kTt(),t=Hr(d1),n=Hr(T9e);return TS(!e||!n?void 0:_Ce(_Ce({},e),{},{scale:n}),t)};function jCe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function AN(e){for(var t=1;t{var o=t.find(i=>i&&i.index===n);if(o){if(e==="horizontal")return{x:o.coordinate,y:r.chartY};if(e==="vertical")return{x:r.chartX,y:o.coordinate}}return{x:0,y:0}},$Tt=(e,t,n,r)=>{var o=t.find(u=>u&&u.index===n);if(o){if(e==="centric"){var i=o.coordinate,{radius:a}=r;return AN(AN(AN({},r),Wu(r.cx,r.cy,a,i)),{},{angle:i,radius:a})}var l=o.coordinate,{angle:c}=r;return AN(AN(AN({},r),Wu(r.cx,r.cy,l,c)),{},{angle:c,radius:l})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function FTt(e,t){var{chartX:n,chartY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var O9e=(e,t,n,r,o)=>{var i,a=-1,l=(i=t==null?void 0:t.length)!==null&&i!==void 0?i:0;if(l<=1||e==null)return 0;if(r==="angleAxis"&&o!=null&&Math.abs(Math.abs(o[1]-o[0])-360)<=1e-6)for(var c=0;c0?n[c-1].coordinate:n[l-1].coordinate,d=n[c].coordinate,f=c>=l-1?n[0].coordinate:n[c+1].coordinate,h=void 0;if(Zd(d-u)!==Zd(f-d)){var m=[];if(Zd(f-d)===Zd(o[1]-o[0])){h=f;var g=d+o[1]-o[0];m[0]=Math.min(g,(g+u)/2),m[1]=Math.max(g,(g+u)/2)}else{h=u;var b=f+o[1]-o[0];m[0]=Math.min(d,(b+d)/2),m[1]=Math.max(d,(b+d)/2)}var y=[Math.min(d,(h+d)/2),Math.max(d,(h+d)/2)];if(e>y[0]&&e<=y[1]||e>=m[0]&&e<=m[1]){({index:a}=n[c]);break}}else{var v=Math.min(u,f),x=Math.max(u,f);if(e>(v+d)/2&&e<=(x+d)/2){({index:a}=n[c]);break}}}else if(t){for(var S=0;S0&&S(t[S].coordinate+t[S-1].coordinate)/2&&e<=(t[S].coordinate+t[S+1].coordinate)/2||S===l-1&&e>(t[S].coordinate+t[S-1].coordinate)/2){({index:a}=t[S]);break}}return a},D9e=()=>Hr(qce),Nue=(e,t)=>t,L9e=(e,t,n)=>n,Eue=(e,t,n,r)=>r,BTt=fn(d1,e=>Q9(e,t=>t.coordinate)),Pue=fn([DI,Nue,L9e,Eue],C9e),Iue=fn([Pue,LI,G3,Y3],xue),zTt=(e,t,n)=>{if(t!=null){var r=DI(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},$9e=fn([DI,Nue,L9e,Eue],j9e),fB=fn([l1,c1,Fi,Nd,d1,Eue,$9e,q3],_9e),HTt=fn([Pue,fB],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),F9e=fn([d1,Iue],b9e),VTt=fn([$9e,Iue,nC,G3,F9e,q3,Nue],N9e),UTt=fn([Pue,Iue],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),GTt=(e,t,n,r,o,i,a)=>{if(!(!e||!n||!r||!o)&&FTt(e,a)){var l=ijt(e,t),c=O9e(l,i,o,n,r),u=LTt(t,o,c,e);return{activeIndex:String(c),activeCoordinate:u}}},WTt=(e,t,n,r,o,i,a)=>{if(!(!e||!r||!o||!i||!n)){var l=SEt(e,n);if(l){var c=ajt(l,t),u=O9e(c,a,i,r,o),d=$Tt(t,i,u,l);return{activeIndex:String(u),activeCoordinate:d}}}},qTt=(e,t,n,r,o,i,a,l)=>{if(!(!e||!t||!r||!o||!i))return t==="horizontal"||t==="vertical"?GTt(e,t,r,o,i,a,l):WTt(e,t,n,r,o,i,a)},KTt=fn(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElementId:r.elementId}}),YTt=fn(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(nc)),n=Array.from(new Set(t));return n.sort((r,o)=>r-o)},{memoizeOptions:{resultEqualityCheck:kIt}});function NCe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ECe(e){for(var t=1;tECe(ECe({},e),{},{[t]:{elementId:void 0,panoramaElementId:void 0,consumers:0}}),QTt)},tkt=new Set(Object.values(nc));function nkt(e){return tkt.has(e)}var B9e=Oh({name:"zIndex",initialState:ekt,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,elementId:void 0,panoramaElementId:void 0}},prepare:Zl()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!nkt(n)&&delete e.zIndexMap[n])},prepare:Zl()},registerZIndexPortalId:{reducer:(e,t)=>{var{zIndex:n,elementId:r,isPanorama:o}=t.payload;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElementId=r:e.zIndexMap[n].elementId=r:e.zIndexMap[n]={consumers:0,elementId:o?void 0:r,panoramaElementId:o?r:void 0}},prepare:Zl()},unregisterZIndexPortalId:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElementId=void 0:e.zIndexMap[n].elementId=void 0)},prepare:Zl()}}}),{registerZIndexPortal:rkt,unregisterZIndexPortal:okt,registerZIndexPortalId:ikt,unregisterZIndexPortalId:akt}=B9e.actions,skt=B9e.reducer;function of(e){var{zIndex:t,children:n}=e,r=$jt(),o=r&&t!==void 0&&t!==0,i=Tu(),a=nl();p.useLayoutEffect(()=>o?(a(rkt({zIndex:t})),()=>{a(okt({zIndex:t}))}):T3,[a,t,o]);var l=Hr(u=>KTt(u,t,i));if(!o)return n;if(!l)return null;var c=document.getElementById(l);return c?au.createPortal(n,c):null}function pte(){return pte=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.useContext(z9e),UK={exports:{}},ICe;function mkt(){return ICe||(ICe=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function i(c,u,d,f,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var m=new o(d,f||c,h),g=n?n+u:u;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],m]:c._events[g].push(m):(c._events[g]=m,c._eventsCount++),c}function a(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],d,f;if(this._eventsCount===0)return u;for(f in d=this._events)t.call(d,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},l.prototype.listeners=function(u){var d=n?n+u:u,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,m=f.length,g=new Array(m);h{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),vkt=H9e.reducer,{createEventEmitter:xkt}=H9e.actions;function wkt(e){return e.tooltip.syncInteraction}var Skt={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},V9e=Oh({name:"chartData",initialState:Skt,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:TCe,setDataStartEndIndexes:Ckt,setComputedData:QFr}=V9e.actions,_kt=V9e.reducer,jkt=["x","y"];function kCe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function TN(e){for(var t=1;tc.rootProps.className);p.useEffect(()=>{if(e==null)return T3;var c=(u,d,f)=>{if(t!==f&&e===u){if(r==="index"){var h;if(a&&d!==null&&d!==void 0&&(h=d.payload)!==null&&h!==void 0&&h.coordinate&&d.payload.sourceViewBox){var m=d.payload.coordinate,{x:g,y:b}=m,y=Ikt(m,jkt),{x:v,y:x,width:S,height:C}=d.payload.sourceViewBox,_=TN(TN({},y),{},{x:a.x+(S?(g-v)/S:0)*a.width,y:a.y+(C?(b-x)/C:0)*a.height});n(TN(TN({},d),{},{payload:TN(TN({},d.payload),{},{coordinate:_})}))}else n(d);return}if(o!=null){var N;if(typeof r=="function"){var E={activeTooltipIndex:d.payload.index==null?void 0:Number(d.payload.index),isTooltipActive:d.payload.active,activeIndex:d.payload.index==null?void 0:Number(d.payload.index),activeLabel:d.payload.label,activeDataKey:d.payload.dataKey,activeCoordinate:d.payload.coordinate},I=r(o,E);N=o[I]}else r==="value"&&(N=o.find(F=>String(F.value)===d.payload.label));var{coordinate:A}=d.payload;if(N==null||d.payload.active===!1||A==null||a==null){n(dte({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:R,y:k}=A,T=Math.min(R,a.x+a.width),D=Math.min(k,a.y+a.height),O={x:i==="horizontal"?N.coordinate:T,y:i==="horizontal"?D:N.coordinate},z=dte({active:d.payload.active,coordinate:O,dataKey:d.payload.dataKey,index:String(N.index),label:d.payload.label,sourceViewBox:d.payload.sourceViewBox,graphicalItemId:d.payload.graphicalItemId});n(z)}}};return OM.on(hte,c),()=>{OM.off(hte,c)}},[l,n,t,e,r,o,i,a])}function kkt(){var e=Hr(Kce),t=Hr(Yce),n=nl();p.useEffect(()=>{if(e==null)return T3;var r=(o,i,a)=>{t!==a&&e===o&&n(Ckt(i))};return OM.on(ACe,r),()=>{OM.off(ACe,r)}},[n,t,e])}function Mkt(){var e=nl();p.useEffect(()=>{e(xkt())},[e]),Tkt(),kkt()}function Rkt(e,t,n,r,o,i){var a=Hr(m=>zTt(m,e,t)),l=Hr(Yce),c=Hr(Kce),u=Hr(Lze),d=Hr(wkt),f=d==null?void 0:d.active,h=NI();p.useEffect(()=>{if(!f&&c!=null&&l!=null){var m=dte({active:i,coordinate:n,dataKey:a,index:o,label:typeof r=="number"?String(r):r,sourceViewBox:h,graphicalItemId:void 0});OM.emit(hte,c,m,l)}},[f,n,a,o,r,l,c,u,i,h])}function MCe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function RCe(e){for(var t=1;t{E(DAt({shared:x,trigger:S,axisId:N,active:o,defaultIndex:I}))},[E,x,S,N,o,I]);var A=NI(),R=NBe(),k=AAt(x),{activeIndex:T,isActive:D}=(t=Hr(oe=>UTt(oe,k,S,I)))!==null&&t!==void 0?t:{},O=Hr(oe=>VTt(oe,k,S,I)),z=Hr(oe=>F9e(oe,k,S,I)),F=Hr(oe=>HTt(oe,k,S,I)),U=O,G=hkt(),W=(n=o??D)!==null&&n!==void 0?n:!1,[Y,B]=A7e([U,W]),$=k==="axis"?z:void 0;Rkt(k,S,F,$,T,W);var K=_??G;if(K==null||A==null||k==null)return null;var q=U??OCe;W||(q=OCe),u&&q.length&&(q=C7e(q.filter(oe=>oe.value!=null&&(oe.hide!==!0||r.includeHidden)),h,$kt));var Z=q.length>0,J=p.createElement(CNt,{allowEscapeViewBox:i,animationDuration:a,animationEasing:l,isAnimationActive:d,active:W,coordinate:F,hasPayload:Z,offset:f,position:m,reverseDirection:g,useTranslate3d:b,viewBox:A,wrapperStyle:y,lastBoundingBox:Y,innerRef:B,hasPortalFromProps:!!_},Fkt(c,RCe(RCe({},r),{},{payload:q,label:$,active:W,activeIndex:T,coordinate:F,accessibilityLayer:R})));return p.createElement(p.Fragment,null,au.createPortal(J,K),W&&p.createElement(pkt,{cursor:v,tooltipEventType:k,coordinate:F,payload:q,index:T}))}var Ah=e=>null;Ah.displayName="Cell";function zkt(e,t,n){return(t=Hkt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hkt(e){var t=Vkt(e,"string");return typeof t=="symbol"?t:t+""}function Vkt(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Ukt{constructor(t){zkt(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;r!=null&&this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function DCe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Gkt(e){for(var t=1;t{try{var n=document.getElementById($Ce);n||(n=document.createElement("span"),n.setAttribute("id",$Ce),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,Xkt,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},f4=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||EI.isSsr)return{width:0,height:0};if(!U9e.enableCache)return FCe(t,n);var r=Zkt(t,n),o=LCe.get(r);if(o)return o;var i=FCe(t,n);return LCe.set(r,i),i},BCe=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,zCe=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Jkt=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Qkt=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,G9e={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},e4t=Object.keys(G9e),GE="NaN";function t4t(e,t){return e*G9e[t]}class ph{static parse(t){var n,[,r,o]=(n=Qkt.exec(t))!==null&&n!==void 0?n:[];return new ph(parseFloat(r),o??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,Ih(t)&&(this.unit=""),n!==""&&!Jkt.test(n)&&(this.num=NaN,this.unit=""),e4t.includes(n)&&(this.num=t4t(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new ph(NaN,""):new ph(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new ph(NaN,""):new ph(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ph(NaN,""):new ph(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ph(NaN,""):new ph(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Ih(this.num)}}function W9e(e){if(e.includes(GE))return GE;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,o,i]=(n=BCe.exec(t))!==null&&n!==void 0?n:[],a=ph.parse(r??""),l=ph.parse(i??""),c=o==="*"?a.multiply(l):a.divide(l);if(c.isNaN())return GE;t=t.replace(BCe,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,[,d,f,h]=(u=zCe.exec(t))!==null&&u!==void 0?u:[],m=ph.parse(d??""),g=ph.parse(h??""),b=f==="+"?m.add(g):m.subtract(g);if(b.isNaN())return GE;t=t.replace(zCe,b.toString())}return t}var HCe=/\(([^()]*)\)/;function n4t(e){for(var t=e,n;(n=HCe.exec(t))!=null;){var[,r]=n;t=t.replace(HCe,W9e(r))}return t}function r4t(e){var t=e.replace(/\s+/g,"");return t=n4t(t),t=W9e(t),t}function o4t(e){try{return r4t(e)}catch{return GE}}function GK(e){var t=o4t(e.slice(5,-1));return t===GE?"":t}var i4t=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],a4t=["dx","dy","angle","className","breakAll"];function mte(){return mte=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:t,breakAll:n,style:r}=e;try{var o=[];ls(t)||(n?o=t.toString().split(""):o=t.toString().split(q9e));var i=o.map(l=>({word:l,width:f4(l,r).width})),a=n?0:f4(" ",r).width;return{wordsWithComputedWidth:i,spaceWidth:a}}catch{return null}};function l4t(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var Y9e=(e,t,n,r)=>e.reduce((o,i)=>{var{word:a,width:l}=i,c=o[o.length-1];if(c&&l!=null&&(t==null||r||c.width+l+ne.reduce((t,n)=>t.width>n.width?t:n),c4t="…",UCe=(e,t,n,r,o,i,a,l)=>{var c=e.slice(0,t),u=K9e({breakAll:n,style:r,children:c+c4t});if(!u)return[!1,[]];var d=Y9e(u.wordsWithComputedWidth,i,a,l),f=d.length>o||X9e(d).width>Number(i);return[f,d]},u4t=(e,t,n,r,o)=>{var{maxLines:i,children:a,style:l,breakAll:c}=e,u=Yr(i),d=String(a),f=Y9e(t,r,n,o);if(!u||o)return f;var h=f.length>i||X9e(f).width>Number(r);if(!h)return f;for(var m=0,g=d.length-1,b=0,y;m<=g&&b<=d.length-1;){var v=Math.floor((m+g)/2),x=v-1,[S,C]=UCe(d,x,c,l,i,r,n,o),[_]=UCe(d,v,c,l,i,r,n,o);if(!S&&!_&&(m=v+1),S&&_&&(g=v-1),!S&&_){y=C;break}b++}return y||f},GCe=e=>{var t=ls(e)?[]:e.toString().split(q9e);return[{words:t,width:void 0}]},d4t=e=>{var{width:t,scaleToFit:n,children:r,style:o,breakAll:i,maxLines:a}=e;if((t||n)&&!EI.isSsr){var l,c,u=K9e({breakAll:i,children:r,style:o});if(u){var{wordsWithComputedWidth:d,spaceWidth:f}=u;l=d,c=f}else return GCe(r);return u4t({breakAll:i,children:r,maxLines:a,style:o},l,c,t,!!n)}return GCe(r)},Z9e="#808080",f4t={angle:0,breakAll:!1,capHeight:"0.71em",fill:Z9e,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},kH=p.forwardRef((e,t)=>{var n=Fl(e,f4t),{x:r,y:o,lineHeight:i,capHeight:a,fill:l,scaleToFit:c,textAnchor:u,verticalAnchor:d}=n,f=VCe(n,i4t),h=p.useMemo(()=>d4t({breakAll:f.breakAll,children:f.children,maxLines:f.maxLines,scaleToFit:c,style:f.style,width:f.width}),[f.breakAll,f.children,f.maxLines,c,f.style,f.width]),{dx:m,dy:g,angle:b,className:y,breakAll:v}=f,x=VCe(f,a4t);if(!Pg(r)||!Pg(o)||h.length===0)return null;var S=Number(r)+(Yr(m)?m:0),C=Number(o)+(Yr(g)?g:0);if(!As(S)||!As(C))return null;var _;switch(d){case"start":_=GK("calc(".concat(a,")"));break;case"middle":_=GK("calc(".concat((h.length-1)/2," * -").concat(i," + (").concat(a," / 2))"));break;default:_=GK("calc(".concat(h.length-1," * -").concat(i,")"));break}var N=[];if(c){var E=h[0].width,{width:I}=f;N.push("scale(".concat(Yr(I)&&Yr(E)?I/E:1,")"))}return b&&N.push("rotate(".concat(b,", ").concat(S,", ").concat(C,")")),N.length&&(x.transform=N.join(" ")),p.createElement("text",mte({},Tf(x),{ref:t,x:S,y:C,className:Ae("recharts-text",y),textAnchor:u,fill:l.includes("url")?Z9e:l}),h.map((A,R)=>{var k=A.words.join(v?"":" ");return p.createElement("tspan",{x:S,dy:R===0?_:i,key:"".concat(k,"-").concat(R)},k)}))});kH.displayName="Text";var p4t=["labelRef"];function h4t(e,t){if(e==null)return{};var n,r,o=m4t(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r{var{x:t,y:n,upperWidth:r,lowerWidth:o,width:i,height:a,children:l}=e,c=p.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:o,width:i,height:a}),[t,n,r,o,i,a]);return p.createElement(J9e.Provider,{value:c},l)},eHe=()=>{var e=p.useContext(J9e),t=NI();return e||hBe(t)},v4t=p.createContext(null),x4t=()=>{var e=p.useContext(v4t),t=Hr(Hze);return e||t},w4t=e=>{var{value:t,formatter:n}=e,r=ls(e.children)?t:e.children;return typeof n=="function"?n(r):r},Aue=e=>e!=null&&typeof e=="function",S4t=(e,t)=>{var n=Zd(t-e),r=Math.min(Math.abs(t-e),360);return n*r},C4t=(e,t,n,r,o)=>{var{offset:i,className:a}=e,{cx:l,cy:c,innerRadius:u,outerRadius:d,startAngle:f,endAngle:h,clockWise:m}=o,g=(u+d)/2,b=S4t(f,h),y=b>=0?1:-1,v,x;switch(t){case"insideStart":v=f+y*i,x=m;break;case"insideEnd":v=h-y*i,x=!m;break;case"end":v=h+y*i,x=m;break;default:throw new Error("Unsupported position ".concat(t))}x=b<=0?x:!x;var S=Wu(l,c,g,v),C=Wu(l,c,g,v+(x?1:-1)*359),_="M".concat(S.x,",").concat(S.y,` + A`).concat(g,",").concat(g,",0,1,").concat(x?0:1,`, + `).concat(C.x,",").concat(C.y),N=ls(e.id)?wM("recharts-radial-line-"):e.id;return p.createElement("text",sx({},r,{dominantBaseline:"central",className:Ae("recharts-radial-bar-label",a)}),p.createElement("defs",null,p.createElement("path",{id:N,d:_})),p.createElement("textPath",{xlinkHref:"#".concat(N)},n))},_4t=(e,t,n)=>{var{cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:l,endAngle:c}=e,u=(l+c)/2;if(n==="outside"){var{x:d,y:f}=Wu(r,o,a+t,u);return{x:d,y:f,textAnchor:d>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:o,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:o,textAnchor:"middle",verticalAnchor:"end"};var h=(i+a)/2,{x:m,y:g}=Wu(r,o,h,u);return{x:m,y:g,textAnchor:"middle",verticalAnchor:"middle"}},gte=e=>"cx"in e&&Yr(e.cx),j4t=(e,t)=>{var{parentViewBox:n,offset:r,position:o}=e,i;n!=null&&!gte(n)&&(i=n);var{x:a,y:l,upperWidth:c,lowerWidth:u,height:d}=t,f=a,h=a+(c-u)/2,m=(f+h)/2,g=(c+u)/2,b=f+c/2,y=d>=0?1:-1,v=y*r,x=y>0?"end":"start",S=y>0?"start":"end",C=c>=0?1:-1,_=C*r,N=C>0?"end":"start",E=C>0?"start":"end";if(o==="top"){var I={x:f+c/2,y:l-v,textAnchor:"middle",verticalAnchor:x};return bu(bu({},I),i?{height:Math.max(l-i.y,0),width:c}:{})}if(o==="bottom"){var A={x:h+u/2,y:l+d+v,textAnchor:"middle",verticalAnchor:S};return bu(bu({},A),i?{height:Math.max(i.y+i.height-(l+d),0),width:u}:{})}if(o==="left"){var R={x:m-_,y:l+d/2,textAnchor:N,verticalAnchor:"middle"};return bu(bu({},R),i?{width:Math.max(R.x-i.x,0),height:d}:{})}if(o==="right"){var k={x:m+g+_,y:l+d/2,textAnchor:E,verticalAnchor:"middle"};return bu(bu({},k),i?{width:Math.max(i.x+i.width-k.x,0),height:d}:{})}var T=i?{width:g,height:d}:{};return o==="insideLeft"?bu({x:m+_,y:l+d/2,textAnchor:E,verticalAnchor:"middle"},T):o==="insideRight"?bu({x:m+g-_,y:l+d/2,textAnchor:N,verticalAnchor:"middle"},T):o==="insideTop"?bu({x:f+c/2,y:l+v,textAnchor:"middle",verticalAnchor:S},T):o==="insideBottom"?bu({x:h+u/2,y:l+d-v,textAnchor:"middle",verticalAnchor:x},T):o==="insideTopLeft"?bu({x:f+_,y:l+v,textAnchor:E,verticalAnchor:S},T):o==="insideTopRight"?bu({x:f+c-_,y:l+v,textAnchor:N,verticalAnchor:S},T):o==="insideBottomLeft"?bu({x:h+_,y:l+d-v,textAnchor:E,verticalAnchor:x},T):o==="insideBottomRight"?bu({x:h+u-_,y:l+d-v,textAnchor:N,verticalAnchor:x},T):o&&typeof o=="object"&&(Yr(o.x)||Ox(o.x))&&(Yr(o.y)||Ox(o.y))?bu({x:a+cp(o.x,g),y:l+cp(o.y,d),textAnchor:"end",verticalAnchor:"end"},T):bu({x:b,y:l+d/2,textAnchor:"middle",verticalAnchor:"middle"},T)},N4t={angle:0,offset:5,zIndex:nc.label,position:"middle",textBreakAll:!1};function jw(e){var t=Fl(e,N4t),{viewBox:n,position:r,value:o,children:i,content:a,className:l="",textBreakAll:c,labelRef:u}=t,d=x4t(),f=eHe(),h=r==="center"?f:d??f,m,g,b;if(n==null?m=h:gte(n)?m=n:m=hBe(n),!m||ls(o)&&ls(i)&&!p.isValidElement(a)&&typeof a!="function")return null;var y=bu(bu({},t),{},{viewBox:m});if(p.isValidElement(a)){var{labelRef:v}=y,x=h4t(y,p4t);return p.cloneElement(a,x)}if(typeof a=="function"){if(g=p.createElement(a,y),p.isValidElement(g))return g}else g=w4t(t);var S=Tf(t);if(gte(m)){if(r==="insideStart"||r==="insideEnd"||r==="end")return C4t(t,r,g,S,m);b=_4t(m,t.offset,t.position)}else b=j4t(t,m);return p.createElement(of,{zIndex:t.zIndex},p.createElement(kH,sx({ref:u,className:Ae("recharts-label",l)},S,b,{textAnchor:l4t(S.textAnchor)?S.textAnchor:b.textAnchor,breakAll:c}),g))}jw.displayName="Label";var E4t=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?p.createElement(jw,sx({key:"label-implicit"},r)):Pg(e)?p.createElement(jw,sx({key:"label-implicit",value:e},r)):p.isValidElement(e)?e.type===jw?p.cloneElement(e,bu({key:"label-implicit"},r)):p.createElement(jw,sx({key:"label-implicit",content:e},r)):Aue(e)?p.createElement(jw,sx({key:"label-implicit",content:e},r)):e&&typeof e=="object"?p.createElement(jw,sx({},e,{key:"label-implicit"},r)):null};function tHe(e){var{label:t,labelRef:n}=e,r=eHe();return E4t(t,r,n)||null}var WK={},qK={},qCe;function P4t(){return qCe||(qCe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n[n.length-1]}e.last=t})(qK)),qK}var KK={},KCe;function I4t(){return KCe||(KCe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Array.isArray(n)?n:Array.from(n)}e.toArray=t})(KK)),KK}var YCe;function A4t(){return YCe||(YCe=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=P4t(),n=I4t(),r=ece();function o(i){if(r.isArrayLike(i))return t.last(n.toArray(i))}e.last=o})(WK)),WK}var YK,XCe;function T4t(){return XCe||(XCe=1,YK=A4t().last),YK}var k4t=T4t();const M4t=Pc(k4t);var R4t=["valueAccessor"],O4t=["dataKey","clockWise","id","textBreakAll","zIndex"];function pB(){return pB=Object.assign?Object.assign.bind():function(e){for(var t=1;tArray.isArray(e.value)?M4t(e.value):e.value,nHe=p.createContext(void 0),MH=nHe.Provider,rHe=p.createContext(void 0),$4t=rHe.Provider;function F4t(){return p.useContext(nHe)}function B4t(){return p.useContext(rHe)}function t8(e){var{valueAccessor:t=L4t}=e,n=ZCe(e,R4t),{dataKey:r,clockWise:o,id:i,textBreakAll:a,zIndex:l}=n,c=ZCe(n,O4t),u=F4t(),d=B4t(),f=u||d;return!f||!f.length?null:p.createElement(of,{zIndex:l??nc.label},p.createElement(qs,{className:"recharts-label-list"},f.map((h,m)=>{var g,b=ls(r)?t(h,m):Na(h&&h.payload,r),y=ls(i)?{}:{id:"".concat(i,"-").concat(m)};return p.createElement(jw,pB({key:"label-".concat(m)},Tf(h),c,y,{fill:(g=n.fill)!==null&&g!==void 0?g:h.fill,parentViewBox:h.parentViewBox,value:b,textBreakAll:a,viewBox:h.viewBox,index:m,zIndex:0}))})))}t8.displayName="LabelList";function J3(e){var{label:t}=e;return t?t===!0?p.createElement(t8,{key:"labelList-implicit"}):p.isValidElement(t)||Aue(t)?p.createElement(t8,{key:"labelList-implicit",content:t}):typeof t=="object"?p.createElement(t8,pB({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function yte(){return yte=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{cx:t,cy:n,r,className:o}=e,i=Ae("recharts-dot",o);return Yr(t)&&Yr(n)&&Yr(r)?p.createElement("circle",yte({},Af(e),Qle(e),{className:i,cx:t,cy:n,r})):null},iHe=e=>e.graphicalItems.polarItems,z4t=fn([dc,H3],eue),RH=fn([iHe,Ic,z4t],tue),H4t=fn([RH],nue),OH=fn([H4t,Uce],rue),V4t=fn([OH,Ic,RH],iue);fn([OH,Ic,RH],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(o=>{var i,a=Na(r,(i=t.dataKey)!==null&&i!==void 0?i:o.dataKey);return{value:a,errorDomain:[]}})).filter(Boolean):(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:Na(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]})));var JCe=()=>{},U4t=fn([OH,Ic,RH,IH,dc],cue),G4t=fn([Ic,sue,lue,JCe,U4t,JCe,Fi,dc],uue),aHe=fn([Ic,Fi,OH,V4t,z3,dc,G4t],due),W4t=fn([aHe,Ic,OI],hue);fn([Ic,aHe,W4t,dc],gue);var q4t={radiusAxis:{},angleAxis:{}},sHe=Oh({name:"polarAxis",initialState:q4t,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:e8r,removeRadiusAxis:t8r,addAngleAxis:n8r,removeAngleAxis:r8r}=sHe.actions,K4t=sHe.reducer;function QCe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function e2e(e){for(var t=1;tt,Tue=fn([iHe,J4t],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),Q4t=[],kue=(e,t,n)=>(n==null?void 0:n.length)===0?Q4t:n,lHe=fn([Uce,Tue,kue],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var o;if((t==null?void 0:t.data)!=null&&t.data.length>0?o=t.data:o=r,(!o||!o.length)&&n!=null&&(o=n.map(i=>e2e(e2e({},t.presentationProps),i.props))),o!=null)return o}}),eMt=fn([lHe,Tue,kue],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,o)=>{var i,a=Na(r,t.nameKey,t.name),l;return n!=null&&(i=n[o])!==null&&i!==void 0&&(i=i.props)!==null&&i!==void 0&&i.fill?l=n[o].props.fill:typeof r=="object"&&r!=null&&"fill"in r?l=r.fill:l=t.fill,{value:Kb(a,t.dataKey),color:l,payload:r,type:t.legendType}})}),tMt=fn([lHe,Tue,kue,Nd],(e,t,n,r)=>{if(!(t==null||e==null))return tRt({offset:r,pieSettings:t,displayedData:e,cells:n})}),XK={exports:{}},Fs={};/** + * @license React + * react-is.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var t2e;function nMt(){if(t2e)return Fs;t2e=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function g(b){if(typeof b=="object"&&b!==null){var y=b.$$typeof;switch(y){case e:switch(b=b.type,b){case n:case o:case r:case c:case u:case h:return b;default:switch(b=b&&b.$$typeof,b){case a:case l:case f:case d:return b;case i:return b;default:return y}}case t:return y}}}return Fs.ContextConsumer=i,Fs.ContextProvider=a,Fs.Element=e,Fs.ForwardRef=l,Fs.Fragment=n,Fs.Lazy=f,Fs.Memo=d,Fs.Portal=t,Fs.Profiler=o,Fs.StrictMode=r,Fs.Suspense=c,Fs.SuspenseList=u,Fs.isContextConsumer=function(b){return g(b)===i},Fs.isContextProvider=function(b){return g(b)===a},Fs.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Fs.isForwardRef=function(b){return g(b)===l},Fs.isFragment=function(b){return g(b)===n},Fs.isLazy=function(b){return g(b)===f},Fs.isMemo=function(b){return g(b)===d},Fs.isPortal=function(b){return g(b)===t},Fs.isProfiler=function(b){return g(b)===o},Fs.isStrictMode=function(b){return g(b)===r},Fs.isSuspense=function(b){return g(b)===c},Fs.isSuspenseList=function(b){return g(b)===u},Fs.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===o||b===r||b===c||b===u||typeof b=="object"&&b!==null&&(b.$$typeof===f||b.$$typeof===d||b.$$typeof===a||b.$$typeof===i||b.$$typeof===l||b.$$typeof===m||b.getModuleId!==void 0)},Fs.typeOf=g,Fs}var n2e;function rMt(){return n2e||(n2e=1,XK.exports=nMt()),XK.exports}var Mue=rMt(),r2e=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",o2e=null,ZK=null,cHe=e=>{if(e===o2e&&Array.isArray(ZK))return ZK;var t=[];return p.Children.forEach(e,n=>{ls(n)||(Mue.isFragment(n)?t=t.concat(cHe(n.props.children)):t.push(n))}),ZK=t,o2e=e,t};function DH(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(o=>r2e(o)):r=[r2e(t)],cHe(e).forEach(o=>{var i=S_(o,"type.displayName")||S_(o,"type.name");i&&r.indexOf(i)!==-1&&n.push(o)}),n}var Rue=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,JK={},i2e;function oMt(){return i2e||(i2e=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var o;if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!((o=Object.getOwnPropertyDescriptor(n,Symbol.toStringTag))!=null&&o.writable)?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(JK)),JK}var QK,a2e;function iMt(){return a2e||(a2e=1,QK=oMt().isPlainObject),QK}var aMt=iMt();const sMt=Pc(aMt);function s2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function l2e(e){for(var t=1;t{var i=n-r,a;return a="M ".concat(e,",").concat(t),a+="L ".concat(e+n,",").concat(t),a+="L ".concat(e+n-i/2,",").concat(t+o),a+="L ".concat(e+n-i/2-r,",").concat(t+o),a+="L ".concat(e,",").concat(t," Z"),a},dMt={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},fMt=e=>{var t=Fl(e,dMt),{x:n,y:r,upperWidth:o,lowerWidth:i,height:a,className:l}=t,{animationEasing:c,animationDuration:u,animationBegin:d,isUpdateAnimationActive:f}=t,h=p.useRef(null),[m,g]=p.useState(-1),b=p.useRef(o),y=p.useRef(i),v=p.useRef(a),x=p.useRef(n),S=p.useRef(r),C=_j(e,"trapezoid-");if(p.useEffect(()=>{if(h.current&&h.current.getTotalLength)try{var O=h.current.getTotalLength();O&&g(O)}catch{}},[]),n!==+n||r!==+r||o!==+o||i!==+i||a!==+a||o===0&&i===0||a===0)return null;var _=Ae("recharts-trapezoid",l);if(!f)return p.createElement("g",null,p.createElement("path",hB({},Tf(t),{className:_,d:c2e(n,r,o,i,a)})));var N=b.current,E=y.current,I=v.current,A=x.current,R=S.current,k="0px ".concat(m===-1?1:m,"px"),T="".concat(m,"px 0px"),D=EBe(["strokeDasharray"],u,c);return p.createElement(Cj,{animationId:C,key:C,canBegin:m>0,duration:u,easing:c,isActive:f,begin:d},O=>{var z=ba(N,o,O),F=ba(E,i,O),U=ba(I,a,O),G=ba(A,n,O),W=ba(R,r,O);h.current&&(b.current=z,y.current=F,v.current=U,x.current=G,S.current=W);var Y=O>0?{transition:D,strokeDasharray:T}:{strokeDasharray:k};return p.createElement("path",hB({},Tf(t),{className:_,d:c2e(G,W,z,F,U),ref:h,style:l2e(l2e({},Y),t.style)}))})},pMt=["option","shapeType","propTransformer","activeClassName"];function hMt(e,t){if(e==null)return{};var n,r,o=mMt(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r{var r=nl();return(o,i)=>a=>{e==null||e(o,i,a),r(x9e({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:n}))}},$H=e=>{var t=nl();return(n,r)=>o=>{e==null||e(n,r,o),t(LAt())}},FH=(e,t,n)=>{var r=nl();return(o,i)=>a=>{e==null||e(o,i,a),r($At({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:n}))}};function Q3(e){var{tooltipEntrySettings:t}=e,n=nl(),r=Tu(),o=p.useRef(null);return p.useLayoutEffect(()=>{r||(o.current===null?n(MAt(t)):o.current!==t&&n(RAt({prev:o.current,next:t})),o.current=t)},[t,n,r]),p.useLayoutEffect(()=>()=>{o.current&&(n(OAt(o.current)),o.current=null)},[n]),null}function BH(e){var{legendPayload:t}=e,n=nl(),r=Tu(),o=p.useRef(null);return p.useLayoutEffect(()=>{r||(o.current===null?n(CBe(t)):o.current!==t&&n(_Be({prev:o.current,next:t})),o.current=t)},[n,r,t]),p.useLayoutEffect(()=>()=>{o.current&&(n(jBe(o.current)),o.current=null)},[n]),null}function SMt(e){var{legendPayload:t}=e,n=nl(),r=Hr(Fi),o=p.useRef(null);return p.useLayoutEffect(()=>{r!=="centric"&&r!=="radial"||(o.current===null?n(CBe(t)):o.current!==t&&n(_Be({prev:o.current,next:t})),o.current=t)},[n,r,t]),p.useLayoutEffect(()=>()=>{o.current&&(n(jBe(o.current)),o.current=null)},[n]),null}var eY,CMt=()=>{var[e]=p.useState(()=>wM("uid-"));return e},_Mt=(eY=IS.useId)!==null&&eY!==void 0?eY:CMt;function uHe(e,t){var n=_Mt();return t||(e?"".concat(e,"-").concat(n):n)}var jMt=p.createContext(void 0),eO=e=>{var{id:t,type:n,children:r}=e,o=uHe("recharts-".concat(n),t);return p.createElement(jMt.Provider,{value:o},r(o))},NMt={cartesianItems:[],polarItems:[]},dHe=Oh({name:"graphicalItems",initialState:NMt,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Zl()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,o=z0(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=r)},prepare:Zl()},removeCartesianGraphicalItem:{reducer(e,t){var n=z0(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:Zl()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Zl()},removePolarGraphicalItem:{reducer(e,t){var n=z0(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:Zl()}}}),{addCartesianGraphicalItem:EMt,replaceCartesianGraphicalItem:PMt,removeCartesianGraphicalItem:IMt,addPolarGraphicalItem:AMt,removePolarGraphicalItem:TMt}=dHe.actions,kMt=dHe.reducer,MMt=e=>{var t=nl(),n=p.useRef(null);return p.useLayoutEffect(()=>{n.current===null?t(EMt(e)):n.current!==e&&t(PMt({prev:n.current,next:e})),n.current=e},[t,e]),p.useLayoutEffect(()=>()=>{n.current&&(t(IMt(n.current)),n.current=null)},[t]),null},zH=p.memo(MMt);function RMt(e){var t=nl();return p.useLayoutEffect(()=>(t(AMt(e)),()=>{t(TMt(e))}),[t,e]),null}var OMt=["key"],DMt=["onMouseEnter","onClick","onMouseLeave"],LMt=["id"],$Mt=["id"];function f2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Qc(e){for(var t=1;tDH(e.children,Ah),[e.children]),n=Hr(r=>eMt(r,e.id,t));return n==null?null:p.createElement(SMt,{legendPayload:n})}var UMt=p.memo(e=>{var{dataKey:t,nameKey:n,sectors:r,stroke:o,strokeWidth:i,fill:a,name:l,hide:c,tooltipType:u}=e,d={dataDefinedOnItem:r.map(f=>f.tooltipPayload),positions:r.map(f=>f.tooltipPosition),settings:{stroke:o,strokeWidth:i,fill:a,dataKey:t,nameKey:n,name:Kb(l,t),hide:c,type:u,color:a,unit:""}};return p.createElement(Q3,{tooltipEntrySettings:d})}),GMt=(e,t)=>e>t?"start":ecp(typeof t=="function"?t(e):t,n,n*.8),qMt=(e,t,n)=>{var{top:r,left:o,width:i,height:a}=t,l=kBe(i,a),c=o+cp(e.cx,i,i/2),u=r+cp(e.cy,a,a/2),d=cp(e.innerRadius,l,0),f=WMt(n,e.outerRadius,l),h=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:c,cy:u,innerRadius:d,outerRadius:f,maxRadius:h}},KMt=(e,t)=>{var n=Zd(t-e),r=Math.min(Math.abs(t-e),360);return n*r};function YMt(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var XMt=(e,t)=>{if(p.isValidElement(e))return p.cloneElement(e,t);if(typeof e=="function")return e(t);var n=Ae("recharts-pie-label-line",typeof e!="boolean"?e.className:""),{key:r}=t,o=HH(t,OMt);return p.createElement(J2,RS({},o,{type:"linear",className:n}))},ZMt=(e,t,n)=>{if(p.isValidElement(e))return p.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),p.isValidElement(r)))return r;var o=Ae("recharts-pie-label-text",YMt(e));return p.createElement(kH,RS({},t,{alignmentBaseline:"middle",className:o}),r)};function JMt(e){var{sectors:t,props:n,showLabels:r}=e,{label:o,labelLine:i,dataKey:a}=n;if(!r||!o||!t)return null;var l=Af(n),c=AS(o),u=AS(i),d=typeof o=="object"&&"offsetRadius"in o&&typeof o.offsetRadius=="number"&&o.offsetRadius||20,f=t.map((h,m)=>{var g=(h.startAngle+h.endAngle)/2,b=Wu(h.cx,h.cy,h.outerRadius+d,g),y=Qc(Qc(Qc(Qc({},l),h),{},{stroke:"none"},c),{},{index:m,textAnchor:GMt(b.x,h.cx)},b),v=Qc(Qc(Qc(Qc({},l),h),{},{fill:"none",stroke:h.fill},u),{},{index:m,points:[Wu(h.cx,h.cy,h.outerRadius,g),b],key:"line"});return p.createElement(of,{zIndex:nc.label,key:"label-".concat(h.startAngle,"-").concat(h.endAngle,"-").concat(h.midAngle,"-").concat(m)},p.createElement(qs,null,i&&XMt(i,v),ZMt(o,y,Na(h,a))))});return p.createElement(qs,{className:"recharts-pie-labels"},f)}function QMt(e){var{sectors:t,props:n,showLabels:r}=e,{label:o}=n;return typeof o=="object"&&o!=null&&"position"in o?p.createElement(J3,{label:o}):p.createElement(JMt,{sectors:t,props:n,showLabels:r})}function eRt(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:o,shape:i,id:a}=e,l=Hr(zx),c=Hr(jue),u=Hr(CTt),{onMouseEnter:d,onClick:f,onMouseLeave:h}=o,m=HH(o,DMt),g=LH(d,o.dataKey,a),b=$H(h),y=FH(f,o.dataKey,a);return t==null||t.length===0?null:p.createElement(p.Fragment,null,t.map((v,x)=>{if((v==null?void 0:v.startAngle)===0&&(v==null?void 0:v.endAngle)===0&&t.length!==1)return null;var S=u==null||u===a,C=String(x)===l&&(c==null||o.dataKey===c)&&S,_=l?r:null,N=n&&C?n:_,E=Qc(Qc({},v),{},{stroke:v.stroke,tabIndex:-1,[pce]:x,[hce]:o.dataKey});return p.createElement(qs,RS({key:"sector-".concat(v==null?void 0:v.startAngle,"-").concat(v==null?void 0:v.endAngle,"-").concat(v.midAngle,"-").concat(x),tabIndex:-1,className:"recharts-pie-sector"},jI(m,v,x),{onMouseEnter:g(v,x),onMouseLeave:b(v,x),onClick:y(v,x)}),p.createElement(DM,RS({option:i??N,index:x,shapeType:"sector",isActive:C},E)))}))}function tRt(e){var t,{pieSettings:n,displayedData:r,cells:o,offset:i}=e,{cornerRadius:a,startAngle:l,endAngle:c,dataKey:u,nameKey:d,tooltipType:f}=n,h=Math.abs(n.minAngle),m=KMt(l,c),g=Math.abs(m),b=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,y=r.filter(N=>Na(N,u,0)!==0).length,v=(g>=360?y:y-1)*b,x=g-y*h-v,S=r.reduce((N,E)=>{var I=Na(E,u,0);return N+(Yr(I)?I:0)},0),C;if(S>0){var _;C=r.map((N,E)=>{var I=Na(N,u,0),A=Na(N,d,E),R=qMt(n,i,N),k=(Yr(I)?I:0)/S,T,D=Qc(Qc({},N),o&&o[E]&&o[E].props);E?T=_.endAngle+Zd(m)*b*(I!==0?1:0):T=l;var O=T+Zd(m)*((I!==0?h:0)+k*x),z=(T+O)/2,F=(R.innerRadius+R.outerRadius)/2,U=[{name:A,value:I,payload:D,dataKey:u,type:f}],G=Wu(R.cx,R.cy,F,z);return _=Qc(Qc(Qc(Qc({},n.presentationProps),{},{percent:k,cornerRadius:typeof a=="string"?parseFloat(a):a,name:A,tooltipPayload:U,midAngle:z,middleRadius:F,tooltipPosition:G},D),R),{},{value:I,dataKey:u,startAngle:T,endAngle:O,payload:D,paddingAngle:Zd(m)*b}),_})}return C}function nRt(e){var{showLabels:t,sectors:n,children:r}=e,o=p.useMemo(()=>!t||!n?[]:n.map(i=>({value:i.value,payload:i.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:i.cx,cy:i.cy,innerRadius:i.innerRadius,outerRadius:i.outerRadius,startAngle:i.startAngle,endAngle:i.endAngle,clockWise:!1},fill:i.fill})),[n,t]);return p.createElement($4t,{value:t?o:void 0},r)}function rRt(e){var{props:t,previousSectorsRef:n,id:r}=e,{sectors:o,isAnimationActive:i,animationBegin:a,animationDuration:l,animationEasing:c,activeShape:u,inactiveShape:d,onAnimationStart:f,onAnimationEnd:h}=t,m=_j(t,"recharts-pie-"),g=n.current,[b,y]=p.useState(!1),v=p.useCallback(()=>{typeof h=="function"&&h(),y(!1)},[h]),x=p.useCallback(()=>{typeof f=="function"&&f(),y(!0)},[f]);return p.createElement(nRt,{showLabels:!b,sectors:o},p.createElement(Cj,{animationId:m,begin:a,duration:l,isActive:i,easing:c,onAnimationStart:x,onAnimationEnd:v,key:m},S=>{var C=[],_=o&&o[0],N=_==null?void 0:_.startAngle;return o==null||o.forEach((E,I)=>{var A=g&&g[I],R=I>0?S_(E,"paddingAngle",0):0;if(A){var k=ba(A.endAngle-A.startAngle,E.endAngle-E.startAngle,S),T=Qc(Qc({},E),{},{startAngle:N+R,endAngle:N+k+R});C.push(T),N=T.endAngle}else{var{endAngle:D,startAngle:O}=E,z=ba(0,D-O,S),F=Qc(Qc({},E),{},{startAngle:N+R,endAngle:N+z+R});C.push(F),N=F.endAngle}}),n.current=C,p.createElement(qs,null,p.createElement(eRt,{sectors:C,activeShape:u,inactiveShape:d,allOtherPieProps:t,shape:t.shape,id:r}))}),p.createElement(QMt,{showLabels:!b,sectors:o,props:t}),t.children)}var oRt={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:nc.area};function iRt(e){var{id:t}=e,n=HH(e,LMt),{hide:r,className:o,rootTabIndex:i}=e,a=p.useMemo(()=>DH(e.children,Ah),[e.children]),l=Hr(d=>tMt(d,t,a)),c=p.useRef(null),u=Ae("recharts-pie",o);return r||l==null?(c.current=null,p.createElement(qs,{tabIndex:i,className:u})):p.createElement(of,{zIndex:e.zIndex},p.createElement(UMt,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:l,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType}),p.createElement(qs,{tabIndex:i,className:u},p.createElement(rRt,{props:Qc(Qc({},n),{},{sectors:l}),previousSectorsRef:c,id:t})))}function Ej(e){var t=Fl(e,oRt),{id:n}=t,r=HH(t,$Mt),o=Af(r);return p.createElement(eO,{id:n,type:"pie"},i=>p.createElement(p.Fragment,null,p.createElement(RMt,{type:"pie",id:i,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:o,maxRadius:t.maxRadius}),p.createElement(VMt,RS({},r,{id:i})),p.createElement(iRt,RS({},r,{id:i}))))}Ej.displayName="Pie";var aRt=["points"];function p2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function tY(e){for(var t=1;t{var y,v,x=tY(tY(tY({r:3},a),f),{},{index:b,cx:(y=g.x)!==null&&y!==void 0?y:void 0,cy:(v=g.y)!==null&&v!==void 0?v:void 0,dataKey:i,value:g.value,payload:g.payload,points:t});return p.createElement(fRt,{key:"dot-".concat(b),option:n,dotProps:x,className:o})}),m={};return l&&c!=null&&(m.clipPath="url(#clipPath-".concat(d?"":"dots-").concat(c,")")),p.createElement(of,{zIndex:u},p.createElement(qs,gB({className:r},m),h))}function h2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function m2e(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),ERt=fn([NRt,l1,c1],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),VH=()=>Hr(ERt),PRt=()=>Hr(PTt);function g2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function nY(e){for(var t=1;t{var{point:t,childIndex:n,mainColor:r,activeDot:o,dataKey:i,clipPath:a}=e;if(o===!1||t.x==null||t.y==null)return null;var l={index:n,dataKey:i,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},c=nY(nY(nY({},l),AS(o)),Qle(o)),u;return p.isValidElement(o)?u=p.cloneElement(o,c):typeof o=="function"?u=o(c):u=p.createElement(oHe,c),p.createElement(qs,{className:"recharts-active-dot",clipPath:a},u)};function bte(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:o,clipPath:i,zIndex:a=nc.activeDot}=e,l=Hr(zx),c=PRt();if(t==null||c==null)return null;var u=t.find(d=>c.includes(d.payload));return ls(u)?null:p.createElement(of,{zIndex:a},p.createElement(kRt,{point:u,childIndex:Number(l),mainColor:n,dataKey:o,activeDot:r,clipPath:i}))}var MRt="Invariant failed";function hHe(e,t){throw new Error(MRt)}var RRt=["x","y"];function vte(){return vte=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:0;return(r,o)=>{if(Yr(t))return t;var i=Yr(r)||ls(r);return i?t(r,o):(i||hHe(),n)}},HRt={},mHe=Oh({name:"errorBars",initialState:HRt,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:o}=t.payload;e[n]&&(e[n]=e[n].map(i=>i.dataKey===r.dataKey&&i.direction===r.direction?o:i))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==r.dataKey||o.direction!==r.direction))}}}),{addErrorBar:s8r,replaceErrorBar:l8r,removeErrorBar:c8r}=mHe.actions,VRt=mHe.reducer,URt=["children"];function GRt(e,t){if(e==null)return{};var n,r,o=WRt(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r({x:0,y:0,value:0}),errorBarOffset:0},KRt=p.createContext(qRt);function Oue(e){var{children:t}=e,n=GRt(e,URt);return p.createElement(KRt.Provider,{value:n},t)}function tO(e,t){var n,r,o=Hr(u=>Yb(u,e)),i=Hr(u=>Xb(u,t)),a=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:Vd.allowDataOverflow,l=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:Ud.allowDataOverflow,c=a||l;return{needClip:c,needClipX:a,needClipY:l}}function UH(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,o=VH(),{needClipX:i,needClipY:a,needClip:l}=tO(t,n);if(!l||!o)return null;var{x:c,y:u,width:d,height:f}=o;return p.createElement("clipPath",{id:"clipPath-".concat(r)},p.createElement("rect",{x:i?c:c-d/2,y:a?u:u-f/2,width:i?d:d*2,height:a?f:f*2}))}function YRt(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&As(e.zIndex)?e.zIndex:t}var rY={exports:{}},oY={};/** + * @license React + * use-sync-external-store-with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var b2e;function XRt(){if(b2e)return oY;b2e=1;var e=wI();function t(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return oY.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var m=o(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=a(function(){function y(_){if(!v){if(v=!0,x=_,_=f(_),h!==void 0&&g.hasValue){var N=g.value;if(h(N,_))return S=N}return S=_}if(N=S,n(x,_))return N;var E=f(_);return h!==void 0&&h(N,E)?(x=_,N):(x=_,S=E)}var v=!1,x,S,C=d===void 0?null:d;return[function(){return y(u())},C===null?void 0:function(){return y(C())}]},[u,d,f,h]);var b=r(c,m[0],m[1]);return i(function(){g.hasValue=!0,g.value=b},[b]),l(b),b},oY}var v2e;function ZRt(){return v2e||(v2e=1,rY.exports=XRt()),rY.exports}ZRt();var JRt=p.version.startsWith("19"),QRt=Symbol.for(JRt?"react.transitional.element":"react.element"),e3t=Symbol.for("react.portal"),t3t=Symbol.for("react.fragment"),n3t=Symbol.for("react.strict_mode"),r3t=Symbol.for("react.profiler"),o3t=Symbol.for("react.consumer"),i3t=Symbol.for("react.context"),gHe=Symbol.for("react.forward_ref"),a3t=Symbol.for("react.suspense"),s3t=Symbol.for("react.suspense_list"),Due=Symbol.for("react.memo"),l3t=Symbol.for("react.lazy"),c3t=gHe,u3t=Due;function d3t(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case QRt:switch(e=e.type,e){case t3t:case r3t:case n3t:case a3t:case s3t:return e;default:switch(e=e&&e.$$typeof,e){case i3t:case gHe:case l3t:case Due:return e;case o3t:return e;default:return t}}case e3t:return t}}}function f3t(e){return d3t(e)===Due}function p3t(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let l=!1,c,u,d,f,h;function m(x,S){return c=x,u=S,d=e(c,u),f=t(r,u),h=n(d,f,u),l=!0,h}function g(){return d=e(c,u),t.dependsOnOwnProps&&(f=t(r,u)),h=n(d,f,u),h}function b(){return e.dependsOnOwnProps&&(d=e(c,u)),t.dependsOnOwnProps&&(f=t(r,u)),h=n(d,f,u),h}function y(){const x=e(c,u),S=!a(x,d);return d=x,S&&(h=n(d,f,u)),h}function v(x,S){const C=!i(S,u),_=!o(x,c,S,u);return c=x,u=S,C&&_?g():C?b():_?y():h}return function(S,C){return l?v(S,C):m(S,C)}}function h3t(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const i=t(e,o),a=n(e,o),l=r(e,o);return p3t(i,a,l,e,o)}function m3t(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function xte(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function x2e(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function yHe(e,t){return function(r,{displayName:o}){const i=function(l,c){return i.dependsOnOwnProps?i.mapToProps(l,c):i.mapToProps(l,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(l,c){i.mapToProps=e,i.dependsOnOwnProps=x2e(e);let u=i(l,c);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=x2e(u),u=i(l,c)),u},i}}function Lue(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function g3t(e){return e&&typeof e=="object"?xte(t=>m3t(e,t)):e?typeof e=="function"?yHe(e):Lue(e,"mapDispatchToProps"):xte(t=>({dispatch:t}))}function y3t(e){return e?typeof e=="function"?yHe(e):Lue(e,"mapStateToProps"):xte(()=>({}))}function b3t(e,t,n){return{...n,...e,...t}}function v3t(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,a;return function(c,u,d){const f=e(c,u,d);return i?o(f,a)||(a=f):(i=!0,a=f),a}}}function x3t(e){return e?typeof e=="function"?v3t(e):Lue(e,"mergeProps"):()=>b3t}function w3t(e){e()}function S3t(){let e=null,t=null;return{clear(){e=null,t=null},notify(){w3t(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var w2e={notify(){},get:()=>[]};function bHe(e,t){let n,r=w2e,o=0,i=!1;function a(b){d();const y=r.subscribe(b);let v=!1;return()=>{v||(v=!0,y(),f())}}function l(){r.notify()}function c(){g.onStateChange&&g.onStateChange()}function u(){return i}function d(){o++,n||(n=t?t.addNestedSub(c):e.subscribe(c),r=S3t())}function f(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=w2e)}function h(){i||(i=!0,d())}function m(){i&&(i=!1,f())}const g={addNestedSub:a,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:u,trySubscribe:h,tryUnsubscribe:m,getListeners:()=>r};return g}var C3t=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_3t=C3t(),j3t=()=>typeof navigator<"u"&&navigator.product==="ReactNative",N3t=j3t(),E3t=()=>_3t||N3t?p.useLayoutEffect:p.useEffect,bB=E3t();function S2e(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function n8(e,t){if(S2e(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;oe(...t),n)}function F3t(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function B3t(e,t,n,r,o,i,a,l,c,u,d){if(!e)return()=>{};let f=!1,h=null;const m=()=>{if(f||!l.current)return;const b=t.getState();let y,v;try{y=r(b,o.current)}catch(x){v=x,h=x}v||(h=null),y===i.current?a.current||u():(i.current=y,c.current=y,a.current=!0,d())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,h)throw h}}function z3t(e,t){return e===t}function H3t(e,t,n,{pure:r,areStatesEqual:o=z3t,areOwnPropsEqual:i=n8,areStatePropsEqual:a=n8,areMergedPropsEqual:l=n8,forwardRef:c=!1,context:u=xHe}={}){const d=u,f=y3t(e),h=g3t(t),m=x3t(n),g=!!e;return y=>{const v=y.displayName||y.name||"Component",x=`Connect(${v})`,S={shouldHandleStateChanges:g,displayName:x,wrappedComponentName:v,WrappedComponent:y,initMapStateToProps:f,initMapDispatchToProps:h,initMergeProps:m,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:l};function C(E){const[I,A,R]=p.useMemo(()=>{const{reactReduxForwardedRef:se,...me}=E;return[E.context,se,me]},[E]),k=p.useMemo(()=>{let se=d;return I!=null&&I.Consumer,se},[I,d]),T=p.useContext(k),D=!!E.store&&!!E.store.getState&&!!E.store.dispatch,O=!!T&&!!T.store,z=D?E.store:T.store,F=O?T.getServerState:z.getState,U=p.useMemo(()=>h3t(z.dispatch,S),[z]),[G,W]=p.useMemo(()=>{if(!g)return L3t;const se=bHe(z,D?void 0:T.subscription),me=se.notifyNestedSubs.bind(se);return[se,me]},[z,D,T]),Y=p.useMemo(()=>D?T:{...T,subscription:G},[D,T,G]),B=p.useRef(void 0),$=p.useRef(R),K=p.useRef(void 0),q=p.useRef(!1),Z=p.useRef(!1),J=p.useRef(void 0);bB(()=>(Z.current=!0,()=>{Z.current=!1}),[]);const oe=p.useMemo(()=>()=>K.current&&R===$.current?K.current:U(z.getState(),R),[z,R]),de=p.useMemo(()=>me=>G?B3t(g,z,G,U,$,B,q,Z,K,W,me):()=>{},[G]);$3t(F3t,[$,B,q,R,K,W]);let ae;try{ae=p.useSyncExternalStore(de,oe,F?()=>U(F(),R):oe)}catch(se){throw J.current&&(se.message+=` +The error may be correlated with this previous error: +${J.current.stack} + +`),se}bB(()=>{J.current=void 0,K.current=void 0,B.current=ae});const ue=p.useMemo(()=>p.createElement(y,{...ae,ref:A}),[A,y,ae]);return p.useMemo(()=>g?p.createElement(k.Provider,{value:Y},ue):ue,[k,ue,Y])}const N=p.memo(C);if(N.WrappedComponent=y,N.displayName=C.displayName=x,c){const I=p.forwardRef(function(R,k){return p.createElement(N,{...R,reactReduxForwardedRef:k})});return I.displayName=x,I.WrappedComponent=y,wte(I,y)}return wte(N,y)}}var wHe=H3t;function V3t(e){const{children:t,context:n,serverState:r,store:o}=e,i=p.useMemo(()=>{const c=bHe(o);return{store:o,subscription:c,getServerState:r?()=>r:void 0}},[o,r]),a=p.useMemo(()=>o.getState(),[o]);bB(()=>{const{subscription:c}=i;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),a!==o.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[i,a]);const l=n||xHe;return p.createElement(l.Provider,{value:i},t)}var SHe=V3t,U3t=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle"]);function G3t(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function $I(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(U3t.has(r)){if(e[r]==null&&t[r]==null)continue;if(!n8(e[r],t[r]))return!1}else if(!G3t(e[r],t[r]))return!1;return!0}var W3t=["onMouseEnter","onMouseLeave","onClick"],q3t=["value","background","tooltipPosition"],K3t=["id"],Y3t=["onMouseEnter","onClick","onMouseLeave"];function Hx(){return Hx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{dataKey:t,name:n,fill:r,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:r,value:Kb(n,t),payload:e}]},tOt=p.memo(e=>{var{dataKey:t,stroke:n,strokeWidth:r,fill:o,name:i,hide:a,unit:l,tooltipType:c}=e,u={dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:n,strokeWidth:r,fill:o,dataKey:t,nameKey:void 0,name:Kb(i,t),hide:a,type:c,color:o,unit:l}};return p.createElement(Q3,{tooltipEntrySettings:u})});function nOt(e){var t=Hr(zx),{data:n,dataKey:r,background:o,allOtherBarProps:i}=e,{onMouseEnter:a,onMouseLeave:l,onClick:c}=i,u=vB(i,W3t),d=LH(a,r),f=$H(l),h=FH(c,r);if(!o||n==null)return null;var m=AS(o);return p.createElement(of,{zIndex:YRt(o,nc.barBackground)},n.map((g,b)=>{var{value:y,background:v,tooltipPosition:x}=g,S=vB(g,q3t);if(!v)return null;var C=d(g,b),_=f(g,b),N=h(g,b),E=Pp(Pp(Pp(Pp(Pp({option:o,isActive:String(b)===t},S),{},{fill:"#eee"},v),m),jI(u,g,b)),{},{onMouseEnter:C,onMouseLeave:_,onClick:N,dataKey:r,index:b,className:"recharts-bar-background-rectangle"});return p.createElement(yB,Hx({key:"background-bar-".concat(b)},E))}))}function rOt(e){var{showLabels:t,children:n,rects:r}=e,o=r==null?void 0:r.map(i=>{var a={x:i.x,y:i.y,width:i.width,lowerWidth:i.width,upperWidth:i.width,height:i.height};return Pp(Pp({},a),{},{value:i.value,payload:i.payload,parentViewBox:i.parentViewBox,viewBox:a,fill:i.fill})});return p.createElement(MH,{value:t?o:void 0},n)}function oOt(e){var{shape:t,activeBar:n,baseProps:r,entry:o,index:i,dataKey:a}=e,l=Hr(zx),c=Hr(jue),u=n&&String(i)===l&&(c==null||a===c),d=u?n:t;return u?p.createElement(of,{zIndex:nc.activeBar},p.createElement(yB,Hx({},r,{name:String(r.name)},o,{isActive:u,option:d,index:i,dataKey:a}))):p.createElement(yB,Hx({},r,{name:String(r.name)},o,{isActive:u,option:d,index:i,dataKey:a}))}function iOt(e){var{shape:t,baseProps:n,entry:r,index:o,dataKey:i}=e;return p.createElement(yB,Hx({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:o,dataKey:i}))}function aOt(e){var t,{data:n,props:r}=e,o=(t=Af(r))!==null&&t!==void 0?t:{},{id:i}=o,a=vB(o,K3t),{shape:l,dataKey:c,activeBar:u}=r,{onMouseEnter:d,onClick:f,onMouseLeave:h}=r,m=vB(r,Y3t),g=LH(d,c),b=$H(h),y=FH(f,c);return n?p.createElement(p.Fragment,null,n.map((v,x)=>p.createElement(qs,Hx({key:"rectangle-".concat(v==null?void 0:v.x,"-").concat(v==null?void 0:v.y,"-").concat(v==null?void 0:v.value,"-").concat(x),className:"recharts-bar-rectangle"},jI(m,v,x),{onMouseEnter:g(v,x),onMouseLeave:b(v,x),onClick:y(v,x)}),u?p.createElement(oOt,{shape:l,activeBar:u,baseProps:a,entry:v,index:x,dataKey:c}):p.createElement(iOt,{shape:l,baseProps:a,entry:v,index:x,dataKey:c})))):null}function sOt(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:o,isAnimationActive:i,animationBegin:a,animationDuration:l,animationEasing:c,onAnimationEnd:u,onAnimationStart:d}=t,f=n.current,h=_j(t,"recharts-bar-"),[m,g]=p.useState(!1),b=!m,y=p.useCallback(()=>{typeof u=="function"&&u(),g(!1)},[u]),v=p.useCallback(()=>{typeof d=="function"&&d(),g(!0)},[d]);return p.createElement(rOt,{showLabels:b,rects:r},p.createElement(Cj,{animationId:h,begin:a,duration:l,isActive:i,easing:c,onAnimationEnd:y,onAnimationStart:v,key:h},x=>{var S=x===1?r:r==null?void 0:r.map((C,_)=>{var N=f&&f[_];if(N)return Pp(Pp({},C),{},{x:ba(N.x,C.x,x),y:ba(N.y,C.y,x),width:ba(N.width,C.width,x),height:ba(N.height,C.height,x)});if(o==="horizontal"){var E=ba(0,C.height,x),I=ba(C.stackedBarStart,C.y,x);return Pp(Pp({},C),{},{y:I,height:E})}var A=ba(0,C.width,x),R=ba(C.stackedBarStart,C.x,x);return Pp(Pp({},C),{},{width:A,x:R})});return x>0&&(n.current=S??null),S==null?null:p.createElement(qs,null,p.createElement(aOt,{props:t,data:S}))}),p.createElement(J3,{label:t.label}),t.children)}function lOt(e){var t=p.useRef(null);return p.createElement(sOt,{previousRectanglesRef:t,props:e})}var CHe=0,cOt=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:Na(e,t)}};class uOt extends p.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:o,xAxisId:i,yAxisId:a,needClip:l,background:c,id:u}=this.props;if(t||n==null)return null;var d=Ae("recharts-bar",o),f=u;return p.createElement(qs,{className:d,id:u},l&&p.createElement("defs",null,p.createElement(UH,{clipPathId:f,xAxisId:i,yAxisId:a})),p.createElement(qs,{className:"recharts-bar-rectangles",clipPath:l?"url(#clipPath-".concat(f,")"):void 0},p.createElement(nOt,{data:n,dataKey:r,background:c,allOtherBarProps:this.props}),p.createElement(lOt,this.props)))}}var dOt={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:CHe,xAxisId:0,yAxisId:0,zIndex:nc.bar};function fOt(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:o,minPointSize:i,activeBar:a,animationBegin:l,animationDuration:c,animationEasing:u,isAnimationActive:d}=e,{needClip:f}=tO(t,n),h=Sj(),m=Tu(),g=DH(e.children,Ah),b=Hr(x=>BOt(x,t,n,m,e.id,g));if(h!=="vertical"&&h!=="horizontal")return null;var y,v=b==null?void 0:b[0];return v==null||v.height==null||v.width==null?y=0:y=h==="vertical"?v.height/2:v.width/2,p.createElement(Oue,{xAxisId:t,yAxisId:n,data:b,dataPointFormatter:cOt,errorBarOffset:y},p.createElement(uOt,Hx({},e,{layout:h,needClip:f,data:b,xAxisId:t,yAxisId:n,hide:r,legendType:o,minPointSize:i,activeBar:a,animationBegin:l,animationDuration:c,animationEasing:u,isAnimationActive:d})))}function pOt(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r},pos:o,bandSize:i,xAxis:a,yAxis:l,xAxisTicks:c,yAxisTicks:u,stackedData:d,displayedData:f,offset:h,cells:m,parentViewBox:g,dataStartIndex:b}=e,y=t==="horizontal"?l:a,v=d?y.scale.domain():null,x=tjt({numericAxis:y}),S=y.scale(x);return f.map((C,_)=>{var N,E,I,A,R,k;d?N=X_t(d[_+b],v):(N=Na(C,n),Array.isArray(N)||(N=[x,N]));var T=zRt(r,CHe)(N[1],_);if(t==="horizontal"){var D,[O,z]=[l.scale(N[0]),l.scale(N[1])];E=$we({axis:a,ticks:c,bandSize:i,offset:o.offset,entry:C,index:_}),I=(D=z??O)!==null&&D!==void 0?D:void 0,A=o.size;var F=O-z;if(R=Ih(F)?0:F,k={x:E,y:h.top,width:A,height:h.height},Math.abs(T)>0&&Math.abs(R)0&&Math.abs(A)p.createElement(p.Fragment,null,p.createElement(BH,{legendPayload:eOt(t)}),p.createElement(tOt,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType}),p.createElement(zH,{type:"bar",id:r,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:cBe(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),p.createElement(of,{zIndex:t.zIndex},p.createElement(fOt,Hx({},t,{id:r})))))}var wu=p.memo(hOt,$I);wu.displayName="Bar";function E2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function FL(e){for(var t=1;tt,vOt=(e,t,n)=>n,xOt=(e,t,n,r)=>r,wOt=(e,t,n,r,o)=>o,nO=fn([MI,wOt],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),SOt=fn([nO],e=>e==null?void 0:e.maxBarSize),COt=(e,t,n,r,o,i)=>i,P2e=(e,t,n)=>{var r=n??e;if(!ls(r))return cp(r,t,0)},_Ot=fn([Fi,MI,bOt,vOt,xOt],(e,t,n,r,o)=>t.filter(i=>e==="horizontal"?i.xAxisId===n:i.yAxisId===r).filter(i=>i.isPanorama===o).filter(i=>i.hide===!1).filter(i=>i.type==="bar")),jOt=(e,t,n,r)=>{var o=Fi(e);return o==="horizontal"?RM(e,"yAxis",n,r):RM(e,"xAxis",t,r)},NOt=(e,t,n)=>{var r=Fi(e);return r==="horizontal"?bCe(e,"xAxis",t):bCe(e,"yAxis",n)},EOt=(e,t,n)=>{var r={},o=e.filter(jH),i=e.filter(u=>u.stackId==null),a=o.reduce((u,d)=>(u[d.stackId]||(u[d.stackId]=[]),u[d.stackId].push(d),u),r),l=Object.entries(a).map(u=>{var[d,f]=u,h=f.map(g=>g.dataKey),m=P2e(t,n,f[0].barSize);return{stackId:d,dataKeys:h,barSize:m}}),c=i.map(u=>{var d=[u.dataKey].filter(h=>h!=null),f=P2e(t,n,u.barSize);return{stackId:void 0,dataKeys:d,barSize:f}});return[...l,...c]},POt=fn([_Ot,jIt,NOt],EOt),IOt=(e,t,n,r,o)=>{var i,a,l=nO(e,t,n,r,o);if(l!=null){var c=Fi(e),u=Rze(e),{maxBarSize:d}=l,f=ls(d)?u:d,h,m;return c==="horizontal"?(h=kg(e,"xAxis",t,r),m=Tg(e,"xAxis",t,r)):(h=kg(e,"yAxis",n,r),m=Tg(e,"yAxis",n,r)),(i=(a=TS(h,m,!0))!==null&&a!==void 0?a:f)!==null&&i!==void 0?i:0}},_He=(e,t,n,r)=>{var o=Fi(e),i,a;return o==="horizontal"?(i=kg(e,"xAxis",t,r),a=Tg(e,"xAxis",t,r)):(i=kg(e,"yAxis",n,r),a=Tg(e,"yAxis",n,r)),TS(i,a)};function AOt(e,t,n,r,o){var i=r.length;if(!(i<1)){var a=cp(e,n,0,!0),l,c=[];if(As(r[0].barSize)){var u=!1,d=n/i,f=r.reduce((v,x)=>v+(x.barSize||0),0);f+=(i-1)*a,f>=n&&(f-=(i-1)*a,a=0),f>=n&&d>0&&(u=!0,d*=.9,f=i*d);var h=(n-f)/2>>0,m={offset:h-a,size:0};l=r.reduce((v,x)=>{var S,C={stackId:x.stackId,dataKeys:x.dataKeys,position:{offset:m.offset+m.size+a,size:u?d:(S=x.barSize)!==null&&S!==void 0?S:0}},_=[...v,C];return m=_[_.length-1].position,_},c)}else{var g=cp(t,n,0,!0);n-2*g-(i-1)*a<=0&&(a=0);var b=(n-2*g-(i-1)*a)/i;b>1&&(b>>=0);var y=As(o)?Math.min(b,o):b;l=r.reduce((v,x,S)=>[...v,{stackId:x.stackId,dataKeys:x.dataKeys,position:{offset:g+(b+a)*S+(b-y)/2,size:y}}],c)}return l}}var TOt=(e,t,n,r,o,i,a)=>{var l=ls(a)?t:a,c=AOt(n,r,o!==i?o:i,e,l);return o!==i&&c!=null&&(c=c.map(u=>FL(FL({},u),{},{position:FL(FL({},u.position),{},{offset:u.position.offset-o/2})}))),c},kOt=fn([POt,Rze,_It,Oze,IOt,_He,SOt],TOt),MOt=(e,t,n,r)=>kg(e,"xAxis",t,r),ROt=(e,t,n,r)=>kg(e,"yAxis",n,r),OOt=(e,t,n,r)=>Tg(e,"xAxis",t,r),DOt=(e,t,n,r)=>Tg(e,"yAxis",n,r),LOt=fn([kOt,nO],(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}}),$Ot=(e,t)=>{var n=_H(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var o=e[r];if(o){var{stackedData:i}=o;if(i)return i.find(a=>a.key===n)}}}},FOt=fn([jOt,nO],$Ot),BOt=fn([Nd,mce,MOt,ROt,OOt,DOt,LOt,Fi,II,_He,FOt,nO,COt],(e,t,n,r,o,i,a,l,c,u,d,f,h)=>{var{chartData:m,dataStartIndex:g,dataEndIndex:b}=c;if(!(f==null||a==null||t==null||l!=="horizontal"&&l!=="vertical"||n==null||r==null||o==null||i==null||u==null)){var{data:y}=f,v;if(y!=null&&y.length>0?v=y:v=m==null?void 0:m.slice(g,b+1),v!=null)return pOt({layout:l,barSettings:f,pos:a,parentViewBox:t,bandSize:u,xAxis:n,yAxis:r,xAxisTicks:o,yAxisTicks:i,stackedData:d,displayedData:v,offset:e,cells:h,dataStartIndex:g})}}),jHe=e=>{var{chartData:t}=e,n=nl(),r=Tu();return p.useEffect(()=>r?()=>{}:(n(TCe(t)),()=>{n(TCe(void 0))}),[t,n,r]),null},I2e={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},NHe=Oh({name:"brush",initialState:I2e,reducers:{setBrushSettings(e,t){return t.payload==null?I2e:t.payload}}}),{setBrushSettings:u8r}=NHe.actions,zOt=NHe.reducer;function A2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function BL(e){for(var t=1;t{var{x:n,y:r}=e,{x:o,y:i}=t;return{x:Math.min(n,o),y:Math.min(r,i),width:Math.abs(o-n),height:Math.abs(i-r)}},GOt=e=>{var{x1:t,y1:n,x2:r,y2:o}=e;return UOt({x:t,y:n},{x:r,y:o})};class GH{static create(t){return new GH(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:n,position:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(r)switch(r){case"start":return this.scale(t);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}case"end":{var i=this.bandwidth?this.bandwidth():0;return this.scale(t)+i}default:return this.scale(t)}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+a}return this.scale(t)}}isInRange(t){var n=this.range(),r=n[0],o=n[n.length-1];return r<=o?t>=r&&t<=o:t>=o&&t<=r}}EHe(GH,"EPS",1e-4);var WOt=e=>{var t=Object.keys(e).reduce((n,r)=>BL(BL({},n),{},{[r]:GH.create(e[r])}),{});return BL(BL({},t),{},{apply(n){var{bandAware:r,position:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.fromEntries(Object.entries(n).map(i=>{var[a,l]=i;return[a,t[a].apply(l,{bandAware:r,position:o})]}))},isInRange(n){return Object.keys(n).every(r=>t[r].isInRange(n[r]))}})};function qOt(e){return(e%180+180)%180}var KOt=function(t){var{width:n,height:r}=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=qOt(o),a=i*Math.PI/180,l=Math.atan(r/n),c=a>l&&a{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=z0(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=z0(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=z0(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:d8r,removeDot:f8r,addArea:p8r,removeArea:h8r,addLine:XOt,removeLine:ZOt}=PHe.actions,JOt=PHe.reducer,IHe=p.createContext(void 0),QOt=e=>{var{children:t}=e,[n]=p.useState("".concat(wM("recharts"),"-clip")),r=VH();if(r==null)return null;var{x:o,y:i,width:a,height:l}=r;return p.createElement(IHe.Provider,{value:n},p.createElement("defs",null,p.createElement("clipPath",{id:n},p.createElement("rect",{x:o,y:i,height:l,width:a}))),t)},eDt=()=>p.useContext(IHe);function T2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function k2e(e){for(var t=1;t{var n;if(p.isValidElement(e))n=p.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{if(!As(t.x1)||!As(t.y1)||!As(t.x2)||!As(t.y2))return null;n=p.createElement("line",xB({},t,{className:"recharts-reference-line-line"}))}return n},iDt=(e,t,n,r,o,i)=>{var{x:a,width:l}=i,c=o.y.apply(e,{position:n});if(Ih(c)||t==="discard"&&!o.y.isInRange(c))return null;var u=[{x:a+l,y:c},{x:a,y:c}];return r==="left"?u.reverse():u},aDt=(e,t,n,r,o,i)=>{var{y:a,height:l}=i,c=o.x.apply(e,{position:n});if(Ih(c)||t==="discard"&&!o.x.isInRange(c))return null;var u=[{x:c,y:a+l},{x:c,y:a}];return r==="top"?u.reverse():u},sDt=(e,t,n,r)=>{var o=e.map(i=>r.apply(i,{position:n}));return t==="discard"&&o.some(i=>!r.isInRange(i))?null:o},lDt=(e,t,n,r,o,i)=>{var{x:a,y:l,segment:c,ifOverflow:u}=i,d=Pg(a),f=Pg(l);return f?iDt(l,u,n,o,e,t):d?aDt(a,u,n,r,e,t):c!=null&&c.length===2?sDt(c,u,n,e):null};function cDt(e){var t=nl();return p.useEffect(()=>(t(XOt(e)),()=>{t(ZOt(e))})),null}function uDt(e){var{xAxisId:t,yAxisId:n,shape:r,className:o,ifOverflow:i}=e,a=Tu(),l=eDt(),c=Hr(N=>Yb(N,t)),u=Hr(N=>Xb(N,n)),d=Hr(N=>MS(N,"xAxis",t,a)),f=Hr(N=>MS(N,"yAxis",n,a)),h=NI();if(!l||!h||c==null||u==null||d==null||f==null)return null;var m=WOt({x:d,y:f}),g=lDt(m,h,e.position,c.orientation,u.orientation,e);if(!g)return null;var[{x:b,y},{x:v,y:x}]=g,S=i==="hidden"?"url(#".concat(l,")"):void 0,C=k2e(k2e({clipPath:S},Tf(e)),{},{x1:b,y1:y,x2:v,y2:x}),_=GOt({x1:b,y1:y,x2:v,y2:x});return p.createElement(of,{zIndex:e.zIndex},p.createElement(qs,{className:Ae("recharts-reference-line",o)},oDt(r,C),p.createElement(Q9e,xB({},_,{lowerWidth:_.width,upperWidth:_.width}),p.createElement(tHe,{label:e.label}),e.children)))}var dDt={ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle",zIndex:nc.line};function $ue(e){var t=Fl(e,dDt);return p.createElement(p.Fragment,null,p.createElement(cDt,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x:t.x,y:t.y,segment:t.segment}),p.createElement(uDt,t))}$ue.displayName="ReferenceLine";function AHe(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;re*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function hDt(e,t){return AHe(e,t+1)}function mDt(e,t,n,r,o){for(var i=(r||[]).slice(),{start:a,end:l}=t,c=0,u=1,d=a,f=function(){var g=r==null?void 0:r[c];if(g===void 0)return{v:AHe(r,u)};var b=c,y,v=()=>(y===void 0&&(y=n(g,b)),y),x=g.coordinate,S=c===0||wB(e,x,v,d,l);S||(c=0,d=a,u+=1),S&&(d=x+e*(v()/2+o),c+=u)},h;u<=i.length;)if(h=f(),h)return h.v;return[]}function M2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Qf(e){for(var t=1;t(g===void 0&&(g=n(m,h)),g);if(h===a-1){var y=e*(m.coordinate+e*b()/2-c);i[h]=m=Qf(Qf({},m),{},{tickCoord:y>0?m.coordinate-y*e:m.coordinate})}else i[h]=m=Qf(Qf({},m),{},{tickCoord:m.coordinate});if(m.tickCoord!=null){var v=wB(e,m.tickCoord,b,l,c);v&&(c=m.tickCoord-e*(b()/2+o),i[h]=Qf(Qf({},m),{},{isShow:!0}))}},d=a-1;d>=0;d--)u(d);return i}function xDt(e,t,n,r,o,i){var a=(r||[]).slice(),l=a.length,{start:c,end:u}=t;if(i){var d=r[l-1],f=n(d,l-1),h=e*(d.coordinate+e*f/2-u);if(a[l-1]=d=Qf(Qf({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate}),d.tickCoord!=null){var m=wB(e,d.tickCoord,()=>f,c,u);m&&(u=d.tickCoord-e*(f/2+o),a[l-1]=Qf(Qf({},d),{},{isShow:!0}))}}for(var g=i?l-1:l,b=function(x){var S=a[x],C,_=()=>(C===void 0&&(C=n(S,x)),C);if(x===0){var N=e*(S.coordinate-e*_()/2-c);a[x]=S=Qf(Qf({},S),{},{tickCoord:N<0?S.coordinate-N*e:S.coordinate})}else a[x]=S=Qf(Qf({},S),{},{tickCoord:S.coordinate});if(S.tickCoord!=null){var E=wB(e,S.tickCoord,_,c,u);E&&(c=S.tickCoord+e*(_()/2+o),a[x]=Qf(Qf({},S),{},{isShow:!0}))}},y=0;y{var _=typeof u=="function"?u(S.value,C):S.value;return g==="width"?fDt(f4(_,{fontSize:t,letterSpacing:n}),b,f):f4(_,{fontSize:t,letterSpacing:n})[g]},v=o.length>=2?Zd(o[1].coordinate-o[0].coordinate):1,x=pDt(i,v,g);return c==="equidistantPreserveStart"?mDt(v,x,y,o,a):(c==="preserveStart"||c==="preserveStartEnd"?m=xDt(v,x,y,o,a,c==="preserveStartEnd"):m=vDt(v,x,y,o,a),m.filter(S=>S.isShow))}var wDt=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:o=0,tickMargin:i=0}=e,a=0;if(t){Array.from(t).forEach(d=>{if(d){var f=d.getBoundingClientRect();f.width>a&&(a=f.width)}});var l=n?n.getBoundingClientRect().width:0,c=o+i,u=a+c+l+(n?r:0);return Math.round(u)}return 0},SDt=["axisLine","width","height","className","hide","ticks","axisType"];function CDt(e,t){if(e==null)return{};var n,r,o=_Dt(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r{var{ticks:n=[],tick:r,tickLine:o,stroke:i,tickFormatter:a,unit:l,padding:c,tickTextProps:u,orientation:d,mirror:f,x:h,y:m,width:g,height:b,tickSize:y,tickMargin:v,fontSize:x,letterSpacing:S,getTicksConfig:C,events:_,axisType:N}=e,E=Fue(Vu(Vu({},C),{},{ticks:n}),x,S),I=ADt(d,f),A=TDt(d,f),R=Af(C),k=AS(r),T={};typeof o=="object"&&(T=o);var D=Vu(Vu({},R),{},{fill:"none"},T),O=E.map(U=>Vu({entry:U},IDt(U,h,m,g,b,d,y,f,v))),z=O.map(U=>{var{entry:G,line:W}=U;return p.createElement(qs,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(G.value,"-").concat(G.coordinate,"-").concat(G.tickCoord)},o&&p.createElement("line",E_({},D,W,{className:Ae("recharts-cartesian-axis-tick-line",S_(o,"className"))})))}),F=O.map((U,G)=>{var{entry:W,tick:Y}=U,B=Vu(Vu(Vu(Vu({textAnchor:I,verticalAnchor:A},R),{},{stroke:"none",fill:i},k),Y),{},{index:G,payload:W,visibleTicksCount:E.length,tickFormatter:a,padding:c},u);return p.createElement(qs,E_({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(W.value,"-").concat(W.coordinate,"-").concat(W.tickCoord)},jI(_,W,G)),r&&p.createElement(kDt,{option:r,tickProps:B,value:"".concat(typeof a=="function"?a(W.value,G):W.value).concat(l||"")}))});return p.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(N,"-ticks")},F.length>0&&p.createElement(of,{zIndex:nc.label},p.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(N,"-tick-labels"),ref:t},F)),z.length>0&&p.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(N,"-tick-lines")},z))}),RDt=p.forwardRef((e,t)=>{var{axisLine:n,width:r,height:o,className:i,hide:a,ticks:l,axisType:c}=e,u=CDt(e,SDt),[d,f]=p.useState(""),[h,m]=p.useState(""),g=p.useRef(null);p.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var y;return wDt({ticks:g.current,label:(y=e.labelRef)===null||y===void 0?void 0:y.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var b=p.useCallback(y=>{if(y){var v=y.getElementsByClassName("recharts-cartesian-axis-tick-value");g.current=v;var x=v[0];if(x){var S=window.getComputedStyle(x),C=S.fontSize,_=S.letterSpacing;(C!==d||_!==h)&&(f(C),m(_))}}},[d,h]);return a||r!=null&&r<=0||o!=null&&o<=0?null:p.createElement(of,{zIndex:e.zIndex},p.createElement(qs,{className:Ae("recharts-cartesian-axis",i)},p.createElement(PDt,{x:e.x,y:e.y,width:r,height:o,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:Af(e)}),p.createElement(MDt,{ref:b,axisType:c,events:u,fontSize:d,getTicksConfig:e,height:e.height,letterSpacing:h,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:l,unit:e.unit,width:e.width,x:e.x,y:e.y}),p.createElement(Q9e,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},p.createElement(tHe,{label:e.label,labelRef:e.labelRef}),e.children)))}),Bue=p.forwardRef((e,t)=>{var n=Fl(e,jx);return p.createElement(RDt,E_({},n,{ref:t}))});Bue.displayName="CartesianAxis";var ODt=["x1","y1","x2","y2","key"],DDt=["offset"],LDt=["xAxisId","yAxisId"],$Dt=["xAxisId","yAxisId"];function O2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function np(e){for(var t=1;t{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:o,width:i,height:a,ry:l}=e;return p.createElement("rect",{x:r,y:o,ry:l,width:i,height:a,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function THe(e){var{option:t,lineItemProps:n}=e,r;if(p.isValidElement(t))r=p.cloneElement(t,n);else if(typeof t=="function")r=t(n);else{var o,{x1:i,y1:a,x2:l,y2:c,key:u}=n,d=SB(n,ODt),f=(o=Af(d))!==null&&o!==void 0?o:{},{offset:h}=f,m=SB(f,DDt);r=p.createElement("line",_2({},m,{x1:i,y1:a,x2:l,y2:c,fill:"none",key:u}))}return r}function UDt(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:o}=e;if(!r||!o||!o.length)return null;var{xAxisId:i,yAxisId:a}=e,l=SB(e,LDt),c=o.map((u,d)=>{var f=np(np({},l),{},{x1:t,y1:u,x2:t+n,y2:u,key:"line-".concat(d),index:d});return p.createElement(THe,{key:"line-".concat(d),option:r,lineItemProps:f})});return p.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function GDt(e){var{y:t,height:n,vertical:r=!0,verticalPoints:o}=e;if(!r||!o||!o.length)return null;var{xAxisId:i,yAxisId:a}=e,l=SB(e,$Dt),c=o.map((u,d)=>{var f=np(np({},l),{},{x1:u,y1:t,x2:u,y2:t+n,key:"line-".concat(d),index:d});return p.createElement(THe,{option:r,lineItemProps:f,key:"line-".concat(d)})});return p.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function WDt(e){var{horizontalFill:t,fillOpacity:n,x:r,y:o,width:i,height:a,horizontalPoints:l,horizontal:c=!0}=e;if(!c||!t||!t.length||l==null)return null;var u=l.map(f=>Math.round(f+o-o)).sort((f,h)=>f-h);o!==u[0]&&u.unshift(0);var d=u.map((f,h)=>{var m=!u[h+1],g=m?o+a-f:u[h+1]-f;if(g<=0)return null;var b=h%t.length;return p.createElement("rect",{key:"react-".concat(h),y:f,x:r,height:g,width:i,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return p.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function qDt(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:o,y:i,width:a,height:l,verticalPoints:c}=e;if(!t||!n||!n.length)return null;var u=c.map(f=>Math.round(f+o-o)).sort((f,h)=>f-h);o!==u[0]&&u.unshift(0);var d=u.map((f,h)=>{var m=!u[h+1],g=m?o+a-f:u[h+1]-f;if(g<=0)return null;var b=h%n.length;return p.createElement("rect",{key:"react-".concat(h),x:f,y:i,width:g,height:l,stroke:"none",fill:n[b],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return p.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var KDt=(e,t)=>{var{xAxis:n,width:r,height:o,offset:i}=e;return sBe(Fue(np(np(np({},jx),n),{},{ticks:lBe(n),viewBox:{x:0,y:0,width:r,height:o}})),i.left,i.left+i.width,t)},YDt=(e,t)=>{var{yAxis:n,width:r,height:o,offset:i}=e;return sBe(Fue(np(np(np({},jx),n),{},{ticks:lBe(n),viewBox:{x:0,y:0,width:r,height:o}})),i.top,i.top+i.height,t)},XDt={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:nc.grid};function Ea(e){var t=yce(),n=bce(),r=mBe(),o=np(np({},Fl(e,XDt)),{},{x:Yr(e.x)?e.x:r.left,y:Yr(e.y)?e.y:r.top,width:Yr(e.width)?e.width:r.width,height:Yr(e.height)?e.height:r.height}),{xAxisId:i,yAxisId:a,x:l,y:c,width:u,height:d,syncWithTicks:f,horizontalValues:h,verticalValues:m}=o,g=Tu(),b=Hr(A=>vCe(A,"xAxis",i,g)),y=Hr(A=>vCe(A,"yAxis",a,g));if(!Db(u)||!Db(d)||!Yr(l)||!Yr(c))return null;var v=o.verticalCoordinatesGenerator||KDt,x=o.horizontalCoordinatesGenerator||YDt,{horizontalPoints:S,verticalPoints:C}=o;if((!S||!S.length)&&typeof x=="function"){var _=h&&h.length,N=x({yAxis:y?np(np({},y),{},{ticks:_?h:y.ticks}):void 0,width:t??u,height:n??d,offset:r},_?!0:f);G7(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof N,"]")),Array.isArray(N)&&(S=N)}if((!C||!C.length)&&typeof v=="function"){var E=m&&m.length,I=v({xAxis:b?np(np({},b),{},{ticks:E?m:b.ticks}):void 0,width:t??u,height:n??d,offset:r},E?!0:f);G7(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof I,"]")),Array.isArray(I)&&(C=I)}return p.createElement(of,{zIndex:o.zIndex},p.createElement("g",{className:"recharts-cartesian-grid"},p.createElement(VDt,{fill:o.fill,fillOpacity:o.fillOpacity,x:o.x,y:o.y,width:o.width,height:o.height,ry:o.ry}),p.createElement(WDt,_2({},o,{horizontalPoints:S})),p.createElement(qDt,_2({},o,{verticalPoints:C})),p.createElement(UDt,_2({},o,{offset:r,horizontalPoints:S,xAxis:b,yAxis:y})),p.createElement(GDt,_2({},o,{offset:r,verticalPoints:C,xAxis:b,yAxis:y}))))}Ea.displayName="CartesianGrid";var kHe=(e,t,n,r)=>kg(e,"xAxis",t,r),MHe=(e,t,n,r)=>Tg(e,"xAxis",t,r),RHe=(e,t,n,r)=>kg(e,"yAxis",n,r),OHe=(e,t,n,r)=>Tg(e,"yAxis",n,r),ZDt=fn([Fi,kHe,RHe,MHe,OHe],(e,t,n,r,o)=>qb(e,"xAxis")?TS(t,r,!1):TS(n,o,!1)),JDt=(e,t,n,r,o)=>o;function QDt(e){return e.type==="line"}var eLt=fn([MI,JDt],(e,t)=>e.filter(QDt).find(n=>n.id===t)),tLt=fn([Fi,kHe,RHe,MHe,OHe,eLt,ZDt,II],(e,t,n,r,o,i,a,l)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:d}=l;if(!(i==null||t==null||n==null||r==null||o==null||r.length===0||o.length===0||a==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:f,data:h}=i,m;if(h!=null&&h.length>0?m=h:m=c==null?void 0:c.slice(u,d+1),m!=null)return wLt({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:o,dataKey:f,bandSize:a,displayedData:m})}});function DHe(e){var t=AS(e),n=3,r=2;if(t!=null){var{r:o,strokeWidth:i}=t,a=Number(o),l=Number(i);return(Number.isNaN(a)||a<0)&&(a=n),(Number.isNaN(l)||l<0)&&(l=r),{r:a,strokeWidth:l}}return{r:n,strokeWidth:r}}var nLt=["id"],rLt=["type","layout","connectNulls","needClip","shape"],oLt=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function LM(){return LM=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{dataKey:t,name:n,stroke:r,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:r,value:Kb(n,t),payload:e}]},uLt=p.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:o,fill:i,name:a,hide:l,unit:c,tooltipType:u}=e,d={dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:o,fill:i,dataKey:t,nameKey:void 0,name:Kb(a,t),hide:l,type:u,color:r,unit:c}};return p.createElement(Q3,{tooltipEntrySettings:d})}),LHe=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function dLt(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],o=0;o{var r=n.reduce((f,h)=>f+h);if(!r)return LHe(t,e);for(var o=Math.floor(e/r),i=e%r,a=t-e,l=[],c=0,u=0;ci){l=[...n.slice(0,c),i-u];break}var d=l.length%2===0?[0,a]:[a];return[...dLt(n,o),...l,...d].map(f=>"".concat(f,"px")).join(", ")};function pLt(e){var{clipPathId:t,points:n,props:r}=e,{dot:o,dataKey:i,needClip:a}=r,{id:l}=r,c=zue(r,nLt),u=Af(c);return p.createElement(fHe,{points:n,dot:o,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:i,baseProps:u,needClip:a,clipPathId:t})}function hLt(e){var{showLabels:t,children:n,points:r}=e,o=p.useMemo(()=>r==null?void 0:r.map(i=>{var a,l,c={x:(a=i.x)!==null&&a!==void 0?a:0,y:(l=i.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return ab(ab({},c),{},{value:i.value,payload:i.payload,viewBox:c,parentViewBox:void 0,fill:void 0})}),[r]);return p.createElement(MH,{value:t?o:void 0},n)}function L2e(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:o,props:i}=e,{type:a,layout:l,connectNulls:c,needClip:u,shape:d}=i,f=zue(i,rLt),h=ab(ab({},Tf(f)),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(t,")"):void 0,points:r,type:a,layout:l,connectNulls:c,strokeDasharray:o??i.strokeDasharray});return p.createElement(p.Fragment,null,(r==null?void 0:r.length)>1&&p.createElement(DM,LM({shapeType:"curve",option:d},h,{pathRef:n})),p.createElement(pLt,{points:r,clipPathId:t,props:i}))}function mLt(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function gLt(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:o,longestAnimatedLengthRef:i}=e,{points:a,strokeDasharray:l,isAnimationActive:c,animationBegin:u,animationDuration:d,animationEasing:f,animateNewValues:h,width:m,height:g,onAnimationEnd:b,onAnimationStart:y}=n,v=o.current,x=_j(a,"recharts-line-"),S=p.useRef(x),[C,_]=p.useState(!1),N=!C,E=p.useCallback(()=>{typeof b=="function"&&b(),_(!1)},[b]),I=p.useCallback(()=>{typeof y=="function"&&y(),_(!0)},[y]),A=mLt(r.current),R=p.useRef(0);S.current!==x&&(R.current=i.current,S.current=x);var k=R.current;return p.createElement(hLt,{points:a,showLabels:N},n.children,p.createElement(Cj,{animationId:x,begin:u,duration:d,isActive:c,easing:f,onAnimationEnd:E,onAnimationStart:I,key:x},T=>{var D=ba(k,A+k,T),O=Math.min(D,A),z;if(c)if(l){var F="".concat(l).split(/[,\s]+/gim).map(W=>parseFloat(W));z=fLt(O,A,F)}else z=LHe(A,O);else z=l==null?void 0:String(l);if(T>0&&A>0&&(o.current=a,i.current=Math.max(i.current,O)),v){var U=v.length/a.length,G=T===1?a:a.map((W,Y)=>{var B=Math.floor(Y*U);if(v[B]){var $=v[B];return ab(ab({},W),{},{x:ba($.x,W.x,T),y:ba($.y,W.y,T)})}return h?ab(ab({},W),{},{x:ba(m*2,W.x,T),y:ba(g/2,W.y,T)}):ab(ab({},W),{},{x:W.x,y:W.y})});return o.current=G,p.createElement(L2e,{props:n,points:G,clipPathId:t,pathRef:r,strokeDasharray:z})}return p.createElement(L2e,{props:n,points:a,clipPathId:t,pathRef:r,strokeDasharray:z})}),p.createElement(J3,{label:n.label}))}function yLt(e){var{clipPathId:t,props:n}=e,r=p.useRef(null),o=p.useRef(0),i=p.useRef(null);return p.createElement(gLt,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:o,pathRef:i})}var bLt=(e,t)=>{var n,r;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(r=e.y)!==null&&r!==void 0?r:void 0,value:e.value,errorVal:Na(e.payload,t)}};class vLt extends p.Component{render(){var{hide:t,dot:n,points:r,className:o,xAxisId:i,yAxisId:a,top:l,left:c,width:u,height:d,id:f,needClip:h,zIndex:m}=this.props;if(t)return null;var g=Ae("recharts-line",o),b=f,{r:y,strokeWidth:v}=DHe(n),x=Rue(n),S=y*2+v,C=h?"url(#clipPath-".concat(x?"":"dots-").concat(b,")"):void 0;return p.createElement(of,{zIndex:m},p.createElement(qs,{className:g},h&&p.createElement("defs",null,p.createElement(UH,{clipPathId:b,xAxisId:i,yAxisId:a}),!x&&p.createElement("clipPath",{id:"clipPath-dots-".concat(b)},p.createElement("rect",{x:c-S/2,y:l-S/2,width:u+S,height:d+S}))),p.createElement(Oue,{xAxisId:i,yAxisId:a,data:r,dataPointFormatter:bLt,errorBarOffset:0},p.createElement(yLt,{props:this.props,clipPathId:b}))),p.createElement(bte,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:C}))}}var $He={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:nc.line,type:"linear"};function xLt(e){var t=Fl(e,$He),{activeDot:n,animateNewValues:r,animationBegin:o,animationDuration:i,animationEasing:a,connectNulls:l,dot:c,hide:u,isAnimationActive:d,label:f,legendType:h,xAxisId:m,yAxisId:g,id:b}=t,y=zue(t,oLt),{needClip:v}=tO(m,g),x=VH(),S=Sj(),C=Tu(),_=Hr(R=>tLt(R,m,g,C,b));if(S!=="horizontal"&&S!=="vertical"||_==null||x==null)return null;var{height:N,width:E,x:I,y:A}=x;return p.createElement(vLt,LM({},y,{id:b,connectNulls:l,dot:c,activeDot:n,animateNewValues:r,animationBegin:o,animationDuration:i,animationEasing:a,isAnimationActive:d,hide:u,label:f,legendType:h,xAxisId:m,yAxisId:g,points:_,layout:S,height:N,width:E,left:I,top:A,needClip:v}))}function wLt(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:o,yAxisTicks:i,dataKey:a,bandSize:l,displayedData:c}=e;return c.map((u,d)=>{var f=Na(u,a);if(t==="horizontal"){var h=fP({axis:n,ticks:o,bandSize:l,entry:u,index:d}),m=ls(f)?null:r.scale(f);return{x:h,y:m,value:f,payload:u}}var g=ls(f)?null:n.scale(f),b=fP({axis:r,ticks:i,bandSize:l,entry:u,index:d});return g==null||b==null?null:{x:g,y:b,value:f,payload:u}}).filter(Boolean)}function SLt(e){var t=Fl(e,$He),n=Tu();return p.createElement(eO,{id:t.id,type:"line"},r=>p.createElement(p.Fragment,null,p.createElement(BH,{legendPayload:cLt(t)}),p.createElement(uLt,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType}),p.createElement(zH,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),p.createElement(xLt,LM({},t,{id:r}))))}var us=p.memo(SLt,$I);us.displayName="Line";var FHe=(e,t,n,r)=>kg(e,"xAxis",t,r),BHe=(e,t,n,r)=>Tg(e,"xAxis",t,r),zHe=(e,t,n,r)=>kg(e,"yAxis",n,r),HHe=(e,t,n,r)=>Tg(e,"yAxis",n,r),CLt=fn([Fi,FHe,zHe,BHe,HHe],(e,t,n,r,o)=>qb(e,"xAxis")?TS(t,r,!1):TS(n,o,!1)),_Lt=(e,t,n,r,o)=>o,VHe=fn([MI,_Lt],(e,t)=>e.filter(n=>n.type==="area").find(n=>n.id===t)),jLt=(e,t,n,r,o)=>{var i,a=VHe(e,t,n,r,o);if(a!=null){var l=Fi(e),c=qb(l,"xAxis"),u;if(c?u=RM(e,"yAxis",n,r):u=RM(e,"xAxis",t,r),u!=null){var{stackId:d}=a,f=_H(a);if(!(d==null||f==null)){var h=(i=u[d])===null||i===void 0?void 0:i.stackedData;return h==null?void 0:h.find(m=>m.key===f)}}}},NLt=fn([Fi,FHe,zHe,BHe,HHe,jLt,II,CLt,VHe,NIt],(e,t,n,r,o,i,a,l,c,u)=>{var{chartData:d,dataStartIndex:f,dataEndIndex:h}=a;if(!(c==null||e!=="horizontal"&&e!=="vertical"||t==null||n==null||r==null||o==null||r.length===0||o.length===0||l==null)){var{data:m}=c,g;if(m&&m.length>0?g=m:g=d==null?void 0:d.slice(f,h+1),g!=null)return GLt({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:o,dataStartIndex:f,areaSettings:c,stackedData:i,displayedData:g,chartBaseValue:u,bandSize:l})}}),ELt=["id"],PLt=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function t_(){return t_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{dataKey:t,name:n,stroke:r,fill:o,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:CB(r,o),value:Kb(n,t),payload:e}]},RLt=p.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:o,fill:i,name:a,hide:l,unit:c,tooltipType:u}=e,d={dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:o,fill:i,dataKey:t,nameKey:void 0,name:Kb(a,t),hide:l,type:u,color:CB(r,i),unit:c}};return p.createElement(Q3,{tooltipEntrySettings:d})});function OLt(e){var{clipPathId:t,points:n,props:r}=e,{needClip:o,dot:i,dataKey:a}=r,l=Af(r);return p.createElement(fHe,{points:n,dot:i,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:a,baseProps:l,needClip:o,clipPathId:t})}function DLt(e){var{showLabels:t,children:n,points:r}=e,o=r.map(i=>{var a,l,c={x:(a=i.x)!==null&&a!==void 0?a:0,y:(l=i.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return WE(WE({},c),{},{value:i.value,payload:i.payload,parentViewBox:void 0,viewBox:c,fill:void 0})});return p.createElement(MH,{value:t?o:void 0},n)}function F2e(e){var{points:t,baseLine:n,needClip:r,clipPathId:o,props:i}=e,{layout:a,type:l,stroke:c,connectNulls:u,isRange:d}=i,{id:f}=i,h=UHe(i,ELt),m=Af(h),g=Tf(h);return p.createElement(p.Fragment,null,(t==null?void 0:t.length)>1&&p.createElement(qs,{clipPath:r?"url(#clipPath-".concat(o,")"):void 0},p.createElement(J2,t_({},g,{id:f,points:t,connectNulls:u,type:l,baseLine:n,layout:a,stroke:"none",className:"recharts-area-area"})),c!=="none"&&p.createElement(J2,t_({},m,{className:"recharts-area-curve",layout:a,type:l,connectNulls:u,fill:"none",points:t})),c!=="none"&&d&&p.createElement(J2,t_({},m,{className:"recharts-area-curve",layout:a,type:l,connectNulls:u,fill:"none",points:n}))),p.createElement(OLt,{points:t,props:h,clipPathId:o}))}function LLt(e){var{alpha:t,baseLine:n,points:r,strokeWidth:o}=e,i=r[0].y,a=r[r.length-1].y;if(!As(i)||!As(a))return null;var l=t*Math.abs(i-a),c=Math.max(...r.map(u=>u.x||0));return Yr(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(u=>u.x||0),c)),Yr(c)?p.createElement("rect",{x:0,y:iu.y||0));return Yr(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(u=>u.y||0),c)),Yr(c)?p.createElement("rect",{x:i({points:a,baseLine:l}),[a,l]),b=_j(g,"recharts-area-"),y=Ljt(),[v,x]=p.useState(!1),S=!v,C=p.useCallback(()=>{typeof m=="function"&&m(),x(!1)},[m]),_=p.useCallback(()=>{typeof h=="function"&&h(),x(!0)},[h]);if(y==null)return null;var N=o.current,E=i.current;return p.createElement(DLt,{showLabels:S,points:a},r.children,p.createElement(Cj,{animationId:b,begin:u,duration:d,isActive:c,easing:f,onAnimationEnd:C,onAnimationStart:_,key:b},I=>{if(N){var A=N.length/a.length,R=I===1?a:a.map((T,D)=>{var O=Math.floor(D*A);if(N[O]){var z=N[O];return WE(WE({},T),{},{x:ba(z.x,T.x,I),y:ba(z.y,T.y,I)})}return T}),k;return Yr(l)?k=ba(E,l,I):ls(l)||Ih(l)?k=ba(E,0,I):k=l.map((T,D)=>{var O=Math.floor(D*A);if(Array.isArray(E)&&E[O]){var z=E[O];return WE(WE({},T),{},{x:ba(z.x,T.x,I),y:ba(z.y,T.y,I)})}return T}),I>0&&(o.current=R,i.current=k),p.createElement(F2e,{points:R,baseLine:k,needClip:t,clipPathId:n,props:r})}return I>0&&(o.current=a,i.current=l),p.createElement(qs,null,c&&p.createElement("defs",null,p.createElement("clipPath",{id:"animationClipPath-".concat(n)},p.createElement(FLt,{alpha:I,points:a,baseLine:l,layout:y,strokeWidth:r.strokeWidth}))),p.createElement(qs,{clipPath:"url(#animationClipPath-".concat(n,")")},p.createElement(F2e,{points:a,baseLine:l,needClip:t,clipPathId:n,props:r})))}),p.createElement(J3,{label:r.label}))}function zLt(e){var{needClip:t,clipPathId:n,props:r}=e,o=p.useRef(null),i=p.useRef();return p.createElement(BLt,{needClip:t,clipPathId:n,props:r,previousPointsRef:o,previousBaselineRef:i})}class HLt extends p.PureComponent{render(){var{hide:t,dot:n,points:r,className:o,top:i,left:a,needClip:l,xAxisId:c,yAxisId:u,width:d,height:f,id:h,baseLine:m,zIndex:g}=this.props;if(t)return null;var b=Ae("recharts-area",o),y=h,{r:v,strokeWidth:x}=DHe(n),S=Rue(n),C=v*2+x,_=l?"url(#clipPath-".concat(S?"":"dots-").concat(y,")"):void 0;return p.createElement(of,{zIndex:g},p.createElement(qs,{className:b},l&&p.createElement("defs",null,p.createElement(UH,{clipPathId:y,xAxisId:c,yAxisId:u}),!S&&p.createElement("clipPath",{id:"clipPath-dots-".concat(y)},p.createElement("rect",{x:a-C/2,y:i-C/2,width:d+C,height:f+C}))),p.createElement(zLt,{needClip:l,clipPathId:y,props:this.props})),p.createElement(bte,{points:r,mainColor:CB(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:_}),this.props.isRange&&Array.isArray(m)&&p.createElement(bte,{points:m,mainColor:CB(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:_}))}}var GHe={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:nc.area};function VLt(e){var t,n=Fl(e,GHe),{activeDot:r,animationBegin:o,animationDuration:i,animationEasing:a,connectNulls:l,dot:c,fill:u,fillOpacity:d,hide:f,isAnimationActive:h,legendType:m,stroke:g,xAxisId:b,yAxisId:y}=n,v=UHe(n,PLt),x=Sj(),S=D9e(),{needClip:C}=tO(b,y),_=Tu(),{points:N,isRange:E,baseLine:I}=(t=Hr(O=>NLt(O,b,y,_,e.id)))!==null&&t!==void 0?t:{},A=VH();if(x!=="horizontal"&&x!=="vertical"||A==null||S!=="AreaChart"&&S!=="ComposedChart")return null;var{height:R,width:k,x:T,y:D}=A;return!N||!N.length?null:p.createElement(HLt,t_({},v,{activeDot:r,animationBegin:o,animationDuration:i,animationEasing:a,baseLine:I,connectNulls:l,dot:c,fill:u,fillOpacity:d,height:R,hide:f,layout:x,isAnimationActive:h==="auto"?!EI.isSsr:h,isRange:E,legendType:m,needClip:C,points:N,stroke:g,width:k,left:T,top:D,xAxisId:b,yAxisId:y}))}var ULt=(e,t,n,r,o)=>{var i=n??t;if(Yr(i))return i;var a=e==="horizontal"?o:r,l=a.scale.domain();if(a.type==="number"){var c=Math.max(l[0],l[1]),u=Math.min(l[0],l[1]);return i==="dataMin"?u:i==="dataMax"||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return i==="dataMin"?l[0]:i==="dataMax"?l[1]:l[0]};function GLt(e){var{areaSettings:{connectNulls:t,baseValue:n,dataKey:r},stackedData:o,layout:i,chartBaseValue:a,xAxis:l,yAxis:c,displayedData:u,dataStartIndex:d,xAxisTicks:f,yAxisTicks:h,bandSize:m}=e,g=o&&o.length,b=ULt(i,a,n,l,c),y=i==="horizontal",v=!1,x=u.map((C,_)=>{var N;g?N=o[d+_]:(N=Na(C,r),Array.isArray(N)?v=!0:N=[b,N]);var E=N[1]==null||g&&!t&&Na(C,r)==null;return y?{x:fP({axis:l,ticks:f,bandSize:m,entry:C,index:_}),y:E?null:c.scale(N[1]),value:N,payload:C}:{x:E?null:l.scale(N[1]),y:fP({axis:c,ticks:h,bandSize:m,entry:C,index:_}),value:N,payload:C}}),S;return g||v?S=x.map(C=>{var _=Array.isArray(C.value)?C.value[0]:null;return y?{x:C.x,y:_!=null&&C.y!=null?c.scale(_):null,payload:C.payload}:{x:_!=null?l.scale(_):null,y:C.y,payload:C.payload}}):S=y?c.scale(b):l.scale(b),{points:x,baseLine:S,isRange:v}}function WLt(e){var t=Fl(e,GHe),n=Tu();return p.createElement(eO,{id:t.id,type:"area"},r=>p.createElement(p.Fragment,null,p.createElement(BH,{legendPayload:MLt(t)}),p.createElement(RLt,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType}),p.createElement(zH,{type:"area",id:r,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:cBe(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),p.createElement(VLt,t_({},t,{id:r}))))}var tu=p.memo(WLt,$I);tu.displayName="Area";var qLt=["option","isActive"];function p4(){return p4=Object.assign?Object.assign.bind():function(e){for(var t=1;tkg(e,"xAxis",t,a),JLt=(e,t,n,r,o,i,a)=>Tg(e,"xAxis",t,a),QLt=(e,t,n,r,o,i,a)=>kg(e,"yAxis",n,a),e6t=(e,t,n,r,o,i,a)=>Tg(e,"yAxis",n,a),t6t=(e,t,n,r)=>PAt(e,"zAxis",r,!1),n6t=(e,t,n,r,o)=>o,r6t=(e,t,n,r,o,i)=>i,o6t=(e,t,n,r,o,i,a)=>II(e,t,n,a),i6t=fn([MI,n6t],(e,t)=>e.filter(n=>n.type==="scatter").find(n=>n.id===t)),a6t=fn([o6t,ZLt,JLt,QLt,e6t,t6t,i6t,r6t],(e,t,n,r,o,i,a,l)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:d}=e;if(a!=null){var f;if((a==null?void 0:a.data)!=null&&a.data.length>0?f=a.data:f=c==null?void 0:c.slice(u,d+1),!(f==null||t==null||r==null||n==null||o==null||(n==null?void 0:n.length)===0||(o==null?void 0:o.length)===0))return x6t({displayedData:f,xAxis:t,yAxis:r,zAxis:i,scatterSettings:a,xAxisTicks:n,yAxisTicks:o,cells:l})}}),s6t=["onMouseEnter","onClick","onMouseLeave"],l6t=["id"],c6t=["animationBegin","animationDuration","animationEasing","hide","isAnimationActive","legendType","lineJointType","lineType","shape","xAxisId","yAxisId","zAxisId"];function Ste(e,t){if(e==null)return{};var n,r,o=u6t(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r{var{dataKey:t,name:n,fill:r,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:r,value:Kb(n,t),payload:e}]},m6t=p.memo(e=>{var{dataKey:t,points:n,stroke:r,strokeWidth:o,fill:i,name:a,hide:l,tooltipType:c}=e,u={dataDefinedOnItem:n==null?void 0:n.map(d=>d.tooltipPayload),positions:n==null?void 0:n.map(d=>d.tooltipPosition),settings:{stroke:r,strokeWidth:o,fill:i,nameKey:void 0,dataKey:t,name:Kb(a,t),hide:l,type:c,color:i,unit:""}};return p.createElement(Q3,{tooltipEntrySettings:u})});function g6t(e){var{points:t,props:n}=e,{line:r,lineType:o,lineJointType:i}=n;if(!r)return null;var a=Af(n),l=AS(r),c,u;if(o==="joint")c=t.map(y=>{var v,x;return{x:(v=y.cx)!==null&&v!==void 0?v:null,y:(x=y.cy)!==null&&x!==void 0?x:null}});else if(o==="fitting"){var{xmin:d,xmax:f,a:h,b:m}=_Ct(t),g=y=>h*y+m;c=[{x:d,y:g(d)},{x:f,y:g(f)}]}var b=Sh(Sh(Sh({},a),{},{fill:"none",stroke:a&&a.fill},l),{},{points:c});return p.isValidElement(r)?u=p.cloneElement(r,b):typeof r=="function"?u=r(b):u=p.createElement(J2,P_({},b,{type:i})),p.createElement(qs,{className:"recharts-scatter-line",key:"recharts-scatter-line"},u)}function y6t(e){var{showLabels:t,points:n,children:r}=e,o=NI(),i=p.useMemo(()=>n==null?void 0:n.map(a=>{var l,c,u={x:(l=a.x)!==null&&l!==void 0?l:0,y:(c=a.y)!==null&&c!==void 0?c:0,width:a.width,height:a.height,lowerWidth:a.width,upperWidth:a.width};return Sh(Sh({},u),{},{value:void 0,payload:a.payload,viewBox:u,parentViewBox:o,fill:void 0})}),[o,n]);return p.createElement(MH,{value:t?i:void 0},r)}function b6t(e){var{points:t,allOtherScatterProps:n}=e,{shape:r,activeShape:o,dataKey:i}=n,a=Hr(zx),{onMouseEnter:l,onClick:c,onMouseLeave:u}=n,d=Ste(n,s6t),f=LH(l,n.dataKey),h=$H(u),m=FH(c,n.dataKey);if(!LCt(t))return null;var{id:g}=n,b=Ste(n,l6t),y=Af(b);return p.createElement(p.Fragment,null,p.createElement(g6t,{points:t,props:b}),t.map((v,x)=>{var S=o!=null&&o!==!1,C=S&&a===String(x),_=S&&C?o:r,N=Sh(Sh(Sh({},y),v),{},{[pce]:x,[hce]:String(i)});return p.createElement(of,{key:"symbol-".concat(v==null?void 0:v.cx,"-").concat(v==null?void 0:v.cy,"-").concat(v==null?void 0:v.size,"-").concat(x),zIndex:C?nc.activeDot:void 0},p.createElement(qs,P_({className:"recharts-scatter-symbol"},jI(d,v,x),{onMouseEnter:f(v,x),onMouseLeave:h(v,x),onClick:m(v,x)}),p.createElement(XLt,P_({option:_,isActive:C},N))))}))}function v6t(e){var{previousPointsRef:t,props:n}=e,{points:r,isAnimationActive:o,animationBegin:i,animationDuration:a,animationEasing:l}=n,c=t.current,u=_j(n,"recharts-scatter-"),[d,f]=p.useState(!1),h=p.useCallback(()=>{f(!1)},[]),m=p.useCallback(()=>{f(!0)},[]),g=!d;return p.createElement(y6t,{showLabels:g,points:r},n.children,p.createElement(Cj,{animationId:u,begin:i,duration:a,isActive:o,easing:l,onAnimationEnd:h,onAnimationStart:m,key:u},b=>{var y=b===1?r:r==null?void 0:r.map((v,x)=>{var S=c&&c[x];return S?Sh(Sh({},v),{},{cx:v.cx==null?void 0:ba(S.cx,v.cx,b),cy:v.cy==null?void 0:ba(S.cy,v.cy,b),size:ba(S.size,v.size,b)}):Sh(Sh({},v),{},{size:ba(0,v.size,b)})});return b>0&&(t.current=y),p.createElement(qs,null,p.createElement(b6t,{points:y,allOtherScatterProps:n,showLabels:g}))}),p.createElement(J3,{label:n.label}))}function x6t(e){var{displayedData:t,xAxis:n,yAxis:r,zAxis:o,scatterSettings:i,xAxisTicks:a,yAxisTicks:l,cells:c}=e,u=ls(n.dataKey)?i.dataKey:n.dataKey,d=ls(r.dataKey)?i.dataKey:r.dataKey,f=o&&o.dataKey,h=o?o.range:Wze.range,m=h&&h[0],g=n.scale.bandwidth?n.scale.bandwidth():0,b=r.scale.bandwidth?r.scale.bandwidth():0;return t.map((y,v)=>{var x=Na(y,u),S=Na(y,d),C=!ls(f)&&Na(y,f)||"-",_=[{name:ls(n.dataKey)?i.name:n.name||String(n.dataKey),unit:n.unit||"",value:x,payload:y,dataKey:u,type:i.tooltipType},{name:ls(r.dataKey)?i.name:r.name||String(r.dataKey),unit:r.unit||"",value:S,payload:y,dataKey:d,type:i.tooltipType}];C!=="-"&&_.push({name:o.name||o.dataKey,unit:o.unit||"",value:C,payload:y,dataKey:f,type:i.tooltipType});var N=fP({axis:n,ticks:a,bandSize:g,entry:y,index:v,dataKey:u}),E=fP({axis:r,ticks:l,bandSize:b,entry:y,index:v,dataKey:d}),I=C!=="-"?o.scale(C):m,A=Math.sqrt(Math.max(I,0)/Math.PI);return Sh(Sh({},y),{},{cx:N,cy:E,x:N==null?void 0:N-A,y:E==null?void 0:E-A,width:2*A,height:2*A,size:I,node:{x,y:S,z:C},tooltipPayload:_,tooltipPosition:{x:N,y:E},payload:y},c&&c[v]&&c[v].props)})}var w6t=(e,t,n)=>({x:e.cx,y:e.cy,value:Number(n==="x"?e.node.x:e.node.y),errorVal:Na(e,t)});function S6t(e){var{hide:t,points:n,className:r,needClip:o,xAxisId:i,yAxisId:a,id:l}=e,c=p.useRef(null);if(t)return null;var u=Ae("recharts-scatter",r),d=l;return p.createElement(of,{zIndex:e.zIndex},p.createElement(qs,{className:u,clipPath:o?"url(#clipPath-".concat(d,")"):void 0,id:l},o&&p.createElement("defs",null,p.createElement(UH,{clipPathId:d,xAxisId:i,yAxisId:a})),p.createElement(Oue,{xAxisId:i,yAxisId:a,data:n,dataPointFormatter:w6t,errorBarOffset:0},p.createElement(qs,{key:"recharts-scatter-symbols"},p.createElement(v6t,{props:e,previousPointsRef:c})))))}var WHe={xAxisId:0,yAxisId:0,zAxisId:0,label:!1,line:!1,legendType:"circle",lineType:"joint",lineJointType:"linear",shape:"circle",hide:!1,isAnimationActive:"auto",animationBegin:0,animationDuration:400,animationEasing:"linear",zIndex:nc.scatter};function C6t(e){var t=Fl(e,WHe),{animationBegin:n,animationDuration:r,animationEasing:o,hide:i,isAnimationActive:a,legendType:l,lineJointType:c,lineType:u,shape:d,xAxisId:f,yAxisId:h,zAxisId:m}=t,g=Ste(t,c6t),{needClip:b}=tO(f,h),y=p.useMemo(()=>DH(e.children,Ah),[e.children]),v=Tu(),x=Hr(S=>a6t(S,f,h,m,e.id,y,v));return b==null||x==null?null:p.createElement(p.Fragment,null,p.createElement(m6t,{dataKey:e.dataKey,points:x,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType}),p.createElement(S6t,P_({},g,{xAxisId:f,yAxisId:h,zAxisId:m,lineType:u,lineJointType:c,legendType:l,shape:d,hide:i,isAnimationActive:a,animationBegin:n,animationDuration:r,animationEasing:o,points:x,needClip:b})))}function _6t(e){var t=Fl(e,WHe),n=Tu();return p.createElement(eO,{id:t.id,type:"scatter"},r=>p.createElement(p.Fragment,null,p.createElement(BH,{legendPayload:h6t(t)}),p.createElement(zH,{type:"scatter",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:t.zAxisId,dataKey:t.dataKey,hide:t.hide,name:t.name,tooltipType:t.tooltipType,isPanorama:n}),p.createElement(C6t,P_({},t,{id:r}))))}var qHe=p.memo(_6t,$I);qHe.displayName="Scatter";var j6t=["domain","range"],N6t=["domain","range"];function z2e(e,t){if(e==null)return{};var n,r,o=E6t(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r{n.current===null?t(bRt(e)):n.current!==e&&t(vRt({prev:n.current,next:e})),n.current=e},[e,t]),p.useLayoutEffect(()=>()=>{n.current&&(t(xRt(n.current)),n.current=null)},[t]),null}var k6t=e=>{var{xAxisId:t,className:n}=e,r=Hr(mce),o=Tu(),i="xAxis",a=Hr(y=>MS(y,i,t,o)),l=Hr(y=>h9e(y,i,t,o)),c=Hr(y=>u9e(y,t)),u=Hr(y=>SAt(y,t)),d=Hr(y=>Uze(y,t));if(c==null||u==null||d==null)return null;var{dangerouslySetInnerHTML:f,ticks:h}=e,m=V2e(e,P6t),{id:g}=d,b=V2e(d,I6t);return p.createElement(Bue,Cte({},m,b,{scale:a,x:u.x,y:u.y,width:c.width,height:c.height,className:Ae("recharts-".concat(i," ").concat(i),n),viewBox:r,ticks:l,axisType:i}))},M6t={allowDataOverflow:Vd.allowDataOverflow,allowDecimals:Vd.allowDecimals,allowDuplicatedCategory:Vd.allowDuplicatedCategory,angle:Vd.angle,axisLine:jx.axisLine,height:Vd.height,hide:!1,includeHidden:Vd.includeHidden,interval:Vd.interval,minTickGap:Vd.minTickGap,mirror:Vd.mirror,orientation:Vd.orientation,padding:Vd.padding,reversed:Vd.reversed,scale:Vd.scale,tick:Vd.tick,tickCount:Vd.tickCount,tickLine:jx.tickLine,tickSize:jx.tickSize,type:Vd.type,xAxisId:0},R6t=e=>{var t=Fl(e,M6t);return p.createElement(p.Fragment,null,p.createElement(T6t,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit}),p.createElement(k6t,t))},Ei=p.memo(R6t,KHe);Ei.displayName="XAxis";var O6t=["dangerouslySetInnerHTML","ticks"],D6t=["id"];function _te(){return _te=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current===null?t(wRt(e)):n.current!==e&&t(SRt({prev:n.current,next:e})),n.current=e},[e,t]),p.useLayoutEffect(()=>()=>{n.current&&(t(CRt(n.current)),n.current=null)},[t]),null}var F6t=e=>{var{yAxisId:t,className:n,width:r,label:o}=e,i=p.useRef(null),a=p.useRef(null),l=Hr(mce),c=Tu(),u=nl(),d="yAxis",f=Hr(_=>MS(_,d,t,c)),h=Hr(_=>d9e(_,t)),m=Hr(_=>_At(_,t)),g=Hr(_=>h9e(_,d,t,c)),b=Hr(_=>Gze(_,t));if(p.useLayoutEffect(()=>{if(!(r!=="auto"||!h||Aue(o)||p.isValidElement(o)||b==null)){var _=i.current;if(_){var N=_.getCalculatedWidth();Math.round(h.width)!==Math.round(N)&&u(_Rt({id:t,width:N}))}}},[g,h,u,o,t,r,b]),h==null||m==null||b==null)return null;var{dangerouslySetInnerHTML:y,ticks:v}=e,x=U2e(e,O6t),{id:S}=b,C=U2e(b,D6t);return p.createElement(Bue,_te({},x,C,{ref:i,labelRef:a,scale:f,x:m.x,y:m.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:h.width,height:h.height,className:Ae("recharts-".concat(d," ").concat(d),n),viewBox:l,ticks:g,axisType:d}))},B6t={allowDataOverflow:Ud.allowDataOverflow,allowDecimals:Ud.allowDecimals,allowDuplicatedCategory:Ud.allowDuplicatedCategory,angle:Ud.angle,axisLine:jx.axisLine,hide:!1,includeHidden:Ud.includeHidden,interval:Ud.interval,minTickGap:Ud.minTickGap,mirror:Ud.mirror,orientation:Ud.orientation,padding:Ud.padding,reversed:Ud.reversed,scale:Ud.scale,tick:Ud.tick,tickCount:Ud.tickCount,tickLine:jx.tickLine,tickSize:jx.tickSize,type:Ud.type,width:Ud.width,yAxisId:0},z6t=e=>{var t=Fl(e,B6t);return p.createElement(p.Fragment,null,p.createElement($6t,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter}),p.createElement(F6t,t))},Wo=p.memo(z6t,KHe);Wo.displayName="YAxis";var H6t=(e,t)=>t,Hue=fn([H6t,Fi,Hze,Pd,A9e,d1,BTt,Nd],qTt),Vue=e=>{var t=e.currentTarget.getBoundingClientRect(),n=t.width/e.currentTarget.offsetWidth,r=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/n),chartY:Math.round((e.clientY-t.top)/r)}},YHe=Ig("mouseClick"),XHe=R3();XHe.startListening({actionCreator:YHe,effect:(e,t)=>{var n=e.payload,r=Hue(t.getState(),Vue(n));(r==null?void 0:r.activeIndex)!=null&&t.dispatch(FAt({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var jte=Ig("mouseMove"),ZHe=R3(),zL=null;ZHe.startListening({actionCreator:jte,effect:(e,t)=>{var n=e.payload;zL!==null&&cancelAnimationFrame(zL);var r=Vue(n);zL=requestAnimationFrame(()=>{var o=t.getState(),i=vue(o,o.tooltip.settings.shared);if(i==="axis"){var a=Hue(o,r);(a==null?void 0:a.activeIndex)!=null?t.dispatch(S9e({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(w9e())}zL=null})}});var G2e={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},JHe=Oh({name:"rootProps",initialState:G2e,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:G2e.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),V6t=JHe.reducer,{updateOptions:U6t}=JHe.actions,QHe=Oh({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:G6t}=QHe.actions,W6t=QHe.reducer,eVe=Ig("keyDown"),tVe=Ig("focus"),Uue=R3();Uue.startListening({actionCreator:eVe,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:o}=n.tooltip,i=e.payload;if(!(i!=="ArrowRight"&&i!=="ArrowLeft"&&i!=="Enter")){var a=xue(o,LI(n),G3(n),Y3(n)),l=a==null?-1:Number(a);if(!(!Number.isFinite(l)||l<0)){var c=d1(n);if(i==="Enter"){var u=fB(n,"axis","hover",String(o.index));t.dispatch(fte({active:!o.active,activeIndex:o.index,activeDataKey:o.dataKey,activeCoordinate:u}));return}var d=IAt(n),f=d==="left-to-right"?1:-1,h=i==="ArrowRight"?1:-1,m=l+h*f;if(!(c==null||m>=c.length||m<0)){var g=fB(n,"axis","hover",String(m));t.dispatch(fte({active:!0,activeIndex:m.toString(),activeDataKey:void 0,activeCoordinate:g}))}}}}}});Uue.startListening({actionCreator:tVe,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:o}=n.tooltip;if(!o.active&&o.index==null){var i="0",a=fB(n,"axis","hover",String(i));t.dispatch(fte({activeDataKey:void 0,active:!0,activeIndex:i,activeCoordinate:a}))}}}});var eg=Ig("externalEvent"),nVe=R3(),sY=new Map;nVe.startListening({actionCreator:eg,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){r.persist();var o=r.type,i=sY.get(o);i!==void 0&&cancelAnimationFrame(i);var a=requestAnimationFrame(()=>{try{var l=t.getState(),c={activeCoordinate:jTt(l),activeDataKey:jue(l),activeIndex:zx(l),activeLabel:M9e(l),activeTooltipIndex:zx(l),isTooltipActive:NTt(l)};n(c,r)}finally{sY.delete(o)}});sY.set(o,a)}}});var q6t=fn([DI],e=>e.tooltipItemPayloads),K6t=fn([q6t,q3,(e,t,n)=>t,(e,t,n)=>n],(e,t,n,r)=>{var o=e.find(l=>l.settings.dataKey===r);if(o!=null){var{positions:i}=o;if(i!=null){var a=t(i,n);return a}}}),rVe=Ig("touchMove"),oVe=R3();oVe.startListening({actionCreator:rVe,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){var r=t.getState(),o=vue(r,r.tooltip.settings.shared);if(o==="axis"){var i=Hue(r,Vue({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));(i==null?void 0:i.activeIndex)!=null&&t.dispatch(S9e({activeIndex:i.activeIndex,activeDataKey:void 0,activeCoordinate:i.activeCoordinate}))}else if(o==="item"){var a,l=n.touches[0];if(document.elementFromPoint==null)return;var c=document.elementFromPoint(l.clientX,l.clientY);if(!c||!c.getAttribute)return;var u=c.getAttribute(pce),d=(a=c.getAttribute(hce))!==null&&a!==void 0?a:void 0,f=K6t(t.getState(),u,d);t.dispatch(x9e({activeDataKey:d,activeIndex:u,activeCoordinate:f}))}}}});var Y6t=T7e({brush:zOt,cartesianAxis:jRt,chartData:_kt,errorBars:VRt,graphicalItems:kMt,layout:U_t,legend:Jjt,options:vkt,polarAxis:K4t,polarOptions:W6t,referenceElements:JOt,rootProps:V6t,tooltip:BAt,zIndex:skt}),X6t=function(t){return m_t({reducer:Y6t,preloadedState:t,middleware:n=>{var r;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((r="es6")!==null&&r!==void 0?r:"")}).concat([XHe.middleware,ZHe.middleware,Uue.middleware,nVe.middleware,oVe.middleware])},enhancers:n=>{var r=n;return typeof n=="function"&&(r=n()),r.concat(q7e({type:"raf"}))},devTools:EI.devToolsEnabled})};function iVe(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,o=Tu(),i=p.useRef(null);if(o)return n;i.current==null&&(i.current=X6t(t));var a=nce;return p.createElement(SHe,{context:a,store:i.current},n)}function Z6t(e){var{layout:t,margin:n}=e,r=nl(),o=Tu();return p.useEffect(()=>{o||(r(z_t(t)),r(B_t(n)))},[r,o,t,n]),null}var aVe=p.memo(Z6t,$I);function sVe(e){var t=nl();return p.useEffect(()=>{t(U6t(e))},[t,e]),null}function W2e(e){var{zIndex:t,isPanorama:n}=e,r=n?"recharts-zindex-panorama-":"recharts-zindex-",o=uHe("".concat(r).concat(t)),i=nl();return p.useLayoutEffect(()=>(i(ikt({zIndex:t,elementId:o,isPanorama:n})),()=>{i(akt({zIndex:t,isPanorama:n}))}),[i,t,o,n]),p.createElement("g",{tabIndex:-1,id:o})}function q2e(e){var{children:t,isPanorama:n}=e,r=Hr(YTt);if(!r||r.length===0)return t;var o=r.filter(a=>a<0),i=r.filter(a=>a>0);return p.createElement(p.Fragment,null,o.map(a=>p.createElement(W2e,{key:a,zIndex:a,isPanorama:n})),t,i.map(a=>p.createElement(W2e,{key:a,zIndex:a,isPanorama:n})))}var J6t=["children"];function Q6t(e,t){if(e==null)return{};var n,r,o=e$t(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r{var n=yce(),r=bce(),o=NBe();if(!Db(n)||!Db(r))return null;var{children:i,otherAttributes:a,title:l,desc:c}=e,u,d;return a!=null&&(typeof a.tabIndex=="number"?u=a.tabIndex:u=o?0:void 0,typeof a.role=="string"?d=a.role:d=o?"application":void 0),p.createElement(Wle,_B({},a,{title:l,desc:c,role:d,tabIndex:u,width:n,height:r,style:t$t,ref:t}),i)}),r$t=e=>{var{children:t}=e,n=Hr(dH);if(!n)return null;var{width:r,height:o,y:i,x:a}=n;return p.createElement(Wle,{width:r,height:o,x:a,y:i},t)},K2e=p.forwardRef((e,t)=>{var{children:n}=e,r=Q6t(e,J6t),o=Tu();return o?p.createElement(r$t,null,p.createElement(q2e,{isPanorama:!0},n)):p.createElement(n$t,_B({ref:t},r),p.createElement(q2e,{isPanorama:!1},n))});function o$t(){var e=nl(),[t,n]=p.useState(null),r=Hr(sjt);return p.useEffect(()=>{if(t!=null){var o=t.getBoundingClientRect(),i=o.width/t.offsetWidth;As(i)&&i!==r&&e(V_t(i))}},[t,e,r]),n}function Y2e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function i$t(e){for(var t=1;t(Mkt(),null);function jB(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var u$t=p.forwardRef((e,t)=>{var n,r,o=p.useRef(null),[i,a]=p.useState({containerWidth:jB((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:jB((r=e.style)===null||r===void 0?void 0:r.height)}),l=p.useCallback((u,d)=>{a(f=>{var h=Math.round(u),m=Math.round(d);return f.containerWidth===h&&f.containerHeight===m?f:{containerWidth:h,containerHeight:m}})},[]),c=p.useCallback(u=>{if(typeof t=="function"&&t(u),u!=null&&typeof ResizeObserver<"u"){var{width:d,height:f}=u.getBoundingClientRect();l(d,f);var h=g=>{var{width:b,height:y}=g[0].contentRect;l(b,y)},m=new ResizeObserver(h);m.observe(u),o.current=m}},[t,l]);return p.useEffect(()=>()=>{var u=o.current;u!=null&&u.disconnect()},[l]),p.createElement(p.Fragment,null,p.createElement(fH,{width:i.containerWidth,height:i.containerHeight}),p.createElement("div",I_({ref:c},e)))}),d$t=p.forwardRef((e,t)=>{var{width:n,height:r}=e,[o,i]=p.useState({containerWidth:jB(n),containerHeight:jB(r)}),a=p.useCallback((c,u)=>{i(d=>{var f=Math.round(c),h=Math.round(u);return d.containerWidth===f&&d.containerHeight===h?d:{containerWidth:f,containerHeight:h}})},[]),l=p.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null){var{width:u,height:d}=c.getBoundingClientRect();a(u,d)}},[t,a]);return p.createElement(p.Fragment,null,p.createElement(fH,{width:o.containerWidth,height:o.containerHeight}),p.createElement("div",I_({ref:l},e)))}),f$t=p.forwardRef((e,t)=>{var{width:n,height:r}=e;return p.createElement(p.Fragment,null,p.createElement(fH,{width:n,height:r}),p.createElement("div",I_({ref:t},e)))}),p$t=p.forwardRef((e,t)=>{var{width:n,height:r}=e;return Ox(n)||Ox(r)?p.createElement(d$t,I_({},e,{ref:t})):p.createElement(f$t,I_({},e,{ref:t}))});function h$t(e){return e===!0?u$t:p$t}var m$t=p.forwardRef((e,t)=>{var{children:n,className:r,height:o,onClick:i,onContextMenu:a,onDoubleClick:l,onMouseDown:c,onMouseEnter:u,onMouseLeave:d,onMouseMove:f,onMouseUp:h,onTouchEnd:m,onTouchMove:g,onTouchStart:b,style:y,width:v,responsive:x,dispatchTouchEvents:S=!0}=e,C=p.useRef(null),_=nl(),[N,E]=p.useState(null),[I,A]=p.useState(null),R=o$t(),k=gce(),T=(k==null?void 0:k.width)>0?k.width:v,D=(k==null?void 0:k.height)>0?k.height:o,O=p.useCallback(ae=>{R(ae),typeof t=="function"&&t(ae),E(ae),A(ae),ae!=null&&(C.current=ae)},[R,t,E,A]),z=p.useCallback(ae=>{_(YHe(ae)),_(eg({handler:i,reactEvent:ae}))},[_,i]),F=p.useCallback(ae=>{_(jte(ae)),_(eg({handler:u,reactEvent:ae}))},[_,u]),U=p.useCallback(ae=>{_(w9e()),_(eg({handler:d,reactEvent:ae}))},[_,d]),G=p.useCallback(ae=>{_(jte(ae)),_(eg({handler:f,reactEvent:ae}))},[_,f]),W=p.useCallback(()=>{_(tVe())},[_]),Y=p.useCallback(ae=>{_(eVe(ae.key))},[_]),B=p.useCallback(ae=>{_(eg({handler:a,reactEvent:ae}))},[_,a]),$=p.useCallback(ae=>{_(eg({handler:l,reactEvent:ae}))},[_,l]),K=p.useCallback(ae=>{_(eg({handler:c,reactEvent:ae}))},[_,c]),q=p.useCallback(ae=>{_(eg({handler:h,reactEvent:ae}))},[_,h]),Z=p.useCallback(ae=>{_(eg({handler:b,reactEvent:ae}))},[_,b]),J=p.useCallback(ae=>{S&&_(rVe(ae)),_(eg({handler:g,reactEvent:ae}))},[_,S,g]),oe=p.useCallback(ae=>{_(eg({handler:m,reactEvent:ae}))},[_,m]),de=h$t(x);return p.createElement(z9e.Provider,{value:N},p.createElement(W8e.Provider,{value:I},p.createElement(de,{width:T??(y==null?void 0:y.width),height:D??(y==null?void 0:y.height),className:Ae("recharts-wrapper",r),style:i$t({position:"relative",cursor:"default",width:T,height:D},y),onClick:z,onContextMenu:B,onDoubleClick:$,onFocus:W,onKeyDown:Y,onMouseDown:K,onMouseEnter:F,onMouseLeave:U,onMouseMove:G,onMouseUp:q,onTouchEnd:oe,onTouchMove:J,onTouchStart:Z,ref:O},p.createElement(c$t,null),n)))}),g$t=["width","height","responsive","children","className","style","compact","title","desc"];function y$t(e,t){if(e==null)return{};var n,r,o=b$t(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r{var{width:n,height:r,responsive:o,children:i,className:a,style:l,compact:c,title:u,desc:d}=e,f=y$t(e,g$t),h=Af(f);return c?p.createElement(p.Fragment,null,p.createElement(fH,{width:n,height:r}),p.createElement(K2e,{otherAttributes:h,title:u,desc:d},i)):p.createElement(m$t,{className:a,style:l,width:n,height:r,responsive:o??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},p.createElement(K2e,{otherAttributes:h,title:u,desc:d,ref:t},p.createElement(QOt,null,i)))});function Nte(){return Nte=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(WH,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:w$t,tooltipPayloadSearcher:Z3,categoricalChartProps:e,ref:t})),S$t=["axis","item"],Tp=p.forwardRef((e,t)=>p.createElement(WH,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:S$t,tooltipPayloadSearcher:Z3,categoricalChartProps:e,ref:t}));function C$t(e){var t=nl();return p.useEffect(()=>{t(G6t(e))},[t,e]),null}var _$t=["layout"];function Ete(){return Ete=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var n=Fl(e,M$t);return p.createElement(P$t,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:k$t,tooltipPayloadSearcher:Z3,categoricalChartProps:n,ref:t})}),R$t=["axis"],wm=p.forwardRef((e,t)=>p.createElement(WH,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:R$t,tooltipPayloadSearcher:Z3,categoricalChartProps:e,ref:t})),O$t=["axis"],uVe=p.forwardRef((e,t)=>p.createElement(WH,{chartName:"ComposedChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:O$t,tooltipPayloadSearcher:Z3,categoricalChartProps:e,ref:t}));const dVe=()=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-2 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:s.jsx("path",{fillRule:"evenodd",d:"M11.3 1.046A1 1 0 0112 2v5.2a1 1 0 01-1.17.986l-3.2-1.1a1 1 0 00-1.26.95l.5 3.5a1 1 0 01-.45.95l-2.7 2.1a1 1 0 00-.55 1.34l3.2 5.9a1 1 0 01.05.52 1 1 0 01-1.6 1.04l-1.4-1.4a1 1 0 00-1.4 1.4l1.4 1.4a3 3 0 004.2 0l9.4-9.4a1 1 0 01-.1-1.5l-5.9-3.2a1 1 0 01-.5-.05l-3.5-.5a1 1 0 00-.95 1.26l1.1 3.2A1 1 0 018.8 11V2a1 1 0 011.3-.954z",clipRule:"evenodd"})}),D$t=()=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),L$t=()=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 group-hover/info:text-cyan-400 transition-colors",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),$$t=({urgency:e})=>{const t=p.useMemo(()=>({low:{class:"bg-blue-500",label:"Low"},medium:{class:"bg-yellow-500",label:"Medium"},high:{class:"bg-red-500",label:"High"}}),[]);return s.jsxs("div",{className:"absolute top-3 right-3 flex items-center text-xs font-semibold",children:[s.jsx("span",{className:`h-2.5 w-2.5 rounded-full ${t[e].class} mr-2`}),s.jsxs("span",{className:"text-gray-400",children:[t[e].label," Urgency"]})]})},F$t=e=>{switch(e){case"rebalance_portfolio":return"Rebalancing adjusts your portfolio's asset allocation to maintain your desired risk level. It involves selling assets that have grown and buying those that have shrunk.";case"set_stop_loss":return"A stop-loss is an order to sell a security when it reaches a certain price. It's designed to limit an investor's loss on a security position.";case"execute_trade":return"This involves buying or selling a security based on a specific market signal, such as momentum, volatility, or order book analysis.";case"liquidity_provision":return"Providing liquidity means depositing a pair of assets into a decentralized exchange pool to facilitate trading. In return, you earn fees from the trades that occur.";default:return"This is a general insight. Review the details for more information."}},B$t=({insight:e,onClose:t})=>{const[n,r]=p.useState(!1),[o,i]=p.useState("overview"),a=()=>{r(!0),console.log(`Executing HFT action: ${e.actionType} for insight ${e.id} with details:`,e.details),setTimeout(()=>{r(!1),t()},1500)},l=()=>{var f,h,m,g,b,y,v,x,S,C,_,N,E;switch(e.actionType){case"rebalance_portfolio":return s.jsxs(s.Fragment,{children:[s.jsxs("h4",{className:"text-lg font-semibold text-gray-100 mb-2",children:["Rebalance: ",(f=e.details)==null?void 0:f.asset]}),s.jsxs("p",{className:"text-sm text-gray-400 mb-4",children:["Adjust allocation from ",(h=e.details)==null?void 0:h.currentAllocation,"% to ",(m=e.details)==null?void 0:m.suggestedAllocation,"%. This is a high-conviction trade based on predictive market analytics."]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{htmlFor:"allocation",className:"block text-sm font-medium text-gray-300",children:"New Allocation (%)"}),s.jsx("input",{type:"range",id:"allocation",min:"0",max:"100",defaultValue:(g=e.details)==null?void 0:g.suggestedAllocation,className:"w-full h-2 bg-gray-600 rounded-lg appearance-none cursor-pointer accent-cyan-500"})]})]});case"set_stop_loss":return s.jsxs(s.Fragment,{children:[s.jsxs("h4",{className:"text-lg font-semibold text-gray-100 mb-2",children:["Set Stop-Loss: ",(b=e.details)==null?void 0:b.asset]}),s.jsxs("p",{className:"text-sm text-gray-400 mb-4",children:["Current Price: $",(v=(y=e.details)==null?void 0:y.currentPrice)==null?void 0:v.toFixed(2),". The AI suggests a new stop-loss to mitigate downside risk from volatility spikes."]}),s.jsxs("div",{className:"p-3 bg-red-900/20 border border-red-500/50 rounded text-red-300 text-center text-lg font-bold",children:["Suggested Stop: $",(x=e.details)==null?void 0:x.suggestedStopLoss]})]});case"execute_trade":return s.jsxs(s.Fragment,{children:[s.jsxs("h4",{className:"text-lg font-semibold text-gray-100 mb-2",children:["Execute Trade: ",(C=(S=e.details)==null?void 0:S.tradeType)==null?void 0:C.toUpperCase()," ",(_=e.details)==null?void 0:_.asset]}),s.jsxs("p",{className:"text-sm text-gray-400 mb-4",children:["Quantity: ",(N=e.details)==null?void 0:N.quantity,". Based on short-term momentum indicators and order book imbalance."]})]});case"liquidity_provision":return s.jsxs(s.Fragment,{children:[s.jsxs("h4",{className:"text-lg font-semibold text-gray-100 mb-2",children:["Provide Liquidity: ",(E=e.details)==null?void 0:E.targetPool]}),s.jsx("p",{className:"text-sm text-gray-400 mb-4",children:"Projected APR is surging. Deploy capital to capture yield farming opportunities."})]});default:return s.jsx("p",{className:"text-gray-400",children:"Review the insight details before proceeding."})}},c=()=>s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.jsxs("div",{className:"p-3 bg-gray-800 rounded text-center",children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Volatility"}),s.jsx("div",{className:"text-lg font-bold text-yellow-400",children:e.riskAnalysis.volatilityIndex})]}),s.jsxs("div",{className:"p-3 bg-gray-800 rounded text-center",children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Sharpe Ratio"}),s.jsx("div",{className:"text-lg font-bold text-green-400",children:e.riskAnalysis.sharpeRatio})]}),s.jsxs("div",{className:"p-3 bg-gray-800 rounded text-center",children:[s.jsx("div",{className:"text-xs text-gray-500",children:"Max Drawdown"}),s.jsxs("div",{className:"text-lg font-bold text-red-400",children:[e.riskAnalysis.maxDrawdown,"%"]})]})]}),s.jsxs("div",{className:"text-xs text-gray-400 bg-gray-800 p-3 rounded border border-gray-700",children:[s.jsx("strong",{className:"text-gray-300",children:"GEIN Factor Analysis:"})," This insight was generated with a GEIN Factor of ",e.geinFactor,", indicating a highly unique market edge derived from proprietary data streams."]})]}),u=()=>s.jsxs("div",{className:"h-64 w-full bg-gray-800 p-2 rounded border border-gray-700",children:[s.jsx("p",{className:"text-xs text-gray-400 mb-2 text-center",children:"Simulated Performance (Last 30 Days)"}),s.jsx(Oo,{width:"100%",height:"90%",children:s.jsxs(Mg,{data:e.backtestData,children:[s.jsx(Ea,{strokeDasharray:"3 3",stroke:"#374151"}),s.jsx(Ei,{dataKey:"name",stroke:"#9CA3AF",fontSize:10}),s.jsx(Wo,{stroke:"#9CA3AF",fontSize:10}),s.jsx(Fo,{contentStyle:{backgroundColor:"#1F2937",borderColor:"#4B5563",color:"#F3F4F6"}}),s.jsx(us,{type:"monotone",dataKey:"value",stroke:"#10B981",strokeWidth:2,dot:!1})]})})]}),d=()=>s.jsx("div",{className:"space-y-3",children:e.alternativeActions.map((f,h)=>s.jsxs("div",{className:"p-3 bg-gray-800 border border-gray-700 rounded hover:border-gray-500 cursor-pointer transition-colors",children:[s.jsxs("div",{className:"flex justify-between mb-1",children:[s.jsx("span",{className:"font-semibold text-gray-200 capitalize",children:f.actionType.replace("_"," ")}),s.jsxs("span",{className:"text-xs text-cyan-400 font-mono",children:[f.confidence,"% Conf."]})]}),s.jsx("p",{className:"text-xs text-gray-400",children:f.rationale})]},h))});return s.jsx("div",{className:"fixed inset-0 bg-black/80 z-50 flex items-center justify-center backdrop-blur-sm",children:s.jsxs("div",{className:"bg-gray-900 w-full max-w-2xl rounded-xl border border-gray-700 shadow-2xl overflow-hidden animate-in fade-in zoom-in duration-200",children:[s.jsxs("div",{className:"flex justify-between items-center p-4 border-b border-gray-800 bg-gray-800/50",children:[s.jsxs("h3",{className:"text-xl font-bold text-white flex items-center",children:[s.jsx(dVe,{})," Strategic Execution Module"]}),s.jsx("button",{onClick:t,className:"text-gray-400 hover:text-white transition-colors",children:s.jsx(D$t,{})})]}),s.jsxs("div",{className:"flex border-b border-gray-800",children:[s.jsx("button",{onClick:()=>i("overview"),className:`flex-1 py-3 text-sm font-medium transition-colors ${o==="overview"?"bg-gray-800 text-white border-b-2 border-cyan-500":"text-gray-400 hover:bg-gray-800/50"}`,children:"Overview"}),s.jsx("button",{onClick:()=>i("risk"),className:`flex-1 py-3 text-sm font-medium transition-colors ${o==="risk"?"bg-gray-800 text-white border-b-2 border-cyan-500":"text-gray-400 hover:bg-gray-800/50"}`,children:"Risk Analysis"}),s.jsx("button",{onClick:()=>i("backtest"),className:`flex-1 py-3 text-sm font-medium transition-colors ${o==="backtest"?"bg-gray-800 text-white border-b-2 border-cyan-500":"text-gray-400 hover:bg-gray-800/50"}`,children:"Backtest"}),s.jsx("button",{onClick:()=>i("alternatives"),className:`flex-1 py-3 text-sm font-medium transition-colors ${o==="alternatives"?"bg-gray-800 text-white border-b-2 border-cyan-500":"text-gray-400 hover:bg-gray-800/50"}`,children:"Alternatives"})]}),s.jsxs("div",{className:"p-6 min-h-[300px]",children:[o==="overview"&&l(),o==="risk"&&c(),o==="backtest"&&u(),o==="alternatives"&&d()]}),s.jsxs("div",{className:"p-4 border-t border-gray-800 bg-gray-800/30 flex justify-end gap-3",children:[s.jsx("button",{onClick:t,className:"px-4 py-2 text-sm font-medium text-gray-300 hover:text-white transition-colors",children:"Cancel"}),s.jsx("button",{onClick:a,disabled:n,className:"px-6 py-2 bg-cyan-600 hover:bg-cyan-500 text-white text-sm font-bold rounded shadow-lg shadow-cyan-500/20 transition-all transform hover:scale-105 disabled:opacity-50 disabled:cursor-not-allowed flex items-center",children:n?s.jsxs(s.Fragment,{children:[s.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Initiating..."]}):"Execute Strategy"})]})]})})},Pte=()=>{const e=p.useContext(Xi),[t,n]=p.useState(null),r=p.useMemo(()=>(e!=null&&e.financialGoals,[{id:"ins_1",title:"Portfolio Imbalance Detected",description:"Crypto exposure has exceeded 20% due to recent ETH rally. Rebalancing recommended to maintain risk parity.",urgency:"high",confidenceScore:92,actionable:!0,actionType:"rebalance_portfolio",details:{asset:"ETH",currentAllocation:22,suggestedAllocation:15},tags:["Risk","Crypto","Rebalance"],geinFactor:.85,correlationId:"corr_eth_rally_q3",sourceModel:"Sentinel-Prime-v4",timeToLive:3600,riskAnalysis:{volatilityIndex:65,sharpeRatio:1.8,maxDrawdown:12},backtestData:Array.from({length:30},(o,i)=>({name:`Day ${i}`,value:100+Math.random()*20+i})),alternativeActions:[{actionType:"hedge_with_options",rationale:"Buy protective puts to lock in gains without selling.",confidence:75},{actionType:"do_nothing",rationale:"Allow drift if momentum indicators remain strong.",confidence:40}],message:"Portfolio Imbalance",type:"Warning"},{id:"ins_2",title:"Stop-Loss Opportunity",description:"TSLA volatility approaching critical threshold. Dynamic stop-loss adjustment suggested.",urgency:"medium",confidenceScore:88,actionable:!0,actionType:"set_stop_loss",details:{asset:"TSLA",currentPrice:245.5,suggestedStopLoss:230},tags:["Equity","Protection"],geinFactor:.78,correlationId:"corr_tech_volatility",sourceModel:"Risk-Overseer-v9",timeToLive:7200,riskAnalysis:{volatilityIndex:45,sharpeRatio:1.2,maxDrawdown:25},backtestData:Array.from({length:30},(o,i)=>({name:`Day ${i}`,value:100-Math.random()*10})),alternativeActions:[],message:"Stop-Loss Update",type:"Opportunity"},{id:"ins_3",title:"Liquidity Pool Yield Spike",description:"USDC-ETH pool on Uniswap v3 showing 45% APR. Capital deployment advised.",urgency:"low",confidenceScore:65,actionable:!0,actionType:"liquidity_provision",details:{targetPool:"USDC-ETH (0.05%)"},tags:["DeFi","Yield"],geinFactor:.92,correlationId:"corr_defi_yields",sourceModel:"Yield-Hunter-Alpha",timeToLive:1800,riskAnalysis:{volatilityIndex:80,sharpeRatio:2.5,maxDrawdown:5},backtestData:Array.from({length:30},(o,i)=>({name:`Day ${i}`,value:100+Math.random()*5})),alternativeActions:[],message:"High Yield Alert",type:"Opportunity"}]),[e]);return s.jsxs(At,{title:"AI Strategic Insights",className:"h-full border-l-4 border-purple-500",children:[s.jsx("div",{className:"space-y-4 pr-2 max-h-[400px] overflow-y-auto custom-scrollbar",children:r.map(o=>s.jsxs("div",{className:"relative p-4 bg-gray-800/50 rounded-lg border border-gray-700 hover:border-cyan-500/50 transition-all duration-300 group cursor-pointer hover:bg-gray-800",onClick:()=>n(o),children:[s.jsx($$t,{urgency:o.urgency}),s.jsx("h4",{className:"font-bold text-gray-200 pr-24",children:o.title}),s.jsx("p",{className:"text-sm text-gray-400 mt-1 line-clamp-2",children:o.description}),s.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[s.jsxs("div",{className:"flex gap-2 items-center",children:[o.tags.map(i=>s.jsx("span",{className:"text-[10px] uppercase font-bold px-2 py-0.5 bg-gray-700 rounded text-gray-300",children:i},i)),s.jsxs("div",{className:"relative group/info ml-2",children:[s.jsx(L$t,{}),s.jsx("div",{className:"absolute bottom-full mb-2 w-64 p-3 bg-gray-900 border border-gray-700 rounded-lg shadow-lg text-xs text-gray-300 opacity-0 group-hover/info:opacity-100 transition-opacity duration-200 pointer-events-none z-10 -translate-x-1/2 left-1/2",children:F$t(o.actionType)})]})]}),s.jsxs("div",{className:"flex items-center text-xs font-mono text-cyan-400 opacity-80 group-hover:opacity-100",children:[s.jsxs("span",{className:"mr-2",children:["Score: ",o.confidenceScore]}),s.jsx(dVe,{})]})]})]},o.id))}),t&&s.jsx(B$t,{insight:t,onClose:()=>n(null)})]})},z$t=Object.freeze(Object.defineProperty({__proto__:null,AIInsights:Pte,default:Pte},Symbol.toStringTag,{value:"Module"})),H$t=e=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:s.jsx("path",{d:"M12 2a2.83 2.83 0 0 0-2 5 4.79 4.79 0 0 1-1 3c-1.6.9-2.6 2.5-2.6 4.2 0 2.5 2.5 0 0 0 5 0 2.5 2.5 0 0 0 5 0 2.5 2.5 0 0 0-2.6-4.2c0-.8-1.4-2.4-1-3a2.83 2.83 0 0 0-2-5z"})}),V$t=()=>s.jsx(At,{title:"AI Prediction Engine",children:s.jsxs("div",{className:"flex items-center justify-center flex-col p-4 text-center",children:[s.jsx("div",{className:"p-3 bg-cyan-500/20 rounded-full mb-4",children:s.jsx(H$t,{className:"w-8 h-8 text-cyan-400"})}),s.jsx("h4",{className:"text-lg font-bold text-white mb-2",children:"Market Forecast"}),s.jsx("p",{className:"text-sm text-gray-400 mb-4",children:"Our quantum-entangled neural networks predict a 94% probability of market stabilization within 48 hours."}),s.jsx("div",{className:"w-full bg-gray-700 rounded-full h-2",children:s.jsx("div",{className:"bg-gradient-to-r from-cyan-500 to-blue-500 h-2 rounded-full",style:{width:"94%"}})}),s.jsxs("div",{className:"mt-2 flex justify-between text-xs w-full px-1",children:[s.jsx("span",{className:"text-gray-500",children:"Confidence"}),s.jsx("span",{className:"text-cyan-400 font-bold",children:"94%"})]})]})}),U$t=Object.freeze(Object.defineProperty({__proto__:null,default:V$t},Symbol.toStringTag,{value:"Module"}));function $M(e){return s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",...e,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924-1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065zM15 12a3 3 0 11-6 0 3 3 0 016 0z"})})}const kk=({status:e})=>{const t={Operational:{bg:"bg-green-500/20",text:"text-green-300",dot:"bg-green-400"},"Degraded Performance":{bg:"bg-yellow-500/20",text:"text-yellow-300",dot:"bg-yellow-400"},"Partial Outage":{bg:"bg-orange-500/20",text:"text-orange-300",dot:"bg-orange-400"},"Major Outage":{bg:"bg-red-500/20",text:"text-red-300",dot:"bg-red-400"},Maintenance:{bg:"bg-blue-500/20",text:"text-blue-300",dot:"bg-blue-400"},Unknown:{bg:"bg-gray-500/20",text:"text-gray-300",dot:"bg-gray-400"}},n=t[e]||t.Unknown;return s.jsxs("div",{className:`flex items-center gap-2 px-2 py-1 rounded-full text-xs font-medium ${n.bg} ${n.text}`,children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${n.dot}`}),e]})},G$t=({geminiApiKey:e})=>{const[t,n]=p.useState([]),[r,o]=p.useState(""),[i,a]=p.useState(!1),[l,c]=p.useState(null),u=p.useRef(null),d=p.useRef(null);p.useEffect(()=>{if(e)try{const h=new vm({apiKey:e});u.current=h.chats.create({model:"gemini-2.5-flash",config:{systemInstruction:"You are GEIN (Global Enterprise Intelligence Network), an AI Business Assistant integrated into an Enterprise Operating System. Your purpose is to help users with API monitoring, financial insights, high-frequency trading, legal compliance, supply chain logistics, HR, workflow automation, and business intelligence. Be concise, professional, and helpful."},history:[]}),c(null)}catch(h){console.error("Error initializing Gemini:",h),c("Failed to initialize AI. Please check your API key.")}},[e]);const f=async()=>{if(r.trim()===""||!e||!u.current||i)return;const h=r,m={sender:"user",text:h,timestamp:new Date().toLocaleTimeString()};n(g=>[...g,m]),o(""),a(!0),c(null);try{const g=await u.current.sendMessageStream({message:h});let b="";n(y=>[...y,{sender:"ai",text:"",timestamp:new Date().toLocaleTimeString()}]);for await(const y of g){const x=y.text;x&&(b+=x,n(S=>{const C=[...S],_=C[C.length-1];return _&&_.sender==="ai"&&(_.text=b,_.timestamp=new Date().toLocaleTimeString()),C}))}}catch(g){console.error("Error sending message to Gemini:",g);const b=g instanceof Error?g.message:"An error occurred while communicating with the AI.";c(`AI Error: ${b}`),n(y=>{const v=[...y],x=v[v.length-1];return x&&x.sender==="ai"&&x.text===""&&v.pop(),v})}finally{a(!1)}};return p.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[t]),s.jsx(At,{title:"AI Business Assistant (GEIN)",children:s.jsxs("div",{className:"flex flex-col h-96",children:[s.jsxs("div",{ref:d,id:"chat-messages",className:"flex-grow overflow-y-auto p-4 space-y-4 bg-gray-900 rounded-lg border border-gray-700 mb-4",children:[t.length===0&&s.jsx("div",{className:"text-center text-gray-500 italic",children:"Type a message to start a conversation with GEIN, your AI Business Assistant."}),t.map((h,m)=>s.jsx("div",{className:`flex ${h.sender==="user"?"justify-end":"justify-start"}`,children:s.jsxs("div",{className:`max-w-xs lg:max-w-md px-4 py-2 rounded-lg shadow-md ${h.sender==="user"?"bg-cyan-700 text-white":"bg-gray-700 text-gray-100"}`,children:[s.jsx("p",{className:"text-sm whitespace-pre-wrap",children:h.text}),s.jsx("span",{className:"block text-right text-xs text-gray-400 mt-1",children:h.timestamp})]})},m)),l&&s.jsx("div",{className:"text-center text-red-400 italic p-2",children:l})]}),s.jsxs("div",{className:"flex",children:[s.jsx("input",{type:"text",value:r,onChange:h=>o(h.target.value),onKeyPress:h=>h.key==="Enter"&&f(),placeholder:e?"Ask GEIN...":"Please configure Gemini API key to chat...",className:"flex-grow bg-gray-700/50 border border-gray-600 rounded-l-lg px-4 py-2 text-white focus:outline-none focus:ring-1 focus:ring-cyan-500",disabled:!e||i}),s.jsx("button",{onClick:f,className:"bg-cyan-600 hover:bg-cyan-700 text-white rounded-r-lg px-4 py-2 transition-colors duration-200 disabled:bg-gray-500 disabled:cursor-not-allowed",disabled:!e||r.trim()===""||i,children:"Send"})]})]})})},W$t=({apiStatus:e,geminiApiKey:t,onConfigurePlaid:n,onConfigureStripe:r})=>{const[o,i]=p.useState(null),[a,l]=p.useState(!1),[c,u]=p.useState([]);Array.from({length:30},(f,h)=>({name:`${h+1}h ago`,calls:100+Math.random()*200,errors:Math.floor(Math.random()*10),latency:50+Math.random()*150})),p.useEffect(()=>{u(t&&a?["AI detected a 15% increase in API latency for Google Gemini over the last 2 hours, potentially indicating network congestion.","Anomaly: Modern Treasury API error rates spiked briefly at 02:30 UTC, but quickly recovered. Root cause analysis initiated.","Predictive analysis suggests a 70% probability of 'Degraded Performance' for a third-party payment gateway API within the next 48 hours due to observed traffic patterns.","Recommendation: Review rate limits for high-volume endpoints to prevent future throttling issues."]:[])},[t,a,e]);const d=()=>{if(!o)return s.jsx("p",{className:"text-gray-400",children:"Select an API provider to view detailed metrics and AI insights."});const f=e.find(m=>m.provider===o);if(!f)return s.jsx("p",{className:"text-red-400",children:"API details not found."});const h=Array.from({length:24},(m,g)=>({time:`${g}:00`,latency:f.responseTime+Math.random()*50-25,errors:Math.floor(Math.random()*5),throughput:1e3+Math.random()*500}));return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("h3",{className:"text-xl font-bold text-white",children:[f.provider," - Detailed Metrics"]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"bg-gray-800/50 p-4 rounded-lg border border-gray-700",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Current Status"}),s.jsx(kk,{status:f.status})]}),s.jsxs("div",{className:"bg-gray-800/50 p-4 rounded-lg border border-gray-700",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Average Latency"}),s.jsxs("p",{className:"text-2xl font-bold text-cyan-400",children:[f.responseTime,"ms"]})]}),s.jsxs("div",{className:"bg-gray-800/50 p-4 rounded-lg border border-gray-700",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Error Rate (24h)"}),s.jsxs("p",{className:"text-2xl font-bold text-red-400",children:[(Math.random()*2).toFixed(2),"%"]})]})]}),s.jsxs("div",{className:"h-64 bg-gray-900 rounded-lg p-4 border border-gray-700",children:[s.jsx("h4",{className:"text-lg font-semibold text-white mb-2",children:"Historical Latency & Errors"}),s.jsx(Oo,{width:"100%",height:"100%",children:s.jsxs(Mg,{data:h,children:[s.jsx(Ea,{strokeDasharray:"3 3",stroke:"#4b5563"}),s.jsx(Ei,{dataKey:"time",stroke:"#9ca3af"}),s.jsx(Wo,{yAxisId:"left",stroke:"#06b6d4",label:{value:"Latency (ms)",angle:-90,position:"insideLeft",fill:"#06b6d4"}}),s.jsx(Wo,{yAxisId:"right",orientation:"right",stroke:"#ef4444",label:{value:"Errors",angle:90,position:"insideRight",fill:"#ef4444"}}),s.jsx(Fo,{contentStyle:{backgroundColor:"rgba(31, 41, 55, 0.9)",borderColor:"#4b5563",borderRadius:"8px"}}),s.jsx(yl,{}),s.jsx(us,{yAxisId:"left",type:"monotone",dataKey:"latency",stroke:"#06b6d4",dot:!1,name:"Latency"}),s.jsx(us,{yAxisId:"right",type:"monotone",dataKey:"errors",stroke:"#ef4444",dot:!1,name:"Errors"})]})})]}),t&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h4",{className:"text-lg font-semibold text-white",children:"AI Anomaly Detection & Predictive Insights"}),s.jsxs("label",{className:"flex items-center cursor-pointer",children:[s.jsx("span",{className:"mr-3 text-sm text-gray-400",children:"Enable AI Analysis"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only",checked:a,onChange:()=>l(!a)}),s.jsx("div",{className:`block w-10 h-6 rounded-full ${a?"bg-cyan-600":"bg-gray-600"}`}),s.jsx("div",{className:`dot absolute left-1 top-1 bg-white w-4 h-4 rounded-full transition ${a?"translate-x-full":""}`})]})]})]}),a&&c.length>0?s.jsx("ul",{className:"list-disc list-inside text-gray-300 space-y-2 bg-gray-900 p-4 rounded-lg border border-gray-700",children:c.map((m,g)=>s.jsx("li",{className:"text-sm",children:m},g))}):a?s.jsx("p",{className:"text-gray-500 italic bg-gray-900 p-4 rounded-lg border border-gray-700",children:"AI is analyzing data... No critical anomalies detected yet."}):s.jsx("p",{className:"text-gray-500 italic",children:"Enable AI Analysis to receive real-time anomaly detection and predictive insights."})]})]})};return s.jsx(At,{title:"Advanced API Monitoring & AI Diagnostics",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[s.jsxs("div",{className:"lg:col-span-1 space-y-4",children:[s.jsx("h3",{className:"text-xl font-bold text-white",children:"API Providers"}),s.jsxs("ul",{className:"space-y-2",children:[e.map(f=>s.jsx("li",{children:s.jsxs("button",{onClick:()=>i(f.provider),className:`w-full text-left p-3 rounded-lg transition-colors duration-200 flex items-center justify-between ${o===f.provider?"bg-cyan-700 text-white":"bg-gray-800/50 hover:bg-gray-700/50 text-gray-300"}`,children:[s.jsx("span",{className:"font-medium",children:f.provider}),s.jsx(kk,{status:f.status})]})},f.provider)),s.jsx("li",{children:s.jsxs("div",{className:"w-full text-left p-3 rounded-lg bg-gray-800/50 text-gray-300 flex items-center justify-between",children:[s.jsx("span",{className:"font-medium",children:"Plaid"}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(kk,{status:"Unknown"}),s.jsx("button",{onClick:n,className:"text-gray-400 hover:text-white",children:s.jsx($M,{className:"h-5 w-5"})})]})]})}),s.jsx("li",{children:s.jsxs("div",{className:"w-full text-left p-3 rounded-lg bg-gray-800/50 text-gray-300 flex items-center justify-between",children:[s.jsx("span",{className:"font-medium",children:"Stripe"}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(kk,{status:"Unknown"}),s.jsx("button",{onClick:r,className:"text-gray-400 hover:text-white",children:s.jsx($M,{className:"h-5 w-5"})})]})]})})]})]}),s.jsx("div",{className:"lg:col-span-3",children:d()})]})})},q$t=({modernTreasuryApiKey:e,modernTreasuryOrganizationId:t,geminiApiKey:n})=>{const[r,o]=p.useState("overview"),[i,a]=p.useState([]),[l,c]=p.useState(!1),u=e&&t,d=Array.from({length:7},(m,g)=>({date:`Day ${g+1}`,incoming:5e3+Math.random()*2e3,outgoing:3e3+Math.random()*1500})),f=[{name:"ACH",value:400},{name:"Wire",value:300},{name:"RTP",value:200},{name:"Card",value:100}];if(p.useEffect(()=>{a(n&&u&&l?["AI detected a potential anomaly in outgoing payments to a new vendor. Review required for transaction ID: TXN-98765.","Cash flow forecast for Q3 indicates a surplus of $1.2M, exceeding projections by 10%.","Recommendation: Optimize payment routing for international wires to reduce fees by an estimated 5%.","AI identified 3 high-risk transactions in the last 48 hours. Details available in the 'Transactions' tab."]:[])},[n,u,l]),!u)return s.jsx(At,{title:"Financial Operations (Modern Treasury)",children:s.jsxs("div",{className:"p-6 text-center text-gray-400 space-y-4",children:[s.jsx("p",{className:"text-lg",children:"Modern Treasury API is not configured."}),s.jsx("p",{children:"Please configure your Modern Treasury API Key and Organization ID to access advanced financial operations, real-time cash management, and AI-powered fraud detection."}),s.jsx("button",{className:"py-2 px-4 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg",children:"Configure Now"})]})});const h=()=>{switch(r){case"overview":return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"bg-gray-800/50 p-4 rounded-lg border border-gray-700",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Current Balance"}),s.jsx("p",{className:"text-3xl font-bold text-green-400",children:"$1,234,567.89"})]}),s.jsxs("div",{className:"bg-gray-800/50 p-4 rounded-lg border border-gray-700",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Pending Payments"}),s.jsx("p",{className:"text-3xl font-bold text-yellow-400",children:"$87,654.32"})]}),s.jsxs("div",{className:"bg-gray-800/50 p-4 rounded-lg border border-gray-700",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Last 24h Transactions"}),s.jsx("p",{className:"text-3xl font-bold text-white",children:"128"})]})]}),s.jsxs("div",{className:"h-64 bg-gray-900 rounded-lg p-4 border border-gray-700",children:[s.jsx("h4",{className:"text-lg font-semibold text-white mb-2",children:"Daily Cash Flow"}),s.jsx(Oo,{width:"100%",height:"100%",children:s.jsxs(Tp,{data:d,children:[s.jsx(Ea,{strokeDasharray:"3 3",stroke:"#4b5563"}),s.jsx(Ei,{dataKey:"date",stroke:"#9ca3af"}),s.jsx(Wo,{stroke:"#9ca3af"}),s.jsx(Fo,{contentStyle:{backgroundColor:"rgba(31, 41, 55, 0.9)",borderColor:"#4b5563",borderRadius:"8px"}}),s.jsx(yl,{}),s.jsx(wu,{dataKey:"incoming",fill:"#34d399",name:"Incoming"}),s.jsx(wu,{dataKey:"outgoing",fill:"#ef4444",name:"Outgoing"})]})})]}),n&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h4",{className:"text-lg font-semibold text-white",children:"AI Fraud Detection & Financial Insights"}),s.jsxs("label",{className:"flex items-center cursor-pointer",children:[s.jsx("span",{className:"mr-3 text-sm text-gray-400",children:"Enable AI Fraud Detection"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only",checked:l,onChange:()=>c(!l)}),s.jsx("div",{className:`block w-10 h-6 rounded-full ${l?"bg-cyan-600":"bg-gray-600"}`}),s.jsx("div",{className:`dot absolute left-1 top-1 bg-white w-4 h-4 rounded-full transition ${l?"translate-x-full":""}`})]})]})]}),l&&i.length>0?s.jsx("ul",{className:"list-disc list-inside text-gray-300 space-y-2 bg-gray-900 p-4 rounded-lg border border-gray-700",children:i.map((b,y)=>s.jsx("li",{className:"text-sm",children:b},y))}):l?s.jsx("p",{className:"text-gray-500 italic bg-gray-900 p-4 rounded-lg border border-gray-700",children:"AI is actively monitoring transactions... No high-risk activities detected."}):s.jsx("p",{className:"text-gray-500 italic",children:"Enable AI Fraud Detection to protect your financial operations with real-time anomaly detection."})]})]});case"transactions":const m=Array.from({length:10},(b,y)=>({id:`TXN-${1e3+y}`,date:`2024-07-${15+y}`,description:y%2===0?`Payment to Vendor ${y}`:`Incoming from Client ${y}`,amount:y%2===0?-(1e3+y*50):2e3+y*75,status:y%3===0?"Pending":"Completed",risk:y%4===0?"High":"Low"}));return s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-xl font-bold text-white",children:"Recent Transactions"}),s.jsx("div",{className:"overflow-x-auto bg-gray-900 rounded-lg border border-gray-700",children:s.jsxs("table",{className:"min-w-full divide-y divide-gray-700",children:[s.jsx("thead",{className:"bg-gray-800",children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"ID"}),s.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Date"}),s.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Description"}),s.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Amount"}),s.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Status"}),s.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"AI Risk"})]})}),s.jsx("tbody",{className:"divide-y divide-gray-800",children:m.map(b=>s.jsxs("tr",{className:"hover:bg-gray-800/70",children:[s.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-white",children:b.id}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-300",children:b.date}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-300",children:b.description}),s.jsx("td",{className:`px-6 py-4 whitespace-nowrap text-sm ${b.amount>0?"text-green-400":"text-red-400"}`,children:b.amount.toLocaleString("en-US",{style:"currency",currency:"USD"})}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:s.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${b.status==="Completed"?"bg-green-100 text-green-800":"bg-yellow-100 text-yellow-800"}`,children:b.status})}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:s.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${b.risk==="High"?"bg-red-100 text-red-800":"bg-green-100 text-green-800"}`,children:b.risk})})]},b.id))})]})})]});case"payments":return s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-xl font-bold text-white",children:"Payment Flow Analysis"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"h-64 bg-gray-900 rounded-lg p-4 border border-gray-700",children:[s.jsx("h4",{className:"text-lg font-semibold text-white mb-2",children:"Payment Method Distribution"}),s.jsx(Oo,{width:"100%",height:"100%",children:s.jsxs(Tp,{data:f,children:[s.jsx(Ea,{strokeDasharray:"3 3",stroke:"#4b5563"}),s.jsx(Ei,{dataKey:"name",stroke:"#9ca3af"}),s.jsx(Wo,{stroke:"#9ca3af"}),s.jsx(Fo,{contentStyle:{backgroundColor:"rgba(31, 41, 55, 0.9)",borderColor:"#4b5563",borderRadius:"8px"}}),s.jsx(wu,{dataKey:"value",fill:"#06b6d4"})]})})]}),s.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 border border-gray-700 space-y-3",children:[s.jsx("h4",{className:"text-lg font-semibold text-white",children:"AI Payment Optimization"}),s.jsx("p",{className:"text-gray-400 text-sm",children:"Leverage AI to analyze payment routes, identify cost savings, and optimize settlement times."}),s.jsxs("ul",{className:"list-disc list-inside text-gray-300 text-sm space-y-1",children:[s.jsxs("li",{children:["Suggested savings on international wires: ",s.jsx("strong",{children:"5%"})]}),s.jsx("li",{children:"Recommended faster ACH batch processing for payroll."}),s.jsx("li",{children:"Identified potential for real-time payment adoption for critical vendors."})]}),s.jsx("button",{className:"w-full py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg text-sm",children:"View Optimization Report"})]})]})]});case"forecasting":const g=Array.from({length:12},(b,y)=>({month:`Month ${y+1}`,projected:1e5+Math.random()*5e4,actual:y<6?1e5+Math.random()*5e4:null}));return s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-xl font-bold text-white",children:"AI-Powered Cash Flow Forecasting"}),s.jsx("div",{className:"h-80 bg-gray-900 rounded-lg p-4 border border-gray-700",children:s.jsx(Oo,{width:"100%",height:"100%",children:s.jsxs(Mg,{data:g,children:[s.jsx(Ea,{strokeDasharray:"3 3",stroke:"#4b5563"}),s.jsx(Ei,{dataKey:"month",stroke:"#9ca3af"}),s.jsx(Wo,{stroke:"#9ca3af",tickFormatter:b=>`$${(b/1e3).toFixed(0)}K`}),s.jsx(Fo,{contentStyle:{backgroundColor:"rgba(31, 41, 55, 0.9)",borderColor:"#4b5563",borderRadius:"8px"}}),s.jsx(yl,{}),s.jsx(us,{type:"monotone",dataKey:"projected",stroke:"#06b6d4",name:"Projected Cash Flow"}),s.jsx(us,{type:"monotone",dataKey:"actual",stroke:"#34d399",name:"Actual Cash Flow"})]})})}),s.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 border border-gray-700 space-y-3",children:[s.jsx("h4",{className:"text-lg font-semibold text-white",children:"AI Forecast Summary"}),s.jsx("p",{className:"text-gray-400 text-sm",children:"Our AI model predicts a strong financial outlook for the next 12 months, with consistent growth in revenue streams. Key factors include: increased customer retention, successful product launches, and optimized operational costs."}),s.jsxs("ul",{className:"list-disc list-inside text-gray-300 text-sm space-y-1",children:[s.jsxs("li",{children:["Projected Q4 2024 Revenue: ",s.jsx("strong",{children:"$5.8M"})," (+18% YoY)"]}),s.jsxs("li",{children:["Identified potential for ",s.jsx("strong",{children:"$250K"})," in savings through vendor contract renegotiations."]}),s.jsxs("li",{children:["Scenario analysis: Impact of a 10% market downturn on cash reserves: ",s.jsx("strong",{children:"Manageable"}),"."]})]}),s.jsx("button",{className:"w-full py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg text-sm",children:"Generate Detailed Forecast Report"})]})]});default:return null}};return s.jsxs(At,{title:"AI-Powered Financial Operations",children:[s.jsx("div",{className:"border-b border-gray-700 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:["overview","transactions","payments","forecasting"].map(m=>s.jsx("button",{onClick:()=>o(m),className:`whitespace-nowrap py-3 px-1 border-b-2 font-medium text-sm capitalize transition-colors duration-200 ${r===m?"border-cyan-500 text-cyan-400":"border-transparent text-gray-400 hover:text-gray-200 hover:border-gray-300"}`,children:m.replace("-"," ")},m))})}),h()]})},K$t=({geminiApiKey:e})=>{const[t,n]=p.useState("overview"),[r,o]=p.useState([]),[i,a]=p.useState(!1),l=[{name:"Revenue Growth",value:12.5,target:10,unit:"%"},{name:"Customer Acquisition Cost",value:85,target:90,unit:"$"},{name:"Customer Lifetime Value",value:1200,target:1e3,unit:"$"},{name:"Operational Efficiency",value:92,target:90,unit:"%"}],c=Array.from({length:12},(d,f)=>({month:`M${f+1}`,revenue:1e5+Math.random()*5e4,newCustomers:50+Math.random()*20}));p.useEffect(()=>{o(e&&i?["AI identified a 20% increase in customer churn for a specific product segment. Recommend targeted re-engagement campaigns.","Predictive analytics suggest optimizing marketing spend towards digital channels for a 15% higher ROI.","Operational bottleneck detected in supply chain logistics. AI suggests alternative suppliers to mitigate risk.","Recommendation: Implement dynamic pricing strategies based on real-time market demand to maximize revenue."]:[])},[e,i]);const u=()=>{switch(t){case"overview":return s.jsxs("div",{className:"space-y-6",children:[s.jsx("h3",{className:"text-xl font-bold text-white",children:"Key Performance Indicators (KPIs)"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:l.map((h,m)=>s.jsxs("div",{className:"bg-gray-800/50 p-4 rounded-lg border border-gray-700",children:[s.jsx("p",{className:"text-sm text-gray-400",children:h.name}),s.jsxs("p",{className:"text-2xl font-bold text-white mt-1",children:[h.unit==="$"?"$":"",h.value.toFixed(h.unit==="%"?1:0),h.unit]}),s.jsxs("p",{className:`text-xs mt-1 ${h.value>=h.target?"text-green-400":"text-red-400"}`,children:["Target: ",h.unit==="$"?"$":"",h.target,h.unit]})]},m))}),e&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h4",{className:"text-lg font-semibold text-white",children:"AI Strategic Recommendations"}),s.jsxs("label",{className:"flex items-center cursor-pointer",children:[s.jsx("span",{className:"mr-3 text-sm text-gray-400",children:"Enable AI Insights"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only",checked:i,onChange:()=>a(!i)}),s.jsx("div",{className:`block w-10 h-6 rounded-full ${i?"bg-cyan-600":"bg-gray-600"}`}),s.jsx("div",{className:`dot absolute left-1 top-1 bg-white w-4 h-4 rounded-full transition ${i?"translate-x-full":""}`})]})]})]}),i&&r.length>0?s.jsx("ul",{className:"list-disc list-inside text-gray-300 space-y-2 bg-gray-900 p-4 rounded-lg border border-gray-700",children:r.map((h,m)=>s.jsx("li",{className:"text-sm",children:h},m))}):i?s.jsx("p",{className:"text-gray-500 italic bg-gray-900 p-4 rounded-lg border border-gray-700",children:"AI is generating strategic recommendations..."}):s.jsx("p",{className:"text-gray-500 italic",children:"Enable AI Insights to receive data-driven strategic recommendations for your business."})]})]});case"sales":return s.jsxs("div",{className:"space-y-6",children:[s.jsx("h3",{className:"text-xl font-bold text-white",children:"Sales Performance & AI Forecasting"}),s.jsx("div",{className:"h-80 bg-gray-900 rounded-lg p-4 border border-gray-700",children:s.jsx(Oo,{width:"100%",height:"100%",children:s.jsxs(Mg,{data:c,children:[s.jsx(Ea,{strokeDasharray:"3 3",stroke:"#4b5563"}),s.jsx(Ei,{dataKey:"month",stroke:"#9ca3af"}),s.jsx(Wo,{yAxisId:"left",stroke:"#06b6d4",label:{value:"Revenue ($)",angle:-90,position:"insideLeft",fill:"#06b6d4"}}),s.jsx(Wo,{yAxisId:"right",orientation:"right",stroke:"#34d399",label:{value:"New Customers",angle:90,position:"insideRight",fill:"#34d399"}}),s.jsx(Fo,{contentStyle:{backgroundColor:"rgba(31, 41, 55, 0.9)",borderColor:"#4b5563",borderRadius:"8px"}}),s.jsx(yl,{}),s.jsx(us,{yAxisId:"left",type:"monotone",dataKey:"revenue",stroke:"#06b6d4",name:"Monthly Revenue"}),s.jsx(us,{yAxisId:"right",type:"monotone",dataKey:"newCustomers",stroke:"#34d399",name:"New Customers"})]})})}),s.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 border border-gray-700 space-y-3",children:[s.jsx("h4",{className:"text-lg font-semibold text-white",children:"AI Sales Insights"}),s.jsx("p",{className:"text-gray-400 text-sm",children:"AI predicts a 10% increase in sales conversion rates next quarter due to optimized lead scoring and personalized outreach strategies."}),s.jsxs("ul",{className:"list-disc list-inside text-gray-300 text-sm space-y-1",children:[s.jsxs("li",{children:["Top performing sales channels identified: ",s.jsx("strong",{children:"Enterprise Solutions, Digital Partnerships"}),"."]}),s.jsx("li",{children:"AI-suggested personalized product bundles for high-value clients."}),s.jsxs("li",{children:["Forecasted impact of new sales hires: ",s.jsx("strong",{children:"+5% revenue growth"}),"."]})]}),s.jsx("button",{className:"w-full py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg text-sm",children:"Generate Sales Strategy Report"})]})]});case"marketing":const d=Array.from({length:12},(h,m)=>({month:`M${m+1}`,leads:500+Math.random()*200,conversions:50+Math.random()*30,cpc:1.5+Math.random()*.5}));return s.jsxs("div",{className:"space-y-6",children:[s.jsx("h3",{className:"text-xl font-bold text-white",children:"Marketing Performance & AI Optimization"}),s.jsx("div",{className:"h-80 bg-gray-900 rounded-lg p-4 border border-gray-700",children:s.jsx(Oo,{width:"100%",height:"100%",children:s.jsxs(wm,{data:d,children:[s.jsxs("defs",{children:[s.jsxs("linearGradient",{id:"leadsColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"5%",stopColor:"#06b6d4",stopOpacity:.8}),s.jsx("stop",{offset:"95%",stopColor:"#06b6d4",stopOpacity:0})]}),s.jsxs("linearGradient",{id:"conversionsColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"5%",stopColor:"#34d399",stopOpacity:.8}),s.jsx("stop",{offset:"95%",stopColor:"#34d399",stopOpacity:0})]})]}),s.jsx(Ea,{strokeDasharray:"3 3",stroke:"#4b5563"}),s.jsx(Ei,{dataKey:"month",stroke:"#9ca3af"}),s.jsx(Wo,{yAxisId:"left",stroke:"#06b6d4",label:{value:"Leads",angle:-90,position:"insideLeft",fill:"#06b6d4"}}),s.jsx(Wo,{yAxisId:"right",orientation:"right",stroke:"#34d399",label:{value:"Conversions",angle:90,position:"insideRight",fill:"#34d399"}}),s.jsx(Fo,{contentStyle:{backgroundColor:"rgba(31, 41, 55, 0.9)",borderColor:"#4b5563",borderRadius:"8px"}}),s.jsx(yl,{}),s.jsx(tu,{yAxisId:"left",type:"monotone",dataKey:"leads",stroke:"#06b6d4",fill:"url(#leadsColor)",name:"Leads Generated"}),s.jsx(tu,{yAxisId:"right",type:"monotone",dataKey:"conversions",stroke:"#34d399",fill:"url(#conversionsColor)",name:"Conversions"})]})})}),s.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 border border-gray-700 space-y-3",children:[s.jsx("h4",{className:"text-lg font-semibold text-white",children:"AI Marketing Optimization"}),s.jsx("p",{className:"text-gray-400 text-sm",children:"AI recommends reallocating 20% of your ad budget to social media campaigns, predicting a 15% increase in lead quality."}),s.jsxs("ul",{className:"list-disc list-inside text-gray-300 text-sm space-y-1",children:[s.jsxs("li",{children:["Identified high-performing keywords for SEO: ",s.jsx("strong",{children:'"AI finance platform", "business OS"'}),"."]}),s.jsx("li",{children:"AI-generated content suggestions for blog posts and email campaigns."}),s.jsx("li",{children:"Predicted optimal timing for product launch announcements."})]}),s.jsx("button",{className:"w-full py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg text-sm",children:"Generate Marketing Strategy Report"})]})]});case"operations":const f=Array.from({length:12},(h,m)=>({month:`M${m+1}`,tasksCompleted:1e3+Math.random()*300,automationRate:60+Math.random()*15,costSavings:5e3+Math.random()*2e3}));return s.jsxs("div",{className:"space-y-6",children:[s.jsx("h3",{className:"text-xl font-bold text-white",children:"Operational Efficiency & AI Automation"}),s.jsx("div",{className:"h-80 bg-gray-900 rounded-lg p-4 border border-gray-700",children:s.jsx(Oo,{width:"100%",height:"100%",children:s.jsxs(Mg,{data:f,children:[s.jsx(Ea,{strokeDasharray:"3 3",stroke:"#4b5563"}),s.jsx(Ei,{dataKey:"month",stroke:"#9ca3af"}),s.jsx(Wo,{yAxisId:"left",stroke:"#06b6d4",label:{value:"Tasks Completed",angle:-90,position:"insideLeft",fill:"#06b6d4"}}),s.jsx(Wo,{yAxisId:"right",orientation:"right",stroke:"#34d399",label:{value:"Automation Rate (%)",angle:90,position:"insideRight",fill:"#34d399"}}),s.jsx(Fo,{contentStyle:{backgroundColor:"rgba(31, 41, 55, 0.9)",borderColor:"#4b5563",borderRadius:"8px"}}),s.jsx(yl,{}),s.jsx(us,{yAxisId:"left",type:"monotone",dataKey:"tasksCompleted",stroke:"#06b6d4",name:"Tasks Completed"}),s.jsx(us,{yAxisId:"right",type:"monotone",dataKey:"automationRate",stroke:"#34d399",name:"Automation Rate"})]})})}),s.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 border border-gray-700 space-y-3",children:[s.jsx("h4",{className:"text-lg font-semibold text-white",children:"AI Operational Insights"}),s.jsx("p",{className:"text-gray-400 text-sm",children:"AI identifies a 25% potential for further automation in customer support workflows, leading to significant cost savings and improved response times."}),s.jsxs("ul",{className:"list-disc list-inside text-gray-300 text-sm space-y-1",children:[s.jsx("li",{children:"Recommended process improvements for faster onboarding of new clients."}),s.jsx("li",{children:"AI-driven resource allocation suggestions for peak operational periods."}),s.jsx("li",{children:"Predicted maintenance needs for critical infrastructure."})]}),s.jsx("button",{className:"w-full py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg text-sm",children:"Generate Operations Efficiency Report"})]})]});default:return null}};return s.jsxs(At,{title:"AI-Driven Business Intelligence",children:[s.jsx("div",{className:"border-b border-gray-700 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8","aria-label":"Reports Tabs",children:["overview","sales","marketing","operations"].map(d=>s.jsx("button",{onClick:()=>n(d),className:`whitespace-nowrap py-3 px-1 border-b-2 font-medium text-sm capitalize transition-colors duration-200 ${t===d?"border-cyan-500 text-cyan-400":"border-transparent text-gray-400 hover:text-gray-200 hover:border-gray-300"}`,children:d.replace("-"," ")},d))})}),u()]})},Y$t=({geminiApiKey:e})=>{const[t,n]=p.useState([{id:1,name:"Auto-reconcile Modern Treasury payments",status:"Active",trigger:"Daily at 3 AM",aiSuggested:!0},{id:2,name:"Notify team on critical API outage",status:"Active",trigger:"API Status: Major Outage",aiSuggested:!1},{id:3,name:"Generate weekly financial summary for executives",status:"Inactive",trigger:"Every Friday 5 PM",aiSuggested:!0},{id:4,name:"Flag high-risk transactions for manual review",status:"Active",trigger:"AI Fraud Detection: High Risk",aiSuggested:!0}]),[r,o]=p.useState(!1),[i,a]=p.useState(""),[l,c]=p.useState(""),[u,d]=p.useState([]);p.useEffect(()=>{d(e?["AI suggests automating customer onboarding steps by integrating with CRM and identity verification APIs.","Consider automating the generation of compliance reports based on financial transaction data.","Automate the process of updating inventory levels based on sales data and supplier APIs.","AI recommends setting up alerts for unusual login patterns to enhance security."]:[])},[e]);const f=()=>{i.trim()&&l.trim()&&(n(m=>[...m,{id:m.length+1,name:i,status:"Active",trigger:l,aiSuggested:!1}]),a(""),c(""),o(!1))},h=m=>{n(g=>g.map(b=>b.id===m?{...b,status:b.status==="Active"?"Inactive":"Active"}:b))};return s.jsxs(s.Fragment,{children:[r&&s.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 backdrop-blur-sm",onClick:()=>o(!1),children:s.jsxs("div",{className:"bg-gray-800 rounded-lg shadow-2xl max-w-md w-full border border-gray-700",onClick:m=>m.stopPropagation(),children:[s.jsx("div",{className:"p-4 border-b border-gray-700",children:s.jsx("h3",{className:"text-lg font-semibold text-white",children:"Add New Automation Rule"})}),s.jsxs("div",{className:"p-6 space-y-4",children:[s.jsx("input",{type:"text",value:i,onChange:m=>a(m.target.value),placeholder:"Rule Name (e.g., Auto-archive old invoices)",className:"w-full bg-gray-700/50 border border-gray-600 rounded-lg px-3 py-2 text-white focus:outline-none focus:ring-1 focus:ring-cyan-500"}),s.jsx("input",{type:"text",value:l,onChange:m=>c(m.target.value),placeholder:"Trigger (e.g., Monthly, New Invoice, API Error)",className:"w-full bg-gray-700/50 border border-gray-600 rounded-lg px-3 py-2 text-white focus:outline-none focus:ring-1 focus:ring-cyan-500"}),s.jsx("button",{onClick:f,className:"w-full py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg",children:"Add Rule"})]})]})}),s.jsx(At,{title:"AI-Powered Workflow Automation",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h3",{className:"text-xl font-bold text-white",children:"Active Automation Rules"}),s.jsx("button",{onClick:()=>o(!0),className:"py-2 px-4 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg text-sm",children:"+ Add New Rule"})]}),s.jsx("div",{className:"overflow-x-auto bg-gray-900 rounded-lg border border-gray-700",children:s.jsxs("table",{className:"min-w-full divide-y divide-gray-700",children:[s.jsx("thead",{className:"bg-gray-800",children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Rule Name"}),s.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Trigger"}),s.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Status"}),s.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"AI Suggested"}),s.jsx("th",{scope:"col",className:"relative px-6 py-3",children:s.jsx("span",{className:"sr-only",children:"Edit"})})]})}),s.jsx("tbody",{className:"divide-y divide-gray-800",children:t.map(m=>s.jsxs("tr",{className:"hover:bg-gray-800/70",children:[s.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-white",children:m.name}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-300",children:m.trigger}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:s.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${m.status==="Active"?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:m.status})}),s.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:m.aiSuggested?s.jsx("span",{className:"text-cyan-400",children:"Yes"}):s.jsx("span",{className:"text-gray-500",children:"No"})}),s.jsxs("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium",children:[s.jsx("button",{onClick:()=>h(m.id),className:"text-cyan-600 hover:text-cyan-900 mr-4",children:m.status==="Active"?"Deactivate":"Activate"}),s.jsx("button",{className:"text-gray-400 hover:text-white",children:s.jsx($M,{className:"h-5 w-5 inline-block"})})]})]},m.id))})]})}),e&&u.length>0&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h4",{className:"text-lg font-semibold text-white",children:"AI-Suggested Automations"}),s.jsx("ul",{className:"list-disc list-inside text-gray-300 space-y-2 bg-gray-900 p-4 rounded-lg border border-gray-700",children:u.map((m,g)=>s.jsx("li",{className:"text-sm",children:m},g))}),s.jsx("button",{className:"w-full py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg text-sm",children:"Explore AI Automation Templates"})]})]})})]})},X$t=({geminiApiKey:e})=>{const[t,n]=p.useState({name:"Jane Doe",email:"jane.doe@example.com",role:"Financial Analyst",lastLogin:"2024-07-20 10:30 AM",preferredLanguage:"English",aiPersonalizationEnabled:!0}),[r,o]=p.useState([]);p.useEffect(()=>{e&&t.aiPersonalizationEnabled?o(["AI suggests tailoring dashboard views to prioritize financial KPIs for 'Financial Analyst' role.","Recommended personalized learning paths for advanced Modern Treasury features based on user activity.","AI detected peak usage hours for this user; optimizing background data sync during off-peak times.","Personalized notification preferences based on user's interaction patterns."]):o([])},[e,t.aiPersonalizationEnabled]);const i=()=>{n(a=>({...a,aiPersonalizationEnabled:!a.aiPersonalizationEnabled}))};return s.jsx(At,{title:"AI-Enhanced User Profile",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"bg-gray-800/50 p-4 rounded-lg border border-gray-700",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Name"}),s.jsx("p",{className:"text-lg font-semibold text-white",children:t.name})]}),s.jsxs("div",{className:"bg-gray-800/50 p-4 rounded-lg border border-gray-700",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Email"}),s.jsx("p",{className:"text-lg font-semibold text-white",children:t.email})]}),s.jsxs("div",{className:"bg-gray-800/50 p-4 rounded-lg border border-gray-700",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Role"}),s.jsx("p",{className:"text-lg font-semibold text-white",children:t.role})]}),s.jsxs("div",{className:"bg-gray-800/50 p-4 rounded-lg border border-gray-700",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Last Login"}),s.jsx("p",{className:"text-lg font-semibold text-white",children:t.lastLogin})]})]}),e&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h4",{className:"text-lg font-semibold text-white",children:"AI Personalization & Adaptive UI"}),s.jsxs("label",{className:"flex items-center cursor-pointer",children:[s.jsx("span",{className:"mr-3 text-sm text-gray-400",children:"Enable AI Personalization"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only",checked:t.aiPersonalizationEnabled,onChange:i}),s.jsx("div",{className:`block w-10 h-6 rounded-full ${t.aiPersonalizationEnabled?"bg-cyan-600":"bg-gray-600"}`}),s.jsx("div",{className:`dot absolute left-1 top-1 bg-white w-4 h-4 rounded-full transition ${t.aiPersonalizationEnabled?"translate-x-full":""}`})]})]})]}),t.aiPersonalizationEnabled&&r.length>0?s.jsx("ul",{className:"list-disc list-inside text-gray-300 space-y-2 bg-gray-900 p-4 rounded-lg border border-gray-700",children:r.map((a,l)=>s.jsx("li",{className:"text-sm",children:a},l))}):t.aiPersonalizationEnabled?s.jsx("p",{className:"text-gray-500 italic bg-gray-900 p-4 rounded-lg border border-gray-700",children:"AI is learning your preferences to personalize your experience..."}):s.jsx("p",{className:"text-gray-500 italic",children:"Enable AI Personalization to get a tailored experience, adaptive dashboards, and smart recommendations."})]}),s.jsx("button",{className:"w-full py-2 bg-gray-700 hover:bg-gray-600 text-white rounded-lg text-sm",children:"Edit Profile Settings"})]})})},Z$t=({geminiApiKey:e})=>{const[t,n]=p.useState([]),[r,o]=p.useState([{id:1,name:"QuantumLeap Momentum",status:"Active",pnl:12530.55,asset:"BTC/USD"},{id:2,name:"ArbitrageAlpha",status:"Active",pnl:8740.12,asset:"ETH/USD"},{id:3,name:"MeanReversion Bot",status:"Inactive",pnl:-1230.78,asset:"SOL/USD"}]),[i,a]=p.useState([]);return p.useEffect(()=>{const l=setInterval(()=>{n(c=>{const d=(c.length>0?c[c.length-1].price:6e4)+(Math.random()-.5)*100;return[...c.slice(-99),{time:Date.now(),price:d}]}),Math.random()>.7&&a(c=>[{time:new Date().toLocaleTimeString(),type:Math.random()>.5?"BUY":"SELL",asset:"BTC/USD",price:6e4+(Math.random()-.5)*100,size:Math.random()*2},...c.slice(0,99)])},1e3);return()=>clearInterval(l)},[]),s.jsx(At,{title:"AI-Powered High-Frequency Trading",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[s.jsxs("div",{className:"h-80 bg-gray-900 rounded-lg p-4 border border-gray-700",children:[s.jsx("h4",{className:"text-lg font-semibold text-white mb-2",children:"Live Market Data (BTC/USD)"}),s.jsx(Oo,{width:"100%",height:"100%",children:s.jsxs(wm,{data:t,children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:"hftColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"5%",stopColor:"#06b6d4",stopOpacity:.8}),s.jsx("stop",{offset:"95%",stopColor:"#06b6d4",stopOpacity:0})]})}),s.jsx(Ei,{dataKey:"time",tickFormatter:l=>new Date(l).toLocaleTimeString(),stroke:"#9ca3af"}),s.jsx(Wo,{domain:["dataMin - 100","dataMax + 100"],stroke:"#9ca3af"}),s.jsx(Fo,{contentStyle:{backgroundColor:"rgba(31, 41, 55, 0.9)",borderColor:"#4b5563"}}),s.jsx(tu,{type:"monotone",dataKey:"price",stroke:"#06b6d4",fill:"url(#hftColor)"})]})})]}),s.jsxs("div",{className:"bg-gray-900 rounded-lg border border-gray-700",children:[s.jsx("h4",{className:"text-lg font-semibold text-white p-4",children:"Live Trade Log"}),s.jsx("div",{className:"overflow-y-auto h-64",children:s.jsxs("table",{className:"min-w-full divide-y divide-gray-700",children:[s.jsx("thead",{className:"bg-gray-800 sticky top-0",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-400 uppercase",children:"Time"}),s.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-400 uppercase",children:"Type"}),s.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-400 uppercase",children:"Asset"}),s.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-400 uppercase",children:"Price"}),s.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-400 uppercase",children:"Size"})]})}),s.jsx("tbody",{className:"divide-y divide-gray-800",children:i.map((l,c)=>s.jsxs("tr",{className:"hover:bg-gray-800/70",children:[s.jsx("td",{className:"px-4 py-2 text-sm text-gray-300",children:l.time}),s.jsx("td",{className:`px-4 py-2 text-sm font-bold ${l.type==="BUY"?"text-green-400":"text-red-400"}`,children:l.type}),s.jsx("td",{className:"px-4 py-2 text-sm text-white",children:l.asset}),s.jsx("td",{className:"px-4 py-2 text-sm text-gray-300",children:l.price.toFixed(2)}),s.jsx("td",{className:"px-4 py-2 text-sm text-gray-300",children:l.size.toFixed(4)})]},c))})]})})]})]}),s.jsxs("div",{className:"lg:col-span-1 space-y-6",children:[s.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 border border-gray-700",children:[s.jsx("h4",{className:"text-lg font-semibold text-white mb-2",children:"Trading Strategies"}),s.jsx("ul",{className:"space-y-2",children:r.map(l=>s.jsxs("li",{className:"p-3 bg-gray-800/50 rounded-lg",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"font-medium text-white",children:l.name}),s.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${l.status==="Active"?"bg-green-500/20 text-green-300":"bg-red-500/20 text-red-300"}`,children:l.status})]}),s.jsxs("p",{className:`text-lg font-bold ${l.pnl>=0?"text-green-400":"text-red-400"}`,children:["PNL: $",l.pnl.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]})]},l.id))}),s.jsx("button",{className:"w-full mt-4 py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg text-sm",children:"Deploy New Strategy"})]}),e&&s.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 border border-gray-700 space-y-3",children:[s.jsx("h4",{className:"text-lg font-semibold text-white",children:"AI Trade Signals & Insights"}),s.jsxs("ul",{className:"list-disc list-inside text-gray-300 text-sm space-y-2",children:[s.jsx("li",{children:"AI Signal: Strong buy signal for ETH/USD based on order book imbalance. Confidence: 92%."}),s.jsx("li",{children:"Market Anomaly: Unusual volume spike detected on SOL/USD. Potential for high volatility."}),s.jsx("li",{children:"Prediction: AI forecasts a 3% upward trend for BTC/USD in the next 60 minutes."})]}),s.jsx("button",{className:"w-full py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg text-sm",children:"Execute AI-Suggested Trades"})]})]})]})})},J$t=({geminiApiKey:e})=>s.jsx(At,{title:"AI-Powered Legal & Compliance",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"bg-gray-800/50 p-4 rounded-lg border border-gray-700",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Compliance Status"}),s.jsx("p",{className:"text-2xl font-bold text-green-400",children:"99.8% Compliant"})]}),s.jsxs("div",{className:"bg-gray-800/50 p-4 rounded-lg border border-gray-700",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Contracts Analyzed (24h)"}),s.jsx("p",{className:"text-2xl font-bold text-white",children:"12"})]}),s.jsxs("div",{className:"bg-gray-800/50 p-4 rounded-lg border border-gray-700",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Regulatory Alerts"}),s.jsx("p",{className:"text-2xl font-bold text-yellow-400",children:"3 Pending Review"})]})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 border border-gray-700 space-y-3",children:[s.jsx("h4",{className:"text-lg font-semibold text-white",children:"AI Contract Analysis"}),s.jsx("p",{className:"text-sm text-gray-400",children:"Upload a contract to have our AI analyze it for risks, non-standard clauses, and compliance issues."}),s.jsxs("div",{className:"p-4 border-2 border-dashed border-gray-600 rounded-lg text-center",children:[s.jsx("p",{className:"text-gray-400",children:"Drag & drop a document or click to upload"}),s.jsx("button",{className:"mt-2 py-1 px-3 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg text-sm",children:"Upload Contract"})]}),s.jsxs("p",{className:"text-sm text-gray-300",children:["Last analysis: ",s.jsx("span",{className:"font-mono",children:"MSA_Vendor_XYZ.pdf"})," - ",s.jsx("span",{className:"text-green-400",children:"No critical risks found."})]})]}),s.jsxs("div",{className:"bg-gray-900 rounded-lg p-4 border border-gray-700 space-y-3",children:[s.jsx("h4",{className:"text-lg font-semibold text-white",children:"Real-time Compliance Monitoring"}),s.jsxs("ul",{className:"space-y-2 text-sm",children:[s.jsxs("li",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-gray-300",children:"AML/KYC Checks"}),s.jsx("span",{className:"text-green-400",children:"Operational"})]}),s.jsxs("li",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-gray-300",children:"GDPR Data Handling"}),s.jsx("span",{className:"text-green-400",children:"Operational"})]}),s.jsxs("li",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-gray-300",children:"SEC Filing Deadlines"}),s.jsx("span",{className:"text-yellow-400",children:"Approaching"})]}),s.jsxs("li",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-gray-300",children:"OFAC Sanctions Screening"}),s.jsx("span",{className:"text-green-400",children:"Operational"})]})]}),s.jsx("button",{className:"w-full py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg text-sm",children:"View Full Compliance Report"})]})]})]})}),fVe=()=>{const e=p.useContext(Xi);if(!e)throw new Error("APIIntegrationView must be within a DataProvider.");const{apiStatus:t,geminiApiKey:n,setGeminiApiKey:r,modernTreasuryApiKey:o,setModernTreasuryApiKey:i,modernTreasuryOrganizationId:a,setModernTreasuryOrganizationId:l}=e,[c,u]=p.useState(!1),[d,f]=p.useState(n||""),[h,m]=p.useState(!1),[g,b]=p.useState(o||""),[y,v]=p.useState(a||""),[x,S]=p.useState(!1),[C,_]=p.useState(""),[N,E]=p.useState(""),[I,A]=p.useState(!1),[R,k]=p.useState(""),[T,D]=p.useState("system"),O=()=>{r(d),u(!1)},z=()=>{i(g),l(y),m(!1)},F=()=>{S(!1)},U=()=>{A(!1)},G=()=>{switch(T){case"system":return s.jsxs("div",{className:"space-y-6",children:[s.jsx(At,{title:"Core System & API Status Overview",children:s.jsx("div",{className:"space-y-3",children:t.map(W=>s.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-center p-3 bg-gray-800/50 rounded-lg",children:[s.jsx("h4",{className:"font-semibold text-lg text-white mb-2 sm:mb-0",children:W.provider}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("p",{className:"text-sm text-gray-400 font-mono",children:[W.responseTime,"ms"]}),s.jsx(kk,{status:W.status}),W.provider==="Google Gemini"&&s.jsx("button",{onClick:()=>{f(n||""),u(!0)},className:"text-gray-400 hover:text-white",children:s.jsx($M,{className:"h-5 w-5"})}),W.provider==="Modern Treasury"&&s.jsx("button",{onClick:()=>{b(o||""),v(a||""),m(!0)},className:"text-gray-400 hover:text-white",children:s.jsx($M,{className:"h-5 w-5"})})]})]},W.provider))})}),s.jsx(At,{title:"Simulated Live API Traffic",children:s.jsx("div",{className:"h-48",children:s.jsx(Oo,{width:"100%",height:"100%",children:s.jsxs(wm,{data:Array.from({length:20},(W,Y)=>({name:Y,calls:50+Math.random()*50})),children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:"apiColor",x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"5%",stopColor:"#06b6d4",stopOpacity:.8}),s.jsx("stop",{offset:"95%",stopColor:"#06b6d4",stopOpacity:0})]})}),s.jsx(Fo,{contentStyle:{backgroundColor:"rgba(31, 41, 55, 0.8)",borderColor:"#4b5563"}}),s.jsx(tu,{type:"monotone",dataKey:"calls",stroke:"#06b6d4",fill:"url(#apiColor)"})]})})})}),s.jsx(W$t,{apiStatus:t,geminiApiKey:n,onConfigurePlaid:()=>S(!0),onConfigureStripe:()=>A(!0)})]});case"finance":return s.jsx(q$t,{modernTreasuryApiKey:o,modernTreasuryOrganizationId:a,geminiApiKey:n});case"hft":return s.jsx(Z$t,{geminiApiKey:n});case"bi":return s.jsx(K$t,{geminiApiKey:n});case"automation":return s.jsx(Y$t,{geminiApiKey:n});case"legal":return s.jsx(J$t,{geminiApiKey:n});case"profile":return s.jsx(X$t,{geminiApiKey:n});case"chat":return s.jsx(G$t,{geminiApiKey:n});default:return null}};return s.jsxs(s.Fragment,{children:[x&&s.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 backdrop-blur-sm",onClick:()=>S(!1),children:s.jsxs("div",{className:"bg-gray-800 rounded-lg shadow-2xl max-w-md w-full border border-gray-700",onClick:W=>W.stopPropagation(),children:[s.jsx("div",{className:"p-4 border-b border-gray-700",children:s.jsx("h3",{className:"text-lg font-semibold text-white",children:"Configure Plaid API"})}),s.jsxs("div",{className:"p-6 space-y-4",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Enter your Plaid Client ID and Secret to enable financial data aggregation. Your credentials are stored locally."}),s.jsx("input",{type:"text",value:C,onChange:W=>_(W.target.value),placeholder:"Enter your Plaid Client ID",className:"w-full bg-gray-700/50 border border-gray-600 rounded-lg px-3 py-2 text-white focus:outline-none focus:ring-1 focus:ring-cyan-500"}),s.jsx("input",{type:"password",value:N,onChange:W=>E(W.target.value),placeholder:"Enter your Plaid Secret",className:"w-full bg-gray-700/50 border border-gray-600 rounded-lg px-3 py-2 text-white focus:outline-none focus:ring-1 focus:ring-cyan-500"}),s.jsx("button",{onClick:F,className:"w-full py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg",children:"Save Credentials"})]})]})}),I&&s.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 backdrop-blur-sm",onClick:()=>A(!1),children:s.jsxs("div",{className:"bg-gray-800 rounded-lg shadow-2xl max-w-md w-full border border-gray-700",onClick:W=>W.stopPropagation(),children:[s.jsx("div",{className:"p-4 border-b border-gray-700",children:s.jsx("h3",{className:"text-lg font-semibold text-white",children:"Configure Stripe API Key"})}),s.jsxs("div",{className:"p-6 space-y-4",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Enter your API key to enable payment processing. Your key is stored locally in your browser and is not sent to our servers."}),s.jsx("input",{type:"password",value:R,onChange:W=>k(W.target.value),placeholder:"Enter your Stripe API Key",className:"w-full bg-gray-700/50 border border-gray-600 rounded-lg px-3 py-2 text-white focus:outline-none focus:ring-1 focus:ring-cyan-500"}),s.jsx("button",{onClick:U,className:"w-full py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg",children:"Save Key"})]})]})}),c&&s.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 backdrop-blur-sm",onClick:()=>u(!1),children:s.jsxs("div",{className:"bg-gray-800 rounded-lg shadow-2xl max-w-md w-full border border-gray-700",onClick:W=>W.stopPropagation(),children:[s.jsx("div",{className:"p-4 border-b border-gray-700",children:s.jsx("h3",{className:"text-lg font-semibold text-white",children:"Configure Google Gemini API Key"})}),s.jsxs("div",{className:"p-6 space-y-4",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Enter your API key to enable all AI features. Your key is stored locally in your browser and is not sent to our servers."}),s.jsx("input",{type:"password",value:d,onChange:W=>f(W.target.value),placeholder:"Enter your Gemini API Key",className:"w-full bg-gray-700/50 border border-gray-600 rounded-lg px-3 py-2 text-white focus:outline-none focus:ring-1 focus:ring-cyan-500"}),s.jsx("button",{onClick:O,className:"w-full py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg",children:"Save Key"})]})]})}),h&&s.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 backdrop-blur-sm",onClick:()=>m(!1),children:s.jsxs("div",{className:"bg-gray-800 rounded-lg shadow-2xl max-w-md w-full border border-gray-700",onClick:W=>W.stopPropagation(),children:[s.jsx("div",{className:"p-4 border-b border-gray-700",children:s.jsx("h3",{className:"text-lg font-semibold text-white",children:"Configure Modern Treasury API"})}),s.jsxs("div",{className:"p-6 space-y-4",children:[s.jsx("p",{className:"text-sm text-gray-400",children:"Enter your API key and Organization ID to enable payment operations. Your credentials are stored locally."}),s.jsx("input",{type:"password",value:g,onChange:W=>b(W.target.value),placeholder:"Enter your Modern Treasury API Key",className:"w-full bg-gray-700/50 border border-gray-600 rounded-lg px-3 py-2 text-white focus:outline-none focus:ring-1 focus:ring-cyan-500"}),s.jsx("input",{type:"text",value:y,onChange:W=>v(W.target.value),placeholder:"Enter your Organization ID",className:"w-full bg-gray-700/50 border border-gray-600 rounded-lg px-3 py-2 text-white focus:outline-none focus:ring-1 focus:ring-cyan-500"}),s.jsx("button",{onClick:z,className:"w-full py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-lg",children:"Save Credentials"})]})]})}),s.jsxs("div",{className:"space-y-6",children:[s.jsx("h2",{className:"text-3xl font-bold text-white tracking-wider",children:"Enterprise Operating System Dashboard"}),s.jsx("div",{className:"border-b border-gray-700 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto","aria-label":"Main Tabs",children:["system","finance","hft","bi","automation","legal","profile","chat"].map(W=>s.jsx("button",{onClick:()=>D(W),className:`whitespace-nowrap py-3 px-1 border-b-2 font-medium text-sm capitalize transition-colors duration-200 ${T===W?"border-cyan-500 text-cyan-400":"border-transparent text-gray-400 hover:text-gray-200 hover:border-gray-300"}`,children:W.replace("-"," ")},W))})}),G()]})]})},Q$t=Object.freeze(Object.defineProperty({__proto__:null,default:fVe},Symbol.toStringTag,{value:"Module"}));async function eFt(e,t){return console.log(`Fetching details for customer ${e}, account ${t}`),await new Promise(n=>setTimeout(n,800)),{id:t,name:"Super Checking",accountNumberDisplay:"...5015",type:"checking",status:"active",balance:1234.56,balanceDate:Math.floor(Date.now()/1e3)-86400,customerId:e,institutionId:"102105",institutionLoginId:1007302745,createdDate:Math.floor(Date.now()/1e3)-86400*90,currency:"USD",detail:{availableBalanceAmount:1150.23,openDate:Math.floor(Date.now()/1e3)-86400*365,interestRate:"0.01"}}}async function tFt(e,t){console.log(`Fetching transactions for customer ${e}, account ${t}`),await new Promise(i=>setTimeout(i,1200));const n=[];let r=1234.56;const o=Math.floor(Date.now()/1e3);for(let i=0;i<90;i++){const a=(Math.random()-.5)*200;r-=a,n.push({id:1e8+i,amount:-a,postedDate:o-86400*(i+1),description:a>0?`Deposit #${i}`:`Purchase at Merchant #${i}`,runningBalanceAmount:r})}return n.reverse()}const lY=({children:e,className:t})=>s.jsx("div",{className:`bg-white shadow-md rounded-lg p-6 ${t}`,children:e}),Vc=({variant:e,children:t,className:n})=>{const r={h4:"text-2xl font-bold mb-2 text-gray-800",h6:"text-lg font-semibold mb-1 text-gray-700",subtitle1:"text-md font-medium text-gray-600",body1:"text-base text-gray-700",body2:"text-sm text-gray-500"};return s.jsx("p",{className:`${r[e]} ${n}`,children:t})},nFt=()=>s.jsx("div",{className:"flex justify-center items-center h-64",children:s.jsx("div",{className:"animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-blue-500"})}),J2e=({severity:e,children:t})=>{const n=e==="error",r=n?"bg-red-100 border-red-400 text-red-700":"bg-yellow-100 border-yellow-400 text-yellow-700";return s.jsxs("div",{className:`${r} border px-4 py-3 rounded relative`,role:"alert",children:[s.jsxs("strong",{className:"font-bold",children:[n?"Error:":"Warning:"," "]}),s.jsx("span",{className:"block sm:inline",children:t})]})},qH=({customerId:e,accountId:t})=>{var f,h,m;const[n,r]=p.useState(null),[o,i]=p.useState([]),[a,l]=p.useState(!0),[c,u]=p.useState(null);p.useEffect(()=>{e&&t&&(async()=>{l(!0),u(null);try{const[b,y]=await Promise.all([eFt(e,t),tFt(e,t)]);if(r(b),(y==null?void 0:y.length)>0){const v=y.filter(C=>C.runningBalanceAmount!==void 0).map(C=>({timestamp:C.postedDate*1e3,date:new Date(C.postedDate*1e3).toLocaleDateString("en-CA"),balance:C.runningBalanceAmount}));b.balance!==void 0&&b.balanceDate&&v.push({timestamp:b.balanceDate*1e3,date:new Date(b.balanceDate*1e3).toLocaleDateString("en-CA"),balance:b.balance});const x=Array.from(v.reduce((C,_)=>C.set(_.date,_),new Map).values());x.sort((C,_)=>C.timestamp-_.timestamp);const S=x.map(C=>({date:new Date(C.timestamp).toLocaleDateString("en-US",{month:"short",day:"numeric"}),balance:C.balance}));i(S)}else i([])}catch(b){u("Failed to fetch account details. Please try again."),console.error(b)}finally{l(!1)}})()},[e,t]);const d=g=>new Intl.NumberFormat("en-US",{style:"currency",currency:(n==null?void 0:n.currency)||"USD"}).format(g);return a?s.jsx(nFt,{}):c?s.jsx(J2e,{severity:"error",children:c}):n?s.jsxs("div",{className:"space-y-6 p-4 bg-gray-50 min-h-screen",children:[s.jsx(Vc,{variant:"h4",children:n.name}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs(lY,{className:"md:col-span-1",children:[s.jsx(Vc,{variant:"h6",className:"border-b pb-2 mb-4",children:"Account Summary"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(Vc,{variant:"body2",children:"Account Number"}),s.jsx(Vc,{variant:"body1",children:n.accountNumberDisplay})]}),s.jsxs("div",{children:[s.jsx(Vc,{variant:"body2",children:"Account Type"}),s.jsx(Vc,{variant:"body1",className:"capitalize",children:n.type})]}),s.jsxs("div",{children:[s.jsx(Vc,{variant:"body2",children:"Status"}),s.jsx(Vc,{variant:"body1",className:"capitalize",children:n.status})]}),s.jsxs("div",{children:[s.jsx(Vc,{variant:"body2",children:"Account Opened"}),s.jsx(Vc,{variant:"body1",children:new Date(n.createdDate*1e3).toLocaleDateString()})]})]})]}),s.jsxs(lY,{className:"md:col-span-2",children:[s.jsx(Vc,{variant:"h6",className:"border-b pb-2 mb-4",children:"Balance Details"}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(Vc,{variant:"body2",children:"Current Balance"}),s.jsx(Vc,{variant:"h6",className:"text-green-600",children:d(n.balance||0)}),s.jsxs(Vc,{variant:"body2",children:["as of ",new Date((n.balanceDate||0)*1e3).toLocaleDateString()]})]}),((f=n.detail)==null?void 0:f.availableBalanceAmount)!==void 0&&s.jsxs("div",{children:[s.jsx(Vc,{variant:"body2",children:"Available Balance"}),s.jsx(Vc,{variant:"h6",children:d(n.detail.availableBalanceAmount)})]}),((h=n.detail)==null?void 0:h.interestRate)&&s.jsxs("div",{children:[s.jsx(Vc,{variant:"body2",children:"Interest Rate"}),s.jsxs(Vc,{variant:"body1",children:[n.detail.interestRate,"%"]})]}),((m=n.detail)==null?void 0:m.creditMaxAmount)&&s.jsxs("div",{children:[s.jsx(Vc,{variant:"body2",children:"Credit Limit"}),s.jsx(Vc,{variant:"body1",children:d(n.detail.creditMaxAmount)})]})]})]})]}),s.jsxs(lY,{children:[s.jsx(Vc,{variant:"h6",className:"mb-4",children:"Balance History (Last 90 Days)"}),o.length>0?s.jsx(Oo,{width:"100%",height:400,children:s.jsxs(Mg,{data:o,margin:{top:5,right:20,left:20,bottom:5},children:[s.jsx(Ea,{strokeDasharray:"3 3"}),s.jsx(Ei,{dataKey:"date"}),s.jsx(Wo,{tickFormatter:g=>d(Number(g)),domain:["dataMin","dataMax"]}),s.jsx(Fo,{formatter:g=>[d(Number(g)),"Balance"]}),s.jsx(yl,{}),s.jsx(us,{type:"monotone",dataKey:"balance",stroke:"#3b82f6",activeDot:{r:8},strokeWidth:2})]})}):s.jsx("div",{className:"text-center p-8 text-gray-500",children:s.jsx(Vc,{variant:"body1",children:"No balance history data available to display."})})]})]}):s.jsx(J2e,{severity:"warning",children:"No account data available."})},rFt=Object.freeze(Object.defineProperty({__proto__:null,default:qH},Symbol.toStringTag,{value:"Module"})),oFt=(e,t)=>typeof e!="number"?"N/A":new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e),iFt=e=>typeof e!="number"?"N/A":new Date(e*1e3).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),aFt=e=>{switch(e==null?void 0:e.toLowerCase()){case"active":return"text-green-800 bg-green-100";case"pending":return"text-yellow-800 bg-yellow-100";default:return"text-gray-800 bg-gray-100"}},KH=({accounts:e,isLoading:t,error:n,onAccountSelect:r})=>t?s.jsxs("div",{className:"flex justify-center items-center p-10 bg-gray-50 rounded-lg",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-indigo-600"}),s.jsx("span",{className:"ml-4 text-lg text-gray-600",children:"Loading Accounts..."})]}):n?s.jsxs("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 rounded-md",role:"alert",children:[s.jsx("p",{className:"font-bold",children:"An Error Occurred"}),s.jsx("p",{children:n})]}):!e||e.length===0?s.jsxs("div",{className:"text-center py-12 px-6 bg-gray-50 rounded-lg border-2 border-dashed border-gray-300",children:[s.jsx("svg",{className:"mx-auto h-12 w-12 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:s.jsx("path",{vectorEffect:"non-scaling-stroke",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M3 14h18m-9-4v8m-7 0h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),s.jsx("h3",{className:"mt-2 text-lg font-medium text-gray-900",children:"No Linked Accounts"}),s.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Get started by linking a financial account."})]}):s.jsx("div",{className:"bg-white shadow-sm overflow-hidden sm:rounded-lg",children:s.jsx("ul",{role:"list",className:"divide-y divide-gray-200",children:e.map(o=>s.jsx("li",{onClick:()=>r&&r(o.id),className:`block transition duration-150 ease-in-out ${r?"hover:bg-gray-50 cursor-pointer":""}`,children:s.jsx("div",{className:"px-4 py-4 sm:px-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"truncate pr-4",children:[s.jsxs("div",{className:"flex items-baseline text-sm",children:[s.jsx("p",{className:"font-medium text-indigo-600 truncate",children:o.name}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ml-3 ${aFt(o.status)}`,children:o.status.charAt(0).toUpperCase()+o.status.slice(1)})]}),s.jsxs("div",{className:"mt-2 flex items-center text-sm text-gray-500",children:[s.jsx("p",{className:"capitalize",children:o.type.replace(/([A-Z])/g," $1")}),s.jsx("span",{className:"mx-2","aria-hidden":"true",children:"·"}),s.jsxs("p",{children:["ending in ",o.accountNumberDisplay.slice(-4)]})]})]}),s.jsxs("div",{className:"ml-5 flex-shrink-0 text-right",children:[s.jsx("p",{className:"text-lg font-semibold text-gray-900",children:oFt(o.balance,o.currency)}),o.balanceDate&&s.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["As of ",iFt(o.balanceDate)]})]})]})})},o.id))})}),sFt=Object.freeze(Object.defineProperty({__proto__:null,default:KH},Symbol.toStringTag,{value:"Module"}));function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const o=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,l=a(r);return typeof l=="function"?l:()=>{a(null)}}return i.current=r,()=>{i.current=null}});return()=>{o.forEach(i=>i==null?void 0:i())}},e);return p.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const wa=typeof window<"u"?p.useLayoutEffect:p.useEffect;function no(e){const t=p.useRef(e);return wa(()=>{t.current=e}),p.useRef((...n)=>(0,t.current)(...n)).current}function Vx(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Nb="$$material";function lFt(e){if(e.sheet)return e.sheet;for(var t=0;t0?wf(BI,--Th):0,bP--,Uu===10&&(bP=1,XH--),Uu}function Sm(){return Uu=Th2||BM(Uu)>3?"":" "}function wFt(e,t){for(;--t&&Sm()&&!(Uu<48||Uu>102||Uu>57&&Uu<65||Uu>70&&Uu<97););return rO(e,r8()+(t<6&&Eb()==32&&Sm()==32))}function Ate(e){for(;Sm();)switch(Uu){case e:return Th;case 34:case 39:e!==34&&e!==39&&Ate(Uu);break;case 40:e===41&&Ate(e);break;case 92:Sm();break}return Th}function SFt(e,t){for(;Sm()&&e+Uu!==57;)if(e+Uu===84&&Eb()===47)break;return"/*"+rO(t,Th-1)+"*"+YH(e===47?e:Sm())}function CFt(e){for(;!BM(Eb());)Sm();return rO(e,Th)}function _Ft(e){return bVe(i8("",null,null,null,[""],e=yVe(e),0,[0],e))}function i8(e,t,n,r,o,i,a,l,c){for(var u=0,d=0,f=a,h=0,m=0,g=0,b=1,y=1,v=1,x=0,S="",C=o,_=i,N=r,E=S;y;)switch(g=x,x=Sm()){case 40:if(g!=108&&wf(E,f-1)==58){Ite(E+=Ka(o8(x),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:E+=o8(x);break;case 9:case 10:case 13:case 32:E+=xFt(g);break;case 92:E+=wFt(r8()-1,7);continue;case 47:switch(Eb()){case 42:case 47:HL(jFt(SFt(Sm(),r8()),t,n),c);break;default:E+="/"}break;case 123*b:l[u++]=sb(E)*v;case 125*b:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+d:v==-1&&(E=Ka(E,/\f/g,"")),m>0&&sb(E)-f&&HL(m>32?e_e(E+";",r,n,f-1):e_e(Ka(E," ","")+";",r,n,f-2),c);break;case 59:E+=";";default:if(HL(N=Q2e(E,t,n,u,d,o,l,S,C=[],_=[],f),i),x===123)if(d===0)i8(E,t,N,N,C,i,f,l,_);else switch(h===99&&wf(E,3)===110?100:h){case 100:case 108:case 109:case 115:i8(e,N,N,r&&HL(Q2e(e,N,N,0,0,o,l,S,o,C=[],f),_),o,_,f,l,r?C:_);break;default:i8(E,N,N,N,[""],_,0,l,_)}}u=d=m=0,b=v=1,S=E="",f=a;break;case 58:f=1+sb(E),m=g;default:if(b<1){if(x==123)--b;else if(x==125&&b++==0&&vFt()==125)continue}switch(E+=YH(x),x*b){case 38:v=d>0?1:(E+="\f",-1);break;case 44:l[u++]=(sb(E)-1)*v,v=1;break;case 64:Eb()===45&&(E+=o8(Sm())),h=Eb(),d=f=sb(S=E+=CFt(r8())),x++;break;case 45:g===45&&sb(E)==2&&(b=0)}}return i}function Q2e(e,t,n,r,o,i,a,l,c,u,d){for(var f=o-1,h=o===0?i:[""],m=que(h),g=0,b=0,y=0;g0?h[v]+" "+x:Ka(x,/&\f/g,h[v])))&&(c[y++]=S);return ZH(e,t,n,o===0?Gue:l,c,u,d)}function jFt(e,t,n){return ZH(e,t,n,pVe,YH(bFt()),FM(e,2,-2),0)}function e_e(e,t,n,r){return ZH(e,t,n,Wue,FM(e,0,r),FM(e,r+1,-1),r)}function C5(e,t){for(var n="",r=que(e),o=0;o6)switch(wf(e,t+1)){case 109:if(wf(e,t+4)!==45)break;case 102:return Ka(e,/(.+:)(.+)-([^]+)/,"$1"+Wa+"$2-$3$1"+NB+(wf(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ite(e,"stretch")?xVe(Ka(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(wf(e,t+1)!==115)break;case 6444:switch(wf(e,sb(e)-3-(~Ite(e,"!important")&&10))){case 107:return Ka(e,":",":"+Wa)+e;case 101:return Ka(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Wa+(wf(e,14)===45?"inline-":"")+"box$3$1"+Wa+"$2$3$1"+Xf+"$2box$3")+e}break;case 5936:switch(wf(e,t+11)){case 114:return Wa+e+Xf+Ka(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Wa+e+Xf+Ka(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Wa+e+Xf+Ka(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Wa+e+Xf+e+e}return e}var RFt=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case Wue:t.return=xVe(t.value,t.length);break;case hVe:return C5([jT(t,{value:Ka(t.value,"@","@"+Wa)})],o);case Gue:if(t.length)return yFt(t.props,function(i){switch(gFt(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return C5([jT(t,{props:[Ka(i,/:(read-\w+)/,":"+NB+"$1")]})],o);case"::placeholder":return C5([jT(t,{props:[Ka(i,/:(plac\w+)/,":"+Wa+"input-$1")]}),jT(t,{props:[Ka(i,/:(plac\w+)/,":"+NB+"$1")]}),jT(t,{props:[Ka(i,/:(plac\w+)/,Xf+"input-$1")]})],o)}return""})}},OFt=[RFt],DFt=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(b){var y=b.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(b),b.setAttribute("data-s",""))})}var o=t.stylisPlugins||OFt,i={},a,l=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(b){for(var y=b.getAttribute("data-emotion").split(" "),v=1;v=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var HFt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},VFt=/[A-Z]|^ms/g,UFt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,SVe=function(t){return t.charCodeAt(1)===45},i_e=function(t){return t!=null&&typeof t!="boolean"},dY=vVe(function(e){return SVe(e)?e:e.replace(VFt,"-$&").toLowerCase()}),a_e=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(UFt,function(r,o,i){return lb={name:o,styles:i,next:lb},o})}return HFt[t]!==1&&!SVe(t)&&typeof n=="number"&&n!==0?n+"px":n};function zM(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return lb={name:o.name,styles:o.styles,next:lb},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)lb={name:a.name,styles:a.styles,next:lb},a=a.next;var l=i.styles+";";return l}return GFt(e,t,n)}case"function":{if(e!==void 0){var c=lb,u=n(e);return lb=c,zM(e,t,u)}break}}var d=n;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function GFt(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o96?e8t:t8t},u_e=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(a){return t.__emotion_forwardProp(a)&&i(a)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},n8t=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Kue(n,r,o),_Ve(function(){return Yue(n,r,o)}),null},r8t=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,a;n!==void 0&&(i=n.label,a=n.target);var l=u_e(t,n,r),c=l||c_e(o),u=!c("as");return function(){var d=arguments,f=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&f.push("label:"+i+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var h=d[0];f.push(h[0]);for(var m=d.length,g=1;gt(c8t(o)?n:o):t;return s.jsx(ZFt,{styles:r})}function EVe(e,t){return EB(e,t)}function u8t(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const h_e=[];function dS(e){return h_e[0]=e,oO(h_e)}function fb(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function PVe(e){if(p.isValidElement(e)||Mue.isValidElementType(e)||!fb(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=PVe(e[n])}),t}function Qd(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return fb(e)&&fb(t)&&Object.keys(t).forEach(o=>{p.isValidElement(t[o])||Mue.isValidElementType(t[o])?r[o]=t[o]:fb(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&fb(e[o])?r[o]=Qd(e[o],t[o],n):n.clone?r[o]=fb(t[o])?PVe(t[o]):t[o]:r[o]=t[o]}),r}const d8t=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function f8t(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=d8t(t),a=Object.keys(i);function l(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function c(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function u(h,m){const g=a.indexOf(m);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:m)-r/100}${n})`}function d(h){return a.indexOf(h)+1r.startsWith("@container")).sort((r,o)=>{var a,l;const i=/min-width:\s*([0-9.]+)/;return+(((a=r.match(i))==null?void 0:a[1])||0)-+(((l=o.match(i))==null?void 0:l[1])||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function p8t(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function h8t(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function m8t(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...l)=>t(e.breakpoints.up(...l),a),i.down=(...l)=>t(e.breakpoints.down(...l),a),i.between=(...l)=>t(e.breakpoints.between(...l),a),i.only=(...l)=>t(e.breakpoints.only(...l),a),i.not=(...l)=>{const c=t(e.breakpoints.not(...l),a);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const g8t={borderRadius:4};function h4(e,t){return t?Qd(e,t,{clone:!1}):e}const JH={xs:0,sm:600,md:900,lg:1200,xl:1536},g_e={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${JH[e]}px)`},y8t={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:JH[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function J0(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||g_e;return t.reduce((a,l,c)=>(a[i.up(i.keys[c])]=n(t[c]),a),{})}if(typeof t=="object"){const i=r.breakpoints||g_e;return Object.keys(t).reduce((a,l)=>{if(p8t(i.keys,l)){const c=h8t(r.containerQueries?r:y8t,l);c&&(a[c]=n(t[l],l))}else if(Object.keys(i.values||JH).includes(l)){const c=i.up(l);a[c]=n(t[l],l)}else{const c=l;a[c]=t[c]}return a},{})}return n(t)}function IVe(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function kte(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function b8t(e,...t){const n=IVe(e),r=[n,...t].reduce((o,i)=>Qd(o,i),{});return kte(Object.keys(n),r)}function v8t(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i{e[o]!=null&&(n[o]=!0)}),n}function mY({values:e,breakpoints:t,base:n}){const r=n||v8t(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((a,l,c)=>(Array.isArray(e)?(a[l]=e[c]!=null?e[c]:e[i],i=c):typeof e=="object"?(a[l]=e[l]!=null?e[l]:e[i],i=l):a[l]=e,a),{})}function _n(e){if(typeof e!="string")throw new Error(Vx(7));return e.charAt(0).toUpperCase()+e.slice(1)}function cb(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function PB(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=cb(e,n)||r,t&&(o=t(o,r,e)),o}function ku(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const l=a[t],c=a.theme,u=cb(c,r)||{};return J0(a,l,f=>{let h=PB(u,o,f);return f===h&&typeof f=="string"&&(h=PB(u,o,`${t}${f==="default"?"":_n(f)}`,f)),n===!1?h:{[n]:h}})};return i.propTypes={},i.filterProps=[t],i}function x8t(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const w8t={m:"margin",p:"padding"},S8t={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},y_e={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},C8t=x8t(e=>{if(e.length>2)if(y_e[e])e=y_e[e];else return[e];const[t,n]=e.split(""),r=w8t[t],o=S8t[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),Jue=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Que=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Jue,...Que];function iO(e,t,n,r){const o=cb(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?o.startsWith("var(")&&i===0?0:o.startsWith("var(")&&i===1?o:`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i),l=o[a];return i>=0?l:typeof l=="number"?-l:typeof l=="string"&&l.startsWith("var(")?`calc(-1 * ${l})`:`-${l}`}:typeof o=="function"?o:()=>{}}function QH(e){return iO(e,"spacing",8)}function A_(e,t){return typeof t=="string"||t==null?t:e(t)}function _8t(e,t){return n=>e.reduce((r,o)=>(r[o]=A_(t,n),r),{})}function j8t(e,t,n,r){if(!t.includes(n))return null;const o=C8t(n),i=_8t(o,r),a=e[n];return J0(e,a,i)}function AVe(e,t){const n=QH(e.theme);return Object.keys(e).map(r=>j8t(e,t,r,n)).reduce(h4,{})}function Uc(e){return AVe(e,Jue)}Uc.propTypes={};Uc.filterProps=Jue;function Gc(e){return AVe(e,Que)}Gc.propTypes={};Gc.filterProps=Que;function TVe(e=8,t=QH({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function eV(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?h4(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function pg(e){return typeof e!="number"?e:`${e}px solid`}function Gg(e,t){return ku({prop:e,themeKey:"borders",transform:t})}const N8t=Gg("border",pg),E8t=Gg("borderTop",pg),P8t=Gg("borderRight",pg),I8t=Gg("borderBottom",pg),A8t=Gg("borderLeft",pg),T8t=Gg("borderColor"),k8t=Gg("borderTopColor"),M8t=Gg("borderRightColor"),R8t=Gg("borderBottomColor"),O8t=Gg("borderLeftColor"),D8t=Gg("outline",pg),L8t=Gg("outlineColor"),tV=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=iO(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:A_(t,r)});return J0(e,e.borderRadius,n)}return null};tV.propTypes={};tV.filterProps=["borderRadius"];eV(N8t,E8t,P8t,I8t,A8t,T8t,k8t,M8t,R8t,O8t,tV,D8t,L8t);const nV=e=>{if(e.gap!==void 0&&e.gap!==null){const t=iO(e.theme,"spacing",8),n=r=>({gap:A_(t,r)});return J0(e,e.gap,n)}return null};nV.propTypes={};nV.filterProps=["gap"];const rV=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=iO(e.theme,"spacing",8),n=r=>({columnGap:A_(t,r)});return J0(e,e.columnGap,n)}return null};rV.propTypes={};rV.filterProps=["columnGap"];const oV=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=iO(e.theme,"spacing",8),n=r=>({rowGap:A_(t,r)});return J0(e,e.rowGap,n)}return null};oV.propTypes={};oV.filterProps=["rowGap"];const $8t=ku({prop:"gridColumn"}),F8t=ku({prop:"gridRow"}),B8t=ku({prop:"gridAutoFlow"}),z8t=ku({prop:"gridAutoColumns"}),H8t=ku({prop:"gridAutoRows"}),V8t=ku({prop:"gridTemplateColumns"}),U8t=ku({prop:"gridTemplateRows"}),G8t=ku({prop:"gridTemplateAreas"}),W8t=ku({prop:"gridArea"});eV(nV,rV,oV,$8t,F8t,B8t,z8t,H8t,V8t,U8t,G8t,W8t);function _5(e,t){return t==="grey"?t:e}const q8t=ku({prop:"color",themeKey:"palette",transform:_5}),K8t=ku({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:_5}),Y8t=ku({prop:"backgroundColor",themeKey:"palette",transform:_5});eV(q8t,K8t,Y8t);function dm(e){return e<=1&&e!==0?`${e*100}%`:e}const X8t=ku({prop:"width",transform:dm}),ede=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,i,a,l,c;const r=((a=(i=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:a[n])||JH[n];return r?((c=(l=e.theme)==null?void 0:l.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:dm(n)}};return J0(e,e.maxWidth,t)}return null};ede.filterProps=["maxWidth"];const Z8t=ku({prop:"minWidth",transform:dm}),J8t=ku({prop:"height",transform:dm}),Q8t=ku({prop:"maxHeight",transform:dm}),e7t=ku({prop:"minHeight",transform:dm});ku({prop:"size",cssProperty:"width",transform:dm});ku({prop:"size",cssProperty:"height",transform:dm});const t7t=ku({prop:"boxSizing"});eV(X8t,ede,Z8t,J8t,Q8t,e7t,t7t);const aO={border:{themeKey:"borders",transform:pg},borderTop:{themeKey:"borders",transform:pg},borderRight:{themeKey:"borders",transform:pg},borderBottom:{themeKey:"borders",transform:pg},borderLeft:{themeKey:"borders",transform:pg},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:pg},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:tV},color:{themeKey:"palette",transform:_5},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:_5},backgroundColor:{themeKey:"palette",transform:_5},p:{style:Gc},pt:{style:Gc},pr:{style:Gc},pb:{style:Gc},pl:{style:Gc},px:{style:Gc},py:{style:Gc},padding:{style:Gc},paddingTop:{style:Gc},paddingRight:{style:Gc},paddingBottom:{style:Gc},paddingLeft:{style:Gc},paddingX:{style:Gc},paddingY:{style:Gc},paddingInline:{style:Gc},paddingInlineStart:{style:Gc},paddingInlineEnd:{style:Gc},paddingBlock:{style:Gc},paddingBlockStart:{style:Gc},paddingBlockEnd:{style:Gc},m:{style:Uc},mt:{style:Uc},mr:{style:Uc},mb:{style:Uc},ml:{style:Uc},mx:{style:Uc},my:{style:Uc},margin:{style:Uc},marginTop:{style:Uc},marginRight:{style:Uc},marginBottom:{style:Uc},marginLeft:{style:Uc},marginX:{style:Uc},marginY:{style:Uc},marginInline:{style:Uc},marginInlineStart:{style:Uc},marginInlineEnd:{style:Uc},marginBlock:{style:Uc},marginBlockStart:{style:Uc},marginBlockEnd:{style:Uc},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:nV},rowGap:{style:oV},columnGap:{style:rV},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:dm},maxWidth:{style:ede},minWidth:{transform:dm},height:{transform:dm},maxHeight:{transform:dm},minHeight:{transform:dm},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function n7t(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function r7t(e,t){return typeof e=="function"?e(t):e}function o7t(){function e(n,r,o,i){const a={[n]:r,theme:o},l=i[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:d,style:f}=l;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=cb(o,u)||{};return f?f(a):J0(a,r,g=>{let b=PB(h,d,g);return g===b&&typeof g=="string"&&(b=PB(h,d,`${n}${g==="default"?"":_n(g)}`,g)),c===!1?b:{[c]:b}})}function t(n){const{sx:r,theme:o={},nested:i}=n||{};if(!r)return null;const a=o.unstable_sxConfig??aO;function l(c){let u=c;if(typeof c=="function")u=c(o);else if(typeof c!="object")return c;if(!u)return null;const d=IVe(o.breakpoints),f=Object.keys(d);let h=d;return Object.keys(u).forEach(m=>{const g=r7t(u[m],o);if(g!=null)if(typeof g=="object")if(a[m])h=h4(h,e(m,g,o,a));else{const b=J0({theme:o},g,y=>({[m]:y}));n7t(b,g)?h[m]=t({sx:g,theme:o,nested:!0}):h=h4(h,b)}else h=h4(h,e(m,g,o,a))}),!i&&o.modularCssLayers?{"@layer sx":m_e(o,kte(f,h))}:m_e(o,kte(f,h))}return Array.isArray(r)?r.map(l):l(r)}return t}const OS=o7t();OS.filterProps=["sx"];function i7t(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function HI(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,l=f8t(n),c=TVe(o);let u=Qd({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...g8t,...i}},a);return u=m8t(u),u.applyStyles=i7t,u=t.reduce((d,f)=>Qd(d,f),u),u.unstable_sxConfig={...aO,...a==null?void 0:a.unstable_sxConfig},u.unstable_sx=function(f){return OS({sx:f,theme:this})},u}function a7t(e){return Object.keys(e).length===0}function tde(e=null){const t=p.useContext(zI);return!t||a7t(t)?e:t}const s7t=HI();function sO(e=s7t){return tde(e)}function gY(e){const t=dS(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function kVe({styles:e,themeId:t,defaultTheme:n={}}){const r=sO(n),o=t&&r[t]||r;let i=typeof e=="function"?e(o):e;return o.modularCssLayers&&(Array.isArray(i)?i=i.map(a=>gY(typeof a=="function"?a(o):a)):i=gY(i)),s.jsx(NVe,{styles:i})}const l7t=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??aO;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function iV(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=l7t(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...a)=>{const l=t(...a);return fb(l)?{...r,...l}:r}:i={...r,...t},{...o,sx:i}}const b_e=e=>e,c7t=()=>{let e=b_e;return{configure(t){e=t},generate(t){return e(t)},reset(){e=b_e}}},MVe=c7t();function u7t(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=EVe("div",{shouldForwardProp:l=>l!=="theme"&&l!=="sx"&&l!=="as"})(OS);return p.forwardRef(function(c,u){const d=sO(n),{className:f,component:h="div",...m}=iV(c);return s.jsx(i,{as:h,ref:u,className:Ae(f,o?o(r):r),theme:t&&d[t]||d,...m})})}const d7t={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function kr(e,t,n="Mui"){const r=d7t[t];return r?`${n}-${r}`:`${MVe.generate(e)}-${t}`}function Mr(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=kr(e,o,n)}),r}function RVe(e){const{variants:t,...n}=e,r={variants:t,style:dS(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=dS(o.style))}),r}const f7t=HI();function a8(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function j2(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function p7t(e){return e?(t,n)=>n[e]:null}function h7t(e,t,n){e.theme=g7t(e.theme)?n:e.theme[t]||e.theme}function s8(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(o=>s8(e,o,n));if(Array.isArray(r==null?void 0:r.variants)){let o;if(r.isProcessed)o=n?j2(r.style,n):r.style;else{const{variants:i,...a}=r;o=n?j2(dS(a),n):a}return OVe(e,r.variants,[o],n)}return r!=null&&r.isProcessed?n?j2(dS(r.style),n):r.style:n?j2(dS(r),n):r}function OVe(e,t,n=[],r=void 0){var i;let o;e:for(let a=0;a{u8t(l,N=>N.filter(E=>E!==OS));const{name:u,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:m=p7t(b7t(d)),...g}=c,b=u&&u.startsWith("Mui")||d?"components":"custom",y=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,v=h||!1;let x=a8;d==="Root"||d==="root"?x=r:d?x=o:y7t(l)&&(x=void 0);const S=EVe(l,{shouldForwardProp:x,label:m7t(),...g}),C=N=>{if(N.__emotion_real===N)return N;if(typeof N=="function")return function(I){return s8(I,N,I.theme.modularCssLayers?b:void 0)};if(fb(N)){const E=RVe(N);return function(A){return E.variants?s8(A,E,A.theme.modularCssLayers?b:void 0):A.theme.modularCssLayers?j2(E.style,b):E.style}}return N},_=(...N)=>{const E=[],I=N.map(C),A=[];if(E.push(i),u&&m&&A.push(function(D){var U,G;const z=(G=(U=D.theme.components)==null?void 0:U[u])==null?void 0:G.styleOverrides;if(!z)return null;const F={};for(const W in z)F[W]=s8(D,z[W],D.theme.modularCssLayers?"theme":void 0);return m(D,F)}),u&&!y&&A.push(function(D){var F,U;const O=D.theme,z=(U=(F=O==null?void 0:O.components)==null?void 0:F[u])==null?void 0:U.variants;return z?OVe(D,z,[],D.theme.modularCssLayers?"theme":void 0):null}),v||A.push(OS),Array.isArray(I[0])){const T=I.shift(),D=new Array(E.length).fill(""),O=new Array(A.length).fill("");let z;z=[...D,...T,...O],z.raw=[...D,...T.raw,...O],E.unshift(z)}const R=[...E,...I,...A],k=S(...R);return l.muiName&&(k.muiName=l.muiName),k};return S.withConfig&&(_.withConfig=S.withConfig),_}}function m7t(e,t){return void 0}function g7t(e){for(const t in e)return!1;return!0}function y7t(e){return typeof e=="string"&&e.charCodeAt(0)>96}function b7t(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Si=DVe();function T_(e,t,n=!1){const r={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const i=o;if(i==="components"||i==="slots")r[i]={...e[i],...r[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],l=t[i];if(!l)r[i]=a||{};else if(!a)r[i]=l;else{r[i]={...l};for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const u=c;r[i][u]=T_(a[u],l[u],n)}}}else i==="className"&&n&&t.className?r.className=Ae(e==null?void 0:e.className,t==null?void 0:t.className):i==="style"&&n&&t.style?r.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:r[i]===void 0&&(r[i]=e[i])}return r}function LVe(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:T_(t.components[n].defaultProps,r)}function nde({props:e,name:t,defaultTheme:n,themeId:r}){let o=sO(n);return r&&(o=o[r]||o),LVe({theme:o,name:t,props:e})}function v7t(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function rde(e,t=0,n=1){return v7t(e,t,n)}function x7t(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function DS(e){if(e.type)return e;if(e.charAt(0)==="#")return DS(x7t(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Vx(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(Vx(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const w7t=e=>{const t=DS(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Mk=(e,t)=>{try{return w7t(e)}catch{return e}};function aV(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function $Ve(e){e=DS(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(u,d=(u+n/30)%12)=>o-i*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const c=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),aV({type:l,values:c})}function Mte(e){e=DS(e);let t=e.type==="hsl"||e.type==="hsla"?DS($Ve(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function S7t(e,t){const n=Mte(e),r=Mte(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Ux(e,t){return e=DS(e),t=rde(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,aV(e)}function AC(e,t,n){try{return Ux(e,t)}catch{return e}}function lO(e,t){if(e=DS(e),t=rde(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return aV(e)}function ws(e,t,n){try{return lO(e,t)}catch{return e}}function cO(e,t){if(e=DS(e),t=rde(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return aV(e)}function Ss(e,t,n){try{return cO(e,t)}catch{return e}}function Rte(e,t=.15){return Mte(e)>.5?lO(e,t):cO(e,t)}function VL(e,t,n){try{return Rte(e,t)}catch{return e}}const FVe=p.createContext(null);function ode(){return p.useContext(FVe)}const C7t=typeof Symbol=="function"&&Symbol.for,_7t=C7t?Symbol.for("mui.nested"):"__THEME_NESTED__";function j7t(e,t){return typeof t=="function"?t(e):{...e,...t}}function N7t(e){const{children:t,theme:n}=e,r=ode(),o=p.useMemo(()=>{const i=r===null?{...n}:j7t(r,n);return i!=null&&(i[_7t]=r!==null),i},[n,r]);return s.jsx(FVe.Provider,{value:o,children:t})}const BVe=p.createContext();function E7t({value:e,...t}){return s.jsx(BVe.Provider,{value:e??!0,...t})}const af=()=>p.useContext(BVe)??!1,zVe=p.createContext(void 0);function P7t({value:e,children:t}){return s.jsx(zVe.Provider,{value:e,children:t})}function I7t(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?T_(o.defaultProps,r,t.components.mergeClassNameAndStyle):!o.styleOverrides&&!o.variants?T_(o,r,t.components.mergeClassNameAndStyle):r}function A7t({props:e,name:t}){const n=p.useContext(zVe);return I7t({props:e,name:t,theme:{components:n}})}let v_e=0;function T7t(e){const[t,n]=p.useState(e),r=e||t;return p.useEffect(()=>{t==null&&(v_e+=1,n(`mui-${v_e}`))},[t]),r}const k7t={...IS},x_e=k7t.useId;function pi(e){if(x_e!==void 0){const t=x_e();return e??t}return T7t(e)}function M7t(e){const t=tde(),n=pi()||"",{modularCssLayers:r}=e;let o="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return!r||t!==null?o="":typeof r=="string"?o=r.replace(/mui(?!\.)/g,o):o=`@layer ${o};`,wa(()=>{var l,c;const i=document.querySelector("head");if(!i)return;const a=i.firstChild;if(o){if(a&&((l=a.hasAttribute)!=null&&l.call(a,"data-mui-layer-order"))&&a.getAttribute("data-mui-layer-order")===n)return;const u=document.createElement("style");u.setAttribute("data-mui-layer-order",n),u.textContent=o,i.prepend(u)}else(c=i.querySelector(`style[data-mui-layer-order="${n}"]`))==null||c.remove()},[o,n]),o?s.jsx(kVe,{styles:o}):null}const w_e={};function S_e(e,t,n,r=!1){return p.useMemo(()=>{const o=e&&t[e]||t;if(typeof n=="function"){const i=n(o),a=e?{...t,[e]:i}:i;return r?()=>a:a}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function HVe(e){const{children:t,theme:n,themeId:r}=e,o=tde(w_e),i=ode()||w_e,a=S_e(r,o,n),l=S_e(r,i,n,!0),c=(r?a[r]:a).direction==="rtl",u=M7t(a);return s.jsx(N7t,{theme:l,children:s.jsx(zI.Provider,{value:a,children:s.jsx(E7t,{value:c,children:s.jsxs(P7t,{value:r?a[r].components:a.components,children:[u,t]})})})})}const C_e={theme:void 0};function R7t(e){let t,n;return function(o){let i=t;return(i===void 0||o.theme!==n)&&(C_e.theme=o.theme,i=RVe(e(C_e)),t=i,n=o.theme),i}}const ide="mode",ade="color-scheme",O7t="data-color-scheme";function D7t(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=ide,colorSchemeStorageKey:i=ade,attribute:a=O7t,colorSchemeNode:l="document.documentElement",nonce:c}=e||{};let u="",d=a;if(a==="class"&&(d=".%s"),a==="data"&&(d="[data-%s]"),d.startsWith(".")){const h=d.substring(1);u+=`${l}.classList.remove('${h}'.replace('%s', light), '${h}'.replace('%s', dark)); + ${l}.classList.add('${h}'.replace('%s', colorScheme));`}const f=d.match(/\[([^[\]]+)\]/);if(f){const[h,m]=f[1].split("=");m||(u+=`${l}.removeAttribute('${h}'.replace('%s', light)); + ${l}.removeAttribute('${h}'.replace('%s', dark));`),u+=` + ${l}.setAttribute('${h}'.replace('%s', colorScheme), ${m?`${m}.replace('%s', colorScheme)`:'""'});`}else d!==".%s"&&(u+=`${l}.setAttribute('${d}', colorScheme);`);return s.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(function() { +try { + let colorScheme = ''; + const mode = localStorage.getItem('${o}') || '${t}'; + const dark = localStorage.getItem('${i}-dark') || '${r}'; + const light = localStorage.getItem('${i}-light') || '${n}'; + if (mode === 'system') { + // handle system mode + const mql = window.matchMedia('(prefers-color-scheme: dark)'); + if (mql.matches) { + colorScheme = dark + } else { + colorScheme = light + } + } + if (mode === 'light') { + colorScheme = light; + } + if (mode === 'dark') { + colorScheme = dark; + } + if (colorScheme) { + ${u} + } +} catch(e){}})();`}},"mui-color-scheme-init")}function L7t(){}const $7t=({key:e,storageWindow:t})=>(!t&&typeof window<"u"&&(t=window),{get(n){if(typeof window>"u")return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return L7t;const r=o=>{const i=o.newValue;o.key===e&&n(i)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function yY(){}function __e(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function VVe(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function F7t(e){return VVe(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function B7t(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:i=ide,colorSchemeStorageKey:a=ade,storageWindow:l=typeof window>"u"?void 0:window,storageManager:c=$7t,noSsr:u=!1}=e,d=o.join(","),f=o.length>1,h=p.useMemo(()=>c==null?void 0:c({key:i,storageWindow:l}),[c,i,l]),m=p.useMemo(()=>c==null?void 0:c({key:`${a}-light`,storageWindow:l}),[c,a,l]),g=p.useMemo(()=>c==null?void 0:c({key:`${a}-dark`,storageWindow:l}),[c,a,l]),[b,y]=p.useState(()=>{const I=(h==null?void 0:h.get(t))||t,A=(m==null?void 0:m.get(n))||n,R=(g==null?void 0:g.get(r))||r;return{mode:I,systemMode:__e(I),lightColorScheme:A,darkColorScheme:R}}),[v,x]=p.useState(u||!f);p.useEffect(()=>{x(!0)},[]);const S=F7t(b),C=p.useCallback(I=>{y(A=>{if(I===A.mode)return A;const R=I??t;return h==null||h.set(R),{...A,mode:R,systemMode:__e(R)}})},[h,t]),_=p.useCallback(I=>{I?typeof I=="string"?I&&!d.includes(I)?console.error(`\`${I}\` does not exist in \`theme.colorSchemes\`.`):y(A=>{const R={...A};return VVe(A,k=>{k==="light"&&(m==null||m.set(I),R.lightColorScheme=I),k==="dark"&&(g==null||g.set(I),R.darkColorScheme=I)}),R}):y(A=>{const R={...A},k=I.light===null?n:I.light,T=I.dark===null?r:I.dark;return k&&(d.includes(k)?(R.lightColorScheme=k,m==null||m.set(k)):console.error(`\`${k}\` does not exist in \`theme.colorSchemes\`.`)),T&&(d.includes(T)?(R.darkColorScheme=T,g==null||g.set(T)):console.error(`\`${T}\` does not exist in \`theme.colorSchemes\`.`)),R}):y(A=>(m==null||m.set(n),g==null||g.set(r),{...A,lightColorScheme:n,darkColorScheme:r}))},[d,m,g,n,r]),N=p.useCallback(I=>{b.mode==="system"&&y(A=>{const R=I!=null&&I.matches?"dark":"light";return A.systemMode===R?A:{...A,systemMode:R}})},[b.mode]),E=p.useRef(N);return E.current=N,p.useEffect(()=>{if(typeof window.matchMedia!="function"||!f)return;const I=(...R)=>E.current(...R),A=window.matchMedia("(prefers-color-scheme: dark)");return A.addListener(I),I(A),()=>{A.removeListener(I)}},[f]),p.useEffect(()=>{if(f){const I=(h==null?void 0:h.subscribe(k=>{(!k||["light","dark","system"].includes(k))&&C(k||t)}))||yY,A=(m==null?void 0:m.subscribe(k=>{(!k||d.match(k))&&_({light:k})}))||yY,R=(g==null?void 0:g.subscribe(k=>{(!k||d.match(k))&&_({dark:k})}))||yY;return()=>{I(),A(),R()}}},[_,C,d,t,l,f,h,m,g]),{...b,mode:v?b.mode:void 0,systemMode:v?b.systemMode:void 0,colorScheme:v?S:void 0,setMode:C,setColorScheme:_}}const z7t="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function H7t(e){const{themeId:t,theme:n={},modeStorageKey:r=ide,colorSchemeStorageKey:o=ade,disableTransitionOnChange:i=!1,defaultColorScheme:a,resolveTheme:l}=e,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},u=p.createContext(void 0),d=()=>p.useContext(u)||c,f={},h={};function m(v){var Ze,ht,Oe,ft;const{children:x,theme:S,modeStorageKey:C=r,colorSchemeStorageKey:_=o,disableTransitionOnChange:N=i,storageManager:E,storageWindow:I=typeof window>"u"?void 0:window,documentNode:A=typeof document>"u"?void 0:document,colorSchemeNode:R=typeof document>"u"?void 0:document.documentElement,disableNestedContext:k=!1,disableStyleSheetGeneration:T=!1,defaultMode:D="system",forceThemeRerender:O=!1,noSsr:z}=v,F=p.useRef(!1),U=ode(),G=p.useContext(u),W=!!G&&!k,Y=p.useMemo(()=>S||(typeof n=="function"?n():n),[S]),B=Y[t],$=B||Y,{colorSchemes:K=f,components:q=h,cssVarPrefix:Z}=$,J=Object.keys(K).filter(Qe=>!!K[Qe]).join(","),oe=p.useMemo(()=>J.split(","),[J]),de=typeof a=="string"?a:a.light,ae=typeof a=="string"?a:a.dark,ue=K[de]&&K[ae]?D:((ht=(Ze=K[$.defaultColorScheme])==null?void 0:Ze.palette)==null?void 0:ht.mode)||((Oe=$.palette)==null?void 0:Oe.mode),{mode:ce,setMode:se,systemMode:me,lightColorScheme:fe,darkColorScheme:te,colorScheme:ye,setColorScheme:ve}=B7t({supportedColorSchemes:oe,defaultLightColorScheme:de,defaultDarkColorScheme:ae,modeStorageKey:C,colorSchemeStorageKey:_,defaultMode:ue,storageManager:E,storageWindow:I,noSsr:z});let ge=ce,Ee=ye;W&&(ge=G.mode,Ee=G.colorScheme);let xe=Ee||$.defaultColorScheme;$.vars&&!O&&(xe=$.defaultColorScheme);const Ne=p.useMemo(()=>{var st;const Qe=((st=$.generateThemeVars)==null?void 0:st.call($))||$.vars,De={...$,components:q,colorSchemes:K,cssVarPrefix:Z,vars:Qe};if(typeof De.generateSpacing=="function"&&(De.spacing=De.generateSpacing()),xe){const vt=K[xe];vt&&typeof vt=="object"&&Object.keys(vt).forEach(qe=>{vt[qe]&&typeof vt[qe]=="object"?De[qe]={...De[qe],...vt[qe]}:De[qe]=vt[qe]})}return l?l(De):De},[$,xe,q,K,Z]),_e=$.colorSchemeSelector;wa(()=>{if(Ee&&R&&_e&&_e!=="media"){const Qe=_e;let De=_e;if(Qe==="class"&&(De=".%s"),Qe==="data"&&(De="[data-%s]"),Qe!=null&&Qe.startsWith("data-")&&!Qe.includes("%s")&&(De=`[${Qe}="%s"]`),De.startsWith("."))R.classList.remove(...oe.map(st=>De.substring(1).replace("%s",st))),R.classList.add(De.substring(1).replace("%s",Ee));else{const st=De.replace("%s",Ee).match(/\[([^\]]+)\]/);if(st){const[vt,qe]=st[1].split("=");qe||oe.forEach(Ye=>{R.removeAttribute(vt.replace(Ee,Ye))}),R.setAttribute(vt,qe?qe.replace(/"|'/g,""):"")}else R.setAttribute(De,Ee)}}},[Ee,_e,R,oe]),p.useEffect(()=>{let Qe;if(N&&F.current&&A){const De=A.createElement("style");De.appendChild(A.createTextNode(z7t)),A.head.appendChild(De),window.getComputedStyle(A.body),Qe=setTimeout(()=>{A.head.removeChild(De)},1)}return()=>{clearTimeout(Qe)}},[Ee,N,A]),p.useEffect(()=>(F.current=!0,()=>{F.current=!1}),[]);const Be=p.useMemo(()=>({allColorSchemes:oe,colorScheme:Ee,darkColorScheme:te,lightColorScheme:fe,mode:ge,setColorScheme:ve,setMode:se,systemMode:me}),[oe,Ee,te,fe,ge,ve,se,me,Ne.colorSchemeSelector]);let Te=!0;(T||$.cssVariables===!1||W&&(U==null?void 0:U.cssVarPrefix)===Z)&&(Te=!1);const Ge=s.jsxs(p.Fragment,{children:[s.jsx(HVe,{themeId:B?t:void 0,theme:Ne,children:x}),Te&&s.jsx(NVe,{styles:((ft=Ne.generateStyleSheets)==null?void 0:ft.call(Ne))||[]})]});return W?Ge:s.jsx(u.Provider,{value:Be,children:Ge})}const g=typeof a=="string"?a:a.light,b=typeof a=="string"?a:a.dark;return{CssVarsProvider:m,useColorScheme:d,getInitColorSchemeScript:v=>D7t({colorSchemeStorageKey:o,defaultLightColorScheme:g,defaultDarkColorScheme:b,modeStorageKey:r,...v})}}function V7t(e=""){function t(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${t(...o)})`}const j_e=(e,t,n,r=[])=>{let o=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},U7t=(e,t,n)=>{function r(o,i=[],a=[]){Object.entries(o).forEach(([l,c])=>{(!n||n&&!n([...i,l]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...i,l],Array.isArray(c)?[...a,l]:a):t([...i,l],c,a))})}r(e)},G7t=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function bY(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return U7t(e,(l,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(l,c))){const d=`--${n?`${n}-`:""}${l.join("-")}`,f=G7t(l,c);Object.assign(o,{[d]:f}),j_e(i,l,`var(${d})`,u),j_e(a,l,`var(${d}, ${f})`,u)}},l=>l[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function W7t(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:i}=t,{colorSchemes:a={},components:l,defaultColorScheme:c="light",...u}=e,{vars:d,css:f,varsWithDefaults:h}=bY(u,t);let m=h;const g={},{[c]:b,...y}=a;if(Object.entries(y||{}).forEach(([C,_])=>{const{vars:N,css:E,varsWithDefaults:I}=bY(_,t);m=Qd(m,I),g[C]={css:E,vars:N}}),b){const{css:C,vars:_,varsWithDefaults:N}=bY(b,t);m=Qd(m,N),g[c]={css:C,vars:_}}function v(C,_){var E,I;let N=o;if(o==="class"&&(N=".%s"),o==="data"&&(N="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(N=`[${o}="%s"]`),C){if(N==="media")return e.defaultColorScheme===C?":root":{[`@media (prefers-color-scheme: ${((I=(E=a[C])==null?void 0:E.palette)==null?void 0:I.mode)||C})`]:{":root":_}};if(N)return e.defaultColorScheme===C?`:root, ${N.replace("%s",String(C))}`:N.replace("%s",String(C))}return":root"}return{vars:m,generateThemeVars:()=>{let C={...d};return Object.entries(g).forEach(([,{vars:_}])=>{C=Qd(C,_)}),C},generateStyleSheets:()=>{var A,R;const C=[],_=e.defaultColorScheme||"light";function N(k,T){Object.keys(T).length&&C.push(typeof k=="string"?{[k]:{...T}}:k)}N(n(void 0,{...f}),f);const{[_]:E,...I}=g;if(E){const{css:k}=E,T=(R=(A=a[_])==null?void 0:A.palette)==null?void 0:R.mode,D=!r&&T?{colorScheme:T,...k}:{...k};N(n(_,{...D}),D)}return Object.entries(I).forEach(([k,{css:T}])=>{var z,F;const D=(F=(z=a[k])==null?void 0:z.palette)==null?void 0:F.mode,O=!r&&D?{colorScheme:D,...T}:{...T};N(n(k,{...O}),O)}),i&&C.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),C}}}function q7t(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}function qn(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",l=!0;for(let c=0;c{const{ownerState:n}=e;return[t.root,t[`maxWidth${_n(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),X7t=e=>nde({props:e,name:"MuiContainer",defaultTheme:K7t}),Z7t=(e,t)=>{const n=c=>kr(t,c),{classes:r,fixed:o,disableGutters:i,maxWidth:a}=e,l={root:["root",a&&`maxWidth${_n(String(a))}`,o&&"fixed",i&&"disableGutters"]};return qn(l,n,r)};function J7t(e={}){const{createStyledComponent:t=Y7t,useThemeProps:n=X7t,componentName:r="MuiContainer"}=e,o=t(({theme:a,ownerState:l})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!l.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}}),({theme:a,ownerState:l})=>l.fixed&&Object.keys(a.breakpoints.values).reduce((c,u)=>{const d=u,f=a.breakpoints.values[d];return f!==0&&(c[a.breakpoints.up(d)]={maxWidth:`${f}${a.breakpoints.unit}`}),c},{}),({theme:a,ownerState:l})=>({...l.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},...l.maxWidth&&l.maxWidth!=="xs"&&{[a.breakpoints.up(l.maxWidth)]:{maxWidth:`${a.breakpoints.values[l.maxWidth]}${a.breakpoints.unit}`}}}));return p.forwardRef(function(l,c){const u=n(l),{className:d,component:f="div",disableGutters:h=!1,fixed:m=!1,maxWidth:g="lg",classes:b,...y}=u,v={...u,component:f,disableGutters:h,fixed:m,maxWidth:g},x=Z7t(v,r);return s.jsx(o,{as:f,ownerState:v,className:Ae(x.root,d),ref:c,...y})})}function m4(e,t){var n,r,o;return p.isValidElement(e)&&t.indexOf(e.type.muiName??((o=(r=(n=e.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}const Q7t=(e,t)=>e.filter(n=>t.includes(n)),VI=(e,t,n)=>{const r=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{n((a,l)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,l):a[e.up(e.keys[i])]=l)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:Q7t(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.includes(i)){const a=t[i];a!==void 0&&n((l,c)=>{r===i?Object.assign(l,c):l[e.up(i)]=c},a)}}):(typeof t=="number"||typeof t=="string")&&n((o,i)=>{Object.assign(o,i)},t)};function IB(e){return`--Grid-${e}Spacing`}function sV(e){return`--Grid-parent-${e}Spacing`}const N_e="--Grid-columns",j5="--Grid-parent-columns",eBt=({theme:e,ownerState:t})=>{const n={};return VI(e.breakpoints,t.size,(r,o)=>{let i={};o==="grow"&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),o==="auto"&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof o=="number"&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / var(${j5}) - (var(${j5}) - ${o}) * (var(${sV("column")}) / var(${j5})))`}),r(n,i)}),n},tBt=({theme:e,ownerState:t})=>{const n={};return VI(e.breakpoints,t.offset,(r,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / var(${j5}) + var(${sV("column")}) * ${o} / var(${j5}))`}),r(n,i)}),n},nBt=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={[N_e]:12};return VI(e.breakpoints,t.columns,(r,o)=>{const i=o??12;r(n,{[N_e]:i,"> *":{[j5]:i}})}),n},rBt=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return VI(e.breakpoints,t.rowSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[IB("row")]:i,"> *":{[sV("row")]:i}})}),n},oBt=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return VI(e.breakpoints,t.columnSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[IB("column")]:i,"> *":{[sV("column")]:i}})}),n},iBt=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return VI(e.breakpoints,t.direction,(r,o)=>{r(n,{flexDirection:o})}),n},aBt=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},gap:`var(${IB("row")}) var(${IB("column")})`}}),sBt=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{r!==!1&&r!==void 0&&t.push(`grid-${n}-${String(r)}`)}),t},lBt=(e,t="xs")=>{function n(r){return r===void 0?!1:typeof r=="string"&&!Number.isNaN(Number(r))||typeof r=="number"&&r>0}if(n(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const r=[];return Object.entries(e).forEach(([o,i])=>{n(i)&&r.push(`spacing-${o}-${String(i)}`)}),r}return[]},cBt=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,n])=>`direction-${t}-${n}`):[`direction-xs-${String(e)}`];function uBt(e,t){e.item!==void 0&&delete e.item,e.zeroMinWidth!==void 0&&delete e.zeroMinWidth,t.keys.forEach(n=>{e[n]!==void 0&&delete e[n]})}const dBt=HI(),fBt=Si("div",{name:"MuiGrid",slot:"Root"});function pBt(e){return nde({props:e,name:"MuiGrid",defaultTheme:dBt})}function hBt(e={}){const{createStyledComponent:t=fBt,useThemeProps:n=pBt,useTheme:r=sO,componentName:o="MuiGrid"}=e,i=(u,d)=>{const{container:f,direction:h,spacing:m,wrap:g,size:b}=u,y={root:["root",f&&"container",g!=="wrap"&&`wrap-xs-${String(g)}`,...cBt(h),...sBt(b),...f?lBt(m,d.breakpoints.keys[0]):[]]};return qn(y,v=>kr(o,v),{})};function a(u,d,f=()=>!0){const h={};return u===null||(Array.isArray(u)?u.forEach((m,g)=>{m!==null&&f(m)&&d.keys[g]&&(h[d.keys[g]]=m)}):typeof u=="object"?Object.keys(u).forEach(m=>{const g=u[m];g!=null&&f(g)&&(h[m]=g)}):h[d.keys[0]]=u),h}const l=t(nBt,oBt,rBt,eBt,iBt,aBt,tBt),c=p.forwardRef(function(d,f){const h=r(),m=n(d),g=iV(m);uBt(g,h.breakpoints);const{className:b,children:y,columns:v=12,container:x=!1,component:S="div",direction:C="row",wrap:_="wrap",size:N={},offset:E={},spacing:I=0,rowSpacing:A=I,columnSpacing:R=I,unstable_level:k=0,...T}=g,D=a(N,h.breakpoints,B=>B!==!1),O=a(E,h.breakpoints),z=d.columns??(k?void 0:v),F=d.spacing??(k?void 0:I),U=d.rowSpacing??d.spacing??(k?void 0:A),G=d.columnSpacing??d.spacing??(k?void 0:R),W={...g,level:k,columns:z,container:x,direction:C,wrap:_,spacing:F,rowSpacing:U,columnSpacing:G,size:D,offset:O},Y=i(W,h);return s.jsx(l,{ref:f,as:S,ownerState:W,className:Ae(Y.root,b),...T,children:p.Children.map(y,B=>{var $;return p.isValidElement(B)&&m4(B,["Grid"])&&x&&B.props.container?p.cloneElement(B,{unstable_level:(($=B.props)==null?void 0:$.unstable_level)??k+1}):B})})});return c.muiName="Grid",c}const mBt=HI(),gBt=Si("div",{name:"MuiStack",slot:"Root"});function yBt(e){return nde({props:e,name:"MuiStack",defaultTheme:mBt})}function bBt(e,t){const n=p.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],xBt=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...J0({theme:t},mY({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r}))};if(e.spacing){const r=QH(t),o=Object.keys(t.breakpoints.values).reduce((c,u)=>((typeof e.spacing=="object"&&e.spacing[u]!=null||typeof e.direction=="object"&&e.direction[u]!=null)&&(c[u]=!0),c),{}),i=mY({values:e.direction,base:o}),a=mY({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((c,u,d)=>{if(!i[c]){const h=u>0?i[d[u-1]]:"column";i[c]=h}}),n=Qd(n,J0({theme:t},a,(c,u)=>e.useFlexGap?{gap:A_(r,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${vBt(u?i[u]:e.direction)}`]:A_(r,c)}}))}return n=b8t(t.breakpoints,n),n};function wBt(e={}){const{createStyledComponent:t=gBt,useThemeProps:n=yBt,componentName:r="MuiStack"}=e,o=()=>qn({root:["root"]},c=>kr(r,c),{}),i=t(xBt);return p.forwardRef(function(c,u){const d=n(c),f=iV(d),{component:h="div",direction:m="column",spacing:g=0,divider:b,children:y,className:v,useFlexGap:x=!1,...S}=f,C={direction:m,spacing:g,useFlexGap:x},_=o();return s.jsx(i,{as:h,ownerState:C,ref:u,className:Ae(_.root,v),...S,children:b?bBt(y,b):y})})}const HM={black:"#000",white:"#fff"},SBt={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"},kN={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},MN={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},NT={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},RN={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},ON={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},DN={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function UVe(){return{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:HM.white,default:HM.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}}}const GVe=UVe();function WVe(){return{text:{primary:HM.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:HM.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}}}const Ote=WVe();function E_e(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=cO(e.main,o):t==="dark"&&(e.dark=lO(e.main,i)))}function P_e(e,t,n,r,o){const i=o.light||o,a=o.dark||o*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(i*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(a*100).toFixed(0)}%)`))}function CBt(e="light"){return e==="dark"?{main:RN[200],light:RN[50],dark:RN[400]}:{main:RN[700],light:RN[400],dark:RN[800]}}function _Bt(e="light"){return e==="dark"?{main:kN[200],light:kN[50],dark:kN[400]}:{main:kN[500],light:kN[300],dark:kN[700]}}function jBt(e="light"){return e==="dark"?{main:MN[500],light:MN[300],dark:MN[700]}:{main:MN[700],light:MN[400],dark:MN[800]}}function NBt(e="light"){return e==="dark"?{main:ON[400],light:ON[300],dark:ON[700]}:{main:ON[700],light:ON[500],dark:ON[900]}}function EBt(e="light"){return e==="dark"?{main:DN[400],light:DN[300],dark:DN[700]}:{main:DN[800],light:DN[500],dark:DN[900]}}function PBt(e="light"){return e==="dark"?{main:NT[400],light:NT[300],dark:NT[700]}:{main:"#ed6c02",light:NT[500],dark:NT[900]}}function IBt(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function sde(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:o,...i}=e,a=e.primary||CBt(t),l=e.secondary||_Bt(t),c=e.error||jBt(t),u=e.info||NBt(t),d=e.success||EBt(t),f=e.warning||PBt(t);function h(y){return o?IBt(y):S7t(y,Ote.text.primary)>=n?Ote.text.primary:GVe.text.primary}const m=({color:y,name:v,mainShade:x=500,lightShade:S=300,darkShade:C=700})=>{if(y={...y},!y.main&&y[x]&&(y.main=y[x]),!y.hasOwnProperty("main"))throw new Error(Vx(11,v?` (${v})`:"",x));if(typeof y.main!="string")throw new Error(Vx(12,v?` (${v})`:"",JSON.stringify(y.main)));return o?(P_e(o,y,"light",S,r),P_e(o,y,"dark",C,r)):(E_e(y,"light",S,r),E_e(y,"dark",C,r)),y.contrastText||(y.contrastText=h(y.main)),y};let g;return t==="light"?g=UVe():t==="dark"&&(g=WVe()),Qd({common:{...HM},mode:t,primary:m({color:a,name:"primary"}),secondary:m({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:c,name:"error"}),warning:m({color:f,name:"warning"}),info:m({color:u,name:"info"}),success:m({color:d,name:"success"}),grey:SBt,contrastThreshold:n,getContrastText:h,augmentColor:m,tonalOffset:r,...g},i)}function ABt(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function TBt(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function kBt(e){return Math.round(e*1e5)/1e5}const I_e={textTransform:"uppercase"},A_e='"Roboto", "Helvetica", "Arial", sans-serif';function qVe(e,t){const{fontFamily:n=A_e,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d,...f}=typeof t=="function"?t(e):t,h=r/14,m=d||(y=>`${y/c*h}rem`),g=(y,v,x,S,C)=>({fontFamily:n,fontWeight:y,fontSize:m(v),lineHeight:x,...n===A_e?{letterSpacing:`${kBt(S/v)}em`}:{},...C,...u}),b={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(i,48,1.167,0),h4:g(i,34,1.235,.25),h5:g(i,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(i,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(i,16,1.5,.15),body2:g(i,14,1.43,.15),button:g(a,14,1.75,.4,I_e),caption:g(i,12,1.66,.4),overline:g(i,12,2.66,1,I_e),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Qd({htmlFontSize:c,pxToRem:m,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:l,...b},f,{clone:!1})}const MBt=.2,RBt=.14,OBt=.12;function Kl(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${MBt})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${RBt})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${OBt})`].join(",")}const DBt=["none",Kl(0,2,1,-1,0,1,1,0,0,1,3,0),Kl(0,3,1,-2,0,2,2,0,0,1,5,0),Kl(0,3,3,-2,0,3,4,0,0,1,8,0),Kl(0,2,4,-1,0,4,5,0,0,1,10,0),Kl(0,3,5,-1,0,5,8,0,0,1,14,0),Kl(0,3,5,-1,0,6,10,0,0,1,18,0),Kl(0,4,5,-2,0,7,10,1,0,2,16,1),Kl(0,5,5,-3,0,8,10,1,0,3,14,2),Kl(0,5,6,-3,0,9,12,1,0,3,16,2),Kl(0,6,6,-3,0,10,14,1,0,4,18,3),Kl(0,6,7,-4,0,11,15,1,0,4,20,3),Kl(0,7,8,-4,0,12,17,2,0,5,22,4),Kl(0,7,8,-4,0,13,19,2,0,5,24,4),Kl(0,7,9,-4,0,14,21,2,0,5,26,4),Kl(0,8,9,-5,0,15,22,2,0,6,28,5),Kl(0,8,10,-5,0,16,24,2,0,6,30,5),Kl(0,8,11,-5,0,17,26,2,0,6,32,5),Kl(0,9,11,-5,0,18,28,2,0,7,34,6),Kl(0,9,12,-6,0,19,29,2,0,7,36,6),Kl(0,10,13,-6,0,20,31,3,0,8,38,7),Kl(0,10,13,-6,0,21,33,3,0,8,40,7),Kl(0,10,14,-6,0,22,35,3,0,8,42,7),Kl(0,11,14,-7,0,23,36,3,0,9,44,8),Kl(0,11,15,-7,0,24,38,3,0,9,46,8)],LBt={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)"},KVe={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function T_e(e){return`${Math.round(e)}ms`}function $Bt(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function FBt(e){const t={...LBt,...e.easing},n={...KVe,...e.duration};return{getAutoHeightDuration:$Bt,create:(o=["all"],i={})=>{const{duration:a=n.standard,easing:l=t.easeInOut,delay:c=0,...u}=i;return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof a=="string"?a:T_e(a)} ${l} ${typeof c=="string"?c:T_e(c)}`).join(",")},...e,easing:t,duration:n}}const BBt={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function zBt(e){return fb(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function YVe(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;i{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;rQd(g,b),m),m.unstable_sxConfig={...aO,...d==null?void 0:d.unstable_sxConfig},m.unstable_sx=function(b){return OS({sx:b,theme:this})},m.toRuntimeSource=YVe,VBt(m),m}function Lte(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const UBt=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Lte(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function XVe(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function ZVe(e){return e==="dark"?UBt:[]}function GBt(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:o,...i}=e,a=sde({...t,colorSpace:o});return{palette:a,opacity:{...XVe(a.mode),...n},overlays:r||ZVe(a.mode),...i}}function WBt(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const qBt=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],KBt=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return qBt(e.cssVarPrefix).forEach(l=>{a[l]=n[l],delete n[l]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",t)]:a,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function YBt(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function zn(e,t,n){!e[t]&&n&&(e[t]=n)}function Rk(e){return typeof e!="string"||!e.startsWith("hsl")?e:$Ve(e)}function jv(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Mk(Rk(e[t])))}function XBt(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Fy=e=>{try{return e()}catch{}},ZBt=(e="mui")=>V7t(e);function vY(e,t,n,r,o){if(!n)return;n=n===!0?{}:n;const i=o==="dark"?"dark":"light";if(!r){t[o]=GBt({...n,palette:{mode:i,...n==null?void 0:n.palette},colorSpace:e});return}const{palette:a,...l}=Dte({...r,palette:{mode:i,...n==null?void 0:n.palette},colorSpace:e});return t[o]={...n,palette:a,opacity:{...XVe(i),...n==null?void 0:n.opacity},overlays:(n==null?void 0:n.overlays)||ZVe(i)},l}function JBt(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:l=WBt,colorSchemeSelector:c=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...d}=e,f=Object.keys(n)[0],h=r||(n.light&&f!=="light"?"light":f),m=ZBt(i),{[h]:g,light:b,dark:y,...v}=n,x={...v};let S=g;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(S=!0),!S)throw new Error(Vx(21,h));let C;a&&(C="oklch");const _=vY(C,x,S,d,h);b&&!x.light&&vY(C,x,b,void 0,"light"),y&&!x.dark&&vY(C,x,y,void 0,"dark");let N={defaultColorScheme:h,..._,cssVarPrefix:i,colorSchemeSelector:c,rootSelector:u,getCssVar:m,colorSchemes:x,font:{...ABt(_.typography),..._.font},spacing:XBt(d.spacing)};Object.keys(N.colorSchemes).forEach(k=>{const T=N.colorSchemes[k].palette,D=z=>{const F=z.split("-"),U=F[1],G=F[2];return m(z,T[U][G])};T.mode==="light"&&(zn(T.common,"background","#fff"),zn(T.common,"onBackground","#000")),T.mode==="dark"&&(zn(T.common,"background","#000"),zn(T.common,"onBackground","#fff"));function O(z,F,U){if(C){let G;return z===AC&&(G=`transparent ${((1-U)*100).toFixed(0)}%`),z===ws&&(G=`#000 ${(U*100).toFixed(0)}%`),z===Ss&&(G=`#fff ${(U*100).toFixed(0)}%`),`color-mix(in ${C}, ${F}, ${G})`}return z(F,U)}if(YBt(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){zn(T.Alert,"errorColor",O(ws,T.error.light,.6)),zn(T.Alert,"infoColor",O(ws,T.info.light,.6)),zn(T.Alert,"successColor",O(ws,T.success.light,.6)),zn(T.Alert,"warningColor",O(ws,T.warning.light,.6)),zn(T.Alert,"errorFilledBg",D("palette-error-main")),zn(T.Alert,"infoFilledBg",D("palette-info-main")),zn(T.Alert,"successFilledBg",D("palette-success-main")),zn(T.Alert,"warningFilledBg",D("palette-warning-main")),zn(T.Alert,"errorFilledColor",Fy(()=>T.getContrastText(T.error.main))),zn(T.Alert,"infoFilledColor",Fy(()=>T.getContrastText(T.info.main))),zn(T.Alert,"successFilledColor",Fy(()=>T.getContrastText(T.success.main))),zn(T.Alert,"warningFilledColor",Fy(()=>T.getContrastText(T.warning.main))),zn(T.Alert,"errorStandardBg",O(Ss,T.error.light,.9)),zn(T.Alert,"infoStandardBg",O(Ss,T.info.light,.9)),zn(T.Alert,"successStandardBg",O(Ss,T.success.light,.9)),zn(T.Alert,"warningStandardBg",O(Ss,T.warning.light,.9)),zn(T.Alert,"errorIconColor",D("palette-error-main")),zn(T.Alert,"infoIconColor",D("palette-info-main")),zn(T.Alert,"successIconColor",D("palette-success-main")),zn(T.Alert,"warningIconColor",D("palette-warning-main")),zn(T.AppBar,"defaultBg",D("palette-grey-100")),zn(T.Avatar,"defaultBg",D("palette-grey-400")),zn(T.Button,"inheritContainedBg",D("palette-grey-300")),zn(T.Button,"inheritContainedHoverBg",D("palette-grey-A100")),zn(T.Chip,"defaultBorder",D("palette-grey-400")),zn(T.Chip,"defaultAvatarColor",D("palette-grey-700")),zn(T.Chip,"defaultIconColor",D("palette-grey-700")),zn(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),zn(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),zn(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),zn(T.LinearProgress,"primaryBg",O(Ss,T.primary.main,.62)),zn(T.LinearProgress,"secondaryBg",O(Ss,T.secondary.main,.62)),zn(T.LinearProgress,"errorBg",O(Ss,T.error.main,.62)),zn(T.LinearProgress,"infoBg",O(Ss,T.info.main,.62)),zn(T.LinearProgress,"successBg",O(Ss,T.success.main,.62)),zn(T.LinearProgress,"warningBg",O(Ss,T.warning.main,.62)),zn(T.Skeleton,"bg",C?O(AC,T.text.primary,.11):`rgba(${D("palette-text-primaryChannel")} / 0.11)`),zn(T.Slider,"primaryTrack",O(Ss,T.primary.main,.62)),zn(T.Slider,"secondaryTrack",O(Ss,T.secondary.main,.62)),zn(T.Slider,"errorTrack",O(Ss,T.error.main,.62)),zn(T.Slider,"infoTrack",O(Ss,T.info.main,.62)),zn(T.Slider,"successTrack",O(Ss,T.success.main,.62)),zn(T.Slider,"warningTrack",O(Ss,T.warning.main,.62));const z=C?O(ws,T.background.default,.6825):VL(T.background.default,.8);zn(T.SnackbarContent,"bg",z),zn(T.SnackbarContent,"color",Fy(()=>C?Ote.text.primary:T.getContrastText(z))),zn(T.SpeedDialAction,"fabHoverBg",VL(T.background.paper,.15)),zn(T.StepConnector,"border",D("palette-grey-400")),zn(T.StepContent,"border",D("palette-grey-400")),zn(T.Switch,"defaultColor",D("palette-common-white")),zn(T.Switch,"defaultDisabledColor",D("palette-grey-100")),zn(T.Switch,"primaryDisabledColor",O(Ss,T.primary.main,.62)),zn(T.Switch,"secondaryDisabledColor",O(Ss,T.secondary.main,.62)),zn(T.Switch,"errorDisabledColor",O(Ss,T.error.main,.62)),zn(T.Switch,"infoDisabledColor",O(Ss,T.info.main,.62)),zn(T.Switch,"successDisabledColor",O(Ss,T.success.main,.62)),zn(T.Switch,"warningDisabledColor",O(Ss,T.warning.main,.62)),zn(T.TableCell,"border",O(Ss,O(AC,T.divider,1),.88)),zn(T.Tooltip,"bg",O(AC,T.grey[700],.92))}if(T.mode==="dark"){zn(T.Alert,"errorColor",O(Ss,T.error.light,.6)),zn(T.Alert,"infoColor",O(Ss,T.info.light,.6)),zn(T.Alert,"successColor",O(Ss,T.success.light,.6)),zn(T.Alert,"warningColor",O(Ss,T.warning.light,.6)),zn(T.Alert,"errorFilledBg",D("palette-error-dark")),zn(T.Alert,"infoFilledBg",D("palette-info-dark")),zn(T.Alert,"successFilledBg",D("palette-success-dark")),zn(T.Alert,"warningFilledBg",D("palette-warning-dark")),zn(T.Alert,"errorFilledColor",Fy(()=>T.getContrastText(T.error.dark))),zn(T.Alert,"infoFilledColor",Fy(()=>T.getContrastText(T.info.dark))),zn(T.Alert,"successFilledColor",Fy(()=>T.getContrastText(T.success.dark))),zn(T.Alert,"warningFilledColor",Fy(()=>T.getContrastText(T.warning.dark))),zn(T.Alert,"errorStandardBg",O(ws,T.error.light,.9)),zn(T.Alert,"infoStandardBg",O(ws,T.info.light,.9)),zn(T.Alert,"successStandardBg",O(ws,T.success.light,.9)),zn(T.Alert,"warningStandardBg",O(ws,T.warning.light,.9)),zn(T.Alert,"errorIconColor",D("palette-error-main")),zn(T.Alert,"infoIconColor",D("palette-info-main")),zn(T.Alert,"successIconColor",D("palette-success-main")),zn(T.Alert,"warningIconColor",D("palette-warning-main")),zn(T.AppBar,"defaultBg",D("palette-grey-900")),zn(T.AppBar,"darkBg",D("palette-background-paper")),zn(T.AppBar,"darkColor",D("palette-text-primary")),zn(T.Avatar,"defaultBg",D("palette-grey-600")),zn(T.Button,"inheritContainedBg",D("palette-grey-800")),zn(T.Button,"inheritContainedHoverBg",D("palette-grey-700")),zn(T.Chip,"defaultBorder",D("palette-grey-700")),zn(T.Chip,"defaultAvatarColor",D("palette-grey-300")),zn(T.Chip,"defaultIconColor",D("palette-grey-300")),zn(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),zn(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),zn(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),zn(T.LinearProgress,"primaryBg",O(ws,T.primary.main,.5)),zn(T.LinearProgress,"secondaryBg",O(ws,T.secondary.main,.5)),zn(T.LinearProgress,"errorBg",O(ws,T.error.main,.5)),zn(T.LinearProgress,"infoBg",O(ws,T.info.main,.5)),zn(T.LinearProgress,"successBg",O(ws,T.success.main,.5)),zn(T.LinearProgress,"warningBg",O(ws,T.warning.main,.5)),zn(T.Skeleton,"bg",C?O(AC,T.text.primary,.13):`rgba(${D("palette-text-primaryChannel")} / 0.13)`),zn(T.Slider,"primaryTrack",O(ws,T.primary.main,.5)),zn(T.Slider,"secondaryTrack",O(ws,T.secondary.main,.5)),zn(T.Slider,"errorTrack",O(ws,T.error.main,.5)),zn(T.Slider,"infoTrack",O(ws,T.info.main,.5)),zn(T.Slider,"successTrack",O(ws,T.success.main,.5)),zn(T.Slider,"warningTrack",O(ws,T.warning.main,.5));const z=C?O(Ss,T.background.default,.985):VL(T.background.default,.98);zn(T.SnackbarContent,"bg",z),zn(T.SnackbarContent,"color",Fy(()=>C?GVe.text.primary:T.getContrastText(z))),zn(T.SpeedDialAction,"fabHoverBg",VL(T.background.paper,.15)),zn(T.StepConnector,"border",D("palette-grey-600")),zn(T.StepContent,"border",D("palette-grey-600")),zn(T.Switch,"defaultColor",D("palette-grey-300")),zn(T.Switch,"defaultDisabledColor",D("palette-grey-600")),zn(T.Switch,"primaryDisabledColor",O(ws,T.primary.main,.55)),zn(T.Switch,"secondaryDisabledColor",O(ws,T.secondary.main,.55)),zn(T.Switch,"errorDisabledColor",O(ws,T.error.main,.55)),zn(T.Switch,"infoDisabledColor",O(ws,T.info.main,.55)),zn(T.Switch,"successDisabledColor",O(ws,T.success.main,.55)),zn(T.Switch,"warningDisabledColor",O(ws,T.warning.main,.55)),zn(T.TableCell,"border",O(ws,O(AC,T.divider,1),.68)),zn(T.Tooltip,"bg",O(AC,T.grey[700],.92))}jv(T.background,"default"),jv(T.background,"paper"),jv(T.common,"background"),jv(T.common,"onBackground"),jv(T,"divider"),Object.keys(T).forEach(z=>{const F=T[z];z!=="tonalOffset"&&F&&typeof F=="object"&&(F.main&&zn(T[z],"mainChannel",Mk(Rk(F.main))),F.light&&zn(T[z],"lightChannel",Mk(Rk(F.light))),F.dark&&zn(T[z],"darkChannel",Mk(Rk(F.dark))),F.contrastText&&zn(T[z],"contrastTextChannel",Mk(Rk(F.contrastText))),z==="text"&&(jv(T[z],"primary"),jv(T[z],"secondary")),z==="action"&&(F.active&&jv(T[z],"active"),F.selected&&jv(T[z],"selected")))})}),N=t.reduce((k,T)=>Qd(k,T),N);const E={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:l,getSelector:KBt(N),enableContrastVars:a},{vars:I,generateThemeVars:A,generateStyleSheets:R}=W7t(N,E);return N.vars=I,Object.entries(N.colorSchemes[N.defaultColorScheme]).forEach(([k,T])=>{N[k]=T}),N.generateThemeVars=A,N.generateStyleSheets=R,N.generateSpacing=function(){return TVe(d.spacing,QH(this))},N.getColorSchemeSelector=q7t(c),N.spacing=N.generateSpacing(),N.shouldSkipGeneratingVar=l,N.unstable_sxConfig={...aO,...d==null?void 0:d.unstable_sxConfig},N.unstable_sx=function(T){return OS({sx:T,theme:this})},N.toRuntimeSource=YVe,N}function M_e(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:sde({...n===!0?{}:n.palette,mode:t})})}function UI(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...a}=e,l=i||"light",c=o==null?void 0:o[l],u={...o,...n?{[l]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Dte(e,...t);let d=n;"palette"in e||u[l]&&(u[l]!==!0?d=u[l].palette:l==="dark"&&(d={mode:"dark"}));const f=Dte({...e,palette:d},...t);return f.defaultColorScheme=l,f.colorSchemes=u,f.palette.mode==="light"&&(f.colorSchemes.light={...u.light!==!0&&u.light,palette:f.palette},M_e(f,"dark",u.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:f.palette},M_e(f,"light",u.light)),f}return!n&&!("light"in u)&&l==="light"&&(u.light=!0),JBt({...a,colorSchemes:u,defaultColorScheme:l,...typeof r!="boolean"&&r},...t)}function QBt(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function ezt(e){return parseFloat(e)}const lde=UI();function Rm(){const e=sO(lde);return e[Nb]||e}function JVe(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Hp=e=>JVe(e)&&e!=="classes",qt=DVe({themeId:Nb,defaultTheme:lde,rootShouldForwardProp:Hp});function tzt({theme:e,...t}){const n=Nb in e?e[Nb]:void 0;return s.jsx(HVe,{...t,themeId:n?Nb:void 0,theme:n||e})}const UL={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:nzt}=H7t({themeId:Nb,theme:()=>UI({cssVariables:!0}),colorSchemeStorageKey:UL.colorSchemeStorageKey,modeStorageKey:UL.modeStorageKey,defaultColorScheme:{light:UL.defaultLightColorScheme,dark:UL.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:qVe(e.palette,e.typography)};return t.unstable_sx=function(r){return OS({sx:r,theme:this})},t}}),rzt=nzt;function cde({theme:e,...t}){const n=p.useMemo(()=>{if(typeof e=="function")return e;const r=Nb in e?e[Nb]:e;return"colorSchemes"in r?null:"vars"in r?e:{...e,vars:null}},[e]);return n?s.jsx(tzt,{theme:n,...t}):s.jsx(rzt,{theme:e,...t})}function $te(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function fS(e){const{controlled:t,default:n,name:r,state:o="value"}=e,{current:i}=p.useRef(t!==void 0),[a,l]=p.useState(n),c=i?t:a,u=p.useCallback(d=>{i||l(d)},[]);return[c,u]}function ude(e){const t=p.useRef({});return p.useEffect(()=>{t.current=e}),t.current}function R_e({array1:e,array2:t,parser:n=r=>r}){return e&&t&&e.length===t.length&&e.every((r,o)=>n(r)===n(t[o]))}function O_e(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function ozt(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(l,{inputValue:c,getOptionLabel:u})=>{let d=a?c.trim():c;n&&(d=d.toLowerCase()),t&&(d=O_e(d));const f=d?l.filter(h=>{let m=(i||u)(h);return n&&(m=m.toLowerCase()),t&&(m=O_e(m)),o==="start"?m.startsWith(d):m.includes(d)}):l;return typeof r=="number"?f.slice(0,r):f}}const izt=ozt(),D_e=5,azt=e=>{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))},szt=[];function L_e(e,t,n,r){if(t||e==null||r)return"";const o=n(e);return typeof o=="string"?o:""}function lzt(e){const{unstable_isActiveElementInListbox:t=azt,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:l=!e.freeSolo,clearOnEscape:c=!1,componentName:u="useAutocomplete",defaultValue:d=e.multiple?szt:null,disableClearable:f=!1,disableCloseOnSelect:h=!1,disabled:m,disabledItemsFocusable:g=!1,disableListWrap:b=!1,filterOptions:y=izt,filterSelectedOptions:v=!1,freeSolo:x=!1,getOptionDisabled:S,getOptionKey:C,getOptionLabel:_=lt=>lt.label??lt,groupBy:N,handleHomeEndKeys:E=!e.freeSolo,id:I,includeInputInList:A=!1,inputValue:R,isOptionEqualToValue:k=(lt,Xe)=>lt===Xe,multiple:T=!1,onChange:D,onClose:O,onHighlightChange:z,onInputChange:F,onOpen:U,open:G,openOnFocus:W=!1,options:Y,readOnly:B=!1,renderValue:$,selectOnFocus:K=!e.freeSolo,value:q}=e,Z=pi(I);let J=_;J=lt=>{const Xe=_(lt);return typeof Xe!="string"?String(Xe):Xe};const oe=p.useRef(!1),de=p.useRef(!0),ae=p.useRef(null),ue=p.useRef(null),[ce,se]=p.useState(null),[me,fe]=p.useState(-1),te=o?0:-1,ye=p.useRef(te),ve=p.useRef(L_e(d??q,T,J)).current,[ge,Ee]=fS({controlled:q,default:d,name:u}),[xe,Ne]=fS({controlled:R,default:ve,name:u,state:"inputValue"}),[_e,Be]=p.useState(!1),Te=p.useCallback((lt,Xe,yt)=>{if(!(T?ge.length!(v&&(T?ge:[ge]).some(Xe=>Xe!==null&&k(lt,Xe)))),{inputValue:ft&&ht?"":xe,getOptionLabel:J}):[],st=ude({filteredOptions:De,value:ge,inputValue:xe});p.useEffect(()=>{const lt=ge!==st.value;_e&&!lt||x&&!lt||Te(null,ge,"reset")},[ge,Te,_e,st.value,x]);const vt=Ge&&De.length>0&&!B,qe=no(lt=>{if(lt===-1)ae.current.focus();else{const Xe=$?"data-item-index":"data-tag-index";ce.querySelector(`[${Xe}="${lt}"]`).focus()}});p.useEffect(()=>{T&&me>ge.length-1&&(fe(-1),qe(-1))},[ge,T,me,qe]);function Ye(lt,Xe){if(!ue.current||lt<0||lt>=De.length)return-1;let yt=lt;for(;;){const Mt=ue.current.querySelector(`[data-option-index="${yt}"]`),tn=g?!1:!Mt||Mt.disabled||Mt.getAttribute("aria-disabled")==="true";if(Mt&&Mt.hasAttribute("tabindex")&&!tn)return yt;if(Xe==="next"?yt=(yt+1)%De.length:yt=(yt-1+De.length)%De.length,yt===lt)return-1}}const mt=no(({event:lt,index:Xe,reason:yt})=>{if(ye.current=Xe,Xe===-1?ae.current.removeAttribute("aria-activedescendant"):ae.current.setAttribute("aria-activedescendant",`${Z}-option-${Xe}`),z&&["mouse","keyboard","touch"].includes(yt)&&z(lt,Xe===-1?null:De[Xe],yt),!ue.current)return;const Mt=ue.current.querySelector(`[role="option"].${n}-focused`);Mt&&(Mt.classList.remove(`${n}-focused`),Mt.classList.remove(`${n}-focusVisible`));let tn=ue.current;if(ue.current.getAttribute("role")!=="listbox"&&(tn=ue.current.parentElement.querySelector('[role="listbox"]')),!tn)return;if(Xe===-1){tn.scrollTop=0;return}const mn=ue.current.querySelector(`[data-option-index="${Xe}"]`);if(mn&&(mn.classList.add(`${n}-focused`),yt==="keyboard"&&mn.classList.add(`${n}-focusVisible`),tn.scrollHeight>tn.clientHeight&&yt!=="mouse"&&yt!=="touch")){const Tn=mn,Fn=tn.clientHeight+tn.scrollTop,mr=Tn.offsetTop+Tn.offsetHeight;mr>Fn?tn.scrollTop=mr-tn.clientHeight:Tn.offsetTop-Tn.offsetHeight*(N?1.3:0){if(!Qe)return;const mn=Ye((()=>{const Tn=De.length-1;if(Xe==="reset")return te;if(Xe==="start")return 0;if(Xe==="end")return Tn;const Fn=ye.current+Xe;return Fn<0?Fn===-1&&A?-1:b&&ye.current!==-1||Math.abs(Xe)>1?0:Tn:Fn>Tn?Fn===Tn+1&&A?-1:b||Math.abs(Xe)>1?Tn:0:Fn})(),yt);if(mt({index:mn,reason:Mt,event:lt}),r&&Xe!=="reset")if(mn===-1)ae.current.value=xe;else{const Tn=J(De[mn]);ae.current.value=Tn,Tn.toLowerCase().indexOf(xe.toLowerCase())===0&&xe.length>0&&ae.current.setSelectionRange(xe.length,Tn.length)}}),vn=!R_e({array1:st.filteredOptions,array2:De,parser:J}),gt=()=>{const lt=(Xe,yt)=>{const Mt=Xe?J(Xe):"",tn=yt?J(yt):"";return Mt===tn};if(ye.current!==-1&&!R_e({array1:st.filteredOptions,array2:De,parser:J})&&st.inputValue===xe&&(T?ge.length===st.value.length&&st.value.every((Xe,yt)=>J(ge[yt])===J(Xe)):lt(st.value,ge))){const Xe=st.filteredOptions[ye.current];if(Xe)return De.findIndex(yt=>J(yt)===J(Xe))}return-1},Fe=p.useCallback(()=>{if(!Qe)return;const lt=gt();if(lt!==-1){ye.current=lt;return}const Xe=T?ge[0]:ge;if(De.length===0||Xe==null){Et({diff:"reset"});return}if(ue.current){if(Xe!=null){const yt=De[ye.current];if(T&&yt&&ge.findIndex(tn=>k(yt,tn))!==-1)return;const Mt=De.findIndex(tn=>k(tn,Xe));Mt===-1?Et({diff:"reset"}):mt({index:Mt});return}if(ye.current>=De.length-1){mt({index:De.length-1});return}mt({index:ye.current})}},[De.length,T?!1:ge,Et,mt,Qe,xe,T]),$e=no(lt=>{$te(ue,lt),lt&&Fe()});p.useEffect(()=>{(vn||Qe)&&Fe()},[Fe,vn,Qe]);const nt=lt=>{Ge||(Ze(!0),Oe(!0),U&&U(lt))},wt=(lt,Xe)=>{Ge&&(Ze(!1),O&&O(lt,Xe))},Dt=(lt,Xe,yt,Mt)=>{if(T){if(ge.length===Xe.length&&ge.every((tn,mn)=>tn===Xe[mn]))return}else if(ge===Xe)return;D&&D(lt,Xe,yt,Mt),Ee(Xe)},on=p.useRef(!1),jn=(lt,Xe,yt="selectOption",Mt="options")=>{let tn=yt,mn=Xe;if(T){mn=Array.isArray(ge)?ge.slice():[];const Tn=mn.findIndex(Fn=>k(Xe,Fn));Tn===-1?mn.push(Xe):Mt!=="freeSolo"&&(mn.splice(Tn,1),tn="removeOption")}Te(lt,mn,tn),Dt(lt,mn,tn,{option:Xe}),!h&&(!lt||!lt.ctrlKey&&!lt.metaKey)&&wt(lt,tn),(a===!0||a==="touch"&&on.current||a==="mouse"&&!on.current)&&ae.current.blur()};function kt(lt,Xe){if(lt===-1)return-1;let yt=lt;for(;;){if(Xe==="next"&&yt===ge.length||Xe==="previous"&&yt===-1)return-1;const Mt=$?"data-item-index":"data-tag-index",tn=ce.querySelector(`[${Mt}="${yt}"]`);if(!tn||!tn.hasAttribute("tabindex")||tn.disabled||tn.getAttribute("aria-disabled")==="true")yt+=Xe==="next"?1:-1;else return yt}}const pn=(lt,Xe)=>{if(!T)return;xe===""&&wt(lt,"toggleInput");let yt=me;me===-1?xe===""&&Xe==="previous"&&(yt=ge.length-1):(yt+=Xe==="next"?1:-1,yt<0&&(yt=0),yt===ge.length&&(yt=-1)),yt=kt(yt,Xe),fe(yt),qe(yt)},tt=lt=>{oe.current=!0,Ne(""),F&&F(lt,"","clear"),Dt(lt,T?[]:null,"clear")},jt=lt=>Xe=>{if(lt.onKeyDown&<.onKeyDown(Xe),!Xe.defaultMuiPrevented&&(me!==-1&&!["ArrowLeft","ArrowRight"].includes(Xe.key)&&(fe(-1),qe(-1)),Xe.which!==229))switch(Xe.key){case"Home":Qe&&E&&(Xe.preventDefault(),Et({diff:"start",direction:"next",reason:"keyboard",event:Xe}));break;case"End":Qe&&E&&(Xe.preventDefault(),Et({diff:"end",direction:"previous",reason:"keyboard",event:Xe}));break;case"PageUp":Xe.preventDefault(),Et({diff:-D_e,direction:"previous",reason:"keyboard",event:Xe}),nt(Xe);break;case"PageDown":Xe.preventDefault(),Et({diff:D_e,direction:"next",reason:"keyboard",event:Xe}),nt(Xe);break;case"ArrowDown":Xe.preventDefault(),Et({diff:1,direction:"next",reason:"keyboard",event:Xe}),nt(Xe);break;case"ArrowUp":Xe.preventDefault(),Et({diff:-1,direction:"previous",reason:"keyboard",event:Xe}),nt(Xe);break;case"ArrowLeft":!T&&$&&ge!=null?(fe(0),qe(0)):pn(Xe,"previous");break;case"ArrowRight":!T&&$?(fe(-1),qe(-1)):pn(Xe,"next");break;case"Enter":if(ye.current!==-1&&Qe){const yt=De[ye.current],Mt=S?S(yt):!1;if(Xe.preventDefault(),Mt)return;jn(Xe,yt,"selectOption"),r&&ae.current.setSelectionRange(ae.current.value.length,ae.current.value.length)}else x&&xe!==""&&ft===!1&&(T&&Xe.preventDefault(),jn(Xe,xe,"createOption","freeSolo"));break;case"Escape":Qe?(Xe.preventDefault(),Xe.stopPropagation(),wt(Xe,"escape")):c&&(xe!==""||T&&ge.length>0||$)&&(Xe.preventDefault(),Xe.stopPropagation(),tt(Xe));break;case"Backspace":if(T&&!B&&xe===""&&ge.length>0){const yt=me===-1?ge.length-1:me,Mt=ge.slice();Mt.splice(yt,1),Dt(Xe,Mt,"removeOption",{option:ge[yt]})}!T&&$&&!B&&(Ee(null),fe(-1),qe(-1));break;case"Delete":if(T&&!B&&xe===""&&ge.length>0&&me!==-1){const yt=me,Mt=ge.slice();Mt.splice(yt,1),Dt(Xe,Mt,"removeOption",{option:ge[yt]})}!T&&$&&!B&&(Ee(null),fe(-1),qe(-1));break}},Nn=lt=>{Be(!0),me!==-1&&(fe(-1),qe(-1)),W&&!oe.current&&nt(lt)},Xt=lt=>{if(t(ue)){ae.current.focus();return}Be(!1),de.current=!0,oe.current=!1,i&&ye.current!==-1&&Qe?jn(lt,De[ye.current],"blur"):i&&x&&xe!==""?jn(lt,xe,"blur","freeSolo"):l&&Te(lt,ge,"blur"),wt(lt,"blur")},ln=lt=>{const Xe=lt.target.value;xe!==Xe&&(Ne(Xe),Oe(!1),F&&F(lt,Xe,"input")),Xe===""?!f&&!T&&Dt(lt,null,"clear"):nt(lt)},un=lt=>{const Xe=Number(lt.currentTarget.getAttribute("data-option-index"));ye.current!==Xe&&mt({event:lt,index:Xe,reason:"mouse"})},Kt=lt=>{mt({event:lt,index:Number(lt.currentTarget.getAttribute("data-option-index")),reason:"touch"}),on.current=!0},On=lt=>{const Xe=Number(lt.currentTarget.getAttribute("data-option-index"));jn(lt,De[Xe],"selectOption"),on.current=!1},Pr=lt=>Xe=>{const yt=ge.slice();yt.splice(lt,1),Dt(Xe,yt,"removeOption",{option:ge[lt]})},ur=lt=>{Dt(lt,null,"removeOption",{option:ge})},Ht=lt=>{Ge?wt(lt,"toggleInput"):nt(lt)},Tt=lt=>{lt.currentTarget.contains(lt.target)&<.target.getAttribute("id")!==Z&<.preventDefault()},Zt=lt=>{lt.currentTarget.contains(lt.target)&&(ae.current.focus(),K&&de.current&&ae.current.selectionEnd-ae.current.selectionStart===0&&ae.current.select(),de.current=!1)},Ut=lt=>{!m&&(xe===""||!Ge)&&Ht(lt)};let Sn=x&&xe.length>0;Sn=Sn||(T?ge.length>0:ge!==null);let Mn=De;return N&&(Mn=De.reduce((lt,Xe,yt)=>{const Mt=N(Xe);return lt.length>0&<[lt.length-1].group===Mt?lt[lt.length-1].options.push(Xe):lt.push({key:yt,index:yt,group:Mt,options:[Xe]}),lt},[])),m&&_e&&Xt(),{getRootProps:(lt={})=>({...lt,onKeyDown:jt(lt),onMouseDown:Tt,onClick:Zt}),getInputLabelProps:()=>({id:`${Z}-label`,htmlFor:Z}),getInputProps:()=>({id:Z,value:xe,onBlur:Xt,onFocus:Nn,onChange:ln,onMouseDown:Ut,"aria-activedescendant":Qe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":vt?`${Z}-listbox`:void 0,"aria-expanded":vt,autoComplete:"off",ref:ae,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:m}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:tt}),getItemProps:({index:lt=0}={})=>({...T&&{key:lt},...$?{"data-item-index":lt}:{"data-tag-index":lt},tabIndex:-1,...!B&&{onDelete:T?Pr(lt):ur}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Ht}),getTagProps:({index:lt})=>({key:lt,"data-tag-index":lt,tabIndex:-1,...!B&&{onDelete:Pr(lt)}}),getListboxProps:()=>({role:"listbox",id:`${Z}-listbox`,"aria-labelledby":`${Z}-label`,ref:$e,onMouseDown:lt=>{lt.preventDefault()}}),getOptionProps:({index:lt,option:Xe})=>{const yt=(T?ge:[ge]).some(tn=>tn!=null&&k(Xe,tn)),Mt=S?S(Xe):!1;return{key:(C==null?void 0:C(Xe))??J(Xe),tabIndex:-1,role:"option",id:`${Z}-option-${lt}`,onMouseMove:un,onClick:On,onTouchStart:Kt,"data-option-index":lt,"aria-disabled":Mt,"aria-selected":yt}},id:Z,inputValue:xe,value:ge,dirty:Sn,expanded:Qe&&ce,popupOpen:Qe,focused:_e||me!==-1,anchorEl:ce,setAnchorEl:se,focusedItem:me,focusedTag:me,groupedOptions:Mn}}function lc(e){return e&&e.ownerDocument||document}var _h="top",Rg="bottom",Og="right",jh="left",dde="auto",uO=[_h,Rg,Og,jh],vP="start",VM="end",czt="clippingParents",QVe="viewport",ET="popper",uzt="reference",$_e=uO.reduce(function(e,t){return e.concat([t+"-"+vP,t+"-"+VM])},[]),eUe=[].concat(uO,[dde]).reduce(function(e,t){return e.concat([t,t+"-"+vP,t+"-"+VM])},[]),dzt="beforeRead",fzt="read",pzt="afterRead",hzt="beforeMain",mzt="main",gzt="afterMain",yzt="beforeWrite",bzt="write",vzt="afterWrite",xzt=[dzt,fzt,pzt,hzt,mzt,gzt,yzt,bzt,vzt];function $b(e){return e?(e.nodeName||"").toLowerCase():null}function Am(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function k_(e){var t=Am(e).Element;return e instanceof t||e instanceof Element}function Cg(e){var t=Am(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function fde(e){if(typeof ShadowRoot>"u")return!1;var t=Am(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function wzt(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!Cg(i)||!$b(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var l=o[a];l===!1?i.removeAttribute(a):i.setAttribute(a,l===!0?"":l)}))})}function Szt(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=a.reduce(function(c,u){return c[u]="",c},{});!Cg(o)||!$b(o)||(Object.assign(o.style,l),Object.keys(i).forEach(function(c){o.removeAttribute(c)}))})}}const Czt={name:"applyStyles",enabled:!0,phase:"write",fn:wzt,effect:Szt,requires:["computeStyles"]};function Pb(e){return e.split("-")[0]}var n_=Math.max,AB=Math.min,xP=Math.round;function Fte(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function tUe(){return!/^((?!chrome|android).)*safari/i.test(Fte())}function wP(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Cg(e)&&(o=e.offsetWidth>0&&xP(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&xP(r.height)/e.offsetHeight||1);var a=k_(e)?Am(e):window,l=a.visualViewport,c=!tUe()&&n,u=(r.left+(c&&l?l.offsetLeft:0))/o,d=(r.top+(c&&l?l.offsetTop:0))/i,f=r.width/o,h=r.height/i;return{width:f,height:h,top:d,right:u+f,bottom:d+h,left:u,x:u,y:d}}function pde(e){var t=wP(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function nUe(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&fde(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Gx(e){return Am(e).getComputedStyle(e)}function _zt(e){return["table","td","th"].indexOf($b(e))>=0}function rC(e){return((k_(e)?e.ownerDocument:e.document)||window.document).documentElement}function lV(e){return $b(e)==="html"?e:e.assignedSlot||e.parentNode||(fde(e)?e.host:null)||rC(e)}function F_e(e){return!Cg(e)||Gx(e).position==="fixed"?null:e.offsetParent}function jzt(e){var t=/firefox/i.test(Fte()),n=/Trident/i.test(Fte());if(n&&Cg(e)){var r=Gx(e);if(r.position==="fixed")return null}var o=lV(e);for(fde(o)&&(o=o.host);Cg(o)&&["html","body"].indexOf($b(o))<0;){var i=Gx(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function dO(e){for(var t=Am(e),n=F_e(e);n&&_zt(n)&&Gx(n).position==="static";)n=F_e(n);return n&&($b(n)==="html"||$b(n)==="body"&&Gx(n).position==="static")?t:n||jzt(e)||t}function hde(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function g4(e,t,n){return n_(e,AB(t,n))}function Nzt(e,t,n){var r=g4(e,t,n);return r>n?n:r}function rUe(){return{top:0,right:0,bottom:0,left:0}}function oUe(e){return Object.assign({},rUe(),e)}function iUe(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Ezt=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,oUe(typeof t!="number"?t:iUe(t,uO))};function Pzt(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,l=Pb(n.placement),c=hde(l),u=[jh,Og].indexOf(l)>=0,d=u?"height":"width";if(!(!i||!a)){var f=Ezt(o.padding,n),h=pde(i),m=c==="y"?_h:jh,g=c==="y"?Rg:Og,b=n.rects.reference[d]+n.rects.reference[c]-a[c]-n.rects.popper[d],y=a[c]-n.rects.reference[c],v=dO(i),x=v?c==="y"?v.clientHeight||0:v.clientWidth||0:0,S=b/2-y/2,C=f[m],_=x-h[d]-f[g],N=x/2-h[d]/2+S,E=g4(C,N,_),I=c;n.modifiersData[r]=(t={},t[I]=E,t.centerOffset=E-N,t)}}function Izt(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||nUe(t.elements.popper,o)&&(t.elements.arrow=o))}const Azt={name:"arrow",enabled:!0,phase:"main",fn:Pzt,effect:Izt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function SP(e){return e.split("-")[1]}var Tzt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kzt(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:xP(n*o)/o||0,y:xP(r*o)/o||0}}function B_e(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,l=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,f=e.isFixed,h=a.x,m=h===void 0?0:h,g=a.y,b=g===void 0?0:g,y=typeof d=="function"?d({x:m,y:b}):{x:m,y:b};m=y.x,b=y.y;var v=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),S=jh,C=_h,_=window;if(u){var N=dO(n),E="clientHeight",I="clientWidth";if(N===Am(n)&&(N=rC(n),Gx(N).position!=="static"&&l==="absolute"&&(E="scrollHeight",I="scrollWidth")),N=N,o===_h||(o===jh||o===Og)&&i===VM){C=Rg;var A=f&&N===_&&_.visualViewport?_.visualViewport.height:N[E];b-=A-r.height,b*=c?1:-1}if(o===jh||(o===_h||o===Rg)&&i===VM){S=Og;var R=f&&N===_&&_.visualViewport?_.visualViewport.width:N[I];m-=R-r.width,m*=c?1:-1}}var k=Object.assign({position:l},u&&Tzt),T=d===!0?kzt({x:m,y:b},Am(n)):{x:m,y:b};if(m=T.x,b=T.y,c){var D;return Object.assign({},k,(D={},D[C]=x?"0":"",D[S]=v?"0":"",D.transform=(_.devicePixelRatio||1)<=1?"translate("+m+"px, "+b+"px)":"translate3d("+m+"px, "+b+"px, 0)",D))}return Object.assign({},k,(t={},t[C]=x?b+"px":"",t[S]=v?m+"px":"",t.transform="",t))}function Mzt(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,l=n.roundOffsets,c=l===void 0?!0:l,u={placement:Pb(t.placement),variation:SP(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,B_e(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,B_e(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Rzt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Mzt,data:{}};var GL={passive:!0};function Ozt(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,l=a===void 0?!0:a,c=Am(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(d){d.addEventListener("scroll",n.update,GL)}),l&&c.addEventListener("resize",n.update,GL),function(){i&&u.forEach(function(d){d.removeEventListener("scroll",n.update,GL)}),l&&c.removeEventListener("resize",n.update,GL)}}const Dzt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ozt,data:{}};var Lzt={left:"right",right:"left",bottom:"top",top:"bottom"};function l8(e){return e.replace(/left|right|bottom|top/g,function(t){return Lzt[t]})}var $zt={start:"end",end:"start"};function z_e(e){return e.replace(/start|end/g,function(t){return $zt[t]})}function mde(e){var t=Am(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function gde(e){return wP(rC(e)).left+mde(e).scrollLeft}function Fzt(e,t){var n=Am(e),r=rC(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,l=0,c=0;if(o){i=o.width,a=o.height;var u=tUe();(u||!u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:l+gde(e),y:c}}function Bzt(e){var t,n=rC(e),r=mde(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=n_(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=n_(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+gde(e),c=-r.scrollTop;return Gx(o||n).direction==="rtl"&&(l+=n_(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:l,y:c}}function yde(e){var t=Gx(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function aUe(e){return["html","body","#document"].indexOf($b(e))>=0?e.ownerDocument.body:Cg(e)&&yde(e)?e:aUe(lV(e))}function y4(e,t){var n;t===void 0&&(t=[]);var r=aUe(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=Am(r),a=o?[i].concat(i.visualViewport||[],yde(r)?r:[]):r,l=t.concat(a);return o?l:l.concat(y4(lV(a)))}function Bte(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function zzt(e,t){var n=wP(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function H_e(e,t,n){return t===QVe?Bte(Fzt(e,n)):k_(t)?zzt(t,n):Bte(Bzt(rC(e)))}function Hzt(e){var t=y4(lV(e)),n=["absolute","fixed"].indexOf(Gx(e).position)>=0,r=n&&Cg(e)?dO(e):e;return k_(r)?t.filter(function(o){return k_(o)&&nUe(o,r)&&$b(o)!=="body"}):[]}function Vzt(e,t,n,r){var o=t==="clippingParents"?Hzt(e):[].concat(t),i=[].concat(o,[n]),a=i[0],l=i.reduce(function(c,u){var d=H_e(e,u,r);return c.top=n_(d.top,c.top),c.right=AB(d.right,c.right),c.bottom=AB(d.bottom,c.bottom),c.left=n_(d.left,c.left),c},H_e(e,a,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function sUe(e){var t=e.reference,n=e.element,r=e.placement,o=r?Pb(r):null,i=r?SP(r):null,a=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(o){case _h:c={x:a,y:t.y-n.height};break;case Rg:c={x:a,y:t.y+t.height};break;case Og:c={x:t.x+t.width,y:l};break;case jh:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var u=o?hde(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(i){case vP:c[u]=c[u]-(t[d]/2-n[d]/2);break;case VM:c[u]=c[u]+(t[d]/2-n[d]/2);break}}return c}function UM(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,l=n.boundary,c=l===void 0?czt:l,u=n.rootBoundary,d=u===void 0?QVe:u,f=n.elementContext,h=f===void 0?ET:f,m=n.altBoundary,g=m===void 0?!1:m,b=n.padding,y=b===void 0?0:b,v=oUe(typeof y!="number"?y:iUe(y,uO)),x=h===ET?uzt:ET,S=e.rects.popper,C=e.elements[g?x:h],_=Vzt(k_(C)?C:C.contextElement||rC(e.elements.popper),c,d,a),N=wP(e.elements.reference),E=sUe({reference:N,element:S,placement:o}),I=Bte(Object.assign({},S,E)),A=h===ET?I:N,R={top:_.top-A.top+v.top,bottom:A.bottom-_.bottom+v.bottom,left:_.left-A.left+v.left,right:A.right-_.right+v.right},k=e.modifiersData.offset;if(h===ET&&k){var T=k[o];Object.keys(R).forEach(function(D){var O=[Og,Rg].indexOf(D)>=0?1:-1,z=[_h,Rg].indexOf(D)>=0?"y":"x";R[D]+=T[z]*O})}return R}function Uzt(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=c===void 0?eUe:c,d=SP(r),f=d?l?$_e:$_e.filter(function(g){return SP(g)===d}):uO,h=f.filter(function(g){return u.indexOf(g)>=0});h.length===0&&(h=f);var m=h.reduce(function(g,b){return g[b]=UM(e,{placement:b,boundary:o,rootBoundary:i,padding:a})[Pb(b)],g},{});return Object.keys(m).sort(function(g,b){return m[g]-m[b]})}function Gzt(e){if(Pb(e)===dde)return[];var t=l8(e);return[z_e(e),t,z_e(t)]}function Wzt(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,l=a===void 0?!0:a,c=n.fallbackPlacements,u=n.padding,d=n.boundary,f=n.rootBoundary,h=n.altBoundary,m=n.flipVariations,g=m===void 0?!0:m,b=n.allowedAutoPlacements,y=t.options.placement,v=Pb(y),x=v===y,S=c||(x||!g?[l8(y)]:Gzt(y)),C=[y].concat(S).reduce(function(q,Z){return q.concat(Pb(Z)===dde?Uzt(t,{placement:Z,boundary:d,rootBoundary:f,padding:u,flipVariations:g,allowedAutoPlacements:b}):Z)},[]),_=t.rects.reference,N=t.rects.popper,E=new Map,I=!0,A=C[0],R=0;R=0,z=O?"width":"height",F=UM(t,{placement:k,boundary:d,rootBoundary:f,altBoundary:h,padding:u}),U=O?D?Og:jh:D?Rg:_h;_[z]>N[z]&&(U=l8(U));var G=l8(U),W=[];if(i&&W.push(F[T]<=0),l&&W.push(F[U]<=0,F[G]<=0),W.every(function(q){return q})){A=k,I=!1;break}E.set(k,W)}if(I)for(var Y=g?3:1,B=function(Z){var J=C.find(function(oe){var de=E.get(oe);if(de)return de.slice(0,Z).every(function(ae){return ae})});if(J)return A=J,"break"},$=Y;$>0;$--){var K=B($);if(K==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const qzt={name:"flip",enabled:!0,phase:"main",fn:Wzt,requiresIfExists:["offset"],data:{_skip:!1}};function V_e(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function U_e(e){return[_h,Og,Rg,jh].some(function(t){return e[t]>=0})}function Kzt(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=UM(t,{elementContext:"reference"}),l=UM(t,{altBoundary:!0}),c=V_e(a,r),u=V_e(l,o,i),d=U_e(c),f=U_e(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const Yzt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Kzt};function Xzt(e,t,n){var r=Pb(e),o=[jh,_h].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],l=i[1];return a=a||0,l=(l||0)*o,[jh,Og].indexOf(r)>=0?{x:l,y:a}:{x:a,y:l}}function Zzt(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=eUe.reduce(function(d,f){return d[f]=Xzt(f,t.rects,i),d},{}),l=a[t.placement],c=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const Jzt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Zzt};function Qzt(e){var t=e.state,n=e.name;t.modifiersData[n]=sUe({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const e9t={name:"popperOffsets",enabled:!0,phase:"read",fn:Qzt,data:{}};function t9t(e){return e==="x"?"y":"x"}function n9t(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,l=a===void 0?!1:a,c=n.boundary,u=n.rootBoundary,d=n.altBoundary,f=n.padding,h=n.tether,m=h===void 0?!0:h,g=n.tetherOffset,b=g===void 0?0:g,y=UM(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:d}),v=Pb(t.placement),x=SP(t.placement),S=!x,C=hde(v),_=t9t(C),N=t.modifiersData.popperOffsets,E=t.rects.reference,I=t.rects.popper,A=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,R=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(N){if(i){var D,O=C==="y"?_h:jh,z=C==="y"?Rg:Og,F=C==="y"?"height":"width",U=N[C],G=U+y[O],W=U-y[z],Y=m?-I[F]/2:0,B=x===vP?E[F]:I[F],$=x===vP?-I[F]:-E[F],K=t.elements.arrow,q=m&&K?pde(K):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:rUe(),J=Z[O],oe=Z[z],de=g4(0,E[F],q[F]),ae=S?E[F]/2-Y-de-J-R.mainAxis:B-de-J-R.mainAxis,ue=S?-E[F]/2+Y+de+oe+R.mainAxis:$+de+oe+R.mainAxis,ce=t.elements.arrow&&dO(t.elements.arrow),se=ce?C==="y"?ce.clientTop||0:ce.clientLeft||0:0,me=(D=k==null?void 0:k[C])!=null?D:0,fe=U+ae-me-se,te=U+ue-me,ye=g4(m?AB(G,fe):G,U,m?n_(W,te):W);N[C]=ye,T[C]=ye-U}if(l){var ve,ge=C==="x"?_h:jh,Ee=C==="x"?Rg:Og,xe=N[_],Ne=_==="y"?"height":"width",_e=xe+y[ge],Be=xe-y[Ee],Te=[_h,jh].indexOf(v)!==-1,Ge=(ve=k==null?void 0:k[_])!=null?ve:0,Ze=Te?_e:xe-E[Ne]-I[Ne]-Ge+R.altAxis,ht=Te?xe+E[Ne]+I[Ne]-Ge-R.altAxis:Be,Oe=m&&Te?Nzt(Ze,xe,ht):g4(m?Ze:_e,xe,m?ht:Be);N[_]=Oe,T[_]=Oe-xe}t.modifiersData[r]=T}}const r9t={name:"preventOverflow",enabled:!0,phase:"main",fn:n9t,requiresIfExists:["offset"]};function o9t(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function i9t(e){return e===Am(e)||!Cg(e)?mde(e):o9t(e)}function a9t(e){var t=e.getBoundingClientRect(),n=xP(t.width)/e.offsetWidth||1,r=xP(t.height)/e.offsetHeight||1;return n!==1||r!==1}function s9t(e,t,n){n===void 0&&(n=!1);var r=Cg(t),o=Cg(t)&&a9t(t),i=rC(t),a=wP(e,o,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&(($b(t)!=="body"||yde(i))&&(l=i9t(t)),Cg(t)?(c=wP(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):i&&(c.x=gde(i))),{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function l9t(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&o(c)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function c9t(e){var t=l9t(e);return xzt.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function u9t(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function d9t(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var G_e={placement:"bottom",modifiers:[],strategy:"absolute"};function W_e(){for(var e=arguments.length,t=new Array(e),n=0;nr.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function q_e(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function cUe(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const m=Ae(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),g={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},b={...n,...o,...r};return m.length>0&&(b.className=m),Object.keys(g).length>0&&(b.style=g),{props:b,internalRef:void 0}}const a=TB({...o,...r}),l=q_e(r),c=q_e(o),u=t(a),d=Ae(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),f={...u==null?void 0:u.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},h={...u,...n,...c,...l};return d.length>0&&(h.className=d),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:u.ref}}function uUe(e,t,n){return typeof e=="function"?e(t,n):e}function _P(e){var f;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:uUe(n,r),{props:l,internalRef:c}=cUe({...i,externalSlotProps:a}),u=Yi(c,a==null?void 0:a.ref,(f=e.additionalProps)==null?void 0:f.ref);return lUe(t,{...l,ref:u},r)}function Pj(e){var t;return parseInt(p.version,10)>=19?((t=e==null?void 0:e.props)==null?void 0:t.ref)||null:(e==null?void 0:e.ref)||null}function m9t(e){return typeof e=="function"?e():e}const dUe=p.forwardRef(function(t,n){const{children:r,container:o,disablePortal:i=!1}=t,[a,l]=p.useState(null),c=Yi(p.isValidElement(r)?Pj(r):null,n);if(wa(()=>{i||l(m9t(o)||document.body)},[o,i]),wa(()=>{if(a&&!i)return $te(n,a),()=>{$te(n,null)}},[n,a,i]),i){if(p.isValidElement(r)){const u={ref:c};return p.cloneElement(r,u)}return r}return a&&au.createPortal(r,a)});function g9t(e){return kr("MuiPopper",e)}Mr("MuiPopper",["root"]);function y9t(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function zte(e){return typeof e=="function"?e():e}function b9t(e){return e.nodeType!==void 0}const v9t=e=>{const{classes:t}=e;return qn({root:["root"]},g9t,t)},x9t={},w9t=p.forwardRef(function(t,n){const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:l,open:c,placement:u,popperOptions:d,popperRef:f,slotProps:h={},slots:m={},TransitionProps:g,ownerState:b,...y}=t,v=p.useRef(null),x=Yi(v,n),S=p.useRef(null),C=Yi(S,f),_=p.useRef(C);wa(()=>{_.current=C},[C]),p.useImperativeHandle(f,()=>S.current,[]);const N=y9t(u,i),[E,I]=p.useState(N),[A,R]=p.useState(zte(r));p.useEffect(()=>{S.current&&S.current.forceUpdate()}),p.useEffect(()=>{r&&R(zte(r))},[r]),wa(()=>{if(!A||!c)return;const z=G=>{I(G.placement)};let F=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:G})=>{z(G)}}];l!=null&&(F=F.concat(l)),d&&d.modifiers!=null&&(F=F.concat(d.modifiers));const U=h9t(A,v.current,{placement:N,...d,modifiers:F});return _.current(U),()=>{U.destroy(),_.current(null)}},[A,a,l,c,d,N]);const k={placement:E};g!==null&&(k.TransitionProps=g);const T=v9t(t),D=m.root??"div",O=_P({elementType:D,externalSlotProps:h.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:x},ownerState:t,className:T.root});return s.jsx(D,{...O,children:typeof o=="function"?o(k):o})}),S9t=p.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:l=!1,keepMounted:c=!1,modifiers:u,open:d,placement:f="bottom",popperOptions:h=x9t,popperRef:m,style:g,transition:b=!1,slotProps:y={},slots:v={},...x}=t,[S,C]=p.useState(!0),_=()=>{C(!1)},N=()=>{C(!0)};if(!c&&!d&&(!b||S))return null;let E;if(i)E=i;else if(r){const R=zte(r);E=R&&b9t(R)?lc(R).body:lc(null).body}const I=!d&&c&&(!b||S)?"none":void 0,A=b?{in:d,onEnter:_,onExited:N}:void 0;return s.jsx(dUe,{disablePortal:l,container:E,children:s.jsx(w9t,{anchorEl:r,direction:a,disablePortal:l,modifiers:u,ref:n,open:b?!S:d,placement:f,popperOptions:h,popperRef:m,slotProps:y,slots:v,...x,style:{position:"fixed",top:0,left:0,display:I,...g},TransitionProps:A,children:o})})});function C9t(e){return s.jsx(kVe,{...e,defaultTheme:lde,themeId:Nb})}function bde(e){return function(n){return s.jsx(C9t,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function _9t(){return iV}function Lr(e){return A7t(e)}const j9t=qt(S9t,{name:"MuiPopper",slot:"Root"})({}),fO=p.forwardRef(function(t,n){const r=af(),o=Lr({props:t,name:"MuiPopper"}),{anchorEl:i,component:a,components:l,componentsProps:c,container:u,disablePortal:d,keepMounted:f,modifiers:h,open:m,placement:g,popperOptions:b,popperRef:y,transition:v,slots:x,slotProps:S,...C}=o,_=(x==null?void 0:x.root)??(l==null?void 0:l.Root),N={anchorEl:i,container:u,disablePortal:d,keepMounted:f,modifiers:h,open:m,placement:g,popperOptions:b,popperRef:y,transition:v,...C};return s.jsx(j9t,{as:a,direction:r?"rtl":"ltr",slots:{root:_},slotProps:S??c,...N,ref:n})}),Ar=R7t;function N9t(e){return kr("MuiListSubheader",e)}Mr("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const E9t=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e,a={root:["root",n!=="default"&&`color${_n(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]};return qn(a,N9t,t)},P9t=qt("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${_n(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(Ar(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),Hte=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiListSubheader"}),{className:o,color:i="default",component:a="li",disableGutters:l=!1,disableSticky:c=!1,inset:u=!1,...d}=r,f={...r,color:i,component:a,disableGutters:l,disableSticky:c,inset:u},h=E9t(f);return s.jsx(P9t,{as:a,className:Ae(h.root,o),ref:n,ownerState:f,...d})});Hte&&(Hte.muiSkipListHighlight=!0);function I9t(e){return kr("MuiPaper",e)}Mr("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const A9t=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return qn(i,I9t,o)},T9t=qt("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Ar(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),ds=p.forwardRef(function(t,n){var m;const r=Lr({props:t,name:"MuiPaper"}),o=Rm(),{className:i,component:a="div",elevation:l=1,square:c=!1,variant:u="elevation",...d}=r,f={...r,component:a,elevation:l,square:c,variant:u},h=A9t(f);return s.jsx(T9t,{as:a,ownerState:f,className:Ae(h.root,i),ref:n,...d,style:{...u==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[l],...o.vars&&{"--Paper-overlay":(m=o.vars.overlays)==null?void 0:m[l]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Ux("#fff",Lte(l))}, ${Ux("#fff",Lte(l))})`}},...d.style}})});function K_e(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function k9t(e){return kr("MuiSvgIcon",e)}Mr("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const M9t=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${_n(t)}`,`fontSize${_n(n)}`]};return qn(o,k9t,r)},R9t=qt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${_n(n.color)}`],t[`fontSize${_n(n.fontSize)}`]]}})(Ar(({theme:e})=>{var t,n,r,o,i,a,l,c,u,d,f,h,m,g;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:b=>!b.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((d=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:d.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,b])=>b&&b.main).map(([b])=>{var y,v;return{props:{color:b},style:{color:(v=(y=(e.vars??e).palette)==null?void 0:y[b])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(h=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(g=(m=(e.vars??e).palette)==null?void 0:m.action)==null?void 0:g.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Vte=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:l="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24",...m}=r,g=p.isValidElement(o)&&o.type==="svg",b={...r,color:a,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:g},y={};d||(y.viewBox=h);const v=M9t(b);return s.jsxs(R9t,{as:l,className:Ae(v.root,i),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...y,...m,...g&&o.props,ownerState:b,children:[g?o.props.children:o,f?s.jsx("title",{children:f}):null]})});Vte.muiName="SvgIcon";function si(e,t){function n(r,o){return s.jsx(Vte,{"data-testid":void 0,ref:o,...r,children:e})}return n.muiName=Vte.muiName,p.memo(p.forwardRef(n))}function Fb(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function Q0(e){return lc(e).defaultView||window}function O9t(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function fUe(e,t){if(!e)return t;function n(a,l){const c={};return Object.keys(l).forEach(u=>{O9t(u,l[u])&&typeof a[u]=="function"&&(c[u]=(...d)=>{a[u](...d),l[u](...d)})}),c}if(typeof e=="function"||typeof t=="function")return a=>{const l=typeof t=="function"?t(a):t,c=typeof e=="function"?e({...a,...l}):e,u=Ae(a==null?void 0:a.className,l==null?void 0:l.className,c==null?void 0:c.className),d=n(c,l);return{...l,...c,...d,...!!u&&{className:u},...(l==null?void 0:l.style)&&(c==null?void 0:c.style)&&{style:{...l.style,...c.style}},...(l==null?void 0:l.sx)&&(c==null?void 0:c.sx)&&{sx:[...Array.isArray(l.sx)?l.sx:[l.sx],...Array.isArray(c.sx)?c.sx:[c.sx]]}}};const r=t,o=n(e,r),i=Ae(r==null?void 0:r.className,e==null?void 0:e.className);return{...t,...e,...o,...!!i&&{className:i},...(r==null?void 0:r.style)&&(e==null?void 0:e.style)&&{style:{...r.style,...e.style}},...(r==null?void 0:r.sx)&&(e==null?void 0:e.sx)&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function D9t(e){return typeof e.main=="string"}function L9t(e,t=[]){if(!D9t(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Us(e=[]){return([,t])=>t&&L9t(t,e)}function jP(e){try{return e.matches(":focus-visible")}catch{}return!1}const Y_e={};function kh(e,t){const n=p.useRef(Y_e);return n.current===Y_e&&(n.current=e(t)),n}class kB{constructor(){Le(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new kB}static use(){const t=kh(kB.create).current,[n,r]=p.useState(!1);return t.shouldMount=n,t.setShouldMount=r,p.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=F9t(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function $9t(){return kB.use()}function F9t(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function NP(e,t){return NP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},NP(e,t)}function cV(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,NP(e,t)}function B9t(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function z9t(e,t){e.classList?e.classList.add(t):B9t(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function X_e(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function H9t(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=X_e(e.className,t):e.setAttribute("class",X_e(e.className&&e.className.baseVal||"",t))}const Z_e={disabled:!1},MB=Pe.createContext(null);var pUe=function(t){return t.scrollTop},Ok="unmounted",n2="exited",Nw="entering",f2="entered",Ute="exiting",Om=(function(e){cV(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,l=a&&!a.isMounting?r.enter:r.appear,c;return i.appearStatus=null,r.in?l?(c=n2,i.appearStatus=Nw):c=f2:r.unmountOnExit||r.mountOnEnter?c=Ok:c=n2,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Ok?{status:n2}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==Nw&&a!==f2&&(i=Nw):(a===Nw||a===f2)&&(i=Ute)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,l;return i=a=l=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,l=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:l}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Nw){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Yw.findDOMNode(this);a&&pUe(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===n2&&this.setState({status:Ok})},n.performEnter=function(o){var i=this,a=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[Yw.findDOMNode(this),l],u=c[0],d=c[1],f=this.getTimeouts(),h=l?f.appear:f.enter;if(!o&&!a||Z_e.disabled){this.safeSetState({status:f2},function(){i.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:Nw},function(){i.props.onEntering(u,d),i.onTransitionEnd(h,function(){i.safeSetState({status:f2},function(){i.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),l=this.props.nodeRef?void 0:Yw.findDOMNode(this);if(!i||Z_e.disabled){this.safeSetState({status:n2},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Ute},function(){o.props.onExiting(l),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:n2},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(l){a&&(a=!1,i.nextCallback=null,o(l))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:Yw.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!a||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Ok)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var l=sr(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Pe.createElement(MB.Provider,{value:null},typeof a=="function"?a(o,l):Pe.cloneElement(Pe.Children.only(a),l))},t})(Pe.Component);Om.contextType=MB;Om.propTypes={};function LN(){}Om.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:LN,onEntering:LN,onEntered:LN,onExit:LN,onExiting:LN,onExited:LN};Om.UNMOUNTED=Ok;Om.EXITED=n2;Om.ENTERING=Nw;Om.ENTERED=f2;Om.EXITING=Ute;var V9t=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return z9t(t,r)})},xY=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return H9t(t,r)})},vde=(function(e){cV(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});Le(this,"disposeEffect",()=>this.clear)}static create(){return new dV}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function kp(){const e=kh(dV.create).current;return uV(e.disposeEffect),e}function X9t(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:l,onExited:c,timeout:u}=e,[d,f]=p.useState(!1),h=Ae(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},g=Ae(n.child,d&&n.childLeaving,r&&n.childPulsate);return!l&&!d&&f(!0),p.useEffect(()=>{if(!l&&c!=null){const b=setTimeout(c,u);return()=>{clearTimeout(b)}}},[c,l,u]),s.jsx("span",{className:h,style:m,children:s.jsx("span",{className:g})})}const ug=Mr("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Gte=550,Z9t=80,J9t=Dh` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`,Q9t=Dh` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`,eHt=Dh` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`,tHt=qt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),nHt=qt(X9t,{name:"MuiTouchRipple",slot:"Ripple"})` + opacity: 0; + position: absolute; + + &.${ug.rippleVisible} { + opacity: 0.3; + transform: scale(1); + animation-name: ${J9t}; + animation-duration: ${Gte}ms; + animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; + } + + &.${ug.ripplePulsate} { + animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms; + } + + & .${ug.child} { + opacity: 1; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: currentColor; + } + + & .${ug.childLeaving} { + opacity: 0; + animation-name: ${Q9t}; + animation-duration: ${Gte}ms; + animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; + } + + & .${ug.childPulsate} { + position: absolute; + /* @noflip */ + left: 0px; + top: 0; + animation-name: ${eHt}; + animation-duration: 2500ms; + animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; + animation-iteration-count: infinite; + animation-delay: 200ms; + } +`,rHt=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...l}=r,[c,u]=p.useState([]),d=p.useRef(0),f=p.useRef(null);p.useEffect(()=>{f.current&&(f.current(),f.current=null)},[c]);const h=p.useRef(!1),m=kp(),g=p.useRef(null),b=p.useRef(null),y=p.useCallback(C=>{const{pulsate:_,rippleX:N,rippleY:E,rippleSize:I,cb:A}=C;u(R=>[...R,s.jsx(nHt,{classes:{ripple:Ae(i.ripple,ug.ripple),rippleVisible:Ae(i.rippleVisible,ug.rippleVisible),ripplePulsate:Ae(i.ripplePulsate,ug.ripplePulsate),child:Ae(i.child,ug.child),childLeaving:Ae(i.childLeaving,ug.childLeaving),childPulsate:Ae(i.childPulsate,ug.childPulsate)},timeout:Gte,pulsate:_,rippleX:N,rippleY:E,rippleSize:I},d.current)]),d.current+=1,f.current=A},[i]),v=p.useCallback((C={},_={},N=()=>{})=>{const{pulsate:E=!1,center:I=o||_.pulsate,fakeElement:A=!1}=_;if((C==null?void 0:C.type)==="mousedown"&&h.current){h.current=!1;return}(C==null?void 0:C.type)==="touchstart"&&(h.current=!0);const R=A?null:b.current,k=R?R.getBoundingClientRect():{width:0,height:0,left:0,top:0};let T,D,O;if(I||C===void 0||C.clientX===0&&C.clientY===0||!C.clientX&&!C.touches)T=Math.round(k.width/2),D=Math.round(k.height/2);else{const{clientX:z,clientY:F}=C.touches&&C.touches.length>0?C.touches[0]:C;T=Math.round(z-k.left),D=Math.round(F-k.top)}if(I)O=Math.sqrt((2*k.width**2+k.height**2)/3),O%2===0&&(O+=1);else{const z=Math.max(Math.abs((R?R.clientWidth:0)-T),T)*2+2,F=Math.max(Math.abs((R?R.clientHeight:0)-D),D)*2+2;O=Math.sqrt(z**2+F**2)}C!=null&&C.touches?g.current===null&&(g.current=()=>{y({pulsate:E,rippleX:T,rippleY:D,rippleSize:O,cb:N})},m.start(Z9t,()=>{g.current&&(g.current(),g.current=null)})):y({pulsate:E,rippleX:T,rippleY:D,rippleSize:O,cb:N})},[o,y,m]),x=p.useCallback(()=>{v({},{pulsate:!0})},[v]),S=p.useCallback((C,_)=>{if(m.clear(),(C==null?void 0:C.type)==="touchend"&&g.current){g.current(),g.current=null,m.start(0,()=>{S(C,_)});return}g.current=null,u(N=>N.length>0?N.slice(1):N),f.current=_},[m]);return p.useImperativeHandle(n,()=>({pulsate:x,start:v,stop:S}),[x,v,S]),s.jsx(tHt,{className:Ae(ug.root,i.root,a),ref:b,...l,children:s.jsx(wde,{component:null,exit:!0,children:c})})});function oHt(e){return kr("MuiButtonBase",e)}const iHt=Mr("MuiButtonBase",["root","disabled","focusVisible"]),aHt=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=qn({root:["root",t&&"disabled",n&&"focusVisible"]},oHt,o);return n&&r&&(a.root+=` ${r}`),a},sHt=qt("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${iHt.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Bb=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:l,component:c="button",disabled:u=!1,disableRipple:d=!1,disableTouchRipple:f=!1,focusRipple:h=!1,focusVisibleClassName:m,LinkComponent:g="a",onBlur:b,onClick:y,onContextMenu:v,onDragLeave:x,onFocus:S,onFocusVisible:C,onKeyDown:_,onKeyUp:N,onMouseDown:E,onMouseLeave:I,onMouseUp:A,onTouchEnd:R,onTouchMove:k,onTouchStart:T,tabIndex:D=0,TouchRippleProps:O,touchRippleRef:z,type:F,...U}=r,G=p.useRef(null),W=$9t(),Y=Yi(W.ref,z),[B,$]=p.useState(!1);u&&B&&$(!1),p.useImperativeHandle(o,()=>({focusVisible:()=>{$(!0),G.current.focus()}}),[]);const K=W.shouldMount&&!d&&!u;p.useEffect(()=>{B&&h&&!d&&W.pulsate()},[d,h,B,W]);const q=Nv(W,"start",E,f),Z=Nv(W,"stop",v,f),J=Nv(W,"stop",x,f),oe=Nv(W,"stop",A,f),de=Nv(W,"stop",_e=>{B&&_e.preventDefault(),I&&I(_e)},f),ae=Nv(W,"start",T,f),ue=Nv(W,"stop",R,f),ce=Nv(W,"stop",k,f),se=Nv(W,"stop",_e=>{jP(_e.target)||$(!1),b&&b(_e)},!1),me=no(_e=>{G.current||(G.current=_e.currentTarget),jP(_e.target)&&($(!0),C&&C(_e)),S&&S(_e)}),fe=()=>{const _e=G.current;return c&&c!=="button"&&!(_e.tagName==="A"&&_e.href)},te=no(_e=>{h&&!_e.repeat&&B&&_e.key===" "&&W.stop(_e,()=>{W.start(_e)}),_e.target===_e.currentTarget&&fe()&&_e.key===" "&&_e.preventDefault(),_&&_(_e),_e.target===_e.currentTarget&&fe()&&_e.key==="Enter"&&!u&&(_e.preventDefault(),y&&y(_e))}),ye=no(_e=>{h&&_e.key===" "&&B&&!_e.defaultPrevented&&W.stop(_e,()=>{W.pulsate(_e)}),N&&N(_e),y&&_e.target===_e.currentTarget&&fe()&&_e.key===" "&&!_e.defaultPrevented&&y(_e)});let ve=c;ve==="button"&&(U.href||U.to)&&(ve=g);const ge={};if(ve==="button"){const _e=!!U.formAction;ge.type=F===void 0&&!_e?"button":F,ge.disabled=u}else!U.href&&!U.to&&(ge.role="button"),u&&(ge["aria-disabled"]=u);const Ee=Yi(n,G),xe={...r,centerRipple:i,component:c,disabled:u,disableRipple:d,disableTouchRipple:f,focusRipple:h,tabIndex:D,focusVisible:B},Ne=aHt(xe);return s.jsxs(sHt,{as:ve,className:Ae(Ne.root,l),ownerState:xe,onBlur:se,onClick:y,onContextMenu:Z,onFocus:me,onKeyDown:te,onKeyUp:ye,onMouseDown:q,onMouseLeave:de,onMouseUp:oe,onDragLeave:J,onTouchEnd:ue,onTouchMove:ce,onTouchStart:ae,ref:Ee,tabIndex:u?-1:D,type:F,...ge,...U,children:[a,K?s.jsx(rHt,{ref:Y,center:i,...O}):null]})});function Nv(e,t,n,r=!1){return no(o=>(n&&n(o),r||e[t](o),!0))}function lHt(e){return kr("MuiCircularProgress",e)}Mr("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const l0=44,Wte=Dh` + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +`,qte=Dh` + 0% { + stroke-dasharray: 1px, 200px; + stroke-dashoffset: 0; + } + + 50% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -15px; + } + + 100% { + stroke-dasharray: 1px, 200px; + stroke-dashoffset: -126px; + } +`,cHt=typeof Wte!="string"?Zb` + animation: ${Wte} 1.4s linear infinite; + `:null,uHt=typeof qte!="string"?Zb` + animation: ${qte} 1.4s ease-in-out infinite; + `:null,dHt=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${_n(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${_n(n)}`,o&&"circleDisableShrink"]};return qn(i,lHt,t)},fHt=qt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${_n(n.color)}`]]}})(Ar(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:cHt||{animation:`${Wte} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Us()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),pHt=qt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),hHt=qt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${_n(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Ar(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:uHt||{animation:`${qte} 1.4s ease-in-out infinite`}}]}))),mHt=qt("circle",{name:"MuiCircularProgress",slot:"Track"})(Ar(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),rc=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,enableTrackSlot:l=!1,size:c=40,style:u,thickness:d=3.6,value:f=0,variant:h="indeterminate",...m}=r,g={...r,color:i,disableShrink:a,size:c,thickness:d,value:f,variant:h,enableTrackSlot:l},b=dHt(g),y={},v={},x={};if(h==="determinate"){const S=2*Math.PI*((l0-d)/2);y.strokeDasharray=S.toFixed(3),x["aria-valuenow"]=Math.round(f),y.strokeDashoffset=`${((100-f)/100*S).toFixed(3)}px`,v.transform="rotate(-90deg)"}return s.jsx(fHt,{className:Ae(b.root,o),style:{width:c,height:c,...v,...u},ownerState:g,ref:n,role:"progressbar",...x,...m,children:s.jsxs(pHt,{className:b.svg,ownerState:g,viewBox:`${l0/2} ${l0/2} ${l0} ${l0}`,children:[l?s.jsx(mHt,{className:b.track,ownerState:g,cx:l0,cy:l0,r:(l0-d)/2,fill:"none",strokeWidth:d,"aria-hidden":"true"}):null,s.jsx(hHt,{className:b.circle,style:y,ownerState:g,cx:l0,cy:l0,r:(l0-d)/2,fill:"none",strokeWidth:d})]})})});function gHt(e){return kr("MuiIconButton",e)}const Kte=Mr("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),yHt=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e,l={root:["root",a&&"loading",n&&"disabled",r!=="default"&&`color${_n(r)}`,o&&`edge${_n(o)}`,`size${_n(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return qn(l,gHt,t)},bHt=qt(Bb,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${_n(n.color)}`],n.edge&&t[`edge${_n(n.edge)}`],t[`size${_n(n.size)}`]]}})(Ar(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Ar(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Us()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Us()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Kte.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Kte.loading}`]:{color:"transparent"}}))),vHt=qt("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),vd=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:l="default",disabled:c=!1,disableFocusRipple:u=!1,size:d="medium",id:f,loading:h=null,loadingIndicator:m,...g}=r,b=pi(f),y=m??s.jsx(rc,{"aria-labelledby":b,color:"inherit",size:16}),v={...r,edge:o,color:l,disabled:c,disableFocusRipple:u,loading:h,loadingIndicator:y,size:d},x=yHt(v);return s.jsxs(bHt,{id:h?b:f,className:Ae(x.root,a),centerRipple:!0,focusRipple:!u,disabled:c||h,ref:n,...g,ownerState:v,children:[typeof h=="boolean"&&s.jsx("span",{className:x.loadingWrapper,style:{display:"contents"},children:s.jsx(vHt,{className:x.loadingIndicator,ownerState:v,children:h&&y})}),i]})}),xHt=si(s.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function wHt(e){return kr("MuiChip",e)}const Li=Mr("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]);function Dr(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:l=!1,...c}=t,{component:u,slots:d={[e]:void 0},slotProps:f={[e]:void 0},...h}=i,m=d[e]||r,g=uUe(f[e],o),{props:{component:b,...y},internalRef:v}=cUe({className:n,...c,externalForwardedProps:e==="root"?h:void 0,externalSlotProps:g}),x=Yi(v,g==null?void 0:g.ref,t.ref),S=e==="root"?b||u:b,C=lUe(m,{...e==="root"&&!u&&!d[e]&&a,...e!=="root"&&!d[e]&&a,...y,...S&&!l&&{as:S},...S&&l&&{component:S},ref:x},o);return[m,C]}const SHt=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:l,variant:c}=e,u={root:["root",c,n&&"disabled",`size${_n(r)}`,`color${_n(o)}`,l&&"clickable",l&&`clickableColor${_n(o)}`,a&&"deletable",a&&`deletableColor${_n(o)}`,`${c}${_n(o)}`],label:["label",`label${_n(r)}`],avatar:["avatar",`avatar${_n(r)}`,`avatarColor${_n(o)}`],icon:["icon",`icon${_n(r)}`,`iconColor${_n(i)}`],deleteIcon:["deleteIcon",`deleteIcon${_n(r)}`,`deleteIconColor${_n(o)}`,`deleteIcon${_n(c)}Color${_n(o)}`]};return qn(u,wHt,t)},CHt=qt("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:l,variant:c}=n;return[{[`& .${Li.avatar}`]:t.avatar},{[`& .${Li.avatar}`]:t[`avatar${_n(l)}`]},{[`& .${Li.avatar}`]:t[`avatarColor${_n(r)}`]},{[`& .${Li.icon}`]:t.icon},{[`& .${Li.icon}`]:t[`icon${_n(l)}`]},{[`& .${Li.icon}`]:t[`iconColor${_n(o)}`]},{[`& .${Li.deleteIcon}`]:t.deleteIcon},{[`& .${Li.deleteIcon}`]:t[`deleteIcon${_n(l)}`]},{[`& .${Li.deleteIcon}`]:t[`deleteIconColor${_n(r)}`]},{[`& .${Li.deleteIcon}`]:t[`deleteIcon${_n(c)}Color${_n(r)}`]},t.root,t[`size${_n(l)}`],t[`color${_n(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${_n(r)}`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${_n(r)}`],t[c],t[`${c}${_n(r)}`]]}})(Ar(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Li.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Li.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Li.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Li.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Li.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Li.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Li.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Li.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Li.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Us(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Li.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${Li.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Li.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Li.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(Us(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Li.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${Li.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(Us(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Li.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Li.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Li.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Li.avatar}`]:{marginLeft:4},[`& .${Li.avatarSmall}`]:{marginLeft:2},[`& .${Li.icon}`]:{marginLeft:4},[`& .${Li.iconSmall}`]:{marginLeft:2},[`& .${Li.deleteIcon}`]:{marginRight:5},[`& .${Li.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Us()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.alpha((e.vars||e).palette[n].main,.7)}`,[`&.${Li.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Li.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Li.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),_Ht=qt("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${_n(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function J_e(e){return e.key==="Backspace"||e.key==="Delete"}const N5=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:l="default",component:c,deleteIcon:u,disabled:d=!1,icon:f,label:h,onClick:m,onDelete:g,onKeyDown:b,onKeyUp:y,size:v="medium",variant:x="filled",tabIndex:S,skipFocusWhenDisabled:C=!1,slots:_={},slotProps:N={},...E}=r,I=p.useRef(null),A=Yi(I,n),R=J=>{J.stopPropagation(),g&&g(J)},k=J=>{J.currentTarget===J.target&&J_e(J)&&J.preventDefault(),b&&b(J)},T=J=>{J.currentTarget===J.target&&g&&J_e(J)&&g(J),y&&y(J)},D=a!==!1&&m?!0:a,O=D||g?Bb:c||"div",z={...r,component:O,disabled:d,size:v,color:l,iconColor:p.isValidElement(f)&&f.props.color||l,onDelete:!!g,clickable:D,variant:x},F=SHt(z),U=O===Bb?{component:c||"div",focusVisibleClassName:F.focusVisible,...g&&{disableRipple:!0}}:{};let G=null;g&&(G=u&&p.isValidElement(u)?p.cloneElement(u,{className:Ae(u.props.className,F.deleteIcon),onClick:R}):s.jsx(xHt,{className:F.deleteIcon,onClick:R}));let W=null;o&&p.isValidElement(o)&&(W=p.cloneElement(o,{className:Ae(F.avatar,o.props.className)}));let Y=null;f&&p.isValidElement(f)&&(Y=p.cloneElement(f,{className:Ae(F.icon,f.props.className)}));const B={slots:_,slotProps:N},[$,K]=Dr("root",{elementType:CHt,externalForwardedProps:{...B,...E},ownerState:z,shouldForwardComponentProp:!0,ref:A,className:Ae(F.root,i),additionalProps:{disabled:D&&d?!0:void 0,tabIndex:C&&d?-1:S,...U},getSlotProps:J=>({...J,onClick:oe=>{var de;(de=J.onClick)==null||de.call(J,oe),m==null||m(oe)},onKeyDown:oe=>{var de;(de=J.onKeyDown)==null||de.call(J,oe),k(oe)},onKeyUp:oe=>{var de;(de=J.onKeyUp)==null||de.call(J,oe),T(oe)}})}),[q,Z]=Dr("label",{elementType:_Ht,externalForwardedProps:B,ownerState:z,className:F.label});return s.jsxs($,{as:O,...K,children:[W||Y,s.jsx(q,{...Z,children:h}),G]})});function WL(e){return parseInt(e,10)||0}const jHt={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function NHt(e){for(const t in e)return!1;return!0}function Q_e(e){return NHt(e)||e.outerHeightStyle===0&&!e.overflowing}const hUe=p.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:a,value:l,...c}=t,{current:u}=p.useRef(l!=null),d=p.useRef(null),f=Yi(n,d),h=p.useRef(null),m=p.useRef(null),g=p.useCallback(()=>{const S=d.current,C=m.current;if(!S||!C)return;const N=Q0(S).getComputedStyle(S);if(N.width==="0px")return{outerHeightStyle:0,overflowing:!1};C.style.width=N.width,C.value=S.value||t.placeholder||"x",C.value.slice(-1)===` +`&&(C.value+=" ");const E=N.boxSizing,I=WL(N.paddingBottom)+WL(N.paddingTop),A=WL(N.borderBottomWidth)+WL(N.borderTopWidth),R=C.scrollHeight;C.value="x";const k=C.scrollHeight;let T=R;i&&(T=Math.max(Number(i)*k,T)),o&&(T=Math.min(Number(o)*k,T)),T=Math.max(T,k);const D=T+(E==="border-box"?I+A:0),O=Math.abs(T-R)<=1;return{outerHeightStyle:D,overflowing:O}},[o,i,t.placeholder]),b=no(()=>{const S=d.current,C=g();if(!S||!C||Q_e(C))return!1;const _=C.outerHeightStyle;return h.current!=null&&h.current!==_}),y=p.useCallback(()=>{const S=d.current,C=g();if(!S||!C||Q_e(C))return;const _=C.outerHeightStyle;h.current!==_&&(h.current=_,S.style.height=`${_}px`),S.style.overflow=C.overflowing?"hidden":""},[g]),v=p.useRef(-1);wa(()=>{const S=Fb(y),C=d==null?void 0:d.current;if(!C)return;const _=Q0(C);_.addEventListener("resize",S);let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(()=>{b()&&(N.unobserve(C),cancelAnimationFrame(v.current),y(),v.current=requestAnimationFrame(()=>{N.observe(C)}))}),N.observe(C)),()=>{S.clear(),cancelAnimationFrame(v.current),_.removeEventListener("resize",S),N&&N.disconnect()}},[g,y,b]),wa(()=>{y()});const x=S=>{u||y();const C=S.target,_=C.value.length,N=C.value.endsWith(` +`),E=C.selectionStart===_;N&&E&&C.setSelectionRange(_,_),r&&r(S)};return s.jsxs(p.Fragment,{children:[s.jsx("textarea",{value:l,onChange:x,ref:f,rows:i,style:a,...c}),s.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:m,tabIndex:-1,style:{...jHt.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function Ij({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const fV=p.createContext(void 0);function f1(){return p.useContext(fV)}function eje(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function RB(e,t=!1){return e&&(eje(e.value)&&e.value!==""||t&&eje(e.defaultValue)&&e.defaultValue!=="")}function EHt(e){return e.startAdornment}function PHt(e){return kr("MuiInputBase",e)}const Sf=Mr("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var tje;const pV=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${_n(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},hV=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},IHt=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:l,fullWidth:c,hiddenLabel:u,multiline:d,readOnly:f,size:h,startAdornment:m,type:g}=e,b={root:["root",`color${_n(n)}`,r&&"disabled",o&&"error",c&&"fullWidth",a&&"focused",l&&"formControl",h&&h!=="medium"&&`size${_n(h)}`,d&&"multiline",m&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",g==="search"&&"inputTypeSearch",d&&"inputMultiline",h==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",m&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]};return qn(b,PHt,t)},mV=qt("div",{name:"MuiInputBase",slot:"Root",overridesResolver:pV})(Ar(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Sf.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),gV=qt("input",{name:"MuiInputBase",slot:"Input",overridesResolver:hV})(Ar(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Sf.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Sf.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),nje=bde({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),pO=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:l,color:c,components:u={},componentsProps:d={},defaultValue:f,disabled:h,disableInjectingGlobalStyles:m,endAdornment:g,error:b,fullWidth:y=!1,id:v,inputComponent:x="input",inputProps:S={},inputRef:C,margin:_,maxRows:N,minRows:E,multiline:I=!1,name:A,onBlur:R,onChange:k,onClick:T,onFocus:D,onKeyDown:O,onKeyUp:z,placeholder:F,readOnly:U,renderSuffix:G,rows:W,size:Y,slotProps:B={},slots:$={},startAdornment:K,type:q="text",value:Z,...J}=r,oe=S.value!=null?S.value:Z,{current:de}=p.useRef(oe!=null),ae=p.useRef(),ue=p.useCallback(De=>{},[]),ce=Yi(ae,C,S.ref,ue),[se,me]=p.useState(!1),fe=f1(),te=Ij({props:r,muiFormControl:fe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});te.focused=fe?fe.focused:se,p.useEffect(()=>{!fe&&h&&se&&(me(!1),R&&R())},[fe,h,se,R]);const ye=fe&&fe.onFilled,ve=fe&&fe.onEmpty,ge=p.useCallback(De=>{RB(De)?ye&&ye():ve&&ve()},[ye,ve]);wa(()=>{de&&ge({value:oe})},[oe,ge,de]);const Ee=De=>{D&&D(De),S.onFocus&&S.onFocus(De),fe&&fe.onFocus?fe.onFocus(De):me(!0)},xe=De=>{R&&R(De),S.onBlur&&S.onBlur(De),fe&&fe.onBlur?fe.onBlur(De):me(!1)},Ne=(De,...st)=>{if(!de){const vt=De.target||ae.current;if(vt==null)throw new Error(Vx(1));ge({value:vt.value})}S.onChange&&S.onChange(De,...st),k&&k(De,...st)};p.useEffect(()=>{ge(ae.current)},[]);const _e=De=>{ae.current&&De.currentTarget===De.target&&ae.current.focus(),T&&T(De)};let Be=x,Te=S;I&&Be==="input"&&(W?Te={type:void 0,minRows:W,maxRows:W,...Te}:Te={type:void 0,maxRows:N,minRows:E,...Te},Be=hUe);const Ge=De=>{ge(De.animationName==="mui-auto-fill-cancel"?ae.current:{value:"x"})};p.useEffect(()=>{fe&&fe.setAdornedStart(!!K)},[fe,K]);const Ze={...r,color:te.color||"primary",disabled:te.disabled,endAdornment:g,error:te.error,focused:te.focused,formControl:fe,fullWidth:y,hiddenLabel:te.hiddenLabel,multiline:I,size:te.size,startAdornment:K,type:q},ht=IHt(Ze),Oe=$.root||u.Root||mV,ft=B.root||d.root||{},Qe=$.input||u.Input||gV;return Te={...Te,...B.input??d.input},s.jsxs(p.Fragment,{children:[!m&&typeof nje=="function"&&(tje||(tje=s.jsx(nje,{}))),s.jsxs(Oe,{...ft,ref:n,onClick:_e,...J,...!CP(Oe)&&{ownerState:{...Ze,...ft.ownerState}},className:Ae(ht.root,ft.className,l,U&&"MuiInputBase-readOnly"),children:[K,s.jsx(fV.Provider,{value:null,children:s.jsx(Qe,{"aria-invalid":te.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:f,disabled:te.disabled,id:v,onAnimationStart:Ge,name:A,placeholder:F,readOnly:U,required:te.required,rows:W,value:oe,onKeyDown:O,onKeyUp:z,type:q,...Te,...!CP(Qe)&&{as:Be,ownerState:{...Ze,...Te.ownerState}},ref:ce,className:Ae(ht.input,Te.className,U&&"MuiInputBase-readOnly"),onBlur:xe,onChange:Ne,onFocus:Ee})}),g,G?G({...te,startAdornment:K}):null]})]})});function AHt(e){return kr("MuiInput",e)}const Ow={...Sf,...Mr("MuiInput",["root","underline","input"])};function THt(e){return kr("MuiOutlinedInput",e)}const ng={...Sf,...Mr("MuiOutlinedInput",["root","notchedOutline","input"])};function kHt(e){return kr("MuiFilledInput",e)}const am={...Sf,...Mr("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},mUe=si(s.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),gUe=si(s.jsx("path",{d:"M7 10l5 5 5-5z"}));function MHt(e){return kr("MuiAutocomplete",e)}const bi=Mr("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var rje,oje;const RHt=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:l,inputFocused:c,popupOpen:u,size:d}=e,f={root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",l&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",c&&"inputFocused"],tag:["tag",`tagSize${_n(d)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return qn(f,MHt,t)},OHt=qt("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:l}=n;return[{[`& .${bi.tag}`]:t.tag},{[`& .${bi.tag}`]:t[`tagSize${_n(l)}`]},{[`& .${bi.inputRoot}`]:t.inputRoot},{[`& .${bi.input}`]:t.input},{[`& .${bi.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${bi.focused} .${bi.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${bi.clearIndicator}`]:{visibility:"visible"}},[`& .${bi.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${bi.inputRoot}`]:{[`.${bi.hasPopupIcon}&, .${bi.hasClearIcon}&`]:{paddingRight:30},[`.${bi.hasPopupIcon}.${bi.hasClearIcon}&`]:{paddingRight:56},[`& .${bi.input}`]:{width:0,minWidth:30}},[`& .${Ow.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Ow.root}.${Sf.sizeSmall}`]:{[`& .${Ow.input}`]:{padding:"2px 4px 3px 0"}},[`& .${ng.root}`]:{padding:9,[`.${bi.hasPopupIcon}&, .${bi.hasClearIcon}&`]:{paddingRight:39},[`.${bi.hasPopupIcon}.${bi.hasClearIcon}&`]:{paddingRight:65},[`& .${bi.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${bi.endAdornment}`]:{right:9}},[`& .${ng.root}.${Sf.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${bi.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${am.root}`]:{paddingTop:19,paddingLeft:8,[`.${bi.hasPopupIcon}&, .${bi.hasClearIcon}&`]:{paddingRight:39},[`.${bi.hasPopupIcon}.${bi.hasClearIcon}&`]:{paddingRight:65},[`& .${am.input}`]:{padding:"7px 4px"},[`& .${bi.endAdornment}`]:{right:9}},[`& .${am.root}.${Sf.sizeSmall}`]:{paddingBottom:1,[`& .${am.input}`]:{padding:"2.5px 4px"}},[`& .${Sf.hiddenLabel}`]:{paddingTop:8},[`& .${am.root}.${Sf.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${bi.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${am.root}.${Sf.hiddenLabel}.${Sf.sizeSmall}`]:{[`& .${bi.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${bi.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${bi.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${bi.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${bi.inputRoot}`]:{flexWrap:"wrap"}}}]}),DHt=qt("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),LHt=qt(vd,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),$Ht=qt(vd,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),FHt=qt(fO,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${bi.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(Ar(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),BHt=qt(ds,{name:"MuiAutocomplete",slot:"Paper"})(Ar(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),zHt=qt("div",{name:"MuiAutocomplete",slot:"Loading"})(Ar(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),HHt=qt("div",{name:"MuiAutocomplete",slot:"NoOptions"})(Ar(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),VHt=qt("ul",{name:"MuiAutocomplete",slot:"Listbox"})(Ar(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${bi.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${bi.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${bi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${bi.focused}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${bi.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))),UHt=qt(Hte,{name:"MuiAutocomplete",slot:"GroupLabel"})(Ar(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),GHt=qt("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${bi.option}`]:{paddingLeft:24}}),WHt=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiAutocomplete"}),{autoComplete:o=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:l=!1,ChipProps:c,className:u,clearIcon:d=rje||(rje=s.jsx(mUe,{fontSize:"small"})),clearOnBlur:f=!r.freeSolo,clearOnEscape:h=!1,clearText:m="Clear",closeText:g="Close",componentsProps:b,defaultValue:y=r.multiple?[]:null,disableClearable:v=!1,disableCloseOnSelect:x=!1,disabled:S=!1,disabledItemsFocusable:C=!1,disableListWrap:_=!1,disablePortal:N=!1,filterOptions:E,filterSelectedOptions:I=!1,forcePopupIcon:A="auto",freeSolo:R=!1,fullWidth:k=!1,getLimitTagsText:T=Ie=>`+${Ie}`,getOptionDisabled:D,getOptionKey:O,getOptionLabel:z,isOptionEqualToValue:F,groupBy:U,handleHomeEndKeys:G=!r.freeSolo,id:W,includeInputInList:Y=!1,inputValue:B,limitTags:$=-1,ListboxComponent:K,ListboxProps:q,loading:Z=!1,loadingText:J="Loading…",multiple:oe=!1,noOptionsText:de="No options",onChange:ae,onClose:ue,onHighlightChange:ce,onInputChange:se,onOpen:me,open:fe,openOnFocus:te=!1,openText:ye="Open",options:ve,PaperComponent:ge,PopperComponent:Ee,popupIcon:xe=oje||(oje=s.jsx(gUe,{})),readOnly:Ne=!1,renderGroup:_e,renderInput:Be,renderOption:Te,renderTags:Ge,renderValue:Ze,selectOnFocus:ht=!r.freeSolo,size:Oe="medium",slots:ft={},slotProps:Qe={},value:De,...st}=r,{getRootProps:vt,getInputProps:qe,getInputLabelProps:Ye,getPopupIndicatorProps:mt,getClearProps:Et,getItemProps:vn,getListboxProps:gt,getOptionProps:Fe,value:$e,dirty:nt,expanded:wt,id:Dt,popupOpen:on,focused:jn,focusedItem:kt,anchorEl:pn,setAnchorEl:tt,inputValue:jt,groupedOptions:Nn}=lzt({...r,componentName:"Autocomplete"}),Xt=!v&&!S&&nt&&!Ne,ln=(!R||A===!0)&&A!==!1,{onMouseDown:un}=qe(),{ref:Kt,...On}=gt(),ur=z||(Ie=>Ie.label??Ie),Ht={...r,disablePortal:N,expanded:wt,focused:jn,fullWidth:k,getOptionLabel:ur,hasClearIcon:Xt,hasPopupIcon:ln,inputFocused:kt===-1,popupOpen:on,size:Oe},Tt=RHt(Ht),Zt={slots:{paper:ge,popper:Ee,...ft},slotProps:{chip:c,listbox:q,...b,...Qe}},[Ut,Sn]=Dr("listbox",{elementType:VHt,externalForwardedProps:Zt,ownerState:Ht,className:Tt.listbox,additionalProps:On,ref:Kt}),[Mn,lt]=Dr("paper",{elementType:ds,externalForwardedProps:Zt,ownerState:Ht,className:Tt.paper}),[Xe,yt]=Dr("popper",{elementType:fO,externalForwardedProps:Zt,ownerState:Ht,className:Tt.popper,additionalProps:{disablePortal:N,style:{width:pn?pn.clientWidth:null},role:"presentation",anchorEl:pn,open:on}});let Mt;const tn=Ie=>({className:Tt.tag,disabled:S,...vn(Ie)});if(oe?$e.length>0&&(Ge?Mt=Ge($e,tn,Ht):Ze?Mt=Ze($e,tn,Ht):Mt=$e.map((Ie,et)=>{const{key:xt,...Vt}=tn({index:et});return s.jsx(N5,{label:ur(Ie),size:Oe,...Vt,...Zt.slotProps.chip},xt)})):Ze&&$e!=null&&(Mt=Ze($e,tn,Ht)),$>-1&&Array.isArray(Mt)){const Ie=Mt.length-$;!jn&&Ie>0&&(Mt=Mt.splice(0,$),Mt.push(s.jsx("span",{className:Tt.tag,children:T(Ie)},Mt.length)))}const Tn=_e||(Ie=>s.jsxs("li",{children:[s.jsx(UHt,{className:Tt.groupLabel,ownerState:Ht,component:"div",children:Ie.group}),s.jsx(GHt,{className:Tt.groupUl,ownerState:Ht,children:Ie.children})]},Ie.key)),mr=Te||((Ie,et)=>{const{key:xt,...Vt}=Ie;return s.jsx("li",{...Vt,children:ur(et)},xt)}),fr=(Ie,et)=>{const xt=Fe({option:Ie,index:et});return mr({...xt,className:Tt.option},Ie,{selected:xt["aria-selected"],index:et,inputValue:jt},Ht)},En=Zt.slotProps.clearIndicator,Me=Zt.slotProps.popupIndicator;return s.jsxs(p.Fragment,{children:[s.jsx(OHt,{ref:n,className:Ae(Tt.root,u),ownerState:Ht,...vt(st),children:Be({id:Dt,disabled:S,fullWidth:!0,size:Oe==="small"?"small":void 0,InputLabelProps:Ye(),InputProps:{ref:tt,className:Tt.inputRoot,startAdornment:Mt,onMouseDown:Ie=>{Ie.target===Ie.currentTarget&&un(Ie)},...(Xt||ln)&&{endAdornment:s.jsxs(DHt,{className:Tt.endAdornment,ownerState:Ht,children:[Xt?s.jsx(LHt,{...Et(),"aria-label":m,title:m,ownerState:Ht,...En,className:Ae(Tt.clearIndicator,En==null?void 0:En.className),children:d}):null,ln?s.jsx($Ht,{...mt(),disabled:S,"aria-label":on?g:ye,title:on?g:ye,ownerState:Ht,...Me,className:Ae(Tt.popupIndicator,Me==null?void 0:Me.className),children:xe}):null]})}},inputProps:{className:Tt.input,disabled:S,readOnly:Ne,...qe()}})}),pn?s.jsx(FHt,{as:Xe,...yt,children:s.jsxs(BHt,{as:Mn,...lt,children:[Z&&Nn.length===0?s.jsx(zHt,{className:Tt.loading,ownerState:Ht,children:J}):null,Nn.length===0&&!R&&!Z?s.jsx(HHt,{className:Tt.noOptions,ownerState:Ht,role:"presentation",onMouseDown:Ie=>{Ie.preventDefault()},children:de}):null,Nn.length>0?s.jsx(Ut,{as:K,...Sn,children:Nn.map((Ie,et)=>U?Tn({key:Ie.key,group:Ie.group,children:Ie.options.map((xt,Vt)=>fr(xt,Ie.index+Vt))}):fr(Ie,et))}):null]})}):null]})});function qHt(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=ude({badgeContent:t,max:r});let a=n;n===!1&&t===0&&!o&&(a=!0);const{badgeContent:l,max:c=r}=a?i:e,u=l&&Number(l)>c?`${c}+`:l;return{badgeContent:l,invisible:a,max:c,displayValue:u}}function KHt(e){return kr("MuiBadge",e)}const q1=Mr("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),wY=10,SY=4,YHt=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,l={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${_n(n.vertical)}${_n(n.horizontal)}`,`anchorOrigin${_n(n.vertical)}${_n(n.horizontal)}${_n(o)}`,`overlap${_n(o)}`,t!=="default"&&`color${_n(t)}`]};return qn(l,KHt,a)},XHt=qt("span",{name:"MuiBadge",slot:"Root"})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),ZHt=qt("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${_n(n.anchorOrigin.vertical)}${_n(n.anchorOrigin.horizontal)}${_n(n.overlap)}`],n.color!=="default"&&t[`color${_n(n.color)}`],n.invisible&&t.invisible]}})(Ar(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:wY*2,lineHeight:1,padding:"0 6px",height:wY*2,borderRadius:wY,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(Us(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:SY,height:SY*2,minWidth:SY*2,padding:0}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${q1.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${q1.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${q1.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${q1.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${q1.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${q1.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${q1.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${q1.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function ije(e){return{vertical:(e==null?void 0:e.vertical)??"top",horizontal:(e==null?void 0:e.horizontal)??"right"}}const JHt=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiBadge"}),{anchorOrigin:o,className:i,classes:a,component:l,components:c={},componentsProps:u={},children:d,overlap:f="rectangular",color:h="default",invisible:m=!1,max:g=99,badgeContent:b,slots:y,slotProps:v,showZero:x=!1,variant:S="standard",...C}=r,{badgeContent:_,invisible:N,max:E,displayValue:I}=qHt({max:g,invisible:m,badgeContent:b,showZero:x}),A=ude({anchorOrigin:ije(o),color:h,overlap:f,variant:S,badgeContent:b}),R=N||_==null&&S!=="dot",{color:k=h,overlap:T=f,anchorOrigin:D,variant:O=S}=R?A:r,z=ije(D),F=O!=="dot"?I:void 0,U={...r,badgeContent:_,invisible:R,max:E,displayValue:F,showZero:x,anchorOrigin:z,color:k,overlap:T,variant:O},G=YHt(U),W={slots:{root:(y==null?void 0:y.root)??c.Root,badge:(y==null?void 0:y.badge)??c.Badge},slotProps:{root:(v==null?void 0:v.root)??u.root,badge:(v==null?void 0:v.badge)??u.badge}},[Y,B]=Dr("root",{elementType:XHt,externalForwardedProps:{...W,...C},ownerState:U,className:Ae(G.root,i),ref:n,additionalProps:{as:l}}),[$,K]=Dr("badge",{elementType:ZHt,externalForwardedProps:W,ownerState:U,className:G.badge});return s.jsxs(Y,{...B,children:[d,s.jsx($,{...K,children:F})]})});function QHt(e){return kr("PrivateSwitchBase",e)}Mr("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const eVt=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${_n(o)}`],input:["input"]};return qn(i,QHt,t)},tVt=qt(Bb,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),nVt=qt("input",{name:"MuiSwitchBase",shouldForwardProp:Hp})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),yUe=p.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:d,id:f,inputProps:h,inputRef:m,name:g,onBlur:b,onChange:y,onFocus:v,readOnly:x,required:S=!1,tabIndex:C,type:_,value:N,slots:E={},slotProps:I={},...A}=t,[R,k]=fS({controlled:o,default:!!a,name:"SwitchBase",state:"checked"}),T=f1(),D=Z=>{v&&v(Z),T&&T.onFocus&&T.onFocus(Z)},O=Z=>{b&&b(Z),T&&T.onBlur&&T.onBlur(Z)},z=Z=>{if(Z.nativeEvent.defaultPrevented)return;const J=Z.target.checked;k(J),y&&y(Z,J)};let F=l;T&&typeof F>"u"&&(F=T.disabled);const U=_==="checkbox"||_==="radio",G={...t,checked:R,disabled:F,disableFocusRipple:c,edge:u},W=eVt(G),Y={slots:E,slotProps:{input:h,...I}},[B,$]=Dr("root",{ref:n,elementType:tVt,className:W.root,shouldForwardComponentProp:!0,externalForwardedProps:{...Y,component:"span",...A},getSlotProps:Z=>({...Z,onFocus:J=>{var oe;(oe=Z.onFocus)==null||oe.call(Z,J),D(J)},onBlur:J=>{var oe;(oe=Z.onBlur)==null||oe.call(Z,J),O(J)}}),ownerState:G,additionalProps:{centerRipple:!0,focusRipple:!c,disabled:F,role:void 0,tabIndex:null}}),[K,q]=Dr("input",{ref:m,elementType:nVt,className:W.input,externalForwardedProps:Y,getSlotProps:Z=>({...Z,onChange:J=>{var oe;(oe=Z.onChange)==null||oe.call(Z,J),z(J)}}),ownerState:G,additionalProps:{autoFocus:r,checked:o,defaultChecked:a,disabled:F,id:U?f:void 0,name:g,readOnly:x,required:S,tabIndex:C,type:_,..._==="checkbox"&&N===void 0?{}:{value:N}}});return s.jsxs(B,{...$,children:[s.jsx(K,{...q}),R?i:d]})}),rVt=si(s.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),oVt=si(s.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),iVt=si(s.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function aVt(e){return kr("MuiCheckbox",e)}const CY=Mr("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),sVt=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${_n(r)}`,`size${_n(o)}`]},a=qn(i,aVt,t);return{...t,...a}},lVt=qt(yUe,{shouldForwardProp:e=>Hp(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${_n(n.size)}`],n.color!=="default"&&t[`color${_n(n.color)}`]]}})(Ar(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Us()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Us()).map(([t])=>({props:{color:t},style:{[`&.${CY.checked}, &.${CY.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${CY.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),cVt=s.jsx(oVt,{}),uVt=s.jsx(rVt,{}),dVt=s.jsx(iVt,{}),fVt=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiCheckbox"}),{checkedIcon:o=cVt,color:i="primary",icon:a=uVt,indeterminate:l=!1,indeterminateIcon:c=dVt,inputProps:u,size:d="medium",disableRipple:f=!1,className:h,slots:m={},slotProps:g={},...b}=r,y=l?c:a,v=l?c:o,x={...r,disableRipple:f,color:i,indeterminate:l,size:d},S=sVt(x),C=g.input??u,[_,N]=Dr("root",{ref:n,elementType:lVt,className:Ae(S.root,h),shouldForwardComponentProp:!0,externalForwardedProps:{slots:m,slotProps:g,...b},ownerState:x,additionalProps:{type:"checkbox",icon:p.cloneElement(y,{fontSize:y.props.fontSize??d}),checkedIcon:p.cloneElement(v,{fontSize:v.props.fontSize??d}),disableRipple:f,slots:m,slotProps:{input:fUe(typeof C=="function"?C(x):C,{"data-indeterminate":l})}}});return s.jsx(_,{...N,classes:S})});function pVt(e){return kr("MuiDivider",e)}const aje=Mr("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),hVt=e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:l,variant:c}=e;return qn({root:["root",t&&"absolute",c,i&&"light",a==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",l==="right"&&a!=="vertical"&&"textAlignRight",l==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},pVt,r)},mVt=qt("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(Ar(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.alpha((e.vars||e).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),gVt=qt("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(Ar(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),EP=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:a,orientation:l="horizontal",component:c=i||l==="vertical"?"div":"hr",flexItem:u=!1,light:d=!1,role:f=c!=="hr"?"separator":void 0,textAlign:h="center",variant:m="fullWidth",...g}=r,b={...r,absolute:o,component:c,flexItem:u,light:d,orientation:l,role:f,textAlign:h,variant:m},y=hVt(b);return s.jsx(mVt,{as:c,className:Ae(y.root,a),role:f,ref:n,ownerState:b,"aria-orientation":f==="separator"&&(c!=="hr"||l==="vertical")?l:void 0,...g,children:i?s.jsx(gVt,{className:y.wrapper,ownerState:b,children:i}):null})});EP&&(EP.muiSkipListHighlight=!0);function qE(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}const yVt=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function bVt(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function vVt(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function xVt(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||vVt(e))}function wVt(e){const t=[],n=[];return Array.from(e.querySelectorAll(yVt)).forEach((r,o)=>{const i=bVt(r);i===-1||!xVt(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function SVt(){return!0}function bUe(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=wVt,isEnabled:a=SVt,open:l}=e,c=p.useRef(!1),u=p.useRef(null),d=p.useRef(null),f=p.useRef(null),h=p.useRef(null),m=p.useRef(!1),g=p.useRef(null),b=Yi(Pj(t),g),y=p.useRef(null);p.useEffect(()=>{!l||!g.current||(m.current=!n)},[n,l]),p.useEffect(()=>{if(!l||!g.current)return;const S=lc(g.current),C=qE(S);return g.current.contains(C)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex","-1"),m.current&&g.current.focus()),()=>{o||(f.current&&f.current.focus&&(c.current=!0,f.current.focus()),f.current=null)}},[l]),p.useEffect(()=>{if(!l||!g.current)return;const S=lc(g.current),C=qE(S),_=I=>{y.current=I,!(r||!a()||I.key!=="Tab")&&C===g.current&&I.shiftKey&&(c.current=!0,d.current&&d.current.focus())},N=()=>{var k,T;const I=g.current;if(I===null)return;const A=qE(S);if(!S.hasFocus()||!a()||c.current){c.current=!1;return}if(I.contains(A)||r&&A!==u.current&&A!==d.current)return;if(A!==h.current)h.current=null;else if(h.current!==null)return;if(!m.current)return;let R=[];if((A===u.current||A===d.current)&&(R=i(g.current)),R.length>0){const D=!!((k=y.current)!=null&&k.shiftKey&&((T=y.current)==null?void 0:T.key)==="Tab"),O=R[0],z=R[R.length-1];typeof O!="string"&&typeof z!="string"&&(D?z.focus():O.focus())}else I.focus()};S.addEventListener("focusin",N),S.addEventListener("keydown",_,!0);const E=setInterval(()=>{const I=qE(S);I&&I.tagName==="BODY"&&N()},50);return()=>{clearInterval(E),S.removeEventListener("focusin",N),S.removeEventListener("keydown",_,!0)}},[n,r,o,a,l,i]);const v=S=>{f.current===null&&(f.current=S.relatedTarget),m.current=!0,h.current=S.target;const C=t.props.onFocus;C&&C(S)},x=S=>{f.current===null&&(f.current=S.relatedTarget),m.current=!0};return s.jsxs(p.Fragment,{children:[s.jsx("div",{tabIndex:l?0:-1,onFocus:x,ref:u,"data-testid":"sentinelStart"}),p.cloneElement(t,{ref:b,onFocus:v}),s.jsx("div",{tabIndex:l?0:-1,onFocus:x,ref:d,"data-testid":"sentinelEnd"})]})}function CVt(e){return kr("MuiLinearProgress",e)}Mr("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const Yte=4,Xte=Dh` + 0% { + left: -35%; + right: 100%; + } + + 60% { + left: 100%; + right: -90%; + } + + 100% { + left: 100%; + right: -90%; + } +`,_Vt=typeof Xte!="string"?Zb` + animation: ${Xte} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; + `:null,Zte=Dh` + 0% { + left: -200%; + right: 100%; + } + + 60% { + left: 107%; + right: -8%; + } + + 100% { + left: 107%; + right: -8%; + } +`,jVt=typeof Zte!="string"?Zb` + animation: ${Zte} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; + `:null,Jte=Dh` + 0% { + opacity: 1; + background-position: 0 -23px; + } + + 60% { + opacity: 0; + background-position: 0 -23px; + } + + 100% { + opacity: 1; + background-position: -200px -23px; + } +`,NVt=typeof Jte!="string"?Zb` + animation: ${Jte} 3s infinite linear; + `:null,EVt=e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${_n(r)}`,n],dashed:["dashed",`dashedColor${_n(r)}`],bar1:["bar","bar1",`barColor${_n(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar","bar2",n!=="buffer"&&`barColor${_n(r)}`,n==="buffer"&&`color${_n(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return qn(o,CVt,t)},Sde=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.5),PVt=qt("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${_n(n.color)}`],t[n.variant]]}})(Ar(({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter(Us()).map(([t])=>({props:{color:t},style:{backgroundColor:Sde(e,t)}})),{props:({ownerState:t})=>t.color==="inherit"&&t.variant!=="buffer",style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),IVt=qt("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${_n(n.color)}`]]}})(Ar(({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter(Us()).map(([t])=>{const n=Sde(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),NVt||{animation:`${Jte} 3s infinite linear`}),AVt=qt("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t.bar1,t[`barColor${_n(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar1Indeterminate,n.variant==="determinate"&&t.bar1Determinate,n.variant==="buffer"&&t.bar1Buffer]}})(Ar(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter(Us()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:"determinate"},style:{transition:`transform .${Yte}s linear`}},{props:{variant:"buffer"},style:{zIndex:1,transition:`transform .${Yte}s linear`}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:_Vt||{animation:`${Xte} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),TVt=qt("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t.bar2,t[`barColor${_n(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(Ar(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter(Us()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:t})=>t.variant!=="buffer"&&t.color!=="inherit",style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:t})=>t.variant!=="buffer"&&t.color==="inherit",style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter(Us()).map(([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:Sde(e,t),transition:`transform .${Yte}s linear`}})),{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:jVt||{animation:`${Zte} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),kVt=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiLinearProgress"}),{className:o,color:i="primary",value:a,valueBuffer:l,variant:c="indeterminate",...u}=r,d={...r,color:i,variant:c},f=EVt(d),h=af(),m={},g={bar1:{},bar2:{}};if((c==="determinate"||c==="buffer")&&a!==void 0){m["aria-valuenow"]=Math.round(a),m["aria-valuemin"]=0,m["aria-valuemax"]=100;let b=a-100;h&&(b=-b),g.bar1.transform=`translateX(${b}%)`}if(c==="buffer"&&l!==void 0){let b=(l||0)-100;h&&(b=-b),g.bar2.transform=`translateX(${b}%)`}return s.jsxs(PVt,{className:Ae(f.root,o),ownerState:d,role:"progressbar",...m,ref:n,...u,children:[c==="buffer"?s.jsx(IVt,{className:f.dashed,ownerState:d}):null,s.jsx(AVt,{className:f.bar1,ownerState:d,style:g.bar1}),c==="determinate"?null:s.jsx(TVt,{className:f.bar2,ownerState:d,style:g.bar2})]})});function MVt(e){return kr("MuiListItemIcon",e)}const sje=Mr("MuiListItemIcon",["root","alignItemsFlexStart"]),Nx=p.createContext({}),RVt=e=>{const{alignItems:t,classes:n}=e;return qn({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},MVt,n)},OVt=qt("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(Ar(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),lje=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiListItemIcon"}),{className:o,...i}=r,a=p.useContext(Nx),l={...r,alignItems:a.alignItems},c=RVt(l);return s.jsx(OVt,{className:Ae(c.root,o),ownerState:l,ref:n,...i})});function DVt(e){return kr("MuiTypography",e)}const cje=Mr("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),LVt={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},$Vt=_9t(),FVt=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,l={root:["root",i,e.align!=="inherit"&&`align${_n(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return qn(l,DVt,a)},BVt=qt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${_n(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Ar(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(e.palette).filter(Us()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${_n(n)}`},style:{color:(e.vars||e).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),uje={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},An=p.forwardRef(function(t,n){const{color:r,...o}=Lr({props:t,name:"MuiTypography"}),i=!LVt[r],a=$Vt({...o,...i&&{color:r}}),{align:l="inherit",className:c,component:u,gutterBottom:d=!1,noWrap:f=!1,paragraph:h=!1,variant:m="body1",variantMapping:g=uje,...b}=a,y={...a,align:l,color:r,className:c,component:u,gutterBottom:d,noWrap:f,paragraph:h,variant:m,variantMapping:g},v=u||(h?"p":g[m]||uje[m])||"span",x=FVt(y);return s.jsx(BVt,{as:v,ref:n,className:Ae(x.root,c),...b,ownerState:y,style:{...l!=="inherit"&&{"--Typography-textAlign":l},...b.style}})});function zVt(e){return kr("MuiListItemText",e)}const E2=Mr("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),HVt=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return qn({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},zVt,t)},VVt=qt("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${E2.primary}`]:t.primary},{[`& .${E2.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${cje.root}:where(& .${E2.primary})`]:{display:"block"},[`.${cje.root}:where(& .${E2.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Vv=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:l=!1,primary:c,primaryTypographyProps:u,secondary:d,secondaryTypographyProps:f,slots:h={},slotProps:m={},...g}=r,{dense:b}=p.useContext(Nx);let y=c??o,v=d;const x={...r,disableTypography:a,inset:l,primary:!!y,secondary:!!v,dense:b},S=HVt(x),C={slots:h,slotProps:{primary:u,secondary:f,...m}},[_,N]=Dr("root",{className:Ae(S.root,i),elementType:VVt,externalForwardedProps:{...C,...g},ownerState:x,ref:n}),[E,I]=Dr("primary",{className:S.primary,elementType:An,externalForwardedProps:C,ownerState:x}),[A,R]=Dr("secondary",{className:S.secondary,elementType:An,externalForwardedProps:C,ownerState:x});return y!=null&&y.type!==An&&!a&&(y=s.jsx(E,{variant:b?"body2":"body1",component:I!=null&&I.variant?void 0:"span",...I,children:y})),v!=null&&v.type!==An&&!a&&(v=s.jsx(A,{variant:"body2",color:"textSecondary",...R,children:v})),s.jsxs(_,{...N,children:[y,v]})});function UVt(e){return kr("MuiList",e)}Mr("MuiList",["root","padding","dense","subheader"]);const GVt=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return qn({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},UVt,t)},WVt=qt("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),Dk=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:l=!1,disablePadding:c=!1,subheader:u,...d}=r,f=p.useMemo(()=>({dense:l}),[l]),h={...r,component:a,dense:l,disablePadding:c},m=GVt(h);return s.jsx(Nx.Provider,{value:f,children:s.jsxs(WVt,{as:a,className:Ae(m.root,i),ref:n,ownerState:h,...d,children:[u,o]})})});function vUe(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function _Y(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function dje(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function xUe(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function PT(e,t,n,r,o,i){let a=!1,l=o(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(a)return!1;a=!0}const c=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!xUe(l,i)||c)l=o(e,l,n);else return l.focus(),!0}return!1}const wUe=p.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:l,disabledItemsFocusable:c=!1,disableListWrap:u=!1,onKeyDown:d,variant:f="selectedMenu",...h}=t,m=p.useRef(null),g=p.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});wa(()=>{o&&m.current.focus()},[o]),p.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(S,{direction:C})=>{const _=!m.current.style.width;if(S.clientHeight{const C=m.current,_=S.key;if(S.ctrlKey||S.metaKey||S.altKey){d&&d(S);return}const E=qE(lc(C));if(_==="ArrowDown")S.preventDefault(),PT(C,E,u,c,_Y);else if(_==="ArrowUp")S.preventDefault(),PT(C,E,u,c,dje);else if(_==="Home")S.preventDefault(),PT(C,null,u,c,_Y);else if(_==="End")S.preventDefault(),PT(C,null,u,c,dje);else if(_.length===1){const I=g.current,A=_.toLowerCase(),R=performance.now();I.keys.length>0&&(R-I.lastTime>500?(I.keys=[],I.repeating=!0,I.previousKeyMatched=!0):I.repeating&&A!==I.keys[0]&&(I.repeating=!1)),I.lastTime=R,I.keys.push(A);const k=E&&!I.repeating&&xUe(E,I);I.previousKeyMatched&&(k||PT(C,E,!1,c,_Y,I))?S.preventDefault():I.previousKeyMatched=!1}d&&d(S)},y=Yi(m,n);let v=-1;p.Children.forEach(a,(S,C)=>{if(!p.isValidElement(S)){v===C&&(v+=1,v>=a.length&&(v=-1));return}S.props.disabled||(f==="selectedMenu"&&S.props.selected||v===-1)&&(v=C),v===C&&(S.props.disabled||S.props.muiSkipListHighlight||S.type.muiSkipListHighlight)&&(v+=1,v>=a.length&&(v=-1))});const x=p.Children.map(a,(S,C)=>{if(C===v){const _={};return i&&(_.autoFocus=!0),S.props.tabIndex===void 0&&f==="selectedMenu"&&(_.tabIndex=0),p.cloneElement(S,_)}return S});return s.jsx(Dk,{role:"menu",ref:y,className:l,onKeyDown:b,tabIndex:o?0:-1,...h,children:x})});function qVt(e){return kr("MuiMenuItem",e)}const IT=Mr("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),KVt=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},YVt=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,c=qn({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},qVt,a);return{...a,...c}},XVt=qt(Bb,{shouldForwardProp:e=>Hp(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:KVt})(Ar(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${IT.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${IT.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${IT.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${IT.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${IT.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${aje.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${aje.inset}`]:{marginLeft:52},[`& .${E2.root}`]:{marginTop:0,marginBottom:0},[`& .${E2.inset}`]:{paddingLeft:36},[`& .${sje.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${sje.root} svg`]:{fontSize:"1.25rem"}}}]}))),ml=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:l=!1,disableGutters:c=!1,focusVisibleClassName:u,role:d="menuitem",tabIndex:f,className:h,...m}=r,g=p.useContext(Nx),b=p.useMemo(()=>({dense:a||g.dense||!1,disableGutters:c}),[g.dense,a,c]),y=p.useRef(null);wa(()=>{o&&y.current&&y.current.focus()},[o]);const v={...r,dense:b.dense,divider:l,disableGutters:c},x=YVt(r),S=Yi(y,n);let C;return r.disabled||(C=f!==void 0?f:-1),s.jsx(Nx.Provider,{value:b,children:s.jsx(XVt,{ref:S,role:d,tabIndex:C,component:i,focusVisibleClassName:Ae(x.focusVisible,u),className:Ae(x.root,h),...m,ownerState:v,classes:x})})}),ZVt=e=>{const{classes:t,disableUnderline:n}=e,o=qn({root:["root",!n&&"underline"],input:["input"]},AHt,t);return{...t,...o}},JVt=qt(mV,{shouldForwardProp:e=>Hp(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...pV(e,t),!n.disableUnderline&&t.underline]}})(Ar(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ow.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ow.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ow.disabled}, .${Ow.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Ow.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Us()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),QVt=qt(gV,{name:"MuiInput",slot:"Input",overridesResolver:hV})({}),Cde=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:l=!1,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:h="text",...m}=r,g=ZVt(r),y={root:{ownerState:{disableUnderline:o}}},v=d??a?Qd(d??a,y):y,x=f.root??i.Root??JVt,S=f.input??i.Input??QVt;return s.jsx(pO,{slots:{root:x,input:S},slotProps:v,fullWidth:l,inputComponent:c,multiline:u,ref:n,type:h,...m,classes:g})});Cde.muiName="Input";const eUt=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:l}=e,c={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${_n(i)}`,a&&"hiddenLabel",l&&"multiline"],input:["input"]},u=qn(c,kHt,t);return{...t,...u}},tUt=qt(mV,{shouldForwardProp:e=>Hp(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...pV(e,t),!n.disableUnderline&&t.underline]}})(Ar(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${am.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${am.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${am.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${am.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${am.disabled}, .${am.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${am.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Us()).map(([a])=>{var l;return{props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(l=(e.vars||e).palette[a])==null?void 0:l.main}`}}}}),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:l})=>a.multiline&&l==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),nUt=qt(gV,{name:"MuiFilledInput",slot:"Input",overridesResolver:hV})(Ar(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),_de=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:l=!1,hiddenLabel:c,inputComponent:u="input",multiline:d=!1,slotProps:f,slots:h={},type:m="text",...g}=r,b={...r,disableUnderline:o,fullWidth:l,inputComponent:u,multiline:d,type:m},y=eUt(r),v={root:{ownerState:b},input:{ownerState:b}},x=f??a?Qd(v,f??a):v,S=h.root??i.Root??tUt,C=h.input??i.Input??nUt;return s.jsx(pO,{slots:{root:S,input:C},slotProps:x,fullWidth:l,inputComponent:u,multiline:d,ref:n,type:m,...g,classes:y})});_de.muiName="Input";var fje;const rUt=qt("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Hp})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),oUt=qt("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Hp})(Ar(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function iUt(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,l=o!=null&&o!=="",c={...e,notched:i,withLabel:l};return s.jsx(rUt,{"aria-hidden":!0,className:r,ownerState:c,...a,children:s.jsx(oUt,{ownerState:c,children:l?s.jsx("span",{children:o}):fje||(fje=s.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}const aUt=e=>{const{classes:t}=e,r=qn({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},THt,t);return{...t,...r}},sUt=qt(mV,{shouldForwardProp:e=>Hp(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:pV})(Ar(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${ng.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${ng.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${ng.focused} .${ng.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Us()).map(([n])=>({props:{color:n},style:{[`&.${ng.focused} .${ng.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${ng.error} .${ng.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${ng.disabled} .${ng.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),lUt=qt(iUt,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Ar(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),cUt=qt(gV,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:hV})(Ar(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),jde=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiOutlinedInput"}),{components:o={},fullWidth:i=!1,inputComponent:a="input",label:l,multiline:c=!1,notched:u,slots:d={},slotProps:f={},type:h="text",...m}=r,g=aUt(r),b=f1(),y=Ij({props:r,muiFormControl:b,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),v={...r,color:y.color||"primary",disabled:y.disabled,error:y.error,focused:y.focused,formControl:b,fullWidth:i,hiddenLabel:y.hiddenLabel,multiline:c,size:y.size,type:h},x=d.root??o.Root??sUt,S=d.input??o.Input??cUt,[C,_]=Dr("notchedOutline",{elementType:lUt,className:g.notchedOutline,shouldForwardComponentProp:!0,ownerState:v,externalForwardedProps:{slots:d,slotProps:f},additionalProps:{label:l!=null&&l!==""&&y.required?s.jsxs(p.Fragment,{children:[l," ","*"]}):l}});return s.jsx(pO,{slots:{root:x,input:S},slotProps:f,renderSuffix:N=>s.jsx(C,{..._,notched:typeof u<"u"?u:!!(N.startAdornment||N.filled||N.focused)}),fullWidth:i,inputComponent:a,multiline:c,ref:n,type:h,...m,classes:{...g,notchedOutline:null}})});jde.muiName="Input";function uUt(e){return kr("MuiFormLabel",e)}const b4=Mr("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),dUt=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:l}=e,c={root:["root",`color${_n(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",l&&"required"],asterisk:["asterisk",i&&"error"]};return qn(c,uUt,t)},fUt=qt("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(Ar(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(Us()).map(([t])=>({props:{color:t},style:{[`&.${b4.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${b4.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${b4.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),pUt=qt("span",{name:"MuiFormLabel",slot:"Asterisk"})(Ar(({theme:e})=>({[`&.${b4.error}`]:{color:(e.vars||e).palette.error.main}}))),hUt=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiFormLabel"}),{children:o,className:i,color:a,component:l="label",disabled:c,error:u,filled:d,focused:f,required:h,...m}=r,g=f1(),b=Ij({props:r,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]}),y={...r,color:b.color||"primary",component:l,disabled:b.disabled,error:b.error,filled:b.filled,focused:b.focused,required:b.required},v=dUt(y);return s.jsxs(fUt,{as:l,ownerState:y,className:Ae(v.root,i),ref:n,...m,children:[o,b.required&&s.jsxs(pUt,{ownerState:y,"aria-hidden":!0,className:v.asterisk,children:[" ","*"]})]})});function mUt(e){return kr("MuiInputLabel",e)}Mr("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const gUt=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:l}=e,c={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="medium"&&`size${_n(r)}`,a],asterisk:[l&&"asterisk"]},u=qn(c,mUt,t);return{...t,...u}},yUt=qt(hUt,{shouldForwardProp:e=>Hp(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${b4.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Ar(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),hm=p.forwardRef(function(t,n){const r=Lr({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,margin:i,shrink:a,variant:l,className:c,...u}=r,d=f1();let f=a;typeof f>"u"&&d&&(f=d.filled||d.focused||d.adornedStart);const h=Ij({props:r,muiFormControl:d,states:["size","variant","required","focused"]}),m={...r,disableAnimation:o,formControl:d,shrink:f,size:h.size,variant:h.variant,required:h.required,focused:h.focused},g=gUt(m);return s.jsx(yUt,{"data-shrink":f,ref:n,className:Ae(g.root,c),...u,ownerState:m,classes:g})});function bUt(e){return kr("MuiFormControl",e)}Mr("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const vUt=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${_n(n)}`,r&&"fullWidth"]};return qn(o,bUt,t)},xUt=qt("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${_n(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),vh=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:l="div",disabled:c=!1,error:u=!1,focused:d,fullWidth:f=!1,hiddenLabel:h=!1,margin:m="none",required:g=!1,size:b="medium",variant:y="outlined",...v}=r,x={...r,color:a,component:l,disabled:c,error:u,fullWidth:f,hiddenLabel:h,margin:m,required:g,size:b,variant:y},S=vUt(x),[C,_]=p.useState(()=>{let z=!1;return o&&p.Children.forEach(o,F=>{if(!m4(F,["Input","Select"]))return;const U=m4(F,["Select"])?F.props.input:F;U&&EHt(U.props)&&(z=!0)}),z}),[N,E]=p.useState(()=>{let z=!1;return o&&p.Children.forEach(o,F=>{m4(F,["Input","Select"])&&(RB(F.props,!0)||RB(F.props.inputProps,!0))&&(z=!0)}),z}),[I,A]=p.useState(!1);c&&I&&A(!1);const R=d!==void 0&&!c?d:I;let k;p.useRef(!1);const T=p.useCallback(()=>{E(!0)},[]),D=p.useCallback(()=>{E(!1)},[]),O=p.useMemo(()=>({adornedStart:C,setAdornedStart:_,color:a,disabled:c,error:u,filled:N,focused:R,fullWidth:f,hiddenLabel:h,size:b,onBlur:()=>{A(!1)},onFocus:()=>{A(!0)},onEmpty:D,onFilled:T,registerEffect:k,required:g,variant:y}),[C,a,c,u,N,R,f,h,k,D,T,g,b,y]);return s.jsx(fV.Provider,{value:O,children:s.jsx(xUt,{as:l,ownerState:x,className:Ae(S.root,i),ref:n,...v,children:o})})});function wUt(e){return kr("MuiFormHelperText",e)}const pje=Mr("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var hje;const SUt=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:l,required:c}=e,u={root:["root",o&&"disabled",i&&"error",r&&`size${_n(r)}`,n&&"contained",l&&"focused",a&&"filled",c&&"required"]};return qn(u,wUt,t)},CUt=qt("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${_n(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Ar(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${pje.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${pje.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),_Ut=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p",disabled:l,error:c,filled:u,focused:d,margin:f,required:h,variant:m,...g}=r,b=f1(),y=Ij({props:r,muiFormControl:b,states:["variant","size","disabled","error","filled","focused","required"]}),v={...r,component:a,contained:y.variant==="filled"||y.variant==="outlined",variant:y.variant,size:y.size,disabled:y.disabled,error:y.error,filled:y.filled,focused:y.focused,required:y.required};delete v.ownerState;const x=SUt(v);return s.jsx(CUt,{as:a,className:Ae(x.root,i),ref:n,...g,ownerState:v,children:o===" "?hje||(hje=s.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):o})}),SUe=e=>e.scrollTop;function PP(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function Qte(e){return`scale(${e}, ${e**2})`}const jUt={entering:{opacity:1,transform:Qte(1)},entered:{opacity:1,transform:"none"}},jY=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),IP=p.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:f,onExited:h,onExiting:m,style:g,timeout:b="auto",TransitionComponent:y=Om,...v}=t,x=kp(),S=p.useRef(),C=Rm(),_=p.useRef(null),N=Yi(_,Pj(i),n),E=z=>F=>{if(z){const U=_.current;F===void 0?z(U):z(U,F)}},I=E(d),A=E((z,F)=>{SUe(z);const{duration:U,delay:G,easing:W}=PP({style:g,timeout:b,easing:a},{mode:"enter"});let Y;b==="auto"?(Y=C.transitions.getAutoHeightDuration(z.clientHeight),S.current=Y):Y=U,z.style.transition=[C.transitions.create("opacity",{duration:Y,delay:G}),C.transitions.create("transform",{duration:jY?Y:Y*.666,delay:G,easing:W})].join(","),c&&c(z,F)}),R=E(u),k=E(m),T=E(z=>{const{duration:F,delay:U,easing:G}=PP({style:g,timeout:b,easing:a},{mode:"exit"});let W;b==="auto"?(W=C.transitions.getAutoHeightDuration(z.clientHeight),S.current=W):W=F,z.style.transition=[C.transitions.create("opacity",{duration:W,delay:U}),C.transitions.create("transform",{duration:jY?W:W*.666,delay:jY?U:U||W*.333,easing:G})].join(","),z.style.opacity=0,z.style.transform=Qte(.75),f&&f(z)}),D=E(h),O=z=>{b==="auto"&&x.start(S.current||0,z),r&&r(_.current,z)};return s.jsx(y,{appear:o,in:l,nodeRef:_,onEnter:A,onEntered:R,onEntering:I,onExit:T,onExited:D,onExiting:k,addEndListener:O,timeout:b==="auto"?null:b,...v,children:(z,{ownerState:F,...U})=>p.cloneElement(i,{style:{opacity:0,transform:Qte(.75),visibility:z==="exited"&&!l?"hidden":void 0,...jUt[z],...g,...i.props.style},ref:N,...U})})});IP&&(IP.muiSupportAuto=!0);function NUt(e){const t=lc(e);return t.body===e?Q0(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function v4(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function mje(e){return parseInt(Q0(e).getComputedStyle(e).paddingRight,10)||0}function EUt(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function gje(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,a=>{const l=!i.includes(a),c=!EUt(a);l&&c&&v4(a,o)})}function NY(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function PUt(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(NUt(r)){const a=vUe(Q0(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${mje(r)+a}px`;const l=lc(r).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${mje(c)+a}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=lc(r).body;else{const a=r.parentElement,l=Q0(r);i=(a==null?void 0:a.nodeName)==="HTML"&&l.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:l})=>{i?a.style.setProperty(l,i):a.style.removeProperty(l)})}}function IUt(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}let AUt=class{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&v4(t.modalRef,!1);const o=IUt(n);gje(n,t.mount,t.modalRef,o,!0);const i=NY(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=NY(this.containers,i=>i.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=PUt(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=NY(this.containers,a=>a.modals.includes(t)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&v4(t.modalRef,n),gje(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&v4(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}};const TUt={entering:{opacity:1},entered:{opacity:1}},ene=p.forwardRef(function(t,n){const r=Rm(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:h,onExit:m,onExited:g,onExiting:b,style:y,timeout:v=o,TransitionComponent:x=Om,...S}=t,C=p.useRef(null),_=Yi(C,Pj(l),n),N=O=>z=>{if(O){const F=C.current;z===void 0?O(F):O(F,z)}},E=N(h),I=N((O,z)=>{SUe(O);const F=PP({style:y,timeout:v,easing:c},{mode:"enter"});O.style.webkitTransition=r.transitions.create("opacity",F),O.style.transition=r.transitions.create("opacity",F),d&&d(O,z)}),A=N(f),R=N(b),k=N(O=>{const z=PP({style:y,timeout:v,easing:c},{mode:"exit"});O.style.webkitTransition=r.transitions.create("opacity",z),O.style.transition=r.transitions.create("opacity",z),m&&m(O)}),T=N(g),D=O=>{i&&i(C.current,O)};return s.jsx(x,{appear:a,in:u,nodeRef:C,onEnter:I,onEntered:A,onEntering:E,onExit:k,onExited:T,onExiting:R,addEndListener:D,timeout:v,...S,children:(O,{ownerState:z,...F})=>p.cloneElement(l,{style:{opacity:0,visibility:O==="exited"&&!u?"hidden":void 0,...TUt[O],...y,...l.props.style},ref:_,...F})})});function kUt(e){return kr("MuiBackdrop",e)}Mr("MuiBackdrop",["root","invisible"]);const MUt=e=>{const{classes:t,invisible:n}=e;return qn({root:["root",n&&"invisible"]},kUt,t)},RUt=qt("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),CUe=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiBackdrop"}),{children:o,className:i,component:a="div",invisible:l=!1,open:c,components:u={},componentsProps:d={},slotProps:f={},slots:h={},TransitionComponent:m,transitionDuration:g,...b}=r,y={...r,component:a,invisible:l},v=MUt(y),x={transition:m,root:u.Root,...h},S={...d,...f},C={component:a,slots:x,slotProps:S},[_,N]=Dr("root",{elementType:RUt,externalForwardedProps:C,className:Ae(v.root,i),ownerState:y}),[E,I]=Dr("transition",{elementType:ene,externalForwardedProps:C,ownerState:y});return s.jsx(E,{in:c,timeout:g,...b,...I,children:s.jsx(_,{"aria-hidden":!0,...N,classes:v,ref:n,children:o})})});function OUt(e){return typeof e=="function"?e():e}function DUt(e){return e?e.props.hasOwnProperty("in"):!1}const yje=()=>{},qL=new AUt;function LUt(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:d}=e,f=p.useRef({}),h=p.useRef(null),m=p.useRef(null),g=Yi(m,d),[b,y]=p.useState(!u),v=DUt(l);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const S=()=>lc(h.current),C=()=>(f.current.modalRef=m.current,f.current.mount=h.current,f.current),_=()=>{qL.mount(C(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},N=no(()=>{const z=OUt(t)||S().body;qL.add(C(),z),m.current&&_()}),E=()=>qL.isTopModal(C()),I=no(z=>{h.current=z,z&&(u&&E()?_():m.current&&v4(m.current,x))}),A=p.useCallback(()=>{qL.remove(C(),x)},[x]);p.useEffect(()=>()=>{A()},[A]),p.useEffect(()=>{u?N():(!v||!o)&&A()},[u,A,v,o,N]);const R=z=>F=>{var U;(U=z.onKeyDown)==null||U.call(z,F),!(F.key!=="Escape"||F.which===229||!E())&&(n||(F.stopPropagation(),c&&c(F,"escapeKeyDown")))},k=z=>F=>{var U;(U=z.onClick)==null||U.call(z,F),F.target===F.currentTarget&&c&&c(F,"backdropClick")};return{getRootProps:(z={})=>{const F=TB(e);delete F.onTransitionEnter,delete F.onTransitionExited;const U={...F,...z};return{role:"presentation",...U,onKeyDown:R(U),ref:g}},getBackdropProps:(z={})=>{const F=z;return{"aria-hidden":!0,...F,onClick:k(F),open:u}},getTransitionProps:()=>{const z=()=>{y(!1),i&&i()},F=()=>{y(!0),a&&a(),o&&A()};return{onEnter:K_e(z,(l==null?void 0:l.props.onEnter)??yje),onExited:K_e(F,(l==null?void 0:l.props.onExited)??yje)}},rootRef:g,portalRef:I,isTopModal:E,exited:b,hasTransition:v}}function $Ut(e){return kr("MuiModal",e)}Mr("MuiModal",["root","hidden","backdrop"]);const FUt=e=>{const{open:t,exited:n,classes:r}=e;return qn({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},$Ut,r)},BUt=qt("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Ar(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),zUt=qt(CUe,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),_Ue=p.forwardRef(function(t,n){const r=Lr({name:"MuiModal",props:t}),{BackdropComponent:o=zUt,BackdropProps:i,classes:a,className:l,closeAfterTransition:c=!1,children:u,container:d,component:f,components:h={},componentsProps:m={},disableAutoFocus:g=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:y=!1,disablePortal:v=!1,disableRestoreFocus:x=!1,disableScrollLock:S=!1,hideBackdrop:C=!1,keepMounted:_=!1,onClose:N,onTransitionEnter:E,onTransitionExited:I,open:A,slotProps:R={},slots:k={},theme:T,...D}=r,O={...r,closeAfterTransition:c,disableAutoFocus:g,disableEnforceFocus:b,disableEscapeKeyDown:y,disablePortal:v,disableRestoreFocus:x,disableScrollLock:S,hideBackdrop:C,keepMounted:_},{getRootProps:z,getBackdropProps:F,getTransitionProps:U,portalRef:G,isTopModal:W,exited:Y,hasTransition:B}=LUt({...O,rootRef:n}),$={...O,exited:Y},K=FUt($),q={};if(u.props.tabIndex===void 0&&(q.tabIndex="-1"),B){const{onEnter:ue,onExited:ce}=U();q.onEnter=ue,q.onExited=ce}const Z={slots:{root:h.Root,backdrop:h.Backdrop,...k},slotProps:{...m,...R}},[J,oe]=Dr("root",{ref:n,elementType:BUt,externalForwardedProps:{...Z,...D,component:f},getSlotProps:z,ownerState:$,className:Ae(l,K==null?void 0:K.root,!$.open&&$.exited&&(K==null?void 0:K.hidden))}),[de,ae]=Dr("backdrop",{ref:i==null?void 0:i.ref,elementType:o,externalForwardedProps:Z,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:ue=>F({...ue,onClick:ce=>{ue!=null&&ue.onClick&&ue.onClick(ce)}}),className:Ae(i==null?void 0:i.className,K==null?void 0:K.backdrop),ownerState:$});return!_&&!A&&(!B||Y)?null:s.jsx(dUe,{ref:G,container:d,disablePortal:v,children:s.jsxs(J,{...oe,children:[!C&&o?s.jsx(de,{...ae}):null,s.jsx(bUe,{disableEnforceFocus:b,disableAutoFocus:g,disableRestoreFocus:x,isEnabled:W,open:A,children:p.cloneElement(u,q)})]})})});function HUt(e){return kr("MuiPopover",e)}Mr("MuiPopover",["root","paper"]);function bje(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function vje(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function xje(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function KL(e){return typeof e=="function"?e():e}const VUt=e=>{const{classes:t}=e;return qn({root:["root"],paper:["paper"]},HUt,t)},UUt=qt(_Ue,{name:"MuiPopover",slot:"Root"})({}),jUe=qt(ds,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),GUt=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:l,anchorReference:c="anchorEl",children:u,className:d,container:f,elevation:h=8,marginThreshold:m=16,open:g,PaperProps:b={},slots:y={},slotProps:v={},transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:S,transitionDuration:C="auto",TransitionProps:_={},disableScrollLock:N=!1,...E}=r,I=p.useRef(),A={...r,anchorOrigin:a,anchorReference:c,elevation:h,marginThreshold:m,transformOrigin:x,TransitionComponent:S,transitionDuration:C,TransitionProps:_},R=VUt(A),k=p.useCallback(()=>{if(c==="anchorPosition")return l;const ue=KL(i),se=(ue&&ue.nodeType===1?ue:lc(I.current).body).getBoundingClientRect();return{top:se.top+bje(se,a.vertical),left:se.left+vje(se,a.horizontal)}},[i,a.horizontal,a.vertical,l,c]),T=p.useCallback(ue=>({vertical:bje(ue,x.vertical),horizontal:vje(ue,x.horizontal)}),[x.horizontal,x.vertical]),D=p.useCallback(ue=>{const ce={width:ue.offsetWidth,height:ue.offsetHeight},se=T(ce);if(c==="none")return{top:null,left:null,transformOrigin:xje(se)};const me=k();let fe=me.top-se.vertical,te=me.left-se.horizontal;const ye=fe+ce.height,ve=te+ce.width,ge=Q0(KL(i)),Ee=ge.innerHeight-m,xe=ge.innerWidth-m;if(m!==null&&feEe){const Ne=ye-Ee;fe-=Ne,se.vertical+=Ne}if(m!==null&&texe){const Ne=ve-xe;te-=Ne,se.horizontal+=Ne}return{top:`${Math.round(fe)}px`,left:`${Math.round(te)}px`,transformOrigin:xje(se)}},[i,c,k,T,m]),[O,z]=p.useState(g),F=p.useCallback(()=>{const ue=I.current;if(!ue)return;const ce=D(ue);ce.top!==null&&ue.style.setProperty("top",ce.top),ce.left!==null&&(ue.style.left=ce.left),ue.style.transformOrigin=ce.transformOrigin,z(!0)},[D]);p.useEffect(()=>(N&&window.addEventListener("scroll",F),()=>window.removeEventListener("scroll",F)),[i,N,F]);const U=()=>{F()},G=()=>{z(!1)};p.useEffect(()=>{g&&F()}),p.useImperativeHandle(o,()=>g?{updatePosition:()=>{F()}}:null,[g,F]),p.useEffect(()=>{if(!g)return;const ue=Fb(()=>{F()}),ce=Q0(KL(i));return ce.addEventListener("resize",ue),()=>{ue.clear(),ce.removeEventListener("resize",ue)}},[i,g,F]);let W=C;const Y={slots:{transition:S,...y},slotProps:{transition:_,paper:b,...v}},[B,$]=Dr("transition",{elementType:IP,externalForwardedProps:Y,ownerState:A,getSlotProps:ue=>({...ue,onEntering:(ce,se)=>{var me;(me=ue.onEntering)==null||me.call(ue,ce,se),U()},onExited:ce=>{var se;(se=ue.onExited)==null||se.call(ue,ce),G()}}),additionalProps:{appear:!0,in:g}});C==="auto"&&!B.muiSupportAuto&&(W=void 0);const K=f||(i?lc(KL(i)).body:void 0),[q,{slots:Z,slotProps:J,...oe}]=Dr("root",{ref:n,elementType:UUt,externalForwardedProps:{...Y,...E},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:y.backdrop},slotProps:{backdrop:fUe(typeof v.backdrop=="function"?v.backdrop(A):v.backdrop,{invisible:!0})},container:K,open:g},ownerState:A,className:Ae(R.root,d)}),[de,ae]=Dr("paper",{ref:I,className:R.paper,elementType:jUe,externalForwardedProps:Y,shouldForwardComponentProp:!0,additionalProps:{elevation:h,style:O?void 0:{opacity:0}},ownerState:A});return s.jsx(q,{...oe,...!CP(q)&&{slots:Z,slotProps:J,disableScrollLock:N},children:s.jsx(B,{...$,timeout:W,children:s.jsx(de,{...ae,children:u})})})});function WUt(e){return kr("MuiMenu",e)}Mr("MuiMenu",["root","paper","list"]);const qUt={vertical:"top",horizontal:"right"},KUt={vertical:"top",horizontal:"left"},YUt=e=>{const{classes:t}=e;return qn({root:["root"],paper:["paper"],list:["list"]},WUt,t)},XUt=qt(GUt,{shouldForwardProp:e=>Hp(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),ZUt=qt(jUe,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),JUt=qt(wUe,{name:"MuiMenu",slot:"List"})({outline:0}),Nde=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:a,disableAutoFocusItem:l=!1,MenuListProps:c={},onClose:u,open:d,PaperProps:f={},PopoverClasses:h,transitionDuration:m="auto",TransitionProps:{onEntering:g,...b}={},variant:y="selectedMenu",slots:v={},slotProps:x={},...S}=r,C=af(),_={...r,autoFocus:o,disableAutoFocusItem:l,MenuListProps:c,onEntering:g,PaperProps:f,transitionDuration:m,TransitionProps:b,variant:y},N=YUt(_),E=o&&!l&&d,I=p.useRef(null),A=(W,Y)=>{I.current&&I.current.adjustStyleForScrollbar(W,{direction:C?"rtl":"ltr"}),g&&g(W,Y)},R=W=>{W.key==="Tab"&&(W.preventDefault(),u&&u(W,"tabKeyDown"))};let k=-1;p.Children.map(i,(W,Y)=>{p.isValidElement(W)&&(W.props.disabled||(y==="selectedMenu"&&W.props.selected||k===-1)&&(k=Y))});const T={slots:v,slotProps:{list:c,transition:b,paper:f,...x}},D=_P({elementType:v.root,externalSlotProps:x.root,ownerState:_,className:[N.root,a]}),[O,z]=Dr("paper",{className:N.paper,elementType:ZUt,externalForwardedProps:T,shouldForwardComponentProp:!0,ownerState:_}),[F,U]=Dr("list",{className:Ae(N.list,c.className),elementType:JUt,shouldForwardComponentProp:!0,externalForwardedProps:T,getSlotProps:W=>({...W,onKeyDown:Y=>{var B;R(Y),(B=W.onKeyDown)==null||B.call(W,Y)}}),ownerState:_}),G=typeof T.slotProps.transition=="function"?T.slotProps.transition(_):T.slotProps.transition;return s.jsx(XUt,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:C?"right":"left"},transformOrigin:C?qUt:KUt,slots:{root:v.root,paper:O,backdrop:v.backdrop,...v.transition&&{transition:v.transition}},slotProps:{root:D,paper:z,backdrop:typeof x.backdrop=="function"?x.backdrop(_):x.backdrop,transition:{...G,onEntering:(...W)=>{var Y;A(...W),(Y=G==null?void 0:G.onEntering)==null||Y.call(G,...W)}}},open:d,ref:n,transitionDuration:m,ownerState:_,...S,classes:h,children:s.jsx(F,{actions:I,autoFocus:o&&(k===-1||l),autoFocusItem:E,variant:y,...U,children:i})})});function QUt(e){return kr("MuiNativeSelect",e)}const Ede=Mr("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),eGt=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,l={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${_n(n)}`,i&&"iconOpen",r&&"disabled"]};return qn(l,QUt,t)},NUe=qt("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Ede.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),tGt=qt(NUe,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Hp,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Ede.multiple}`]:t.multiple}]}})({}),EUe=qt("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Ede.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),nGt=qt(EUe,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${_n(n.variant)}`],n.open&&t.iconOpen]}})({}),rGt=p.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:l,variant:c="standard",...u}=t,d={...t,disabled:o,variant:c,error:i},f=eGt(d);return s.jsxs(p.Fragment,{children:[s.jsx(tGt,{ownerState:d,className:Ae(f.select,r),disabled:o,ref:l||n,...u}),t.multiple?null:s.jsx(nGt,{as:a,ownerState:d,className:f.icon})]})});function PUe(e){return kr("MuiSelect",e)}const AT=Mr("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var wje;const oGt=qt(NUe,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${AT.select}`]:t.select},{[`&.${AT.select}`]:t[n.variant]},{[`&.${AT.error}`]:t.error},{[`&.${AT.multiple}`]:t.multiple}]}})({[`&.${AT.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),iGt=qt(EUe,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${_n(n.variant)}`],n.open&&t.iconOpen]}})({}),aGt=qt("input",{shouldForwardProp:e=>JVe(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Sje(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function sGt(e){return e==null||typeof e=="string"&&!e.trim()}const lGt=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,l={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${_n(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return qn(l,PUe,t)},cGt=p.forwardRef(function(t,n){var Et,vn,gt,Fe;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:a,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:f,displayEmpty:h,error:m=!1,IconComponent:g,inputRef:b,labelId:y,MenuProps:v={},multiple:x,name:S,onBlur:C,onChange:_,onClose:N,onFocus:E,onKeyDown:I,onMouseDown:A,onOpen:R,open:k,readOnly:T,renderValue:D,required:O,SelectDisplayProps:z={},tabIndex:F,type:U,value:G,variant:W="standard",...Y}=t,[B,$]=fS({controlled:G,default:d,name:"Select"}),[K,q]=fS({controlled:k,default:u,name:"Select"}),Z=p.useRef(null),J=p.useRef(null),[oe,de]=p.useState(null),{current:ae}=p.useRef(k!=null),[ue,ce]=p.useState(),se=Yi(n,b),me=p.useCallback($e=>{J.current=$e,$e&&de($e)},[]),fe=oe==null?void 0:oe.parentNode;p.useImperativeHandle(se,()=>({focus:()=>{J.current.focus()},node:Z.current,value:B}),[B]),p.useEffect(()=>{u&&K&&oe&&!ae&&(ce(a?null:fe.clientWidth),J.current.focus())},[oe,a]),p.useEffect(()=>{i&&J.current.focus()},[i]),p.useEffect(()=>{if(!y)return;const $e=lc(J.current).getElementById(y);if($e){const nt=()=>{getSelection().isCollapsed&&J.current.focus()};return $e.addEventListener("click",nt),()=>{$e.removeEventListener("click",nt)}}},[y]);const te=($e,nt)=>{$e?R&&R(nt):N&&N(nt),ae||(ce(a?null:fe.clientWidth),q($e))},ye=$e=>{A==null||A($e),$e.button===0&&($e.preventDefault(),J.current.focus(),te(!0,$e))},ve=$e=>{te(!1,$e)},ge=p.Children.toArray(l),Ee=$e=>{const nt=ge.find(wt=>wt.props.value===$e.target.value);nt!==void 0&&($(nt.props.value),_&&_($e,nt))},xe=$e=>nt=>{let wt;if(nt.currentTarget.hasAttribute("tabindex")){if(x){wt=Array.isArray(B)?B.slice():[];const Dt=B.indexOf($e.props.value);Dt===-1?wt.push($e.props.value):wt.splice(Dt,1)}else wt=$e.props.value;if($e.props.onClick&&$e.props.onClick(nt),B!==wt&&($(wt),_)){const Dt=nt.nativeEvent||nt,on=new Dt.constructor(Dt.type,Dt);Object.defineProperty(on,"target",{writable:!0,value:{value:wt,name:S}}),_(on,$e)}x||te(!1,nt)}},Ne=$e=>{T||([" ","ArrowUp","ArrowDown","Enter"].includes($e.key)&&($e.preventDefault(),te(!0,$e)),I==null||I($e))},_e=oe!==null&&K,Be=$e=>{!_e&&C&&(Object.defineProperty($e,"target",{writable:!0,value:{value:B,name:S}}),C($e))};delete Y["aria-invalid"];let Te,Ge;const Ze=[];let ht=!1;(RB({value:B})||h)&&(D?Te=D(B):ht=!0);const Oe=ge.map($e=>{if(!p.isValidElement($e))return null;let nt;if(x){if(!Array.isArray(B))throw new Error(Vx(2));nt=B.some(wt=>Sje(wt,$e.props.value)),nt&&ht&&Ze.push($e.props.children)}else nt=Sje(B,$e.props.value),nt&&ht&&(Ge=$e.props.children);return p.cloneElement($e,{"aria-selected":nt?"true":"false",onClick:xe($e),onKeyUp:wt=>{wt.key===" "&&wt.preventDefault(),$e.props.onKeyUp&&$e.props.onKeyUp(wt)},role:"option",selected:nt,value:void 0,"data-value":$e.props.value})});ht&&(x?Ze.length===0?Te=null:Te=Ze.reduce(($e,nt,wt)=>($e.push(nt),wt{const{classes:t}=e,r=qn({root:["root"]},PUe,t);return{...t,...r}},Pde={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Hp(e)&&e!=="variant"},dGt=qt(Cde,Pde)(""),fGt=qt(jde,Pde)(""),pGt=qt(_de,Pde)(""),Op=p.forwardRef(function(t,n){const r=Lr({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:l,defaultOpen:c=!1,displayEmpty:u=!1,IconComponent:d=gUe,id:f,input:h,inputProps:m,label:g,labelId:b,MenuProps:y,multiple:v=!1,native:x=!1,onClose:S,onOpen:C,open:_,renderValue:N,SelectDisplayProps:E,variant:I="outlined",...A}=r,R=x?rGt:cGt,k=f1(),T=Ij({props:r,muiFormControl:k,states:["variant","error"]}),D=T.variant||I,O={...r,variant:D,classes:a},z=uGt(O),{root:F,...U}=z,G=h||{standard:s.jsx(dGt,{ownerState:O}),outlined:s.jsx(fGt,{label:g,ownerState:O}),filled:s.jsx(pGt,{ownerState:O})}[D],W=Yi(n,Pj(G));return s.jsx(p.Fragment,{children:p.cloneElement(G,{inputComponent:R,inputProps:{children:i,error:T.error,IconComponent:d,variant:D,type:void 0,multiple:v,...x?{id:f}:{autoWidth:o,defaultOpen:c,displayEmpty:u,labelId:b,MenuProps:y,onClose:S,onOpen:C,open:_,renderValue:N,SelectDisplayProps:{id:f,...E}},...m,classes:m?Qd(U,m.classes):U,...h?h.props.inputProps:{}},...(v&&x||u)&&D==="outlined"?{notched:!0}:{},ref:W,className:Ae(G.props.className,l,z.root),...!h&&{variant:D},...A})})});Op.muiName="Select";function hGt(e){return kr("MuiTextField",e)}Mr("MuiTextField",["root"]);const mGt={standard:Cde,filled:_de,outlined:jde},gGt=e=>{const{classes:t}=e;return qn({root:["root"]},hGt,t)},yGt=qt(vh,{name:"MuiTextField",slot:"Root"})({}),di=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:l,color:c="primary",defaultValue:u,disabled:d=!1,error:f=!1,FormHelperTextProps:h,fullWidth:m=!1,helperText:g,id:b,InputLabelProps:y,inputProps:v,InputProps:x,inputRef:S,label:C,maxRows:_,minRows:N,multiline:E=!1,name:I,onBlur:A,onChange:R,onFocus:k,placeholder:T,required:D=!1,rows:O,select:z=!1,SelectProps:F,slots:U={},slotProps:G={},type:W,value:Y,variant:B="outlined",...$}=r,K={...r,autoFocus:i,color:c,disabled:d,error:f,fullWidth:m,multiline:E,required:D,select:z,variant:B},q=gGt(K),Z=pi(b),J=g&&Z?`${Z}-helper-text`:void 0,oe=C&&Z?`${Z}-label`:void 0,de=mGt[B],ae={slots:U,slotProps:{input:x,inputLabel:y,htmlInput:v,formHelperText:h,select:F,...G}},ue={},ce=ae.slotProps.inputLabel;B==="outlined"&&(ce&&typeof ce.shrink<"u"&&(ue.notched=ce.shrink),ue.label=C),z&&((!F||!F.native)&&(ue.id=void 0),ue["aria-describedby"]=void 0);const[se,me]=Dr("root",{elementType:yGt,shouldForwardComponentProp:!0,externalForwardedProps:{...ae,...$},ownerState:K,className:Ae(q.root,l),ref:n,additionalProps:{disabled:d,error:f,fullWidth:m,required:D,color:c,variant:B}}),[fe,te]=Dr("input",{elementType:de,externalForwardedProps:ae,additionalProps:ue,ownerState:K}),[ye,ve]=Dr("inputLabel",{elementType:hm,externalForwardedProps:ae,ownerState:K}),[ge,Ee]=Dr("htmlInput",{elementType:"input",externalForwardedProps:ae,ownerState:K}),[xe,Ne]=Dr("formHelperText",{elementType:_Ut,externalForwardedProps:ae,ownerState:K}),[_e,Be]=Dr("select",{elementType:Op,externalForwardedProps:ae,ownerState:K}),Te=s.jsx(fe,{"aria-describedby":J,autoComplete:o,autoFocus:i,defaultValue:u,fullWidth:m,multiline:E,name:I,rows:O,maxRows:_,minRows:N,type:W,value:Y,id:Z,inputRef:S,onBlur:A,onChange:R,onFocus:k,placeholder:T,inputProps:Ee,slots:{input:U.htmlInput?ge:void 0},...te});return s.jsxs(se,{...me,children:[C!=null&&C!==""&&s.jsx(ye,{htmlFor:Z,id:oe,...ve,children:C}),z?s.jsx(_e,{"aria-describedby":J,id:Z,labelId:oe,value:Y,input:Te,...Be,children:a}):Te,g&&s.jsx(xe,{id:J,...Ne,children:g})]})});function bGt(e){return kr("MuiFormControlLabel",e)}const KE=Mr("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),vGt=e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e,a={root:["root",n&&"disabled",`labelPlacement${_n(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return qn(a,bGt,t)},xGt=qt("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${KE.label}`]:t.label},t.root,t[`labelPlacement${_n(n.labelPlacement)}`]]}})(Ar(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${KE.disabled}`]:{cursor:"default"},[`& .${KE.label}`]:{[`&.${KE.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),wGt=qt("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(Ar(({theme:e})=>({[`&.${KE.error}`]:{color:(e.vars||e).palette.error.main}}))),SGt=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiFormControlLabel"}),{checked:o,className:i,componentsProps:a={},control:l,disabled:c,disableTypography:u,inputRef:d,label:f,labelPlacement:h="end",name:m,onChange:g,required:b,slots:y={},slotProps:v={},value:x,...S}=r,C=f1(),_=c??l.props.disabled??(C==null?void 0:C.disabled),N=b??l.props.required,E={disabled:_,required:N};["checked","name","onChange","value","inputRef"].forEach(z=>{typeof l.props[z]>"u"&&typeof r[z]<"u"&&(E[z]=r[z])});const I=Ij({props:r,muiFormControl:C,states:["error"]}),A={...r,disabled:_,labelPlacement:h,required:N,error:I.error},R=vGt(A),k={slots:y,slotProps:{...a,...v}},[T,D]=Dr("typography",{elementType:An,externalForwardedProps:k,ownerState:A});let O=f;return O!=null&&O.type!==An&&!u&&(O=s.jsx(T,{component:"span",...D,className:Ae(R.label,D==null?void 0:D.className),children:O})),s.jsxs(xGt,{className:Ae(R.root,i),ownerState:A,ref:n,...S,children:[p.cloneElement(l,E),N?s.jsxs("div",{children:[O,s.jsxs(wGt,{ownerState:A,"aria-hidden":!0,className:R.asterisk,children:[" ","*"]})]}):O]})});function CGt(e){return kr("MuiSwitch",e)}const Sp=Mr("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),_Gt=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,l={root:["root",n&&`edge${_n(n)}`,`size${_n(r)}`],switchBase:["switchBase",`color${_n(o)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=qn(l,CGt,t);return{...t,...c}},jGt=qt("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${_n(n.edge)}`],t[`size${_n(n.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Sp.thumb}`]:{width:16,height:16},[`& .${Sp.switchBase}`]:{padding:4,[`&.${Sp.checked}`]:{transform:"translateX(16px)"}}}}]}),NGt=qt(yUe,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Sp.input}`]:t.input},n.color!=="default"&&t[`color${_n(n.color)}`]]}})(Ar(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Sp.checked}`]:{transform:"translateX(20px)"},[`&.${Sp.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Sp.checked} + .${Sp.track}`]:{opacity:.5},[`&.${Sp.disabled} + .${Sp.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Sp.input}`]:{left:"-100%",width:"300%"}})),Ar(({theme:e})=>({"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(Us(["light"])).map(([t])=>({props:{color:t},style:{[`&.${Sp.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Sp.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.55)}`}},[`&.${Sp.checked} + .${Sp.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),EGt=qt("span",{name:"MuiSwitch",slot:"Track"})(Ar(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),PGt=qt("span",{name:"MuiSwitch",slot:"Thumb"})(Ar(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),Cje=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiSwitch"}),{className:o,color:i="primary",edge:a=!1,size:l="medium",sx:c,slots:u={},slotProps:d={},...f}=r,h={...r,color:i,edge:a,size:l},m=_Gt(h),g={slots:u,slotProps:d},[b,y]=Dr("root",{className:Ae(m.root,o),elementType:jGt,externalForwardedProps:g,ownerState:h,additionalProps:{sx:c}}),[v,x]=Dr("thumb",{className:m.thumb,elementType:PGt,externalForwardedProps:g,ownerState:h}),S=s.jsx(v,{...x}),[C,_]=Dr("track",{className:m.track,elementType:EGt,externalForwardedProps:g,ownerState:h});return s.jsxs(b,{...y,children:[s.jsx(NGt,{type:"checkbox",icon:S,checkedIcon:S,ref:n,ownerState:h,...f,classes:{...m,root:m.switchBase},slots:{...u.switchBase&&{root:u.switchBase},...u.input&&{input:u.input}},slotProps:{...d.switchBase&&{root:typeof d.switchBase=="function"?d.switchBase(h):d.switchBase},input:{role:"switch"},...d.input&&{input:typeof d.input=="function"?d.input(h):d.input}}}),s.jsx(C,{..._})]})});function IGt(e){return kr("MuiButton",e)}const TC=Mr("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),AGt=p.createContext({}),TGt=p.createContext(void 0),kGt=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:a,loadingPosition:l,classes:c}=e,u={root:["root",a&&"loading",i,`${i}${_n(t)}`,`size${_n(o)}`,`${i}Size${_n(o)}`,`color${_n(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${_n(l)}`],startIcon:["icon","startIcon",`iconSize${_n(o)}`],endIcon:["icon","endIcon",`iconSize${_n(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=qn(u,IGt,c);return{...c,...d}},IUe=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],MGt=qt(Bb,{shouldForwardProp:e=>Hp(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${_n(n.color)}`],t[`size${_n(n.size)}`],t[`${n.variant}Size${_n(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Ar(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${TC.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${TC.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${TC.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${TC.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(Us()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${TC.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${TC.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${TC.loading}`]:{color:"transparent"}}}]}})),RGt=qt("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${_n(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...IUe]})),OGt=qt("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${_n(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...IUe]})),DGt=qt("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),_je=qt("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),fi=p.forwardRef(function(t,n){const r=p.useContext(AGt),o=p.useContext(TGt),i=T_(r,t),a=Lr({props:i,name:"MuiButton"}),{children:l,color:c="primary",component:u="button",className:d,disabled:f=!1,disableElevation:h=!1,disableFocusRipple:m=!1,endIcon:g,focusVisibleClassName:b,fullWidth:y=!1,id:v,loading:x=null,loadingIndicator:S,loadingPosition:C="center",size:_="medium",startIcon:N,type:E,variant:I="text",...A}=a,R=pi(v),k=S??s.jsx(rc,{"aria-labelledby":R,color:"inherit",size:16}),T={...a,color:c,component:u,disabled:f,disableElevation:h,disableFocusRipple:m,fullWidth:y,loading:x,loadingIndicator:k,loadingPosition:C,size:_,type:E,variant:I},D=kGt(T),O=(N||x&&C==="start")&&s.jsx(RGt,{className:D.startIcon,ownerState:T,children:N||s.jsx(_je,{className:D.loadingIconPlaceholder,ownerState:T})}),z=(g||x&&C==="end")&&s.jsx(OGt,{className:D.endIcon,ownerState:T,children:g||s.jsx(_je,{className:D.loadingIconPlaceholder,ownerState:T})}),F=o||"",U=typeof x=="boolean"?s.jsx("span",{className:D.loadingWrapper,style:{display:"contents"},children:x&&s.jsx(DGt,{className:D.loadingIndicator,ownerState:T,children:k})}):null;return s.jsxs(MGt,{ownerState:T,className:Ae(r.className,D.root,d,F),component:u,disabled:f||x,focusRipple:!m,focusVisibleClassName:Ae(D.focusVisible,b),ref:n,type:E,id:x?R:v,...A,classes:D,children:[O,C!=="end"&&U,l,C==="end"&&U,z]})});function LGt(e){return kr("MuiInputAdornment",e)}const tne=Mr("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var jje;const $Gt=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${_n(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},FGt=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e,l={root:["root",n&&"disablePointerEvents",o&&`position${_n(o)}`,a,r&&"hiddenLabel",i&&`size${_n(i)}`]};return qn(l,LGt,t)},BGt=qt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:$Gt})(Ar(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${tne.positionStart}&:not(.${tne.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),zGt=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:l=!1,disableTypography:c=!1,position:u,variant:d,...f}=r,h=f1()||{};let m=d;d&&h.variant,h&&!m&&(m=h.variant);const g={...r,hiddenLabel:h.hiddenLabel,size:h.size,disablePointerEvents:l,position:u,variant:m},b=FGt(g);return s.jsx(fV.Provider,{value:null,children:s.jsx(BGt,{as:a,ownerState:g,className:Ae(b.root,i),ref:n,...f,children:typeof o=="string"&&!c?s.jsx(An,{color:"textSecondary",children:o}):s.jsxs(p.Fragment,{children:[u==="start"?jje||(jje=s.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,o]})})})});function HGt(e){return kr("MuiTooltip",e)}const Kc=Mr("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function VGt(e){return Math.round(e*1e5)/1e5}const UGt=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${_n(i.split("-")[0])}`],arrow:["arrow"]};return qn(a,HGt,t)},GGt=qt(fO,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Ar(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${Kc.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Kc.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Kc.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Kc.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Kc.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Kc.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Kc.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Kc.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),WGt=qt("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${_n(n.placement.split("-")[0])}`]]}})(Ar(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${Kc.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Kc.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Kc.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Kc.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${VGt(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${Kc.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Kc.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${Kc.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Kc.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${Kc.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Kc.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${Kc.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Kc.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Kc.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Kc.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),qGt=qt("span",{name:"MuiTooltip",slot:"Arrow"})(Ar(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let YL=!1;const Nje=new dV;let TT={x:0,y:0};function XL(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const AUe=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiTooltip"}),{arrow:o=!1,children:i,classes:a,components:l={},componentsProps:c={},describeChild:u=!1,disableFocusListener:d=!1,disableHoverListener:f=!1,disableInteractive:h=!1,disableTouchListener:m=!1,enterDelay:g=100,enterNextDelay:b=0,enterTouchDelay:y=700,followCursor:v=!1,id:x,leaveDelay:S=0,leaveTouchDelay:C=1500,onClose:_,onOpen:N,open:E,placement:I="bottom",PopperComponent:A,PopperProps:R={},slotProps:k={},slots:T={},title:D,TransitionComponent:O,TransitionProps:z,...F}=r,U=p.isValidElement(i)?i:s.jsx("span",{children:i}),G=Rm(),W=af(),[Y,B]=p.useState(),[$,K]=p.useState(null),q=p.useRef(!1),Z=h||v,J=kp(),oe=kp(),de=kp(),ae=kp(),[ue,ce]=fS({controlled:E,default:!1,name:"Tooltip",state:"open"});let se=ue;const me=pi(x),fe=p.useRef(),te=no(()=>{fe.current!==void 0&&(document.body.style.WebkitUserSelect=fe.current,fe.current=void 0),ae.clear()});p.useEffect(()=>te,[te]);const ye=kt=>{Nje.clear(),YL=!0,ce(!0),N&&!se&&N(kt)},ve=no(kt=>{Nje.start(800+S,()=>{YL=!1}),ce(!1),_&&se&&_(kt),J.start(G.transitions.duration.shortest,()=>{q.current=!1})}),ge=kt=>{q.current&&kt.type!=="touchstart"||(Y&&Y.removeAttribute("title"),oe.clear(),de.clear(),g||YL&&b?oe.start(YL?b:g,()=>{ye(kt)}):ye(kt))},Ee=kt=>{oe.clear(),de.start(S,()=>{ve(kt)})},[,xe]=p.useState(!1),Ne=kt=>{jP(kt.target)||(xe(!1),Ee(kt))},_e=kt=>{Y||B(kt.currentTarget),jP(kt.target)&&(xe(!0),ge(kt))},Be=kt=>{q.current=!0;const pn=U.props;pn.onTouchStart&&pn.onTouchStart(kt)},Te=kt=>{Be(kt),de.clear(),J.clear(),te(),fe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ae.start(y,()=>{document.body.style.WebkitUserSelect=fe.current,ge(kt)})},Ge=kt=>{U.props.onTouchEnd&&U.props.onTouchEnd(kt),te(),de.start(C,()=>{ve(kt)})};p.useEffect(()=>{if(!se)return;function kt(pn){pn.key==="Escape"&&ve(pn)}return document.addEventListener("keydown",kt),()=>{document.removeEventListener("keydown",kt)}},[ve,se]);const Ze=Yi(Pj(U),B,n);!D&&D!==0&&(se=!1);const ht=p.useRef(),Oe=kt=>{const pn=U.props;pn.onMouseMove&&pn.onMouseMove(kt),TT={x:kt.clientX,y:kt.clientY},ht.current&&ht.current.update()},ft={},Qe=typeof D=="string";u?(ft.title=!se&&Qe&&!f?D:null,ft["aria-describedby"]=se?me:null):(ft["aria-label"]=Qe?D:null,ft["aria-labelledby"]=se&&!Qe?me:null);const De={...ft,...F,...U.props,className:Ae(F.className,U.props.className),onTouchStart:Be,ref:Ze,...v?{onMouseMove:Oe}:{}},st={};m||(De.onTouchStart=Te,De.onTouchEnd=Ge),f||(De.onMouseOver=XL(ge,De.onMouseOver),De.onMouseLeave=XL(Ee,De.onMouseLeave),Z||(st.onMouseOver=ge,st.onMouseLeave=Ee)),d||(De.onFocus=XL(_e,De.onFocus),De.onBlur=XL(Ne,De.onBlur),Z||(st.onFocus=_e,st.onBlur=Ne));const vt={...r,isRtl:W,arrow:o,disableInteractive:Z,placement:I,PopperComponentProp:A,touch:q.current},qe=typeof k.popper=="function"?k.popper(vt):k.popper,Ye=p.useMemo(()=>{var pn,tt;let kt=[{name:"arrow",enabled:!!$,options:{element:$,padding:4}}];return(pn=R.popperOptions)!=null&&pn.modifiers&&(kt=kt.concat(R.popperOptions.modifiers)),(tt=qe==null?void 0:qe.popperOptions)!=null&&tt.modifiers&&(kt=kt.concat(qe.popperOptions.modifiers)),{...R.popperOptions,...qe==null?void 0:qe.popperOptions,modifiers:kt}},[$,R.popperOptions,qe==null?void 0:qe.popperOptions]),mt=UGt(vt),Et=typeof k.transition=="function"?k.transition(vt):k.transition,vn={slots:{popper:l.Popper,transition:l.Transition??O,tooltip:l.Tooltip,arrow:l.Arrow,...T},slotProps:{arrow:k.arrow??c.arrow,popper:{...R,...qe??c.popper},tooltip:k.tooltip??c.tooltip,transition:{...z,...Et??c.transition}}},[gt,Fe]=Dr("popper",{elementType:GGt,externalForwardedProps:vn,ownerState:vt,className:Ae(mt.popper,R==null?void 0:R.className)}),[$e,nt]=Dr("transition",{elementType:IP,externalForwardedProps:vn,ownerState:vt}),[wt,Dt]=Dr("tooltip",{elementType:WGt,className:mt.tooltip,externalForwardedProps:vn,ownerState:vt}),[on,jn]=Dr("arrow",{elementType:qGt,className:mt.arrow,externalForwardedProps:vn,ownerState:vt,ref:K});return s.jsxs(p.Fragment,{children:[p.cloneElement(U,De),s.jsx(gt,{as:A??fO,placement:I,anchorEl:v?{getBoundingClientRect:()=>({top:TT.y,left:TT.x,right:TT.x,bottom:TT.y,width:0,height:0})}:Y,popperRef:ht,open:Y?se:!1,id:me,transition:!0,...st,...Fe,popperOptions:Ye,children:({TransitionProps:kt})=>s.jsx($e,{timeout:G.transitions.duration.shorter,...kt,...nt,children:s.jsxs(wt,{...Dt,children:[D,o?s.jsx(on,{...jn}):null]})})})]})}),TUe=p.createContext(),yV=p.createContext();function KGt(e){return kr("MuiTableCell",e)}const YGt=Mr("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),XGt=e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e,l={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${_n(r)}`,o!=="normal"&&`padding${_n(o)}`,`size${_n(i)}`]};return qn(l,KGt,t)},ZGt=qt("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${_n(n.size)}`],n.padding!=="normal"&&t[`padding${_n(n.padding)}`],n.align!=="inherit"&&t[`align${_n(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(Ar(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid + ${e.palette.mode==="light"?e.lighten(e.alpha(e.palette.divider,1),.88):e.darken(e.alpha(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${YGt.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:t})=>t.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),Kr=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:l,scope:c,size:u,sortDirection:d,variant:f,...h}=r,m=p.useContext(TUe),g=p.useContext(yV),b=g&&g.variant==="head";let y;a?y=a:y=b?"th":"td";let v=c;y==="td"?v=void 0:!v&&b&&(v="col");const x=f||g&&g.variant,S={...r,align:o,component:y,padding:l||(m&&m.padding?m.padding:"normal"),size:u||(m&&m.size?m.size:"medium"),sortDirection:d,stickyHeader:x==="head"&&m&&m.stickyHeader,variant:x},C=XGt(S);let _=null;return d&&(_=d==="asc"?"ascending":"descending"),s.jsx(ZGt,{as:y,ref:n,className:Ae(C.root,i),"aria-sort":_,scope:v,ownerState:S,...h})});function JGt(e){return kr("MuiToolbar",e)}Mr("MuiToolbar",["root","gutters","regular","dense"]);const QGt=e=>{const{classes:t,disableGutters:n,variant:r}=e;return qn({root:["root",!n&&"gutters",r]},JGt,t)},eWt=qt("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Ar(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),kUe=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:a=!1,variant:l="regular",...c}=r,u={...r,component:i,disableGutters:a,variant:l},d=QGt(u);return s.jsx(eWt,{as:i,className:Ae(d.root,o),ref:n,ownerState:u,...c})}),MUe=si(s.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),RUe=si(s.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),tWt=si(s.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"})),nWt=si(s.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}));function rWt(e){return kr("MuiTablePaginationActions",e)}Mr("MuiTablePaginationActions",["root"]);const oWt=e=>{const{classes:t}=e;return qn({root:["root"]},rWt,t)},iWt=qt("div",{name:"MuiTablePaginationActions",slot:"Root"})({}),aWt=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiTablePaginationActions"}),{backIconButtonProps:o,className:i,count:a,disabled:l=!1,getItemAriaLabel:c,nextIconButtonProps:u,onPageChange:d,page:f,rowsPerPage:h,showFirstButton:m,showLastButton:g,slots:b={},slotProps:y={},...v}=r,x=af(),C=oWt(r),_=Z=>{d(Z,0)},N=Z=>{d(Z,f-1)},E=Z=>{d(Z,f+1)},I=Z=>{d(Z,Math.max(0,Math.ceil(a/h)-1))},A=b.firstButton??vd,R=b.lastButton??vd,k=b.nextButton??vd,T=b.previousButton??vd,D=b.firstButtonIcon??nWt,O=b.lastButtonIcon??tWt,z=b.nextButtonIcon??RUe,F=b.previousButtonIcon??MUe,U=x?R:A,G=x?k:T,W=x?T:k,Y=x?A:R,B=x?y.lastButton:y.firstButton,$=x?y.nextButton:y.previousButton,K=x?y.previousButton:y.nextButton,q=x?y.firstButton:y.lastButton;return s.jsxs(iWt,{ref:n,className:Ae(C.root,i),...v,children:[m&&s.jsx(U,{onClick:_,disabled:l||f===0,"aria-label":c("first",f),title:c("first",f),...B,children:x?s.jsx(O,{...y.lastButtonIcon}):s.jsx(D,{...y.firstButtonIcon})}),s.jsx(G,{onClick:N,disabled:l||f===0,color:"inherit","aria-label":c("previous",f),title:c("previous",f),...$??o,children:x?s.jsx(z,{...y.nextButtonIcon}):s.jsx(F,{...y.previousButtonIcon})}),s.jsx(W,{onClick:E,disabled:l||(a!==-1?f>=Math.ceil(a/h)-1:!1),color:"inherit","aria-label":c("next",f),title:c("next",f),...K??u,children:x?s.jsx(F,{...y.previousButtonIcon}):s.jsx(z,{...y.nextButtonIcon})}),g&&s.jsx(Y,{onClick:I,disabled:l||f>=Math.ceil(a/h)-1,"aria-label":c("last",f),title:c("last",f),...q,children:x?s.jsx(D,{...y.firstButtonIcon}):s.jsx(O,{...y.lastButtonIcon})})]})});function sWt(e){return kr("MuiTablePagination",e)}const o_=Mr("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var Eje;const lWt=qt(Kr,{name:"MuiTablePagination",slot:"Root"})(Ar(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),cWt=qt(kUe,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${o_.actions}`]:t.actions,...t.toolbar})})(Ar(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${o_.actions}`]:{flexShrink:0,marginLeft:20}}))),uWt=qt("div",{name:"MuiTablePagination",slot:"Spacer"})({flex:"1 1 100%"}),dWt=qt("p",{name:"MuiTablePagination",slot:"SelectLabel"})(Ar(({theme:e})=>({...e.typography.body2,flexShrink:0}))),fWt=qt(Op,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${o_.selectIcon}`]:t.selectIcon,[`& .${o_.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${o_.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),pWt=qt(ml,{name:"MuiTablePagination",slot:"MenuItem"})({}),hWt=qt("p",{name:"MuiTablePagination",slot:"DisplayedRows"})(Ar(({theme:e})=>({...e.typography.body2,flexShrink:0})));function mWt({from:e,to:t,count:n}){return`${e}–${t} of ${n!==-1?n:`more than ${t}`}`}function gWt(e){return`Go to ${e} page`}const yWt=e=>{const{classes:t}=e;return qn({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},sWt,t)},bWt=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiTablePagination"}),{ActionsComponent:o=aWt,backIconButtonProps:i,colSpan:a,component:l=Kr,count:c,disabled:u=!1,getItemAriaLabel:d=gWt,labelDisplayedRows:f=mWt,labelRowsPerPage:h="Rows per page:",nextIconButtonProps:m,onPageChange:g,onRowsPerPageChange:b,page:y,rowsPerPage:v,rowsPerPageOptions:x=[10,25,50,100],SelectProps:S={},showFirstButton:C=!1,showLastButton:_=!1,slotProps:N={},slots:E={},...I}=r,A=r,R=yWt(A),k=(N==null?void 0:N.select)??S,T=k.native?"option":pWt;let D;(l===Kr||l==="td")&&(D=a||1e3);const O=pi(k.id),z=pi(k.labelId),F=()=>c===-1?(y+1)*v:v===-1?c:Math.min(c,(y+1)*v),U={slots:E,slotProps:N},[G,W]=Dr("root",{ref:n,className:R.root,elementType:lWt,externalForwardedProps:{...U,component:l,...I},ownerState:A,additionalProps:{colSpan:D}}),[Y,B]=Dr("toolbar",{className:R.toolbar,elementType:cWt,externalForwardedProps:U,ownerState:A}),[$,K]=Dr("spacer",{className:R.spacer,elementType:uWt,externalForwardedProps:U,ownerState:A}),[q,Z]=Dr("selectLabel",{className:R.selectLabel,elementType:dWt,externalForwardedProps:U,ownerState:A,additionalProps:{id:z}}),[J,oe]=Dr("select",{className:R.select,elementType:fWt,externalForwardedProps:U,ownerState:A}),[de,ae]=Dr("menuItem",{className:R.menuItem,elementType:T,externalForwardedProps:U,ownerState:A}),[ue,ce]=Dr("displayedRows",{className:R.displayedRows,elementType:hWt,externalForwardedProps:U,ownerState:A});return s.jsx(G,{...W,children:s.jsxs(Y,{...B,children:[s.jsx($,{...K}),x.length>1&&s.jsx(q,{...Z,children:h}),x.length>1&&s.jsx(J,{variant:"standard",...!k.variant&&{input:Eje||(Eje=s.jsx(pO,{}))},value:v,onChange:b,id:O,labelId:z,...k,classes:{...k.classes,root:Ae(R.input,R.selectRoot,(k.classes||{}).root),select:Ae(R.select,(k.classes||{}).select),icon:Ae(R.selectIcon,(k.classes||{}).icon)},disabled:u,...oe,children:x.map(se=>p.createElement(de,{...ae,key:se.label?se.label:se,value:se.value?se.value:se},se.label?se.label:se))}),s.jsx(ue,{...ce,children:f({from:c===0?0:y*v+1,to:F(),count:c===-1?-1:c,page:y})}),s.jsx(o,{className:R.actions,backIconButtonProps:i,count:c,nextIconButtonProps:m,onPageChange:g,page:y,rowsPerPage:v,showFirstButton:C,showLastButton:_,slotProps:N.actions,slots:E.actions,getItemAriaLabel:d,disabled:u})]})})});function Pje(e){return e.substring(2).toLowerCase()}function vWt(e,t){return t.documentElement.clientWidth(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const d=Yi(Pj(t),l),f=no(g=>{const b=u.current;u.current=!1;const y=lc(l.current);if(!c.current||!l.current||"clientX"in g&&vWt(g,y))return;if(a.current){a.current=!1;return}let v;g.composedPath?v=g.composedPath().includes(l.current):v=!y.documentElement.contains(g.target)||l.current.contains(g.target),!v&&(n||!b)&&o(g)}),h=g=>b=>{u.current=!0;const y=t.props[g];y&&y(b)},m={ref:d};return i!==!1&&(m[i]=h(i)),p.useEffect(()=>{if(i!==!1){const g=Pje(i),b=lc(l.current),y=()=>{a.current=!0};return b.addEventListener(g,f),b.addEventListener("touchmove",y),()=>{b.removeEventListener(g,f),b.removeEventListener("touchmove",y)}}},[f,i]),r!==!1&&(m[r]=h(r)),p.useEffect(()=>{if(r!==!1){const g=Pje(r),b=lc(l.current);return b.addEventListener(g,f),()=>{b.removeEventListener(g,f)}}},[f,r]),p.cloneElement(t,m)}function xWt(e){return kr("MuiSkeleton",e)}Mr("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const wWt=e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:i,height:a}=e;return qn({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},xWt,t)},nne=Dh` + 0% { + opacity: 1; + } + + 50% { + opacity: 0.4; + } + + 100% { + opacity: 1; + } +`,rne=Dh` + 0% { + transform: translateX(-100%); + } + + 50% { + /* +0.5s of delay between each loop */ + transform: translateX(100%); + } + + 100% { + transform: translateX(100%); + } +`,SWt=typeof nne!="string"?Zb` + animation: ${nne} 2s ease-in-out 0.5s infinite; + `:null,CWt=typeof rne!="string"?Zb` + &::after { + animation: ${rne} 2s linear 0.5s infinite; + } + `:null,_Wt=qt("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.animation!==!1&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(Ar(({theme:e})=>{const t=QBt(e.shape.borderRadius)||"px",n=ezt(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:e.alpha(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:r})=>r.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:r})=>r.hasChildren&&!r.width,style:{maxWidth:"fit-content"}},{props:({ownerState:r})=>r.hasChildren&&!r.height,style:{height:"auto"}},{props:{animation:"pulse"},style:SWt||{animation:`${nne} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient( + 90deg, + transparent, + ${(e.vars||e).palette.action.hover}, + transparent + )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:CWt||{"&::after":{animation:`${rne} 2s linear 0.5s infinite`}}}]}})),jWt=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiSkeleton"}),{animation:o="pulse",className:i,component:a="span",height:l,style:c,variant:u="text",width:d,...f}=r,h={...r,animation:o,component:a,variant:u,hasChildren:!!f.children},m=wWt(h);return s.jsx(_Wt,{as:a,ref:n,className:Ae(m.root,i),ownerState:h,...f,style:{width:d,height:l,...c}})});function NWt(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function EWt(e,t,n,r={},o=()=>{}){const{ease:i=NWt,duration:a=300}=r;let l=null;const c=t[e];let u=!1;const d=()=>{u=!0},f=h=>{if(u){o(new Error("Animation cancelled"));return}l===null&&(l=h);const m=Math.min(1,(h-l)/a);if(t[e]=i(m)*(n-c)+c,m>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(f)};return c===n?(o(new Error("Element already at target position")),d):(requestAnimationFrame(f),d)}const PWt={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function IWt(e){const{onChange:t,...n}=e,r=p.useRef(),o=p.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return wa(()=>{const a=Fb(()=>{const c=r.current;i(),c!==r.current&&t(r.current)}),l=Q0(o.current);return l.addEventListener("resize",a),()=>{a.clear(),l.removeEventListener("resize",a)}},[t]),p.useEffect(()=>{i(),t(r.current)},[t]),s.jsx("div",{style:PWt,...n,ref:o})}function AWt(e){return kr("MuiTabScrollButton",e)}const TWt=Mr("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),kWt=e=>{const{classes:t,orientation:n,disabled:r}=e;return qn({root:["root",n,r&&"disabled"]},AWt,t)},MWt=qt(Bb,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${TWt.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),RWt=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiTabScrollButton"}),{className:o,slots:i={},slotProps:a={},direction:l,orientation:c,disabled:u,...d}=r,f=af(),h={isRtl:f,...r},m=kWt(h),g=i.StartScrollButtonIcon??MUe,b=i.EndScrollButtonIcon??RUe,y=_P({elementType:g,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),v=_P({elementType:b,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return s.jsx(MWt,{component:"div",className:Ae(m.root,o),ref:n,role:null,ownerState:h,tabIndex:null,...d,style:{...d.style,...c==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${f?-90:90}deg)`}},children:l==="left"?s.jsx(g,{...y}):s.jsx(b,{...v})})});function OWt(e){return kr("MuiTabs",e)}const EY=Mr("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Ije=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Aje=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,ZL=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},DWt=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:l,classes:c}=e;return qn({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},OWt,c)},LWt=qt("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${EY.scrollButtons}`]:t.scrollButtons},{[`& .${EY.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Ar(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${EY.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),$Wt=qt("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),FWt=qt("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),BWt=qt("span",{name:"MuiTabs",slot:"Indicator"})(Ar(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),zWt=qt(IWt)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Tje={},DUe=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiTabs"}),o=Rm(),i=af(),{"aria-label":a,"aria-labelledby":l,action:c,centered:u=!1,children:d,className:f,component:h="div",allowScrollButtonsMobile:m=!1,indicatorColor:g="primary",onChange:b,orientation:y="horizontal",ScrollButtonComponent:v,scrollButtons:x="auto",selectionFollowsFocus:S,slots:C={},slotProps:_={},TabIndicatorProps:N={},TabScrollButtonProps:E={},textColor:I="primary",value:A,variant:R="standard",visibleScrollbar:k=!1,...T}=r,D=R==="scrollable",O=y==="vertical",z=O?"scrollTop":"scrollLeft",F=O?"top":"left",U=O?"bottom":"right",G=O?"clientHeight":"clientWidth",W=O?"height":"width",Y={...r,component:h,allowScrollButtonsMobile:m,indicatorColor:g,orientation:y,vertical:O,scrollButtons:x,textColor:I,variant:R,visibleScrollbar:k,fixed:!D,hideScrollbar:D&&!k,scrollableX:D&&!O,scrollableY:D&&O,centered:u&&!D,scrollButtonsHideMobile:!m},B=DWt(Y),$=_P({elementType:C.StartScrollButtonIcon,externalSlotProps:_.startScrollButtonIcon,ownerState:Y}),K=_P({elementType:C.EndScrollButtonIcon,externalSlotProps:_.endScrollButtonIcon,ownerState:Y}),[q,Z]=p.useState(!1),[J,oe]=p.useState(Tje),[de,ae]=p.useState(!1),[ue,ce]=p.useState(!1),[se,me]=p.useState(!1),[fe,te]=p.useState({overflow:"hidden",scrollbarWidth:0}),ye=new Map,ve=p.useRef(null),ge=p.useRef(null),Ee={slots:C,slotProps:{indicator:N,scrollButton:E,..._}},xe=()=>{const tt=ve.current;let jt;if(tt){const Xt=tt.getBoundingClientRect();jt={clientWidth:tt.clientWidth,scrollLeft:tt.scrollLeft,scrollTop:tt.scrollTop,scrollWidth:tt.scrollWidth,top:Xt.top,bottom:Xt.bottom,left:Xt.left,right:Xt.right}}let Nn;if(tt&&A!==!1){const Xt=ge.current.children;if(Xt.length>0){const ln=Xt[ye.get(A)];Nn=ln?ln.getBoundingClientRect():null}}return{tabsMeta:jt,tabMeta:Nn}},Ne=no(()=>{const{tabsMeta:tt,tabMeta:jt}=xe();let Nn=0,Xt;O?(Xt="top",jt&&tt&&(Nn=jt.top-tt.top+tt.scrollTop)):(Xt=i?"right":"left",jt&&tt&&(Nn=(i?-1:1)*(jt[Xt]-tt[Xt]+tt.scrollLeft)));const ln={[Xt]:Nn,[W]:jt?jt[W]:0};if(typeof J[Xt]!="number"||typeof J[W]!="number")oe(ln);else{const un=Math.abs(J[Xt]-ln[Xt]),Kt=Math.abs(J[W]-ln[W]);(un>=1||Kt>=1)&&oe(ln)}}),_e=(tt,{animation:jt=!0}={})=>{jt?EWt(z,ve.current,tt,{duration:o.transitions.duration.standard}):ve.current[z]=tt},Be=tt=>{let jt=ve.current[z];O?jt+=tt:jt+=tt*(i?-1:1),_e(jt)},Te=()=>{const tt=ve.current[G];let jt=0;const Nn=Array.from(ge.current.children);for(let Xt=0;Xttt){Xt===0&&(jt=tt);break}jt+=ln[G]}return jt},Ge=()=>{Be(-1*Te())},Ze=()=>{Be(Te())},[ht,{onChange:Oe,...ft}]=Dr("scrollbar",{className:Ae(B.scrollableX,B.hideScrollbar),elementType:zWt,shouldForwardComponentProp:!0,externalForwardedProps:Ee,ownerState:Y}),Qe=p.useCallback(tt=>{Oe==null||Oe(tt),te({overflow:null,scrollbarWidth:tt})},[Oe]),[De,st]=Dr("scrollButtons",{className:Ae(B.scrollButtons,E.className),elementType:RWt,externalForwardedProps:Ee,ownerState:Y,additionalProps:{orientation:y,slots:{StartScrollButtonIcon:C.startScrollButtonIcon||C.StartScrollButtonIcon,EndScrollButtonIcon:C.endScrollButtonIcon||C.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:$,endScrollButtonIcon:K}}}),vt=()=>{const tt={};tt.scrollbarSizeListener=D?s.jsx(ht,{...ft,onChange:Qe}):null;const Nn=D&&(x==="auto"&&(de||ue)||x===!0);return tt.scrollButtonStart=Nn?s.jsx(De,{direction:i?"right":"left",onClick:Ge,disabled:!de,...st}):null,tt.scrollButtonEnd=Nn?s.jsx(De,{direction:i?"left":"right",onClick:Ze,disabled:!ue,...st}):null,tt},qe=no(tt=>{const{tabsMeta:jt,tabMeta:Nn}=xe();if(!(!Nn||!jt)){if(Nn[F]jt[U]){const Xt=jt[z]+(Nn[U]-jt[U]);_e(Xt,{animation:tt})}}}),Ye=no(()=>{D&&x!==!1&&me(!se)});p.useEffect(()=>{const tt=Fb(()=>{ve.current&&Ne()});let jt;const Nn=un=>{un.forEach(Kt=>{Kt.removedNodes.forEach(On=>{jt==null||jt.unobserve(On)}),Kt.addedNodes.forEach(On=>{jt==null||jt.observe(On)})}),tt(),Ye()},Xt=Q0(ve.current);Xt.addEventListener("resize",tt);let ln;return typeof ResizeObserver<"u"&&(jt=new ResizeObserver(tt),Array.from(ge.current.children).forEach(un=>{jt.observe(un)})),typeof MutationObserver<"u"&&(ln=new MutationObserver(Nn),ln.observe(ge.current,{childList:!0})),()=>{tt.clear(),Xt.removeEventListener("resize",tt),ln==null||ln.disconnect(),jt==null||jt.disconnect()}},[Ne,Ye]),p.useEffect(()=>{const tt=Array.from(ge.current.children),jt=tt.length;if(typeof IntersectionObserver<"u"&&jt>0&&D&&x!==!1){const Nn=tt[0],Xt=tt[jt-1],ln={root:ve.current,threshold:.99},un=ur=>{ae(!ur[0].isIntersecting)},Kt=new IntersectionObserver(un,ln);Kt.observe(Nn);const On=ur=>{ce(!ur[0].isIntersecting)},Pr=new IntersectionObserver(On,ln);return Pr.observe(Xt),()=>{Kt.disconnect(),Pr.disconnect()}}},[D,x,se,d==null?void 0:d.length]),p.useEffect(()=>{Z(!0)},[]),p.useEffect(()=>{Ne()}),p.useEffect(()=>{qe(Tje!==J)},[qe,J]),p.useImperativeHandle(c,()=>({updateIndicator:Ne,updateScrollButtons:Ye}),[Ne,Ye]);const[mt,Et]=Dr("indicator",{className:Ae(B.indicator,N.className),elementType:BWt,externalForwardedProps:Ee,ownerState:Y,additionalProps:{style:J}}),vn=s.jsx(mt,{...Et});let gt=0;const Fe=p.Children.map(d,tt=>{if(!p.isValidElement(tt))return null;const jt=tt.props.value===void 0?gt:tt.props.value;ye.set(jt,gt);const Nn=jt===A;return gt+=1,p.cloneElement(tt,{fullWidth:R==="fullWidth",indicator:Nn&&!q&&vn,selected:Nn,selectionFollowsFocus:S,onChange:b,textColor:I,value:jt,...gt===1&&A===!1&&!tt.props.tabIndex?{tabIndex:0}:{}})}),$e=tt=>{if(tt.altKey||tt.shiftKey||tt.ctrlKey||tt.metaKey)return;const jt=ge.current,Nn=qE(lc(jt));if((Nn==null?void 0:Nn.getAttribute("role"))!=="tab")return;let ln=y==="horizontal"?"ArrowLeft":"ArrowUp",un=y==="horizontal"?"ArrowRight":"ArrowDown";switch(y==="horizontal"&&i&&(ln="ArrowRight",un="ArrowLeft"),tt.key){case ln:tt.preventDefault(),ZL(jt,Nn,Aje);break;case un:tt.preventDefault(),ZL(jt,Nn,Ije);break;case"Home":tt.preventDefault(),ZL(jt,null,Ije);break;case"End":tt.preventDefault(),ZL(jt,null,Aje);break}},nt=vt(),[wt,Dt]=Dr("root",{ref:n,className:Ae(B.root,f),elementType:LWt,externalForwardedProps:{...Ee,...T,component:h},ownerState:Y}),[on,jn]=Dr("scroller",{ref:ve,className:B.scroller,elementType:$Wt,externalForwardedProps:Ee,ownerState:Y,additionalProps:{style:{overflow:fe.overflow,[O?`margin${i?"Left":"Right"}`:"marginBottom"]:k?void 0:-fe.scrollbarWidth}}}),[kt,pn]=Dr("list",{ref:ge,className:Ae(B.list,B.flexContainer),elementType:FWt,externalForwardedProps:Ee,ownerState:Y,getSlotProps:tt=>({...tt,onKeyDown:jt=>{var Nn;$e(jt),(Nn=tt.onKeyDown)==null||Nn.call(tt,jt)}})});return s.jsxs(wt,{...Dt,children:[nt.scrollButtonStart,nt.scrollbarSizeListener,s.jsxs(on,{...jn,children:[s.jsx(kt,{"aria-label":a,"aria-labelledby":l,"aria-orientation":y==="vertical"?"vertical":null,role:"tablist",...pn,children:Fe}),q&&vn]}),nt.scrollButtonEnd]})});function HWt(e){return kr("MuiTab",e)}const Km=Mr("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),VWt=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:l,disabled:c}=e,u={root:["root",i&&a&&"labelIcon",`textColor${_n(n)}`,r&&"fullWidth",o&&"wrapped",l&&"selected",c&&"disabled"],icon:["iconWrapper","icon"]};return qn(u,HWt,t)},UWt=qt(Bb,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${_n(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${Km.iconWrapper}`]:t.iconWrapper},{[`& .${Km.icon}`]:t.icon}]}})(Ar(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="top",style:{[`& > .${Km.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="bottom",style:{[`& > .${Km.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="start",style:{[`& > .${Km.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="end",style:{[`& > .${Km.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Km.selected}`]:{opacity:1},[`&.${Km.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Km.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Km.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Km.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Km.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),c8=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:l,icon:c,iconPosition:u="top",indicator:d,label:f,onChange:h,onClick:m,onFocus:g,selected:b,selectionFollowsFocus:y,textColor:v="inherit",value:x,wrapped:S=!1,...C}=r,_={...r,disabled:i,disableFocusRipple:a,selected:b,icon:!!c,iconPosition:u,label:!!f,fullWidth:l,textColor:v,wrapped:S},N=VWt(_),E=c&&f&&p.isValidElement(c)?p.cloneElement(c,{className:Ae(N.icon,c.props.className)}):c,I=R=>{!b&&h&&h(R,x),m&&m(R)},A=R=>{y&&!b&&h&&h(R,x),g&&g(R)};return s.jsxs(UWt,{focusRipple:!a,className:Ae(N.root,o),ref:n,role:"tab","aria-selected":b,disabled:i,onClick:I,onFocus:A,ownerState:_,tabIndex:b?0:-1,...C,children:[u==="top"||u==="start"?s.jsxs(p.Fragment,{children:[E,f]}):s.jsxs(p.Fragment,{children:[f,E]}),d]})});function GWt(e){return kr("MuiToggleButton",e)}const PY=Mr("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),WWt=p.createContext({}),qWt=p.createContext(void 0);function KWt(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}const YWt=e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:a}=e,l={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${_n(i)}`,a]};return qn(l,GWt,t)},XWt=qt(Bb,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${_n(n.size)}`]]}})(Ar(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${PY.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${PY.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(Us()).map(([t])=>({props:{color:t},style:{[`&.${PY.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),ZWt=p.forwardRef(function(t,n){const{value:r,...o}=p.useContext(WWt),i=p.useContext(qWt),a=T_({...o,selected:KWt(t.value,r)},t),l=Lr({props:a,name:"MuiToggleButton"}),{children:c,className:u,color:d="standard",disabled:f=!1,disableFocusRipple:h=!1,fullWidth:m=!1,onChange:g,onClick:b,selected:y,size:v="medium",value:x,...S}=l,C={...l,color:d,disabled:f,disableFocusRipple:h,fullWidth:m,size:v},_=YWt(C),N=I=>{b&&(b(I,x),I.defaultPrevented)||g&&g(I,x)},E=i||"";return s.jsx(XWt,{className:Ae(o.className,_.root,u,E),disabled:f,focusRipple:!h,ref:n,onClick:N,onChange:g,value:x,ownerState:C,"aria-pressed":y,...S,children:c})}),Ide=parseInt(p.version,10),so=e=>{if(Ide>=19){const t=n=>e(n,n.ref??null);return t.displayName=e.displayName??e.name,t}return p.forwardRef(e)},Ks=si,kje=Ks(s.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"})),Mje=Ks(s.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),Rje=Ks(s.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),Oje=Ks(s.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})),JWt=Ks(s.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"})),Dje=Ks(s.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"})),QWt=Ks(s.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}));Ks(s.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}));Ks(s.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}));const eqt=Ks(s.jsx("path",{d:"M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"})),tqt=Ks(s.jsx("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"})),nqt=Ks(s.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"})),rqt=Ks(s.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"})),oqt=Ks(s.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"})),iqt=Ks(s.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),Lje=Ks(s.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),$je=Ks(s.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})),aqt=Ks(s.jsx("path",{d:"M19 13H5v-2h14v2z"})),sqt=Ks(s.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})),Fje=Ks(s.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),Bje=Ks(s.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),lqt=Ks(s.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),cqt=Ks(s.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})),uqt=Ks(s.jsx("g",{children:s.jsx("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})})),zje=Ks(s.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}));Ks(s.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}));const dqt=Ks(s.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"})),fqt=Ks(s.jsx("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"})),LUe=p.createContext(void 0),br=()=>{const e=p.useContext(LUe);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e},pqt=["sortingOrder"],hqt=p.memo(function(t){const{sortingOrder:n}=t,r=sr(t,pqt),o=br(),[i]=n,a=i==="asc"?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?s.jsx(a,we({},r)):null}),$Ue=p.createContext(void 0);function Po(){const e=p.useContext($Ue);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` +`));return e}const mqt=new TextEncoder;let u8=2*1024,x4=new ArrayBuffer(u8),IY=new Uint8Array(x4),kC=new Int32Array(x4);const gqt=yqt;function yqt(e){const t=e.length*2;t>u8&&(u8=t+(4-t%4),x4=new ArrayBuffer(u8),IY=new Uint8Array(x4),kC=new Int32Array(x4));const n=mqt.encodeInto(e,IY).written,r=0,o=n|0;let i=0,a=(r+o|0)+374761393|0;if(o<16)for(;(i+3|0)>>15,2246822519),a=Math.imul(a^a>>>13,3266489917),((a^a>>>16)>>>0).toString()}function c0(e,t){return e<>>32-t}const FUe={values:{xs:0,sm:600,md:900,lg:1200,xl:1536},up:e=>{const t=FUe.values;return`@media (min-width:${typeof t[e]=="number"?t[e]:e}px)`}},BUe={spacingUnit:"--DataGrid-t-spacing-unit",colors:{border:{base:"--DataGrid-t-color-border-base"},foreground:{base:"--DataGrid-t-color-foreground-base",muted:"--DataGrid-t-color-foreground-muted",accent:"--DataGrid-t-color-foreground-accent",disabled:"--DataGrid-t-color-foreground-disabled",error:"--DataGrid-t-color-foreground-error"},background:{base:"--DataGrid-t-color-background-base",overlay:"--DataGrid-t-color-background-overlay",backdrop:"--DataGrid-t-color-background-backdrop"},interactive:{hover:"--DataGrid-t-color-interactive-hover",hoverOpacity:"--DataGrid-t-color-interactive-hover-opacity",focus:"--DataGrid-t-color-interactive-focus",focusOpacity:"--DataGrid-t-color-interactive-focus-opacity",disabled:"--DataGrid-t-color-interactive-disabled",disabledOpacity:"--DataGrid-t-color-interactive-disabled-opacity",selected:"--DataGrid-t-color-interactive-selected",selectedOpacity:"--DataGrid-t-color-interactive-selected-opacity"}},header:{background:{base:"--DataGrid-t-header-background-base"}},cell:{background:{pinned:"--DataGrid-t-cell-background-pinned"}},radius:{base:"--DataGrid-t-radius-base"},typography:{font:{body:"--DataGrid-t-typography-font-body",small:"--DataGrid-t-typography-font-small",large:"--DataGrid-t-typography-font-large"},fontFamily:{base:"--DataGrid-t-typography-font-family-base"},fontWeight:{light:"--DataGrid-t-typography-font-weight-light",regular:"--DataGrid-t-typography-font-weight-regular",medium:"--DataGrid-t-typography-font-weight-medium",bold:"--DataGrid-t-typography-font-weight-bold"}},transitions:{easing:{easeIn:"--DataGrid-t-transition-easing-ease-in",easeOut:"--DataGrid-t-transition-easing-ease-out",easeInOut:"--DataGrid-t-transition-easing-ease-in-out"},duration:{short:"--DataGrid-t-transition-duration-short",base:"--DataGrid-t-transition-duration-base",long:"--DataGrid-t-transition-duration-long"}},shadows:{base:"--DataGrid-t-shadow-base",overlay:"--DataGrid-t-shadow-overlay"},zIndex:{panel:"--DataGrid-t-z-index-panel",menu:"--DataGrid-t-z-index-menu"}},bqt=zUe(BUe),xr=we({breakpoints:FUe,spacing:vqt,transition:xqt,keys:BUe},bqt);function vqt(e,t,n,r){return e===void 0?u0(1):t===void 0?u0(e):n===void 0?u0(e)+" "+u0(t):r===void 0?u0(e)+" "+u0(t)+" "+u0(n):u0(e)+" "+u0(t)+" "+u0(n)+" "+u0(r)}function u0(e){return e===0?"0":`calc(var(--DataGrid-t-spacing-unit) * ${e})`}function xqt(e,t){const{duration:n=xr.transitions.duration.base,easing:r=xr.transitions.easing.easeInOut,delay:o=0}=t??{};return e.map(i=>`${i} ${n} ${r} ${o}ms`).join(", ")}function zUe(e){if(typeof e=="string")return`var(${e})`;const t={};for(const n in e)Object.hasOwn(e,n)&&(t[n]=zUe(e[n]));return t}function wqt(){const e=Rm();return p.useMemo(()=>{const t=gqt(Nqt(e)),n=Sqt(e);return{id:t,variables:n}},[e])}function Sqt(e){var g,b,y,v,x,S;const t=_qt(e),n=(e.vars||e).palette.DataGrid,r=(n==null?void 0:n.bg)??(e.palette.mode==="dark"?`color-mix(in srgb, ${(e.vars||e).palette.background.paper} 95%, #fff)`:(e.vars||e).palette.background.paper),o=(n==null?void 0:n.headerBg)??r,i=(n==null?void 0:n.pinnedBg)??r,a=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:Ux(e.palette.background.default,e.palette.action.disabledOpacity),l=e.palette.mode==="dark"?`color-mix(in srgb, ${(e.vars||e).palette.background.paper} 90%, #fff)`:(e.vars||e).palette.background.paper,c=e.vars?`rgb(${e.vars.palette.primary.mainChannel})`:e.palette.primary.main,u=Cqt(e),d=((b=(g=e.vars)==null?void 0:g.font)==null?void 0:b.body2)??AY(e.typography.body2),f=((v=(y=e.vars)==null?void 0:y.font)==null?void 0:v.caption)??AY(e.typography.caption),h=((S=(x=e.vars)==null?void 0:x.font)==null?void 0:S.body1)??AY(e.typography.body1),m=xr.keys;return{[m.spacingUnit]:e.vars?e.vars.spacing??e.spacing(1):e.spacing(1),[m.colors.border.base]:t,[m.colors.background.base]:r,[m.colors.background.overlay]:l,[m.colors.background.backdrop]:a,[m.colors.foreground.base]:(e.vars||e).palette.text.primary,[m.colors.foreground.muted]:(e.vars||e).palette.text.secondary,[m.colors.foreground.accent]:(e.vars||e).palette.primary.dark,[m.colors.foreground.disabled]:(e.vars||e).palette.text.disabled,[m.colors.foreground.error]:(e.vars||e).palette.error.dark,[m.colors.interactive.hover]:(e.vars||e).palette.action.hover,[m.colors.interactive.hoverOpacity]:(e.vars||e).palette.action.hoverOpacity,[m.colors.interactive.focus]:Hje((e.vars||e).palette.primary.main),[m.colors.interactive.focusOpacity]:(e.vars||e).palette.action.focusOpacity,[m.colors.interactive.disabled]:Hje((e.vars||e).palette.action.disabled),[m.colors.interactive.disabledOpacity]:(e.vars||e).palette.action.disabledOpacity,[m.colors.interactive.selected]:c,[m.colors.interactive.selectedOpacity]:(e.vars||e).palette.action.selectedOpacity,[m.header.background.base]:o,[m.cell.background.pinned]:i,[m.radius.base]:u,[m.typography.fontFamily.base]:e.typography.fontFamily,[m.typography.fontWeight.light]:e.typography.fontWeightLight,[m.typography.fontWeight.regular]:e.typography.fontWeightRegular,[m.typography.fontWeight.medium]:e.typography.fontWeightMedium,[m.typography.fontWeight.bold]:e.typography.fontWeightBold,[m.typography.font.body]:d,[m.typography.font.small]:f,[m.typography.font.large]:h,[m.transitions.easing.easeIn]:e.transitions.easing.easeIn,[m.transitions.easing.easeOut]:e.transitions.easing.easeOut,[m.transitions.easing.easeInOut]:e.transitions.easing.easeInOut,[m.transitions.duration.short]:`${e.transitions.duration.shorter}ms`,[m.transitions.duration.base]:`${e.transitions.duration.short}ms`,[m.transitions.duration.long]:`${e.transitions.duration.standard}ms`,[m.shadows.base]:(e.vars||e).shadows[2],[m.shadows.overlay]:(e.vars||e).shadows[8],[m.zIndex.panel]:(e.vars||e).zIndex.modal,[m.zIndex.menu]:(e.vars||e).zIndex.modal}}function Cqt(e){return e.vars?e.vars.shape.borderRadius:typeof e.shape.borderRadius=="number"?`${e.shape.borderRadius}px`:e.shape.borderRadius}function _qt(e){return e.vars?e.vars.palette.TableCell.border:e.palette.mode==="light"?cO(Ux(e.palette.divider,1),.88):lO(Ux(e.palette.divider,1),.68)}function jqt(e,t){return`rgba(from ${e} r g b / ${t})`}function Hje(e){return jqt(e,1)}function AY(e){if(!e)return;const t=typeof e.fontSize=="number"?`${e.fontSize}px`:e.fontSize;return`${e.fontWeight} ${t} / ${e.lineHeight} ${e.fontFamily}`}function Nqt(e){const t=new WeakSet;return JSON.stringify(e,(n,r)=>{if(typeof window<"u"&&r===window||typeof document<"u"&&r===document)return r.toString();if(r!==null&&typeof r=="object"){if(p.isValidElement(r)||t.has(r))return null;t.add(r)}return r})}const Eqt=["id","label","labelId","material","disabled","slotProps","onChange","onKeyDown","onOpen","onClose","size","style","fullWidth"],Pqt=["onRowsPerPageChange","material","disabled"],Iqt=["material"],Aqt=["autoFocus","label","fullWidth","slotProps","className","material"],Tqt=["material"],kqt=["material"],Mqt=["material"],Rqt=["material"],Oqt=["material"],Dqt=["material"],Lqt=["material"],$qt=["material"],Fqt=["material"],Bqt=["material","label","className"],zqt=["material"],Hqt=["inert","iconStart","iconEnd","children","material"],Vqt=["slotProps","material"],Uqt=["id","multiple","freeSolo","options","getOptionLabel","isOptionEqualToValue","value","onChange","label","placeholder","slotProps","material"],Gqt=["key"],Wqt=["inputProps","InputProps","InputLabelProps"],qqt=["slotProps","material"],Kqt=["ref","open","children","className","clickAwayTouchEvent","clickAwayMouseEvent","flip","focusTrap","onExited","onClickAway","onDidShow","onDidHide","id","target","transition","placement","material"],Yqt=["native"],Xqt=["children","value","active"],Zqt=["items","value","material"],Vje=qt(zGt)(({theme:e})=>({[`&.${tne.positionEnd} .${Kte.sizeSmall}`]:{marginRight:e.spacing(-.75)}})),HUe=qt(SGt,{shouldForwardProp:e=>e!=="fullWidth"})(({theme:e})=>({gap:e.spacing(.5),margin:0,overflow:"hidden",[`& .${KE.label}`]:{fontSize:e.typography.pxToRem(14),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),Uje=qt(fVt,{shouldForwardProp:e=>e!=="density"})(({theme:e})=>({variants:[{props:{density:"compact"},style:{padding:e.spacing(.5)}}]})),Jqt=qt(Vv)({[`& .${E2.primary}`]:{overflowX:"clip",textOverflow:"ellipsis",maxWidth:"300px"}}),Qqt=so(function(t,n){const{id:r,label:o,labelId:i,material:a,disabled:l,slotProps:c,onChange:u,onKeyDown:d,onOpen:f,onClose:h,size:m,style:g,fullWidth:b}=t,y=sr(t,Eqt),v={PaperProps:{onKeyDown:d}};return h&&(v.onClose=h),s.jsxs(vh,{size:m,fullWidth:b,style:g,disabled:l,ref:n,children:[s.jsx(hm,{id:i,htmlFor:r,shrink:!0,variant:"outlined",children:o}),s.jsx(Op,we({id:r,labelId:i,label:o,displayEmpty:!0,onChange:u,variant:"outlined"},y,{notched:!0,inputProps:c==null?void 0:c.htmlInput,onOpen:f,MenuProps:v,size:m},a))]})}),eKt=qt(bWt)(({theme:e})=>({[`& .${o_.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${o_.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),tKt=so(function(t,n){const{onRowsPerPageChange:r,material:o,disabled:i}=t,a=sr(t,Pqt),l=p.useMemo(()=>{if(i)return{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}},[i]),c=Po(),u=br(),{estimatedRowCount:d}=u;return s.jsx(eKt,we({component:"div",onRowsPerPageChange:no(f=>{r==null||r(Number(f.target.value))}),labelRowsPerPage:c.current.getLocaleText("paginationRowsPerPage"),labelDisplayedRows:f=>c.current.getLocaleText("paginationDisplayedRows")(we({},f,{estimated:d})),getItemAriaLabel:c.current.getLocaleText("paginationItemAriaLabel")},l,a,o,{ref:n}))}),nKt=so(function(t,n){const{material:r}=t,o=sr(t,Iqt);return s.jsx(JHt,we({},o,r,{ref:n}))}),rKt=so(function(t,n){const{autoFocus:r,label:o,fullWidth:i,slotProps:a,className:l,material:c}=t,u=sr(t,Aqt),d=p.useRef(null),f=Yi(d,n),h=p.useRef(null);return p.useEffect(()=>{var m;if(r){const g=(m=d.current)==null?void 0:m.querySelector("input");g==null||g.focus({preventScroll:!0})}else r===!1&&h.current&&h.current.stop({})},[r]),o?s.jsx(HUe,{className:l,control:s.jsx(Uje,we({},u,c,{inputProps:a==null?void 0:a.htmlInput,ref:f,touchRippleRef:h})),label:o,fullWidth:i}):s.jsx(Uje,we({},u,c,{className:Ae(l,c==null?void 0:c.className),inputProps:a==null?void 0:a.htmlInput,ref:f,touchRippleRef:h}))}),oKt=so(function(t,n){const{material:r}=t,o=sr(t,Tqt);return s.jsx(rc,we({},o,r,{ref:n}))}),iKt=so(function(t,n){const{material:r}=t,o=sr(t,kqt);return s.jsx(EP,we({},o,r,{ref:n}))}),aKt=so(function(t,n){const{material:r}=t,o=sr(t,Mqt);return s.jsx(kVt,we({},o,r,{ref:n}))}),sKt=so(function(t,n){const{material:r}=t,o=sr(t,Rqt);return s.jsx(fi,we({},o,r,{ref:n}))}),lKt=qt(ZWt)(({theme:e})=>({gap:e.spacing(1),border:0})),cKt=so(function(t,n){const{material:r}=t,o=sr(t,Oqt);return s.jsx(lKt,we({size:"small",color:"primary"},o,r,{ref:n}))}),uKt=so(function(t,n){const{material:r}=t,o=sr(t,Dqt);return s.jsx(N5,we({},o,r,{ref:n}))}),dKt=so(function(t,n){const{material:r}=t,o=sr(t,Lqt);return s.jsx(vd,we({},o,r,{ref:n}))}),fKt=so(function(t,n){const{material:r}=t,o=sr(t,$qt);return s.jsx(AUe,we({},o,r,{ref:n}))}),pKt=so(function(t,n){const{material:r}=t,o=sr(t,Fqt);return s.jsx(jWt,we({},o,r,{ref:n}))}),hKt=so(function(t,n){const{material:r,label:o,className:i}=t,a=sr(t,Bqt);return o?s.jsx(HUe,{className:i,control:s.jsx(Cje,we({},a,r,{ref:n})),label:o}):s.jsx(Cje,we({},a,r,{className:i,ref:n}))}),mKt=so(function(t,n){const{material:r}=t,o=sr(t,zqt);return s.jsx(wUe,we({},o,r,{ref:n}))});function gKt(e){const{inert:t,iconStart:n,iconEnd:r,children:o,material:i}=e,a=sr(e,Hqt);return t&&(a.disableRipple=!0),p.createElement(ml,we({},a,i),[n&&s.jsx(lje,{children:n},"1"),s.jsx(Jqt,{children:o},"2"),r&&s.jsx(lje,{children:r},"3")])}function yKt(e){const{slotProps:t,material:n}=e,r=sr(e,Vqt);return s.jsx(di,we({variant:"outlined"},r,n,{inputProps:t==null?void 0:t.htmlInput,InputProps:Ade(t==null?void 0:t.input),InputLabelProps:we({shrink:!0},t==null?void 0:t.inputLabel)}))}function bKt(e){const t=br(),{id:n,multiple:r,freeSolo:o,options:i,getOptionLabel:a,isOptionEqualToValue:l,value:c,onChange:u,label:d,placeholder:f,slotProps:h,material:m}=e,g=sr(e,Uqt);return s.jsx(WHt,we({id:n,multiple:r,freeSolo:o,options:i,getOptionLabel:a,isOptionEqualToValue:l,value:c,onChange:u,renderTags:(b,y)=>b.map((v,x)=>{const S=y({index:x}),{key:C}=S,_=sr(S,Gqt);return s.jsx(N5,we({variant:"outlined",size:"small",label:typeof v=="string"?v:a==null?void 0:a(v)},_),C)}),renderInput:b=>{var C;const{inputProps:y,InputProps:v,InputLabelProps:x}=b,S=sr(b,Wqt);return s.jsx(di,we({},S,{label:d,placeholder:f,inputProps:y,InputProps:Ade(v,!1),InputLabelProps:we({shrink:!0},x)},h==null?void 0:h.textField,(C=t.slotProps)==null?void 0:C.baseTextField))}},g,m))}function vKt(e){return s.jsx(pO,we({},Ade(e)))}function Ade(e,t=!0){if(!e)return;const{slotProps:n,material:r}=e,i=sr(e,qqt);t&&(i.startAdornment&&(i.startAdornment=s.jsx(Vje,{position:"start",children:i.startAdornment})),i.endAdornment&&(i.endAdornment=s.jsx(Vje,{position:"end",children:i.endAdornment})));for(const a in r)Object.hasOwn(r,a)&&(i[a]=r[a]);return n!=null&&n.htmlInput&&(i.inputProps?i.inputProps=we({},i.inputProps,n==null?void 0:n.htmlInput):i.inputProps=n==null?void 0:n.htmlInput),i}const xKt={"bottom-start":"top left","bottom-end":"top right"};function wKt(e){const{open:t,children:n,className:r,flip:o,onExited:i,onDidShow:a,onDidHide:l,id:c,target:u,transition:d,placement:f,material:h}=e,m=sr(e,Kqt),g=p.useMemo(()=>{const y=[{name:"preventOverflow",options:{padding:8}}];return o&&y.push({name:"flip",enabled:!0}),(a||l)&&y.push({name:"isPlaced",enabled:!0,phase:"main",fn:()=>{a==null||a()},effect:()=>()=>{l==null||l()}}),y},[o,a,l]);let b;if(!d)b=Gje(e,n);else{const y=v=>x=>{v&&v(),i&&i(x)};b=v=>{var x;return Gje(e,s.jsx(IP,we({},v.TransitionProps,{style:{transformOrigin:xKt[v.placement]},onExited:y((x=v.TransitionProps)==null?void 0:x.onExited),children:s.jsx(ds,{children:n})})))}}return s.jsx(fO,we({id:c,className:r,open:t,anchorEl:u,transition:d,placement:f,modifiers:g},m,h,{children:b}))}function Gje(e,t){return CKt(e,SKt(e,t))}function SKt(e,t){return e.onClickAway===void 0?t:s.jsx(OUe,{onClickAway:e.onClickAway,touchEvent:e.clickAwayTouchEvent,mouseEvent:e.clickAwayMouseEvent,children:t})}function CKt(e,t){return e.focusTrap===void 0?t:s.jsx(bUe,{open:!0,disableEnforceFocus:!0,disableAutoFocus:!0,children:s.jsx("div",{tabIndex:-1,children:t})})}function _Kt(e){let{native:t}=e,n=sr(e,Yqt);return t?s.jsx("option",we({},n)):s.jsx(ml,we({},n))}const jKt=qt(DUe,{name:"MuiDataGrid",slot:"Tabs"})(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`})),NKt=qt(c8,{name:"MuiDataGrid",slot:"Tab"})({flex:1,minWidth:"fit-content"}),EKt=qt("div",{name:"MuiDataGrid",slot:"TabPanel"})({flex:1,display:"flex",flexDirection:"column",overflow:"hidden"});function PKt(e){const{children:t,active:n}=e,r=sr(e,Xqt);return s.jsx(EKt,we({role:"tabpanel",style:{display:n?"flex":"none"}},r,{children:t}))}function IKt(e){let{items:t,value:n,material:r}=e,o=sr(e,Zqt);const i=pi(),a=`${i}-tab-${n}`,l=`${i}-tabpanel-${n}`;return s.jsxs(p.Fragment,{children:[s.jsx(jKt,we({},o,{value:n,variant:"scrollable",scrollButtons:"auto"},r,{children:t.map(c=>s.jsx(NKt,{value:c.value,label:c.label,id:a,"aria-controls":l},c.value))})),t.map(c=>s.jsx(PKt,{value:c.value,active:n===c.value,id:l,"aria-labelledby":a,children:c.children},c.value))]})}const AKt={booleanCellTrueIcon:Bje,booleanCellFalseIcon:Lje,columnMenuIcon:iqt,openFilterButtonIcon:JWt,filterPanelDeleteIcon:Lje,columnFilteredIcon:Dje,columnSelectorIcon:eqt,columnUnsortedIcon:hqt,columnSortedAscendingIcon:kje,columnSortedDescendingIcon:Mje,columnResizeIcon:tqt,densityCompactIcon:nqt,densityStandardIcon:rqt,densityComfortableIcon:oqt,exportIcon:fqt,moreActionsIcon:lqt,treeDataCollapseIcon:Oje,treeDataExpandIcon:Rje,groupingCriteriaCollapseIcon:Oje,groupingCriteriaExpandIcon:Rje,detailPanelExpandIcon:$je,detailPanelCollapseIcon:aqt,rowReorderIcon:Fje,quickFilterIcon:QWt,quickFilterClearIcon:zje,columnMenuHideIcon:cqt,columnMenuSortAscendingIcon:kje,columnMenuSortDescendingIcon:Mje,columnMenuUnsortIcon:null,columnMenuFilterIcon:Dje,columnMenuManageColumnsIcon:uqt,columnMenuClearIcon:zje,loadIcon:sqt,filterPanelAddIcon:$je,filterPanelRemoveAllIcon:dqt,columnReorderIcon:Fje,menuItemCheckIcon:Bje},TKt={baseAutocomplete:bKt,baseBadge:nKt,baseCheckbox:rKt,baseChip:uKt,baseCircularProgress:oKt,baseDivider:iKt,baseInput:vKt,baseLinearProgress:aKt,baseMenuList:mKt,baseMenuItem:gKt,baseTextField:yKt,baseButton:sKt,baseIconButton:dKt,baseToggleButton:cKt,baseTooltip:fKt,baseTabs:IKt,basePagination:tKt,basePopper:wKt,baseSelect:Qqt,baseSelectOption:_Kt,baseSkeleton:pKt,baseSwitch:hKt},kKt=we({},TKt,AKt),MKt=N7e({memoize:rce,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Uv=(e,t,n,r,o,i,a,l,...c)=>{if(c.length>0)throw new Error("Unsupported number of selectors");let u;if(e&&t&&n&&r&&o&&i&&a&&l)u=(d,f,h,m)=>{const g=e(d,f,h,m),b=t(d,f,h,m),y=n(d,f,h,m),v=r(d,f,h,m),x=o(d,f,h,m),S=i(d,f,h,m),C=a(d,f,h,m);return l(g,b,y,v,x,S,C,f,h,m)};else if(e&&t&&n&&r&&o&&i&&a)u=(d,f,h,m)=>{const g=e(d,f,h,m),b=t(d,f,h,m),y=n(d,f,h,m),v=r(d,f,h,m),x=o(d,f,h,m),S=i(d,f,h,m);return a(g,b,y,v,x,S,f,h,m)};else if(e&&t&&n&&r&&o&&i)u=(d,f,h,m)=>{const g=e(d,f,h,m),b=t(d,f,h,m),y=n(d,f,h,m),v=r(d,f,h,m),x=o(d,f,h,m);return i(g,b,y,v,x,f,h,m)};else if(e&&t&&n&&r&&o)u=(d,f,h,m)=>{const g=e(d,f,h,m),b=t(d,f,h,m),y=n(d,f,h,m),v=r(d,f,h,m);return o(g,b,y,v,f,h,m)};else if(e&&t&&n&&r)u=(d,f,h,m)=>{const g=e(d,f,h,m),b=t(d,f,h,m),y=n(d,f,h,m);return r(g,b,y,f,h,m)};else if(e&&t&&n)u=(d,f,h,m)=>{const g=e(d,f,h,m),b=t(d,f,h,m);return n(g,b,f,h,m)};else if(e&&t)u=(d,f,h,m)=>{const g=e(d,f,h,m);return t(g,f,h,m)};else if(e)u=e;else throw new Error("Missing arguments");return u},RKt=e=>(...t)=>{const n=new WeakMap;let r=1;const o=t[t.length-1],i=t.length-1||1,a=Math.max(o.length-i,0);if(a>3)throw new Error("Unsupported number of arguments");return(c,u,d,f)=>{let h=c.__cacheKey__;h||(h={id:r},c.__cacheKey__=h,r+=1);let m=n.get(h);if(!m){const g=t.length===1?[v=>v,o]:t;let b=t;const y=[void 0,void 0,void 0];switch(a){case 0:break;case 1:{b=[...g.slice(0,-1),()=>y[0],o];break}case 2:{b=[...g.slice(0,-1),()=>y[0],()=>y[1],o];break}case 3:{b=[...g.slice(0,-1),()=>y[0],()=>y[1],()=>y[2],o];break}default:throw new Error("Unsupported number of arguments")}m=MKt(...b),m.selectorArgs=y,n.set(h,m)}switch(a){case 3:m.selectorArgs[2]=f;case 2:m.selectorArgs[1]=d;case 1:m.selectorArgs[0]=u}switch(a){case 0:return m(c);case 1:return m(c,u);case 2:return m(c,u,d);case 3:return m(c,u,d,f);default:throw new Error("unreachable")}}},dg=RKt();var Tde=_7e();const OKt=Ide>=19,DKt=OKt?LKt:$Kt;function Xw(e,t,n,r,o){return DKt(e,t,n,r,o)}function LKt(e,t,n,r,o){const i=p.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return Tde.useSyncExternalStore(e.subscribe,i,i)}function $Kt(e,t,n,r,o){return tce.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}const FKt=()=>{};function i_(e,t,n){const r=kh(BKt,{store:e,selector:t}).current;r.effect=n,uV(r.onMount)}function BKt(e){const{store:t,selector:n}=e;let r=n(t.state);const o={effect:FKt,dispose:null,subscribe:()=>{o.dispose??(o.dispose=t.subscribe(i=>{const a=n(i);if(!Object.is(r,a)){const l=r;r=a,o.effect(l,a)}}))},onMount:()=>(o.subscribe(),()=>{var i;(i=o.dispose)==null||i.call(o),o.dispose=null})};return o.subscribe(),o}class bV{constructor(t){Le(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));Le(this,"getSnapshot",()=>this.state);Le(this,"use",(t,n,r,o)=>Xw(this,t,n,r,o));this.state=t,this.listeners=new Set,this.updateTick=0}static create(t){return new bV(t)}setState(t){this.state=t,this.updateTick+=1;const n=this.updateTick,r=this.listeners.values();let o;for(;o=r.next(),!o.done;){if(n!==this.updateTick)return;const i=o.value;i(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState(we({},this.state,t));return}}set(t,n){Object.is(this.state[t],n)||this.setState(we({},this.state,{[t]:n}))}}const jr=(...e)=>{const t=Uv(...e);return(r,o,i,a)=>t(kde(r),o,i,a)},Zi=(...e)=>{const t=dg(...e);return(r,o,i,a)=>t(kde(r),o,i,a)},Ys=e=>(t,n)=>e(kde(t),n);function kde(e){return"current"in e?e.current.state:e}const bl=Ys(e=>e.dimensions),Mde=jr(bl,e=>e.columnsTotalWidth),zKt=jr(bl,e=>e.rowHeight);jr(bl,e=>e.contentSize.height);const VUe=jr(bl,e=>e.hasScrollX),UUe=jr(bl,e=>e.hasScrollY),GUe=jr(bl,e=>e.columnsTotalWidthe.headerHeight),VKt=jr(bl,e=>e.groupHeaderHeight);jr(bl,e=>e.headerFilterHeight);const UKt=jr(bl,e=>e.hasScrollX?e.scrollbarSize:0),WUe=jr(bl,e=>e.hasScrollY?e.scrollbarSize:0),GKt=jr(bl,UKt,(e,t)=>{const n=e.viewportOuterSize.height-e.minimumSize.height>0;return!(t===0&&!n)}),qUe=Ys(e=>e.rowsMeta),uy=Ys(e=>e.rows),GI=jr(uy,e=>e.totalRowCount),WKt=jr(uy,e=>e.loading),qKt=jr(uy,e=>e.totalTopLevelRowCount),mm=jr(uy,e=>e.dataRowIdToModelLookup);jr(mm,(e,t)=>e[t]);const Sc=jr(uy,e=>e.tree),_g=jr(Sc,(e,t)=>e[t]),KKt=jr(uy,e=>e.groupsToFetch),YKt=jr(uy,e=>e.groupingName),Wje=jr(uy,e=>e.treeDepths),hO=Zi(uy,e=>{const t=Object.entries(e.treeDepths);return t.length===0?1:(t.filter(([,n])=>n>0).map(([n])=>Number(n)).sort((n,r)=>r-n)[0]??0)+1}),YE=jr(uy,e=>e.dataRowIds),XKt=Zi(YE,mm,(e,t)=>e.reduce((n,r)=>(t[r]&&n.push(t[r]),n),[])),ZKt=jr(uy,e=>e==null?void 0:e.additionalRowGroups),WI=Zi(ZKt,e=>{var n,r;const t=e==null?void 0:e.pinnedRows;return{bottom:((n=t==null?void 0:t.bottom)==null?void 0:n.map(o=>({id:o.id,model:o.model??{}})))??[],top:((r=t==null?void 0:t.top)==null?void 0:r.map(o=>({id:o.id,model:o.model??{}})))??[]}}),KUe=jr(WI,e=>{var t,n;return(((t=e==null?void 0:e.top)==null?void 0:t.length)||0)+(((n=e==null?void 0:e.bottom)==null?void 0:n.length)||0)}),Jl="auto-generated-group-node-root",M_=Symbol("mui.id_autogenerated"),JKt=()=>({type:"group",id:Jl,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function QKt(e,t,n="A row was provided without id in the rows prop:"){if(e==null)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(t)].join(` +`))}const vV=(e,t,n)=>{const r=t?t(e):e.id;return QKt(r,e,n),r},YUe=(e,t,n)=>{const r=t.field;if(!t||!t.valueGetter)return e[r];const o=e[t.field];return t.valueGetter(o,e,t,n)},d8=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={type:"full",rows:[]},i={};for(let a=0;a{const n=e[Jl];return Math.max(t,n.children.length+(n.footerId==null?0:1))},ZUe=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:r,previousTreeDepths:o,previousGroupsToFetch:i})=>{const a=e.current.caches.rows,{tree:l,treeDepths:c,dataRowIds:u,groupingName:d,groupsToFetch:f=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:r,previousTreeDepths:o,updates:a.updates,dataRowIdToModelLookup:a.dataRowIdToModelLookup,previousGroupsToFetch:i}),h=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:l,treeDepths:c,dataRowIds:u,dataRowIdToModelLookup:a.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},we({},h,{totalRowCount:Math.max(t,h.dataRowIds.length),totalTopLevelRowCount:XUe({tree:h.tree,rowCountProp:t}),groupingName:d,loading:n,groupsToFetch:f})},JUe=e=>M_ in e,AP=e=>e.type==="skeletonRow"||e.type==="footer"||e.type==="group"&&e.isAutoGenerated||e.type==="pinnedRow"&&e.isAutoGenerated,Rde=(e,t,n,r)=>{const o=e[t];if(o.type!=="group")return[];const i=[];for(let a=0;a{if(e.updates.type==="full")throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const o=new Map;n.forEach(u=>{const d=vV(u,t,"A row was provided without id when calling updateRows():");o.has(d)?o.set(d,we({},o.get(d),u)):o.set(d,u)});const i={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:we({},e.updates.idToActionLookup),groupKeys:r},a=we({},e.dataRowIdToModelLookup),l={insert:{},modify:{},remove:{}};o.forEach((u,d)=>{const f=i.idToActionLookup[d];if(u._action==="delete"){if(f==="remove"||!a[d])return;f!=null&&(l[f][d]=!0),i.actions.remove.push(d),delete a[d];return}const h=a[d];if(h){f==="remove"?(l.remove[d]=!0,i.actions.modify.push(d)):f==null&&i.actions.modify.push(d),a[d]=we({},h,u);return}f==="remove"?(l.remove[d]=!0,i.actions.insert.push(d)):f==null&&i.actions.insert.push(d),a[d]=u});const c=Object.keys(l);for(let u=0;u0&&(i.actions[d]=i.actions[d].filter(h=>!f[h]))}return{dataRowIdToModelLookup:a,updates:i,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}},QUe="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function Kje(e,t,n){const r=[];return t.forEach(o=>{const i=vV(o,n,"A row was provided without id when calling updateRows():"),a=_g(e,i);if((a==null?void 0:a.type)==="pinnedRow"){const l=e.current.caches.pinnedRows,c=l.idLookup[i];c&&(l.idLookup[i]=we({},c,o))}else r.push(o)}),r}const eGe=(e,t,n)=>typeof e=="number"&&e>0?e:t,eYt=Object.is;function tGe(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const o in e)if(n+=1,!eYt(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}function p1(e){return p.memo(e,tGe)}const tYt={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",noColumnsOverlayLabel:"No columns",noColumnsOverlayManageColumns:"Manage columns",emptyPivotOverlayLabel:"Add fields to rows, columns, and values to create a pivot table",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",toolbarPivot:"Pivot",toolbarCharts:"Charts",toolbarAssistant:"AI Assistant",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",columnsManagementDeleteIconLabel:"Clear",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",headerFilterClear:"Clear filter",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuAriaLabel:e=>`${e} column menu`,columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnMenuManagePivot:"Manage pivot",columnMenuManageCharts:"Manage charts",columnHeaderFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>e!==1?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",paginationRowsPerPage:"Rows per page:",paginationDisplayedRows:({from:e,to:t,count:n,estimated:r})=>{if(!r)return`${e}–${t} of ${n!==-1?n:`more than ${t}`}`;const o=r&&r>t?`around ${r}`:`more than ${t}`;return`${e}–${t} of ${n!==-1?n:o}`},paginationItemAriaLabel:e=>e==="first"?"Go to first page":e==="last"?"Go to last page":e==="next"?"Go to next page":"Go to previous page",rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelNone:"none",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size",pivotToggleLabel:"Pivot",pivotRows:"Rows",pivotColumns:"Columns",pivotValues:"Values",pivotCloseButton:"Close pivot settings",pivotSearchButton:"Search fields",pivotSearchControlPlaceholder:"Search fields",pivotSearchControlLabel:"Search fields",pivotSearchControlClear:"Clear search",pivotNoFields:"No fields",pivotMenuMoveUp:"Move up",pivotMenuMoveDown:"Move down",pivotMenuMoveToTop:"Move to top",pivotMenuMoveToBottom:"Move to bottom",pivotMenuRows:"Rows",pivotMenuColumns:"Columns",pivotMenuValues:"Values",pivotMenuOptions:"Field options",pivotMenuAddToRows:"Add to Rows",pivotMenuAddToColumns:"Add to Columns",pivotMenuAddToValues:"Add to Values",pivotMenuRemove:"Remove",pivotDragToRows:"Drag here to create rows",pivotDragToColumns:"Drag here to create columns",pivotDragToValues:"Drag here to create values",pivotYearColumnHeaderName:"(Year)",pivotQuarterColumnHeaderName:"(Quarter)",chartsNoCharts:"There are no charts available",chartsChartNotSelected:"Select a chart type to configure its options",chartsTabChart:"Chart",chartsTabFields:"Fields",chartsTabCustomize:"Customize",chartsCloseButton:"Close charts configuration",chartsSyncButtonLabel:"Sync chart",chartsSearchPlaceholder:"Search fields",chartsSearchLabel:"Search fields",chartsSearchClear:"Clear search",chartsNoFields:"No fields",chartsFieldBlocked:"This field cannot be added to any section",chartsCategories:"Categories",chartsSeries:"Series",chartsMenuAddToDimensions:e=>`Add to ${e}`,chartsMenuAddToValues:e=>`Add to ${e}`,chartsMenuMoveUp:"Move up",chartsMenuMoveDown:"Move down",chartsMenuMoveToTop:"Move to top",chartsMenuMoveToBottom:"Move to bottom",chartsMenuOptions:"Field options",chartsMenuRemove:"Remove",chartsDragToDimensions:e=>`Drag here to use column as ${e}`,chartsDragToValues:e=>`Drag here to use column as ${e}`,aiAssistantPanelTitle:"AI Assistant",aiAssistantPanelClose:"Close AI Assistant",aiAssistantPanelNewConversation:"New conversation",aiAssistantPanelConversationHistory:"Conversation history",aiAssistantPanelEmptyConversation:"No prompt history",aiAssistantSuggestions:"Suggestions",promptFieldLabel:"Prompt",promptFieldPlaceholder:"Type a prompt…",promptFieldPlaceholderWithRecording:"Type or record a prompt…",promptFieldPlaceholderListening:"Listening for prompt…",promptFieldSpeechRecognitionNotSupported:"Speech recognition is not supported in this browser",promptFieldSend:"Send",promptFieldRecord:"Record",promptFieldStopRecording:"Stop recording",promptRerun:"Run again",promptProcessing:"Processing…",promptAppliedChanges:"Applied changes",promptChangeGroupDescription:e=>`Group by ${e}`,promptChangeAggregationLabel:(e,t)=>`${e} (${t})`,promptChangeAggregationDescription:(e,t)=>`Aggregate ${e} (${t})`,promptChangeFilterLabel:(e,t,n)=>t==="is any of"?`${e} is any of: ${n}`:`${e} ${t} ${n}`,promptChangeFilterDescription:(e,t,n)=>t==="is any of"?`Filter where ${e} is any of: ${n}`:`Filter where ${e} ${t} ${n}`,promptChangeSortDescription:(e,t)=>`Sort by ${e} (${t})`,promptChangePivotEnableLabel:"Pivot",promptChangePivotEnableDescription:"Enable pivot",promptChangePivotColumnsLabel:e=>`Columns (${e})`,promptChangePivotColumnsDescription:(e,t)=>`${e}${t?` (${t})`:""}`,promptChangePivotRowsLabel:e=>`Rows (${e})`,promptChangePivotValuesLabel:e=>`Values (${e})`,promptChangePivotValuesDescription:(e,t)=>`${e} (${t})`,promptChangeChartsLabel:(e,t)=>`Dimensions (${e}), Values (${t})`};function ni(e){return kr("MuiDataGrid",e)}const He=Mr("MuiDataGrid",["aiAssistantPanel","aiAssistantPanelHeader","aiAssistantPanelTitleContainer","aiAssistantPanelTitle","aiAssistantPanelBody","aiAssistantPanelEmptyText","aiAssistantPanelFooter","aiAssistantPanelConversation","aiAssistantPanelConversationList","aiAssistantPanelConversationTitle","aiAssistantPanelSuggestions","aiAssistantPanelSuggestionsList","aiAssistantPanelSuggestionsItem","aiAssistantPanelSuggestionsLabel","actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","aggregationRowOverlayWrapper","autoHeight","autosizing","mainContent","withSidePanel","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","collapsible","collapsibleTrigger","collapsibleIcon","collapsiblePanel","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--siblingFocused","columnHeader--filter","columnHeaderFilterInput","columnHeaderFilterOperatorLabel","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementSearchInput","columnsManagementFooter","columnsManagementScrollArea","columnsManagementEmptyText","container--top","container--bottom","detailPanel","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hiddenContent","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--beingDragged","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowReorderIcon","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea--up","scrollArea--down","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--pinnedRight","scrollShadow","scrollShadow--vertical","scrollShadow--horizontal","selectedRowCount","sortButton","sortIcon","shadowScrollArea","sidebar","sidebarHeader","toolbarContainer","toolbar","toolbarLabel","toolbarDivider","toolbarFilterList","toolbarQuickFilter","toolbarQuickFilterTrigger","toolbarQuickFilterControl","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pivotPanelAvailableFields","pivotPanelField","pivotPanelField--sorted","pivotPanelFieldActionContainer","pivotPanelFieldCheckbox","pivotPanelFieldDragIcon","pivotPanelFieldList","pivotPanelFieldName","pivotPanelHeader","pivotPanelPlaceholder","pivotPanelScrollArea","pivotPanelSearchContainer","pivotPanelSection","pivotPanelSectionTitle","pivotPanelSections","pivotPanelSwitch","pivotPanelSwitchLabel","prompt","promptContent","promptText","promptFeedback","promptChangeList","promptChangesToggle","promptChangesToggleIcon","promptIcon","promptIconContainer","promptError","promptAction"]);let H0=(function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e})({});const Yje=1e3;class nYt{constructor(t=Yje){Le(this,"timeouts",new Map);Le(this,"cleanupTimeout",Yje);this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class rYt{constructor(){Le(this,"registry",new FinalizationRegistry(t=>{typeof t=="function"&&t()}))}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}class Ode{static create(){return new Ode}}const JL={current:iYt()};let Xje=0;function Ir(e,t,n,r){const o=p.useState(Ode.create)[0],i=p.useRef(null),a=p.useRef(null);a.current=n;const l=p.useRef(null);if(!i.current&&a.current){const c=(u,d,f)=>{var h;d&&!d.defaultMuiPrevented&&((h=a.current)==null||h.call(a,u,d,f))};i.current=e.current.subscribeEvent(t,c,r),Xje+=1,l.current={cleanupToken:Xje},JL.current.register(o,()=>{var u;(u=i.current)==null||u.call(i),i.current=null,l.current=null},l.current)}else!a.current&&i.current&&(i.current(),i.current=null,l.current&&(JL.current.unregister(l.current),l.current=null));p.useEffect(()=>{if(!i.current&&a.current){const c=(u,d,f)=>{var h;d&&!d.defaultMuiPrevented&&((h=a.current)==null||h.call(a,u,d,f))};i.current=e.current.subscribeEvent(t,c,r)}return l.current&&JL.current&&(JL.current.unregister(l.current),l.current=null),()=>{var c;(c=i.current)==null||c.call(i),i.current=null}},[e,t,r])}const oYt={isFirst:!0};function is(e,t,n){Ir(e,t,n,oYt)}function iYt(){return typeof FinalizationRegistry<"u"?new rYt:new nYt}const aYt=Object.is,nGe=tGe,sYt=(e,t)=>e===t?!0:e.length===t.length&&e.every((n,r)=>n===t[r]),lYt=(e,t)=>{let n=Object.is;return t instanceof Array?n=sYt:t instanceof Object&&(n=nGe),n(e,t)},cYt=()=>({state:null,equals:null,selector:null,args:void 0}),Zje=[],uYt=()=>null;function Wn(e,t,n=void 0,r=aYt){e.current.state;const o=kh(cYt),i=o.current.selector!==null,[a,l]=p.useState(i?null:t(e,n));o.current.state=a,o.current.equals=r,o.current.selector=t;const c=o.current.args;if(o.current.args=n,i&&!lYt(c,n)){const f=o.current.selector(e,o.current.args);o.current.equals(o.current.state,f)||(o.current.state=f,l(f))}const u=p.useCallback(()=>(o.current.subscription||(o.current.subscription=e.current.store.subscribe(()=>{const f=o.current.selector(e,o.current.args);o.current.equals(o.current.state,f)||(o.current.state=f,l(f))})),null),Zje),d=p.useCallback(()=>(o.current.subscription||u(),()=>{o.current.subscription&&(o.current.subscription(),o.current.subscription=void 0)}),Zje);return Tde.useSyncExternalStore(d,u,uYt),a}const dYt=.7,fYt=1.3,pYt={compact:dYt,comfortable:fYt,standard:1},XE=Ys(e=>e.density),mO=jr(XE,e=>pYt[e]);function Jb(e){throw new Error("Failed assertion: should not be rendered")}const hYt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange","slotProps"],mYt=e=>{const{classes:t}=e;return qn({root:["editInputCell"]},ni,t)},gYt=qt(Jb,{name:"MuiDataGrid",slot:"EditInputCell"})({font:xr.typography.font.body,padding:"1px 0","& input":{padding:"0 16px",height:"100%"}}),yYt=so((e,t)=>{const n=br(),{id:r,value:o,field:i,colDef:a,hasFocus:l,debounceMs:c=200,isProcessingProps:u,onValueChange:d,slotProps:f}=e,h=sr(e,hYt),m=Po(),g=p.useRef(null),[b,y]=p.useState(o),v=mYt(n),x=p.useCallback(async C=>{const _=C.target.value,N=m.current.getColumn(i);let E=_;N.valueParser&&(E=N.valueParser(_,m.current.getRow(r),N,m)),y(E),m.current.setEditCellValue({id:r,field:i,value:E,debounceMs:c,unstable_skipValueParser:!0},C),d&&await d(C,_)},[m,c,i,r,d]),S=m.current.unstable_getEditCellMeta(r,i);return p.useEffect(()=>{(S==null?void 0:S.changeReason)!=="debouncedSetEditCellValue"&&y(o)},[S,o]),wa(()=>{l&&g.current.focus()},[l]),s.jsx(gYt,we({as:n.slots.baseInput,inputRef:g,className:v.root,ownerState:n,fullWidth:!0,type:a.type==="number"?a.type:"text",value:b??"",onChange:x,endAdornment:u?s.jsx(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},h,f==null?void 0:f.root,{ref:t}))}),bYt=e=>s.jsx(yYt,we({},e)),rGe=(e,t)=>t&&e.length>1?[e[0]]:e,Jje=(e,t)=>n=>we({},n,{sorting:we({},n.sorting,{sortModel:rGe(e,t)})}),vYt=e=>e==="desc",xYt=(e,t)=>{const n=t.current.getColumn(e.field);if(!n||e.sort===null)return null;let r;return n.getSortComparator?r=n.getSortComparator(e.sort):r=vYt(e.sort)?(...i)=>-1*n.sortComparator(...i):n.sortComparator,r?{getSortCellParams:i=>({id:i,field:n.field,rowNode:_g(t,i),value:t.current.getCellValue(i,n.field),api:t.current}),comparator:r}:null},wYt=(e,t,n)=>e.reduce((r,o,i)=>{if(r!==0)return r;const a=t.params[i],l=n.params[i];return r=o.comparator(a.value,l.value,a,l),r},0),SYt=(e,t)=>{const n=e.map(r=>xYt(r,t)).filter(r=>!!r);return n.length===0?null:r=>r.map(o=>({node:o,params:n.map(i=>i.getSortCellParams(o.id))})).sort((o,i)=>wYt(n,o,i)).map(o=>o.node.id)},Qje=(e,t)=>{const n=e.indexOf(t);return!t||n===-1||n+1===e.length?e[0]:e[n+1]},Dde=(e,t)=>e==null&&t!=null?-1:t==null&&e!=null?1:e==null&&t==null?0:null,CYt=new Intl.Collator,_Yt=(e,t)=>{const n=Dde(e,t);return n!==null?n:typeof e=="string"?CYt.compare(e.toString(),t.toString()):e-t},oGe=(e,t)=>{const n=Dde(e,t);return n!==null?n:Number(e)-Number(t)},iGe=(e,t)=>{const n=Dde(e,t);return n!==null?n:e>t?1:e{const A=TY(I.target.value);b(A),v(!0),m.start(S.filterDebounceMs,()=>{const R=we({},t,{value:r==="number"&&!Number.isNaN(Number(A))?Number(A):A,fromInput:x});n(R),v(!1)})},[m,S.filterDebounceMs,t,r,x,n]);return p.useEffect(()=>{(t.fromInput!==x||t.value==null)&&b(TY(t.value))},[x,t]),s.jsxs(p.Fragment,{children:[s.jsx(S.slots.baseTextField,we({id:x,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:g??"",onChange:C,type:r||"text",disabled:l,slotProps:we({},h==null?void 0:h.slotProps,{input:we({endAdornment:y?s.jsx(S.slots.loadIcon,{fontSize:"small",color:"action"}):null},(_=h==null?void 0:h.slotProps)==null?void 0:_.input),htmlInput:we({tabIndex:a},(N=h==null?void 0:h.slotProps)==null?void 0:N.htmlInput)}),inputRef:i},(E=S.slotProps)==null?void 0:E.baseTextField,f,h)),d,u]})}function TY(e){if(!(e==null||e===""))return String(e)}function NYt(e){return typeof e=="number"&&!Number.isNaN(e)}function EYt(e){return typeof e=="function"}function Lde(e){return typeof e=="object"&&e!==null}function PYt(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}function OB(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const a_=(e,t,n)=>Math.max(t,Math.min(n,e));function IYt(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function AYt(e){const t=IYt(e);return(n,r)=>n+(r-n)*t()}function aGe(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}const Dw=(e,t)=>n=>{e&&t(n)};function sGe(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,slotProps:a}=e,l=pi(),[c,u]=p.useState([]),[d,f]=p.useState(t.value||[]),h=br();p.useEffect(()=>{const y=t.value??[];f(y.map(String))},[t.value]);const m=p.useCallback((y,v)=>{f(v.map(String)),n(we({},t,{value:[...v.map(x=>r==="number"?Number(x):x)]}))},[n,t,r]),g=p.useCallback((y,v)=>{u(v===""?[]:[v])},[u]),b=h.slots.baseAutocomplete;return s.jsx(b,we({multiple:!0,freeSolo:!0,options:c,id:l,value:d,onChange:m,onInputChange:g,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:r||"text",inputRef:i}}},a==null?void 0:a.root))}var zb=(function(e){return e.Cell="cell",e.Row="row",e})(zb||{}),ja=(function(e){return e.Edit="edit",e.View="view",e})(ja||{}),zs=(function(e){return e.Edit="edit",e.View="view",e})(zs||{}),Ip=(function(e){return e.And="and",e.Or="or",e})(Ip||{});class TYt{constructor(t){this.data=t.ids}has(t){return this.data.has(t)}select(t){this.data.add(t)}unselect(t){this.data.delete(t)}}class kYt{constructor(t){this.data=t.ids}has(t){return!this.data.has(t)}select(t){this.data.delete(t)}unselect(t){this.data.add(t)}}const Lw=e=>e.type==="include"?new TYt(e):new kYt(e);var Gv=(function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e})(Gv||{}),x0=(function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e})(x0||{}),pw=(function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e})(pw||{}),qy=(function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e})(qy||{});function lGe(e){return e.field!==void 0}const cGe={filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},GM=()=>({items:[],logicOperator:Ip.And,quickFilterValues:[],quickFilterLogicOperator:Ip.And});function uGe(e){return{current:e.current.getPublicApi()}}let ub=(function(e){return e.LEFT="left",e.RIGHT="right",e})({});const DB={left:[],right:[]},dGe=Ys(e=>e.isRtl),fGe=Ys(e=>e.props.listView??!1),pGe=Ys(e=>e.listViewColumn),V0=Ys(e=>e.columns),Ib=jr(V0,e=>e.orderedFields),h1=jr(V0,e=>e.lookup),Cm=Zi(Ib,h1,(e,t)=>e.map(n=>t[n])),bg=jr(V0,e=>e.columnVisibilityModel),MYt=jr(V0,e=>e.initialColumnVisibilityModel),oc=Zi(Cm,bg,fGe,pGe,(e,t,n,r)=>n&&r?[r]:e.filter(o=>t[o.field]!==!1)),gO=Zi(oc,e=>e.map(t=>t.field)),$de=Ys(e=>e.pinnedColumns);Zi($de,Ib,dGe,(e,t,n)=>hGe(e,t,n));const xV=Zi(V0,$de,gO,dGe,fGe,(e,t,n,r,o)=>{if(o)return DB;const i=hGe(t,n,r);return{left:i.left.map(l=>e.lookup[l]),right:i.right.map(l=>e.lookup[l])}});function hGe(e,t,n){var l,c;if(!Array.isArray(e.left)&&!Array.isArray(e.right)||((l=e.left)==null?void 0:l.length)===0&&((c=e.right)==null?void 0:c.length)===0)return DB;const r=(u,d)=>Array.isArray(u)?u.filter(f=>d.includes(f)):[],o=r(e.left,t),i=t.filter(u=>!o.includes(u)),a=r(e.right,i);return n?{left:a,right:o}:{left:o,right:a}}const Aj=Zi(oc,e=>{const t=[];let n=0;for(let r=0;re.filter(t=>t.filterable)),RYt=Zi(Cm,e=>e.reduce((t,n)=>(n.filterable&&(t[n.field]=n),t),{})),OYt=Zi(Cm,e=>e.some(t=>t.colSpan!==void 0));let kT;function DYt(){if(kT!==void 0)return kT;try{kT=new Function("return true")()}catch{kT=!1}return kT}const one=(e,t)=>{const n=we({},e);if(n.id==null&&(n.id=Math.round(Math.random()*1e5)),n.operator==null){const r=h1(t)[n.field];n.operator=r&&r.filterOperators[0].value}return n},Fde=(e,t,n)=>{const r=e.items.length>1;let o;r&&t?o=[e.items[0]]:o=e.items;const i=r&&o.some(l=>l.id==null);return o.some(l=>l.operator==null)||i?we({},e,{items:o.map(l=>one(l,n))}):e.items!==o?we({},e,{items:o}):e},eNe=(e,t,n)=>r=>we({},r,{filterModel:Fde(e,t,n)}),WM=e=>typeof e=="string"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,gGe=(e,t,n)=>{var f;if(!e.field||!e.operator)return null;const r=n.current.getColumn(e.field);if(!r)return null;let o;if(r.valueParser){const h=r.valueParser;o=Array.isArray(e.value)?(f=e.value)==null?void 0:f.map(m=>h(m,void 0,r,n)):h(e.value,void 0,r,n)}else o=e.value;const{ignoreDiacritics:i}=n.current.rootProps;i&&(o=WM(o));const a=we({},e,{value:o}),l=r.filterOperators;if(!(l!=null&&l.length))throw new Error(`MUI X: No filter operators found for column '${r.field}'.`);const c=l.find(h=>h.value===a.operator);if(!c)throw new Error(`MUI X: No filter operator found for column '${r.field}' and operator value '${a.operator}'.`);const u=uGe(n),d=c.getApplyFilterFn(a,r);return typeof d!="function"?null:{item:a,fn:h=>{let m=t(h,r);return i&&(m=WM(m)),d(m,h,r,u)}}};let tNe=1;const LYt=(e,t,n,r)=>{const{items:o}=e,i=o.map(c=>gGe(c,t,n)).filter(c=>!!c);if(i.length===0)return null;if(r||!DYt())return(c,u)=>{const d={};for(let f=0;f`const shouldApply${u} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(c.item.field)});`).join(` +`)} + +const result$$ = { +${i.map((c,u)=>` ${JSON.stringify(String(c.item.id))}: !shouldApply${u} ? false : appliers[${u}].fn(row),`).join(` +`)} +}; + +return result$$;`.replaceAll("$$",String(tNe)));return tNe+=1,(c,u)=>a(i,c,u)},yGe=e=>e.quickFilterExcludeHiddenColumns??!0,$Yt=(e,t,n)=>{var d;const r=((d=e.quickFilterValues)==null?void 0:d.filter(Boolean))??[];if(r.length===0)return null;const o=Ib(n),i=bg(n);let a;yGe(e)?a=o.filter(f=>i[f]!==!1):a=o;const l=[],{ignoreDiacritics:c}=n.current.rootProps,u=uGe(n);return a.forEach(f=>{const h=n.current.getColumn(f),m=h==null?void 0:h.getApplyQuickFilterFn;m&&l.push({column:h,appliers:r.map(g=>{const b=c?WM(g):g;return{fn:m(b,h,u)}})})}),function(h,m){const g={};e:for(let b=0;b{const o=LYt(e,t,n,r),i=$Yt(e,t,n);return function(l,c,u){u.passingFilterItems=(o==null?void 0:o(l,c))??null,u.passingQuickFilterValues=(i==null?void 0:i(l,c))??null}},nNe=e=>e!=null,BYt=(e,t,n,r)=>(e.cleanedFilterItems||(e.cleanedFilterItems=r.filter(o=>gGe(o,t,n)!==null)),e.cleanedFilterItems),zYt=(e,t,n,r,o,i)=>{const a=BYt(i,r,o,n.items),l=e.filter(nNe),c=t.filter(nNe);if(l.length>0){const u=f=>l.some(h=>h[f.id]);if((n.logicOperator??GM().logicOperator)===Ip.And){if(!a.every(u))return!1}else if(!a.some(u))return!1}if(c.length>0&&n.quickFilterValues!=null){const u=f=>c.some(h=>h[f]);if((n.quickFilterLogicOperator??GM().quickFilterLogicOperator)===Ip.And){if(!n.quickFilterValues.every(u))return!1}else if(!n.quickFilterValues.some(u))return!1}return!0},HYt=e=>{if(!e)return null;const t=new RegExp(OB(e),"i");return(n,r,o,i)=>{let a=i.current.getRowFormattedValue(r,o);return i.current.ignoreDiacritics&&(a=WM(a)),a!=null?t.test(a.toString()):!1}},rNe=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new RegExp(OB(r),"i");return i=>{if(i==null)return t;const a=o.test(String(i));return t?!a:a}},oNe=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return i=>{if(i==null)return t;const a=o.compare(r,i.toString())===0;return t?!a:a}},iNe=e=>()=>t=>{const n=t===""||t==null;return e?!n:n},VYt=(e=!1)=>[{value:"contains",getApplyFilterFn:rNe(e,!1),InputComponent:hg},{value:"doesNotContain",getApplyFilterFn:rNe(e,!0),InputComponent:hg},{value:"equals",getApplyFilterFn:oNe(e,!1),InputComponent:hg},{value:"doesNotEqual",getApplyFilterFn:oNe(e,!0),InputComponent:hg},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${OB(n)}.*$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:hg},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${OB(n)}$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:hg},{value:"isEmpty",getApplyFilterFn:iNe(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:iNe(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;const n=e?t.value:t.value.map(o=>o.trim()),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?n.some(i=>r.compare(i,o.toString()||"")===0):!1},InputComponent:sGe}],U0={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,chartable:!0,editable:!1,sortComparator:_Yt,type:"string",align:"left",filterOperators:VYt(),renderEditCell:bYt,getApplyQuickFilterFn:HYt};function bGe(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}const ZE=e=>e.indexOf("Arrow")===0||e.indexOf("Page")===0||e===" "||e==="Home"||e==="End",UYt=e=>!!e.key,vGe=e=>e==="Tab"||e==="Escape";function xGe(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="V"&&!e.shiftKey&&!e.altKey}function GYt(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="C"&&!e.shiftKey&&!e.altKey}const wGe=p.createContext(void 0),wV=()=>{const e=p.useContext(wGe);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` +`));return e},WYt="MuiDataGridVariables",Bde=p.createContext({className:"unset",tag:s.jsx("style",{href:"/unset"})});function SGe(){return p.useContext(Bde).className}function qYt(){return p.useContext(Bde)}function KYt(e){const t=wV(),n=br(),r=t.hooks.useCSSVariables(),o=p.useMemo(()=>{const i=`${WYt}-${r.id}`,a=`.${i}{${YYt(r.variables)}}`,l=s.jsx("style",{href:`/${i}`,nonce:n.nonce,children:a});return{className:i,tag:l}},[n.nonce,r]);return s.jsx(Bde.Provider,{value:o,children:e.children})}function YYt(e){let t="";for(const n in e)Object.hasOwn(e,n)&&e[n]!==void 0&&(t+=`${n}:${e[n]};`);return t}const XYt=["open","target","onClose","children","position","className","onExited"],ZYt=e=>{const{classes:t}=e;return qn({root:["menu"]},ni,t)},JYt=qt(Jb,{name:"MuiDataGrid",slot:"Menu"})({zIndex:xr.zIndex.menu,[`& .${He.menuList}`]:{outline:0}});function SV(e){var y;const{open:t,target:n,onClose:r,children:o,position:i,className:a,onExited:l}=e,c=sr(e,XYt),u=Po(),d=br(),f=ZYt(d),h=SGe(),m=p.useRef(null);wa(()=>{var v,x;t?m.current=document.activeElement instanceof HTMLElement?document.activeElement:null:((x=(v=m.current)==null?void 0:v.focus)==null||x.call(v),m.current=null)},[t]),p.useEffect(()=>{const v=t?"menuOpen":"menuClose";u.current.publishEvent(v,{target:n})},[u,t,n]);const g=v=>{v.target&&(n===v.target||n!=null&&n.contains(v.target))||r(v)},b=v=>{vGe(v.key)&&r(v)};return s.jsx(JYt,we({as:d.slots.basePopper,className:Ae(f.root,a,h),ownerState:d,open:t,target:n,transition:!0,placement:i,onClickAway:g,onExited:l,clickAwayMouseEvent:"onMouseDown",onKeyDown:b},c,(y=d.slotProps)==null?void 0:y.basePopper,{children:o}))}const QYt=["label","icon","showInMenu","onClick"],eXt=["label","icon","showInMenu","onClick","closeMenuOnClick","closeMenu"],tXt=so((e,t)=>{var d;const n=br();if(!e.showInMenu){const{label:f,icon:h,onClick:m}=e,g=sr(e,QYt),b=y=>{m==null||m(y)};return s.jsx(n.slots.baseIconButton,we({size:"small",role:"menuitem","aria-label":f},g,{onClick:b},(d=n.slotProps)==null?void 0:d.baseIconButton,{ref:t,children:p.cloneElement(h,{fontSize:"small"})}))}const{label:r,icon:o,onClick:i,closeMenuOnClick:a=!0,closeMenu:l}=e,c=sr(e,eXt),u=f=>{i==null||i(f),a&&(l==null||l())};return s.jsx(n.slots.baseMenuItem,we({ref:t},c,{onClick:u,iconStart:o,children:r}))}),nXt=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","children","suppressChildrenValidation"],rXt=e=>typeof e.getActions=="function";function oXt(e){var F;const{hasFocus:t,tabIndex:n,position:r="bottom-end",children:o,suppressChildrenValidation:i}=e,a=sr(e,nXt),[l,c]=p.useState(-1),[u,d]=p.useState(!1),f=Po(),h=p.useRef(null),m=p.useRef(null),g=p.useRef(!1),b=p.useRef({}),y=af(),v=pi(),x=pi(),S=br(),C=[];p.Children.forEach(o,U=>{p.isValidElement(U)&&(U.type===p.Fragment?p.Children.forEach(U.props.children,G=>{p.isValidElement(G)&&C.push(G)}):U.type===tXt||i?C.push(U):typeof U.type=="function"?U.type.name:U.type)});const _=C.filter(U=>!U.props.showInMenu),N=C.filter(U=>U.props.showInMenu),E=_.length+(N.length?1:0);p.useLayoutEffect(()=>{t||Object.entries(b.current).forEach(([U,G])=>{G==null||G.stop({},()=>{delete b.current[U]})})},[t]),p.useEffect(()=>{if(l<0||!h.current||l>=h.current.children.length)return;h.current.children[l].focus({preventScroll:!0})},[l]);const I=C.findIndex(U=>!U.props.disabled);p.useEffect(()=>{t&&l===-1&&c(I),t||(c(-1),g.current=!1)},[t,l,I]),p.useEffect(()=>{l>=E&&c(E-1)},[l,E]);const A=()=>{d(!0),c(E-1),g.current=!0},R=()=>{d(!1)},k=U=>{U.stopPropagation(),U.preventDefault(),u?R():A()},T=U=>G=>{b.current[U]=G},D=(U,G)=>W=>{c(U),g.current=!0,G&&G(W)},O=U=>{if(E<=1)return;const G=(Y,B)=>{var q;if(Y<0||Y>C.length)return Y;const K=(B==="left"?-1:1)*(y?-1:1);return(q=C[Y+K])!=null&&q.props.disabled?G(Y+K,B):Y+K};let W=l;U.key==="ArrowRight"?W=G(l,"right"):U.key==="ArrowLeft"&&(W=G(l,"left")),!(W<0||W>=E)&&W!==l&&(U.preventDefault(),U.stopPropagation(),c(W))},z=E>0?{role:"menu",onKeyDown:O}:void 0;return s.jsxs("div",we({ref:h,tabIndex:-1,className:He.actionsCell},z,a,{children:[_.map((U,G)=>p.cloneElement(U,{key:G,touchRippleRef:T(G),onClick:D(G,U.props.onClick),tabIndex:l===G?n:-1})),N.length>0&&x&&s.jsx(S.slots.baseIconButton,we({ref:m,id:x,"aria-label":f.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?v:void 0,role:"menuitem",size:"small",onClick:k,touchRippleRef:T(x),tabIndex:l===_.length?n:-1},(F=S.slotProps)==null?void 0:F.baseIconButton,{children:s.jsx(S.slots.moreActionsIcon,{fontSize:"small"})})),N.length>0&&s.jsx(SV,{open:u,target:m.current,position:r,onClose:R,children:s.jsx(S.slots.baseMenuList,{id:v,className:He.menuList,"aria-labelledby":x,autoFocusItem:!0,children:N.map((U,G)=>p.cloneElement(U,{key:G,closeMenu:R}))})})]}))}function iXt(e){const{colDef:t,id:n}=e,r=Po();if(!rXt(t))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const o=t.getActions(r.current.getRowParams(n));return s.jsx(oXt,we({suppressChildrenValidation:!0},e,{children:o}))}const aXt=e=>s.jsx(iXt,we({},e)),CV="actions",sXt=we({},U0,{sortable:!1,filterable:!1,aggregable:!1,chartable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:aXt,getApplyQuickFilterFn:()=>null}),lXt="__tree_data_group__",CGe="__row_group_by_columns_group__",zde="__detail_panel_toggle__";let ii=(function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e})({});const cXt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"],uXt=e=>{const{classes:t}=e;return qn({root:["booleanCell"]},ni,t)};function dXt(e){const{value:t,rowNode:n}=e,r=sr(e,cXt),o=Po(),i=br(),a={classes:i.classes},l=uXt(a),u=Wn(o,hO)>0&&n.type==="group"&&i.treeData===!1,d=p.useMemo(()=>t?i.slots.booleanCellTrueIcon:i.slots.booleanCellFalseIcon,[i.slots.booleanCellFalseIcon,i.slots.booleanCellTrueIcon,t]);return u&&t===void 0?null:s.jsx(d,we({fontSize:"small",className:l.root,titleAccess:o.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!t},r))}const fXt=p.memo(dXt),pXt=e=>e.field!==CGe&&AP(e.rowNode)?"":s.jsx(fXt,we({},e)),hXt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"],mXt=e=>{const{classes:t}=e;return qn({root:["editBooleanCell"]},ni,t)};function gXt(e){var v;const{id:t,value:n,field:r,className:o,hasFocus:i,onValueChange:a}=e,l=sr(e,hXt),c=Po(),u=p.useRef(null),d=pi(),[f,h]=p.useState(n),m=br(),g={classes:m.classes},b=mXt(g),y=p.useCallback(async x=>{const S=x.target.checked;a&&await a(x,S),h(S),await c.current.setEditCellValue({id:t,field:r,value:S},x)},[c,r,t,a]);return p.useEffect(()=>{h(n)},[n]),wa(()=>{i&&u.current.focus()},[i]),s.jsx("label",we({htmlFor:d,className:Ae(b.root,o)},l,{children:s.jsx(m.slots.baseCheckbox,we({id:d,inputRef:u,checked:!!f,onChange:y,size:"small"},(v=m.slotProps)==null?void 0:v.baseCheckbox))}))}const yXt=e=>s.jsx(gXt,we({},e)),bXt=["item","applyValue","apiRef","focusElementRef","isFilterActive","headerFilterMenu","clearButton","tabIndex","slotProps"];function vXt(e){var _,N;const{item:t,applyValue:n,apiRef:r,focusElementRef:o,headerFilterMenu:i,clearButton:a,tabIndex:l,slotProps:c}=e,u=sr(e,bXt),[d,f]=p.useState(f8(t.value)),h=br(),m=pi(),g=pi(),b=((_=h.slotProps)==null?void 0:_.baseSelect)||{},y=b.native??!1,v=((N=h.slotProps)==null?void 0:N.baseSelectOption)||{},x=p.useCallback(E=>{const I=f8(E.target.value);f(I),n(we({},t,{value:I}))},[n,t]);p.useEffect(()=>{f(f8(t.value))},[t.value]);const S=(c==null?void 0:c.root.label)??r.current.getLocaleText("filterPanelInputLabel"),C=c==null?void 0:c.root.slotProps;return s.jsxs(p.Fragment,{children:[s.jsxs(h.slots.baseSelect,we({fullWidth:!0,labelId:m,id:g,label:S,value:d===void 0?"":String(d),onChange:x,native:y,slotProps:{htmlInput:we({ref:o,tabIndex:l},C==null?void 0:C.htmlInput)}},b,u,c==null?void 0:c.root,{children:[s.jsx(h.slots.baseSelectOption,we({},v,{native:y,value:"",children:r.current.getLocaleText("filterValueAny")})),s.jsx(h.slots.baseSelectOption,we({},v,{native:y,value:"true",children:r.current.getLocaleText("filterValueTrue")})),s.jsx(h.slots.baseSelectOption,we({},v,{native:y,value:"false",children:r.current.getLocaleText("filterValueFalse")}))]})),i,a]})}function f8(e){if(String(e).toLowerCase()==="true")return!0;if(String(e).toLowerCase()==="false")return!1}const xXt=()=>[{value:"is",getApplyFilterFn:e=>{const t=f8(e.value);return t===void 0?null:n=>!!n===t},InputComponent:vXt}],wXt=(e,t,n,r)=>e?r.current.getLocaleText("booleanCellTrueLabel"):r.current.getLocaleText("booleanCellFalseLabel"),SXt=e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}},_Ge=we({},U0,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:pXt,renderEditCell:yXt,sortComparator:oGe,valueFormatter:wXt,filterOperators:xXt(),getApplyQuickFilterFn:()=>null,aggregable:!1,chartable:!1,pastedValueParser:e=>SXt(e)});function _V(e){for(const t in e)return!1;return!0}const jGe=Ys(e=>e.sorting),yO=jr(jGe,e=>e.sortedRows),Hde=Zi(yO,mm,Sc,(e,t,n)=>e.reduce((r,o)=>{const i=t[o];if(i)r.push({id:o,model:i});else{const a=n[o];a&&AP(a)&&r.push({id:o,model:{[M_]:o}})}return r},[])),sg=jr(jGe,e=>e.sortModel),CXt=Zi(sg,e=>e.reduce((n,r,o)=>(n[r.field]={sortDirection:r.sort,sortIndex:e.length>1?o+1:void 0},n),{}));Zi(yO,e=>e.reduce((t,n,r)=>(t[n]=r,t),Object.create(null)));const jV=Ys(e=>e.filter),md=jr(jV,e=>e.filterModel),NGe=jr(md,e=>e.quickFilterValues),_Xt=Ys(e=>e.visibleRowsLookup),qI=jr(jV,e=>e.filteredRowsLookup);jr(jV,e=>e.filteredChildrenCountLookup);jr(jV,e=>e.filteredDescendantCountLookup);const Tj=Zi(_Xt,Hde,(e,t)=>_V(e)?t:t.filter(n=>e[n.id]!==!1)),s_=Zi(Tj,e=>e.map(t=>t.id)),Vde=Zi(qI,Hde,(e,t)=>_V(e)?t:t.filter(n=>e[n.id]!==!1)),EGe=Zi(Vde,e=>e.map(t=>t.id));Zi(s_,Sc,(e,t)=>{const n={};let r=0;return e.reduce((o,i)=>{const a=t[i];return n[a.depth]||(n[a.depth]=0),a.depth>r&&(n[a.depth]=0),r=a.depth,n[a.depth]+=1,o[i]=n[a.depth],o},{})});const jXt=Zi(Vde,Sc,hO,(e,t,n)=>n<2?[e]:e.reduce((r,o)=>{var a;const i=(a=t[o.id])==null?void 0:a.depth;return i===void 0||(r[i]||(r[i]=[]),r[i].push(o)),r},[[]])),PGe=jr(jXt,e=>e[0]??[]),Ude=jr(Tj,e=>e.length),w4=jr(PGe,e=>e.length),IGe=jr(Vde,e=>e.length);jr(IGe,w4,(e,t)=>e-t);const Gde=Zi(md,h1,(e,t)=>{var n;return(n=e.items)==null?void 0:n.filter(r=>{var a,l;if(!r.field)return!1;const o=t[r.field];if(!(o!=null&&o.filterOperators)||((a=o==null?void 0:o.filterOperators)==null?void 0:a.length)===0)return!1;const i=o.filterOperators.find(c=>c.value===r.operator);return i?!i.InputComponent||r.value!=null&&((l=r.value)==null?void 0:l.toString())!=="":!1})}),NXt=Zi(Gde,e=>e.reduce((n,r)=>(n[r.field]?n[r.field].push(r):n[r.field]=[r],n),{})),EXt=Zi(s_,e=>e.reduce((t,n,r)=>(t[n]=r,t),Object.create(null))),C0=Ys(e=>e.rowSelection),bO=Zi(C0,Lw),NV=jr(C0,IGe,(e,t)=>e.type==="include"?e.ids.size:t-e.ids.size),AGe=Zi(C0,mm,YE,(e,t,n)=>{const r=new Map;if(e.type==="include")for(const o of e.ids)r.set(o,t[o]);else for(let o=0;oM_ in t?t[M_]:e.props.getRowId?e.props.getRowId(t):t.id),PXt=Ys(e=>e.props.isRowSelectable);function TGe(e,t){var c;const n=Sc(e),r=yO(e),o=qI(e),i=n[t];if(!i||i.type!=="group")return[];const a=[],l=r.findIndex(u=>u===t)+1;for(let u=l;ui.depth;u+=1){const d=r[u];o[d]!==!1&&e.current.isRowSelectable(d)&&a.push(d)}return a}const IXt=jr(Cm,Sc,qI,bO,mm,PXt,(e,t,n,r,o,i,{groupId:a,autoSelectParents:l})=>{const c=t[a],u={id:a,row:o[a],columns:e};let d=!0;if(typeof i=="function"&&(d=i(u)),!c||c.type!=="group"||r.has(a))return{isIndeterminate:!1,isChecked:r.has(a),isSelectable:d};let f=!1,h=!1;const m=g=>{if(n[g]===!1||f&&h)return;const b=t[g];(b==null?void 0:b.type)==="group"&&b.children.forEach(m),r.has(g)?f=!0:h=!0};return m(a),{isIndeterminate:f&&h,isChecked:l?f&&!h:!1,isSelectable:d}});function Wde(e){return e.signature===H0.DataGrid?e.checkboxSelection&&e.disableMultipleRowSelection!==!0:!e.disableMultipleRowSelection}const AXt=(e,t)=>{const n=[];let r=t;for(;r!=null&&r!==Jl;){const o=e[r];if(!o)return n;n.push(r),r=o.parent}return n},TXt=(e,t,n)=>{const r=e[n];if(!r)return[];const o=r.parent;return o==null?[]:e[o].children.filter(a=>a!==n&&t[a]!==!1)},MT=(e,t,n,r,o,i,a=bO(e))=>{const l=qI(e),c=new Set([]);if(!(!r&&!o||l[n]===!1)){if(r){const u=t[n];(u==null?void 0:u.type)==="group"&&TGe(e,n).forEach(f=>{i(f),c.add(f)})}if(o){const u=h=>{if(!a.has(h)&&!c.has(h))return!1;const m=t[h];return m?m.type!=="group"?!0:m.children.every(u):!1},d=h=>{const m=TXt(t,l,h);if(m.length===0||m.every(u)){const g=t[h],b=g==null?void 0:g.parent;b!=null&&b!==Jl&&e.current.isRowSelectable(b)&&(i(b),c.add(b),d(b))}},f=t[n];if(!f||f.parent===Jl)return;d(n)}}},aNe=(e,t,n,r,o,i)=>{const a=bO(e);if(!(!o&&!r)&&(o&&AXt(t,n).forEach(c=>{a.has(c)&&i(c)}),r)){const l=t[n];(l==null?void 0:l.type)==="group"&&TGe(e,n).forEach(u=>{i(u)})}},kXt=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],MXt=e=>{const{classes:t}=e;return qn({root:["checkboxInput"]},ni,t)},RXt=so(function(t,n){var _,N;const{field:r,id:o,rowNode:i,tabIndex:a}=t,l=sr(t,kXt),c=Po(),u=br(),d={classes:u.classes},f=MXt(d),{isIndeterminate:h,isChecked:m,isSelectable:g}=Wn(c,IXt,{groupId:o,autoSelectParents:((_=u.rowSelectionPropagation)==null?void 0:_.parents)??!1}),b=!g,y=E=>{if(b)return;const I={value:E.target.checked,id:o};c.current.publishEvent("rowSelectionCheckboxChange",I,E)};p.useLayoutEffect(()=>{if(a===0){const E=c.current.getCellElement(o,r);E&&(E.tabIndex=-1)}},[c,a,o,r]);const v=no(E=>{E.key===" "&&E.stopPropagation()}),x=no(E=>{if(b){E.preventDefault();return}}),S=no(()=>{});if(i.type==="footer"||i.type==="pinnedRow")return null;const C=c.current.getLocaleText(m&&!h?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return s.jsx(u.slots.baseCheckbox,we({tabIndex:a,checked:m&&!h,onChange:y,onClick:x,onMouseDown:S,className:Ae(f.root,b&&"Mui-disabled"),material:{disableRipple:b},slotProps:{htmlInput:{"aria-disabled":b||void 0,"aria-label":C,name:"select_row"}},onKeyDown:v,indeterminate:h},(N=u.slotProps)==null?void 0:N.baseCheckbox,l,{ref:n}))}),OXt=RXt,EV=Ys(e=>e.focus),mh=jr(EV,e=>e.cell),DXt=jr(EV,e=>e.columnHeader);jr(EV,e=>e.columnHeaderFilter);const LB=jr(EV,e=>e.columnGroupHeader),PV=Ys(e=>e.tabIndex),qde=jr(PV,e=>e.cell),kGe=jr(PV,e=>e.columnHeader);jr(PV,e=>e.columnHeaderFilter);const LXt=jr(PV,e=>e.columnGroupHeader),$Xt=100,FXt=e=>e?0:100,MGe=(e,t,n)=>t>0&&e>0?Math.ceil(e/t):e===-1?n+2:0,RGe=e=>({page:0,pageSize:e?0:100}),BXt=(e,t=0)=>t===0?e:Math.max(Math.min(e,t-1),0),OGe=(e,t)=>{if(t===H0.DataGrid&&e>$Xt)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` +`))},zXt=-1,KI=Ys(e=>e.pagination),DGe=jr(KI,e=>e.enabled&&e.paginationMode==="client"),Yd=jr(KI,e=>e.paginationModel),Ew=jr(KI,e=>e.rowCount),Lk=jr(KI,e=>e.meta),HXt=jr(Yd,e=>e.page),VXt=jr(Yd,e=>e.pageSize),LGe=jr(Yd,Ew,(e,t)=>MGe(t,e.pageSize,e.page)),Kde=Zi(DGe,Yd,Sc,hO,Tj,PGe,(e,t,n,r,o,i)=>{var g;if(!e)return null;const a=i.length,l=Math.min(t.pageSize*t.page,a-1),c=t.pageSize===zXt?a-1:Math.min(l+t.pageSize-1,a-1);if(l===-1||c===-1)return null;if(r<2)return{firstRowIndex:l,lastRowIndex:c};const u=i[l],d=c-l+1,f=o.findIndex(b=>b.id===u.id);let h=f,m=0;for(;h0)&&(h+=1),y===0&&(m+=1))}return{firstRowIndex:f,lastRowIndex:h-1}}),UXt=Zi(Tj,Kde,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),$Ge=Zi(s_,Kde,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),vO=Zi(DGe,Kde,UXt,Tj,(e,t,n,r)=>e?{rows:n,range:t,rowIdToIndexMap:n.reduce((o,i,a)=>(o.set(i.id,a),o),new Map)}:{rows:r,range:r.length===0?null:{firstRowIndex:0,lastRowIndex:r.length-1},rowIdToIndexMap:r.reduce((o,i,a)=>(o.set(i.id,a),o),new Map)}),GXt=["field","colDef"],WXt=e=>{const{classes:t}=e;return qn({root:["checkboxInput"]},ni,t)},qXt=so(function(t,n){var E;const r=sr(t,GXt),[,o]=p.useState(!1),i=Po(),a=br(),l={classes:a.classes},c=WXt(l),u=Wn(i,kGe),d=Wn(i,C0),f=Wn(i,s_),h=Wn(i,$Ge),m=p.useMemo(()=>{const I=a.isRowSelectable;if(typeof I!="function"||d.type==="exclude")return d;const A={type:"include",ids:new Set};for(const R of d.ids)a.keepNonExistentRowsSelected&&A.ids.add(R),i.current.getRow(R)&&I(i.current.getRowParams(R))&&A.ids.add(R);return A},[i,a.isRowSelectable,a.keepNonExistentRowsSelected,d]),g=p.useMemo(()=>{const I=!a.pagination||!a.checkboxSelectionVisibleOnly||a.paginationMode==="server"?f:h,A=new Set;for(let R=0;R{const I=Lw(m);let A=0;for(const R of g)I.has(R)&&(A+=1);return A},[m,g]),y=p.useMemo(()=>{if(b===0)return!1;const I=Lw(m);for(const A of g)if(!I.has(A))return!0;return!1},[b,m,g]),v=b>0,x=I=>{const A={value:I.target.checked};i.current.publishEvent("headerSelectionCheckboxChange",A)},S=u!==null&&u.field===t.field?0:-1;p.useLayoutEffect(()=>{const I=i.current.getColumnHeaderElement(t.field);S===0&&I&&(I.tabIndex=-1)},[S,i,t.field]);const C=p.useCallback(I=>{I.key===" "&&i.current.publishEvent("headerSelectionCheckboxChange",{value:!v})},[i,v]),_=p.useCallback(()=>{o(I=>!I)},[]);p.useEffect(()=>i.current.subscribeEvent("rowSelectionChange",_),[i,_]);const N=i.current.getLocaleText(v&&!y?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return s.jsx(a.slots.baseCheckbox,we({indeterminate:y,checked:v&&!y,onChange:x,className:c.root,slotProps:{htmlInput:{"aria-label":N,name:"select_all_rows"}},tabIndex:S,onKeyDown:C,disabled:!Wde(a)},(E=a.slotProps)==null?void 0:E.baseCheckbox,r,{ref:n}))}),y0="__check__",YI=we({},_Ge,{type:"custom",field:y0,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,chartable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:()=>null,display:"flex",valueGetter:(e,t,n,r)=>{const o=TP(r,t);return r.current.isRowSelected(o)},rowSpanValueGetter:(e,t,n,r)=>TP(r,t),renderHeader:e=>s.jsx(qXt,we({},e)),renderCell:e=>s.jsx(OXt,we({},e))}),KXt=["item","applyValue","type","apiRef","focusElementRef","slotProps","isFilterActive","headerFilterMenu","clearButton","tabIndex","disabled"];function sNe(e,t){if(e==null)return"";const n=new Date(e);return Number.isNaN(n.getTime())?"":t==="date"?n.toISOString().substring(0,10):t==="datetime-local"?(n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n.toISOString().substring(0,19)):n.toISOString().substring(0,10)}function $N(e){var _;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,slotProps:a,headerFilterMenu:l,clearButton:c,tabIndex:u,disabled:d}=e,f=sr(e,KXt),h=a==null?void 0:a.root.slotProps,m=kp(),[g,b]=p.useState(()=>sNe(t.value,r)),[y,v]=p.useState(!1),x=pi(),S=br(),C=p.useCallback(N=>{m.clear();const E=N.target.value;b(E),v(!0),m.start(S.filterDebounceMs,()=>{const I=new Date(E);n(we({},t,{value:Number.isNaN(I.getTime())?void 0:I})),v(!1)})},[n,t,S.filterDebounceMs,m]);return p.useEffect(()=>{const N=sNe(t.value,r);b(N)},[t.value,r]),s.jsxs(p.Fragment,{children:[s.jsx(S.slots.baseTextField,we({fullWidth:!0,id:x,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:g,onChange:C,type:r||"text",disabled:d,inputRef:i,slotProps:we({},h,{input:we({endAdornment:y?s.jsx(S.slots.loadIcon,{fontSize:"small",color:"action"}):null},h==null?void 0:h.input),htmlInput:we({max:r==="datetime-local"?"9999-12-31T23:59":"9999-12-31",tabIndex:u},h==null?void 0:h.htmlInput)})},(_=S.slotProps)==null?void 0:_.baseTextField,f,a==null?void 0:a.root)),l,c]})}function FN(e,t,n,r){if(!e.value)return null;const o=new Date(e.value);n?o.setSeconds(0,0):(o.setMinutes(o.getMinutes()+o.getTimezoneOffset()),o.setHours(0,0,0,0));const i=o.getTime();return a=>{if(!a)return!1;if(r)return t(a.getTime(),i);const l=new Date(a);return n?l.setSeconds(0,0):l.setHours(0,0,0,0),t(l.getTime(),i)}}const FGe=e=>[{value:"is",getApplyFilterFn:t=>FN(t,(n,r)=>n===r,e),InputComponent:$N,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>FN(t,(n,r)=>n!==r,e),InputComponent:$N,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>FN(t,(n,r)=>n>r,e),InputComponent:$N,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>FN(t,(n,r)=>n>=r,e),InputComponent:$N,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>FN(t,(n,r)=>nFN(t,(n,r)=>n<=r,e),InputComponent:$N,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>t=>t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>t=>t!=null,requiresFilterValue:!1}],YXt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange","slotProps"],XXt=qt(Jb)({fontSize:"inherit"}),ZXt=e=>{const{classes:t}=e;return qn({root:["editInputCell"]},ni,t)};function JXt(e){var C,_;const{id:t,value:n,field:r,colDef:o,hasFocus:i,onValueChange:a,slotProps:l}=e,c=sr(e,YXt),u=o.type==="dateTime",d=Po(),f=p.useRef(null),h=p.useMemo(()=>{let N;n==null?N=null:n instanceof Date?N=n:N=new Date((n??"").toString());let E;return N==null||Number.isNaN(N.getTime())?E="":E=new Date(N.getTime()-N.getTimezoneOffset()*60*1e3).toISOString().substr(0,u?16:10),{parsed:N,formatted:E}},[n,u]),[m,g]=p.useState(h),b=br(),y={classes:b.classes},v=ZXt(y),x=p.useCallback(N=>{if(N==="")return null;const[E,I]=N.split("T"),[A,R,k]=E.split("-"),T=new Date;if(T.setFullYear(Number(A),Number(R)-1,Number(k)),T.setHours(0,0,0,0),I){const[D,O]=I.split(":");T.setHours(Number(D),Number(O),0,0)}return T},[]),S=p.useCallback(async N=>{const E=N.target.value,I=x(E);a&&await a(N,I),g({parsed:I,formatted:E}),d.current.setEditCellValue({id:t,field:r,value:I},N)},[d,r,t,a,x]);return p.useEffect(()=>{g(N=>{var E,I;return h.parsed!==N.parsed&&((E=h.parsed)==null?void 0:E.getTime())!==((I=N.parsed)==null?void 0:I.getTime())?h:N})},[h]),wa(()=>{i&&f.current.focus()},[i]),s.jsx(XXt,we({as:b.slots.baseInput,inputRef:f,fullWidth:!0,className:v.root,type:u?"datetime-local":"date",value:m.formatted,onChange:S},c,l==null?void 0:l.root,{slotProps:{htmlInput:we({max:u?"9999-12-31T23:59":"9999-12-31"},(_=(C=l==null?void 0:l.root)==null?void 0:C.slotProps)==null?void 0:_.htmlInput)}}))}const BGe=e=>s.jsx(JXt,we({},e));function zGe({value:e,columnType:t,rowId:n,field:r}){if(!(e instanceof Date))throw new Error([`MUI X: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${r}".`].join(` +`))}const QXt=(e,t,n,r)=>{if(!e)return"";const o=TP(r,t);return JUe(t)&&!(e instanceof Date)?e:(zGe({value:e,columnType:"date",rowId:o,field:n.field}),e.toLocaleDateString())},eZt=(e,t,n,r)=>{if(!e)return"";const o=TP(r,t);return JUe(t)&&!(e instanceof Date)?e:(zGe({value:e,columnType:"dateTime",rowId:o,field:n.field}),e.toLocaleString())},tZt=we({},U0,{type:"date",sortComparator:iGe,valueFormatter:QXt,filterOperators:FGe(),renderEditCell:BGe,pastedValueParser:e=>new Date(e)}),nZt=we({},U0,{type:"dateTime",sortComparator:iGe,valueFormatter:eZt,filterOperators:FGe(!0),renderEditCell:BGe,pastedValueParser:e=>new Date(e)}),Pw=e=>e==null?null:Number(e),rZt=e=>e==null||Number.isNaN(e)||e===""?null:t=>Pw(t)===Pw(e),oZt=()=>[{value:"=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>Pw(t)===e.value,InputComponent:hg,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>Pw(t)!==e.value,InputComponent:hg,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Pw(t)>e.value,InputComponent:hg,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Pw(t)>=e.value,InputComponent:hg,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Pw(t)e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Pw(t)<=e.value,InputComponent:hg,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>e!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>!Array.isArray(e.value)||e.value.length===0?null:t=>t!=null&&e.value.includes(Number(t)),InputComponent:sGe,InputComponentProps:{type:"number"}}],iZt=we({},U0,{type:"number",align:"right",headerAlign:"right",sortComparator:oGe,valueParser:e=>e===""?null:Number(e),valueFormatter:e=>NYt(e)?e.toLocaleString():e||"",filterOperators:oZt(),getApplyQuickFilterFn:rZt});function qM(e){return(e==null?void 0:e.type)==="singleSelect"}function R_(e,t){if(e)return typeof e.valueOptions=="function"?e.valueOptions(we({field:e.field},t)):e.valueOptions}function $B(e,t,n){if(t===void 0)return;const r=t.find(o=>{const i=n(o);return String(i)===String(e)});return n(r)}const aZt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","slotProps"];function sZt(e){return"key"in e&&!!e.key}function lZt(e){var R,k;const t=br(),{id:n,value:r,field:o,row:i,colDef:a,hasFocus:l,error:c,onValueChange:u,initialOpen:d=t.editMode===zb.Cell,slotProps:f}=e,h=sr(e,aZt),m=Po(),g=p.useRef(null),b=p.useRef(null),[y,v]=p.useState(d),S=(((R=t.slotProps)==null?void 0:R.baseSelect)||{}).native??!1;if(wa(()=>{var T;l&&((T=b.current)==null||T.focus())},[l]),!qM(a))return null;const C=R_(a,{id:n,row:i});if(!C)return null;const _=a.getOptionValue,N=a.getOptionLabel,E=async T=>{if(!qM(a)||!C)return;v(!1);const D=T.target,O=$B(D.value,C,_);u&&await u(T,O),await m.current.setEditCellValue({id:n,field:o,value:O},T)},I=(T,D)=>{if(t.editMode===zb.Row){v(!1);return}if(D==="backdropClick"||T.key==="Escape"){const O=m.current.getCellParams(n,o);m.current.publishEvent("cellEditStop",we({},O,{reason:T.key==="Escape"?x0.escapeKeyDown:x0.cellFocusOut}))}},A=T=>{sZt(T)&&T.key==="Enter"||v(!0)};return!C||!a?null:s.jsx(t.slots.baseSelect,we({ref:g,value:r,onChange:E,open:y,onOpen:A,onClose:I,error:c,native:S,fullWidth:!0,slotProps:{htmlInput:{ref:b}}},h,f==null?void 0:f.root,(k=t.slotProps)==null?void 0:k.baseSelect,{children:C.map(T=>{var O;const D=_(T);return p.createElement(t.slots.baseSelectOption,we({},((O=t.slotProps)==null?void 0:O.baseSelectOption)||{},{native:S,key:D,value:D}),N(T))})}))}const cZt=e=>s.jsx(lZt,we({},e)),uZt=["item","applyValue","type","apiRef","focusElementRef","tabIndex","isFilterActive","clearButton","headerFilterMenu","slotProps"],dZt=({column:e,OptionComponent:t,getOptionLabel:n,getOptionValue:r,isSelectNative:o,baseSelectOptionProps:i})=>["",...R_(e)||[]].map(l=>{const c=r(l);let u=n(l);return u===""&&(u=" "),p.createElement(t,we({},i,{native:o,key:c,value:c}),u)});function lNe(e){var N,E,I,A,R;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,tabIndex:a,clearButton:l,headerFilterMenu:c,slotProps:u}=e,d=sr(e,uZt),f=t.value??"",h=pi(),m=pi(),g=br(),b=((E=(N=g.slotProps)==null?void 0:N.baseSelect)==null?void 0:E.native)??!1,y=o.current.getColumn(t.field),v=y.getOptionValue,x=y.getOptionLabel,S=p.useMemo(()=>R_(y),[y]),C=p.useCallback(k=>{let T=k.target.value;T=$B(T,S,v),n(we({},t,{value:T}))},[S,v,n,t]);if(!y||!qM(y))return null;const _=(u==null?void 0:u.root.label)??o.current.getLocaleText("filterPanelInputLabel");return s.jsxs(p.Fragment,{children:[s.jsx(g.slots.baseSelect,we({fullWidth:!0,id:h,label:_,labelId:m,value:f,onChange:C,slotProps:{htmlInput:we({tabIndex:a,ref:i,type:r||"text",placeholder:(u==null?void 0:u.root.placeholder)??o.current.getLocaleText("filterPanelInputPlaceholder")},(I=u==null?void 0:u.root.slotProps)==null?void 0:I.htmlInput)},native:b},(A=g.slotProps)==null?void 0:A.baseSelect,d,u==null?void 0:u.root,{children:dZt({column:y,OptionComponent:g.slots.baseSelectOption,getOptionLabel:x,getOptionValue:v,isSelectNative:b,baseSelectOptionProps:(R=g.slotProps)==null?void 0:R.baseSelectOption})})),c,l]})}const fZt=["item","applyValue","type","apiRef","focusElementRef","slotProps"];function pZt(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,slotProps:a}=e,l=sr(e,fZt),c=pi(),u=br(),d=o.current.getColumn(t.field),f=d.getOptionValue,h=d.getOptionLabel,m=p.useCallback((x,S)=>f(x)===f(S),[f]),g=p.useMemo(()=>R_(d)||[],[d]),b=p.useMemo(()=>Array.isArray(t.value)?t.value.reduce((x,S)=>{const C=g.find(_=>f(_)===S);return C!=null&&x.push(C),x},[]):[],[f,t.value,g]),y=p.useCallback((x,S)=>{n(we({},t,{value:S.map(f)}))},[n,t,f]);if(!d||!qM(d))return null;const v=u.slots.baseAutocomplete;return s.jsx(v,we({multiple:!0,options:g,isOptionEqualToValue:m,id:c,value:b,onChange:y,getOptionLabel:h,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:r||"text",inputRef:i}}},l,a==null?void 0:a.root))}const BN=e=>e==null||!Lde(e)?e:e.value,hZt=()=>[{value:"is",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>BN(t)===BN(e.value),InputComponent:lNe},{value:"not",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>BN(t)!==BN(e.value),InputComponent:lNe},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const t=e.value.map(BN);return n=>t.includes(BN(n))},InputComponent:pZt}],mZt=e=>typeof e[0]=="object",gZt=e=>Lde(e)?e.value:e,yZt=e=>Lde(e)?e.label:String(e),bZt=we({},U0,{type:"singleSelect",getOptionLabel:yZt,getOptionValue:gZt,valueFormatter(e,t,n,r){const o=TP(r,t);if(!qM(n))return"";const i=R_(n,{id:o,row:t});if(e==null)return"";if(!i)return e;if(!mZt(i))return n.getOptionLabel(e);const a=i.find(l=>n.getOptionValue(l)===e);return a?n.getOptionLabel(a):""},renderEditCell:cZt,filterOperators:hZt(),pastedValueParser:(e,t,n)=>{const r=n,o=R_(r)||[],i=r.getOptionValue;if(o.find(l=>i(l)===e))return e}}),vZt="string",xZt=()=>({string:U0,number:iZt,date:tZt,dateTime:nZt,boolean:_Ge,singleSelect:bZt,[CV]:sXt,custom:U0}),Yde=Ys(e=>e.headerFiltering),wZt=jr(Yde,e=>(e==null?void 0:e.enabled)??!1),SZt=jr(Yde,e=>e.editing),CZt=jr(Yde,e=>e.menuOpen),IV=Ys(e=>e.columnGrouping),HGe=Zi(IV,e=>(e==null?void 0:e.unwrappedGroupingModel)??{}),VGe=Zi(IV,e=>(e==null?void 0:e.lookup)??{}),_Zt=Zi(IV,e=>(e==null?void 0:e.headerStructure)??[]),xO=jr(IV,e=>(e==null?void 0:e.maxDepth)??0),UGe=["maxWidth","minWidth","width","flex"],kY=xZt();function jZt({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const r=new Set(n.map(a=>a.field)),o={all:{},frozenFields:[],freeze:a=>{const l=o.all[a];l&&l.frozen!==!0&&(o.all[a].frozen=!0,o.frozenFields.push(a))}};function i(){if(o.frozenFields.length===r.size)return;const a={min:{},max:{}};let l=e,c=t,u=0;o.frozenFields.forEach(d=>{l-=o.all[d].computedWidth,c-=o.all[d].flex});for(let d=0;df.maxWidth&&(u+=f.maxWidth-m,m=f.maxWidth,a.max[f.field]=!0),o.all[f.field]={frozen:!1,computedWidth:m,flex:f.flex}}u<0?Object.keys(a.max).forEach(d=>{o.freeze(d)}):u>0?Object.keys(a.min).forEach(d=>{o.freeze(d)}):n.forEach(({field:d})=>{o.freeze(d)}),i()}return i(),o.all}const ine=(e,t)=>{const n={};let r=0,o=0;const i=[];e.orderedFields.forEach(c=>{let u=e.lookup[c],d=0,f=!1;e.columnVisibilityModel[c]!==!1&&(u.flex&&u.flex>0?(r+=u.flex,f=!0):d=a_(u.width||U0.width,u.minWidth||U0.minWidth,u.maxWidth||U0.maxWidth),o+=d),u.computedWidth!==d&&(u=we({},u,{computedWidth:d})),f&&i.push(u),n[c]=u});const a=t===void 0?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),l=Math.max(a-o,0);if(r>0&&a>0){const c=jZt({initialFreeSpace:l,totalFlexUnits:r,flexColumns:i});Object.keys(c).forEach(u=>{n[u]=we({},n[u],{computedWidth:c[u].computedWidth})})}return we({},e,{lookup:n})},NZt=(e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:r={}}=t,o=Object.keys(r);if(o.length===0&&n.length===0)return e;const i={},a=[];for(let d=0;d!i[d])],c=we({},e.lookup);for(let d=0;d{h[m]=g===-1?1/0:g}),c[f]=h}return we({},e,{orderedFields:l,lookup:c})};function MY(e){let t=kY[vZt];return e&&kY[e]&&(t=kY[e]),t}const kE=({apiRef:e,columnsToUpsert:t,initialState:n,columnVisibilityModel:r=bg(e),keepOnlyColumnsToUpsert:o=!1,updateInitialVisibilityModel:i=!1})=>{var f,h;const a=!e.current.state.columns;let l;if(a)l={orderedFields:[],lookup:{},columnVisibilityModel:r,initialColumnVisibilityModel:r};else{const m=V0(e);l={orderedFields:o?[]:[...m.orderedFields],lookup:we({},m.lookup),columnVisibilityModel:r,initialColumnVisibilityModel:i?r:m.initialColumnVisibilityModel}}const c={};if(o&&!a)for(const m in l.lookup)Object.prototype.hasOwnProperty.call(l.lookup,m)&&(c[m]=!1);t.forEach(m=>{const{field:g}=m;c[g]=!0;let b=l.lookup[g];b==null?(b=we({},MY(m.type),{field:g,hasBeenResized:!1}),l.orderedFields.push(g)):o&&l.orderedFields.push(g),b&&b.type!==m.type&&(b=we({},MY(m.type),{field:g}));let y=b.hasBeenResized;UGe.forEach(v=>{m[v]!==void 0&&(y=!0,m[v]===-1&&(m[v]=1/0))}),l.lookup[g]=T_(b,we({},MY(m.type),m,{hasBeenResized:y}))}),o&&!a&&Object.keys(l.lookup).forEach(m=>{c[m]||delete l.lookup[m]});const u=e.current.unstable_applyPipeProcessors("hydrateColumns",l),d=NZt(u,n);return ine(d,((h=(f=e.current).getRootDimensions)==null?void 0:h.call(f))??void 0)};function AV(e,t){if(t.listView)return 0;const n=mO(e),r=xO(e),o=wZt(e),i=Math.floor(t.columnHeaderHeight*n),a=Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*n),l=o?Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*n):0;return i+a*r+l}const FB=1,GGe=1.5,EZt=e=>{const{scrollDirection:t,classes:n}=e,r={root:["scrollArea",`scrollArea--${t}`]};return qn(r,ni,n)},PZt=Si("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${He["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${He["scrollArea--right"]}`]:t["scrollArea--right"]},{[`&.${He["scrollArea--up"]}`]:t["scrollArea--up"]},{[`&.${He["scrollArea--down"]}`]:t["scrollArea--down"]},t.scrollArea]})(()=>({position:"absolute",zIndex:101,[`&.${He["scrollArea--left"]}`]:{top:0,left:0,width:20,bottom:0},[`&.${He["scrollArea--right"]}`]:{top:0,right:0,width:20,bottom:0},[`&.${He["scrollArea--up"]}`]:{top:0,left:0,right:0,height:20},[`&.${He["scrollArea--down"]}`]:{bottom:0,left:0,right:0,height:20}})),IZt=jr(bl,(e,t)=>t==="left"?e.leftPinnedWidth:t==="right"?e.rightPinnedWidth+(e.hasScrollX?e.scrollbarSize:0):0);function AZt(e){const t=Po(),[n,r]=p.useState("none");return Ir(t,"columnHeaderDragStart",()=>r("horizontal")),Ir(t,"columnHeaderDragEnd",()=>r("none")),Ir(t,"rowDragStart",()=>r("vertical")),Ir(t,"rowDragEnd",()=>r("none")),n==="none"?null:n==="horizontal"?s.jsx(TZt,we({},e)):s.jsx(kZt,we({},e))}function TZt(e){const{scrollDirection:t,scrollPosition:n}=e,r=p.useRef(null),o=Po(),i=kp(),a=Wn(o,mO),l=Wn(o,Mde),c=Wn(o,IZt,t),u=()=>{const b=bl(o);if(t==="left")return n.current.left>0;if(t==="right"){const y=l-b.viewportInnerSize.width;return n.current.left{let y;if(b.preventDefault(),t==="left")y=b.clientX-r.current.getBoundingClientRect().right;else if(t==="right")y=Math.max(1,b.clientX-r.current.getBoundingClientRect().left);else throw new Error("MUI X: Wrong drag direction");y=(y-FB)*GGe+FB,i.start(0,()=>{o.current.scroll({left:n.current.left+y,top:n.current.top})})});return s.jsx(WGe,we({},e,{ref:r,getCanScrollMore:u,style:m,handleDragOver:g}))}function kZt(e){const{scrollDirection:t,scrollPosition:n}=e,r=p.useRef(null),o=Po(),i=kp(),a=Wn(o,qUe),l=()=>{const h=bl(o);if(t==="up")return n.current.top>0;if(t==="down"){const g=(a.currentPageTotalHeight||0)-h.viewportInnerSize.height-(h.hasScrollX?h.scrollbarSize:0);return n.current.top{let m;if(h.preventDefault(),t==="up")m=h.clientY-r.current.getBoundingClientRect().bottom;else if(t==="down")m=Math.max(1,h.clientY-r.current.getBoundingClientRect().top);else throw new Error("MUI X: Wrong drag direction");m=(m-FB)*GGe+FB,i.start(0,()=>{o.current.scroll({left:n.current.left,top:n.current.top+m})})});return s.jsx(WGe,we({},e,{ref:r,getCanScrollMore:l,style:d,handleDragOver:f}))}const WGe=so(function(t,n){const{scrollDirection:r,getCanScrollMore:o,style:i,handleDragOver:a}=t,l=Po(),[c,u]=p.useState(o),d=br(),f=we({},d,{scrollDirection:r}),h=EZt(f);return Ir(l,"scrollPositionChange",()=>{u(o)}),c?s.jsx(PZt,{ref:n,className:h.root,ownerState:f,onDragOver:a,style:i}):null}),QL=p1(AZt),qGe=p.createContext(void 0);function Vp(){const e=p.useContext(qGe);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` +`));return e}const MZt=()=>{},RZt=(e,t)=>{const n=p.useRef(!1);wa(()=>n.current||!e?MZt:(n.current=!0,t()),[n.current||e])};function zo(e,t,n){const r=p.useRef(!0);wa(()=>{r.current=!1,e.current.register(n,t)},[e,n,t]),r.current&&e.current.register(n,t)}function sf(e,t){const n=p.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}const KGe=(e,t,n,r,o)=>{const i=sf(e,"useNativeEventListener");is(e,"rootMount",()=>{const a=t();if(!(!a||!n))return i.debug(`Binding native ${n} event`),a.addEventListener(n,r,o),()=>{i.debug(`Clearing native ${n} event`),a.removeEventListener(n,r,o)}})};function kj(e){const t=p.useRef(!0);t.current&&(t.current=!1,e())}function OZt(e){const t=p.useRef(null),n=p.useCallback((...r)=>{t.current||queueMicrotask(()=>{t.current&&t.current()}),t.current=()=>{t.current=null,e(...r)}},[e]);return p.useLayoutEffect(()=>{t.current&&t.current()}),{schedule:n,cancel:()=>t.current?(t.current=null,!0):!1}}const YGe=Ys(e=>e.pivoting),O_=jr(YGe,e=>e==null?void 0:e.active),DZt=new Map,Xde=jr(YGe,e=>(e==null?void 0:e.initialColumns)||DZt),XGe=(e,t)=>{var b,y;const n=Wn(e,GI),r=Wn(e,Ude),o=Wn(e,KUe),i=Wn(e,oc),a=n===0&&o===0,l=Wn(e,WKt),c=Wn(e,O_),u=!l&&a,d=!l&&n>0&&r===0,f=!l&&i.length===0,h=u&&c;let m=null,g=null;return u&&(m="noRowsOverlay"),f&&(m="noColumnsOverlay"),h&&(m="emptyPivotOverlay"),d&&(m="noResultsOverlay"),l&&(m="loadingOverlay",g=((y=(b=t.slotProps)==null?void 0:b.loadingOverlay)==null?void 0:y[a?"noRowsVariant":"variant"])??(a?"skeleton":"linear-progress")),{overlayType:m,loadingOverlayVariant:g}},p8=Ys(e=>e.columnMenu);function LZt(){var y;const e=Vp(),t=br(),n=Wn(e,oc),r=Wn(e,NXt),o=Wn(e,CXt),i=Wn(e,kGe),a=Wn(e,()=>qde(e)===null),l=Wn(e,LXt),c=Wn(e,DXt),u=Wn(e,LB),d=Wn(e,xO),f=Wn(e,p8),h=Wn(e,bg),m=Wn(e,_Zt),g=!(l===null&&i===null&&a),b=e.current.columnHeadersContainerRef;return s.jsx(t.slots.columnHeaders,we({ref:b,visibleColumns:n,filterColumnLookup:r,sortColumnLookup:o,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:l,columnHeaderFocus:c,columnGroupHeaderFocus:u,headerGroupingMaxDepth:d,columnMenuState:f,columnVisibility:h,columnGroupsHeaderStructure:m,hasOtherElementInTabSequence:g},(y=t.slotProps)==null?void 0:y.columnHeaders))}const $Zt=p1(LZt),FZt=Si("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),BZt=Si("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>{const{ownerState:n,loadingOverlayVariant:r,overlayType:o}=e,i=r==="skeleton"||o==="noColumnsOverlay";return[t.main,n.hasPinnedRight&&t["main--hasPinnedRight"],i&&t["main--hiddenContent"]]}})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),zZt=so((e,t)=>{var a;const{ownerState:n}=e,r=br(),i=wV().hooks.useGridAriaAttributes();return s.jsxs(BZt,we({ownerState:n,className:e.className,tabIndex:-1},i,(a=r.slotProps)==null?void 0:a.main,{ref:t,children:[s.jsx(FZt,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))}),HZt=()=>qn({root:["topContainer"]},ni,{}),VZt=Si("div")({position:"sticky",zIndex:40,top:0});function UZt(e){const t=HZt();return s.jsx(VZt,we({},e,{className:Ae(t.root,He["container--top"]),role:"presentation"}))}const GZt=(e,t)=>{const{classes:n}=e;return qn({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},ni,n)},WZt=Si("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.virtualScrollerContent,n.overflowedContent&&t["virtualScrollerContent--overflowed"]]}})({}),qZt=so(function(t,n){var l;const r=br(),o=!r.autoHeight&&((l=t.style)==null?void 0:l.minHeight)==="auto",i=GZt(r,o),a={classes:r.classes,overflowedContent:o};return s.jsx(WZt,we({},t,{ownerState:a,className:Ae(i.root,t.className),ref:n}))}),KZt=Si("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),ZGe=Si("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:xr.cell.background.pinned}),YZt=Si(ZGe)({left:0}),XZt=Si(ZGe)({right:0}),ZZt=Si("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});function JZt({rowsLength:e}){const t=Po(),{viewportOuterSize:n,minimumSize:r,hasScrollX:o,hasScrollY:i,scrollbarSize:a,leftPinnedWidth:l,rightPinnedWidth:c}=Wn(t,bl),u=o?a:0,d=n.height-r.height>0;return u===0&&!d?null:s.jsxs(KZt,{className:He.filler,role:"presentation",style:{height:u,"--rowBorderColor":e===0?"transparent":"var(--DataGrid-rowBorderColor)"},children:[l>0&&s.jsx(YZt,{className:He["filler--pinnedLeft"],style:{width:l}}),s.jsx(ZZt,{}),c>0&&s.jsx(XZt,{className:He["filler--pinnedRight"],style:{width:c+(i?a:0)}})]})}const QZt=p1(JZt),eJt=e=>{const{classes:t}=e;return qn({root:["virtualScrollerRenderZone"]},ni,t)},tJt=Si("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone"})({position:"absolute",display:"flex",flexDirection:"column"}),nJt=so(function(t,n){const r=br(),o=eJt(r);return s.jsx(tJt,we({ownerState:r},t,{className:Ae(o.root,t.className),ref:n}))}),rJt={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1,disableColumnVirtualization:!0},yd=Ys(e=>e.editRows),JGe=jr(yd,(e,{rowId:t,editMode:n})=>n===zb.Row&&!!e[t]),oJt=jr(yd,(e,{rowId:t,field:n})=>{var r;return((r=e[t])==null?void 0:r[n])??null}),D_=Ys(e=>e.preferencePanel),iJt=jr(D_,(e,t)=>!!(e.open&&e.labelId===t));var Mp=(function(e){return e.filters="filters",e.columns="columns",e.aiAssistant="aiAssistant",e})(Mp||{});const aJt={},sJt={initialize:lJt,use:cJt,selectors:aJt};function lJt(e){return{colspanMap:new Map}}function cJt(e,t,n){var l;const r=(l=t.colspan)==null?void 0:l.getColspan,o=()=>{e.state.colspanMap=new Map},i=(c,u)=>{var d;return(d=e.state.colspanMap.get(c))==null?void 0:d[u]},a=no(r?(c,u,d,f)=>{for(let h=u;h1&&(h+=m.colSpan-1)}}:()=>{});return n.calculateColSpan=a,{resetColSpan:o,getCellColSpanInfo:i,calculateColSpan:a}}function uJt(e,t,n,r,o,i,a){const l=i.length,c=i[t],u=a(n,c,t);if(!u||u===1)return RY(e,n,t,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let d=c.computedWidth;for(let f=1;f=r&&h{n=void 0,e(...r)};function i(...a){r=a,n===void 0&&(n=setTimeout(o,t))}return i.clear=()=>{clearTimeout(n),n=void 0},i}function jg(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let i=0;ie.width===t.width&&e.height===t.height},fJt={EMPTY:{top:[],bottom:[]}},pJt={EMPTY:{left:[],right:[]}},hJt={EMPTY:{top:0,left:0}};let xc=(function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e})({});(function(e){function t(n,r){return n===0&&r===0?xc.NONE:Math.abs(r)>=Math.abs(n)?r>0?xc.DOWN:xc.UP:n>0?xc.RIGHT:xc.LEFT}e.forDelta=t})(xc||(xc={}));const mJt={isReady:!1,root:lx.EMPTY,viewportOuterSize:lx.EMPTY,viewportInnerSize:lx.EMPTY,contentSize:lx.EMPTY,minimumSize:lx.EMPTY,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,topContainerHeight:0,bottomContainerHeight:0,autoHeight:!1,minimalContentHeight:void 0},E5={rootSize:e=>e.rootSize,dimensions:e=>e.dimensions,rowHeight:e=>e.dimensions.rowHeight,columnsTotalWidth:e=>e.dimensions.columnsTotalWidth,contentHeight:e=>e.dimensions.contentSize.height,autoHeight:e=>e.dimensions.autoHeight,minimalContentHeight:e=>e.dimensions.minimalContentHeight,rowsMeta:e=>e.rowsMeta,rowPositions:e=>e.rowsMeta.positions,columnPositions:dg((e,t)=>{const n=[];let r=0;for(let o=0;oe.dimensions.viewportOuterSize.width>0&&e.dimensions.columnsTotalWidth>e.dimensions.viewportOuterSize.width},Ql={initialize:gJt,use:yJt,selectors:E5};function gJt(e){const t=we({},mJt,e.dimensions,{autoHeight:e.dimensions.autoHeight,minimalContentHeight:e.dimensions.minimalContentHeight}),{rowCount:n}=e,{rowHeight:r}=t,o={currentPageTotalHeight:n*r,positions:Array.from({length:n},(a,l)=>l*r),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0},i=new Map;return{rootSize:lx.EMPTY,dimensions:t,rowsMeta:o,rowHeights:i}}function yJt(e,t,n){const r=p.useRef(!0),{layout:o,dimensions:{rowHeight:i,columnsTotalWidth:a,leftPinnedWidth:l,rightPinnedWidth:c,topPinnedHeight:u,bottomPinnedHeight:d},onResize:f}=t,h=p.useCallback(v=>{if(v&&(r.current=!1),r.current)return;const x=o.refs.container.current,S=E5.rootSize(e.state),C=E5.rowsMeta(e.state),_=xJt(x,t.dimensions.scrollbarSize),N=u+C.pinnedTopRowsTotalHeight,E=d+C.pinnedBottomRowsTotalHeight,I={width:a,height:P2(C.currentPageTotalHeight,1)};let A,R,k=!1,T=!1;if(t.dimensions.autoHeight)T=!1,k=Math.round(a)>Math.round(S.width),A={width:S.width,height:N+E+I.height},R={width:Math.max(0,A.width-(T?_:0)),height:Math.max(0,A.height-(k?_:0))};else{A={width:S.width,height:S.height},R={width:Math.max(0,A.width),height:Math.max(0,A.height-N-E)};const U=I,G=R,W=U.width>G.width,Y=U.height>G.height;(W||Y)&&(T=Y,k=U.width+(T?_:0)>G.width,k&&(T=U.height+_>G.height)),T&&(R.width-=_),k&&(R.height-=_)}t.disableHorizontalScroll&&(k=!1),t.disableVerticalScroll&&(T=!1);const D=Math.max(A.width,a+(T?_:0)),O={width:a,height:N+I.height+E},z={isReady:!0,root:S,viewportOuterSize:A,viewportInnerSize:R,contentSize:I,minimumSize:O,hasScrollX:k,hasScrollY:T,scrollbarSize:_,rowWidth:D,rowHeight:i,columnsTotalWidth:a,leftPinnedWidth:l,rightPinnedWidth:c,topContainerHeight:N,bottomContainerHeight:E,autoHeight:t.dimensions.autoHeight,minimalContentHeight:t.dimensions.minimalContentHeight},F=e.state.dimensions;jg(F,z)||(e.update({dimensions:z}),f==null||f(z.root))},[e,o.refs.container,t.dimensions.scrollbarSize,t.dimensions.autoHeight,t.dimensions.minimalContentHeight,t.disableHorizontalScroll,t.disableVerticalScroll,f,i,a,l,c,u,d]),{resizeThrottleMs:m}=t,g=no(h),b=p.useMemo(()=>m>0?dJt(g,m):void 0,[m,g]);p.useEffect(()=>b==null?void 0:b.clear,[b]),wa(h,[h]),wa(()=>{e.update({dimensions:we({},e.state.dimensions,{autoHeight:t.dimensions.autoHeight,minimalContentHeight:t.dimensions.minimalContentHeight})})},[e,t.dimensions.autoHeight,t.dimensions.minimalContentHeight]);const y=bJt(e,t,h);return{updateDimensions:h,debouncedUpdateDimensions:b,rowsMeta:y}}function bJt(e,t,n){const r=e.state.rowHeights,{rows:o,getRowHeight:i,getRowSpacing:a,getEstimatedRowHeight:l}=t,c=p.useRef(-1),u=p.useRef(!1),d=p.useRef(!1),f=t.pinnedRows,h=Xw(e,E5.rowHeight),m=no(R=>{let k=r.get(R);return k===void 0&&(k={content:e.state.dimensions.rowHeight,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},r.set(R,k)),k}),{applyRowHeight:g}=t,b=p.useCallback(R=>{const k=E5.dimensions(e.state),T=k.rowHeight,D=m(R.id);if(!i)D.content=T,D.needsFirstMeasurement=!1;else{const O=i(R);if(O==="auto"){if(D.needsFirstMeasurement){const z=l?l(R):T;D.content=z??T}u.current=!0,D.autoHeight=!0}else D.content=O??k.rowHeight,D.needsFirstMeasurement=!1,D.autoHeight=!1}if(a){const O=a(R);D.spacingTop=O.top??0,D.spacingBottom=O.bottom??0}else D.spacingTop=0,D.spacingBottom=0;return g==null||g(D,R),D},[e,i,m,l,h,a,g]),y=p.useCallback(()=>{u.current=!1;const R=(f==null?void 0:f.top.reduce((F,U)=>{const G=b(U);return F+G.content+G.spacingTop+G.spacingBottom+G.detail},0))??0,k=(f==null?void 0:f.bottom.reduce((F,U)=>{const G=b(U);return F+G.content+G.spacingTop+G.spacingBottom+G.detail},0))??0,T=[],D=o.reduce((F,U)=>{T.push(F);const G=b(U),W=G.content+G.spacingTop+G.spacingBottom+G.detail;return F+W},0);u.current||(c.current=1/0);const O=R!==e.state.rowsMeta.pinnedTopRowsTotalHeight||k!==e.state.rowsMeta.pinnedBottomRowsTotalHeight||D!==e.state.rowsMeta.currentPageTotalHeight,z={currentPageTotalHeight:D,positions:T,pinnedTopRowsTotalHeight:R,pinnedBottomRowsTotalHeight:k};e.set("rowsMeta",z),O&&n(),d.current=!0},[e,f,o,b,n]),v=no(y),x=R=>{var k;return((k=r.get(R))==null?void 0:k.content)??E5.rowHeight(e.state)},S=(R,k)=>{const T=m(R),D=T.content!==k;T.needsFirstMeasurement=!1,T.content=k,d.current&&(d.current=!D)},C=R=>{var k;return((k=r.get(R))==null?void 0:k.autoHeight)??!1},_=()=>c.current,N=R=>{u.current&&R>c.current&&(c.current=R)},E=()=>{r.clear(),y()},I=kh(()=>typeof ResizeObserver>"u"?void 0:new ResizeObserver(R=>{var k,T;for(let D=0;D0?O.borderBoxSize[0].blockSize:O.contentRect.height,F=O.target.__mui_id;if(((T=(k=t.focusedVirtualCell)==null?void 0:k.call(t))==null?void 0:T.id)===F&&z===0)return;S(F,z)}d.current||requestAnimationFrame(()=>{v()})})).current,A=(R,k)=>(R.__mui_id=k,I==null||I.observe(R),()=>I==null?void 0:I.unobserve(R));return wa(()=>{y()},[y]),{getRowHeight:x,setLastMeasuredRowIndex:N,storeRowHeightMeasurement:S,hydrateRowsMeta:y,observeRowHeight:A,rowHasAutoHeight:C,getRowHeightEntry:m,getLastMeasuredRowIndex:_,resetRowHeights:E}}function vJt(e,t,n){if(!e)return;const r=e.getBoundingClientRect(),o={width:P2(r.width,1),height:P2(r.height,1)};if((t.state.rootSize===lx.EMPTY||!lx.equals(o,t.state.rootSize))&&n(o),typeof ResizeObserver>"u")return;const i=new ResizeObserver(([a])=>{if(!a)return;const l={width:P2(a.contentRect.width,1),height:P2(a.contentRect.height,1)};lx.equals(l,t.state.rootSize)||n(l)});return i.observe(e),()=>{i.disconnect()}}const cNe=new WeakMap;function xJt(e,t){if(t!==void 0)return t;if(e===null)return 0;const n=cNe.get(e);if(n!==void 0)return n;const o=lc(e).createElement("div");o.style.width="99px",o.style.height="99px",o.style.position="absolute",o.style.overflow="scroll",o.className="scrollDiv",e.appendChild(o);const i=o.offsetWidth-o.clientWidth;return e.removeChild(o),cNe.set(e,i),i}const wJt=typeof navigator<"u"?navigator.userAgent.toLowerCase():"empty",QGe=wJt.includes("firefox"),OY=typeof window<"u"&&/jsdom|HappyDOM/.test(window.navigator.userAgent),P5=(e,t,n)=>Math.max(t,Math.min(n,e)),DY=50,uNe={top:0,left:0},SJt=Object.freeze(new Map),KM={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},h8=(()=>{const e=Uv(t=>t.virtualization.renderContext.firstRowIndex);return{store:Uv(t=>t.virtualization),renderContext:Uv(t=>t.virtualization.renderContext),enabledForRows:Uv(t=>t.virtualization.enabledForRows),enabledForColumns:Uv(t=>t.virtualization.enabledForColumns),offsetTop:Uv(Ql.selectors.rowPositions,e,(t,n)=>t[n]??0),context:Uv(t=>t.virtualization.context),scrollPosition:Uv(t=>t.virtualization.scrollPosition)}})(),rm={initialize:CJt,use:_Jt,selectors:h8};function CJt(e){var n;return{virtualization:we({enabled:!OY,enabledForRows:!OY,enabledForColumns:!OY,renderContext:KM,props:e.layout.constructor.elements.reduce((r,o)=>(r[o],r),{}),context:{},scrollPosition:{current:hJt.EMPTY}},(n=e.initialState)==null?void 0:n.virtualization),getters:null}}function _Jt(e,t,n){const{layout:r,dimensions:{rowHeight:o,columnsTotalWidth:i=0},virtualization:{isRtl:a=!1,rowBufferPx:l=150,columnBufferPx:c=150},colspan:u,initialState:d,rows:f,range:h,columns:m,pinnedRows:g=fJt.EMPTY,pinnedColumns:b=pJt.EMPTY,onWheel:y,onTouchMove:v,onRenderContextChange:x,onScrollChange:S,scrollReset:C,renderRow:_,renderInfiniteLoadingTrigger:N}=t,E=g.bottom.length>0,[I,A]=p.useState(SJt),R=p.useRef(!1),k=p.useRef(!1),T=Xw(e,h8.renderContext),D=Xw(e,h8.enabledForRows),O=Xw(e,h8.enabledForColumns),z=Xw(e,Ql.selectors.contentHeight),F=p.useRef((d==null?void 0:d.scroll)??uNe),U=p.useRef(!1),G=p.useRef(uNe),W=p.useRef(KM),Y=kp(),B=p.useRef(void 0),$=kh(()=>EJt(a,l,c,o*15,DY*6)).current,K=p.useCallback(ve=>{mNe(ve,e.state.virtualization.renderContext)||e.set("virtualization",we({},e.state.virtualization,{renderContext:ve,scrollPosition:{current:we({},F.current)}}));const ge=Ql.selectors.dimensions(e.state).isReady,Ee=ve.firstRowIndex!==W.current.firstRowIndex||ve.lastRowIndex!==W.current.lastRowIndex;ge&&Ee&&(W.current=ve,x==null||x(ve)),G.current=F.current},[e,x]),q=no(()=>{const ve=r.refs.scroller.current;if(!ve)return;const ge=Ql.selectors.dimensions(e.state),Ee=Math.ceil(ge.contentSize.height-ge.viewportInnerSize.height),xe=Math.ceil(ge.contentSize.width-ge.viewportInnerSize.width),Ne={top:P5(ve.scrollTop,0,Ee),left:a?P5(ve.scrollLeft,-Math.abs(xe),0):P5(ve.scrollLeft,0,xe)},_e=Ne.left-F.current.left,Be=Ne.top-F.current.top,Te=_e!==0||Be!==0;F.current=Ne;const Ge=Te?xc.forDelta(_e,Be):xc.NONE,Ze=Math.abs(F.current.top-G.current.top),ht=Math.abs(F.current.left-G.current.left),Oe=Ze>=o||ht>=DY,ft=$.direction!==Ge;if(!(Oe||ft))return e.set("virtualization",we({},e.state.virtualization,{scrollPosition:{current:we({},F.current)}})),T;if(ft)switch(Ge){case xc.NONE:case xc.LEFT:case xc.RIGHT:B.current=void 0;break;default:B.current=T;break}$.direction=Ge,$.buffer=tWe(a,Ge,l,c,o*15,DY*6);const De=fNe(e,t,n,D,O),st=pNe(De,F.current,$);return mNe(st,T)||(au.flushSync(()=>{K(st)}),Y.start(1e3,q)),st}),Z=()=>{if(!Ql.selectors.dimensions(e.state).isReady&&(D||O))return;const ve=fNe(e,t,n,D,O),ge=pNe(ve,F.current,$);B.current=void 0,K(ge)},J=no(Z);i_(e,Ql.selectors.dimensions,(ve,ge)=>{ge.isReady&&Z()}),wa(()=>{R.current&&(Z(),R.current=!1)});const oe=()=>{R.current=!0},de=no(()=>{if(U.current){U.current=!1;return}const ve=q();ve&&(S==null||S(F.current,ve))}),ae=(ve={},ge)=>{var De;if(!ve.rows&&!h)return[];let Ee=T;ve.renderContext&&(Ee=ve.renderContext,Ee.firstColumnIndex=T.firstColumnIndex,Ee.lastColumnIndex=T.lastColumnIndex);const xe=!E&&ve.position===void 0||E&&ve.position==="bottom",Ne=ve.position!==void 0;let _e;switch(ve.position){case"top":_e=0;break;case"bottom":_e=g.top.length+f.length;break;case void 0:default:_e=g.top.length;break}const Be=ve.rows??f,Te=Ee.firstRowIndex,Ge=Math.min(Ee.lastRowIndex,Be.length),Ze=ve.rows?gNe(0,ve.rows.length):gNe(Te,Ge);let ht=-1;const Oe=(De=t.focusedVirtualCell)==null?void 0:De.call(t);!Ne&&Oe&&(Oe.rowIndexGe&&(Ze.push(Oe.rowIndex),ht=Oe.rowIndex));const ft=[],Qe=Ql.selectors.columnPositions(e.state,m);return Ze.forEach(st=>{const{id:vt,model:qe}=Be[st];if(ge&&!ge[vt])return;const Ye=((h==null?void 0:h.firstRowIndex)||0)+_e+st;if(u!=null&&u.enabled){const pn=b.left.length,tt=m.length-b.right.length;n.calculateColSpan(vt,pn,tt,m),b.left.length>0&&n.calculateColSpan(vt,0,b.left.length,m),b.right.length>0&&n.calculateColSpan(vt,m.length-b.right.length,m.length,m)}const mt=n.rowsMeta.rowHasAutoHeight(vt)?"auto":n.rowsMeta.getRowHeight(vt);let Et=!1;ve.position===void 0&&(Et=st===0);let vn=!1;const gt=st===Be.length-1;if(xe)if(Ne)vn=gt;else{const pn=f.length-1;st===pn&&(vn=!0)}let Fe=Ee;B.current&&st>=B.current.firstRowIndex&&st{k.current&&J()},[O,D,J]),wa(()=>{r.refs.scroller.current&&(r.refs.scroller.current.scrollLeft=0)},[r.refs.scroller,C]),RZt(T!==KM,()=>{if(S==null||S(F.current,T),k.current=!0,d!=null&&d.scroll&&r.refs.scroller.current){const ve=r.refs.scroller.current,{top:ge,left:Ee}=d.scroll,xe={top:!(ge>0),left:!(Ee>0)};!xe.left&&i&&(ve.scrollLeft=Ee,xe.left=!0,U.current=!0),!xe.top&&z&&(ve.scrollTop=ge,U.current=!0),(!xe.top||!xe.left)&&(ue.current=(Ne,_e)=>{!xe.left&&Ne&&(ve.scrollLeft=Ee,xe.left=!0,U.current=!0),!xe.top&&_e&&(ve.scrollTop=ge,xe.top=!0,U.current=!0),xe.left&&xe.top&&(ue.current=null)})}}),i_(e,Ql.selectors.dimensions,Z),wa(()=>{var ve;r.refs.scroller&&((ve=ue.current)==null||ve.call(ue,i,z))},[r.refs.scroller,i,z]);const ce=p.useRef(!0),se=dNe(ve=>{r.refs.container.current=ve;const ge=vJt(ve,e,Ee=>{Ee.width===0&&Ee.height===0&&e.state.rootSize.height!==0&&e.state.rootSize.width!==0||(e.state.rootSize=Ee,ce.current||!n.debouncedUpdateDimensions?(n.updateDimensions(ce.current),ce.current=!1):n.debouncedUpdateDimensions())});return()=>{ge==null||ge(),r.refs.container.current=null}}),me=dNe(ve=>{r.refs.scroller.current=ve;const ge={passive:!0};return ve.addEventListener("scroll",de,ge),ve.addEventListener("wheel",y,ge),ve.addEventListener("touchmove",v,ge),()=>{ve.removeEventListener("scroll",de,ge),ve.removeEventListener("wheel",y,ge),ve.removeEventListener("touchmove",v,ge),r.refs.scroller.current=null}}),fe={containerRef:se,scrollerRef:me},te=r.use(e,t,n,fe),ye=we({setPanels:A,getRows:ae,rows:t.rows},te);return we({getters:ye,setPanels:A,forceUpdateRenderContext:Z,scheduleUpdateRenderContext:oe},IJt())}function dNe(e){const t=p.useRef(void 0);return no(r=>{var o;if(!r){(o=t.current)==null||o.call(t);return}if(t.current=e(r),Ide>=19)return t.current})}function fNe(e,t,n,r,o){var h;const i=Ql.selectors.dimensions(e.state),a=t.rows,l=t.range,c=t.columns,u=n.getHiddenCellsOrigin(),d=(h=t.rows.at(-1))==null?void 0:h.id,f=c.at(-1);return{api:n,enabledForRows:r,enabledForColumns:o,autoHeight:i.autoHeight,rowBufferPx:t.virtualization.rowBufferPx,columnBufferPx:t.virtualization.columnBufferPx,leftPinnedWidth:i.leftPinnedWidth,columnsTotalWidth:i.columnsTotalWidth,viewportInnerWidth:i.viewportInnerSize.width,viewportInnerHeight:i.viewportInnerSize.height,lastRowHeight:d!==void 0?n.rowsMeta.getRowHeight(d):0,lastColumnWidth:(f==null?void 0:f.computedWidth)??0,rowsMeta:Ql.selectors.rowsMeta(e.state),columnPositions:Ql.selectors.columnPositions(e.state,t.columns),rows:a,range:l,pinnedColumns:t.pinnedColumns,columns:c,hiddenCellsOriginMap:u,virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight}}function pNe(e,t,n){const r={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.columns.length},{top:o,left:i}=t,a=Math.abs(i)+e.leftPinnedWidth;if(e.enabledForRows){let c=Math.min(hNe(e,o,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const u=e.hiddenCellsOriginMap[c];if(u){const f=Math.min(...Object.values(u));c=Math.min(c,f)}const d=e.autoHeight?c+e.rows.length:hNe(e,o+e.viewportInnerHeight);r.firstRowIndex=c,r.lastRowIndex=d}if(e.enabledForColumns){let c=0,u=e.columnPositions.length,d=!1;const[f,h]=ane({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});if(!e.virtualizeColumnsWithAutoRowHeight)for(let m=f;m=e.range.lastRowIndex);const i=P5(r-(((l=e.range)==null?void 0:l.firstRowIndex)||0),0,e.rowsMeta.positions.length);return o||e.rowsMeta.positions[i]>=t?LS(t,e.rowsMeta.positions,n):NJt(t,e.rowsMeta.positions,i,n)}function jJt(e,t,n){var c,u;const[r,o]=ane({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[i,a]=ane({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:((c=e.pinnedColumns)==null?void 0:c.left.length)??0,maxLastIndex:e.columns.length-(((u=e.pinnedColumns)==null?void 0:u.right.length)??0),bufferBefore:n.buffer.columnBefore,bufferAfter:n.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth}),l=PJt({api:e.api,firstColumnToRender:i,firstRowToRender:r,lastRowToRender:o,visibleRows:e.rows});return{firstRowIndex:r,lastRowIndex:o,firstColumnIndex:l,lastColumnIndex:a}}function LS(e,t,n=void 0,r=0,o=t.length){if(t.length<=0)return-1;if(r>=o)return r;const i=r+Math.floor((o-r)/2),a=t[i];let l;if(n!=null&&n.atStart){const c=(i===t.length-1?n.lastPosition:t[i+1])-a;l=e-ce+r)}function PJt({api:e,firstColumnToRender:t,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let i=t,a=!1;for(;!a&&i>=0;){a=!0;for(let l=n;l{throw new Error("Unimplemented: colspan feature is required")},calculateColSpan:()=>{throw new Error("Unimplemented: colspan feature is required")},getHiddenCellsOrigin:()=>{throw new Error("Unimplemented: rowspan feature is required")}}}class Zde{constructor(t){this.refs=t}refSetter(t){return n=>{n&&this.refs[t].current!==n&&(this.refs[t].current=n)}}}Le(Zde,"elements",["scroller","container"]);class Jy extends Zde{use(t,n,r,o){const{scrollerRef:i,containerRef:a}=o,l=no(this.refSetter("scrollbarVertical")),c=no(this.refSetter("scrollbarHorizontal"));t.state.virtualization.context={scrollerRef:i,containerRef:a,scrollbarVerticalRef:l,scrollbarHorizontalRef:c}}}Le(Jy,"elements",["scroller","container","content","positioner","scrollbarVertical","scrollbarHorizontal"]),Le(Jy,"selectors",{containerProps:dg(rm.selectors.context,t=>({ref:t.containerRef})),scrollerProps:dg(rm.selectors.context,Ql.selectors.autoHeight,Ql.selectors.needsHorizontalScrollbar,(t,n,r)=>({ref:t.scrollerRef,style:{overflowX:r?void 0:"hidden",overflowY:n?"hidden":void 0},role:"presentation",tabIndex:QGe?-1:void 0})),contentProps:dg(Ql.selectors.contentHeight,Ql.selectors.minimalContentHeight,Ql.selectors.columnsTotalWidth,Ql.selectors.needsHorizontalScrollbar,(t,n,r,o)=>({style:{width:o?r:"auto",flexBasis:t===0?n:t,flexShrink:0},role:"presentation"})),positionerProps:dg(rm.selectors.offsetTop,t=>({style:{transform:`translate3d(0, ${t}px, 0)`}})),scrollbarHorizontalProps:dg(rm.selectors.context,rm.selectors.scrollPosition,(t,n)=>({ref:t.scrollbarHorizontalRef,scrollPosition:n})),scrollbarVerticalProps:dg(rm.selectors.context,rm.selectors.scrollPosition,(t,n)=>({ref:t.scrollbarVerticalRef,scrollPosition:n})),scrollAreaProps:dg(rm.selectors.scrollPosition,t=>({scrollPosition:t}))});class AJt extends Jy{use(t,n,r,o){super.use(t,n,r,o);const i=t.use(Jy.selectors.containerProps),a=t.use(Jy.selectors.scrollerProps),l=t.use(Jy.selectors.contentProps),c=t.use(Jy.selectors.positionerProps),u=t.use(Jy.selectors.scrollbarVerticalProps),d=t.use(Jy.selectors.scrollbarHorizontalProps),f=t.use(Jy.selectors.scrollAreaProps);return{getContainerProps:()=>i,getScrollerProps:()=>a,getContentProps:()=>l,getPositionerProps:()=>c,getScrollbarVerticalProps:()=>u,getScrollbarHorizontalProps:()=>d,getScrollAreaProps:()=>f}}}class yNe extends Zde{use(t,n,r,o){const{scrollerRef:i,containerRef:a}=o,l=Yi(i,a);t.state.virtualization.context={mergedRef:l}}}Le(yNe,"elements",["scroller","container","content","positioner"]),Le(yNe,"selectors",{containerProps:dg(rm.selectors.context,Ql.selectors.autoHeight,Ql.selectors.needsHorizontalScrollbar,(t,n,r)=>({ref:t.mergedRef,style:{overflowX:r?void 0:"hidden",overflowY:n?"hidden":void 0,position:"relative"},role:"presentation",tabIndex:QGe?-1:void 0})),contentProps:dg(Ql.selectors.contentHeight,t=>({style:{position:"absolute",display:"inline-block",width:"100%",height:t,top:0,left:0,zIndex:-1},role:"presentation"})),positionerProps:dg(rm.selectors.offsetTop,t=>({style:{height:t}}))});const TJt={},kJt={initialize:MJt,use:RJt,selectors:TJt};function MJt(e){return{}}function RJt(e,t,n){return{getViewportPageSize:()=>{const o=Ql.selectors.dimensions(e.state);if(!o.isReady)return 0;if(t.getRowHeight){const a=rm.selectors.renderContext(e.state),l=a.lastRowIndex-a.firstRowIndex;return Math.min(l-1,t.rows.length)}const i=Math.floor(o.viewportInnerSize.height/o.rowHeight);return Math.min(i,t.rows.length)}}}const OJt={firstRowIndex:0,lastRowIndex:0},DJt={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},nWe={state:e=>e.rowSpanning,hiddenCells:e=>e.rowSpanning.caches.hiddenCells,spannedCells:e=>e.rowSpanning.caches.spannedCells,hiddenCellsOriginMap:e=>e.rowSpanning.caches.hiddenCellOriginMap},kP={initialize:LJt,use:$Jt,selectors:nWe};function LJt(e){var t;return{rowSpanning:((t=e.initialState)==null?void 0:t.rowSpanning)??{caches:DJt,processedRange:OJt}}}function $Jt(e,t,n){return{getHiddenCellsOrigin:()=>nWe.hiddenCellsOriginMap(e.state)}}const FJt=[{field:"DEFAULT_COLUMN"}],BJt={resizeThrottleMs:100,columns:FJt,dimensions:{autoHeight:!1,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,topPinnedHeight:0,bottomPinnedHeight:0},virtualization:{isRtl:!1,rowBufferPx:150,columnBufferPx:150}},bNe=[Ql,rm,sJt,kP,kJt],zJt=e=>{const t=rWe(e,BJt),n=kh(()=>new bV(bNe.map(o=>o.initialize(t)).reduce((o,i)=>Object.assign(o,i),{}))).current,r={};for(const o of bNe)Object.assign(r,o.use(n,t,r));return{store:n,api:r}};function rWe(e,t){const n=we({},e);for(const r in t)if(Object.hasOwn(t,r)){const o=t[r];o!==null&&typeof o=="object"&&!Array.isArray(o)?n[r]=rWe(e[r]??{},o):n[r]=e[r]??o}return n}const HJt=typeof window<"u"&&/jsdom|HappyDOM/.test(window.navigator.userAgent),S4=!HJt,VJt=(e,t)=>{const{disableVirtualization:n,autoHeight:r}=t;return we({},e,{virtualization:{enabled:!n&&S4,enabledForColumns:!n&&S4,enabledForRows:!n&&!r&&S4,renderContext:KM}})};function UJt(e,t){const{autoHeight:n,disableVirtualization:r}=t,o=c=>{const{virtualizer:u}=e.current;c&&(c=S4);const d=u.store.getSnapshot();d.virtualization.enabled===c&&d.virtualization.enabledForRows===c&&d.virtualization.enabledForColumns===c||u.store.set("virtualization",we({},u.store.state.virtualization,{enabled:c,enabledForColumns:c,enabledForRows:c&&!n}))};zo(e,{unstable_setVirtualization:o,unstable_setColumnVirtualization:c=>{const{virtualizer:u}=e.current;c&&(c=S4),u.store.getSnapshot().virtualization.enabledForColumns!==c&&u.store.set("virtualization",we({},u.store.state.virtualization,{enabledForColumns:c}))}},"public");const l=()=>{const{virtualizer:c}=e.current;c==null||c.api.scheduleUpdateRenderContext()};e.current.register("private",{updateRenderContext:l}),is(e,"sortedRowsSet",l),is(e,"paginationModelChange",l),is(e,"columnsChange",l),p.useEffect(()=>{e.current.virtualizer&&o(!t.disableVirtualization)},[e,r,n])}const TV=Ys(e=>e.virtualization);jr(TV,e=>e.enabled);const GJt=jr(TV,e=>e.enabledForColumns);jr(TV,e=>e.enabledForRows);const sne=jr(TV,e=>e.renderContext),WJt=Ys(e=>e.virtualization.renderContext.firstColumnIndex),qJt=Ys(e=>e.virtualization.renderContext.lastColumnIndex),KJt=Zi(WJt,qJt,(e,t)=>({firstColumnIndex:e,lastColumnIndex:t}));function YJt(e){return JSON.stringify([e.filterModel,e.sortModel,e.start,e.end])}class XJt{constructor({ttl:t=3e5,getKey:n=YJt}){this.cache={},this.ttl=t,this.getKey=n}set(t,n){const r=this.getKey(t),o=Date.now()+this.ttl;this.cache[r]={value:n,expiry:o}}get(t){const n=this.getKey(t),r=this.cache[n];if(r){if(Date.now()>r.expiry){delete this.cache[n];return}return r.value}}clear(){this.cache={}}}class ZJt extends Error{constructor(t){super(t.message),this.name="GridGetRowsError",this.params=t.params,this.cause=t.cause}}class JJt extends Error{constructor(t){super(t.message),this.name="GridUpdateRowError",this.params=t.params,this.cause=t.cause}}const QJt=(e,t)=>{const{classes:n}=e,r={root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]};return qn(r,ni,n)},oWe="calc(max(var(--DataGrid-scrollbarSize), 14px))",Jde=Si("div")({position:"absolute",display:"inline-block",zIndex:60,"&:hover":{zIndex:70},"--size":oWe}),eQt=Si(Jde)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-headersTotalHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-headersTotalHeight)",right:0}),tQt=Si(Jde)({width:"calc(var(--DataGrid-hasScrollX) * (100% - var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:0}),nQt=Si(Jde)({width:"var(--size)",height:"var(--size)",right:0,bottom:0,overflow:"scroll","@media print":{display:"none"}}),vNe=so(function(t,n){const r=Vp(),o=br(),i=p.useRef(!1),a=p.useRef(0),l=p.useRef(null),c=QJt(o,t.position),u=Wn(r,bl),d=t.position==="vertical"?"height":"width",f=t.position==="vertical"?"scrollTop":"scrollLeft",h=t.position==="vertical"?"top":"left",m=t.position==="horizontal"?u.minimumSize.width:u.minimumSize.height-u.headersTotalHeight,g=no(()=>{const x=l.current,S=t.scrollPosition.current;if(x&&S[h]!==a.current){if(a.current=S[h],i.current){i.current=!1;return}i.current=!0,x[f]=t.scrollPosition.current[h]}}),b=no(()=>{const x=r.current.virtualScrollerRef.current,S=l.current;if(S){if(i.current){i.current=!1;return}i.current=!0,x[f]=S[f]}});uV(()=>{const x=r.current.virtualScrollerRef.current,S=l.current,C={passive:!0};return x.addEventListener("scroll",g,C),S.addEventListener("scroll",b,C),()=>{x.removeEventListener("scroll",g,C),S.removeEventListener("scroll",b,C)}});const y=t.position==="vertical"?eQt:tQt,v=p.useMemo(()=>({[d]:`${m}px`}),[d,m]);return s.jsx(y,{ref:Yi(n,l),className:c.root,tabIndex:-1,"aria-hidden":"true",onFocus:x=>{x.target.blur()},children:s.jsx("div",{className:c.content,style:v})})}),rQt=e=>{const{classes:t,position:n}=e,r={root:["scrollShadow",`scrollShadow--${n}`]};return qn(r,ni,t)},oQt=Si("div",{name:"MuiDataGrid",slot:"ScrollShadow",overridesResolver:(e,t)=>[t.root,t[e.position]]})(({theme:e})=>({position:"absolute",inset:0,pointerEvents:"none",transition:xr.transition(["box-shadow"],{duration:xr.transitions.duration.short}),"--length":e.palette.mode==="dark"?"8px":"6px","--length-inverse":"calc(var(--length) * -1)","--opacity":e.palette.mode==="dark"?"0.7":"0.18","--blur":"var(--length)","--spread":"calc(var(--length) * -1)","--color":"0, 0, 0","--color-start":"rgba(var(--color), calc(var(--hasScrollStart) * var(--opacity)))","--color-end":"rgba(var(--color), calc(var(--hasScrollEnd) * var(--opacity)))",variants:[{props:{position:"vertical"},style:{top:"var(--DataGrid-topContainerHeight)",bottom:"calc(var(--DataGrid-bottomContainerHeight) + var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))",boxShadow:"inset 0 var(--length) var(--blur) var(--spread) var(--color-start), inset 0 var(--length-inverse) var(--blur) var(--spread) var(--color-end)"}},{props:{position:"horizontal"},style:{left:"var(--DataGrid-leftPinnedWidth)",right:"calc(var(--DataGrid-rightPinnedWidth) + var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",boxShadow:"inset var(--length) 0 var(--blur) var(--spread) var(--color-start), inset var(--length-inverse) 0 var(--blur) var(--spread) var(--color-end)"}}]}));function xNe(e){var y,v,x;const{position:t}=e,r={classes:br().classes,position:t},o=rQt(r),i=p.useRef(null),a=Vp(),l=Wn(a,VUe),c=Wn(a,UUe),u=Wn(a,WI),d=Wn(a,$de),f=t==="vertical"?c&&((y=u==null?void 0:u.bottom)==null?void 0:y.length)>0:l&&((v=d==null?void 0:d.right)==null?void 0:v.length)!==void 0&&((x=d==null?void 0:d.right)==null?void 0:x.length)>0,h=af(),m=p.useCallback(S=>{var k,T,D,O,z,F;if(!i.current)return;const C=Math.abs(Math.round(S)),_=bl(a),N=Math.round(_.contentSize[t==="vertical"?"height":"width"]-_.viewportInnerSize[t==="vertical"?"height":"width"]),E=t==="vertical"?((k=u==null?void 0:u.top)==null?void 0:k.length)>0:((T=d==null?void 0:d.left)==null?void 0:T.length)!==void 0&&((D=d==null?void 0:d.left)==null?void 0:D.length)>0,I=t==="vertical"?((O=u==null?void 0:u.bottom)==null?void 0:O.length)>0:((z=d==null?void 0:d.right)==null?void 0:z.length)!==void 0&&((F=d==null?void 0:d.right)==null?void 0:F.length)>0,A=h?C0,R=h?C>0:C{m(S[t==="vertical"?"top":"left"])},b=()=>{var S,C;t==="horizontal"&&m(((C=(S=a.current.virtualScrollerRef)==null?void 0:S.current)==null?void 0:C.scrollLeft)||0)};return Ir(a,"scrollPositionChange",g),Ir(a,"columnResizeStop",b),p.useEffect(()=>{var S,C,_,N;m((t==="horizontal"?(C=(S=a.current.virtualScrollerRef)==null?void 0:S.current)==null?void 0:C.scrollLeft:(N=(_=a.current.virtualScrollerRef)==null?void 0:_.current)==null?void 0:N.scrollTop)??0)},[m,a,t]),s.jsx(oQt,{className:o.root,ownerState:r,ref:i,style:{"--hasScrollStart":0,"--hasScrollEnd":f?"1":"0"}})}const iQt=Si("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant"&&e!=="right"})(({overlayType:e,loadingOverlayVariant:t,right:n})=>t!=="skeleton"?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,right:`${n}px`,width:0,height:0,zIndex:e==="loadingOverlay"?5:4}:{}),aQt=Si("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant"})({}),sQt=e=>{const{classes:t}=e;return qn({root:["overlayWrapper"],inner:["overlayWrapperInner"]},ni,t)};function lQt(e){const t=Po(),n=br(),r=Wn(t,bl);let o=Math.max(r.viewportOuterSize.height-r.topContainerHeight-r.bottomContainerHeight-(r.hasScrollX?r.scrollbarSize:0),0);o===0&&(o=QUe);const i=sQt(we({},e,{classes:n.classes}));return s.jsx(iQt,we({className:i.root},e,{right:r.columnsTotalWidth-r.viewportOuterSize.width,children:s.jsx(aQt,we({className:i.inner,style:{height:o,width:r.viewportOuterSize.width}},e))}))}const I5=(e,t)=>vO(e),iWe=(e,t)=>Wn(e,vO),cQt=jr(mh,sne,vO,oc,(e,t,n,r)=>{if(!e)return!1;const o=n.rowIdToIndexMap.get(e.id),i=r.slice(t.firstColumnIndex,t.lastColumnIndex).findIndex(l=>l.field===e.field);return!(o!==void 0&&i!==-1&&o>=t.firstRowIndex&&o<=t.lastRowIndex)}),wNe=Zi(cQt,oc,vO,mh,(e,t,n,r)=>{if(!e)return null;const o=n.rowIdToIndexMap.get(r.id);if(o===void 0)return null;const i=t.findIndex(a=>a.field===r.field);return i===-1?null:we({},r,{rowIndex:o,columnIndex:i})}),BB={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:" ",columnBufferPx:150,columnFilterDebounceMs:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableRowSelectionExcludeModel:!1,disableVirtualization:!1,editMode:zb.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"error",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rows:[],rowSelection:!0,rowSpacingType:"margin",rowSpanning:!1,showCellVerticalBorder:!1,showColumnVerticalBorder:!1,showToolbar:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,virtualizeColumnsWithAutoRowHeight:!1,tabNavigation:"none"};function Ro(e){"@babel/helpers - typeof";return Ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ro(e)}function uQt(e,t){if(Ro(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ro(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function L_(e){var t=uQt(e,"string");return Ro(t)=="symbol"?t:t+""}const dQt=e=>{const t=p.useRef({}),n=p.useRef(!1),r=p.useCallback(f=>{n.current||!f||(n.current=!0,Object.values(f.appliers).forEach(h=>{h()}),n.current=!1)},[]),o=p.useCallback((f,h,m)=>{t.current[f]||(t.current[f]={processors:new Map,processorsAsArray:[],appliers:{},processorsUpdated:!1});const g=t.current[f];return g.processors.get(h)!==m&&(g.processors.set(h,m),g.processorsAsArray=Array.from(t.current[f].processors.values()).filter(y=>y!==null),g.processorsUpdated=!0),()=>{t.current[f].processors.set(h,null),t.current[f].processorsAsArray=Array.from(t.current[f].processors.values()).filter(y=>y!==null)}},[]),i=p.useCallback((f,h,m)=>(t.current[f]||(t.current[f]={processors:new Map,processorsAsArray:[],appliers:{},processorsUpdated:!1}),t.current[f].appliers[h]=m,()=>{const g=t.current[f].appliers,b=sr(g,[h].map(L_));t.current[f].appliers=b}),[]),a=p.useCallback(f=>{r(t.current[f])},[r]),l=p.useCallback(()=>{for(const f in t.current){if(!Object.prototype.hasOwnProperty.call(t.current,f))continue;const h=t.current[f];h.processorsUpdated&&(h.processorsUpdated=!1,r(h))}},[r]),c=p.useCallback((...f)=>{const[h,m,g]=f;if(!t.current[h])return m;const b=t.current[h].processorsAsArray;let y=m;for(let v=0;v{const o=p.useRef(null),i=p.useRef(`mui-${Math.round(Math.random()*1e9)}`),a=p.useCallback(()=>{o.current=e.current.registerPipeProcessor(t,i.current,n)},[e,n,t]);kj(()=>{r&&a()});const l=p.useRef(!0);p.useEffect(()=>(l.current?l.current=!1:r&&a(),()=>{o.current&&(o.current(),o.current=null)}),[a,r])},Qde=(e,t,n)=>{const r=p.useRef(null),o=p.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=p.useCallback(()=>{r.current=e.current.registerPipeApplier(t,o.current,n)},[e,n,t]);kj(()=>{i()});const a=p.useRef(!0);p.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},fQt=(e,t,n)=>{const r=zKt(n),o=GI(n),i=KI(n),a=Math.min(i.enabled?i.paginationModel.pageSize:o,o);return we({},e,{rowsMeta:{currentPageTotalHeight:a*r,positions:Array.from({length:a},(l,c)=>c*r),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0}})},pQt=(e,t)=>{const n=e.current.virtualizer,{getRowHeight:r,setLastMeasuredRowIndex:o,storeRowHeightMeasurement:i,resetRowHeights:a,hydrateRowsMeta:l,observeRowHeight:c,rowHasAutoHeight:u,getRowHeightEntry:d,getLastMeasuredRowIndex:f}=n.api.rowsMeta;Qde(e,"rowHeight",l);const h={unstable_getRowHeight:r,unstable_setLastMeasuredRowIndex:o,unstable_storeRowHeightMeasurement:i,resetRowHeights:a},m={hydrateRowsMeta:l,observeRowHeight:c,rowHasAutoHeight:u,getRowHeightEntry:d,getLastMeasuredRowIndex:f};zo(e,h,"public"),zo(e,m,"private")},hQt=jr(oc,Aj,(e,t)=>{const n=e.length;return n===0?0:P2(t[n-1]+e[n-1].computedWidth,1)}),mQt=()=>rce((e,t,n,r,o)=>we({},e,{headerHeight:t,groupHeaderHeight:n,headerFilterHeight:r,headersTotalHeight:o}),{maxSize:1});function gQt(){var $,K;const e=af(),t=br(),n=Vp(),{listView:r}=t,o=Wn(n,oc),i=Wn(n,WI),a=xV(n),l=Wn(n,bO),c=p.useCallback(q=>l.has(q)&&n.current.isRowSelectable(q),[l,n]),u=iWe(n),d=Wn(n,OYt),f=Wn(n,WUe),h=Wn(n,GUe),{autoHeight:m}=t,g=r,b=Wn(n,mO),y=eGe(t.rowHeight,BB.rowHeight),v=Math.floor(y*b),x=Math.floor(t.columnHeaderHeight*b),S=Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*b),C=Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*b),_=Wn(n,hQt),N=AV(n,t),E=a.left.reduce((q,Z)=>q+Z.computedWidth,0),I=a.right.reduce((q,Z)=>q+Z.computedWidth,0),A=XGe(n,t),R={rowHeight:v,headerHeight:x,columnsTotalWidth:_,leftPinnedWidth:E,rightPinnedWidth:I,topPinnedHeight:N,bottomPinnedHeight:0,autoHeight:m,minimalContentHeight:QUe,scrollbarSize:t.scrollbarSize},k=kh(mQt).current,T=Wn(n,GI),D=Wn(n,KI),O=Math.min(D.enabled?D.paginationModel.pageSize:T,T),{getRowHeight:z,getEstimatedRowHeight:F,getRowSpacing:U}=t,G=t.slots.row,W=($=t.slotProps)==null?void 0:$.row;Wn(n,wNe);const Y=kh(()=>new AJt({container:n.current.mainElementRef,scroller:n.current.virtualScrollerRef,scrollbarVertical:n.current.virtualScrollbarVerticalRef,scrollbarHorizontal:n.current.virtualScrollbarHorizontalRef})).current,B=zJt({layout:Y,dimensions:R,virtualization:{isRtl:e,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx},colspan:{enabled:d,getColspan:p.useCallback((q,Z)=>{if(typeof Z.colSpan=="function"){const J=n.current.getRow(q),oe=n.current.getRowValue(J,Z);return Z.colSpan(oe,J,Z,n)??0}return Z.colSpan??1},[n])},initialState:{scroll:(K=t.initialState)==null?void 0:K.scroll,rowSpanning:n.current.state.rowSpanning,virtualization:n.current.state.virtualization},rows:u.rows,range:u.range,rowCount:O,columns:o,pinnedRows:i,pinnedColumns:a,disableHorizontalScroll:r,disableVerticalScroll:A.overlayType==="noColumnsOverlay"||A.loadingOverlayVariant==="skeleton",getRowHeight:p.useMemo(()=>{if(z)return q=>z(we({},q,{densityFactor:b}))},[z,b]),getEstimatedRowHeight:p.useMemo(()=>F?q=>F(we({},q,{densityFactor:b})):void 0,[F,b]),getRowSpacing:p.useMemo(()=>U?q=>{const Z=u.rowIdToIndexMap.get(q.id)??-1,J={isFirstVisible:Z===0,isLastVisible:Z===u.rows.length-1,indexRelativeToCurrentPage:Z};return U(we({},q,J,{indexRelativeToCurrentPage:n.current.getRowIndexRelativeToVisibleRows(q.id)}))}:void 0,[n,U,u.rows,u.rowIdToIndexMap]),applyRowHeight:no((q,Z)=>n.current.unstable_applyPipeProcessors("rowHeight",q,Z)),virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight,focusedVirtualCell:no(()=>wNe(n)),resizeThrottleMs:t.resizeThrottleMs,onResize:no(q=>n.current.publishEvent("resize",q)),onWheel:no(q=>{n.current.publishEvent("virtualScrollerWheel",{},q)}),onTouchMove:no(q=>{n.current.publishEvent("virtualScrollerTouchMove",{},q)}),onRenderContextChange:no(q=>{n.current.publishEvent("renderedRowsIntervalChange",q)}),onScrollChange:p.useCallback((q,Z)=>{n.current.publishEvent("scrollPositionChange",{top:q.top,left:q.left,renderContext:Z})},[n]),scrollReset:g,renderRow:p.useCallback(q=>s.jsx(G,we({row:q.model,rowId:q.id,index:q.rowIndex,selected:c(q.id),offsetLeft:q.offsetLeft,columnsTotalWidth:_,rowHeight:q.baseRowHeight,pinnedColumns:a,visibleColumns:o,firstColumnIndex:q.firstColumnIndex,lastColumnIndex:q.lastColumnIndex,focusedColumnIndex:q.focusedColumnIndex,isFirstVisible:q.isFirstVisible,isLastVisible:q.isLastVisible,isNotVisible:q.isVirtualFocusRow,showBottomBorder:q.showBottomBorder,scrollbarWidth:f,gridHasFiller:h},W),q.id),[_,h,c,a,G,W,f,o]),renderInfiniteLoadingTrigger:p.useCallback(q=>{var Z,J;return(J=(Z=n.current).getInfiniteLoadingTriggerElement)==null?void 0:J.call(Z,{lastRowId:q})},[n])});return kj(()=>{n.current.store.state.dimensions=k(B.store.state.dimensions,x,S,C,N),n.current.store.state.rowsMeta=B.store.state.rowsMeta,n.current.store.state.virtualization=B.store.state.virtualization}),i_(B.store,Ql.selectors.dimensions,(q,Z)=>{Z.isReady&&n.current.setState(J=>we({},J,{dimensions:k(Z,x,S,C,N)}))}),i_(B.store,Ql.selectors.rowsMeta,(q,Z)=>{Z!==n.current.state.rowsMeta&&n.current.setState(J=>we({},J,{rowsMeta:Z}))}),i_(B.store,rm.selectors.store,(q,Z)=>{Z.renderContext!==KM&&Z!==n.current.state.virtualization&&n.current.setState(J=>we({},J,{virtualization:Z}))}),n.current.register("private",{virtualizer:B}),pQt(n),B}const yQt=e=>{const{classes:t,hasScrollX:n,hasPinnedRight:r,loadingOverlayVariant:o,overlayType:i}=e;return qn({root:["main",r&&"main--hasPinnedRight",(o==="skeleton"||i==="noColumnsOverlay")&&"main--hiddenContent"],scroller:["virtualScroller",n&&"virtualScroller--hasScrollX"]},ni,t)},bQt=Si("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.virtualScroller,n.hasScrollX&&t["virtualScroller--hasScrollX"]]}})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0}),vQt=e=>e.current.state.dimensions.rightPinnedWidth>0;function xQt(e){var N,E,I,A;const t=Vp(),n=br(),r=Wn(t,UUe),o=Wn(t,VUe),i=Wn(t,vQt),a=Wn(t,GKt),{overlayType:l,loadingOverlayVariant:c}=XGe(t,n),u=(N=n.slots)==null?void 0:N[l],d={classes:n.classes,hasScrollX:o,hasPinnedRight:i,overlayType:l,loadingOverlayVariant:c},f=yQt(d),h=gQt().api.getters,{getContainerProps:m,getScrollerProps:g,getContentProps:b,getPositionerProps:y,getScrollbarVerticalProps:v,getScrollbarHorizontalProps:x,getRows:S,getScrollAreaProps:C}=h,_=S(void 0,Sc(t));return s.jsxs(zZt,we({className:f.root},m(),{ownerState:d,children:[s.jsx(QL,we({scrollDirection:"left"},C())),s.jsx(QL,we({scrollDirection:"right"},C())),s.jsx(QL,we({scrollDirection:"up"},C())),s.jsx(QL,we({scrollDirection:"down"},C())),s.jsxs(bQt,we({className:f.scroller},g(),{ownerState:d,children:[s.jsxs(UZt,{children:[!n.listView&&s.jsx($Zt,{}),s.jsx(n.slots.pinnedRows,{position:"top",virtualScroller:h})]}),l&&s.jsx(lQt,{overlayType:l,loadingOverlayVariant:c,children:s.jsx(u,we({},(E=n.slotProps)==null?void 0:E[l]))}),s.jsx(qZt,we({},b(),{children:s.jsxs(nJt,we({role:"rowgroup"},y(),{children:[_,s.jsx(n.slots.detailPanels,{virtualScroller:h})]}))})),a&&s.jsx(QZt,{rowsLength:_.length}),s.jsx(n.slots.bottomContainer,{children:s.jsx(n.slots.pinnedRows,{position:"bottom",virtualScroller:h})})]})),o&&s.jsxs(p.Fragment,{children:[((I=n.pinnedColumnsSectionSeparator)==null?void 0:I.endsWith("shadow"))&&s.jsx(xNe,{position:"horizontal"}),s.jsx(vNe,we({position:"horizontal"},x()))]}),r&&s.jsxs(p.Fragment,{children:[((A=n.pinnedRowsSectionSeparator)==null?void 0:A.endsWith("shadow"))&&s.jsx(xNe,{position:"vertical"}),s.jsx(vNe,we({position:"vertical"},v()))]}),o&&r&&s.jsx(nQt,{"aria-hidden":"true"}),e.children]}))}function wQt(){var t;const e=br();return e.hideFooter?null:s.jsx(e.slots.footer,we({},(t=e.slotProps)==null?void 0:t.footer))}let LY;function efe(){return LY===void 0&&document.createElement("div").focus({get preventScroll(){return LY=!0,!1}}),LY}function SQt({defaultSlots:e,slots:t}){const n=t;if(!n||Object.keys(n).length===0)return e;const r=we({},e);return Object.keys(n).forEach(o=>{const i=o;n[i]!==void 0&&(r[i]=n[i])}),r}const CQt=e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null},_Qt=e=>e===CGe||CQt(e)!==null,aWe=(e,t)=>{if(e)if(t){if(e===ii.LEFT)return"right";if(e===ii.RIGHT)return"left"}else{if(e===ii.LEFT)return"left";if(e===ii.RIGHT)return"right"}};function kV(e,t,n,r){const o=aWe(n,t);return!o||r===void 0||(e[o]=r),e}const jQt=["column","row","rowId","rowNode","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","showRightBorder","showLeftBorder","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],NQt=["changeReason","unstable_updateValueOnRender"];ii.LEFT+"",ub.LEFT,ii.RIGHT+"",ub.RIGHT,ii.NONE+"",ii.VIRTUAL+"";const EQt=e=>{const{align:t,showLeftBorder:n,showRightBorder:r,pinnedPosition:o,isEditable:i,isSelected:a,isSelectionMode:l,classes:c}=e,u={root:["cell",`cell--text${_n(t)}`,a&&"selected",i&&"cell--editable",n&&"cell--withLeftBorder",r&&"cell--withRightBorder",o===ii.LEFT&&"cell--pinnedLeft",o===ii.RIGHT&&"cell--pinnedRight",l&&!i&&"cell--selectionMode"]};return qn(u,ni,c)},PQt=so(function(t,n){var st,vt;const{column:r,row:o,rowId:i,rowNode:a,align:l,colIndex:c,width:u,className:d,style:f,colSpan:h,disableDragEvents:m,isNotVisible:g,pinnedOffset:b,pinnedPosition:y,showRightBorder:v,showLeftBorder:x,onClick:S,onDoubleClick:C,onMouseDown:_,onMouseUp:N,onMouseOver:E,onKeyDown:I,onKeyUp:A,onDragEnter:R,onDragOver:k}=t,T=sr(t,jQt),D=Vp(),O=br(),z=af(),F=r.field,U=Wn(D,oJt,{rowId:i,field:F}),W=wV().hooks.useCellAggregationResult(i,F),Y=U?ja.Edit:ja.View,{value:B,formattedValue:$}=W||{},K=D.current.getCellParamsForRow(i,F,o,{colDef:r,cellMode:Y,rowNode:a,tabIndex:Wn(D,()=>{const qe=qde(D);return qe&&qe.field===F&&qe.id===i?0:-1}),hasFocus:Wn(D,()=>{const qe=mh(D);return(qe==null?void 0:qe.id)===i&&qe.field===F}),value:B,formattedValue:$});K.api=D.current,Wn(D,()=>D.current.isCellEditable(K));const q=Wn(D,()=>D.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:i,field:F})),Z=D.current.virtualizer.store,J=Xw(Z,kP.selectors.hiddenCells),oe=Xw(Z,kP.selectors.spannedCells),{hasFocus:de,isEditable:ae=!1,value:ue}=K,ce=(Y==="view"||!ae)&&r.type!=="actions"?K.tabIndex:-1,{classes:se,getCellClassName:me}=O,te=[Wn(D,()=>D.current.unstable_applyPipeProcessors("cellClassName",[],{id:i,field:F}).filter(Boolean).join(" "))];r.cellClassName&&te.push(typeof r.cellClassName=="function"?r.cellClassName(K):r.cellClassName),r.display==="flex"&&te.push(He["cell--flex"]),me&&te.push(me(K));const ye=K.formattedValue??ue,ve=p.useRef(null),ge=Yi(n,ve),Ee=O.cellSelection??!1,xe={align:l,showLeftBorder:x,showRightBorder:v,isEditable:ae,classes:O.classes,pinnedPosition:y,isSelected:q,isSelectionMode:Ee},Ne=EQt(xe),_e=p.useCallback(qe=>Ye=>{const mt=D.current.getCellParams(i,F||"");D.current.publishEvent(qe,mt,Ye),N&&N(Ye)},[D,F,N,i]),Be=p.useCallback(qe=>Ye=>{const mt=D.current.getCellParams(i,F||"");D.current.publishEvent(qe,mt,Ye),_&&_(Ye)},[D,F,_,i]),Te=p.useCallback((qe,Ye)=>mt=>{if(!D.current.getRow(i))return;const Et=D.current.getCellParams(i,F||"");D.current.publishEvent(qe,Et,mt),Ye&&Ye(mt)},[D,F,i]),Ge=((st=J[i])==null?void 0:st[c])??!1,Ze=((vt=oe[i])==null?void 0:vt[c])??1,ht=p.useMemo(()=>{if(g)return{padding:0,opacity:0,width:0,height:0,border:0};const qe=kV(we({"--width":`${u}px`},f),z,y,b),Ye=y===ii.LEFT,mt=y===ii.RIGHT;return Ze>1&&(qe.height=`calc(var(--height) * ${Ze})`,qe.zIndex=10,(Ye||mt)&&(qe.zIndex=40)),qe},[u,g,f,b,y,z,Ze]);if(wa(()=>{if(!de||Y===ja.Edit)return;const qe=lc(D.current.rootElementRef.current);if(ve.current&&!ve.current.contains(qe.activeElement)){const mt=ve.current.querySelector('[tabindex="0"]')||ve.current;if(efe())mt.focus({preventScroll:!0});else{const Et=D.current.getScrollPosition();mt.focus(),D.current.scroll(Et)}}},[de,Y,D]),Ge)return s.jsx("div",{"data-colindex":c,role:"presentation",style:we({width:"var(--width)"},ht)});let Oe=T.onFocus,ft,Qe;if(U===null&&r.renderCell&&(ft=r.renderCell(K)),U!==null&&r.renderEditCell){const qe=D.current.getRowWithUpdatedValues(i,r.field),Ye=sr(U,NQt),mt=r.valueFormatter?r.valueFormatter(U.value,qe,r,D):K.formattedValue,Et=we({},K,{row:qe,formattedValue:mt},Ye);ft=r.renderEditCell(Et),te.push(He["cell--editing"]),te.push(se==null?void 0:se["cell--editing"])}if(ft===void 0){const qe=ye==null?void 0:ye.toString();ft=qe,Qe=qe}const De=m?null:{onDragEnter:Te("cellDragEnter",R),onDragOver:Te("cellDragOver",k)};return s.jsx("div",we({className:Ae(Ne.root,te,d),role:"gridcell","data-field":F,"data-colindex":c,"aria-colindex":c+1,"aria-colspan":h,"aria-rowspan":Ze,style:ht,title:Qe,tabIndex:ce,onClick:Te("cellClick",S),onDoubleClick:Te("cellDoubleClick",C),onMouseOver:Te("cellMouseOver",E),onMouseDown:Be("cellMouseDown"),onMouseUp:_e("cellMouseUp"),onKeyDown:Te("cellKeyDown",I),onKeyUp:Te("cellKeyUp",A)},De,T,{onFocus:Oe,ref:ge,children:ft}))}),IQt=p1(PQt),AQt=["field","type","align","width","height","empty","style","className"],SNe="1.3em",TQt="1.2em",CNe=[40,80],kQt={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},MQt=e=>{const{align:t,classes:n,empty:r}=e,o={root:["cell","cellSkeleton",`cell--text${t?_n(t):"Left"}`,r&&"cellEmpty"]};return qn(o,ni,n)},RQt=AYt(12345);function OQt(e){const{field:t,type:n,align:r,width:o,height:i,empty:a=!1,style:l,className:c}=e,u=sr(e,AQt),d=br(),f={classes:d.classes,align:r,empty:a},h=MQt(f),m=p.useMemo(()=>{if(n==="boolean"||n==="actions")return{variant:"circular",width:SNe,height:SNe};const[b,y]=n?kQt[n]??CNe:CNe;return{variant:"text",width:`${Math.round(RQt(b,y))}%`,height:TQt}},[n]);return s.jsx("div",we({"data-field":t,className:Ae(h.root,c),style:we({height:i,maxWidth:o,minWidth:o},l)},u,{children:!a&&s.jsx(d.slots.baseSkeleton,we({},m))}))}const DQt=p1(OQt),LQt=10,e6=-5,zN=1,_Ne={width:3,rx:1.5,x:10.5},$Qt="/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */",FQt=e=>e.current.state.dimensions.isReady?e.current.state.dimensions.hasScrollX&&(!e.current.state.dimensions.hasScrollY||e.current.state.dimensions.scrollbarSize===0):e.current.state.dimensions.scrollbarSize===0,BQt=qt("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${He.autoHeight}`]:t.autoHeight},{[`&.${He.autosizing}`]:t.autosizing},{[`&.${He["root--densityStandard"]}`]:t["root--densityStandard"]},{[`&.${He["root--densityComfortable"]}`]:t["root--densityComfortable"]},{[`&.${He["root--densityCompact"]}`]:t["root--densityCompact"]},{[`&.${He["root--disableUserSelection"]}`]:t["root--disableUserSelection"]},{[`&.${He["root--noToolbar"]}`]:t["root--noToolbar"]},{[`&.${He.withVerticalBorder}`]:t.withVerticalBorder},{[`& .${He.actionsCell}`]:t.actionsCell},{[`& .${He.booleanCell}`]:t.booleanCell},{[`& .${He.cell}`]:t.cell},{[`& .${He["cell--editable"]}`]:t["cell--editable"]},{[`& .${He["cell--editing"]}`]:t["cell--editing"]},{[`& .${He["cell--flex"]}`]:t["cell--flex"]},{[`& .${He["cell--pinnedLeft"]}`]:t["cell--pinnedLeft"]},{[`& .${He["cell--pinnedRight"]}`]:t["cell--pinnedRight"]},{[`& .${He["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${He["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${He["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${He["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${He["cell--selectionMode"]}`]:t["cell--selectionMode"]},{[`& .${He["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${He["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${He["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${He["cell--withLeftBorder"]}`]:t["cell--withLeftBorder"]},{[`& .${He["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${He.cellCheckbox}`]:t.cellCheckbox},{[`& .${He.cellEmpty}`]:t.cellEmpty},{[`& .${He.cellOffsetLeft}`]:t.cellOffsetLeft},{[`& .${He.cellSkeleton}`]:t.cellSkeleton},{[`& .${He.checkboxInput}`]:t.checkboxInput},{[`& .${He.columnHeader}`]:t.columnHeader},{[`& .${He["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${He["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${He["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${He["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${He["columnHeader--emptyGroup"]}`]:t["columnHeader--emptyGroup"]},{[`& .${He["columnHeader--filledGroup"]}`]:t["columnHeader--filledGroup"]},{[`& .${He["columnHeader--filtered"]}`]:t["columnHeader--filtered"]},{[`& .${He["columnHeader--last"]}`]:t["columnHeader--last"]},{[`& .${He["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${He["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${He["columnHeader--pinnedLeft"]}`]:t["columnHeader--pinnedLeft"]},{[`& .${He["columnHeader--pinnedRight"]}`]:t["columnHeader--pinnedRight"]},{[`& .${He["columnHeader--siblingFocused"]}`]:t["columnHeader--siblingFocused"]},{[`& .${He["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${He["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${He["columnHeader--withLeftBorder"]}`]:t["columnHeader--withLeftBorder"]},{[`& .${He["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${He.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${He.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${He.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${He.columnHeaderTitleContainerContent}`]:t.columnHeaderTitleContainerContent},{[`& .${He.columnSeparator}`]:t.columnSeparator},{[`& .${He["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${He["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${He["columnSeparator--sideLeft"]}`]:t["columnSeparator--sideLeft"]},{[`& .${He["columnSeparator--sideRight"]}`]:t["columnSeparator--sideRight"]},{[`& .${He["container--bottom"]}`]:t["container--bottom"]},{[`& .${He["container--top"]}`]:t["container--top"]},{[`& .${He.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${He["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},{[`& .${He.editBooleanCell}`]:t.editBooleanCell},{[`& .${He.filterIcon}`]:t.filterIcon},{[`& .${He["filler--borderBottom"]}`]:t["filler--borderBottom"]},{[`& .${He["filler--pinnedLeft"]}`]:t["filler--pinnedLeft"]},{[`& .${He["filler--pinnedRight"]}`]:t["filler--pinnedRight"]},{[`& .${He.groupingCriteriaCell}`]:t.groupingCriteriaCell},{[`& .${He.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${He.groupingCriteriaCellToggle}`]:t.groupingCriteriaCellToggle},{[`& .${He.headerFilterRow}`]:t.headerFilterRow},{[`& .${He.iconSeparator}`]:t.iconSeparator},{[`& .${He.menuIcon}`]:t.menuIcon},{[`& .${He.menuIconButton}`]:t.menuIconButton},{[`& .${He.menuList}`]:t.menuList},{[`& .${He.menuOpen}`]:t.menuOpen},{[`& .${He.overlayWrapperInner}`]:t.overlayWrapperInner},{[`& .${He.pinnedRows}`]:t.pinnedRows},{[`& .${He["pinnedRows--bottom"]}`]:t["pinnedRows--bottom"]},{[`& .${He["pinnedRows--top"]}`]:t["pinnedRows--top"]},{[`& .${He.row}`]:t.row},{[`& .${He["row--borderBottom"]}`]:t["row--borderBottom"]},{[`& .${He["row--detailPanelExpanded"]}`]:t["row--detailPanelExpanded"]},{[`& .${He["row--dragging"]}`]:t["row--dragging"]},{[`& .${He["row--dynamicHeight"]}`]:t["row--dynamicHeight"]},{[`& .${He["row--editable"]}`]:t["row--editable"]},{[`& .${He["row--editing"]}`]:t["row--editing"]},{[`& .${He["row--firstVisible"]}`]:t["row--firstVisible"]},{[`& .${He["row--lastVisible"]}`]:t["row--lastVisible"]},{[`& .${He.rowReorderCell}`]:t.rowReorderCell},{[`& .${He["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${He.rowReorderCellContainer}`]:t.rowReorderCellContainer},{[`& .${He.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${He.rowSkeleton}`]:t.rowSkeleton},{[`& .${He.scrollbar}`]:t.scrollbar},{[`& .${He["scrollbar--horizontal"]}`]:t["scrollbar--horizontal"]},{[`& .${He["scrollbar--vertical"]}`]:t["scrollbar--vertical"]},{[`& .${He.scrollbarFiller}`]:t.scrollbarFiller},{[`& .${He["scrollbarFiller--pinnedRight"]}`]:t["scrollbarFiller--pinnedRight"]},{[`& .${He.sortIcon}`]:t.sortIcon},{[`& .${He.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${He.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${He.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${He.withBorderColor}`]:t.withBorderColor},{[`& .${He["row--beingDragged"]}`]:t["row--beingDragged"]}]})(()=>{const e=Vp(),t=Wn(e,FQt),n=xr.colors.background.base,r=xr.header.background.base,o=xr.cell.background.pinned,i=zQt(xr.colors.interactive.hover),a=xr.colors.interactive.hoverOpacity,l=xr.colors.interactive.selected,c=xr.colors.interactive.selectedOpacity,u=l,d=`calc(${c} + ${a})`,f=K1(n,i,a),h=K1(n,l,c),m=K1(n,u,d),g=K1(o,i,a),b=K1(o,l,c),y=K1(o,u,d),v=E=>({[`& .${He["cell--pinnedLeft"]}, & .${He["cell--pinnedRight"]}`]:{backgroundColor:E,"&.Mui-selected":{backgroundColor:K1(E,h,c),"&:hover":{backgroundColor:K1(E,m,d)}}}}),x=v(g),S=v(b),C=v(y),_={backgroundColor:h,"&:hover":{backgroundColor:m,"@media (hover: none)":{backgroundColor:h}}};return{"--unstable_DataGrid-radius":xr.radius.base,"--unstable_DataGrid-headWeight":xr.typography.fontWeight.medium,"--DataGrid-rowBorderColor":xr.colors.border.base,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:xr.colors.border.base,borderRadius:"var(--unstable_DataGrid-radius)",backgroundColor:xr.colors.background.base,color:xr.colors.foreground.base,font:xr.typography.font.body,outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",transform:"translate(0, 0)",[`.${He.main} > *:first-child${$Qt}`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${He.autoHeight}`]:{height:"auto"},[`&.${He.autosizing}`]:{[`& .${He.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${He.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${He.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${He.groupingCriteriaCell}`]:{width:"unset"},[`& .${He.treeDataGroupingCell}`]:{width:"unset"}},[`&.${He.withSidePanel}`]:{flexDirection:"row"},[`& .${He.mainContent}`]:{display:"flex",flexDirection:"column",overflow:"hidden",flex:1},[`& .${He.columnHeader}, & .${He.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${He.columnHeader}:focus-within, & .${He.cell}:focus-within`]:{outline:`solid ${sWe(xr.colors.interactive.focus,.5)} ${zN}px`,outlineOffset:zN*-1},[`& .${He.columnHeader}:focus, & .${He.cell}:focus`]:{outline:`solid ${xr.colors.interactive.focus} ${zN}px`,outlineOffset:zN*-1},[`& .${He.columnHeader}:focus, + & .${He["columnHeader--withLeftBorder"]}, + & .${He["columnHeader--withRightBorder"]}, + & .${He["columnHeader--siblingFocused"]} + `]:{[`& .${He.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${He["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${He["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${He["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${He["root--noToolbar"]} [aria-rowindex="1"] .${He["columnHeader--last"]}`]:{borderTopRightRadius:t?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${He.columnHeaderCheckbox}, & .${He.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${He.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center",backgroundColor:r},[`& .${He.columnHeader} .${He.sortButton}`]:{backgroundColor:xr.header.background.base},[`& .${He["columnHeader--filter"]}`]:{paddingTop:8,paddingBottom:8,paddingRight:5,minHeight:"min-content",overflow:"hidden"},[`& .${He["virtualScroller--hasScrollX"]} .${He["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${He["pivotPanelField--sorted"]} .${He.iconButtonContainer}, + & .${He["columnHeader--sorted"]} .${He.iconButtonContainer}, + & .${He["columnHeader--filtered"]} .${He.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${He.pivotPanelField}:not(.${He["pivotPanelField--sorted"]}) .${He.sortButton}, + & .${He.columnHeader}:not(.${He["columnHeader--sorted"]}) .${He.sortButton}`]:{opacity:0,transition:xr.transition(["opacity"],{duration:xr.transitions.duration.short})},[`& .${He.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:xr.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${He.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${He["columnHeader--filledGroup"]} .${He.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${He.sortIcon}, & .${He.filterIcon}`]:{fontSize:"inherit"},[`& .${He["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${He["columnHeader--alignCenter"]} .${He.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${He["columnHeader--alignRight"]} .${He.columnHeaderDraggableContainer}, & .${He["columnHeader--alignRight"]} .${He.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${He["columnHeader--alignCenter"]} .${He.menuIcon}`]:{marginLeft:"auto"},[`& .${He["columnHeader--alignRight"]} .${He.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${He["columnHeader--moving"]}`]:{backgroundColor:f},[`& .${He["columnHeader--pinnedLeft"]}, & .${He["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:40,background:xr.header.background.base},[`& .${He.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:30,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:LQt,color:xr.colors.border.base},[`& .${He.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)",backgroundColor:r},"@media (hover: hover)":{[`& .${He.columnHeader}:hover`]:{[`& .${He.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${He.iconButtonContainer}`]:{visibility:"visible",width:"auto"}},[`& .${He.columnHeader}:not(.${He["columnHeader--sorted"]}):hover .${He.sortButton}, + & .${He.pivotPanelField}:not(.${He["pivotPanelField--sorted"]}):hover .${He.sortButton}, + & .${He.pivotPanelField}:not(.${He["pivotPanelField--sorted"]}) .${He.sortButton}:focus-visible`]:{opacity:1},[`& .${He.columnHeader}:not(.${He["columnHeader--sorted"]}):hover .${He.sortButton} > *, + & .${He.pivotPanelField}:not(.${He["pivotPanelField--sorted"]}):hover .${He.sortButton} > *, + & .${He.pivotPanelField}:not(.${He["pivotPanelField--sorted"]}) .${He.sortButton}:focus-visible > *`]:{opacity:.78},[`& .${He.pivotPanelFieldActionContainer} button:hover`]:{backgroundColor:xr.colors.background.base}},"@media (hover: none)":{[`& .${He.columnHeader} .${He.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${He.columnHeader}:focus, + & .${He["columnHeader--siblingFocused"]}`]:{[`.${He["columnSeparator--resizable"]}`]:{color:xr.colors.foreground.accent}},[`& .${He.pivotPanelField}:not(.${He["pivotPanelField--sorted"]}) .${He.sortButton}`]:{opacity:.78}},[`& .${He["columnHeader--withLeftBorder"]} .${He["columnSeparator--sideLeft"]}:not(.${He["columnSeparator--resizable"]}), & .${He["columnHeader--withRightBorder"]} .${He["columnSeparator--sideRight"]}:not(.${He["columnSeparator--resizable"]})`]:{display:"none"},[`& .${He["columnSeparator--sideLeft"]}`]:{left:e6},[`& .${He["columnSeparator--sideRight"]}`]:{right:e6},[`& .${He["columnHeader--withRightBorder"]} .${He["columnSeparator--sideLeft"]}`]:{left:e6-.5},[`& .${He["columnHeader--withRightBorder"]} .${He["columnSeparator--sideRight"]}`]:{right:e6-.5},[`& .${He["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${He["columnSeparator--resizing"]}`]:{color:xr.colors.foreground.accent},"@media (hover: none)":{[`& .${He.iconSeparator} rect`]:_Ne},"@media (hover: hover)":{"&:hover":{color:xr.colors.foreground.accent,[`& .${He.iconSeparator} rect`]:_Ne}},"& svg":{pointerEvents:"none"}},[`& .${He.iconSeparator}`]:{color:"inherit",transition:xr.transition(["color","width"],{duration:xr.transitions.duration.short})},[`& .${He.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${He.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${He.headerFilterRow}`]:{[`& .${He.columnHeader}, & .${He.scrollbarFiller}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${He["row--borderBottom"]} .${He.columnHeader}, + & .${He["row--borderBottom"]} .${He.filler}, + & .${He["row--borderBottom"]} .${He.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${He["row--borderBottom"]} .${He.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${He.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${He["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:f,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${He.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":_,position:"relative"},[`& .${He.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":_},[`& .${He["virtualScrollerContent--overflowed"]} .${He["row--lastVisible"]} .${He.cell}`]:{borderTopColor:"transparent"},[`& .${He.pinnedRows} .${He.row}, .${He.aggregationRowOverlayWrapper} .${He.row}`]:{backgroundColor:o,"&:hover":{backgroundColor:g}},[`& .${He["pinnedRows--top"]} :first-of-type`]:{[`& .${He.cell}, .${He.scrollbarFiller}`]:{borderTop:"none"}},[`&.${He["root--disableUserSelection"]}`]:{userSelect:"none"},[`& .${He["row--dynamicHeight"]} > .${He.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${He.cellEmpty}`]:{flex:1,padding:0,height:"unset"},[`& .${He.cell}.${He["cell--selectionMode"]}`]:{cursor:"default"},[`& .${He.cell}.${He["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:xr.shadows.base,backgroundColor:xr.colors.background.overlay,"&:focus-within":{outline:`${zN}px solid ${xr.colors.interactive.focus}`,outlineOffset:zN*-1}},[`& .${He["cell--editing"]}`]:{"& .MuiInputBase-root":{height:"100%"}},[`& .${He["row--editing"]}`]:{boxShadow:xr.shadows.base},[`& .${He["row--editing"]} .${He.cell}`]:{boxShadow:"none",backgroundColor:xr.colors.background.overlay},[`& .${He.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${He.booleanCell}[data-value="true"]`]:{color:xr.colors.foreground.muted},[`& .${He.booleanCell}[data-value="false"]`]:{color:xr.colors.foreground.disabled},[`& .${He.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:xr.spacing(1)},[`& .${He.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:xr.colors.interactive.disabledOpacity},[`& .${He["rowReorderCell--draggable"]}`]:{cursor:"grab",opacity:1},[`& .${He.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${He.withBorderColor}`]:{borderColor:xr.colors.border.base},[`& .${He["cell--withLeftBorder"]}, & .${He["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${He["cell--withRightBorder"]}, & .${He["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${He["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${He["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${He["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${He["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${He["cell--pinnedLeft"]}, & .${He["cell--pinnedRight"]}`]:{position:"sticky",zIndex:30,background:xr.cell.background.pinned,"&.Mui-selected":{backgroundColor:b}},[`& .${He.row}`]:{"&:hover":x,"&.Mui-selected":S,"&.Mui-selected:hover":C},[`& .${He.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${He.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${He.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${He.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${He["columnHeader--dragging"]}`]:{background:xr.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:xr.colors.interactive.disabledOpacity},[`& .${He["row--dragging"]}`]:{background:xr.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",border:"1px solid var(--DataGrid-rowBorderColor)",color:xr.colors.foreground.base,transform:"translateZ(0)",[`& .${He.rowReorderCellPlaceholder}`]:{padding:"0 6px",display:"flex"}},[`& .${He.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${He.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:xr.spacing(2)},[`& .${He.treeDataGroupingCellLoadingContainer}, .${He.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${He.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${He.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:xr.spacing(2)},[`& .${He.columnHeaders} .${He.scrollbarFiller}`]:{backgroundColor:r},[`.${He.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",backgroundColor:r,[`&.${He["scrollbarFiller--pinnedRight"]}`]:{position:"sticky",zIndex:40,right:0}},[`& .${He.filler}`]:{flex:"1 0 auto"},[`& .${He["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${He.columnHeaders} .${He.filler}`]:{backgroundColor:r},[`& .${He["main--hiddenContent"]}`]:{[`& .${He.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${He.pinnedRows}`]:{display:"none"}},[`& .${He["row--beingDragged"]}`]:{color:xr.colors.foreground.disabled,"&:hover":{backgroundColor:"transparent"}}}});function sWe(e,t){return`rgba(from ${e} r g b / ${t})`}function zQt(e){return sWe(e,1)}function K1(e,t,n){return`color-mix(in srgb,${e}, ${t} calc(${n} * 100%))`}const HQt=()=>()=>{},VQt=()=>!1,UQt=()=>!0,GQt=()=>Tde.useSyncExternalStore(HQt,VQt,UQt),lWe=p.createContext(void 0);function tfe(){const e=p.useContext(lWe);if(e===void 0)throw new Error("MUI X: Missing context.");return e}function WQt({children:e}){const t=p.useRef(null),n=p.useRef(null),r=p.useRef(null),o=p.useMemo(()=>({columnsPanelTriggerRef:t,filterPanelTriggerRef:n,aiAssistantPanelTriggerRef:r}),[]);return s.jsx(lWe.Provider,{value:o,children:e})}function qQt(){var u;const e=Po(),t=Wn(e,Cm),n=br(),r=Wn(e,D_),{columnsPanelTriggerRef:o,filterPanelTriggerRef:i,aiAssistantPanelTriggerRef:a}=tfe(),l=e.current.unstable_applyPipeProcessors("preferencePanel",null,r.openedPanelValue??Mp.filters);let c=null;switch(r.openedPanelValue){case Mp.filters:c=i.current;break;case Mp.columns:c=o.current;break;case Mp.aiAssistant:c=a.current;break}return s.jsx(n.slots.panel,we({id:r.panelId,open:t.length>0&&r.open,"aria-labelledby":r.labelId,target:c,onClose:()=>e.current.hidePreferences()},(u=n.slotProps)==null?void 0:u.panel,{children:l}))}function KQt(){var t;const e=br();return s.jsxs(p.Fragment,{children:[s.jsx(qQt,{}),e.showToolbar&&s.jsx(e.slots.toolbar,we({},(t=e.slotProps)==null?void 0:t.toolbar))]})}const YQt=["className","children","sidePanel"],XQt=(e,t)=>{const{autoHeight:n,classes:r,showCellVerticalBorder:o}=e,i={root:["root",n&&"autoHeight",`root--density${_n(t)}`,e.slots.toolbar===null&&"root--noToolbar","withBorderColor",o&&"withVerticalBorder"]};return qn(i,ni,r)},ZQt=so(function(t,n){const r=br(),{className:o,children:i,sidePanel:a}=t,l=sr(t,YQt),c=Vp(),u=Wn(c,XE),d=c.current.rootElementRef,f=p.useCallback(v=>{v!==null&&c.current.publishEvent("rootMount",v)},[c]),h=Yi(d,n,f),m=r,g=XQt(m,u),b=qYt();return GQt()?null:s.jsxs(BQt,we({className:Ae(g.root,o,b.className,a&&He.withSidePanel),ownerState:m},l,{ref:h,children:[s.jsxs("div",{className:He.mainContent,role:"presentation",children:[s.jsx(KQt,{}),s.jsx(xQt,{children:i}),s.jsx(wQt,{})]}),a,b.tag]}))}),JQt=p1(ZQt),QQt=["className"],een=e=>{const{classes:t}=e;return qn({root:["footerContainer","withBorderColor"]},ni,t)},ten=Si("div",{name:"MuiDataGrid",slot:"FooterContainer"})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),nen=so(function(t,n){const{className:r}=t,o=sr(t,QQt),i=br(),a=een(i);return s.jsx(ten,we({className:Ae(a.root,r),ownerState:i},o,{ref:n}))}),ren=["className"],oen=e=>{const{classes:t}=e;return qn({root:["overlay"]},ni,t)},ien=Si("div",{name:"MuiDataGrid",slot:"Overlay"})({width:"100%",height:"100%",display:"flex",gap:xr.spacing(1),flexDirection:"column",alignSelf:"center",alignItems:"center",justifyContent:"center",textAlign:"center",textWrap:"balance",backgroundColor:xr.colors.background.backdrop}),MV=so(function(t,n){const{className:r}=t,o=sr(t,ren),i=br(),a=oen(i);return s.jsx(ien,we({className:Ae(a.root,r),ownerState:i},o,{ref:n}))});function Qb(e,t,n,r={}){return typeof t=="function"?t(n,r):t?(t.props.className&&(n.className=aen(t.props.className,n.className)),(t.props.style||n.style)&&(n.style=we({},n.style,t.props.style)),p.cloneElement(t,n)):p.createElement(e,n)}function aen(e,t){return!e||!t?e||t:`${e} ${t}`}const cWe=p.createContext(void 0);function sen(){const e=p.useContext(cWe);if(e===void 0)throw new Error("MUI X: Missing context. Toolbar subcomponents must be placed within a component.");return e}function len(e,t){if(!e.ref.current||!t.ref.current)return 0;const n=e.ref.current.compareDocumentPosition(t.ref.current);return n?n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0:0}const cen=["render","className"],uen=e=>{const{classes:t}=e;return qn({root:["toolbar"]},ni,t)},den=Si("div",{name:"MuiDataGrid",slot:"Toolbar"})({flex:"0 1 1px",display:"flex",alignItems:"center",justifyContent:"end",gap:xr.spacing(.25),padding:xr.spacing(.75),minHeight:52,boxSizing:"border-box",borderBottom:`1px solid ${xr.colors.border.base}`}),fen=so(function(t,n){const{render:r,className:o}=t,i=sr(t,cen),a=br(),l=uen(a),[c,u]=p.useState(null),[d,f]=p.useState([]),h=p.useCallback(()=>d.sort(len),[d]),m=p.useCallback((_,N,E=!0)=>{var k,T;let I=_;const A=h(),R=A.length;for(let D=0;D=R){if(!E)return-1;I=0}else if(I<0){if(!E)return-1;I=R-1}if(!((k=A[I].ref.current)!=null&&k.disabled)&&((T=A[I].ref.current)==null?void 0:T.ariaDisabled)!=="true")return I}return-1},[h]),g=p.useCallback((_,N)=>{f(E=>[...E,{id:_,ref:N}])},[]),b=p.useCallback(_=>{f(N=>N.filter(E=>E.id!==_))},[]),y=p.useCallback(_=>{var A;if(!c)return;const N=h(),E=N.findIndex(R=>R.id===c);let I=-1;if(_.key==="ArrowRight"?(_.preventDefault(),I=m(E,1)):_.key==="ArrowLeft"?(_.preventDefault(),I=m(E,-1)):_.key==="Home"?(_.preventDefault(),I=m(-1,1,!1)):_.key==="End"&&(_.preventDefault(),I=m(N.length,-1,!1)),I>=0&&I{c!==_&&u(_)},[c,u]),x=p.useCallback(_=>{var A;const N=h(),E=N.findIndex(R=>R.id===_),I=m(E,1);if(I>=0&&I{var N,E;const _=h();if(_.length>0){if(!c){u(_[0].id);return}const I=_.findIndex(A=>A.id===c);if(_[I]){if(I===-1){const A=_[I];A&&(u(A.id),(E=A.ref.current)==null||E.focus())}}else{const A=_[_.length-1];A&&(u(A.id),(N=A.ref.current)==null||N.focus())}}},[h,m]);const S=p.useMemo(()=>({focusableItemId:c,registerItem:g,unregisterItem:b,onItemKeyDown:y,onItemFocus:v,onItemDisabled:x}),[c,g,b,y,v,x]),C=Qb(den,r,we({role:"toolbar","aria-orientation":"horizontal","aria-label":a.label||void 0,className:Ae(l.root,o)},i,{ref:n}));return s.jsx(cWe.Provider,{value:S,children:C})}),pen=["render","onKeyDown","onFocus","disabled","aria-disabled"],m8=so(function(t,n){var I;const{render:r,onKeyDown:o,onFocus:i,disabled:a,"aria-disabled":l}=t,c=sr(t,pen),u=pi(),d=br(),f=p.useRef(null),h=Yi(f,n),{focusableItemId:m,registerItem:g,unregisterItem:b,onItemKeyDown:y,onItemFocus:v,onItemDisabled:x}=sen(),S=A=>{y(A),o==null||o(A)},C=A=>{v(u),i==null||i(A)};p.useEffect(()=>(g(u,f),()=>b(u)),[]);const _=p.useRef(a);p.useEffect(()=>{_.current!==a&&a===!0&&x(u,a),_.current=a},[a,u,x]);const N=p.useRef(l);p.useEffect(()=>{N.current!==l&&l===!0&&x(u,!0),N.current=l},[l,u,x]);const E=Qb(d.slots.baseIconButton,r,we({},(I=d.slotProps)==null?void 0:I.baseIconButton,{tabIndex:m===u?0:-1},c,{disabled:a,"aria-disabled":l,onKeyDown:S,onFocus:C,ref:h}));return s.jsx(p.Fragment,{children:E})}),hen=e=>{const{classes:t,open:n}=e;return qn({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},ni,t)},men=p.memo(e=>{var h,m;const{colDef:t,open:n,columnMenuId:r,columnMenuButtonId:o,iconButtonRef:i}=e,a=Po(),l=br(),c=we({},e,{classes:l.classes}),u=hen(c),d=p.useCallback(g=>{g.preventDefault(),g.stopPropagation(),a.current.toggleColumnMenu(t.field)},[a,t.field]),f=t.headerName??t.field;return s.jsx("div",{className:u.root,children:s.jsx(l.slots.baseTooltip,we({title:a.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},(h=l.slotProps)==null?void 0:h.baseTooltip,{children:s.jsx(l.slots.baseIconButton,we({ref:i,tabIndex:-1,className:u.button,"aria-label":a.current.getLocaleText("columnMenuAriaLabel")(f),size:"small",onClick:d,"aria-haspopup":"menu","aria-expanded":n,"aria-controls":n?r:void 0,id:o},(m=l.slotProps)==null?void 0:m.baseIconButton,{children:s.jsx(l.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})});function gen({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:o,open:i,target:a,onExited:l}){const c=Po(),u=c.current.getColumn(o),d=no(f=>{f&&(f.stopPropagation(),a!=null&&a.contains(f.target))||c.current.hideColumnMenu()});return!a||!u?null:s.jsx(SV,{position:`bottom-${u.align==="right"?"start":"end"}`,open:i,target:a,onClose:d,onExited:l,children:s.jsx(n,we({colDef:u,hideMenu:d,open:i,id:e,labelledby:t},r))})}function yen(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function zB(e,t){return e.closest(`.${t}`)}function m1(e){return e.replace(/["\\]/g,"\\$&")}function ben(e,t){return e.querySelector(`[role="columnheader"][data-field="${m1(t)}"]`)}function uWe(e){return`.${He.row}[data-id="${m1(String(e))}"]`}function ven(e,t){return e.querySelector(uWe(t))}function xen(e,{id:t,field:n}){const r=uWe(t),o=`.${He.cell}[data-field="${m1(n)}"]`,i=`${r} ${o}`;return e.querySelector(i)}function wO(e){return e.target.nodeType===1&&!e.currentTarget.contains(e.target)}function wen(e){return e.getAttribute("data-field")}function Sen(e,t){return e.querySelector(`[data-field="${m1(t)}"]`)}function Cen(e){return e.getAttribute("data-fields").slice(2,-2).split("-|-")}function _en(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${m1(t)}-|"]`)??[])}function jen(e,t){var a;if(!zB(e,He.root))throw new Error("MUI X: The root element is not found.");const r=e.getAttribute("aria-colindex");if(!r)return[];const o=Number(r)-1,i=[];return(a=t.virtualScrollerRef)!=null&&a.current?(pWe(t).forEach(l=>{const c=l.getAttribute("data-id");if(!c)return;let u=o;const d=t.unstable_getCellColSpanInfo(c,o);d&&d.spannedByColSpan&&(u=d.leftVisibleCellIndex);const f=l.querySelector(`[data-colindex="${u}"]`);f&&i.push(f)}),i):[]}function jNe(e,t){return e.rootElementRef.current.querySelector(`.${He[t]}`)}const dWe=({api:e,colIndex:t,position:n,filterFn:r})=>{if(t===null)return[];const o=[];return pWe(e).forEach(i=>{i.getAttribute("data-id")&&i.querySelectorAll(`.${He[n==="left"?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(l=>{const c=XI(l);c!==null&&r(c)&&o.push(l)})}),o};function Nen(e,t,n){const r=XI(t);return dWe({api:e,colIndex:r,position:n?"right":"left",filterFn:o=>n?or})}function Een(e,t,n){const r=XI(t);return dWe({api:e,colIndex:r,position:n?"left":"right",filterFn:o=>n?o>r:o{var i;if(!((i=e.columnHeadersContainerRef)!=null&&i.current))return[];if(t===null)return[];const o=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${He[n==="left"?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(a=>{const l=XI(a);l!==null&&r(l,a)&&o.push(a)}),o};function Pen(e,t,n){const r=XI(t);return fWe({api:e,position:n?"right":"left",colIndex:r,filterFn:o=>n?or})}function Ien(e,t,n){const r=XI(t);return fWe({api:e,position:n?"left":"right",colIndex:r,filterFn:(o,i)=>i.classList.contains(He["columnHeader--last"])?!1:n?o>r:o div > [data-field="${m1(t)}"][role="columnheader"]`)}function Ten(e,t){const n=e.virtualScrollerRef.current;return Array.from(n.querySelectorAll(`:scope > div > div > div > [data-field="${m1(t)}"][role="gridcell"]`))}function pWe(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${He.row}`)}function XI(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}const ken=["className","aria-label"],Men=e=>{const{classes:t}=e;return qn({root:["columnHeaderTitle"]},ni,t)},Ren=Si("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle"})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),Oen=so(function(t,n){const{className:r}=t,o=sr(t,ken),i=br(),a=Men(i);return s.jsx(Ren,we({className:Ae(a.root,r),ownerState:i},o,{ref:n}))});function Den(e){var c;const{label:t,description:n}=e,r=br(),o=p.useRef(null),[i,a]=p.useState(""),l=p.useCallback(()=>{if(!n&&(o!=null&&o.current)){const u=yen(o.current);a(u?t:"")}},[n,t]);return s.jsx(r.slots.baseTooltip,we({title:n||i},(c=r.slotProps)==null?void 0:c.baseTooltip,{children:s.jsx(Oen,{onMouseOver:l,ref:o,children:t})}))}const Len=["resizable","resizing","height","side"];var nfe=(function(e){return e.Left="left",e.Right="right",e})(nfe||{});const $en=e=>{const{resizable:t,resizing:n,classes:r,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${_n(o)}`],icon:["iconSeparator"]};return qn(i,ni,r)};function Fen(e){const{height:t,side:n=nfe.Right}=e,r=sr(e,Len),o=br(),i=we({},e,{side:n,classes:o.classes}),a=$en(i),l=p.useCallback(c=>{c.preventDefault(),c.stopPropagation()},[]);return s.jsx("div",we({className:a.root,style:{minHeight:t}},r,{onClick:l,children:s.jsx(o.slots.columnResizeIcon,{className:a.icon})}))}const Ben=p.memo(Fen),zen=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],hWe=so(function(t,n){const{classes:r,colIndex:o,height:i,isResizing:a,sortDirection:l,tabIndex:c,separatorSide:u,isDraggable:d,headerComponent:f,description:h,width:m,columnMenuIconButton:g=null,columnMenu:b=null,columnTitleIconButtons:y=null,headerClassName:v,label:x,resizable:S,draggableContainerProps:C,columnHeaderSeparatorProps:_,style:N}=t,E=sr(t,zen),I=br(),A=p.useRef(null),R=Yi(A,n);let k="none";return l!=null&&(k=l==="asc"?"ascending":"descending"),s.jsxs("div",we({className:Ae(r.root,v),style:we({},N,{width:m}),role:"columnheader",tabIndex:c,"aria-colindex":o+1,"aria-sort":k},E,{ref:R,children:[s.jsxs("div",we({className:r.draggableContainer,draggable:d,role:"presentation"},C,{children:[s.jsxs("div",{className:r.titleContainer,role:"presentation",children:[s.jsx("div",{className:r.titleContainerContent,children:f!==void 0?f:s.jsx(Den,{label:x,description:h,columnWidth:m})}),y]}),g]})),s.jsx(Ben,we({resizable:!I.disableColumnResize&&!!S,resizing:a,height:i,side:u},_)),b]}))}),Hen=e=>{const{disableColumnSorting:t}=br(),{colDef:n,classes:r,isDragging:o,sortDirection:i,showRightBorder:a,showLeftBorder:l,filterItemsCounter:c,pinnedPosition:u,isSiblingFocused:d}=e,f=n.sortable&&!t,h=i!=null,m=c!=null&&c>0,g=n.type==="number",b={root:["columnHeader",n.headerAlign==="left"&&"columnHeader--alignLeft",n.headerAlign==="center"&&"columnHeader--alignCenter",n.headerAlign==="right"&&"columnHeader--alignRight",f&&"columnHeader--sortable",o&&"columnHeader--moving",h&&"columnHeader--sorted",m&&"columnHeader--filtered",g&&"columnHeader--numeric","withBorderColor",a&&"columnHeader--withRightBorder",l&&"columnHeader--withLeftBorder",u===ii.LEFT&&"columnHeader--pinnedLeft",u===ii.RIGHT&&"columnHeader--pinnedRight",d&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return qn(b,ni,r)};function Ven(e){var de,ae,ue;const{colDef:t,columnMenuOpen:n,colIndex:r,headerHeight:o,isResizing:i,isLast:a,sortDirection:l,sortIndex:c,filterItemsCounter:u,hasFocus:d,tabIndex:f,disableReorder:h,separatorSide:m,showLeftBorder:g,showRightBorder:b,pinnedPosition:y,pinnedOffset:v}=e,x=Vp(),S=br(),C=af(),_=p.useRef(null),N=pi(),E=pi(),I=p.useRef(null),[A,R]=p.useState(n),k=!S.disableColumnReorder&&!h&&!t.disableReorder;let T;t.renderHeader&&(T=t.renderHeader(x.current.getColumnHeaderParams(t.field)));const D=we({},e,{classes:S.classes,showRightBorder:b,showLeftBorder:g}),O=Hen(D),z=p.useCallback(ce=>se=>{wO(se)||x.current.publishEvent(ce,x.current.getColumnHeaderParams(t.field),se)},[x,t.field]),F=p.useMemo(()=>({onClick:z("columnHeaderClick"),onContextMenu:z("columnHeaderContextMenu"),onDoubleClick:z("columnHeaderDoubleClick"),onMouseOver:z("columnHeaderOver"),onMouseOut:z("columnHeaderOut"),onMouseEnter:z("columnHeaderEnter"),onMouseLeave:z("columnHeaderLeave"),onKeyDown:z("columnHeaderKeyDown"),onFocus:z("columnHeaderFocus"),onBlur:z("columnHeaderBlur")}),[z]),U=p.useMemo(()=>k?{onDragStart:z("columnHeaderDragStart"),onDragEnter:z("columnHeaderDragEnter"),onDragOver:z("columnHeaderDragOver"),onDragEndCapture:z("columnHeaderDragEnd")}:{},[k,z]),G=p.useMemo(()=>({onMouseDown:z("columnSeparatorMouseDown"),onDoubleClick:z("columnSeparatorDoubleClick")}),[z]);p.useEffect(()=>{!A&&n&&R(n)},[A,n]);const W=p.useCallback(()=>{R(!1)},[]),Y=!S.disableColumnMenu&&!t.disableColumnMenu&&s.jsx(men,{colDef:t,columnMenuId:N,columnMenuButtonId:E,open:A,iconButtonRef:I}),B=s.jsx(gen,{columnMenuId:N,columnMenuButtonId:E,field:t.field,open:n,target:I.current,ContentComponent:S.slots.columnMenu,contentComponentProps:(de=S.slotProps)==null?void 0:de.columnMenu,onExited:W}),$=t.sortingOrder??S.sortingOrder,K=(t.sortable||l!=null)&&!t.hideSortIcons&&!S.disableColumnSorting,q=s.jsxs(p.Fragment,{children:[!S.disableColumnFilter&&s.jsx(S.slots.columnHeaderFilterIconButton,we({field:t.field,counter:u},(ae=S.slotProps)==null?void 0:ae.columnHeaderFilterIconButton)),K&&s.jsx(S.slots.columnHeaderSortIcon,we({field:t.field,direction:l,index:c,sortingOrder:$,disabled:!t.sortable},(ue=S.slotProps)==null?void 0:ue.columnHeaderSortIcon))]});p.useLayoutEffect(()=>{const ce=x.current.state.columnMenu;if(d&&!ce.open){const me=_.current.querySelector('[tabindex="0"]')||_.current;if(!me)return;if(efe())me.focus({preventScroll:!0});else{const fe=x.current.getScrollPosition();me.focus(),x.current.scroll(fe)}}},[x,d]);const Z=typeof t.headerClassName=="function"?t.headerClassName({field:t.field,colDef:t}):t.headerClassName,J=t.headerName??t.field,oe=p.useMemo(()=>kV(we({},e.style),C,y,v),[y,v,e.style,C]);return s.jsx(hWe,we({ref:_,classes:O,columnMenuOpen:n,colIndex:r,height:o,isResizing:i,sortDirection:l,hasFocus:d,tabIndex:f,separatorSide:m,isDraggable:k,headerComponent:T,description:t.description,elementId:t.field,width:t.computedWidth,columnMenuIconButton:Y,columnTitleIconButtons:q,headerClassName:Ae(Z,a&&He["columnHeader--last"]),label:J,resizable:!S.disableColumnResize&&!!t.resizable,"data-field":t.field,columnMenu:B,draggableContainerProps:U,columnHeaderSeparatorProps:G,style:oe},F))}const Uen=p1(Ven),Gen=["className"],Wen=e=>{const{classes:t}=e;return qn({root:["iconButtonContainer"]},ni,t)},qen=Si("div",{name:"MuiDataGrid",slot:"IconButtonContainer"})(()=>({display:"flex",visibility:"hidden",width:0})),mWe=so(function(t,n){const{className:r}=t,o=sr(t,Gen),i=br(),a=Wen(i);return s.jsx(qen,we({className:Ae(a.root,r),ownerState:i},o,{ref:n}))}),Ken=["direction","index","sortingOrder","disabled","className"],Yen=e=>{const{classes:t}=e;return qn({root:["sortButton"],icon:["sortIcon"]},ni,t)},Xen=Si(Jb,{name:"MuiDataGrid",slot:"SortButton"})({transition:xr.transition(["opacity"],{duration:xr.transitions.duration.short,easing:xr.transitions.easing.easeInOut})});function Zen(e,t,n,r){let o;const i={};return t==="asc"?o=e.columnSortedAscendingIcon:t==="desc"?o=e.columnSortedDescendingIcon:(o=e.columnUnsortedIcon,i.sortingOrder=r),o?s.jsx(o,we({fontSize:"small",className:n},i)):null}function Jen(e){var m;const{direction:t,index:n,sortingOrder:r,disabled:o,className:i}=e,a=sr(e,Ken),l=Po(),c=br(),u=we({},e,{classes:c.classes}),d=Yen(u),f=Zen(c.slots,t,d.icon,r);if(!f)return null;const h=s.jsx(Xen,we({as:c.slots.baseIconButton,ownerState:u,"aria-label":l.current.getLocaleText("columnHeaderSortIconLabel"),title:l.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:o,className:Ae(d.root,i)},(m=c.slotProps)==null?void 0:m.baseIconButton,a,{children:f}));return s.jsxs(p.Fragment,{children:[n!=null&&s.jsx(c.slots.baseBadge,{badgeContent:n,color:"default",overlap:"circular",children:h}),n==null&&h]})}function Qen(e){return s.jsx(mWe,{children:s.jsx(Jen,we({},e,{tabIndex:-1}))})}const etn=p.memo(Qen),ttn=e=>{const{classes:t}=e;return qn({icon:["filterIcon"]},ni,t)};function ntn(e){return e.counter?s.jsx(rtn,we({},e)):null}function rtn(e){var m,g;const{counter:t,field:n,onClick:r}=e,o=Po(),i=br(),a=we({},e,{classes:i.classes}),l=ttn(a),c=pi(),u=Wn(o,iJt,c),d=pi(),f=p.useCallback(b=>{b.preventDefault(),b.stopPropagation();const{open:y,openedPanelValue:v}=D_(o);y&&v===Mp.filters?o.current.hideFilterPanel():o.current.showFilterPanel(void 0,d,c),r&&r(o.current.getColumnHeaderParams(n),b)},[o,n,r,d,c]);if(!t)return null;const h=s.jsx(i.slots.baseIconButton,we({id:c,onClick:f,"aria-label":o.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?d:void 0},(m=i.slotProps)==null?void 0:m.baseIconButton,{children:s.jsx(i.slots.columnFilteredIcon,{className:l.icon,fontSize:"small"})}));return s.jsx(i.slots.baseTooltip,we({title:o.current.getLocaleText("columnHeaderFiltersTooltipActive")(t),enterDelay:1e3},(g=i.slotProps)==null?void 0:g.baseTooltip,{children:s.jsxs(mWe,{children:[t>1&&s.jsx(i.slots.baseBadge,{badgeContent:t,color:"default",children:h}),t===1&&h]})}))}const otn=["hideMenu","colDef","id","labelledby","className","children","open"],itn=qt(Jb)(()=>({minWidth:248}));function NNe(e){e.currentTarget.contains(e.target)&&e.stopPropagation()}const atn=so(function(t,n){const{hideMenu:r,id:o,labelledby:i,className:a,children:l,open:c}=t,u=sr(t,otn),d=br(),f=p.useCallback(h=>{h.key==="Tab"&&h.preventDefault(),vGe(h.key)&&r(h)},[r]);return s.jsx(itn,we({as:d.slots.baseMenuList,id:o,className:Ae(He.menuList,a),"aria-labelledby":i,onKeyDown:f,onWheel:NNe,onTouchMove:NNe,autoFocus:c},u,{ref:n,children:l}))}),stn=["displayOrder"],ltn=e=>{const t=Vp(),n=br(),{defaultSlots:r,defaultSlotProps:o,slots:i={},slotProps:a={},hideMenu:l,colDef:c,addDividers:u=!0}=e,d=p.useMemo(()=>we({},r,i),[r,i]),f=p.useMemo(()=>{if(!a||Object.keys(a).length===0)return o;const g=we({},a);return Object.entries(o).forEach(([b,y])=>{g[b]=we({},y,a[b]||{})}),g},[o,a]),h=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),m=p.useMemo(()=>{const g=Object.keys(r);return Object.keys(i).filter(b=>!g.includes(b))},[i,r]);return p.useMemo(()=>{const y=Array.from(new Set([...h,...m])).filter(v=>d[v]!=null).sort((v,x)=>{const S=f[v],C=f[x],_=Number.isFinite(S==null?void 0:S.displayOrder)?S.displayOrder:100,N=Number.isFinite(C==null?void 0:C.displayOrder)?C.displayOrder:100;return _-N});return y.reduce((v,x,S)=>{let C={colDef:c,onClick:l};const _=f[x];if(_){const N=sr(_,stn);C=we({},C,N)}return u&&S!==y.length-1?[...v,[d[x],C],[n.slots.baseDivider,{}]]:[...v,[d[x],C]]},[])},[u,c,h,l,d,f,m,n.slots.baseDivider])};function ctn(e){const{colDef:t,onClick:n}=e,r=Po(),o=br(),l=oc(r).filter(u=>u.disableColumnMenu!==!0).length===1,c=p.useCallback(u=>{l||(r.current.setColumnVisibility(t.field,!1),n(u))},[r,t.field,n,l]);return o.disableColumnSelector||t.hideable===!1?null:s.jsx(o.slots.baseMenuItem,{onClick:c,disabled:l,iconStart:s.jsx(o.slots.columnMenuHideIcon,{fontSize:"small"}),children:r.current.getLocaleText("columnMenuHideColumn")})}function utn(e){const{onClick:t}=e,n=Po(),r=br(),o=p.useCallback(i=>{t(i),n.current.showPreferences(Mp.columns)},[n,t]);return r.disableColumnSelector?null:s.jsx(r.slots.baseMenuItem,{onClick:o,iconStart:s.jsx(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"}),children:n.current.getLocaleText("columnMenuManageColumns")})}function dtn(e){return s.jsxs(p.Fragment,{children:[s.jsx(ctn,we({},e)),s.jsx(utn,we({},e))]})}function ftn(e){const{colDef:t,onClick:n}=e,r=Po(),o=br(),i=p.useCallback(a=>{n(a),r.current.showFilterPanel(t.field)},[r,t.field,n]);return o.disableColumnFilter||!t.filterable?null:s.jsx(o.slots.baseMenuItem,{onClick:i,iconStart:s.jsx(o.slots.columnMenuFilterIcon,{fontSize:"small"}),children:r.current.getLocaleText("columnMenuFilter")})}function ptn(e){const{colDef:t,onClick:n}=e,r=Po(),o=Wn(r,sg),i=br(),a=p.useMemo(()=>{if(!t)return null;const d=o.find(f=>f.field===t.field);return d==null?void 0:d.sort},[t,o]),l=t.sortingOrder??i.sortingOrder,c=p.useCallback(d=>{n(d);const f=d.currentTarget.getAttribute("data-value")||null,h=i.multipleColumnsSortingMode==="always";r.current.sortColumn(t.field,f===a?null:f,h)},[r,t,n,a,i.multipleColumnsSortingMode]);if(i.disableColumnSorting||!t||!t.sortable||!l.some(d=>!!d))return null;const u=d=>{const f=r.current.getLocaleText(d);return typeof f=="function"?f(t):f};return s.jsxs(p.Fragment,{children:[l.includes("asc")&&a!=="asc"?s.jsx(i.slots.baseMenuItem,{onClick:c,"data-value":"asc",iconStart:s.jsx(i.slots.columnMenuSortAscendingIcon,{fontSize:"small"}),children:u("columnMenuSortAsc")}):null,l.includes("desc")&&a!=="desc"?s.jsx(i.slots.baseMenuItem,{onClick:c,"data-value":"desc",iconStart:s.jsx(i.slots.columnMenuSortDescendingIcon,{fontSize:"small"}),children:u("columnMenuSortDesc")}):null,l.includes(null)&&a!=null?s.jsx(i.slots.baseMenuItem,{onClick:c,iconStart:i.slots.columnMenuUnsortIcon?s.jsx(i.slots.columnMenuUnsortIcon,{fontSize:"small"}):s.jsx("span",{}),children:r.current.getLocaleText("columnMenuUnsort")}):null]})}const htn=["defaultSlots","defaultSlotProps","slots","slotProps"],mtn={columnMenuSortItem:ptn,columnMenuFilterItem:ftn,columnMenuColumnsItem:dtn},gtn={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},ytn=so(function(t,n){const{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}=t,l=sr(t,htn),c=ltn(we({},l,{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}));return s.jsx(atn,we({},l,{ref:n,children:c.map(([u,d],f)=>s.jsx(u,we({},d),f))}))}),btn=so(function(t,n){return s.jsx(ytn,we({},t,{ref:n,defaultSlots:mtn,defaultSlotProps:gtn}))}),vtn=["className"],xtn=e=>{const{classes:t}=e;return qn({root:["panelWrapper"]},ni,t)},wtn=qt("div",{name:"MuiDataGrid",slot:"PanelWrapper"})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),gWe=so(function(t,n){const{className:r}=t,o=sr(t,vtn),i=br(),a=xtn(i);return s.jsx(wtn,we({tabIndex:-1,className:Ae(a.root,r),ownerState:i},o,{ref:n}))});function Stn(e){var n;const t=br();return s.jsx(gWe,we({},e,{children:s.jsx(t.slots.columnsManagement,we({},(n=t.slotProps)==null?void 0:n.columnsManagement))}))}const Ctn=["children","className","classes","onClose"],_tn=Mr("MuiDataGrid",["panel","paper"]),jtn=qt(Jb,{name:"MuiDataGrid",slot:"panel"})({zIndex:xr.zIndex.panel}),Ntn=qt("div",{name:"MuiDataGrid",slot:"panelContent"})({backgroundColor:xr.colors.background.overlay,borderRadius:xr.radius.base,boxShadow:xr.shadows.overlay,display:"flex",maxWidth:`calc(100vw - ${xr.spacing(2)})`,overflow:"auto"}),Etn=so((e,t)=>{var x;const{children:n,className:r,onClose:o}=e,i=sr(e,Ctn),a=Po(),l=br(),c=_tn,[u,d]=p.useState(!1),f=SGe(),h=no(()=>d(!0)),m=no(()=>d(!1)),g=no(()=>{o==null||o()}),b=no(S=>{S.key==="Escape"&&(o==null||o())}),[y,v]=p.useState(null);return p.useEffect(()=>{var C,_;const S=(_=(C=a.current.rootElementRef)==null?void 0:C.current)==null?void 0:_.querySelector('[data-id="gridPanelAnchor"]');S&&v(S)},[a]),y?s.jsx(jtn,we({as:l.slots.basePopper,ownerState:l,placement:"bottom-end",className:Ae(c.panel,r,f),flip:!0,onDidShow:h,onDidHide:m,onClickAway:g,clickAwayMouseEvent:"onPointerUp",clickAwayTouchEvent:!1,focusTrap:!0},i,(x=l.slotProps)==null?void 0:x.basePopper,{target:e.target??y,ref:t,children:s.jsx(Ntn,{className:c.paper,ownerState:l,onKeyDown:b,children:u&&n})})):null}),Ptn=["className"],Itn=e=>{const{classes:t}=e;return qn({root:["panelContent"]},ni,t)},Atn=Si("div",{name:"MuiDataGrid",slot:"PanelContent"})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,padding:xr.spacing(2.5,1.5,2,1),gap:xr.spacing(2.5)});function Ttn(e){const{className:t}=e,n=sr(e,Ptn),r=br(),o=Itn(r);return s.jsx(Atn,we({className:Ae(o.root,t),ownerState:r},n))}const ktn=["className"],Mtn=e=>{const{classes:t}=e;return qn({root:["panelFooter"]},ni,t)},Rtn=qt("div",{name:"MuiDataGrid",slot:"PanelFooter"})({padding:xr.spacing(1),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${xr.colors.border.base}`});function Otn(e){const{className:t}=e,n=sr(e,ktn),r=br(),o=Mtn(r);return s.jsx(Rtn,we({className:Ae(o.root,t),ownerState:r},n))}const Dtn=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],Ltn=["InputComponentProps"],$tn=e=>{const{classes:t}=e;return qn({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},ni,t)},Ftn=qt("div",{name:"MuiDataGrid",slot:"FilterForm"})({display:"flex",gap:xr.spacing(1.5)}),Btn=qt("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon"})({flexShrink:0,display:"flex",justifyContent:"center",alignItems:"center"}),ztn=qt("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput"})({minWidth:75,justifyContent:"end"}),Htn=qt("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput"})({width:150}),Vtn=qt("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput"})({width:150}),Utn=qt("div",{name:"MuiDataGrid",slot:"FilterFormValueInput"})({width:190}),Gtn=e=>{switch(e){case Ip.And:return"filterPanelOperatorAnd";case Ip.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}},RT=e=>e.headerName||e.field,ENe=new Intl.Collator,PNe=so(function(t,n){var te,ye,ve,ge,Ee,xe,Ne;const{item:r,hasMultipleFilters:o,deleteFilter:i,applyFilterChanges:a,showMultiFilterOperators:l,disableMultiFilterOperator:c,applyMultiFilterOperatorChanges:u,focusElementRef:d,logicOperators:f=[Ip.And,Ip.Or],columnsSort:h,filterColumns:m,deleteIconProps:g={},logicOperatorInputProps:b={},operatorInputProps:y={},columnInputProps:v={},valueInputProps:x={},readOnly:S}=t,C=sr(t,Dtn),_=Po(),N=Wn(_,h1),E=Wn(_,mGe),I=Wn(_,md),A=pi(),R=pi(),k=pi(),T=pi(),D=br(),O=$tn(D),z=p.useRef(null),F=p.useRef(null),U=I.logicOperator??Ip.And,G=o&&f.length>0,Y=(((te=D.slotProps)==null?void 0:te.baseSelect)||{}).native??!1,B=((ye=D.slotProps)==null?void 0:ye.baseSelectOption)||{},{InputComponentProps:$}=x,K=sr(x,Ltn),q=Wn(_,O_),Z=Wn(_,Xde),{filteredColumns:J,selectedField:oe}=p.useMemo(()=>{let _e=r.field;const Be=N[r.field].filterable===!1?N[r.field]:null;if(Be)return{filteredColumns:[Be],selectedField:_e};if(q)return{filteredColumns:E.filter(Ge=>Z.get(Ge.field)!==void 0),selectedField:_e};if(m===void 0||typeof m!="function")return{filteredColumns:E,selectedField:_e};const Te=m({field:r.field,columns:E,currentFilters:(I==null?void 0:I.items)||[]});return{filteredColumns:E.filter(Ge=>{const Ze=Te.includes(Ge.field);return Ge.field===r.field&&!Ze&&(_e=void 0),Ze}),selectedField:_e}},[r.field,N,q,m,E,I==null?void 0:I.items,Z]),de=p.useMemo(()=>{switch(h){case"asc":return J.sort((_e,Be)=>ENe.compare(RT(_e),RT(Be)));case"desc":return J.sort((_e,Be)=>-ENe.compare(RT(_e),RT(Be)));default:return J}},[J,h]),ae=r.field?_.current.getColumn(r.field):null,ue=p.useMemo(()=>{var _e;return!r.operator||!ae?null:(_e=ae.filterOperators)==null?void 0:_e.find(Be=>Be.value===r.operator)},[r,ae]),ce=p.useCallback(_e=>{const Be=_e.target.value,Te=_.current.getColumn(Be);if(Te.field===ae.field)return;const Ge=Te.filterOperators.find(Oe=>Oe.value===r.operator)||Te.filterOperators[0];let ht=!Ge.InputComponent||Ge.InputComponent!==(ue==null?void 0:ue.InputComponent)||Te.type!==ae.type?void 0:r.value;if(Te.type==="singleSelect"&&ht!==void 0){const Oe=Te,ft=R_(Oe);Array.isArray(ht)?ht=ht.filter(Qe=>$B(Qe,ft,Oe==null?void 0:Oe.getOptionValue)!==void 0):$B(r.value,ft,Oe==null?void 0:Oe.getOptionValue)===void 0&&(ht=void 0)}a(we({},r,{field:Be,operator:Ge.value,value:ht}))},[_,a,r,ae,ue]),se=p.useCallback(_e=>{const Be=_e.target.value,Te=ae==null?void 0:ae.filterOperators.find(Ze=>Ze.value===Be),Ge=!(Te!=null&&Te.InputComponent)||(Te==null?void 0:Te.InputComponent)!==(ue==null?void 0:ue.InputComponent);a(we({},r,{operator:Be,value:Ge?void 0:r.value}))},[a,r,ae,ue]),me=p.useCallback(_e=>{const Be=_e.target.value===Ip.And.toString()?Ip.And:Ip.Or;u(Be)},[u]),fe=()=>{i(r)};return p.useImperativeHandle(d,()=>({focus:()=>{var _e;ue!=null&&ue.InputComponent?(_e=z==null?void 0:z.current)==null||_e.focus():F.current.focus()}}),[ue]),s.jsxs(Ftn,we({className:O.root,"data-id":r.id,ownerState:D},C,{ref:n,children:[s.jsx(Btn,we({},g,{className:Ae(O.deleteIcon,g.className),ownerState:D,children:s.jsx(D.slots.baseIconButton,we({"aria-label":_.current.getLocaleText("filterPanelDeleteIconLabel"),title:_.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:fe,size:"small",disabled:S},(ve=D.slotProps)==null?void 0:ve.baseIconButton,{children:s.jsx(D.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),s.jsx(ztn,we({as:D.slots.baseSelect,sx:[G?{display:"flex"}:{display:"none"},l?{visibility:"visible"}:{visibility:"hidden"},b.sx],className:Ae(O.logicOperatorInput,b.className),ownerState:D},b,{size:"small",slotProps:{htmlInput:{"aria-label":_.current.getLocaleText("filterPanelLogicOperator")}},value:U??"",onChange:me,disabled:!!c||f.length===1,native:Y},(ge=D.slotProps)==null?void 0:ge.baseSelect,{children:f.map(_e=>p.createElement(D.slots.baseSelectOption,we({},B,{native:Y,key:_e.toString(),value:_e.toString()}),_.current.getLocaleText(Gtn(_e))))})),s.jsx(Htn,we({as:D.slots.baseSelect},v,{className:Ae(O.columnInput,v.className),ownerState:D,size:"small",labelId:R,id:A,label:_.current.getLocaleText("filterPanelColumns"),value:oe??"",onChange:ce,native:Y,disabled:S},(Ee=D.slotProps)==null?void 0:Ee.baseSelect,{children:de.map(_e=>p.createElement(D.slots.baseSelectOption,we({},B,{native:Y,key:_e.field,value:_e.field}),RT(_e)))})),s.jsx(Vtn,we({as:D.slots.baseSelect,size:"small"},y,{className:Ae(O.operatorInput,y.className),ownerState:D,labelId:T,label:_.current.getLocaleText("filterPanelOperator"),id:k,value:r.operator,onChange:se,native:Y,inputRef:F,disabled:S},(xe=D.slotProps)==null?void 0:xe.baseSelect,{children:(Ne=ae==null?void 0:ae.filterOperators)==null?void 0:Ne.map(_e=>p.createElement(D.slots.baseSelectOption,we({},B,{native:Y,key:_e.value,value:_e.value}),_e.label||_.current.getLocaleText(`filterOperator${_n(_e.value)}`)))})),s.jsx(Utn,we({},K,{className:Ae(O.valueInput,K.className),ownerState:D,children:ue!=null&&ue.InputComponent?s.jsx(ue.InputComponent,we({apiRef:_,item:r,applyValue:a,focusElementRef:z,disabled:S,slotProps:{root:{size:"small"}}},ue.InputComponentProps,$),r.field):null}))]}))}),Wtn=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],INe=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),qtn=so(function(t,n){var T,D;const r=Po(),o=br(),i=Wn(r,md),a=Wn(r,mGe),l=Wn(r,RYt),c=p.useRef(null),u=p.useRef(null),{logicOperators:d=[Ip.And,Ip.Or],columnsSort:f,filterFormProps:h,getColumnForNewFilter:m,disableAddFilterButton:g=!1,disableRemoveAllButton:b=!1}=t,y=sr(t,Wtn),v=r.current.upsertFilterItem,x=p.useCallback(O=>{r.current.setFilterLogicOperator(O)},[r]),S=p.useCallback(()=>{let O;if(m&&typeof m=="function"){const z=m({currentFilters:(i==null?void 0:i.items)||[],columns:a});if(z===null)return null;O=a.find(({field:F})=>F===z)}else O=a.find(z=>{var F;return(F=z.filterOperators)==null?void 0:F.length});return O?INe(O):null},[i==null?void 0:i.items,a,m]),C=p.useCallback(()=>{if(m===void 0||typeof m!="function")return S();const O=i.items.length?i.items:[S()].filter(Boolean),z=m({currentFilters:O,columns:a});if(z===null)return null;const F=a.find(({field:U})=>U===z);return F?INe(F):null},[i.items,a,m,S]),_=p.useMemo(()=>i.items.length?i.items:(u.current||(u.current=S()),u.current?[u.current]:[]),[i.items,S]),N=_.length>1,{readOnlyFilters:E,validFilters:I}=p.useMemo(()=>_.reduce((O,z)=>(l[z.field]?O.validFilters.push(z):O.readOnlyFilters.push(z),O),{readOnlyFilters:[],validFilters:[]}),[_,l]),A=p.useCallback(()=>{const O=C();O&&r.current.upsertFilterItems([..._,O])},[r,C,_]),R=p.useCallback(O=>{const z=I.length===1;r.current.deleteFilterItem(O),z&&r.current.hideFilterPanel()},[r,I.length]),k=p.useCallback(()=>I.length===1&&I[0].value===void 0?(r.current.deleteFilterItem(I[0]),r.current.hideFilterPanel()):r.current.setFilterModel(we({},i,{items:E}),"removeAllFilterItems"),[r,E,i,I]);return p.useEffect(()=>{d.length>0&&i.logicOperator&&!d.includes(i.logicOperator)&&x(d[0])},[d,x,i.logicOperator]),p.useEffect(()=>{I.length>0&&c.current.focus()},[I.length]),s.jsxs(gWe,we({},y,{ref:n,children:[s.jsxs(Ttn,{children:[E.map((O,z)=>s.jsx(PNe,we({item:O,applyFilterChanges:v,deleteFilter:R,hasMultipleFilters:N,showMultiFilterOperators:z>0,disableMultiFilterOperator:z!==1,applyMultiFilterOperatorChanges:x,focusElementRef:null,readOnly:!0,logicOperators:d,columnsSort:f},h),O.id==null?z:O.id)),I.map((O,z)=>s.jsx(PNe,we({item:O,applyFilterChanges:v,deleteFilter:R,hasMultipleFilters:N,showMultiFilterOperators:E.length+z>0,disableMultiFilterOperator:E.length+z!==1,applyMultiFilterOperatorChanges:x,focusElementRef:z===I.length-1?c:null,logicOperators:d,columnsSort:f},h),O.id==null?z+E.length:O.id))]}),!o.disableMultipleColumnsFiltering&&!(g&&b)?s.jsxs(Otn,{children:[g?s.jsx("span",{}):s.jsx(o.slots.baseButton,we({onClick:A,startIcon:s.jsx(o.slots.filterPanelAddIcon,{})},(T=o.slotProps)==null?void 0:T.baseButton,{children:r.current.getLocaleText("filterPanelAddFilter")})),!b&&I.length>0?s.jsx(o.slots.baseButton,we({onClick:k,startIcon:s.jsx(o.slots.filterPanelRemoveAllIcon,{})},(D=o.slotProps)==null?void 0:D.baseButton,{children:r.current.getLocaleText("filterPanelRemoveAll")})):null]}):null]}))}),Ktn=(e,t)=>{const n=new Set(Object.keys(e).filter(i=>e[i]===!1)),r=new Set(Object.keys(t).filter(i=>t[i]===!1));if(n.size!==r.size)return!1;let o=!0;return n.forEach(i=>{r.has(i)||(o=!1)}),o},Ytn=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,Xtn=["children"],Ztn=Dh({from:{opacity:0},to:{opacity:1}}),Jtn=Dh({"from, to":{"--scrollable":'" "'}}),Qtn=Si("div",{name:"MuiDataGrid",slot:"ShadowScrollArea"})` + flex: 1; + display: flex; + flex-direction: column; + animation: ${Jtn}; + animation-timeline: --scroll-timeline; + animation-fill-mode: none; + box-sizing: border-box; + overflow: auto; + scrollbar-width: thin; + scroll-timeline: --scroll-timeline block; + + &::before, + &::after { + content: ''; + flex-shrink: 0; + display: block; + position: sticky; + left: 0; + width: 100%; + height: 4px; + animation: ${Ztn} linear both; + animation-timeline: --scroll-timeline; + + // Custom property toggle trick: + // - Detects if the element is scrollable + // - https://css-tricks.com/the-css-custom-property-toggle-trick/ + --visibility-scrollable: var(--scrollable) visible; + --visibility-not-scrollable: hidden; + visibility: var(--visibility-scrollable, var(--visibility-not-scrollable)); + } + + &::before { + top: 0; + background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0, transparent 100%); + animation-range: 0 4px; + } + + &::after { + bottom: 0; + background: linear-gradient(to top, rgba(0, 0, 0, 0.05) 0, transparent 100%); + animation-direction: reverse; + animation-range: calc(100% - 4px) 100%; + } +`,enn=so(function(t,n){const{children:r}=t,o=sr(t,Xtn);return s.jsx(Qtn,we({},o,{ref:n,children:r}))}),tnn=e=>{const{classes:t}=e;return qn({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},ni,t)},ANe=new Intl.Collator;function nnn(e){var Y,B,$,K;const t=Po(),n=p.useRef(null),r=Wn(t,MYt),o=Wn(t,bg),i=br(),[a,l]=p.useState(""),c=tnn(i),u=Wn(t,Cm),d=Wn(t,O_),f=Wn(t,Xde),h=p.useMemo(()=>d?Array.from(f.values()):u,[d,f,u]),{sort:m,searchPredicate:g=Ytn,autoFocusSearchField:b=!0,disableShowHideToggle:y=!1,disableResetButton:v=!1,toggleAllMode:x="all",getTogglableColumns:S,searchInputProps:C,searchDebounceMs:_=i.columnFilterDebounceMs}=e,N=p.useMemo(()=>Fb(q=>{l(q)},_??150),[_]),E=p.useMemo(()=>Ktn(o,r),[o,r]),I=p.useMemo(()=>{switch(m){case"asc":return[...h].sort((q,Z)=>ANe.compare(q.headerName||q.field,Z.headerName||Z.field));case"desc":return[...h].sort((q,Z)=>-ANe.compare(q.headerName||q.field,Z.headerName||Z.field));default:return h}},[h,m]),A=q=>{const{name:Z}=q.target;t.current.setColumnVisibility(Z,o[Z]===!1)},R=p.useMemo(()=>{const q=S?S(I):null,Z=q?I.filter(({field:J})=>q.includes(J)):I;return a?Z.filter(J=>g(J,a.toLowerCase())):Z},[I,a,g,S]),k=p.useCallback(q=>{const Z=bg(t),J=we({},Z),oe=S?S(h):null;return(x==="filteredOnly"?R:h).forEach(de=>{de.hideable&&(oe==null||oe.includes(de.field))&&(q?delete J[de.field]:J[de.field]=!1)}),t.current.setColumnVisibilityModel(J)},[t,h,S,x,R]),T=p.useCallback(q=>{N(q.target.value)},[N]),D=p.useMemo(()=>R.filter(q=>q.hideable),[R]),O=p.useMemo(()=>D.every(q=>o[q.field]==null||o[q.field]!==!1),[o,D]),z=p.useMemo(()=>D.every(q=>o[q.field]===!1),[o,D]),F=p.useRef(null);p.useEffect(()=>{var q;b?(q=n.current)==null||q.focus():F.current&&typeof F.current.focus=="function"&&F.current.focus()},[b]);let U=!1;const G=q=>U===!1&&q.hideable!==!1?(U=!0,!0):!1,W=p.useCallback(()=>{l(""),n.current&&(n.current.value="",n.current.focus())},[]);return s.jsxs(p.Fragment,{children:[s.jsx(inn,{className:c.header,ownerState:i,children:s.jsx(ann,we({as:i.slots.baseTextField,ownerState:i,placeholder:t.current.getLocaleText("columnsManagementSearchTitle"),inputRef:n,className:c.searchInput,onChange:T,size:"small",type:"search",slotProps:{input:{startAdornment:s.jsx(i.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:s.jsx(i.slots.baseIconButton,we({size:"small","aria-label":t.current.getLocaleText("columnsManagementDeleteIconLabel"),style:a?{visibility:"visible"}:{visibility:"hidden"},tabIndex:-1,onClick:W,edge:"end"},(Y=i.slotProps)==null?void 0:Y.baseIconButton,{children:s.jsx(i.slots.quickFilterClearIcon,{fontSize:"small"})}))},htmlInput:{"aria-label":t.current.getLocaleText("columnsManagementSearchTitle")}},autoComplete:"off",fullWidth:!0},(B=i.slotProps)==null?void 0:B.baseTextField,C))}),s.jsx(onn,{ownerState:i,children:s.jsxs(rnn,{className:c.root,ownerState:i,children:[R.map(q=>{var Z;return s.jsx(cnn,we({as:i.slots.baseCheckbox,className:c.row,disabled:q.hideable===!1||d,checked:o[q.field]!==!1,onChange:A,name:q.field,inputRef:G(q)?F:void 0,label:q.headerName||q.field,density:"compact",fullWidth:!0},(Z=i.slotProps)==null?void 0:Z.baseCheckbox),q.field)}),R.length===0&&s.jsx(lnn,{ownerState:i,children:t.current.getLocaleText("columnsManagementNoColumns")})]})}),!y||!v?s.jsxs(snn,{ownerState:i,className:c.footer,children:[y?s.jsx("span",{}):s.jsx(i.slots.baseCheckbox,we({disabled:D.length===0||d,checked:O,indeterminate:!O&&!z,onChange:()=>k(!O),name:t.current.getLocaleText("columnsManagementShowHideAllText"),label:t.current.getLocaleText("columnsManagementShowHideAllText"),density:"compact"},($=i.slotProps)==null?void 0:$.baseCheckbox)),v?null:s.jsx(i.slots.baseButton,we({onClick:()=>t.current.setColumnVisibilityModel(r),disabled:E||d},(K=i.slotProps)==null?void 0:K.baseButton,{children:t.current.getLocaleText("columnsManagementReset")}))]}):null]})}const rnn=qt("div",{name:"MuiDataGrid",slot:"ColumnsManagement"})({display:"flex",flexDirection:"column",padding:xr.spacing(.5,1.5)}),onn=qt(enn,{name:"MuiDataGrid",slot:"ColumnsManagementScrollArea"})({maxHeight:300}),inn=qt("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader"})({padding:xr.spacing(1.5,2),borderBottom:`1px solid ${xr.colors.border.base}`}),ann=qt(Jb,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput"})({[`& .${Sf.input}::-webkit-search-decoration, + & .${Sf.input}::-webkit-search-cancel-button, + & .${Sf.input}::-webkit-search-results-button, + & .${Sf.input}::-webkit-search-results-decoration`]:{display:"none"}}),snn=qt("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter"})({padding:xr.spacing(1,1,1,1.5),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${xr.colors.border.base}`}),lnn=qt("div",{name:"MuiDataGrid",slot:"ColumnsManagementEmptyText"})({padding:xr.spacing(1,0),alignSelf:"center",font:xr.typography.font.body}),cnn=qt(Jb,{name:"MuiDataGrid",slot:"ColumnsManagementRow"})({}),unn=so(function(t,n){var v,x;const{children:r,slotProps:o={}}=t,i=o.button||{},a=o.tooltip||{},l=Po(),c=br(),u=pi(),d=pi(),[f,h]=p.useState(!1),m=p.useRef(null),g=Yi(n,m),b=S=>{var C;h(_=>!_),(C=i.onClick)==null||C.call(i,S)},y=()=>h(!1);return r==null?null:s.jsxs(p.Fragment,{children:[s.jsx(c.slots.baseTooltip,we({title:l.current.getLocaleText("toolbarExportLabel"),enterDelay:1e3},(v=c.slotProps)==null?void 0:v.baseTooltip,a,{children:s.jsx(c.slots.baseButton,we({size:"small",startIcon:s.jsx(c.slots.exportIcon,{}),"aria-expanded":f,"aria-label":l.current.getLocaleText("toolbarExportLabel"),"aria-haspopup":"menu","aria-controls":f?d:void 0,id:u},(x=c.slotProps)==null?void 0:x.baseButton,i,{onClick:b,ref:g,children:l.current.getLocaleText("toolbarExport")}))})),s.jsx(SV,{open:f,target:m.current,onClose:y,position:"bottom-end",children:s.jsx(c.slots.baseMenuList,{id:d,className:He.menuList,"aria-labelledby":u,autoFocusItem:f,children:p.Children.map(r,S=>p.isValidElement(S)?p.cloneElement(S,{hideMenu:y}):S)})})]})}),dnn=["hideMenu","options"],fnn=["hideMenu","options"],pnn=["csvOptions","printOptions","excelOptions"];function hnn(e){const t=Po(),n=br(),{hideMenu:r,options:o}=e,i=sr(e,dnn);return s.jsx(n.slots.baseMenuItem,we({onClick:()=>{t.current.exportDataAsCsv(o),r==null||r()}},i,{children:t.current.getLocaleText("toolbarExportCSV")}))}function mnn(e){const t=Po(),n=br(),{hideMenu:r,options:o}=e,i=sr(e,fnn);return s.jsx(n.slots.baseMenuItem,we({onClick:()=>{t.current.exportDataAsPrint(o),r==null||r()}},i,{children:t.current.getLocaleText("toolbarExportPrint")}))}so(function(t,n){const r=t,{csvOptions:o={},printOptions:i={},excelOptions:a}=r,l=sr(r,pnn),u=Po().current.unstable_applyPipeProcessors("exportMenu",[],{excelOptions:a,csvOptions:o,printOptions:i}).sort((d,f)=>d.componentName>f.componentName?1:-1);return u.length===0?null:s.jsx(unn,we({},l,{ref:n,children:u.map((d,f)=>p.cloneElement(d.component,{key:f}))}))});const yWe=p.createContext(void 0);function rfe(){const e=p.useContext(yWe);if(e===void 0)throw new Error("MUI X: Missing context. Quick Filter subcomponents must be placed within a component.");return e}const gnn=["render","className","parser","formatter","debounceMs","defaultExpanded","expanded","onExpandedChange"],ynn=e=>e.split(" ").filter(t=>t!==""),bnn=e=>e.join(" ");function vnn(e){const t=br(),{render:n,className:r,parser:o=ynn,formatter:i=bnn,debounceMs:a=t.filterDebounceMs,defaultExpanded:l,expanded:c,onExpandedChange:u}=e,d=sr(e,gnn),f=Po(),h=p.useRef(null),m=p.useRef(null),g=Wn(f,NGe),[b,y]=p.useState(i(g??[])),[v,x]=p.useState(l??b.length>0),S=c??v,C=p.useMemo(()=>({value:b,expanded:S}),[b,S]),_=typeof r=="function"?r(C):r,N=p.useRef(null),E=pi(),I=p.useCallback(U=>{u&&u(U),c===void 0&&x(U)},[u,c]),A=p.useRef(g);p.useEffect(()=>{jg(A.current,g)||(A.current=g,y(U=>jg(o(U),g)?U:i(g??[])))},[g,i,o]);const R=p.useRef(!0),k=p.useRef(S);p.useEffect(()=>{var U;if(R.current){R.current=!1;return}k.current!==S&&(S?requestAnimationFrame(()=>{var G;(G=h.current)==null||G.focus({preventScroll:!0})}):(U=m.current)==null||U.focus({preventScroll:!0}),k.current=S)},[S]);const T=p.useMemo(()=>Fb(U=>{const G=o(U);A.current=G,f.current.setQuickFilterValues(G)},a),[f,a,o]);p.useEffect(()=>T.clear,[T]);const D=p.useCallback(U=>{const G=U.target.value;y(G),T(G)},[T]),O=p.useCallback(()=>{var U;y(""),f.current.setQuickFilterValues([]),(U=h.current)==null||U.focus()},[f,h]),z=p.useMemo(()=>({controlRef:h,triggerRef:m,state:C,controlId:E,clearValue:O,onValueChange:D,onExpandedChange:I}),[E,C,D,O,I]);wa(()=>{var U;N.current&&m.current&&N.current.style.setProperty("--trigger-width",`${(U=m.current)==null?void 0:U.offsetWidth}px`)},[]);const F=Qb("div",n,we({className:_},d,{ref:N}),C);return s.jsx(yWe.Provider,{value:z,children:F})}const xnn=["render","className","slotProps","onKeyDown","onChange"],wnn=so(function(t,n){var N;const{render:r,className:o,slotProps:i,onKeyDown:a,onChange:l}=t,c=sr(t,xnn),u=br(),{state:d,controlId:f,controlRef:h,onValueChange:m,onExpandedChange:g,clearValue:b}=rfe(),y=typeof o=="function"?o(d):o,v=Yi(h,n),x=E=>{E.key==="Escape"&&(d.value===""?g(!1):b()),a==null||a(E)},S=E=>{var I,A;d.value===""&&g(!1),(A=(I=i==null?void 0:i.htmlInput)==null?void 0:I.onBlur)==null||A.call(I,E)},C=E=>{d.expanded||g(!0),m(E),l==null||l(E)},_=Qb(u.slots.baseTextField,r,we({},(N=u.slotProps)==null?void 0:N.baseTextField,{slotProps:we({htmlInput:we({role:"searchbox",id:f,tabIndex:d.expanded?void 0:-1},i==null?void 0:i.htmlInput,{onBlur:S})},i),value:d.value,className:y},c,{onChange:C,onKeyDown:x,ref:v}),d);return s.jsx(p.Fragment,{children:_})}),Snn=["render","className","onClick"],Cnn=so(function(t,n){var m;const{render:r,className:o,onClick:i}=t,a=sr(t,Snn),l=br(),{state:c,clearValue:u}=rfe(),d=typeof o=="function"?o(c):o,f=g=>{u(),i==null||i(g)},h=Qb(l.slots.baseIconButton,r,we({},(m=l.slotProps)==null?void 0:m.baseIconButton,{className:d,tabIndex:-1},a,{onClick:f,ref:n}),c);return s.jsx(p.Fragment,{children:h})}),_nn=["render","className","onClick"],jnn=so(function(t,n){var y;const{render:r,className:o,onClick:i}=t,a=sr(t,_nn),l=br(),{state:c,controlId:u,onExpandedChange:d,triggerRef:f}=rfe(),h=typeof o=="function"?o(c):o,m=Yi(f,n),g=v=>{d(!c.expanded),i==null||i(v)},b=Qb(l.slots.baseButton,r,we({},(y=l.slotProps)==null?void 0:y.baseButton,{className:h,"aria-controls":u,"aria-expanded":c.expanded},a,{onClick:g,ref:m}),c);return s.jsx(p.Fragment,{children:b})}),Nnn=["quickFilterParser","quickFilterFormatter","debounceMs","className","slotProps"],Enn=["ref","slotProps"],Pnn=e=>{const{classes:t}=e;return qn({root:["toolbarQuickFilter"],trigger:["toolbarQuickFilterTrigger"],control:["toolbarQuickFilterControl"]},ni,t)},Inn=Si("div",{name:"MuiDataGrid",slot:"ToolbarQuickFilter"})({display:"grid",alignItems:"center"}),Ann=Si(m8,{name:"MuiDataGrid",slot:"ToolbarQuickFilterTrigger"})(({ownerState:e})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:e.expanded?0:1,pointerEvents:e.expanded?"none":"auto",transition:xr.transition(["opacity"])})),Tnn=Si(e=>{throw new Error("Failed assertion: should not be rendered")},{name:"MuiDataGrid",slot:"ToolbarQuickFilterControl"})(({ownerState:e})=>({gridArea:"1 / 1",overflowX:"clip",width:e.expanded?260:"var(--trigger-width)",opacity:e.expanded?1:0,transition:xr.transition(["width","opacity"])}));function knn(e){const t=Po(),n=br(),r={classes:n.classes,expanded:!1},o=Pnn(r),{quickFilterParser:i,quickFilterFormatter:a,debounceMs:l,className:c,slotProps:u}=e,d=sr(e,Nnn);return s.jsx(vnn,{parser:i,formatter:a,debounceMs:l,render:(f,h)=>{const m=we({},r,{expanded:h.expanded});return s.jsxs(Inn,we({},f,{className:Ae(o.root,c),children:[s.jsx(jnn,{render:g=>s.jsx(n.slots.baseTooltip,{title:t.current.getLocaleText("toolbarQuickFilterLabel"),enterDelay:0,children:s.jsx(Ann,we({className:o.trigger},g,{ownerState:m,color:"default","aria-disabled":h.expanded,children:s.jsx(n.slots.quickFilterIcon,{fontSize:"small"})}))})}),s.jsx(wnn,{render:g=>{var x;let{ref:b,slotProps:y}=g,v=sr(g,Enn);return s.jsx(Tnn,we({as:n.slots.baseTextField,className:o.control,ownerState:m,inputRef:b,"aria-label":t.current.getLocaleText("toolbarQuickFilterLabel"),placeholder:t.current.getLocaleText("toolbarQuickFilterPlaceholder"),size:"small",slotProps:we({input:we({startAdornment:s.jsx(n.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:v.value?s.jsx(Cnn,{render:s.jsx(n.slots.baseIconButton,{size:"small",edge:"end","aria-label":t.current.getLocaleText("toolbarQuickFilterDeleteIconLabel"),children:s.jsx(n.slots.quickFilterClearIcon,{fontSize:"small"})})}):null},y==null?void 0:y.input)},y)},(x=n.slotProps)==null?void 0:x.baseTextField,v,u==null?void 0:u.root,d))}})]}))}})}const Mnn=["render","className","onClick","onPointerUp"],Rnn=so(function(t,n){var E;const{render:r,className:o,onClick:i,onPointerUp:a}=t,l=sr(t,Mnn),c=br(),u=pi(),d=pi(),f=Po(),h=Wn(f,D_),m=h.open&&h.openedPanelValue===Mp.filters,b=Wn(f,Gde).length,y={open:m,filterCount:b},v=typeof o=="function"?o(y):o,{filterPanelTriggerRef:x}=tfe(),S=Yi(n,x),C=I=>{m?f.current.hidePreferences():f.current.showPreferences(Mp.filters,d,u),i==null||i(I)},_=I=>{m&&I.stopPropagation(),a==null||a(I)},N=Qb(c.slots.baseButton,r,we({},(E=c.slotProps)==null?void 0:E.baseButton,{id:u,"aria-haspopup":"true","aria-expanded":m?"true":void 0,"aria-controls":m?d:void 0,onClick:C,onPointerUp:_,className:v},l,{ref:S}),y);return s.jsx(p.Fragment,{children:N})}),Onn=["render","className","onClick","onPointerUp"],Dnn=so(function(t,n){var _;const{render:r,className:o,onClick:i,onPointerUp:a}=t,l=sr(t,Onn),c=br(),u=pi(),d=pi(),f=Po(),h=Wn(f,D_),m=h.open&&h.openedPanelValue===Mp.columns,g={open:m},b=typeof o=="function"?o(g):o,{columnsPanelTriggerRef:y}=tfe(),v=Yi(n,y),x=N=>{m?f.current.hidePreferences():f.current.showPreferences(Mp.columns,d,u),i==null||i(N)},S=N=>{m&&N.stopPropagation(),a==null||a(N)},C=Qb(c.slots.baseButton,r,we({},(_=c.slotProps)==null?void 0:_.baseButton,{id:u,"aria-haspopup":"true","aria-expanded":m?"true":void 0,"aria-controls":m?d:void 0,className:b},l,{onPointerUp:S,onClick:x,ref:v}),g);return s.jsx(p.Fragment,{children:C})}),Lnn=["render","options","onClick"],$nn=so(function(t,n){var f;const{render:r,options:o,onClick:i}=t,a=sr(t,Lnn),l=br(),c=Po(),u=h=>{c.current.exportDataAsCsv(o),i==null||i(h)},d=Qb(l.slots.baseButton,r,we({},(f=l.slotProps)==null?void 0:f.baseButton,{onClick:u},a,{ref:n}));return s.jsx(p.Fragment,{children:d})}),Fnn=["render","options","onClick"],Bnn=so(function(t,n){var f;const{render:r,options:o,onClick:i}=t,a=sr(t,Fnn),l=br(),c=Po(),u=h=>{c.current.exportDataAsPrint(o),i==null||i(h)},d=Qb(l.slots.baseButton,r,we({},(f=l.slotProps)==null?void 0:f.baseButton,{onClick:u},a,{ref:n}));return s.jsx(p.Fragment,{children:d})}),znn=["className"],Hnn=["className"],Vnn=["showQuickFilter","quickFilterProps","csvOptions","printOptions","additionalItems","additionalExportMenuItems"],bWe=e=>{const{classes:t}=e;return qn({divider:["toolbarDivider"],label:["toolbarLabel"]},ni,t)},Unn=Si(Jb,{name:"MuiDataGrid",slot:"ToolbarDivider"})({height:"50%",margin:xr.spacing(0,.5)}),Gnn=Si("span",{name:"MuiDataGrid",slot:"ToolbarLabel"})({flex:1,font:xr.typography.font.large,fontWeight:xr.typography.fontWeight.medium,margin:xr.spacing(0,.5),textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"});function TNe(e){const t=sr(e,znn),n=br(),r=bWe(n);return s.jsx(Unn,we({as:n.slots.baseDivider,orientation:"vertical",className:r.divider},t))}function Wnn(e){const t=sr(e,Hnn),n=br(),r=bWe(n);return s.jsx(Gnn,we({className:r.label},t))}function qnn(e){var v,x,S;const{showQuickFilter:t=!0,quickFilterProps:n,csvOptions:r,printOptions:o,additionalItems:i,additionalExportMenuItems:a}=e,l=sr(e,Vnn),c=Po(),u=br(),[d,f]=p.useState(!1),h=p.useRef(null),m=pi(),g=pi(),b=!(r!=null&&r.disableToolbarButton)||!(o!=null&&o.disableToolbarButton)||a,y=()=>f(!1);return s.jsxs(fen,we({},l,{children:[u.label&&s.jsx(Wnn,{children:u.label}),!u.disableColumnSelector&&s.jsx(u.slots.baseTooltip,{title:c.current.getLocaleText("toolbarColumns"),children:s.jsx(Dnn,{render:s.jsx(m8,{}),children:s.jsx(u.slots.columnSelectorIcon,{fontSize:"small"})})}),!u.disableColumnFilter&&s.jsx(u.slots.baseTooltip,{title:c.current.getLocaleText("toolbarFilters"),children:s.jsx(Rnn,{render:(C,_)=>s.jsx(m8,we({},C,{color:_.filterCount>0?"primary":"default",children:s.jsx(u.slots.baseBadge,{badgeContent:_.filterCount,color:"primary",variant:"dot",children:s.jsx(u.slots.openFilterButtonIcon,{fontSize:"small"})})}))})}),i,b&&(!u.disableColumnFilter||!u.disableColumnSelector)&&s.jsx(TNe,{}),b&&s.jsxs(p.Fragment,{children:[s.jsx(u.slots.baseTooltip,{title:c.current.getLocaleText("toolbarExport"),disableInteractive:d,children:s.jsx(m8,{ref:h,id:g,"aria-controls":m,"aria-haspopup":"true","aria-expanded":d?"true":void 0,onClick:()=>f(!d),children:s.jsx(u.slots.exportIcon,{fontSize:"small"})})}),s.jsx(SV,{target:h.current,open:d,onClose:y,position:"bottom-end",children:s.jsxs(u.slots.baseMenuList,we({id:m,"aria-labelledby":g,autoFocusItem:!0},(v=u.slotProps)==null?void 0:v.baseMenuList,{children:[!(o!=null&&o.disableToolbarButton)&&s.jsx(Bnn,{render:s.jsx(u.slots.baseMenuItem,we({},(x=u.slotProps)==null?void 0:x.baseMenuItem)),options:o,onClick:y,children:c.current.getLocaleText("toolbarExportPrint")}),!(r!=null&&r.disableToolbarButton)&&s.jsx($nn,{render:s.jsx(u.slots.baseMenuItem,we({},(S=u.slotProps)==null?void 0:S.baseMenuItem)),options:r,onClick:y,children:c.current.getLocaleText("toolbarExportCSV")}),a==null?void 0:a(y)]}))})]}),t&&s.jsxs(p.Fragment,{children:[s.jsx(TNe,{}),s.jsx(knn,we({},n))]})]}))}const Knn=["className","selectedRowCount"],Ynn=e=>{const{classes:t}=e;return qn({root:["selectedRowCount"]},ni,t)},Xnn=Si("div",{name:"MuiDataGrid",slot:"SelectedRowCount"})({alignItems:"center",display:"flex",margin:xr.spacing(0,2),visibility:"hidden",width:0,height:0,[xr.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}}),Znn=so(function(t,n){const{className:r,selectedRowCount:o}=t,i=sr(t,Knn),a=Po(),l=br(),c=Ynn(l),u=a.current.getLocaleText("footerRowSelected")(o);return s.jsx(Xnn,we({className:Ae(c.root,r),ownerState:l},i,{ref:n,children:u}))}),Jnn=so(function(t,n){var f,h;const r=Po(),o=br(),i=Wn(r,qKt),a=Wn(r,NV),l=Wn(r,w4),c=!o.hideFooterSelectedRowCount&&a>0?s.jsx(Znn,{selectedRowCount:a}):s.jsx("div",{}),u=!o.hideFooterRowCount&&!o.pagination?s.jsx(o.slots.footerRowCount,we({},(f=o.slotProps)==null?void 0:f.footerRowCount,{rowCount:i,visibleRowCount:l})):null,d=o.pagination&&!o.hideFooterPagination&&o.slots.pagination&&s.jsx(o.slots.pagination,we({},(h=o.slotProps)==null?void 0:h.pagination));return s.jsxs(nen,we({},t,{ref:n,children:[c,u,d]}))}),C4=(e,t,n,r,o,i)=>{let a;switch(e){case ii.LEFT:a=r[n];break;case ii.RIGHT:a=o-r[n]-t+i;break;default:a=void 0;break}return Number.isNaN(a)&&(a=void 0),a},HB=(e,t,n,r,o,i)=>{const a=t===n-1;return i!=null&&i.startsWith("border")&&e===ii.LEFT&&a?!0:r?e===ii.LEFT?!0:e===ii.RIGHT?!a:!a||o:!1},VB=(e,t,n,r)=>r!=null&&r.startsWith("border")?e===ii.RIGHT&&t===0:n&&e===ii.RIGHT&&t===0,Qnn=["skeletonRowsCount","visibleColumns","showFirstRowBorder"],ern=Si("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay"})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),trn=e=>{const{classes:t}=e;return qn({root:["skeletonLoadingOverlay"]},ni,t)},kNe=e=>parseInt(e.getAttribute("data-colindex"),10),nrn=so(function(t,n){const r=br(),{slots:o}=r,i=af(),a=trn({classes:r.classes}),l=p.useRef(null),c=Yi(l,n),u=Po(),d=Wn(u,bl),f=Wn(u,Mde),h=Wn(u,Aj),m=p.useMemo(()=>h.filter(I=>I<=f).length,[f,h]),{skeletonRowsCount:g,visibleColumns:b,showFirstRowBorder:y}=t,v=sr(t,Qnn),x=Wn(u,oc),S=p.useMemo(()=>x.slice(0,m),[x,m]),C=Wn(u,xV),_=p.useCallback(I=>{if(C.left.findIndex(A=>A.field===I)!==-1)return ii.LEFT;if(C.right.findIndex(A=>A.field===I)!==-1)return ii.RIGHT},[C.left,C.right]),N=p.useMemo(()=>{const I=[];for(let A=0;Ace.field===T.field):k-C.left.length,W=d.hasScrollY?d.scrollbarSize:0,Y=kV({},i,D,C4(D,T.computedWidth,k,h,d.columnsTotalWidth,W)),B=d.columnsTotalWidth{var G,W,Y;const{colDef:A,width:R}=I,k=(G=l.current)==null?void 0:G.querySelectorAll(`[data-field="${m1(A.field)}"]`);if(!k)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const T=S.findIndex(B=>B.field===A.field),D=_(A.field),O=D===ii.LEFT,z=D===ii.RIGHT,F=getComputedStyle(k[0]).getPropertyValue("--width"),U=parseInt(F,10)-R;if(k&&k.forEach(B=>{B.style.setProperty("--width",`${R}px`)}),O){const B=(W=l.current)==null?void 0:W.querySelectorAll(`.${He["cell--pinnedLeft"]}`);B==null||B.forEach($=>{kNe($)>T&&($.style.left=`${parseInt(getComputedStyle($).left,10)-U}px`)})}if(z){const B=(Y=l.current)==null?void 0:Y.querySelectorAll(`.${He["cell--pinnedRight"]}`);B==null||B.forEach($=>{kNe($)e.slots.baseCircularProgress,style:{}},"linear-progress":{component:e=>e.slots.baseLinearProgress,style:{display:"block"}},skeleton:{component:()=>rrn,style:{display:"block"}}},arn=so(function(t,n){const{variant:r="linear-progress",noRowsVariant:o="skeleton",style:i}=t,a=sr(t,orn),l=Po(),c=br(),u=Wn(l,GI),d=irn[u===0?o:r],f=d.component(c);return s.jsx(MV,we({style:we({},d.style,i)},a,{ref:n,children:s.jsx(f,{})}))}),srn=so(function(t,n){const o=Po().current.getLocaleText("noRowsLabel");return s.jsx(MV,we({},t,{ref:n,children:o}))}),lrn=so(function(t,n){var c;const r=br(),o=Po(),i=Wn(o,Ib),a=()=>{o.current.showPreferences(Mp.columns)},l=!r.disableColumnSelector&&i.length>0;return s.jsxs(MV,we({},t,{ref:n,children:[o.current.getLocaleText("noColumnsOverlayLabel"),l&&s.jsx(r.slots.baseButton,we({size:"small"},(c=r.slotProps)==null?void 0:c.baseButton,{onClick:a,children:o.current.getLocaleText("noColumnsOverlayManageColumns")}))]}))}),crn=qt(Jb)({maxHeight:"calc(100% + 1px)",flexGrow:1});function urn(){var g;const e=Po(),t=br(),n=Wn(e,Yd),r=Wn(e,Ew),o=Wn(e,LGe),{paginationMode:i,loading:a}=t,l=r===-1&&i==="server"&&a,c=p.useMemo(()=>Math.max(0,o-1),[o]),u=p.useMemo(()=>r===-1||n.page<=c?n.page:c,[c,n.page,r]),d=p.useCallback(b=>{e.current.setPageSize(b)},[e]),f=p.useCallback((b,y)=>{e.current.setPage(y)},[e]),m=(b=>{for(let y=0;y{const{classes:t}=e;return qn({root:["rowCount"]},ni,t)},prn=Si("div",{name:"MuiDataGrid",slot:"RowCount"})({alignItems:"center",display:"flex",margin:xr.spacing(0,2)}),hrn=so(function(t,n){const{className:r,rowCount:o,visibleRowCount:i}=t,a=sr(t,drn),l=Po(),c=br(),u=frn(c);if(o===0)return null;const d=ie.rowReorder),grn=jr(ofe,e=>(e==null?void 0:e.isActive)??!1),vWe=jr(ofe,e=>(e==null?void 0:e.dropTarget)??{rowId:null,position:null});jr(vWe,e=>e.rowId??null);const yrn=jr(vWe,(e,t)=>e.rowId===t?e.position:null);jr(ofe,e=>(e==null?void 0:e.draggedRowId)??null);const brn=qt("div",{name:"MuiDataGrid",slot:"RowDragOverlay",shouldForwardProp:e=>a8(e)&&e!=="action"})(({theme:e,action:t})=>we({position:"absolute",left:0,right:0,top:0,bottom:0,pointerEvents:"none",zIndex:1},t==="above"&&{"&::before":{pointerEvents:"none",content:'""',position:"absolute",top:0,left:0,right:0,height:"2px",backgroundColor:(e.vars||e).palette.primary.main}},t==="below"&&{"&::after":{pointerEvents:"none",content:'""',position:"absolute",bottom:"-2px",left:0,right:0,height:"2px",backgroundColor:(e.vars||e).palette.primary.main}},t==="inside"&&{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.1)`:Ux(e.palette.primary.main,.1)})),vrn=p.memo(function(t){const{rowId:n,className:r}=t,o=Vp(),i=Wn(o,yrn,n);return i?s.jsx(brn,{action:i,className:r}):null}),xrn=["selected","rowId","row","index","style","rowHeight","className","visibleColumns","pinnedColumns","offsetLeft","columnsTotalWidth","firstColumnIndex","lastColumnIndex","focusedColumnIndex","isFirstVisible","isLastVisible","isNotVisible","showBottomBorder","scrollbarWidth","gridHasFiller","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],wrn=jr(yd,(e,{rowReordering:t,treeData:n})=>!t||n?!1:!!_V(e)),Srn=so(function(t,n){var ft;const{selected:r,rowId:o,row:i,index:a,style:l,rowHeight:c,className:u,visibleColumns:d,pinnedColumns:f,offsetLeft:h,columnsTotalWidth:m,firstColumnIndex:g,lastColumnIndex:b,focusedColumnIndex:y,isFirstVisible:v,isLastVisible:x,isNotVisible:S,showBottomBorder:C,scrollbarWidth:_,gridHasFiller:N,onClick:E,onDoubleClick:I,onMouseEnter:A,onMouseLeave:R,onMouseOut:k,onMouseOver:T}=t,D=sr(t,xrn),O=Vp(),z=wV(),F=p.useRef(null),U=br(),G=iWe(O),W=Wn(O,sg),Y=Wn(O,Aj),B=U.rowReordering,$=U.treeData,K=Wn(O,wrn,{rowReordering:B,treeData:$}),q=Wn(O,grn),Z=Yi(F,n),J=_g(O,o),oe=Wn(O,JGe,{rowId:o,editMode:U.editMode}),de=U.editMode===zb.Row,ae=y!==void 0,ue=ae&&y>=f.left.length&&y=b,se=mrn(U.classes,{root:["row",r&&"selected",de&&"row--editable",oe&&"row--editing",v&&"row--firstVisible",x&&"row--lastVisible",C&&"row--borderBottom",c==="auto"&&"row--dynamicHeight"]}),me=z.hooks.useGridRowAriaAttributes();p.useLayoutEffect(()=>{if(G.range){const Qe=O.current.getRowIndexRelativeToVisibleRows(o);Qe!==void 0&&O.current.unstable_setLastMeasuredRowIndex(Qe)}if(F.current&&c==="auto")return O.current.observeRowHeight(F.current,o)},[O,G.range,c,o]);const fe=p.useCallback((Qe,De)=>st=>{wO(st)||O.current.getRow(o)&&(O.current.publishEvent(Qe,O.current.getRowParams(o),st),De&&De(st))},[O,o]),te=p.useCallback(Qe=>{const De=zB(Qe.target,He.cell),st=De==null?void 0:De.getAttribute("data-field");if(st){if(st===YI.field||st===zde||st==="__reorder__"||O.current.getCellMode(o,st)===ja.Edit)return;const vt=O.current.getColumn(st);if((vt==null?void 0:vt.type)===CV)return}fe("rowClick",E)(Qe)},[O,E,fe,o]),{slots:ye,slotProps:ve,disableColumnReorder:ge}=U,Ee=Wn(O,()=>we({},O.current.getRowHeightEntry(o)),void 0,nGe),xe=p.useMemo(()=>{if(S)return{opacity:0,width:0,height:0};const Qe=we({},l,{maxHeight:c==="auto"?"none":c,minHeight:c,"--height":typeof c=="number"?`${c}px`:c});if(Ee.spacingTop){const De=U.rowSpacingType==="border"?"borderTopWidth":"marginTop";Qe[De]=Ee.spacingTop}if(Ee.spacingBottom){const De=U.rowSpacingType==="border"?"borderBottomWidth":"marginBottom";let st=Qe[De];typeof st!="number"&&(st=parseInt(st||"0",10)),st+=Ee.spacingBottom,Qe[De]=st}return Qe},[S,c,l,Ee.spacingTop,Ee.spacingBottom,U.rowSpacingType]);if(!J)return null;const Ne=O.current.unstable_applyPipeProcessors("rowClassName",[],o),_e=me(J,a);if(typeof U.getRowClassName=="function"){const Qe=a-(((ft=G.range)==null?void 0:ft.firstRowIndex)||0),De=we({},O.current.getRowParams(o),{isFirstVisible:Qe===0,isLastVisible:Qe===G.rows.length-1,indexRelativeToCurrentPage:Qe});Ne.push(U.getRowClassName(De))}const Be=(Qe,De,st,vt,qe=ii.NONE)=>{const Ye=O.current.unstable_getCellColSpanInfo(o,st);if(Ye!=null&&Ye.spannedByColSpan)return null;const mt=(Ye==null?void 0:Ye.cellProps.width)??Qe.computedWidth,Et=(Ye==null?void 0:Ye.cellProps.colSpan)??1,vn=C4(qe,Qe.computedWidth,st,Y,m,_);if(J.type==="skeletonRow")return s.jsx(ye.skeletonCell,{type:Qe.type,width:mt,height:c,field:Qe.field,align:Qe.align},Qe.field);const gt=Qe.field==="__reorder__",Fe=!(ge||Qe.disableReorder),$e=K&&!W.length,nt=!(Fe||gt&&$e||q),wt=qe===ii.VIRTUAL,Dt=VB(qe,De,U.showCellVerticalBorder,U.pinnedColumnsSectionSeparator),on=HB(qe,De,vt,U.showCellVerticalBorder,N,U.pinnedColumnsSectionSeparator);return s.jsx(ye.cell,we({column:Qe,width:mt,rowId:o,align:Qe.align||"left",colIndex:st,colSpan:Et,disableDragEvents:nt,isNotVisible:wt,pinnedOffset:vn,pinnedPosition:qe,showLeftBorder:Dt,showRightBorder:on,row:i,rowNode:J},ve==null?void 0:ve.cell),Qe.field)},Te=f.left.map((Qe,De)=>Be(Qe,De,De,f.left.length,ii.LEFT)),Ge=f.right.map((Qe,De)=>{const st=d.length-f.right.length+De;return Be(Qe,De,st,f.right.length,ii.RIGHT)}),Ze=d.length-f.left.length-f.right.length,ht=[];ue&&ht.push(Be(d[y],y-f.left.length,y,Ze,ii.VIRTUAL));for(let Qe=g;Qe{const e=Vp(),t=br(),n=Wn(e,oc),r=Wn(e,Ude),o=Wn(e,xO),i=Wn(e,KUe),a=t["aria-label"],l=t["aria-labelledby"];return{role:"grid","aria-label":!a&&!l&&t.label?t.label:a,"aria-labelledby":l,"aria-colcount":n.length,"aria-rowcount":o+1+i+r,"aria-multiselectable":Wde(t)}},jrn=()=>{const e=Vp(),t=Wn(e,xO);return p.useCallback((n,r)=>{const o={},i=r+t+2;return o["aria-rowindex"]=i,n&&e.current.isRowSelectable(n.id)&&(o["aria-selected"]=e.current.isRowSelected(n.id)),o},[e,t])},Nrn=e=>{const t=p.useCallback((r,o,i)=>{const a=_g(e,r),l=_g(e,o);if(!a)throw new Error(`MUI X: No row with id #${r} found.`);if(!l)throw new Error(`MUI X: No row with id #${o} found.`);if(a.type!=="leaf")throw new Error("MUI X: The row reordering does not support reordering of footer or grouping rows.");if(i==="inside")throw new Error("MUI X: The 'inside' position is only supported for tree data. Use 'above' or 'below' for flat data.");const c=EXt(e),u=c[o];if(u===void 0)throw new Error(`MUI X: Target row with id #${o} not found in current view.`);const d=c[r];if(d===void 0)throw new Error(`MUI X: Source row with id #${r} not found in current view.`);const f=u{const g=Sc(e)[Jl],y=[...g.children];return y.splice(h,0,y.splice(d,1)[0]),we({},m,{rows:we({},m.rows,{tree:we({},m.rows.tree,{[Jl]:we({},g,{children:y})})})})}),e.current.publishEvent("rowsSet"))},[e]);return{setRowIndex:p.useCallback((r,o)=>{const i=_g(e,r);if(!i)throw new Error(`MUI X: No row with id #${r} found.`);if(i.type!=="leaf")throw new Error("MUI X: The row reordering does not support reordering of footer or grouping rows.");e.current.setState(a=>{const l=Sc(e)[Jl],c=l.children,u=c.findIndex(f=>f===r);if(u===-1||u===o)return a;const d=[...c];return d.splice(o,0,d.splice(u,1)[0]),we({},a,{rows:we({},a.rows,{tree:we({},a.rows.tree,{[Jl]:we({},l,{children:d})})})})}),e.current.publishEvent("rowsSet")},[e]),setRowPosition:t}},Ern=e=>{const t=p.useCallback((o,i)=>{const a=e.current.getColumn(i),l=e.current.getRow(o);if(!l)throw new Error(`No row with id #${o} found`);return!a||!a.valueGetter?l[i]:a.valueGetter(l[a.field],l,a,e)},[e]),n=p.useCallback((o,i)=>YUe(o,i,e),[e]),r=p.useCallback((o,i)=>{const a=n(o,i);return!i||!i.valueFormatter?a:i.valueFormatter(a,o,i,e)},[e,n]);return{getCellValue:t,getRowValue:n,getRowFormattedValue:r}},Prn=()=>p.useCallback(e=>!AP(e.rowNode),[]);function Irn({privateApiRef:e,configuration:t,props:n,children:r}){const o=p.useRef(e.current.getPublicApi());return s.jsx(wGe.Provider,{value:t,children:s.jsx(LUe.Provider,{value:n,children:s.jsx(qGe.Provider,{value:e,children:s.jsx($Ue.Provider,{value:o,children:s.jsx(WQt,{children:s.jsx(KYt,{children:r})})})})})})}const Arn=e=>{const t=p.useRef(null),n=p.useRef(null),r=p.useRef(null),o=p.useRef(null),i=p.useRef(null),a=p.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:n,virtualScrollerRef:r,virtualScrollbarVerticalRef:o,virtualScrollbarHorizontalRef:i,columnHeadersContainerRef:a})},Trn=e=>{const t=af();e.current.state.isRtl===void 0&&(e.current.state.isRtl=t);const n=p.useRef(!0);p.useEffect(()=>{n.current?n.current=!1:e.current.setState(r=>we({},r,{isRtl:t}))},[e,t])},krn=PYt()&&window.localStorage.getItem("DEBUG")!=null,$k=()=>{},Mrn={debug:$k,info:$k,warn:$k,error:$k},MNe=["debug","info","warn","error"];function RNe(e,t,n=console){const r=MNe.indexOf(t);if(r===-1)throw new Error(`MUI X: Log level ${t} not recognized.`);return MNe.reduce((i,a,l)=>(l>=r?i[a]=(...c)=>{const[u,...d]=c;n[a](`MUI X: ${e} - ${u}`,...d)}:i[a]=$k,i),{})}const Rrn=(e,t)=>{const n=p.useCallback(r=>krn?RNe(r,"debug",t.logger):t.logLevel?RNe(r,t.logLevel.toString(),t.logger):Mrn,[t.logLevel,t.logger]);zo(e,{getLogger:n},"private")},Orn=(e,t)=>{const n=p.useCallback(r=>{if(t.localeText[r]==null)throw new Error(`Missing translation for key ${r}.`);return t.localeText[r]},[t.localeText]);e.current.register("public",{getLocaleText:n})};let cx=(function(e){return e.DataSource="dataSource",e.RowTree="rowTree",e})({});const YM=(e,t,n,r)=>{const o=p.useCallback(()=>{e.current.registerStrategyProcessor(t,n,r)},[e,r,n,t]);kj(()=>{o()});const i=p.useRef(!0);p.useEffect(()=>{i.current?i.current=!1:o()},[o])},$_="none",ONe={dataSourceRowsUpdate:cx.DataSource,rowTreeCreation:cx.RowTree,filtering:cx.RowTree,sorting:cx.RowTree,visibleRowsLookupCreation:cx.RowTree},Drn=e=>{const t=p.useRef(new Map),n=p.useRef({}),r=p.useCallback((c,u,d)=>{const f=()=>{const g=n.current[u],b=sr(g,[c].map(L_));n.current[u]=b};n.current[u]||(n.current[u]={});const h=n.current[u],m=h[c];return h[c]=d,!m||m===d||c===e.current.getActiveStrategy(ONe[u])&&e.current.publishEvent("activeStrategyProcessorChange",u),f},[e]),o=p.useCallback((c,u)=>{const d=e.current.getActiveStrategy(ONe[c]);if(d==null)throw new Error("Can't apply a strategy processor before defining an active strategy");const f=n.current[c];if(!f||!f[d])throw new Error(`No processor found for processor "${c}" on strategy "${d}"`);const h=f[d];return h(u)},[e]),i=p.useCallback(c=>{const d=Array.from(t.current.entries()).find(([,f])=>f.group!==c?!1:f.isAvailable());return(d==null?void 0:d[0])??$_},[]),a=p.useCallback((c,u,d)=>{t.current.set(u,{group:c,isAvailable:d}),e.current.publishEvent("strategyAvailabilityChange")},[e]);zo(e,{registerStrategyProcessor:r,applyStrategyProcessor:o,getActiveStrategy:i,setStrategyAvailability:a},"private")},Lrn=e=>{const t=p.useRef({}),n=p.useCallback(l=>{t.current[l.stateId]=l},[]),r=p.useCallback((l,c)=>{let u;if(EYt(l)?u=l(e.current.state):u=l,e.current.state===u)return!1;const d={current:{state:u}};let f=!1;const h=[];if(Object.keys(t.current).forEach(m=>{const g=t.current[m],b=g.stateSelector(e),y=g.stateSelector(d);y!==b&&(h.push({stateId:g.stateId,hasPropChanged:y!==g.propModel}),g.propModel!==void 0&&y!==g.propModel&&(f=!0))}),h.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${h[0].stateId}, therefore, you're not allowed to update ${h.map(m=>m.stateId).join(", ")} in the same transaction.`);if(f||(e.current.state=u,e.current.publishEvent("stateChange",u),e.current.store.update(u)),h.length===1){const{stateId:m,hasPropChanged:g}=h[0],b=t.current[m],y=b.stateSelector(d);b.propOnChange&&g&&b.propOnChange(y,{reason:c,api:e.current}),f||e.current.publishEvent(b.changeEvent,y,{reason:c})}return!f},[e]),o=p.useCallback((l,c,u)=>e.current.setState(d=>we({},d,{[l]:c(d[l])}),u),[e]),i={setState:r},a={updateControlState:o,registerControlState:n};zo(e,i,"public"),zo(e,a,"private")},$rn=(e,t)=>we({},e,{props:{listView:t.listView,getRowId:t.getRowId,isCellEditable:t.isCellEditable}}),Frn=(e,t)=>{const n=p.useRef(!0);p.useEffect(()=>{if(n.current){n.current=!1;return}e.current.setState(r=>we({},r,{props:{listView:t.listView,getRowId:t.getRowId,isCellEditable:t.isCellEditable,isRowSelectable:t.isRowSelectable}}))},[e,t.listView,t.getRowId,t.isCellEditable,t.isRowSelectable])},Brn=(e,t)=>{Arn(e),Frn(e,t),Trn(e),Rrn(e,t),Lrn(e),dQt(e),Drn(e),Orn(e,t),e.current.register("private",{rootProps:t})},cd=(e,t,n,r)=>{const o=p.useRef(r),i=p.useRef(!1);r!==o.current&&(i.current=!1,o.current=r),i.current||(t.current.state=e(t.current.state,n,t),i.current=!0)};function lne(e,t){if(e==null)return"";const n=typeof e=="string"?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const r=n.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@"," ","\r"].includes(r[0])?`"'${r}"`:[t.delimiter,` +`,"\r",'"'].some(o=>n.includes(o))?`"${r}"`:r}return n}const xWe=(e,t)=>{var i,a;const{csvOptions:n,ignoreValueFormatter:r}=t;let o;if(r){const l=e.colDef.type;l==="number"?o=String(e.value):l==="date"||l==="dateTime"?o=(i=e.value)==null?void 0:i.toISOString():typeof((a=e.value)==null?void 0:a.toString)=="function"?o=e.value.toString():o=e.value}else o=e.formattedValue;return lne(o,n)};class cne{constructor(t){Le(this,"rowString","");Le(this,"isEmpty",!0);this.options=t}addValue(t){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(t,this.options.csvOptions):this.rowString+=t,this.isEmpty=!1}getRowString(){return this.rowString}}const zrn=({id:e,columns:t,getCellParams:n,csvOptions:r,ignoreValueFormatter:o})=>{const i=new cne({csvOptions:r});return t.forEach(a=>{const l=n(e,a.field);String(l.formattedValue),i.addValue(xWe(l,{ignoreValueFormatter:o,csvOptions:r}))}),i.getRowString()};function Hrn(e){const{columns:t,rowIds:n,csvOptions:r,ignoreValueFormatter:o,apiRef:i}=e,a=n.reduce((f,h)=>`${f}${zrn({id:h,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:o,csvOptions:r})}\r +`,"").trim();if(!r.includeHeaders)return a;const l=t.filter(f=>f.field!==YI.field),c=[];if(r.includeColumnGroupsHeaders){const f=i.current.getAllGroupDetails();let h=0;const m=l.reduce((g,b)=>{const y=i.current.getColumnGroupPath(b.field);return g[b.field]=y,h=Math.max(h,y.length),g},{});for(let g=0;g{const v=(m[y.field]||[])[g],x=f[v];b.addValue(x?x.headerName||x.groupId:"")})}}const u=new cne({csvOptions:r,sanitizeCellValue:lne});return l.forEach(f=>{u.addValue(f.headerName||f.field)}),c.push(u),`${`${c.map(f=>f.getRowString()).join(`\r +`)}\r +`}${a}`.trim()}function DNe(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}function Vrn(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{DNe(e)}):DNe(e)}function Urn(e){var t;return!!((t=window.getSelection())!=null&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}const Grn=(e,t)=>{const n=t.ignoreValueFormatterDuringExport,r=(typeof n=="object"?n==null?void 0:n.clipboardExport:n)||!1,o=t.clipboardCopyCellDelimiter,i=p.useCallback(a=>{if(!GYt(a)||Urn(a.target))return;let l="";if(NV(e)>0)l=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1});else{const u=mh(e);if(u){const d=e.current.getCellParams(u.id,u.field);l=xWe(d,{csvOptions:{delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:r})}}l=e.current.unstable_applyPipeProcessors("clipboardCopy",l),l&&(Vrn(l),e.current.publishEvent("clipboardCopy",l))},[e,r,o]);KGe(e,()=>e.current.rootElementRef.current,"keydown",i),is(e,"clipboardCopy",t.onClipboardCopy)},Wrn=e=>we({},e,{columnMenu:{open:!1}}),qrn=e=>{const t=sf(e,"useGridColumnMenu"),n=p.useRef({}),r=p.useCallback(()=>{var u,d,f,h;(d=(u=n.current).wheel)==null||d.call(u),(h=(f=n.current).touchMove)==null||h.call(f)},[]),o=p.useCallback(()=>{r(),n.current.wheel=e.current.subscribeEvent("virtualScrollerWheel",e.current.hideColumnMenu),n.current.touchMove=e.current.subscribeEvent("virtualScrollerTouchMove",e.current.hideColumnMenu)},[e,r]),i=p.useCallback(u=>{const d=p8(e),f={open:!0,field:u};(f.open!==d.open||f.field!==d.field)&&(e.current.setState(m=>m.columnMenu.open&&m.columnMenu.field===u?m:(t.debug("Opening Column Menu"),o(),we({},m,{columnMenu:{open:!0,field:u}}))),e.current.hidePreferences())},[e,t,o]),a=p.useCallback(()=>{const u=p8(e);if(u.field){const h=h1(e),m=bg(e),g=Ib(e);let b=u.field;if(h[b]||(b=g[0]),m[b]===!1){const y=g.filter(x=>x===b?!0:m[x]!==!1),v=y.indexOf(b);b=y[v+1]||y[v-1]}e.current.setColumnHeaderFocus(b)}const d={open:!1,field:void 0};(d.open!==u.open||d.field!==u.field)&&e.current.setState(h=>(t.debug("Hiding Column Menu"),r(),we({},h,{columnMenu:d})))},[e,t,r]),l=p.useCallback(u=>{t.debug("Toggle Column Menu");const d=p8(e);!d.open||d.field!==u?i(u):a()},[e,t,i,a]);zo(e,{showColumnMenu:i,hideColumnMenu:a,toggleColumnMenu:l},"public"),Ir(e,"columnResizeStart",a)},Krn=(e,t,n)=>{var o,i,a;n.current.caches.columns={lastColumnsProp:t.columns};const r=kE({apiRef:n,columnsToUpsert:t.columns,initialState:(o=t.initialState)==null?void 0:o.columns,columnVisibilityModel:t.columnVisibilityModel??((a=(i=t.initialState)==null?void 0:i.columns)==null?void 0:a.columnVisibilityModel)??{},keepOnlyColumnsToUpsert:!0});return we({},e,{columns:r,pinnedColumns:e.pinnedColumns??DB})};function Yrn(e,t){var I,A;const n=sf(e,"useGridColumns");e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:bg,changeEvent:"columnVisibilityModelChange"});const r=p.useCallback(R=>{n.debug("Updating columns state."),e.current.setState(Xrn(R)),e.current.publishEvent("columnsChange",R.orderedFields)},[n,e]),o=p.useCallback(R=>h1(e)[R],[e]),i=p.useCallback(()=>Cm(e),[e]),a=p.useCallback(()=>oc(e),[e]),l=p.useCallback((R,k=!0)=>(k?oc(e):Cm(e)).findIndex(D=>D.field===R),[e]),c=p.useCallback(R=>{const k=l(R);return Aj(e)[k]},[e,l]),u=p.useCallback(R=>{var T,D;bg(e)!==R&&(e.current.setState(O=>we({},O,{columns:kE({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:R,keepOnlyColumnsToUpsert:!1})})),(D=(T=e.current).updateRenderContext)==null||D.call(T))},[e]),d=p.useCallback(R=>{let k=R;if(O_(e)){const D=[],O=[],z=Xde(e);if(R.forEach(F=>{z.has(F.field)?D.push(F):O.push(F)}),D.length>0&&e.current.updateNonPivotColumns(D),O.length===0)return;k=O}const T=kE({apiRef:e,columnsToUpsert:k,initialState:void 0,keepOnlyColumnsToUpsert:!1,updateInitialVisibilityModel:!0});r(T)},[e,r]),f=p.useCallback((R,k)=>{const T=bg(e),D=T[R]??!0;if(k!==D){const O=we({},T,{[R]:k});e.current.setColumnVisibilityModel(O)}},[e]),h=p.useCallback(R=>Ib(e).findIndex(T=>T===R),[e]),m=p.useCallback((R,k)=>{const T=Ib(e),D=h(R);if(D===k)return;n.debug(`Moving column ${R} to index ${k}`);const O=[...T],z=O.splice(D,1)[0];O.splice(k,0,z),r(we({},V0(e),{orderedFields:O}));const F={column:e.current.getColumn(R),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(R),oldIndex:D};e.current.publishEvent("columnIndexChange",F)},[e,n,r,h]),g=p.useCallback((R,k)=>{n.debug(`Updating column ${R} width to ${k}`);const T=V0(e),D=T.lookup[R],O=we({},D,{width:k,hasBeenResized:!0});r(ine(we({},T,{lookup:we({},T.lookup,{[R]:O})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(R),colDef:O,width:k})},[e,n,r]),b={getColumn:o,getAllColumns:i,getColumnIndex:l,getColumnPosition:c,getVisibleColumns:a,getColumnIndexRelativeToVisibleColumns:h,updateColumns:d,setColumnVisibilityModel:u,setColumnVisibility:f,setColumnWidth:g},y={setColumnIndex:m};zo(e,b,"public"),zo(e,y,t.signature===H0.DataGrid?"private":"public");const v=p.useCallback((R,k)=>{var U,G;const T={},D=bg(e);(!k.exportOnlyDirtyModels||t.columnVisibilityModel!=null||Object.keys(((G=(U=t.initialState)==null?void 0:U.columns)==null?void 0:G.columnVisibilityModel)??{}).length>0||Object.keys(D).length>0)&&(T.columnVisibilityModel=D),T.orderedFields=Ib(e);const z=Cm(e),F={};return z.forEach(W=>{if(W.hasBeenResized){const Y={};UGe.forEach(B=>{let $=W[B];$===1/0&&($=-1),Y[B]=$}),F[W.field]=Y}}),Object.keys(F).length>0&&(T.dimensions=F),we({},R,{columns:T})},[e,t.columnVisibilityModel,(I=t.initialState)==null?void 0:I.columns]),x=p.useCallback((R,k)=>{const T=k.stateToRestore.columns,D=T==null?void 0:T.columnVisibilityModel;if(T==null)return R;const O=kE({apiRef:e,columnsToUpsert:[],initialState:T,columnVisibilityModel:D,keepOnlyColumnsToUpsert:!1});return T!=null&&e.current.setState(z=>we({},z,{columns:we({},z.columns,{lookup:O.lookup,orderedFields:O.orderedFields,initialColumnVisibilityModel:O.initialColumnVisibilityModel})})),D!=null&&e.current.setState(z=>we({},z,{columns:we({},z.columns,{columnVisibilityModel:D})})),T!=null&&e.current.publishEvent("columnsChange",O.orderedFields),R},[e]),S=p.useCallback((R,k)=>{var T;if(k===Mp.columns){const D=t.slots.columnsPanel;return s.jsx(D,we({},(T=t.slotProps)==null?void 0:T.columnsPanel))}return R},[t.slots.columnsPanel,(A=t.slotProps)==null?void 0:A.columnsPanel]),C=p.useCallback(R=>{const k=O_(e);return t.disableColumnSelector||k?R:[...R,"columnMenuColumnsItem"]},[t.disableColumnSelector,e]);Ol(e,"columnMenu",C),Ol(e,"exportState",v),Ol(e,"restoreState",x),Ol(e,"preferencePanel",S);const _=p.useRef(null);Ir(e,"viewportInnerSizeChange",R=>{if(_.current!==R.width){if(_.current=R.width,!oc(e).some(T=>T.flex&&T.flex>0))return;r(ine(V0(e),e.current.getRootDimensions()))}});const E=p.useCallback(()=>{n.info("Columns pipe processing have changed, regenerating the columns");const R=kE({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});r(R)},[e,n,r]);Qde(e,"hydrateColumns",E),p.useEffect(()=>{if(e.current.caches.columns.lastColumnsProp===t.columns)return;e.current.caches.columns.lastColumnsProp=t.columns,n.info(`GridColumns have changed, new length ${t.columns.length}`);const R=kE({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0,updateInitialVisibilityModel:!0,columnVisibilityModel:t.columnVisibilityModel});r(R)},[n,e,r,t.columns,t.columnVisibilityModel]),p.useEffect(()=>{t.columnVisibilityModel!==void 0&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,n,t.columnVisibilityModel])}function Xrn(e){return t=>we({},t,{columns:e})}const Zrn=(e,t)=>{var n;return we({},e,{density:((n=t.initialState)==null?void 0:n.density)??t.density??"standard"})},Jrn=(e,t)=>{var l;const n=sf(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:XE,changeEvent:"densityChange"});const o={setDensity:no(c=>{XE(e)!==c&&(n.debug(`Set grid density to ${c}`),e.current.setState(d=>we({},d,{density:c})))})};zo(e,o,"public");const i=p.useCallback((c,u)=>{var h;const d=XE(e);return!u.exportOnlyDirtyModels||t.density!=null||((h=t.initialState)==null?void 0:h.density)!=null?we({},c,{density:d}):c},[e,t.density,(l=t.initialState)==null?void 0:l.density]),a=p.useCallback((c,u)=>{var f;const d=(f=u.stateToRestore)!=null&&f.density?u.stateToRestore.density:XE(e);return e.current.setState(h=>we({},h,{density:d})),c},[e]);Ol(e,"exportState",i),Ol(e,"restoreState",a),p.useEffect(()=>{t.density&&e.current.setDensity(t.density)},[e,t.density])};function Qrn(e,t="csv",n=document.title||"untitled"){const r=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=r,i.click(),setTimeout(()=>{URL.revokeObjectURL(o)});return}throw new Error("MUI X: exportAs not supported.")}const wWe=({apiRef:e,options:t})=>{const n=Cm(e);return t.fields?t.fields.reduce((o,i)=>{const a=n.find(l=>l.field===i);return a&&o.push(a),o},[]):(t.allColumns?n:oc(e)).filter(o=>o.disableExport!==!0)},SWe=({apiRef:e})=>{var c,u;const t=EGe(e),n=Sc(e),r=NV(e),o=t.filter(d=>n[d].type!=="footer"),i=WI(e),a=((c=i==null?void 0:i.top)==null?void 0:c.map(d=>d.id))||[],l=((u=i==null?void 0:i.bottom)==null?void 0:u.map(d=>d.id))||[];if(o.unshift(...a),o.push(...l),r>0){const d=AGe(e);return o.filter(f=>d.has(f))}return o},eon=(e,t)=>{const n=sf(e,"useGridCsvExport"),r=t.ignoreValueFormatterDuringExport,o=(typeof r=="object"?r==null?void 0:r.csvExport:r)||!1,i=p.useCallback((u={})=>{n.debug("Get data as CSV");const d=wWe({apiRef:e,options:u}),h=(u.getRowsToExport??SWe)({apiRef:e});return Hrn({columns:d,rowIds:h,csvOptions:{delimiter:u.delimiter||",",shouldAppendQuotes:u.shouldAppendQuotes??!0,includeHeaders:u.includeHeaders??!0,includeColumnGroupsHeaders:u.includeColumnGroupsHeaders??!0,escapeFormulas:u.escapeFormulas??!0},ignoreValueFormatter:o,apiRef:e})},[n,e,o]),a=p.useCallback(u=>{n.debug("Export data as CSV");const d=i(u),f=new Blob([u!=null&&u.utf8WithBom?new Uint8Array([239,187,191]):"",d],{type:"text/csv"});Qrn(f,"csv",u==null?void 0:u.fileName)},[n,i]);zo(e,{getDataAsCsv:i,exportDataAsCsv:a},"public");const c=p.useCallback((u,d)=>{var f;return(f=d.csvOptions)!=null&&f.disableToolbarButton?u:[...u,{component:s.jsx(hnn,{options:d.csvOptions}),componentName:"csvExport"}]},[]);Ol(e,"exportMenu",c)};function ton(e,t,n){const r=[],o=t.querySelectorAll("style, link[rel='stylesheet']");for(let i=0;i{l.addEventListener("load",()=>c())}))}e.head.appendChild(l)}return r}const g8=(e,t,n)=>{let r=e.paginationModel;const o=e.rowCount,i=(n==null?void 0:n.pageSize)??r.pageSize,a=(n==null?void 0:n.page)??r.page,l=MGe(o,i,a);n&&((n==null?void 0:n.page)!==r.page||(n==null?void 0:n.pageSize)!==r.pageSize)&&(r=n);const c=i===-1?0:BXt(r.page,l);return c!==r.page&&(r=we({},r,{page:c})),OGe(r.pageSize,t),r},non=(e,t)=>{var C,_;const n=sf(e,"useGridPaginationModel"),r=Wn(e,mO),o=p.useRef(md(e)),i=Math.floor(t.rowHeight*r);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:Yd,changeEvent:"paginationModelChange"});const a=p.useCallback(N=>{const E=Yd(e);N!==E.page&&(n.debug(`Setting page to ${N}`),e.current.setPaginationModel({page:N,pageSize:E.pageSize}))},[e,n]),l=p.useMemo(()=>Fb(a,0),[a]),c=p.useCallback(N=>{const E=Yd(e);N!==E.pageSize&&(n.debug(`Setting page size to ${N}`),e.current.setPaginationModel({pageSize:N,page:E.page}))},[e,n]),u=p.useCallback(N=>{const E=Yd(e);N!==E&&(n.debug("Setting 'paginationModel' to",N),e.current.setState(I=>we({},I,{pagination:we({},I.pagination,{paginationModel:g8(I.pagination,t.signature,N)})}),"setPaginationModel"))},[e,n,t.signature]);zo(e,{setPage:a,setPageSize:c,setPaginationModel:u},"public");const f=p.useCallback((N,E)=>{var R,k;const I=Yd(e);return!E.exportOnlyDirtyModels||t.paginationModel!=null||((k=(R=t.initialState)==null?void 0:R.pagination)==null?void 0:k.paginationModel)!=null||I.page!==0&&I.pageSize!==FXt(t.autoPageSize)?we({},N,{pagination:we({},N.pagination,{paginationModel:I})}):N},[e,t.paginationModel,(_=(C=t.initialState)==null?void 0:C.pagination)==null?void 0:_.paginationModel,t.autoPageSize]),h=p.useCallback((N,E)=>{var A,R;const I=(A=E.stateToRestore.pagination)!=null&&A.paginationModel?we({},RGe(t.autoPageSize),(R=E.stateToRestore.pagination)==null?void 0:R.paginationModel):Yd(e);return e.current.setState(k=>we({},k,{pagination:we({},k.pagination,{paginationModel:g8(k.pagination,t.signature,I)})}),"stateRestorePreProcessing"),N},[e,t.autoPageSize,t.signature]);Ol(e,"exportState",f),Ol(e,"restoreState",h);const m=()=>{var E;const N=Yd(e);(E=e.current.virtualScrollerRef)!=null&&E.current&&e.current.scrollToIndexes({rowIndex:N.page*N.pageSize})},g=p.useCallback(()=>{if(!t.autoPageSize)return;const N=e.current.getRootDimensions(),E=Math.max(1,Math.floor(N.viewportInnerSize.height/i));e.current.setPageSize(E)},[e,t.autoPageSize,i]),b=p.useCallback(N=>{if(N==null)return;const E=Yd(e);if(E.page===0)return;const I=LGe(e);E.page>I-1&&queueMicrotask(()=>{l(Math.max(0,I-1))})},[e,l]),y=p.useCallback(()=>{Yd(e).page!==0&&l(0),e.current.getScrollPosition().top!==0&&e.current.scroll({top:0})},[e,l]),v=p.useMemo(()=>Fb(y,0),[y]),x=p.useCallback(N=>{const E=we({},N,{items:Gde(e)});jg(E,o.current)||(o.current=E,v())},[e,v]);Ir(e,"viewportInnerSizeChange",g),Ir(e,"paginationModelChange",m),Ir(e,"rowCountChange",b),Ir(e,"sortModelChange",v),Ir(e,"filterModelChange",x);const S=p.useRef(!0);p.useEffect(()=>{if(S.current){S.current=!1;return}t.pagination&&e.current.setState(N=>we({},N,{pagination:we({},N.pagination,{paginationModel:g8(N.pagination,t.signature,t.paginationModel)})}))},[e,t.paginationModel,t.signature,t.pagination]),p.useEffect(()=>{e.current.setState(N=>{const E=t.pagination===!0;return N.pagination.paginationMode===t.paginationMode&&N.pagination.enabled===E?N:we({},N,{pagination:we({},N.pagination,{paginationMode:t.paginationMode,enabled:E})})})},[e,t.paginationMode,t.pagination]),p.useEffect(g,[g])};function ron(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}function oon(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}const ion=(e,t)=>{const n=e.current.rootElementRef.current!==null,r=sf(e,"useGridPrintExport"),o=p.useRef(null),i=p.useRef(null),a=p.useRef({}),l=p.useRef([]),c=p.useRef(null);p.useEffect(()=>{o.current=lc(e.current.rootElementRef.current)},[e,n]);const u=p.useCallback((y,v,x)=>new Promise(S=>{const C=wWe({apiRef:e,options:{fields:y,allColumns:v}}).map(E=>E.field),_=Cm(e),N={};_.forEach(E=>{N[E.field]=C.includes(E.field)}),x&&(N[YI.field]=!0),e.current.setColumnVisibilityModel(N),S()}),[e]),d=p.useCallback(y=>{const x=y({apiRef:e}).reduce((S,C)=>{const _=e.current.getRow(C);return _[M_]||S.push(_),S},[]);e.current.setRows(x)},[e]),f=p.useCallback((y,v)=>{var T,D;const x=we({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},v),S=y.contentDocument;if(!S)return;const C=e.current.rootElementRef.current,_=C.cloneNode(!0),N=_.querySelector(`.${He.virtualScrollerContent}`),E=_.querySelector(`.${He.main}`);if(E.style.overflow="visible",_.querySelector(`.${He.virtualScrollerRenderZone}`).style.position="static",N.style.flexBasis="auto",(T=_.querySelector(`.${He["scrollbar--vertical"]}`))==null||T.remove(),!(N.nextSibling instanceof HTMLElement&&N.nextSibling.classList.contains(He.filler))){const O=document.createElement("div");O.style.height=oWe,N.insertAdjacentElement("afterend",O)}const I=_.querySelector(`.${He.footerContainer}`);x.hideToolbar&&((D=_.querySelector(`.${He.toolbar}`))==null||D.remove()),x.hideFooter&&I&&I.remove(),_.style.height="auto",_.style.boxSizing="content-box",!x.hideFooter&&I&&(I.style.width="100%");const A=document.createElement("div");A.appendChild(_),S.body.style.marginTop="0px",S.body.innerHTML=A.innerHTML;const R=typeof x.pageStyle=="function"?x.pageStyle():x.pageStyle;if(typeof R=="string"){const O=S.createElement("style");O.appendChild(S.createTextNode(R)),S.head.appendChild(O)}x.bodyClassName&&S.body.classList.add(...x.bodyClassName.split(" "));let k=[];if(x.copyStyles){const O=C.getRootNode(),z=O.constructor.name==="ShadowRoot"?O:o.current;k=ton(S,z)}Promise.all(k).then(()=>{y.contentWindow.print()})},[e,o]),h=p.useCallback(y=>{var v,x;o.current.body.removeChild(y),e.current.restoreState(i.current||{}),(x=(v=i.current)==null?void 0:v.columns)!=null&&x.columnVisibilityModel||e.current.setColumnVisibilityModel(a.current),e.current.setState(S=>we({},S,{virtualization:c.current})),e.current.setRows(l.current),i.current=null,a.current={},l.current=[]},[e]),g={exportDataAsPrint:p.useCallback(async y=>{if(r.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(i.current=e.current.exportState(),a.current=bg(e),l.current=e.current.getSortedRows().filter(x=>!x[M_]),t.pagination){const S={page:0,pageSize:Ude(e)};e.current.setState(C=>we({},C,{pagination:we({},C.pagination,{paginationModel:g8(C.pagination,"DataGridPro",S)})}))}c.current=e.current.state.virtualization,e.current.unstable_setVirtualization(!1),await u(y==null?void 0:y.fields,y==null?void 0:y.allColumns,y==null?void 0:y.includeCheckboxes),d((y==null?void 0:y.getRowsToExport)??SWe),await ron();const v=oon(y==null?void 0:y.fileName);v.onload=()=>{f(v,y),v.contentWindow.matchMedia("print").addEventListener("change",S=>{S.matches===!1&&h(v)})},o.current.body.appendChild(v)},[t,r,e,f,h,u,d])};zo(e,g,"public");const b=p.useCallback((y,v)=>{var x;return(x=v.printOptions)!=null&&x.disableToolbarButton?y:[...y,{component:s.jsx(mnn,{options:v.printOptions}),componentName:"printExport"}]},[]);Ol(e,"exportMenu",b)},aon=(e,t,n)=>{var o,i;const r=t.filterModel??((i=(o=t.initialState)==null?void 0:o.filter)==null?void 0:i.filterModel)??GM();return we({},e,{filter:we({filterModel:Fde(r,t.disableMultipleColumnsFiltering,n)},cGe),visibleRowsLookup:{}})},son=e=>e.filteredRowsLookup;function LNe(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function lon(){return rce(Object.values)}const con=(e,t,n)=>{var A,R,k;const r=sf(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:md,changeEvent:"filterModelChange"});const o=p.useCallback(()=>{e.current.setState(T=>{const D=md(e),O=e.current.getFilterState(D),z=we({},T,{filter:we({},T.filter,O)}),F=LNe(e,z);return we({},z,{visibleRowsLookup:F})}),e.current.publishEvent("filteredRowsSet")},[e]),i=p.useCallback((T,D)=>D==null||D.filterable===!1||t.disableColumnFilter?T:[...T,"columnMenuFilterItem"],[t.disableColumnFilter]),a=p.useCallback(T=>{const D=md(e),O=[...D.items],z=O.findIndex(F=>F.id===T.id);z===-1?O.push(T):O[z]=T,e.current.setFilterModel(we({},D,{items:O}),"upsertFilterItem")},[e]),l=p.useCallback(T=>{const D=md(e),O=[...D.items];T.forEach(z=>{const F=O.findIndex(U=>U.id===z.id);F===-1?O.push(z):O[F]=z}),e.current.setFilterModel(we({},D,{items:O}),"upsertFilterItems")},[e]),c=p.useCallback(T=>{const D=md(e),O=D.items.filter(z=>z.id!==T.id);O.length!==D.items.length&&e.current.setFilterModel(we({},D,{items:O}),"deleteFilterItem")},[e]),u=p.useCallback((T,D,O)=>{if(r.debug("Displaying filter panel"),T){const z=md(e),F=z.items.filter(Y=>{var q;if(Y.value!==void 0)return!(Array.isArray(Y.value)&&Y.value.length===0);const $=(q=e.current.getColumn(Y.field).filterOperators)==null?void 0:q.find(Z=>Z.value===Y.operator);return!(typeof($==null?void 0:$.requiresFilterValue)>"u"?!0:$==null?void 0:$.requiresFilterValue)});let U;const G=F.find(Y=>Y.field===T),W=e.current.getColumn(T);G?U=F:t.disableMultipleColumnsFiltering?U=[one({field:T,operator:W.filterOperators[0].value},e)]:U=[...F,one({field:T,operator:W.filterOperators[0].value},e)],e.current.setFilterModel(we({},z,{items:U}))}e.current.showPreferences(Mp.filters,D,O)},[e,r,t.disableMultipleColumnsFiltering]),d=p.useCallback(()=>{r.debug("Hiding filter panel"),e.current.hidePreferences()},[e,r]),f=p.useCallback(T=>{const D=md(e);D.logicOperator!==T&&e.current.setFilterModel(we({},D,{logicOperator:T}),"changeLogicOperator")},[e]),h=p.useCallback(T=>{const D=md(e);jg(D.quickFilterValues,T)||e.current.setFilterModel(we({},D,{quickFilterValues:[...T]}))},[e]),m=p.useCallback((T,D)=>{md(e)!==T&&(r.debug("Setting filter model"),e.current.updateControlState("filter",eNe(T,t.disableMultipleColumnsFiltering,e),D),e.current.unstable_applyFilters())},[e,r,t.disableMultipleColumnsFiltering]),g=p.useCallback(T=>{const D=Fde(T,t.disableMultipleColumnsFiltering,e),O=n.hooks.useFilterValueGetter(e,t),z=t.filterMode==="client"?FYt(D,O,e,t.disableEval):null,F=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:z,filterModel:D??GM(),filterValueGetter:O});return we({},F,{filterModel:D})},[e,n.hooks,t]),b={setFilterLogicOperator:f,unstable_applyFilters:o,deleteFilterItem:c,upsertFilterItem:a,upsertFilterItems:l,setFilterModel:m,showFilterPanel:u,hideFilterPanel:d,setQuickFilterValues:h,ignoreDiacritics:t.ignoreDiacritics,getFilterState:g};zo(e,b,"public");const y=p.useCallback((T,D)=>{var F,U;const O=md(e);return O.items.forEach(G=>{delete G.fromInput}),!D.exportOnlyDirtyModels||t.filterModel!=null||((U=(F=t.initialState)==null?void 0:F.filter)==null?void 0:U.filterModel)!=null||!jg(O,GM())?we({},T,{filter:{filterModel:O}}):T},[e,t.filterModel,(R=(A=t.initialState)==null?void 0:A.filter)==null?void 0:R.filterModel]),v=p.useCallback((T,D)=>{var z;const O=(z=D.stateToRestore.filter)==null?void 0:z.filterModel;return O==null?T:(e.current.updateControlState("filter",eNe(O,t.disableMultipleColumnsFiltering,e),"restoreState"),we({},T,{callbacks:[...T.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),x=p.useCallback((T,D)=>{var O;if(D===Mp.filters){const z=t.slots.filterPanel;return s.jsx(z,we({},(O=t.slotProps)==null?void 0:O.filterPanel))}return T},[t.slots.filterPanel,(k=t.slotProps)==null?void 0:k.filterPanel]),{getRowId:S}=t,C=kh(lon),_=p.useCallback(T=>{var B;if(t.filterMode!=="client"||!T.isRowMatchingFilters||!T.filterModel.items.length&&!((B=T.filterModel.quickFilterValues)!=null&&B.length))return cGe;const D=mm(e),O={},{isRowMatchingFilters:z}=T,F={},U={passingFilterItems:null,passingQuickFilterValues:null},G=C.current(e.current.state.rows.dataRowIdToModelLookup);for(let $=0;${r.debug("onColUpdated - GridColumns changed, applying filters");const T=md(e),D=h1(e),O=T.items.filter(z=>z.field&&D[z.field]);O.length{T==="filtering"&&e.current.unstable_applyFilters()},[e]),I=p.useCallback(()=>{e.current.setState(T=>we({},T,{visibleRowsLookup:LNe(e,T)}))},[e]);Ir(e,"rowsSet",o),Ir(e,"columnsChange",N),Ir(e,"activeStrategyProcessorChange",E),Ir(e,"rowExpansionChange",I),Ir(e,"columnVisibilityModelChange",()=>{var D;const T=md(e);(D=T.quickFilterValues)!=null&&D.length&&yGe(T)&&o()}),kj(()=>{t.signature==="DataGrid"&&o()}),wa(()=>{t.filterModel!==void 0&&e.current.setFilterModel(t.filterModel)},[e,r,t.filterModel])},uon=e=>we({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),don=(e,t)=>{const n=sf(e,"useGridFocus"),r=p.useRef(null),o=e.current.rootElementRef.current!==null,i=p.useCallback((A,R)=>{A&&e.current.getRow(A.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(A.id,A.field),R)},[e]),a=p.useCallback((A,R)=>{const k=mh(e);(k==null?void 0:k.id)===A&&(k==null?void 0:k.field)===R||(e.current.setState(T=>(n.debug(`Focusing on cell with id=${A} and field=${R}`),we({},T,{tabIndex:{cell:{id:A,field:R},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:A,field:R},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.getRow(A)&&(k&&i(k,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(A,R))))},[e,n,i]),l=p.useCallback((A,R={})=>{const k=mh(e);i(k,R),e.current.setState(T=>(n.debug(`Focusing on column header with colIndex=${A}`),we({},T,{tabIndex:{columnHeader:{field:A},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:A},columnHeaderFilter:null,cell:null,columnGroupHeader:null}})))},[e,n,i]),c=p.useCallback((A,R={})=>{const k=mh(e);i(k,R),e.current.setState(T=>(n.debug(`Focusing on column header filter with colIndex=${A}`),we({},T,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:A},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:A},cell:null,columnGroupHeader:null}})))},[e,n,i]),u=p.useCallback((A,R,k={})=>{const T=mh(e);T&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(T.id,T.field),k),e.current.setState(D=>we({},D,{tabIndex:{columnGroupHeader:{field:A,depth:R},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:A,depth:R},columnHeader:null,columnHeaderFilter:null,cell:null}}))},[e]),d=p.useCallback(()=>LB(e),[e]),f=p.useCallback((A,R,k)=>{let T=e.current.getColumnIndex(R);const D=oc(e),O=I5(e,{pagination:t.pagination,paginationMode:t.paginationMode}),z=WI(e),F=[].concat(z.top||[],O.rows,z.bottom||[]);let U=F.findIndex(B=>B.id===A);k==="right"?T+=1:k==="left"?T-=1:U+=1,T>=D.length?(U+=1,U=0&&(T=D.length-1)),U=a_(U,0,F.length-1);const G=F[U];if(!G)return;const W=e.current.unstable_getCellColSpanInfo(G.id,T);W&&W.spannedByColSpan&&(k==="left"||k==="below"?T=W.leftVisibleCellIndex:k==="right"&&(T=W.rightVisibleCellIndex)),T=a_(T,0,D.length-1);const Y=D[T];e.current.setCellFocus(G.id,Y.field)},[e,t.pagination,t.paginationMode]),h=p.useCallback(({id:A,field:R})=>{e.current.setCellFocus(A,R)},[e]),m=p.useCallback((A,R)=>{R.key==="Enter"||R.key==="Tab"||R.key==="Shift"||ZE(R.key)||e.current.setCellFocus(A.id,A.field)},[e]),g=p.useCallback(({field:A},R)=>{R.target===R.currentTarget&&e.current.setColumnHeaderFocus(A,R)},[e]),b=p.useCallback(({fields:A,depth:R},k)=>{if(k.target!==k.currentTarget)return;const T=LB(e);T!==null&&T.depth===R&&A.includes(T.field)||e.current.setColumnGroupHeaderFocus(A[0],R,k)},[e]),y=p.useCallback((A,R)=>{var k,T;(T=(k=R.relatedTarget)==null?void 0:k.getAttribute("class"))!=null&&T.includes(He.columnHeader)||(n.debug("Clearing focus"),e.current.setState(D=>we({},D,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[n,e]),v=p.useCallback(A=>{r.current=A},[]),x=p.useCallback(A=>{const R=r.current;r.current=null;const k=mh(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:A,cell:R}))return;if(!k){R&&e.current.setCellFocus(R.id,R.field);return}if((R==null?void 0:R.id)===k.id&&(R==null?void 0:R.field)===k.field)return;const D=e.current.getCellElement(k.id,k.field);D!=null&&D.contains(A.target)||(R?e.current.setCellFocus(R.id,R.field):(e.current.setState(O=>we({},O,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),i(k,A)))},[e,i]),S=p.useCallback(A=>{if(A.cellMode==="view")return;const R=mh(e);((R==null?void 0:R.id)!==A.id||(R==null?void 0:R.field)!==A.field)&&e.current.setCellFocus(A.id,A.field)},[e]),C=p.useCallback(()=>{const A=mh(e);if(A&&!e.current.getRow(A.id)){const R=A.id;let k=null;if(typeof R<"u"){const T=e.current.getRowElement(R),D=T!=null&&T.dataset.rowindex?Number(T==null?void 0:T.dataset.rowindex):0,O=I5(e,{pagination:t.pagination,paginationMode:t.paginationMode}),z=O.rows[a_(D,0,O.rows.length-1)];k=(z==null?void 0:z.id)??null}e.current.setState(T=>we({},T,{focus:{cell:k===null?null:{id:k,field:A.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[e,t.pagination,t.paginationMode]),_=p.useMemo(()=>Fb(C,0),[C]),N=no(()=>{const A=mh(e);if(!A)return;const R=I5(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(R.rows.find(D=>D.id===A.id)||R.rows.length===0)return;const T=oc(e);e.current.setState(D=>we({},D,{tabIndex:{cell:{id:R.rows[0].id,field:T[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),E={setCellFocus:a,setColumnHeaderFocus:l,setColumnHeaderFilterFocus:c},I={moveFocusToRelativeCell:f,setColumnGroupHeaderFocus:u,getColumnGroupHeaderFocus:d};zo(e,E,"public"),zo(e,I,"private"),p.useEffect(()=>{const A=lc(e.current.rootElementRef.current);return A.addEventListener("mouseup",x),()=>{A.removeEventListener("mouseup",x)}},[e,o,x]),Ir(e,"columnHeaderBlur",y),Ir(e,"cellDoubleClick",h),Ir(e,"cellMouseDown",v),Ir(e,"cellKeyDown",m),Ir(e,"cellModeChange",S),Ir(e,"columnHeaderFocus",g),Ir(e,"columnGroupHeaderFocus",b),Ir(e,"rowsSet",_),Ir(e,"paginationModelChange",N)},$Y=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(et)return e-1;return null},FY=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(e>t)return e-1}else if(!r&&e=0&&a(t.top||[]).concat(e.rows,t.bottom||[])),hon=(e,t)=>{const n=sf(e,"useGridKeyboardNavigation"),r=af(),o=p.useCallback(()=>pon(e),[e]),i=t.signature!=="DataGrid"&&t.headerFilters,a=p.useCallback((y,v,x="left",S="up")=>{const C=Tj(e),_=e.current.unstable_getCellColSpanInfo(v,y);_&&_.spannedByColSpan&&(x==="left"?y=_.leftVisibleCellIndex:x==="right"&&(y=_.rightVisibleCellIndex));const N=gO(e)[y],E=fon(e,v,y,S),I=C.findIndex(A=>A.id===E);n.debug(`Navigating to cell row ${I}, col ${y}`),e.current.scrollToIndexes({colIndex:y,rowIndex:I}),e.current.setCellFocus(E,N)},[e,n]),l=p.useCallback((y,v)=>{n.debug(`Navigating to header col ${y}`),e.current.scrollToIndexes({colIndex:y});const x=e.current.getVisibleColumns()[y].field;e.current.setColumnHeaderFocus(x,v)},[e,n]),c=p.useCallback((y,v)=>{n.debug(`Navigating to header filter col ${y}`),e.current.scrollToIndexes({colIndex:y});const x=e.current.getVisibleColumns()[y].field;e.current.setColumnHeaderFilterFocus(x,v)},[e,n]),u=p.useCallback((y,v,x)=>{n.debug(`Navigating to header col ${y}`),e.current.scrollToIndexes({colIndex:y});const{field:S}=e.current.getVisibleColumns()[y];e.current.setColumnGroupHeaderFocus(S,v,x)},[e,n]),d=p.useCallback(y=>{var v;return(v=o()[y])==null?void 0:v.id},[o]),f=p.useCallback((y,v)=>{const x=v.currentTarget.querySelector(`.${He.columnHeaderTitleContainerContent}`);if(!!x&&x.contains(v.target)&&y.field!==YI.field||!ZE(v.key)&&v.key!=="Tab"||v.key==="Tab"&&(t.tabNavigation==="none"||t.tabNavigation==="content"&&v.shiftKey))return;const C=o(),_=e.current.getViewportPageSize(),N=y.field?e.current.getColumnIndex(y.field):0,E=C.length>0?0:null,I=C.length>0?C.length-1:null,A=0,R=Math.max(0,oc(e).length-1),k=xO(e);let T=!0;if(v.key==="Tab"&&t.tabNavigation==="content"&&!v.shiftKey){E!==null&&(a(A,d(E)),v.preventDefault());return}switch(v.key){case"ArrowDown":{i?c(N,v):E!==null&&a(N,d(E));break}case"ArrowRight":{const D=FY({currentColIndex:N,firstColIndex:A,lastColIndex:R,isRtl:r});D!==null&&l(D,v);break}case"ArrowLeft":{const D=$Y({currentColIndex:N,firstColIndex:A,lastColIndex:R,isRtl:r});D!==null&&l(D,v);break}case"ArrowUp":{k>0&&u(N,k-1,v);break}case"PageDown":{E!==null&&I!==null&&a(N,d(Math.min(E+_,I)));break}case"Home":{l(A,v);break}case"End":{l(R,v);break}case"Enter":{(v.ctrlKey||v.metaKey)&&e.current.toggleColumnMenu(y.field);break}case"Tab":{v.shiftKey?N===A?k>0?u(R,k-1,v):T=!1:l(N-1,v):N===R?i?c(A,v):t.tabNavigation==="all"&&E!==null?a(A,d(E)):T=!1:l(N+1,v);break}case" ":break;default:T=!1}T&&v.preventDefault()},[e,t.tabNavigation,o,i,c,a,d,r,l,u]),h=p.useCallback((y,v)=>{const x=SZt(e)===y.field;if(CZt(e)===y.field||x&&v.key!=="Tab"||!ZE(v.key)&&v.key!=="Tab"||v.key==="Tab"&&(t.tabNavigation==="none"||t.tabNavigation==="content"&&v.shiftKey))return;const C=o(),_=e.current.getViewportPageSize(),N=y.field?e.current.getColumnIndex(y.field):0,E=C.length>0?0:null,I=C.length>0?C.length-1:null,A=0,R=Math.max(0,oc(e).length-1);let k=!0;if(v.key==="Tab"&&t.tabNavigation==="content"&&!v.shiftKey){E!==null&&(a(A,d(E)),v.preventDefault());return}switch(v.key){case"ArrowDown":{E!==null&&a(N,d(E));break}case"ArrowRight":{const T=FY({currentColIndex:N,firstColIndex:A,lastColIndex:R,isRtl:r});T!==null&&c(T,v);break}case"ArrowLeft":{const T=$Y({currentColIndex:N,firstColIndex:A,lastColIndex:R,isRtl:r});T!==null?c(T,v):e.current.setColumnHeaderFilterFocus(y.field,v);break}case"ArrowUp":{l(N,v);break}case"PageDown":{E!==null&&I!==null&&a(N,d(Math.min(E+_,I)));break}case"Home":{c(A,v);break}case"End":{c(R,v);break}case"Tab":{v.shiftKey?N===A?l(R,v):c(N-1,v):N===R?t.tabNavigation==="all"&&E!==null?a(A,d(E)):k=!1:c(N+1,v);break}case" ":break;default:k=!1}k&&v.preventDefault()},[e,t.tabNavigation,o,c,r,l,a,d]),m=p.useCallback((y,v)=>{const x=LB(e);if(x===null)return;const{field:S,depth:C}=x,{fields:_,depth:N,maxDepth:E}=y;if(!ZE(v.key)&&v.key!=="Tab"||v.key==="Tab"&&(t.tabNavigation==="none"||t.tabNavigation==="content"&&v.shiftKey))return;const I=o(),A=e.current.getViewportPageSize(),R=e.current.getColumnIndex(S),k=S?e.current.getColumnIndex(S):0,T=I.length>0?0:null,D=I.length>0?I.length-1:null,O=0,z=Math.max(0,oc(e).length-1);let F=!0;if(v.key==="Tab"&&t.tabNavigation==="content"&&!v.shiftKey){T!==null&&(a(O,d(T)),v.preventDefault());return}switch(v.key){case"ArrowDown":{N===E-1?l(R,v):u(R,C+1,v);break}case"ArrowUp":{N>0&&u(R,C-1,v);break}case"ArrowRight":{const U=_.length-_.indexOf(S)-1;R+U+1<=z&&u(R+U+1,C,v);break}case"ArrowLeft":{const U=_.indexOf(S);R-U-1>=O&&u(R-U-1,C,v);break}case"PageDown":{T!==null&&D!==null&&a(k,d(Math.min(T+A,D)));break}case"Home":{u(O,C,v);break}case"End":{u(z,C,v);break}case"Tab":{if(v.shiftKey){const U=_.indexOf(S),G=R-U-1;Gz&&N===E-1?l(O,v):G>z?u(O,C+1,v):u(G,C,v)}break}case" ":break;default:F=!1}F&&v.preventDefault()},[e,t.tabNavigation,o,l,u,a,d]),g=p.useCallback((y,v)=>{if(wO(v))return;const x=e.current.getCellParams(y.id,y.field);if(x.cellMode===ja.Edit||!ZE(v.key)&&v.key!=="Tab"||v.key==="Tab"&&(t.tabNavigation==="none"||t.tabNavigation==="header"&&!v.shiftKey)||!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:v,cell:x}))return;const C=o();if(C.length===0)return;const _=i?c:l,N=e.current.getViewportPageSize(),E=y.field?e.current.getColumnIndex(y.field):0,I=C.findIndex(O=>O.id===y.id),A=0,R=C.length-1,k=0,T=Math.max(0,oc(e).length-1);let D=!0;if(v.key==="Tab"&&t.tabNavigation==="header"&&v.shiftKey){_(T,v),v.preventDefault();return}switch(v.key){case"ArrowDown":{IA?a(E,d(I-1)):_(E,v);break}case"ArrowRight":{const O=FY({currentColIndex:E,firstColIndex:k,lastColIndex:T,isRtl:r});O!==null&&a(O,d(I),r?"left":"right");break}case"ArrowLeft":{const O=$Y({currentColIndex:E,firstColIndex:k,lastColIndex:T,isRtl:r});O!==null&&a(O,d(I),r?"right":"left");break}case"Tab":{v.shiftKey?E===k&&I===A?t.tabNavigation==="all"?_(T,v):D=!1:E===k?a(T,d(I-1)):a(E-1,d(I),"left"):E===T?I!==R?a(k,d(I+1)):D=!1:a(E+1,d(I),"right");break}case" ":{if(y.field===zde)break;const z=y.colDef;if(z&&(z.field===lXt||_Qt(z.field)))break;!v.shiftKey&&I=A?a(E,d(O)):l(E,v);break}case"Home":{v.ctrlKey||v.metaKey||v.shiftKey?a(k,d(A)):a(k,d(I));break}case"End":{v.ctrlKey||v.metaKey||v.shiftKey?a(T,d(R)):a(T,d(I));break}default:D=!1}D&&v.preventDefault()},[e,t.tabNavigation,o,r,a,d,i,c,l]),b=p.useCallback((y,{event:v})=>v.key===" "?!1:y,[]);Ol(e,"canStartEditing",b),Ir(e,"columnHeaderKeyDown",f),Ir(e,"headerFilterKeyDown",h),Ir(e,"columnGroupHeaderKeyDown",m),Ir(e,"cellKeyDown",g)},mon=(e,t)=>{var u,d;const n=sf(e,"useGridRowCount"),r=kh(()=>Yd(e).pageSize);e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:Ew,changeEvent:"rowCountChange"});const i={setRowCount:p.useCallback(f=>{Ew(e)!==f&&(n.debug("Setting 'rowCount' to",f),e.current.setState(m=>we({},m,{pagination:we({},m.pagination,{rowCount:f})})))},[e,n])};zo(e,i,"public");const a=p.useCallback((f,h)=>{var b,y;const m=Ew(e);return!h.exportOnlyDirtyModels||t.rowCount!=null||((y=(b=t.initialState)==null?void 0:b.pagination)==null?void 0:y.rowCount)!=null?we({},f,{pagination:we({},f.pagination,{rowCount:m})}):f},[e,t.rowCount,(d=(u=t.initialState)==null?void 0:u.pagination)==null?void 0:d.rowCount]),l=p.useCallback((f,h)=>{var g;const m=(g=h.stateToRestore.pagination)!=null&&g.rowCount?h.stateToRestore.pagination.rowCount:Ew(e);return e.current.setState(b=>we({},b,{pagination:we({},b.pagination,{rowCount:m})})),f},[e]);Ol(e,"exportState",a),Ol(e,"restoreState",l);const c=p.useCallback(f=>{t.paginationMode==="client"||!r.current||f.pageSize!==r.current&&(r.current=f.pageSize,Ew(e)===-1&&e.current.setPage(0))},[t.paginationMode,r,e]);Ir(e,"paginationModelChange",c),p.useEffect(()=>{t.paginationMode==="server"&&t.rowCount!=null&&e.current.setRowCount(t.rowCount)},[e,t.paginationMode,t.rowCount]),i_(e.current.store,()=>{if(Lk(e).hasNextPage===!1)return!0;if(t.paginationMode==="client")return w4(e)},(f,h)=>{if(h===!0&&Ew(e)!==-1){const m=w4(e),g=Yd(e);e.current.setRowCount(g.pageSize*g.page+m)}else typeof h=="number"&&e.current.setRowCount(h)}),p.useEffect(()=>{t.paginationMode==="client"&&e.current.setRowCount(w4(e))},[e,t.paginationMode])},gon=(e,t)=>{var l,c;const n=sf(e,"useGridPaginationMeta");e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:Lk,changeEvent:"paginationMetaChange"});const o={setPaginationMeta:p.useCallback(u=>{Lk(e)!==u&&(n.debug("Setting 'paginationMeta' to",u),e.current.setState(f=>we({},f,{pagination:we({},f.pagination,{meta:u})})))},[e,n])};zo(e,o,"public");const i=p.useCallback((u,d)=>{var m,g;const f=Lk(e);return!d.exportOnlyDirtyModels||t.paginationMeta!=null||((g=(m=t.initialState)==null?void 0:m.pagination)==null?void 0:g.meta)!=null?we({},u,{pagination:we({},u.pagination,{meta:f})}):u},[e,t.paginationMeta,(c=(l=t.initialState)==null?void 0:l.pagination)==null?void 0:c.meta]),a=p.useCallback((u,d)=>{var h;const f=(h=d.stateToRestore.pagination)!=null&&h.meta?d.stateToRestore.pagination.meta:Lk(e);return e.current.setState(m=>we({},m,{pagination:we({},m.pagination,{meta:f})})),u},[e]);Ol(e,"exportState",i),Ol(e,"restoreState",a),p.useEffect(()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)},[e,t.paginationMeta])},yon=(e,t)=>{var i,a,l,c,u,d,f;const n=we({},RGe(t.autoPageSize),t.paginationModel??((a=(i=t.initialState)==null?void 0:i.pagination)==null?void 0:a.paginationModel));OGe(n.pageSize,t.signature);const r=t.rowCount??((c=(l=t.initialState)==null?void 0:l.pagination)==null?void 0:c.rowCount)??(t.paginationMode==="client"?(u=e.rows)==null?void 0:u.totalRowCount:void 0),o=t.paginationMeta??((f=(d=t.initialState)==null?void 0:d.pagination)==null?void 0:f.meta)??{};return we({},e,{pagination:we({},e.pagination,{paginationModel:n,rowCount:r,meta:o,enabled:t.pagination===!0,paginationMode:t.paginationMode})})},bon=(e,t)=>{gon(e,t),non(e,t),mon(e,t)},von=(e,t)=>{var n;return we({},e,{preferencePanel:((n=t.initialState)==null?void 0:n.preferencePanel)??{open:!1}})},xon=(e,t)=>{var l;const n=sf(e,"useGridPreferencesPanel"),r=p.useCallback(()=>{e.current.setState(c=>{if(!c.preferencePanel.open)return c;n.debug("Hiding Preferences Panel");const u=D_(e);return e.current.publishEvent("preferencePanelClose",{openedPanelValue:u.openedPanelValue}),we({},c,{preferencePanel:{open:!1}})})},[e,n]),o=p.useCallback((c,u,d)=>{n.debug("Opening Preferences Panel"),e.current.setState(f=>we({},f,{preferencePanel:we({},f.preferencePanel,{open:!0,openedPanelValue:c,panelId:u,labelId:d})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:c})},[n,e]);zo(e,{showPreferences:o,hidePreferences:r},"public");const i=p.useCallback((c,u)=>{var h;const d=D_(e);return!u.exportOnlyDirtyModels||((h=t.initialState)==null?void 0:h.preferencePanel)!=null||d.open?we({},c,{preferencePanel:d}):c},[e,(l=t.initialState)==null?void 0:l.preferencePanel]),a=p.useCallback((c,u)=>{const d=u.stateToRestore.preferencePanel;return d!=null&&e.current.setState(f=>we({},f,{preferencePanel:d})),c},[e]);Ol(e,"exportState",i),Ol(e,"restoreState",a)},une=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;case"string":default:return""}},won=["id","field"],Son=["id","field"],Con=(e,t)=>{const[n,r]=p.useState({}),o=p.useRef(n),i=p.useRef({}),{processRowUpdate:a,onProcessRowUpdateError:l,cellModesModel:c,onCellModesModelChange:u}=t,d=z=>(...F)=>{t.editMode===zb.Cell&&z(...F)},f=p.useCallback((z,F)=>{const U=e.current.getCellParams(z,F);if(!e.current.isCellEditable(U))throw new Error(`MUI X: The cell with id=${z} and field=${F} is not editable.`)},[e]),h=p.useCallback((z,F,U)=>{if(e.current.getCellMode(z,F)!==U)throw new Error(`MUI X: The cell with id=${z} and field=${F} is not in ${U} mode.`)},[e]),m=p.useCallback((z,F)=>{if(!z.isEditable||z.cellMode===ja.Edit)return;const U=we({},z,{reason:Gv.cellDoubleClick});e.current.publishEvent("cellEditStart",U,F)},[e]),g=p.useCallback((z,F)=>{if(z.cellMode===ja.View||e.current.getCellMode(z.id,z.field)===ja.View)return;const U=we({},z,{reason:x0.cellFocusOut});e.current.publishEvent("cellEditStop",U,F)},[e]),b=p.useCallback((z,F)=>{if(z.cellMode===ja.Edit){if(F.which===229)return;let U;if(F.key==="Escape"?U=x0.escapeKeyDown:F.key==="Enter"?U=x0.enterKeyDown:F.key==="Tab"&&(U=F.shiftKey?x0.shiftTabKeyDown:x0.tabKeyDown,F.preventDefault()),U){const G=we({},z,{reason:U});e.current.publishEvent("cellEditStop",G,F)}}else if(z.isEditable){let U;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:F,cellParams:z,editMode:"cell"}))return;if(bGe(F)?U=Gv.printableKeyDown:xGe(F)?U=Gv.pasteKeyDown:F.key==="Enter"?U=Gv.enterKeyDown:(F.key==="Backspace"||F.key==="Delete")&&(U=Gv.deleteKeyDown),U){const W=we({},z,{reason:U,key:F.key});e.current.publishEvent("cellEditStart",W,F)}}},[e]),y=p.useCallback(z=>{const{id:F,field:U,reason:G}=z,W={id:F,field:U};(G===Gv.printableKeyDown||G===Gv.deleteKeyDown||G===Gv.pasteKeyDown)&&(W.deleteValue=!0),e.current.startCellEditMode(W)},[e]),v=p.useCallback(z=>{const{id:F,field:U,reason:G}=z;e.current.runPendingEditCellValueMutation(F,U);let W;G===x0.enterKeyDown?W="below":G===x0.tabKeyDown?W="right":G===x0.shiftTabKeyDown&&(W="left");const Y=G==="escapeKeyDown";e.current.stopCellEditMode({id:F,field:U,ignoreModifications:Y,cellToFocusAfter:W})},[e]),x=z=>async(...F)=>{var U;if(z){const{id:G,field:W}=F[0];((U=e.current.state.editRows[G][W])==null?void 0:U.error)||z(...F)}};Ir(e,"cellDoubleClick",d(m)),Ir(e,"cellFocusOut",d(g)),Ir(e,"cellKeyDown",d(b)),Ir(e,"cellEditStart",d(y)),Ir(e,"cellEditStop",d(v)),is(e,"cellEditStart",t.onCellEditStart),is(e,"cellEditStop",x(t.onCellEditStop));const S=p.useCallback((z,F)=>{const U=yd(e);return U[z]&&U[z][F]?ja.Edit:ja.View},[e]),C=no(z=>{const F=z!==t.cellModesModel;u&&F&&u(z,{api:e.current}),!(t.cellModesModel&&F)&&(r(z),o.current=z,e.current.publishEvent("cellModesModelChange",z))}),_=p.useCallback((z,F,U)=>{const G=we({},o.current);if(U!==null)G[z]=we({},G[z],{[F]:we({},U)});else{const W=G[z],Y=sr(W,[F].map(L_));G[z]=Y,Object.keys(G[z]).length===0&&delete G[z]}C(G)},[C]),N=p.useCallback((z,F,U)=>{e.current.setState(G=>{const W=we({},G.editRows);return U!==null?W[z]=we({},W[z],{[F]:we({},U)}):(delete W[z][F],Object.keys(W[z]).length===0&&delete W[z]),we({},G,{editRows:W})})},[e]),E=p.useCallback(z=>{const{id:F,field:U}=z,G=sr(z,won);f(F,U),h(F,U,ja.View),_(F,U,we({mode:ja.Edit},G))},[f,h,_]),I=no(async z=>{const{id:F,field:U,deleteValue:G,initialValue:W}=z,Y=e.current.getCellValue(F,U);let B=Y;G?B=une(e.current.getColumn(U)):W&&(B=W);const $=e.current.getColumn(U),K=!!$.preProcessEditCellProps&&G;let q={value:B,error:!1,isProcessingProps:K};if(N(F,U,q),e.current.setCellFocus(F,U),K&&(q=await Promise.resolve($.preProcessEditCellProps({id:F,row:e.current.getRow(F),props:q,hasChanged:B!==Y})),e.current.getCellMode(F,U)===ja.Edit)){const Z=yd(e);N(F,U,we({},q,{value:Z[F][U].value,isProcessingProps:!1}))}}),A=p.useCallback(z=>{const{id:F,field:U}=z,G=sr(z,Son);h(F,U,ja.Edit),_(F,U,we({mode:ja.View},G))},[h,_]),R=no(async z=>{var J;const{id:F,field:U,ignoreModifications:G,cellToFocusAfter:W="none"}=z;h(F,U,ja.Edit),e.current.runPendingEditCellValueMutation(F,U);const Y=()=>{N(F,U,null),_(F,U,null),W!=="none"&&e.current.moveFocusToRelativeCell(F,U,W)};if(G){Y();return}const B=yd(e),{error:$,isProcessingProps:K}=B[F][U],q=e.current.getRow(F);if($||K){i.current[F][U].mode=ja.Edit,_(F,U,{mode:ja.Edit});return}const Z=e.current.getRowWithUpdatedValuesFromCellEditing(F,U);if((J=t.dataSource)!=null&&J.updateRow){if(jg(q,Z)){Y();return}const oe=()=>{i.current[F][U].mode=ja.Edit,_(F,U,{mode:ja.Edit})},de={rowId:F,updatedRow:Z,previousRow:q};try{await e.current.dataSource.editRow(de),Y()}catch{oe()}}else if(a){const oe=de=>{i.current[F][U].mode=ja.Edit,_(F,U,{mode:ja.Edit}),l&&l(de)};try{Promise.resolve(a(Z,q,{rowId:F})).then(de=>{e.current.updateRows([de]),Y()}).catch(oe)}catch(de){oe(de)}}else e.current.updateRows([Z]),Y()}),k=p.useCallback(async z=>{var J,oe;const{id:F,field:U,value:G,debounceMs:W,unstable_skipValueParser:Y}=z;f(F,U),h(F,U,ja.Edit);const B=e.current.getColumn(U),$=e.current.getRow(F);let K=G;B.valueParser&&!Y&&(K=B.valueParser(G,$,B,e));let q=yd(e),Z=we({},q[F][U],{value:K,changeReason:W?"debouncedSetEditCellValue":"setEditCellValue"});if(B.preProcessEditCellProps){const de=G!==q[F][U].value;Z=we({},Z,{isProcessingProps:!0}),N(F,U,Z),Z=await Promise.resolve(B.preProcessEditCellProps({id:F,row:$,props:Z,hasChanged:de}))}return e.current.getCellMode(F,U)===ja.View?!1:(q=yd(e),Z=we({},Z,{isProcessingProps:!1}),Z.value=B.preProcessEditCellProps?q[F][U].value:K,N(F,U,Z),q=yd(e),!((oe=(J=q[F])==null?void 0:J[U])!=null&&oe.error))},[e,f,h,N]),T=p.useCallback((z,F)=>{const U=e.current.getColumn(F),G=yd(e),W=e.current.getRow(z);if(!G[z]||!G[z][F])return e.current.getRow(z);const{value:Y}=G[z][F];return U.valueSetter?U.valueSetter(Y,W,U,e):we({},W,{[F]:Y})},[e]),D={getCellMode:S,startCellEditMode:E,stopCellEditMode:A},O={setCellEditingEditCellValue:k,getRowWithUpdatedValuesFromCellEditing:T};zo(e,D,"public"),zo(e,O,"private"),p.useEffect(()=>{c&&C(c)},[c,C]),wa(()=>{const z=mm(e),F=i.current;i.current=aGe(n),Object.entries(n).forEach(([U,G])=>{Object.entries(G).forEach(([W,Y])=>{var K,q;const B=((q=(K=F[U])==null?void 0:K[W])==null?void 0:q.mode)||ja.View,$=z[U]?e.current.getRowId(z[U]):U;Y.mode===ja.Edit&&B===ja.View?I(we({id:$,field:W},Y)):Y.mode===ja.View&&B===ja.Edit&&R(we({id:$,field:W},Y))})})},[e,n,I,R])},_on=["id"],jon=["id"],Non=(e,t)=>{const[n,r]=p.useState({}),o=p.useRef(n),i=p.useRef({}),a=p.useRef({}),l=p.useRef(void 0),c=p.useRef(null),{processRowUpdate:u,onProcessRowUpdateError:d,rowModesModel:f,onRowModesModelChange:h}=t,m=Y=>(...B)=>{t.editMode===zb.Row&&Y(...B)},g=p.useCallback((Y,B)=>{const $=e.current.getCellParams(Y,B);if(!e.current.isCellEditable($))throw new Error(`MUI X: The cell with id=${Y} and field=${B} is not editable.`)},[e]),b=p.useCallback((Y,B)=>{if(e.current.getRowMode(Y)!==B)throw new Error(`MUI X: The row with id=${Y} is not in ${B} mode.`)},[e]),y=p.useCallback(Y=>{const B=yd(e);return Object.values(B[Y]).some($=>$.error)},[e]),v=p.useCallback((Y,B)=>{if(!Y.isEditable||e.current.getRowMode(Y.id)===zs.Edit)return;const $=e.current.getRowParams(Y.id),K=we({},$,{field:Y.field,reason:pw.cellDoubleClick});e.current.publishEvent("rowEditStart",K,B)},[e]),x=p.useCallback(Y=>{c.current=Y},[]),S=p.useCallback((Y,B)=>{Y.isEditable&&e.current.getRowMode(Y.id)!==zs.View&&(c.current=null,l.current=setTimeout(()=>{var $;if((($=c.current)==null?void 0:$.id)!==Y.id){if(!e.current.getRow(Y.id)||e.current.getRowMode(Y.id)===zs.View||y(Y.id))return;const K=e.current.getRowParams(Y.id),q=we({},K,{field:Y.field,reason:qy.rowFocusOut});e.current.publishEvent("rowEditStop",q,B)}}))},[e,y]);p.useEffect(()=>()=>{clearTimeout(l.current)},[]);const C=p.useCallback((Y,B)=>{if(Y.cellMode===zs.Edit){if(B.which===229)return;let $;if(B.key==="Escape")$=qy.escapeKeyDown;else if(B.key==="Enter")$=qy.enterKeyDown;else if(B.key==="Tab"){const K=gO(e).filter(q=>e.current.getColumn(q).type===CV?!0:e.current.isCellEditable(e.current.getCellParams(Y.id,q)));if(B.shiftKey?Y.field===K[0]&&($=qy.shiftTabKeyDown):Y.field===K[K.length-1]&&($=qy.tabKeyDown),B.preventDefault(),!$){const q=K.findIndex(J=>J===Y.field),Z=K[B.shiftKey?q-1:q+1];e.current.setCellFocus(Y.id,Z)}}if($){if($!==qy.escapeKeyDown&&y(Y.id))return;const K=we({},e.current.getRowParams(Y.id),{reason:$,field:Y.field});e.current.publishEvent("rowEditStop",K,B)}}else if(Y.isEditable){let $;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:B,cellParams:Y,editMode:"row"}))return;if(bGe(B)||xGe(B)?$=pw.printableKeyDown:B.key==="Enter"?$=pw.enterKeyDown:(B.key==="Backspace"||B.key==="Delete")&&($=pw.deleteKeyDown),$){const q=e.current.getRowParams(Y.id),Z=we({},q,{field:Y.field,reason:$});e.current.publishEvent("rowEditStart",Z,B)}}},[e,y]),_=p.useCallback(Y=>{const{id:B,field:$,reason:K}=Y,q={id:B,fieldToFocus:$};(K===pw.printableKeyDown||K===pw.deleteKeyDown)&&(q.deleteValue=!!$),e.current.startRowEditMode(q)},[e]),N=p.useCallback(Y=>{const{id:B,reason:$,field:K}=Y;e.current.runPendingEditCellValueMutation(B);let q;$===qy.enterKeyDown?q="below":$===qy.tabKeyDown?q="right":$===qy.shiftTabKeyDown&&(q="left");const Z=$==="escapeKeyDown";e.current.stopRowEditMode({id:B,ignoreModifications:Z,field:K,cellToFocusAfter:q})},[e]);Ir(e,"cellDoubleClick",m(v)),Ir(e,"cellFocusIn",m(x)),Ir(e,"cellFocusOut",m(S)),Ir(e,"cellKeyDown",m(C)),Ir(e,"rowEditStart",m(_)),Ir(e,"rowEditStop",m(N)),is(e,"rowEditStart",t.onRowEditStart),is(e,"rowEditStop",t.onRowEditStop);const E=p.useCallback(Y=>JGe(e,{rowId:Y,editMode:t.editMode})?zs.Edit:zs.View,[e,t.editMode]),I=no(Y=>{const B=Y!==t.rowModesModel;h&&B&&h(Y,{api:e.current}),!(t.rowModesModel&&B)&&(r(Y),o.current=Y,e.current.publishEvent("rowModesModelChange",Y))}),A=p.useCallback((Y,B)=>{const $=we({},o.current);B!==null?$[Y]=we({},B):delete $[Y],I($)},[I]),R=p.useCallback((Y,B)=>{e.current.setState($=>{const K=we({},$.editRows);return B!==null?K[Y]=B:delete K[Y],we({},$,{editRows:K})})},[e]),k=p.useCallback((Y,B,$)=>{e.current.setState(K=>{const q=we({},K.editRows);return $!==null?q[Y]=we({},q[Y],{[B]:we({},$)}):(delete q[Y][B],Object.keys(q[Y]).length===0&&delete q[Y]),we({},K,{editRows:q})})},[e]),T=p.useCallback(Y=>{const{id:B}=Y,$=sr(Y,_on);b(B,zs.View),A(B,we({mode:zs.Edit},$))},[b,A]),D=no(Y=>{const{id:B,fieldToFocus:$,deleteValue:K,initialValue:q}=Y,Z=e.current.getRow(B),J=Cm(e),oe=J.reduce((de,ae)=>{const ue=ae.field;if(!e.current.getCellParams(B,ue).isEditable)return de;const se=e.current.getColumn(ue);let me=e.current.getCellValue(B,ue);return $===ue&&(K||q)&&(K?me=une(se):q&&(me=q)),de[ue]={value:me,error:!1,isProcessingProps:se.editable&&!!se.preProcessEditCellProps&&K},de},{});a.current[B]=Z,R(B,oe),$&&e.current.setCellFocus(B,$),J.filter(de=>e.current.getCellParams(B,de.field).isEditable&&de.editable&&!!de.preProcessEditCellProps&&K).forEach(de=>{const ae=de.field,ue=e.current.getCellValue(B,ae),ce=K?une(de):q??ue;Promise.resolve(de.preProcessEditCellProps({id:B,row:Z,props:oe[ae],hasChanged:ce!==ue})).then(se=>{if(e.current.getRowMode(B)===zs.Edit){const me=yd(e);k(B,ae,we({},se,{value:me[B][ae].value,isProcessingProps:!1}))}})})}),O=p.useCallback(Y=>{const{id:B}=Y,$=sr(Y,jon);b(B,zs.Edit),A(B,we({mode:zs.View},$))},[b,A]),z=no(async Y=>{var ue;const{id:B,ignoreModifications:$,field:K,cellToFocusAfter:q="none"}=Y;e.current.runPendingEditCellValueMutation(B);const Z=()=>{q!=="none"&&K&&e.current.moveFocusToRelativeCell(B,K,q),R(B,null),A(B,null),delete a.current[B]};if($){Z();return}const J=yd(e),oe=a.current[B];if(Object.values(J[B]).some(ce=>ce.isProcessingProps)){i.current[B].mode=zs.Edit;return}if(y(B)){i.current[B].mode=zs.Edit,A(B,{mode:zs.Edit});return}const ae=e.current.getRowWithUpdatedValuesFromRowEditing(B);if((ue=t.dataSource)!=null&&ue.updateRow){if(jg(oe,ae)){Z();return}const ce=()=>{i.current[B].mode=zs.Edit,A(B,{mode:zs.Edit})},se={rowId:B,updatedRow:ae,previousRow:oe};try{await e.current.dataSource.editRow(se),Z()}catch{ce()}}else if(u){const ce=se=>{i.current[B]&&(i.current[B].mode=zs.Edit,A(B,{mode:zs.Edit})),d&&d(se)};try{Promise.resolve(u(ae,oe,{rowId:B})).then(se=>{e.current.updateRows([se]),Z()}).catch(ce)}catch(se){ce(se)}}else e.current.updateRows([ae]),Z()}),F=p.useCallback(Y=>{const{id:B,field:$,value:K,debounceMs:q,unstable_skipValueParser:Z}=Y;g(B,$);const J=e.current.getColumn($),oe=e.current.getRow(B);let de=K;J.valueParser&&!Z&&(de=J.valueParser(K,oe,J,e));let ae=yd(e),ue=we({},ae[B][$],{value:de,changeReason:q?"debouncedSetEditCellValue":"setEditCellValue"});return J.preProcessEditCellProps||k(B,$,ue),new Promise(ce=>{const se=[];if(J.preProcessEditCellProps){const me=ue.value!==ae[B][$].value;ue=we({},ue,{isProcessingProps:!0}),k(B,$,ue);const fe=ae[B],te=sr(fe,[$].map(L_)),ye=Promise.resolve(J.preProcessEditCellProps({id:B,row:oe,props:ue,hasChanged:me,otherFieldsProps:te})).then(ve=>{if(e.current.getRowMode(B)===zs.View){ce(!1);return}ae=yd(e),ve=we({},ve,{isProcessingProps:!1}),ve.value=J.preProcessEditCellProps?ae[B][$].value:de,k(B,$,ve)});se.push(ye)}Object.entries(ae[B]).forEach(([me,fe])=>{if(me===$)return;const te=e.current.getColumn(me);if(!te.preProcessEditCellProps)return;fe=we({},fe,{isProcessingProps:!0}),k(B,me,fe),ae=yd(e);const ye=ae[B],ve=sr(ye,[me].map(L_)),ge=Promise.resolve(te.preProcessEditCellProps({id:B,row:oe,props:fe,hasChanged:!1,otherFieldsProps:ve})).then(Ee=>{if(e.current.getRowMode(B)===zs.View){ce(!1);return}Ee=we({},Ee,{isProcessingProps:!1}),k(B,me,Ee)});se.push(ge)}),Promise.all(se).then(()=>{e.current.getRowMode(B)===zs.Edit?(ae=yd(e),ce(!ae[B][$].error)):ce(!1)})})},[e,g,k]),U=p.useCallback(Y=>{const B=yd(e),$=e.current.getRow(Y);if(!B[Y])return e.current.getRow(Y);let K=we({},a.current[Y],$);return Object.entries(B[Y]).forEach(([q,Z])=>{const J=e.current.getColumn(q);J!=null&&J.valueSetter?K=J.valueSetter(Z.value,K,J,e):K[q]=Z.value}),K},[e]),G={getRowMode:E,startRowEditMode:T,stopRowEditMode:O},W={setRowEditingEditCellValue:F,getRowWithUpdatedValuesFromRowEditing:U};zo(e,G,"public"),zo(e,W,"private"),p.useEffect(()=>{f&&I(f)},[f,I]),wa(()=>{const Y=mm(e),B=i.current;i.current=aGe(n);const $=new Set([...Object.keys(n),...Object.keys(B)]);Array.from($).forEach(K=>{var oe;const q=n[K]??{mode:zs.View},Z=((oe=B[K])==null?void 0:oe.mode)||zs.View,J=Y[K]?e.current.getRowId(Y[K]):K;q.mode===zs.Edit&&Z===zs.View?D(we({id:J},q)):q.mode===zs.View&&Z===zs.Edit&&z(we({id:J},q))})},[e,n,D,z])},Eon=e=>we({},e,{editRows:{}}),Pon=(e,t,n)=>{Con(e,t),Non(e,t);const r=p.useRef({}),{isCellEditable:o}=t,i=n.hooks.useIsCellEditable(e,t),a=p.useCallback(g=>!i(g)||!g.colDef.editable||!g.colDef.renderEditCell?!1:o?o(g):!0,[o,i]),l=(g,b,y,v)=>{if(!y){v();return}if(r.current[g]||(r.current[g]={}),r.current[g][b]){const[C]=r.current[g][b];clearTimeout(C)}const x=()=>{const[C]=r.current[g][b];clearTimeout(C),v(),delete r.current[g][b]},S=setTimeout(()=>{v(),delete r.current[g][b]},y);r.current[g][b]=[S,x]};p.useEffect(()=>{const g=r.current;return()=>{Object.entries(g).forEach(([b,y])=>{Object.keys(y).forEach(v=>{const[x]=g[b][v];clearTimeout(x),delete g[b][v]})})}},[]);const c=p.useCallback((g,b)=>{if(r.current[g]){if(!b)Object.keys(r.current[g]).forEach(y=>{const[,v]=r.current[g][y];v()});else if(r.current[g][b]){const[,y]=r.current[g][b];y()}}},[]),u=p.useCallback(g=>{const{id:b,field:y,debounceMs:v}=g;return new Promise(x=>{l(b,y,v,async()=>{const S=t.editMode===zb.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(b,y)===ja.Edit){const C=await S(g);x(C)}})})},[e,t.editMode]),d=p.useCallback((g,b)=>t.editMode===zb.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(g,b):e.current.getRowWithUpdatedValuesFromRowEditing(g),[e,t.editMode]),f=p.useCallback((g,b)=>{var v;return((v=yd(e)[g])==null?void 0:v[b])??null},[e]),h={isCellEditable:a,setEditCellValue:u,getRowWithUpdatedValues:d,unstable_getEditCellMeta:f},m={runPendingEditCellValueMutation:c};zo(e,h,"public"),zo(e,m,"private")},Ion=(e,t,n)=>{const r=!!t.dataSource;return n.current.caches.rows=d8({rows:r?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),we({},e,{rows:ZUe({apiRef:n,rowCountProp:t.rowCount,loadingProp:r?!0:t.loading,previousTree:null,previousTreeDepths:null})})},Aon=(e,t,n)=>{const r=sf(e,"useGridRows"),o=p.useRef(Date.now()),i=p.useRef(t.rowCount),a=kp(),{setRowIndex:l,setRowPosition:c}=n.hooks.useGridRowsOverridableMethods(e,t),u=p.useCallback(W=>{const Y=mm(e)[W];if(Y)return Y;const B=_g(e,W);return B&&AP(B)?{[M_]:W}:null},[e]),d=p.useCallback(W=>TP(e,W),[e]),f=p.useCallback(({cache:W,throttle:Y})=>{const B=()=>{o.current=Date.now(),e.current.setState(K=>we({},K,{rows:ZUe({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:Sc(e),previousTreeDepths:Wje(e),previousGroupsToFetch:KKt(e)})})),e.current.publishEvent("rowsSet")};if(a.clear(),e.current.caches.rows=W,!Y){B();return}const $=t.throttleRowsMs-(Date.now()-o.current);if($>0){a.start($,B);return}B()},[t.throttleRowsMs,t.rowCount,t.loading,e,a]),h=p.useCallback(W=>{if(r.debug(`Updating all rows, new length ${W.length}`),!t.dataSource&&O_(e)){e.current.updateNonPivotRows(W,!1);return}const Y=d8({rows:W,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),B=e.current.caches.rows;Y.rowsBeforePartialUpdates=B.rowsBeforePartialUpdates,f({cache:Y,throttle:!0})},[r,t.getRowId,t.dataSource,t.loading,t.rowCount,f,e]),m=p.useCallback(W=>{if(t.signature===H0.DataGrid&&W.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` +`));if(!t.dataSource&&O_(e)){e.current.updateNonPivotRows(W);return}const Y=Kje(e,W,t.getRowId),B=qje({updates:Y,getRowId:t.getRowId,previousCache:e.current.caches.rows});f({cache:B,throttle:!0})},[t.signature,t.dataSource,t.getRowId,f,e]),g=p.useCallback((W,Y)=>{const B=Kje(e,W,t.getRowId),$=qje({updates:B,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:Y??[]});f({cache:$,throttle:!1})},[t.getRowId,f,e]),b=p.useCallback(W=>{r.debug(`Setting loading to ${W}`),e.current.setState(Y=>we({},Y,{rows:we({},Y.rows,{loading:W})})),e.current.caches.rows.loadingPropBeforePartialUpdates=W},[e,r]),y=p.useCallback(()=>{const W=YE(e),Y=mm(e);return new Map(W.map(B=>[B,Y[B]??{}]))},[e]),v=p.useCallback(()=>GI(e),[e]),x=p.useCallback(()=>YE(e),[e]),S=p.useCallback(W=>{const{rowIdToIndexMap:Y}=I5(e);return Y.get(W)},[e]),C=p.useCallback((W,Y)=>{const B=_g(e,W);if(!B)throw new Error(`MUI X: No row with id #${W} found.`);if(B.type!=="group")throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const $=we({},B,{childrenExpanded:Y});e.current.setState(K=>we({},K,{rows:we({},K.rows,{tree:we({},K.rows.tree,{[W]:$})})})),e.current.publishEvent("rowExpansionChange",$)},[e]),_=p.useCallback(()=>{const W=we({},Sc(e)),Y=B=>{const $=W[B];($==null?void 0:$.type)==="group"&&(W[B]=we({},$,{childrenExpanded:!0}),$.children.forEach(Y))};Y(Jl),e.current.setState(B=>we({},B,{rows:we({},B.rows,{tree:W})})),e.current.publishEvent("rowExpansionChange",W[Jl])},[e]),N=p.useCallback(()=>{const W=we({},Sc(e)),Y=B=>{const $=W[B];($==null?void 0:$.type)==="group"&&(W[B]=we({},$,{childrenExpanded:!1}),$.children.forEach(Y))};Y(Jl),e.current.setState(B=>we({},B,{rows:we({},B.rows,{tree:W})})),e.current.publishEvent("rowExpansionChange",W[Jl])},[e]),E=p.useCallback(W=>_g(e,W)??null,[e]),I=p.useCallback(({skipAutoGeneratedRows:W=!0,groupId:Y,applySorting:B,applyFiltering:$,directChildrenOnly:K=!1})=>{const q=Sc(e);let Z;if(B){const J=q[Y];if(!J)return[];const oe=yO(e);Z=[];const de=oe.findIndex(ae=>ae===Y)+1;for(let ae=de;aeJ.depth);ae+=1){const ue=oe[ae];(!W||!AP(q[ue]))&&Z.push(ue)}}else Z=Rde(q,Y,W,K);if($){const J=qI(e);Z=_V(J)?Z:Z.filter(oe=>J[oe]!==!1)}return Z},[e]),A=p.useCallback((W,Y)=>{if(t.signature===H0.DataGrid&&Y.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` +`));if(Y.length===0)return;if(hO(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const $=we({},Sc(e)),K=we({},mm(e)),q=$[Jl],Z=[...q.children],J=new Set;for(let de=0;de{var ae;return((ae=$[de])==null?void 0:ae.type)==="leaf"});e.current.caches.rows.dataRowIdToModelLookup=K,e.current.setState(de=>we({},de,{rows:we({},de.rows,{loading:t.loading,totalRowCount:Math.max(t.rowCount||0,Z.length),dataRowIdToModelLookup:K,dataRowIds:oe,tree:$})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId,t.loading,t.rowCount]),R={getRow:u,setLoading:b,getRowId:d,getRowModels:y,getRowsCount:v,getAllRowIds:x,setRows:h,updateRows:m,getRowNode:E,getRowIndexRelativeToVisibleRows:S,unstable_replaceRows:A},k={setRowIndex:l,setRowPosition:c,setRowChildrenExpansion:C,getRowGroupChildren:I,expandAllRows:_,collapseAllRows:N},T={updateNestedRows:g},D=p.useCallback(()=>{r.info("Row grouping pre-processing have changed, regenerating the row tree");let W;e.current.caches.rows.rowsBeforePartialUpdates===t.rows?W=we({},e.current.caches.rows,{updates:{type:"full",rows:YE(e)}}):W=d8({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),f({cache:W,throttle:!1})},[r,e,t.rows,t.getRowId,t.loading,t.rowCount,f]),O=kh(()=>t.dataSource),z=p.useCallback(W=>{if(t.dataSource&&t.dataSource!==O.current){O.current=t.dataSource;return}W==="rowTreeCreation"&&D()},[D,O,t.dataSource]),F=p.useCallback(()=>{e.current.getActiveStrategy(cx.RowTree)!==YKt(e)&&D()},[e,D]);Ir(e,"activeStrategyProcessorChange",z),Ir(e,"strategyAvailabilityChange",F);const U=p.useCallback(()=>{e.current.setState(W=>{const Y=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:Sc(e),treeDepths:Wje(e),dataRowIds:YE(e),dataRowIdToModelLookup:mm(e)});return we({},W,{rows:we({},W.rows,Y,{totalTopLevelRowCount:XUe({tree:Y.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet")},[e,t.rowCount]);Qde(e,"hydrateRows",U),zo(e,R,"public"),zo(e,k,t.signature===H0.DataGrid?"private":"public"),zo(e,T,"private");const G=p.useRef(!0);p.useEffect(()=>{if(G.current){G.current=!1;return}let W=!1;t.rowCount!==i.current&&(W=!0,i.current=t.rowCount);const Y=t.dataSource?XKt(e):t.rows,B=e.current.caches.rows.rowsBeforePartialUpdates===Y,$=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,K=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;B&&($||(e.current.setState(q=>we({},q,{rows:we({},q.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading),K||(e.current.setState(q=>we({},q,{rows:we({},q.rows,{totalRowCount:Math.max(t.rowCount||0,q.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,q.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount),!W)||(r.debug(`Updating all rows, new length ${Y==null?void 0:Y.length}`),f({cache:d8({rows:Y,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))},[t.rows,t.rowCount,t.getRowId,t.loading,t.dataSource,r,f,e])},Ton=e=>{const t={[Jl]:we({},JKt(),{children:e})};for(let n=0;n{const n=we({},e),r={};for(let a=0;a!r[a])),n[Jl]=we({},o,{children:i}),{groupingName:$_,tree:n,treeDepths:{0:i.length},dataRowIds:i}},Mon=e=>e.updates.type==="full"?Ton(e.updates.rows):kon({previousTree:e.previousTree,actions:e.updates.actions}),Ron=e=>{YM(e,$_,"rowTreeCreation",Mon)};class $Ne extends Error{}function Oon(e,t,n){var m;const r=p.useCallback(g=>({field:g,colDef:e.current.getColumn(g)}),[e]),o=p.useCallback(g=>{const b=e.current.getRow(g);if(!b)throw new $Ne(`No row with id #${g} found`);return{id:g,columns:e.current.getAllColumns(),row:b}},[e]),i=p.useCallback((g,b,y,{cellMode:v,colDef:x,hasFocus:S,rowNode:C,tabIndex:_,value:N,formattedValue:E})=>{const I=N!==void 0?N:e.current.getRowValue(y,x),A=E!==void 0?E:e.current.getRowFormattedValue(y,x),R={id:g,field:b,row:y,rowNode:C,colDef:x,cellMode:v,hasFocus:S,tabIndex:_,value:I,formattedValue:A,isEditable:!1,api:e.current};return R.isEditable=x&&e.current.isCellEditable(R),R},[e]),a=p.useCallback((g,b)=>{var _;const y=e.current.getRow(g),v=_g(e,g);if(!y||!v)throw new $Ne(`No row with id #${g} found`);const x=mh(e),S=qde(e),C=e.current.getCellMode(g,b);return e.current.getCellParamsForRow(g,b,y,{colDef:t.listView&&((_=t.listViewColumn)==null?void 0:_.field)===b?pGe(e):e.current.getColumn(b),rowNode:v,hasFocus:x!==null&&x.field===b&&x.id===g,tabIndex:S&&S.field===b&&S.id===g?0:-1,cellMode:C})},[e,t.listView,(m=t.listViewColumn)==null?void 0:m.field]),l=p.useCallback(g=>e.current.rootElementRef.current?ben(e.current.rootElementRef.current,g):null,[e]),c=p.useCallback(g=>e.current.rootElementRef.current?ven(e.current.rootElementRef.current,g):null,[e]),u=p.useCallback((g,b)=>e.current.rootElementRef.current?xen(e.current.rootElementRef.current,{id:g,field:b}):null,[e]),d=n.hooks.useGridParamsOverridableMethods(e),f={getCellValue:d.getCellValue,getCellParams:a,getCellElement:u,getRowValue:d.getRowValue,getRowFormattedValue:d.getRowFormattedValue,getRowParams:o,getRowElement:c,getColumnHeaderParams:r,getColumnHeaderElement:l},h={getCellParamsForRow:i};zo(e,f,"public"),zo(e,h,"private")}const _4={type:"include",ids:new Set},Don=(e,t)=>we({},e,{rowSelection:t.rowSelection?t.rowSelectionModel??_4:_4}),Lon=(e,t)=>{var W,Y,B,$,K,q,Z,J,oe,de;const n=sf(e,"useGridSelection"),r=p.useCallback(ae=>(...ue)=>{t.rowSelection&&ae(...ue)},[t.rowSelection]),o=Wn(e,hO)>1,i=t.signature!==H0.DataGrid&&(((W=t.rowSelectionPropagation)==null?void 0:W.parents)||((Y=t.rowSelectionPropagation)==null?void 0:Y.descendants))&&o,a=p.useMemo(()=>t.rowSelectionModel,[t.rowSelectionModel]),l=p.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:a,propOnChange:t.onRowSelectionModelChange,stateSelector:C0,changeEvent:"rowSelectionChange"});const{checkboxSelection:c,disableRowSelectionOnClick:u,isRowSelectable:d}=t,f=Wde(t),h=p.useCallback(ae=>{let ue=ae;const ce=l.current??ae,se=e.current.isRowSelected(ae);if(se){const me=s_(e),fe=me.findIndex(ye=>ye===ce),te=me.findIndex(ye=>ye===ue);if(fe===te)return;fe>te?ue=me[te+1]:ue=me[te-1]}l.current=ae,e.current.selectRowRange({startId:ce,endId:ue},!se)},[e]),m=no(()=>t.pagination&&t.checkboxSelectionVisibleOnly&&t.paginationMode==="client"?$Ge(e):s_(e)),g=p.useCallback((ae,ue)=>{if(t.signature===H0.DataGrid&&!f&&(ae.type!=="include"||ae.ids.size>1))throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join(` +`));if(C0(e)!==ae){if(n.debug("Setting selection model"),l.current!==null){const se=ae.ids.has(l.current);(ae.type==="include"&&!se||ae.type==="exclude"&&se)&&(l.current=null)}e.current.setState(se=>we({},se,{rowSelection:t.rowSelection?ae:_4}),ue)}},[e,n,t.rowSelection,t.signature,f]),b=p.useCallback(ae=>bO(e).has(ae),[e]),y=p.useCallback(ae=>{if(t.rowSelection===!1||d&&!d(e.current.getRowParams(ae)))return!1;const ue=_g(e,ae);return!((ue==null?void 0:ue.type)==="footer"||(ue==null?void 0:ue.type)==="pinnedRow")},[e,t.rowSelection,d]),v=p.useCallback(()=>AGe(e),[e]),x=p.useCallback((ae,ue=!0,ce=!1)=>{var me,fe,te,ye,ve,ge;if(!e.current.isRowSelectable(ae))return;const se=Sc(e);if(l.current=ue?ae:null,ce){n.debug(`Setting selection for row ${ae}`);const Ee={type:"include",ids:new Set},xe=Ne=>{Ee.ids.add(Ne)};ue&&(xe(ae),i&&MT(e,se,ae,((me=t.rowSelectionPropagation)==null?void 0:me.descendants)??!1,((fe=t.rowSelectionPropagation)==null?void 0:fe.parents)??!1,xe)),e.current.setRowSelectionModel(Ee,"singleRowSelection")}else{n.debug(`Toggling selection for row ${ae}`);const Ee=C0(e),xe={type:Ee.type,ids:new Set(Ee.ids)},Ne=Lw(xe);Ne.unselect(ae);const _e=Ge=>{Ne.select(Ge)},Be=Ge=>{Ne.unselect(Ge)};ue?(_e(ae),i&&MT(e,se,ae,((te=t.rowSelectionPropagation)==null?void 0:te.descendants)??!1,((ye=t.rowSelectionPropagation)==null?void 0:ye.parents)??!1,_e)):i&&aNe(e,se,ae,((ve=t.rowSelectionPropagation)==null?void 0:ve.descendants)??!1,((ge=t.rowSelectionPropagation)==null?void 0:ge.parents)??!1,Be),(xe.type==="include"&&xe.ids.size<2||f)&&e.current.setRowSelectionModel(xe,"singleRowSelection")}},[e,n,i,(B=t.rowSelectionPropagation)==null?void 0:B.descendants,($=t.rowSelectionPropagation)==null?void 0:$.parents,f]),S=p.useCallback((ae,ue=!0,ce=!1)=>{var ve,ge,Ee,xe,Ne,_e;if(n.debug("Setting selection for several rows"),t.rowSelection===!1)return;const se=Sc(e),me=new Set;for(let Be=0;Be{Be.select(Ge)};for(const Ge of me)MT(e,se,Ge,((ve=t.rowSelectionPropagation)==null?void 0:ve.descendants)??!1,((ge=t.rowSelectionPropagation)==null?void 0:ge.parents)??!1,Te)}}else te.ids=new Set;if(fe.type===te.type&&te.ids.size===fe.ids.size&&Array.from(te.ids).every(Be=>fe.ids.has(Be)))return}else{te={type:fe.type,ids:new Set(fe.ids)};const Be=Lw(te),Te=Ze=>{Be.select(Ze)},Ge=Ze=>{Be.unselect(Ze)};for(const Ze of me)ue?(Be.select(Ze),i&&MT(e,se,Ze,((Ee=t.rowSelectionPropagation)==null?void 0:Ee.descendants)??!1,((xe=t.rowSelectionPropagation)==null?void 0:xe.parents)??!1,Te)):(Ge(Ze),i&&aNe(e,se,Ze,((Ne=t.rowSelectionPropagation)==null?void 0:Ne.descendants)??!1,((_e=t.rowSelectionPropagation)==null?void 0:_e.parents)??!1,Ge))}(te.type==="include"&&te.ids.size<2||f)&&e.current.setRowSelectionModel(te,"multipleRowsSelection")},[n,i,f,e,(K=t.rowSelectionPropagation)==null?void 0:K.descendants,(q=t.rowSelectionPropagation)==null?void 0:q.parents,t.rowSelection]),C=p.useCallback(ae=>{var fe,te;if(!o||!i||ae.type==="exclude"||ae.ids.size===0&&ae.type==="include")return ae;const ue={type:ae.type,ids:new Set(ae.ids)},ce=Sc(e),se=Lw(ue),me=ye=>{se.select(ye)};for(const ye of ae.ids)MT(e,ce,ye,((fe=t.rowSelectionPropagation)==null?void 0:fe.descendants)??!1,((te=t.rowSelectionPropagation)==null?void 0:te.parents)??!1,me,se);return ue},[e,(Z=t.rowSelectionPropagation)==null?void 0:Z.descendants,(J=t.rowSelectionPropagation)==null?void 0:J.parents,o,i]),_=p.useCallback(({startId:ae,endId:ue},ce=!0,se=!1)=>{if(!e.current.getRow(ae)||!e.current.getRow(ue))return;n.debug(`Expanding selection from row ${ae} to row ${ue}`);const me=s_(e),fe=me.indexOf(ae),te=me.indexOf(ue),[ye,ve]=fe>te?[te,fe]:[fe,te],ge=me.slice(ye,ve+1);e.current.selectRows(ge,ce,se)},[e,n]),N={selectRow:x,setRowSelectionModel:g,getSelectedRows:v,isRowSelected:b,isRowSelectable:y},E={selectRows:S,selectRowRange:_,getPropagatedRowSelectionModel:C};zo(e,N,"public"),zo(e,E,t.signature===H0.DataGrid?"private":"public");const I=p.useRef(!0),A=p.useCallback((ae=!1)=>{var Ee,xe;if(I.current)return;const ue=C0(e),ce=mm(e),se=Sc(e),me=qI(e),fe=Ne=>t.filterMode==="server"?!ce[Ne]:!se[Ne]||me[Ne]===!1,te={type:ue.type,ids:new Set(ue.ids)},ye=Lw(te);let ve=!1;for(const Ne of ue.ids){if(fe(Ne)){if(t.keepNonExistentRowsSelected)continue;ye.unselect(Ne),ve=!0;continue}if(!((Ee=t.rowSelectionPropagation)!=null&&Ee.parents))continue;const _e=se[Ne];if((_e==null?void 0:_e.type)==="group"){if(_e.isAutoGenerated){ye.unselect(Ne),ve=!0;continue}_e.children.every(Te=>me[Te]===!1)||(ye.unselect(Ne),ve=!0)}}const ge=o&&((xe=t.rowSelectionPropagation)==null?void 0:xe.parents)&&(te.ids.size>0||te.type==="exclude");if(ve||ge&&!ae)if(ge)if(te.type==="exclude"){const Ne=m(),_e=[];for(let Be=0;Be{const ce=ue.metaKey||ue.ctrlKey,se=!c&&!ce&&!UYt(ue),me=!f||se,fe=e.current.isRowSelected(ae),ve=NV(e)>1&&me||!fe;e.current.selectRow(ae,ve,me)},[e,f,c]),k=p.useCallback((ae,ue)=>{var me;if(u)return;const ce=(me=ue.target.closest(`.${He.cell}`))==null?void 0:me.getAttribute("data-field");if(ce===YI.field||ce===zde)return;if(ce){const fe=e.current.getColumn(ce);if((fe==null?void 0:fe.type)===CV)return}_g(e,ae.id).type!=="pinnedRow"&&(ue.shiftKey&&f?h(ae.id):R(ae.id,ue))},[u,f,e,h,R]),T=p.useCallback((ae,ue)=>{var ce;f&&ue.shiftKey&&((ce=window.getSelection())==null||ce.removeAllRanges())},[f]),D=p.useCallback((ae,ue)=>{f&&ue.nativeEvent.shiftKey?h(ae.id):e.current.selectRow(ae.id,ae.value,!f)},[e,h,f]),O=p.useCallback(ae=>{var me;const ue=md(e),ce=NGe(e),se=ue.items.length>0||(ce==null?void 0:ce.some(fe=>fe.length));!t.isRowSelectable&&!t.checkboxSelectionVisibleOnly&&(!o||(me=t.rowSelectionPropagation)!=null&&me.descendants)&&!se&&!t.disableRowSelectionExcludeModel?e.current.setRowSelectionModel({type:ae?"exclude":"include",ids:new Set},"multipleRowsSelection"):e.current.selectRows(m(),ae)},[e,m,t.checkboxSelectionVisibleOnly,t.isRowSelectable,(de=t.rowSelectionPropagation)==null?void 0:de.descendants,t.disableRowSelectionExcludeModel,o]),z=p.useCallback(ae=>{O(ae.value)},[O]),F=p.useCallback((ae,ue)=>{if(e.current.getCellMode(ae.id,ae.field)!==ja.Edit&&!wO(ue)){if(ZE(ue.key)&&ue.shiftKey){const ce=mh(e);if(ce&&ce.id!==ae.id){ue.preventDefault();const se=e.current.isRowSelected(ce.id);if(!f){e.current.selectRow(ce.id,!se,!0);return}const me=e.current.getRowIndexRelativeToVisibleRows(ce.id),fe=e.current.getRowIndexRelativeToVisibleRows(ae.id);let te,ye;me>fe?se?(te=fe,ye=me-1):(te=fe,ye=me):se?(te=me+1,ye=fe):(te=me,ye=fe);const ve=I5(e),ge=[];for(let Ee=te;Ee<=ye;Ee+=1)ge.push(ve.rows[Ee].id);e.current.selectRows(ge,!se);return}}if(ue.key===" "&&ue.shiftKey){ue.preventDefault(),R(ae.id,ue);return}String.fromCharCode(ue.keyCode)==="A"&&(ue.ctrlKey||ue.metaKey)&&(ue.preventDefault(),f&&O(!0))}},[e,f,R,O]),U=no(()=>{if(!t.rowSelection){e.current.setRowSelectionModel(_4);return}if(a===void 0)return;if(!i||!o||a.type==="include"&&a.ids.size===0){e.current.setRowSelectionModel(a);return}const ae=e.current.getPropagatedRowSelectionModel(a);if(ae.type!==a.type||ae.ids.size!==a.ids.size||!Array.from(a.ids).every(ue=>ae.ids.has(ue))){e.current.setRowSelectionModel(ae);return}e.current.setRowSelectionModel(a)});Ir(e,"filteredRowsSet",r(()=>A())),Ir(e,"rowClick",r(k)),Ir(e,"rowSelectionCheckboxChange",r(D)),Ir(e,"headerSelectionCheckboxChange",z),Ir(e,"cellMouseDown",r(T)),Ir(e,"cellKeyDown",r(F)),p.useEffect(()=>{U()},[e,a,t.rowSelection,U]);const G=a!=null;p.useEffect(()=>{if(G||!t.rowSelection||typeof y!="function")return;const ae=C0(e);if(ae.type!=="include")return;const ue=new Set;for(const ce of ae.ids)y(ce)&&ue.add(ce);ue.size{if(!t.rowSelection||G)return;const ae=C0(e);!f&&(ae.type==="include"&&ae.ids.size>1||ae.type==="exclude")&&e.current.setRowSelectionModel(_4)},[e,f,c,G,t.rowSelection]),p.useEffect(()=>{r(A)},[A,r]),p.useEffect(()=>{I.current&&(I.current=!1)},[])},$on=e=>{const{classes:t}=e;return p.useMemo(()=>qn({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},ni,t),[t])},Fon=(e,t)=>{const n={classes:t.classes},r=$on(n),o=p.useCallback(i=>{const a=we({},YI,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),l=t.checkboxSelection,c=i.lookup[y0]!=null;return l&&!c?(i.lookup[y0]=a,i.orderedFields=[y0,...i.orderedFields]):!l&&c?(delete i.lookup[y0],i.orderedFields=i.orderedFields.filter(u=>u!==y0)):l&&c&&(i.lookup[y0]=we({},a,i.lookup[y0]),t.columns.some(u=>u.field===y0)||(i.orderedFields=[y0,...i.orderedFields.filter(u=>u!==y0)])),i},[e,r,t.columns,t.checkboxSelection]);Ol(e,"hydrateColumns",o)},Bon=(e,t)=>{var r,o;const n=t.sortModel??((o=(r=t.initialState)==null?void 0:r.sorting)==null?void 0:o.sortModel)??[];return we({},e,{sorting:{sortModel:rGe(n,t.disableMultipleColumnsSorting),sortedRows:[]}})},zon=(e,t)=>{var _,N;const n=sf(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:sg,changeEvent:"sortModelChange"});const r=p.useCallback((E,I)=>{const A=sg(e),R=A.findIndex(T=>T.field===E);let k=[...A];return R>-1?(I==null?void 0:I.sort)==null?k.splice(R,1):k.splice(R,1,I):k=[...A,I],k},[e]),o=p.useCallback((E,I)=>{const R=sg(e).find(k=>k.field===E.field);if(R){const k=I===void 0?Qje(E.sortingOrder??t.sortingOrder,R.sort):I;return k===void 0?void 0:we({},R,{sort:k})}return{field:E.field,sort:I===void 0?Qje(E.sortingOrder??t.sortingOrder):I}},[e,t.sortingOrder]),i=p.useCallback((E,I)=>I==null||I.sortable===!1||t.disableColumnSorting?E:(I.sortingOrder||t.sortingOrder).some(R=>!!R)?[...E,"columnMenuSortItem"]:E,[t.sortingOrder,t.disableColumnSorting]),a=p.useCallback(()=>{e.current.setState(E=>{if(t.sortingMode==="server")return n.debug("Skipping sorting rows as sortingMode = server"),we({},E,{sorting:we({},E.sorting,{sortedRows:Rde(Sc(e),Jl,!1)})});const I=sg(e),A=SYt(I,e),R=e.current.applyStrategyProcessor("sorting",{sortRowList:A});return we({},E,{sorting:we({},E.sorting,{sortedRows:R})})}),e.current.publishEvent("sortedRowsSet")},[e,n,t.sortingMode]),l=p.useCallback(E=>{sg(e)!==E&&(n.debug("Setting sort model"),e.current.setState(Jje(E,t.disableMultipleColumnsSorting)),e.current.applySorting())},[e,n,t.disableMultipleColumnsSorting]),c=p.useCallback((E,I,A)=>{const R=e.current.getColumn(E),k=o(R,I);let T;!A||t.disableMultipleColumnsSorting?T=(k==null?void 0:k.sort)==null?[]:[k]:T=r(R.field,k),e.current.setSortModel(T)},[e,r,o,t.disableMultipleColumnsSorting]),u=p.useCallback(()=>sg(e),[e]),d=p.useCallback(()=>Hde(e).map(I=>I.model),[e]),f=p.useCallback(()=>yO(e),[e]),h=p.useCallback(E=>e.current.getSortedRowIds()[E],[e]);zo(e,{getSortModel:u,getSortedRows:d,getSortedRowIds:f,getRowIdFromRowIndex:h,setSortModel:l,sortColumn:c,applySorting:a},"public");const g=p.useCallback((E,I)=>{var k,T;const A=sg(e);return!I.exportOnlyDirtyModels||t.sortModel!=null||((T=(k=t.initialState)==null?void 0:k.sorting)==null?void 0:T.sortModel)!=null||A.length>0?we({},E,{sorting:{sortModel:A}}):E},[e,t.sortModel,(N=(_=t.initialState)==null?void 0:_.sorting)==null?void 0:N.sortModel]),b=p.useCallback((E,I)=>{var R;const A=(R=I.stateToRestore.sorting)==null?void 0:R.sortModel;return A==null?E:(e.current.setState(Jje(A,t.disableMultipleColumnsSorting)),we({},E,{callbacks:[...E.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),y=p.useCallback(E=>{const I=Sc(e),A=I[Jl],R=E.sortRowList?E.sortRowList(A.children.map(k=>I[k])):[...A.children];return A.footerId!=null&&R.push(A.footerId),R},[e]);Ol(e,"exportState",g),Ol(e,"restoreState",b),YM(e,$_,"sorting",y);const v=p.useCallback(({field:E,colDef:I},A)=>{if(!I.sortable||t.disableColumnSorting)return;const R=t.multipleColumnsSortingMode==="always"||A.shiftKey||A.metaKey||A.ctrlKey;c(E,void 0,R)},[c,t.disableColumnSorting,t.multipleColumnsSortingMode]),x=p.useCallback(({field:E,colDef:I},A)=>{!I.sortable||t.disableColumnSorting||A.key==="Enter"&&!A.ctrlKey&&!A.metaKey&&c(E,void 0,t.multipleColumnsSortingMode==="always"||A.shiftKey)},[c,t.disableColumnSorting,t.multipleColumnsSortingMode]),S=p.useCallback(()=>{const E=sg(e),I=h1(e);if(E.length>0){const A=E.filter(R=>I[R.field]);A.length{E==="sorting"&&e.current.applySorting()},[e]);Ol(e,"columnMenu",i),Ir(e,"columnHeaderClick",v),Ir(e,"columnHeaderKeyDown",x),Ir(e,"rowsSet",e.current.applySorting),Ir(e,"columnsChange",S),Ir(e,"activeStrategyProcessorChange",C),kj(()=>{t.signature==="DataGrid"&&e.current.applySorting()}),wa(()=>{t.sortModel!==void 0&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])};function FNe(e){const{containerSize:t,scrollPosition:n,elementSize:r,elementOffset:o}=e,i=o+r;if(r>t)return o;if(i-t>n)return i-t;if(o{const n=af(),r=sf(e,"useGridScroll"),o=e.current.columnHeadersContainerRef,i=e.current.virtualScrollerRef,a=p.useCallback(d=>{var y;const f=bl(e),h=GI(e),m=oc(e);if(!(d.rowIndex==null)&&h===0||m.length===0)return!1;r.debug(`Scrolling to cell at row ${d.rowIndex}, col: ${d.colIndex} `);let b={};if(d.colIndex!==void 0){const v=Aj(e);let x;if(typeof d.rowIndex<"u"){const C=(y=Tj(e)[d.rowIndex])==null?void 0:y.id,_=e.current.unstable_getCellColSpanInfo(C,d.colIndex);_&&!_.spannedByColSpan&&(x=_.cellProps.width)}typeof x>"u"&&(x=m[d.colIndex].computedWidth),b.left=FNe({containerSize:f.viewportOuterSize.width,scrollPosition:Math.abs(i.current.scrollLeft),elementSize:x,elementOffset:v[d.colIndex]})}if(d.rowIndex!==void 0){const v=qUe(e),x=HXt(e),S=VXt(e),C=t.pagination?d.rowIndex-x*S:d.rowIndex,_=v.positions[C+1]?v.positions[C+1]-v.positions[C]:v.currentPageTotalHeight-v.positions[C];b.top=FNe({containerSize:f.viewportInnerSize.height,scrollPosition:i.current.scrollTop,elementSize:_,elementOffset:v.positions[C]})}return b=e.current.unstable_applyPipeProcessors("scrollToIndexes",b,d),typeof b.left<"u"||typeof b.top<"u"?(e.current.scroll(b),!0):!1},[r,e,i,t.pagination]),l=p.useCallback(d=>{if(i.current&&d.left!==void 0&&o.current){const f=n?-1:1;o.current.scrollLeft=d.left,i.current.scrollLeft=f*d.left,r.debug(`Scrolling left: ${d.left}`)}i.current&&d.top!==void 0&&(i.current.scrollTop=d.top,r.debug(`Scrolling top: ${d.top}`)),r.debug("Scrolling, updating container, and viewport")},[i,n,o,r]),c=p.useCallback(()=>i!=null&&i.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0},[i]);zo(e,{scroll:l,scrollToIndexes:a,getScrollPosition:c},"public")};function Von(e,t){is(e,"columnHeaderClick",t.onColumnHeaderClick),is(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),is(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),is(e,"columnHeaderOver",t.onColumnHeaderOver),is(e,"columnHeaderOut",t.onColumnHeaderOut),is(e,"columnHeaderEnter",t.onColumnHeaderEnter),is(e,"columnHeaderLeave",t.onColumnHeaderLeave),is(e,"cellClick",t.onCellClick),is(e,"cellDoubleClick",t.onCellDoubleClick),is(e,"cellKeyDown",t.onCellKeyDown),is(e,"preferencePanelClose",t.onPreferencePanelClose),is(e,"preferencePanelOpen",t.onPreferencePanelOpen),is(e,"menuOpen",t.onMenuOpen),is(e,"menuClose",t.onMenuClose),is(e,"rowDoubleClick",t.onRowDoubleClick),is(e,"rowClick",t.onRowClick),is(e,"stateChange",t.onStateChange)}const OT={width:0,height:0},Uon={isReady:!1,root:OT,viewportOuterSize:OT,viewportInnerSize:OT,contentSize:OT,minimumSize:OT,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0,autoHeight:!1,minimalContentHeight:void 0},Gon=(e,t,n)=>{const r=Uon,o=mO(n),i=we({},r,Kon(t,n,o,xV(n)));return n.current.store.state.dimensions=i,we({},e,{dimensions:i})},Won=jr(oc,Aj,(e,t)=>{const n=e.length;return n===0?0:P2(t[n-1]+e[n-1].computedWidth,1)});function qon(e,t){const r={getRootDimensions:p.useCallback(()=>bl(e),[e])},o={updateDimensions:()=>e.current.virtualizer.api.updateDimensions(),getViewportPageSize:()=>e.current.virtualizer.api.getViewportPageSize()};zo(e,r,"public"),zo(e,o,"private"),is(e,"rootMount",a=>{BNe(a,bl(e))}),is(e,"debouncedResize",t.onResize),i_(e.current.store,a=>a.dimensions,(a,l)=>{l.isReady&&(e.current.rootElementRef.current&&BNe(e.current.rootElementRef.current,l),Yon(l.viewportInnerSize,a.viewportInnerSize)||e.current.publishEvent("viewportInnerSizeChange",l.viewportInnerSize),e.current.publishEvent("debouncedResize",l.root))})}function BNe(e,t){const n=(r,o)=>e.style.setProperty(r,o);n("--DataGrid-hasScrollX",`${Number(t.hasScrollX)}`),n("--DataGrid-hasScrollY",`${Number(t.hasScrollY)}`),n("--DataGrid-scrollbarSize",`${t.scrollbarSize}px`),n("--DataGrid-rowWidth",`${t.rowWidth}px`),n("--DataGrid-columnsTotalWidth",`${t.columnsTotalWidth}px`),n("--DataGrid-leftPinnedWidth",`${t.leftPinnedWidth}px`),n("--DataGrid-rightPinnedWidth",`${t.rightPinnedWidth}px`),n("--DataGrid-headerHeight",`${t.headerHeight}px`),n("--DataGrid-headersTotalHeight",`${t.headersTotalHeight}px`),n("--DataGrid-topContainerHeight",`${t.topContainerHeight}px`),n("--DataGrid-bottomContainerHeight",`${t.bottomContainerHeight}px`),n("--height",`${t.rowHeight}px`)}function Kon(e,t,n,r){const o=eGe(e.rowHeight,BB.rowHeight);return{rowHeight:Math.floor(o*n),headerHeight:Math.floor(e.columnHeaderHeight*n),groupHeaderHeight:Math.floor((e.columnGroupHeaderHeight??e.columnHeaderHeight)*n),headerFilterHeight:Math.floor((e.headerFilterHeight??e.columnHeaderHeight)*n),columnsTotalWidth:Won(t),headersTotalHeight:AV(t,e),leftPinnedWidth:r.left.reduce((i,a)=>i+a.computedWidth,0),rightPinnedWidth:r.right.reduce((i,a)=>i+a.computedWidth,0)}}function Yon(e,t){return e.width===t.width&&e.height===t.height}const Xon=e=>{const t=p.useCallback((o={})=>e.current.unstable_applyPipeProcessors("exportState",{},o),[e]),n=p.useCallback(o=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:o}).callbacks.forEach(a=>{a()})},[e]);zo(e,{exportState:t,restoreState:n},"public")},Zon=e=>{const t=()=>e.current.virtualizer.api.resetColSpan(),n=(...a)=>e.current.virtualizer.api.getCellColSpanInfo(...a),r=(...a)=>{e.current.virtualizer.api.calculateColSpan(...a)},o={unstable_getCellColSpanInfo:n},i={resetColSpan:t,calculateColSpan:r};zo(e,o,"public"),zo(e,i,"private"),Ir(e,"columnOrderChange",t)},Jon=["groupId","children"],ife=e=>{const t={};for(let n=0;n{if(lGe(e)){if(n[e.field]!==void 0)throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join(` +`));n[e.field]=t;return}const{groupId:r,children:o}=e;o.forEach(i=>{CWe(i,[...t,r],n)})},dne=e=>{if(!e)return{};const t={};return e.forEach(n=>{CWe(n,[],t)}),t},fne=(e,t,n)=>{const r=c=>t[c]??[],o=[],i=Math.max(0,...e.map(c=>r(c).length)),a=(c,u,d)=>{const f=r(c),h=r(u);for(let m=0;m<=d;m+=1)if(f[m]!==h[m])return!1;return!0},l=(c,u)=>{const d=n==null?void 0:n.left,f=n==null?void 0:n.right,h=!!(d!=null&&d.includes(c)),m=!!(d!=null&&d.includes(u)),g=!!(f!=null&&f.includes(c)),b=!!(f!=null&&f.includes(u));return h!==m||g!==b};for(let c=0;c{if(n.current.caches.columnGrouping={lastColumnGroupingModel:t.columnGroupingModel},!t.columnGroupingModel)return we({},e,{columnGrouping:void 0});const r=Ib(n),o=gO(n),i=ife(t.columnGroupingModel??[]),a=dne(t.columnGroupingModel??[]),l=fne(r,a,n.current.state.pinnedColumns??{}),c=o.length===0?0:Math.max(...o.map(u=>{var d;return((d=a[u])==null?void 0:d.length)??0}));return we({},e,{columnGrouping:{lookup:i,unwrappedGroupingModel:a,headerStructure:l,maxDepth:c}})},ein=(e,t)=>{const n=p.useCallback(l=>HGe(e)[l]??[],[e]),r=p.useCallback(()=>VGe(e),[e]);zo(e,{getColumnGroupPath:n,getAllGroupDetails:r},"public");const i=p.useCallback(()=>{const l=dne(t.columnGroupingModel??[]);e.current.setState(c=>{var h;const u=((h=c.columns)==null?void 0:h.orderedFields)??[],d=c.pinnedColumns??{},f=fne(u,l,d);return we({},c,{columnGrouping:we({},c.columnGrouping,{headerStructure:f})})})},[e,t.columnGroupingModel]),a=p.useCallback(l=>{var b,y;if(!l&&!e.current.caches.columnGrouping.lastColumnGroupingModel)return;e.current.caches.columnGrouping.lastColumnGroupingModel=l;const c=((y=(b=e.current).getPinnedColumns)==null?void 0:y.call(b))??{},u=Ib(e),d=gO(e),f=ife(l??[]),h=dne(l??[]),m=fne(u,h,c),g=d.length===0?0:Math.max(...d.map(v=>{var x;return((x=h[v])==null?void 0:x.length)??0}));e.current.setState(v=>we({},v,{columnGrouping:{lookup:f,unwrappedGroupingModel:h,headerStructure:m,maxDepth:g}}))},[e]);Ir(e,"columnIndexChange",i),Ir(e,"columnsChange",()=>{a(t.columnGroupingModel)}),Ir(e,"columnVisibilityModelChange",()=>{a(t.columnGroupingModel)}),p.useEffect(()=>{t.columnGroupingModel!==e.current.caches.columnGrouping.lastColumnGroupingModel&&a(t.columnGroupingModel)},[e,a,t.columnGroupingModel])};function tin(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function zNe(e,t){if(t!==void 0&&e.changedTouches){for(let n=0;nGJt(e),r=Wn(e,n);return p.useEffect(()=>{t.current&&r===!1&&(t.current.resolve(),t.current=void 0)}),()=>{if(!t.current){if(n()===!1)return Promise.resolve();t.current=tin()}return t.current}}function ain(e,t){if(e.length<4)return e;const n=e.slice();n.sort((l,c)=>l-c);const r=n[Math.floor(n.length*.25)],o=n[Math.floor(n.length*.75)-1],i=o-r,a=i<5?5:i*t;return n.filter(l=>l>r-a&&l{const l=Ten(e.current,i.field).map(g=>g.getBoundingClientRect().width??0),c=t.includeOutliers?l:ain(l,t.outliersFactor);if(t.includeHeaders){const g=Aen(e.current,i.field);if(g){const b=g.querySelector(`.${He.columnHeaderTitleContainer}`),y=Array.from(b.children),v=g.querySelector(`.${He.menuIcon}`),x=window.getComputedStyle(b,null),S=parseInt(x.gap,10)||0,C=window.getComputedStyle(g,null),_=parseInt(C.paddingLeft,10)+parseInt(C.paddingRight,10);let N=0,E=0;for(let A=0;A0&&(N+=1,E+=R.scrollWidth)}E+=1;const I=E+S*(N-1)+_+((v==null?void 0:v.clientWidth)??0);c.push(I)}}const u=i.minWidth!==-1/0&&i.minWidth!==void 0,d=i.maxWidth!==1/0&&i.maxWidth!==void 0,f=u?i.minWidth:0,h=d?i.maxWidth:1/0,m=c.length===0?0:Math.max(...c);r[i.field]=a_(m,f,h)}),o.classList.remove(He.autosizing),r}const lin=e=>we({},e,{columnResize:{resizingColumnField:""}});function cin(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const uin=(e,t)=>{const n=af(),r=sf(e,"useGridColumnResize"),o=kh(cin).current,i=p.useRef(null),a=p.useRef(null),l=kp(),c=p.useRef(void 0),u=A=>{var F,U,G,W,Y,B;r.debug(`Updating width to ${A} for col ${o.colDef.field}`);const R=o.columnHeaderElement.offsetWidth,k=A-R,T=A-o.initialColWidth;if(T>0){const $=o.initialTotalWidth+T;(U=(F=e.current.rootElementRef)==null?void 0:F.current)==null||U.style.setProperty("--DataGrid-rowWidth",`${$}px`)}o.colDef.computedWidth=A,o.colDef.width=A,o.colDef.flex=0,o.columnHeaderElement.style.width=`${A}px`;const D=o.headerFilterElement;D&&(D.style.width=`${A}px`),o.groupHeaderElements.forEach($=>{const K=$;let q;K.getAttribute("aria-colspan")==="1"?q=`${A}px`:q=`${K.offsetWidth+k}px`,K.style.width=q}),o.cellElements.forEach($=>{const K=$;let q;K.getAttribute("aria-colspan")==="1"?q=`${A}px`:q=`${K.offsetWidth+k}px`,K.style.setProperty("--width",q)});const O=bl(e),z=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);z===ub.LEFT&&(HN(o.fillerLeft,"width",k),o.leftPinnedCellsAfter.forEach($=>{HN($,"left",k)}),o.leftPinnedHeadersAfter.forEach($=>{HN($,"left",k)}),(W=(G=e.current.rootElementRef)==null?void 0:G.current)==null||W.style.setProperty(VNe(n,z),`${UNe(O,n,z)+T}px`)),z===ub.RIGHT&&(HN(o.fillerRight,"width",k),o.rightPinnedCellsBefore.forEach($=>{HN($,"right",k)}),o.rightPinnedHeadersBefore.forEach($=>{HN($,"right",k)}),(B=(Y=e.current.rootElementRef)==null?void 0:Y.current)==null||B.style.setProperty(VNe(n,z),`${UNe(O,n,z)+T}px`))},d=A=>{if(v(),o.previousMouseClickEvent){const R=o.previousMouseClickEvent,k=R.timeStamp,T=R.clientX,D=R.clientY;if(A.timeStamp-k<300&&A.clientX===T&&A.clientY===D){o.previousMouseClickEvent=void 0,e.current.publishEvent("columnResizeStop",null,A);return}}if(o.colDef){e.current.setColumnWidth(o.colDef.field,o.colDef.width),r.debug(`Updating col ${o.colDef.field} with new width: ${o.colDef.width}`);const R=V0(e);o.groupHeaderElements.forEach(k=>{const T=Cen(k),D=k,z=`${T.reduce((F,U)=>R.columnVisibilityModel[U]!==!1?F+R.lookup[U].computedWidth:F,0)}px`;D.style.width=z})}l.start(0,()=>{e.current.publishEvent("columnResizeStop",null,A)})},f=(A,R,k)=>{var z;const T=e.current.rootElementRef.current;o.initialColWidth=A.computedWidth,o.initialTotalWidth=e.current.getRootDimensions().rowWidth,o.colDef=A,o.columnHeaderElement=Sen(e.current.columnHeadersContainerRef.current,A.field);const D=T.querySelector(`.${He.headerFilterRow} [data-field="${m1(A.field)}"]`);D&&(o.headerFilterElement=D),o.groupHeaderElements=_en((z=e.current.columnHeadersContainerRef)==null?void 0:z.current,A.field),o.cellElements=jen(o.columnHeaderElement,e.current),o.fillerLeft=jNe(e.current,n?"filler--pinnedRight":"filler--pinnedLeft"),o.fillerRight=jNe(e.current,n?"filler--pinnedLeft":"filler--pinnedRight");const O=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);o.leftPinnedCellsAfter=O!==ub.LEFT?[]:Nen(e.current,o.columnHeaderElement,n),o.rightPinnedCellsBefore=O!==ub.RIGHT?[]:Een(e.current,o.columnHeaderElement,n),o.leftPinnedHeadersAfter=O!==ub.LEFT?[]:Pen(e.current,o.columnHeaderElement,n),o.rightPinnedHeadersBefore=O!==ub.RIGHT?[]:Ien(e.current,o.columnHeaderElement,n),a.current=oin(R,n),i.current=nin(k,o.columnHeaderElement.getBoundingClientRect(),a.current)},h=no(d),m=no(A=>{if(A.buttons===0){h(A);return}let R=HNe(i.current,A.clientX,o.columnHeaderElement.getBoundingClientRect(),a.current);R=a_(R,o.colDef.minWidth,o.colDef.maxWidth),u(R);const k={element:o.columnHeaderElement,colDef:o.colDef,width:R};e.current.publishEvent("columnResize",k,A)}),g=no(A=>{zNe(A,c.current)&&d(A)}),b=no(A=>{const R=zNe(A,c.current);if(!R)return;if(A.type==="mousemove"&&A.buttons===0){g(A);return}let k=HNe(i.current,R.x,o.columnHeaderElement.getBoundingClientRect(),a.current);k=a_(k,o.colDef.minWidth,o.colDef.maxWidth),u(k);const T={element:o.columnHeaderElement,colDef:o.colDef,width:k};e.current.publishEvent("columnResize",T,A)}),y=no(A=>{const R=zB(A.target,He["columnSeparator--resizable"]);if(!R)return;const k=A.changedTouches[0];k!=null&&(c.current=k.identifier);const T=zB(A.target,He.columnHeader),D=wen(T),O=e.current.getColumn(D);r.debug(`Start Resize on col ${O.field}`),e.current.publishEvent("columnResizeStart",{field:D},A),f(O,R,k.clientX);const z=lc(A.currentTarget);z.addEventListener("touchmove",b),z.addEventListener("touchend",g)}),v=p.useCallback(()=>{const A=lc(e.current.rootElementRef.current);A.body.style.removeProperty("cursor"),A.removeEventListener("mousemove",m),A.removeEventListener("mouseup",h),A.removeEventListener("touchmove",b),A.removeEventListener("touchend",g),setTimeout(()=>{A.removeEventListener("click",GNe,!0)},100),o.columnHeaderElement&&(o.columnHeaderElement.style.pointerEvents="unset")},[e,o,m,h,b,g]),x=p.useCallback(({field:A})=>{e.current.setState(R=>we({},R,{columnResize:we({},R.columnResize,{resizingColumnField:A})}))},[e]),S=p.useCallback(()=>{e.current.setState(A=>we({},A,{columnResize:we({},A.columnResize,{resizingColumnField:""})}))},[e]),C=no(({colDef:A},R)=>{if(R.button!==0||!R.currentTarget.classList.contains(He["columnSeparator--resizable"]))return;R.preventDefault(),r.debug(`Start Resize on col ${A.field}`),e.current.publishEvent("columnResizeStart",{field:A.field},R),f(A,R.currentTarget,R.clientX);const k=lc(e.current.rootElementRef.current);k.body.style.cursor="col-resize",o.previousMouseClickEvent=R.nativeEvent,k.addEventListener("mousemove",m),k.addEventListener("mouseup",h),k.addEventListener("click",GNe,!0)}),_=no((A,R)=>{if(t.disableAutosize||R.button!==0)return;const k=e.current.state.columns.lookup[A.field];k.resizable!==!1&&e.current.autosizeColumns(we({},t.autosizeOptions,{disableColumnVirtualization:!1,columns:[k.field]}))}),N=iin(e),E=p.useRef(!1),I=p.useCallback(async A=>{var O;if(!((O=e.current.rootElementRef)==null?void 0:O.current)||E.current)return;E.current=!0;const k=V0(e),T=we({},rJt,A,{columns:(A==null?void 0:A.columns)??k.orderedFields});T.columns=T.columns.filter(z=>k.columnVisibilityModel[z]!==!1);const D=T.columns.map(z=>e.current.state.columns.lookup[z]);try{!t.disableVirtualization&&T.disableColumnVirtualization&&(e.current.unstable_setColumnVirtualization(!1),await N());const z=sin(e,T,D),F=D.map(U=>we({},U,{width:z[U.field],computedWidth:z[U.field],flex:0}));if(T.expand){const G=k.orderedFields.map($=>k.lookup[$]).filter($=>k.columnVisibilityModel[$.field]!==!1).reduce(($,K)=>$+(z[K.field]??K.computedWidth??K.width),0),B=e.current.getRootDimensions().viewportInnerSize.width-G;if(B>0){const $=B/(F.length||1);F.forEach(K=>{K.width+=$,K.computedWidth+=$})}}e.current.updateColumns(F),F.forEach((U,G)=>{if(U.width!==D[G].width){const W=U.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(U.field),colDef:U,width:W})}})}finally{t.disableVirtualization||e.current.unstable_setColumnVirtualization(!0),E.current=!1}},[e,N,t.disableVirtualization]);p.useEffect(()=>v,[v]),uV(()=>{t.autosizeOnMount&&Promise.resolve().then(()=>{e.current.autosizeColumns(t.autosizeOptions)})}),KGe(e,()=>{var A;return(A=e.current.columnHeadersContainerRef)==null?void 0:A.current},"touchstart",y,{passive:!0}),zo(e,{autosizeColumns:I},"public"),Ir(e,"columnResizeStop",S),Ir(e,"columnResizeStart",x),Ir(e,"columnSeparatorMouseDown",C),Ir(e,"columnSeparatorDoubleClick",_),is(e,"columnResize",t.onColumnResize),is(e,"columnWidthChange",t.onColumnWidthChange)};function HN(e,t,n){e&&(e.style[t]=`${Math.round(parseFloat(e.style[t]))+n}px`)}function din(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex{if(!e)return null;const r=e[t.field];return t.rowSpanValueGetter?t.rowSpanValueGetter(r,e,t,n):YUe(e,t,n)},fin={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},pin={firstRowIndex:0,lastRowIndex:0},p2={caches:fin,processedRange:pin},hin=(e,t,n,r,o,i)=>{const a=e.current.virtualizer,l=i?p2:kP.selectors.state(a.store.state),c=we({},l.caches.spannedCells),u=we({},l.caches.hiddenCells),d=we({},l.caches.hiddenCellOriginMap),f={firstRowIndex:Math.min(l.processedRange.firstRowIndex,o.firstRowIndex),lastRowIndex:Math.max(l.processedRange.lastRowIndex,o.lastRowIndex)};return t.forEach((h,m)=>{var g;for(let b=o.firstRowIndex;b=r.firstRowIndex&&I&&BY(I.model,h,e)===v;){const A=n[E+1];u[A.id]?u[A.id][m]=!0:u[A.id]={[m]:!0},_.push(b),C+=1,x=I.id,S=E,E-=1,I=n[E]}}_.forEach(E=>{d[E]?d[E][m]=S:d[E]={[m]:S}});let N=b+1;for(;N<=r.lastRowIndex&&n[N]&&BY(n[N].model,h,e)===v;){const E=n[N];u[E.id]?u[E.id][m]=!0:u[E.id]={[m]:!0},d[N]?d[N][m]=S:d[N]={[m]:S},N+=1,C+=1}C>0&&(c[x]?c[x][m]=C+1:c[x]={[m]:C+1})}}),{caches:{spannedCells:c,hiddenCells:u,hiddenCellOriginMap:d},processedRange:f}},min=e=>we({},e,{rowSpanning:p2}),gin=(e,t)=>{const n=p.useCallback((a,l=!1)=>{const c=e.current.virtualizer.store,{range:u,rows:d}=I5(e);if(l&&c.set("rowSpanning",p2),u===null||!WNe(a))return;const f=l?p2:kP.selectors.state(c.state),h=din({firstRowIndex:a.firstRowIndex,lastRowIndex:Math.min(a.lastRowIndex,u.lastRowIndex-u.firstRowIndex+1)},f.processedRange);if(h===null)return;const m=oc(e),g=hin(e,m,d,u,h,l),b=Object.keys(g.caches.spannedCells).length,y=Object.keys(g.caches.hiddenCells).length,v=Object.keys(f.caches.spannedCells).length,x=Object.keys(f.caches.hiddenCells).length;!(l||b!==v||y!==x)||b===0&&v===0||c.set("rowSpanning",g)},[e]),{schedule:r,cancel:o}=OZt(n),i=p.useCallback(()=>{const a=sne(e);WNe(a)&&r(a,!0)},[e,r]);Ir(e,"renderedRowsIntervalChange",Dw(t.rowSpanning,a=>{const l=o();n(a,l)})),Ir(e,"sortedRowsSet",Dw(t.rowSpanning,i)),Ir(e,"paginationModelChange",Dw(t.rowSpanning,i)),Ir(e,"filteredRowsSet",Dw(t.rowSpanning,i)),Ir(e,"columnsChange",Dw(t.rowSpanning,i)),p.useEffect(()=>{var l;const a=(l=e.current.virtualizer)==null?void 0:l.store;a&&(t.rowSpanning?a.state.rowSpanning===p2&&n(sne(e)):a.state.rowSpanning!==p2&&a.set("rowSpanning",p2))},[e,t.rowSpanning,n])},yin=(e,t,n)=>we({},e,{listViewColumn:t.listViewColumn?we({},t.listViewColumn,{computedWidth:pne(n)}):void 0});function bin(e,t){const n=()=>{e.current.setState(i=>i.listViewColumn?we({},i,{listViewColumn:we({},i.listViewColumn,{computedWidth:pne(e)})}):i)},r=p.useRef(null);Ir(e,"viewportInnerSizeChange",i=>{r.current!==i.width&&(r.current=i.width,n())}),Ir(e,"columnVisibilityModelChange",n),wa(()=>{const i=t.listViewColumn;i&&e.current.setState(a=>we({},a,{listViewColumn:we({},i,{computedWidth:pne(e)})}))},[e,t.listViewColumn]),p.useEffect(()=>{t.listView&&t.listViewColumn},[t.listView,t.listViewColumn])}function pne(e){return bl(e).viewportInnerSize.width}const vin=jr(md,sg,Yd,(e,t,n)=>({groupKeys:[],paginationModel:n,sortModel:t,filterModel:e,start:n.page*n.pageSize,end:n.page*n.pageSize+n.pageSize-1}));let MC=(function(e){return e.Default="set-flat-rows",e.LazyLoading="replace-row-range",e.GroupedData="set-grouped-rows",e})({});class y8{constructor(t){Le(this,"getCacheKeys",t=>{if(this.chunkSize<1||typeof t.start!="number")return[t];const n=[];for(let r=t.start;r<=t.end;r+=this.chunkSize){const o=Math.min(r+this.chunkSize-1,t.end);n.push(we({},t,{start:r,end:o}))}return n});Le(this,"splitResponse",(t,n)=>{const r=this.getCacheKeys(t);if(r.length===1)return new Map([[t,n]]);const o=new Map;return r.forEach(i=>{var c,u,d,f;const a=i.end===t.end,l=we({},n,{pageInfo:we({},n.pageInfo,{hasNextPage:((c=n.pageInfo)==null?void 0:c.hasNextPage)!==void 0&&!a?!0:(u=n.pageInfo)==null?void 0:u.hasNextPage,nextCursor:((d=n.pageInfo)==null?void 0:d.nextCursor)!==void 0&&!a?n.rows[i.end+1].id:(f=n.pageInfo)==null?void 0:f.nextCursor}),rows:typeof i.start!="number"||typeof t.start!="number"?n.rows:n.rows.slice(i.start-t.start,i.end-t.start+1)});o.set(i,l)}),o});this.chunkSize=t}}Le(y8,"mergeResponses",t=>t.length===1?t[0]:t.reduce((n,r)=>we({},r,{rows:[...n.rows,...r.rows]}),{rows:[],rowCount:0,pageInfo:{}}));const xin=["skipCache","keepChildrenExpanded"],win={clear:()=>{},get:()=>{},set:()=>{}};function qNe(e,t={}){return e===null?win:e??new XJt(t)}const Sin=(e,t,n={})=>{var N,E;const r=p.useCallback(()=>{e.current.setStrategyAvailability(cx.DataSource,MC.Default,t.dataSource?()=>!0:()=>!1)},[e,t.dataSource]),[o,i]=p.useState(e.current.getActiveStrategy(cx.DataSource)),a=p.useMemo(()=>o===MC.Default||o===MC.GroupedData,[o]),l=Wn(e,Yd),c=p.useRef(0),u=t.onDataSourceError,d=kh(()=>{if(!t.pagination)return new y8(l.pageSize);const I=t.pageSizeOptions.map(R=>typeof R=="number"?R:R.value).sort((R,k)=>R-k),A=Math.min(l.pageSize,I[0]);return new y8(A)}).current,[f,h]=p.useState(()=>qNe(t.dataSourceCache,n.cacheOptions)),m=p.useCallback(async(I,A)=>{var W,Y,B;const R=(W=t.dataSource)==null?void 0:W.getRows;if(!R)return;if(I&&I!==Jl&&t.signature!=="DataGrid"){(Y=n.fetchRowChildren)==null||Y.call(n,[I]);return}(B=n.clearDataSourceState)==null||B.call(n);const k=A||{},{skipCache:T,keepChildrenExpanded:D}=k,O=sr(k,xin),z=we({},vin(e),e.current.unstable_applyPipeProcessors("getRowsParams",{}),O),U=d.getCacheKeys(z).map($=>f.get($));if(!T&&U.every($=>$!==void 0)){e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:y8.mergeResponses(U),fetchParams:z,options:{skipCache:T,keepChildrenExpanded:D}});return}(a||e.current.getRowsCount()===0)&&e.current.setLoading(!0);const G=c.current+1;c.current=G;try{const $=await R(z);d.splitResponse(z,$).forEach((q,Z)=>f.set(Z,q)),c.current===G&&e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:$,fetchParams:z,options:{skipCache:T,keepChildrenExpanded:D}})}catch($){c.current===G&&(e.current.applyStrategyProcessor("dataSourceRowsUpdate",{error:$,fetchParams:z,options:{skipCache:T,keepChildrenExpanded:D}}),typeof u=="function"&&u(new ZJt({message:$==null?void 0:$.message,params:z,cause:$})))}finally{a&&c.current===G&&e.current.setLoading(!1)}},[d,f,e,a,(N=t.dataSource)==null?void 0:N.getRows,u,n,t.signature]),g=p.useCallback(()=>{i(e.current.getActiveStrategy(cx.DataSource))},[e]),b=p.useCallback(I=>{if("error"in I){e.current.setRows([]);return}const{response:A}=I;A.rowCount!==void 0&&e.current.setRowCount(A.rowCount),e.current.setRows(A.rows),e.current.unstable_applyPipeProcessors("processDataSourceRows",{params:I.fetchParams,response:A},!0)},[e]),y=(E=t.dataSource)==null?void 0:E.updateRow,v=n.handleEditRow,x=p.useCallback(async I=>{if(y)try{const A=await y(I);return typeof v=="function"?(v(I,A),A):(A&&!jg(A,I.previousRow)&&e.current.dataSource.cache.clear(),e.current.updateNestedRows([A],[]),A)}catch(A){throw typeof u=="function"&&u(new JJt({message:A==null?void 0:A.message,params:I,cause:A})),A}},[e,y,u,v]),S={dataSource:{fetchRows:m,cache:f,editRow:x}},C=p.useMemo(()=>Fb(m,0),[m]),_=p.useRef(!0);return p.useEffect(()=>{if(_.current){_.current=!1;return}if(t.dataSourceCache===void 0)return;const I=qNe(t.dataSourceCache,n.cacheOptions);h(A=>A!==I?I:A)},[t.dataSourceCache,n.cacheOptions]),p.useEffect(()=>{if(!(o!==MC.Default&&o!==MC.LazyLoading&&o!==MC.GroupedData))return t.dataSource&&(e.current.dataSource.cache.clear(),e.current.dataSource.fetchRows()),()=>{c.current+=1}},[e,t.dataSource,o]),{api:{public:S},debouncedFetchRows:C,strategyProcessor:{strategyName:MC.Default,group:"dataSourceRowsUpdate",processor:b},setStrategyAvailability:r,cacheChunkManager:d,cache:f,events:{strategyAvailabilityChange:g,sortModelChange:Dw(a,()=>C()),filterModelChange:Dw(a,()=>C()),paginationModelChange:Dw(a,()=>C())}}},Cin=(e,t)=>{const{api:n,strategyProcessor:r,events:o,setStrategyAvailability:i}=Sin(e,t);zo(e,n.public,"public"),YM(e,r.strategyName,r.group,r.processor),Object.entries(o).forEach(([a,l])=>{Ir(e,a,l)}),p.useEffect(()=>{i()},[i])},_in=(e,t,n)=>{Brn(e,t),Fon(e,t),Ron(e),cd($rn,e,t),cd(Don,e,t),cd(Krn,e,t),cd(Ion,e,t),cd(yon,e,t),cd(Eon,e,t),cd(uon,e,t),cd(Bon,e,t),cd(von,e,t),cd(aon,e,t),cd(min,e,t),cd(Zrn,e,t),cd(lin,e,t),cd(Wrn,e,t),cd(Qon,e,t),cd(VJt,e,t),cd(Gon,e,t),cd(fQt,e,t),cd(yin,e,t),hon(e,t),Lon(e,t),Yrn(e,t),Aon(e,t,n),gin(e,t),Oon(e,t,n),Zon(e),ein(e,t),Pon(e,t,n),don(e,t),xon(e,t),con(e,t,n),zon(e,t),Jrn(e,t),uin(e,t),bon(e,t),Hon(e,t),qrn(e),eon(e,t),ion(e,t),Grn(e,t),qon(e,t),Von(e,t),Xon(e),UJt(e,t),bin(e,t),Cin(e,t),kj(()=>{e.current.runAppliersForPendingProcessors()}),p.useEffect(()=>{e.current.runAppliersForPendingProcessors()})},jin=e=>{const{classes:t,headerAlign:n,isDragging:r,isLastColumn:o,showLeftBorder:i,showRightBorder:a,groupId:l,pinnedPosition:c}=e,u={root:["columnHeader",n==="left"&&"columnHeader--alignLeft",n==="center"&&"columnHeader--alignCenter",n==="right"&&"columnHeader--alignRight",r&&"columnHeader--moving",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",l===null?"columnHeader--emptyGroup":"columnHeader--filledGroup",c===ii.LEFT&&"columnHeader--pinnedLeft",c===ii.RIGHT&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return qn(u,ni,t)};function Nin(e){var G;const{groupId:t,width:n,depth:r,maxDepth:o,fields:i,height:a,colIndex:l,hasFocus:c,tabIndex:u,isLastColumn:d,pinnedPosition:f,pinnedOffset:h}=e,m=br(),g=af(),b=p.useRef(null),y=Po(),v=Wn(y,VGe),x=t?v[t]:{},{headerName:S=t??"",description:C="",headerAlign:_=void 0}=x;let N;const E=t&&((G=v[t])==null?void 0:G.renderHeaderGroup),I=p.useMemo(()=>({groupId:t,headerName:S,description:C,depth:r,maxDepth:o,fields:i,colIndex:l,isLastColumn:d}),[t,S,C,r,o,i,l,d]);t&&E&&(N=E(I));const A=we({},e,{classes:m.classes,headerAlign:_,depth:r,isDragging:!1}),R=S??t,k=pi(),T=t===null?`empty-group-cell-${k}`:t,D=jin(A);p.useLayoutEffect(()=>{if(c){const Y=b.current.querySelector('[tabindex="0"]')||b.current;if(!Y)return;if(efe())Y.focus({preventScroll:!0});else{const B=y.current.getScrollPosition();Y.focus(),y.current.scroll(B)}}},[y,c]);const O=p.useCallback(W=>Y=>{wO(Y)||y.current.publishEvent(W,I,Y)},[y,I]),z=p.useMemo(()=>({onKeyDown:O("columnGroupHeaderKeyDown"),onFocus:O("columnGroupHeaderFocus"),onBlur:O("columnGroupHeaderBlur")}),[O]),F=typeof x.headerClassName=="function"?x.headerClassName(I):x.headerClassName,U=p.useMemo(()=>kV(we({},e.style),g,f,h),[f,h,e.style,g]);return s.jsx(hWe,we({ref:b,classes:D,columnMenuOpen:!1,colIndex:l,height:a,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:u,isDraggable:!1,headerComponent:N,headerClassName:F,description:C,elementId:T,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:R,"aria-colspan":i.length,"data-fields":`|-${i.join("-|-")}-|`,style:U},z))}const KNe={root:He.scrollbarFiller,pinnedRight:He["scrollbarFiller--pinnedRight"]};function Ein({pinnedRight:e}){return s.jsx("div",{role:"presentation",className:Ae(KNe.root,e&&KNe.pinnedRight)})}const YNe=qt("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow"})({display:"flex"}),Pin=e=>{const{visibleColumns:t,sortColumnLookup:n,filterColumnLookup:r,columnHeaderTabIndexState:o,columnGroupHeaderTabIndexState:i,columnHeaderFocus:a,columnGroupHeaderFocus:l,headerGroupingMaxDepth:c,columnMenuState:u,columnVisibility:d,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:h}=e,[m,g]=p.useState(""),[b,y]=p.useState(""),v=Vp(),x=br(),S=Wn(v,HGe),C=Wn(v,Aj),_=Wn(v,KJt),N=Wn(v,xV),E=Wn(v,h1),I=eWe(C,_,N.left.length),A=Wn(v,Mde),R=Wn(v,GUe),k=Wn(v,HKt),T=Wn(v,VKt),D=Wn(v,WUe),O=p.useCallback(J=>y(J.field),[]),z=p.useCallback(()=>y(""),[]),F=p.useCallback(J=>g(J.field),[]),U=p.useCallback(()=>g(""),[]),G=p.useMemo(()=>N.left.length?{firstColumnIndex:0,lastColumnIndex:N.left.length}:null,[N.left.length]),W=p.useMemo(()=>N.right.length?{firstColumnIndex:t.length-N.right.length,lastColumnIndex:t.length}:null,[N.right.length,t.length]);Ir(v,"columnResizeStart",O),Ir(v,"columnResizeStop",z),Ir(v,"columnHeaderDragStart",F),Ir(v,"columnHeaderDragEndNative",U);const Y=J=>{const{renderContext:oe=_}=J||{},de=oe.firstColumnIndex,ae=Math.min(oe.lastColumnIndex,t.length);return{renderedColumns:t.slice(de,ae),firstColumnToRender:de,lastColumnToRender:ae}},B=(J,oe,de,ae=!1)=>{const ue=(J==null?void 0:J.position)===ii.RIGHT,ce=(J==null?void 0:J.position)===void 0,se=N.right.length>0&&ue||N.right.length===0&&ce,me=I-de;return s.jsxs(p.Fragment,{children:[ce&&s.jsx("div",{role:"presentation",style:{width:me}}),oe,ce&&s.jsx("div",{role:"presentation",className:Ae(He.filler,ae&&He["filler--borderBottom"])}),se&&s.jsx(Ein,{pinnedRight:ue})]})},$=(J,oe={})=>{const{renderedColumns:de,firstColumnToRender:ae}=Y(J),ue=[];for(let ce=0;ces.jsxs(YNe,{role:"row","aria-rowindex":c+1,ownerState:x,className:He["row--borderBottom"],style:{height:k},children:[G&&$({position:ii.LEFT,renderContext:G},{disableReorder:!0}),$({renderContext:_}),W&&$({position:ii.RIGHT,renderContext:W},{disableReorder:!0,separatorSide:nfe.Left})]}),q=({depth:J,params:oe})=>{var Te,Ge;const de=Y(oe);if(de.renderedColumns.length===0)return null;const{firstColumnToRender:ae,lastColumnToRender:ue}=de,ce=f[J],se=t[ae].field,me=((Te=S[se])==null?void 0:Te[J])??null,fe=ce.findIndex(({groupId:Ze,columnFields:ht})=>Ze===me&&ht.includes(se)),te=t[ue-1].field,ye=((Ge=S[te])==null?void 0:Ge[J])??null,ve=ce.findIndex(({groupId:Ze,columnFields:ht})=>Ze===ye&&ht.includes(te)),ge=ce.slice(fe,ve+1).map(Ze=>we({},Ze,{columnFields:Ze.columnFields.filter(ht=>d[ht]!==!1)})).filter(Ze=>Ze.columnFields.length>0),Ee=ge[0].columnFields.indexOf(se),Ne=ge[0].columnFields.slice(0,Ee).reduce((Ze,ht)=>{const Oe=E[ht];return Ze+(Oe.computedWidth??0)},0);let _e=ae;const Be=ge.map(({groupId:Ze,columnFields:ht},Oe)=>{const ft=l!==null&&l.depth===J&&ht.includes(l.field),Qe=i!==null&&i.depth===J&&ht.includes(i.field)?0:-1,De={width:ht.reduce((Ye,mt)=>Ye+E[mt].computedWidth,0),fields:ht,colIndex:_e},st=oe.position,vt=C4(st,De.width,_e,C,A,D);_e+=ht.length;let qe=Oe;return st===ii.LEFT&&(qe=_e-1),s.jsx(Nin,{groupId:Ze,width:De.width,fields:De.fields,colIndex:De.colIndex,depth:J,isLastColumn:Oe===ge.length-1,maxDepth:c,height:T,hasFocus:ft,tabIndex:Qe,pinnedPosition:st,pinnedOffset:vt,showLeftBorder:VB(st,qe,x.showColumnVerticalBorder,x.pinnedColumnsSectionSeparator),showRightBorder:HB(st,qe,ge.length,x.showColumnVerticalBorder,R,x.pinnedColumnsSectionSeparator)},Oe)});return B(oe,Be,Ne)};return{renderContext:_,leftRenderContext:G,rightRenderContext:W,pinnedColumns:N,visibleColumns:t,columnPositions:C,getFillers:B,getColumnHeadersRow:K,getColumnsToRender:Y,getColumnGroupHeadersRows:()=>{if(c===0)return null;const J=[];for(let oe=0;oe({role:"rowgroup"})}},Iin=["className"],Ain=e=>{const{classes:t}=e;return qn({root:["columnHeaders"]},ni,t)},Tin=Si("div",{name:"MuiDataGrid",slot:"ColumnHeaders"})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),kin=so(function(t,n){const{className:r}=t,o=sr(t,Iin),i=br(),a=Ain(i);return s.jsx(Tin,we({className:Ae(a.root,r),ownerState:i},o,{role:"presentation",ref:n}))}),Min=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],Rin=so(function(t,n){const{visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:l,columnHeaderFocus:c,columnGroupHeaderFocus:u,headerGroupingMaxDepth:d,columnMenuState:f,columnVisibility:h,columnGroupsHeaderStructure:m,hasOtherElementInTabSequence:g}=t,b=sr(t,Min),{getInnerProps:y,getColumnHeadersRow:v,getColumnGroupHeadersRows:x}=Pin({visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:l,columnHeaderFocus:c,columnGroupHeaderFocus:u,headerGroupingMaxDepth:d,columnMenuState:f,columnVisibility:h,columnGroupsHeaderStructure:m,hasOtherElementInTabSequence:g});return s.jsxs(kin,we({},b,y(),{ref:n,children:[x(),v()]}))}),Oin=p1(Rin);function Din(e){return null}function Lin(e){return null}const $in=so(function(t,n){const o=Po().current.getLocaleText("noResultsOverlayLabel");return s.jsx(MV,we({},t,{ref:n,children:o}))}),Fin=()=>qn({root:["bottomContainer"]},ni,{}),Bin=Si("div")({position:"sticky",zIndex:40,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});function zin(e){const t=Fin();return s.jsx(Bin,we({},e,{className:Ae(t.root,He["container--bottom"]),role:"presentation"}))}const Hin=we({},kKt,{cell:IQt,skeletonCell:DQt,columnHeaderFilterIconButton:ntn,columnHeaderSortIcon:etn,columnMenu:btn,columnHeaders:Oin,detailPanels:Din,bottomContainer:zin,footer:Jnn,footerRowCount:hrn,toolbar:qnn,pinnedRows:Lin,loadingOverlay:arn,noResultsOverlay:$in,noRowsOverlay:srn,noColumnsOverlay:lrn,pagination:urn,filterPanel:qtn,columnsPanel:Stn,columnsManagement:nnn,panel:Etn,row:Crn}),Vin={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid",listView:!1},Uin=e=>we({},Vin,e.dataSource?{filterMode:"server",sortingMode:"server",paginationMode:"server"}:{}),Gin=Hin,Win=e=>{const t=Rm(),n=p.useMemo(()=>LVe({props:e,theme:t,name:"MuiDataGrid"}),[t,e]),r=p.useMemo(()=>we({},tYt,n.localeText),[n.localeText]),o=p.useMemo(()=>SQt({defaultSlots:Gin,slots:n.slots}),[n.slots]),i=p.useMemo(()=>Object.keys(BB).reduce((a,l)=>(a[l]=n[l]??BB[l],a),{}),[n]);return p.useMemo(()=>we({},n,i,{localeText:r,slots:o},Uin(n)),[n,r,o,i])};class qin{constructor(){Le(this,"maxListeners",20);Le(this,"warnOnce",!1);Le(this,"events",{})}on(t,n,r={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let a=o.length-1;a>=0;a-=1){const l=o[a];r.highPriority.has(l)&&l.apply(this,n)}for(let a=0;ae.isPropagationStopped!==void 0;let XNe=0;function Yin(e){var o;const t=(o=e.current)==null?void 0:o[_We];if(t)return t;const n={},r={state:n,store:bV.create(n),instanceId:{id:XNe}};return XNe+=1,r.getPublicApi=()=>e.current,r.register=(i,a)=>{Object.keys(a).forEach(l=>{const c=a[l],u=r[l];if((u==null?void 0:u.spying)===!0?u.target=c:r[l]=c,i==="public"){const d=e.current,f=d[l];(f==null?void 0:f.spying)===!0?f.target=c:d[l]=c}})},r.register("private",{caches:{},eventManager:new qin}),r}function Xin(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[_We]:e.current}}function Zin(e,t){var a;const n=p.useRef(null),r=p.useRef(null);r.current||(r.current=Yin(n)),n.current||(n.current=Xin(r));const o=p.useCallback((...l)=>{const[c,u,d={}]=l;if(d.defaultMuiPrevented=!1,Kin(d)&&d.isPropagationStopped())return;const f=t.signature===H0.DataGridPro||t.signature===H0.DataGridPremium?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(c,u,d,f)},[r,t.signature]),i=p.useCallback((l,c,u)=>{r.current.eventManager.on(l,c,u);const d=r.current;return()=>{d.eventManager.removeListener(l,c)}},[r]);return zo(r,{subscribeEvent:i,publishEvent:o},"public"),e&&!((a=e.current)!=null&&a.state)&&(e.current=n.current),p.useImperativeHandle(e,()=>n.current,[n]),p.useEffect(()=>{const l=r.current;return()=>{l.publishEvent("unmount")}},[r]),r}const ZNe={hooks:{useCSSVariables:wqt,useGridAriaAttributes:_rn,useGridRowAriaAttributes:jrn,useGridRowsOverridableMethods:Nrn,useGridParamsOverridableMethods:Ern,useIsCellEditable:Prn,useCellAggregationResult:()=>null,useFilterValueGetter:e=>e.current.getRowValue}},jWe=function(t,n){var i;const r=Win(t),o=Zin(r.apiRef,r);return _in(o,r,ZNe),s.jsx(Irn,{privateApiRef:o,configuration:ZNe,props:r,children:s.jsx(JQt,we({className:r.className,style:r.style,sx:r.sx},(i=r.slotProps)==null?void 0:i.root,{ref:n}))})},NWe=p.memo(so(jWe));jWe.propTypes={apiRef:Nt.shape({current:Nt.object}),"aria-label":Nt.string,"aria-labelledby":Nt.string,autoHeight:Nt.bool,autoPageSize:Nt.bool,autosizeOnMount:Nt.bool,autosizeOptions:Nt.shape({columns:Nt.arrayOf(Nt.string),disableColumnVirtualization:Nt.bool,expand:Nt.bool,includeHeaders:Nt.bool,includeOutliers:Nt.bool,outliersFactor:Nt.number}),cellModesModel:Nt.object,checkboxSelection:Nt.bool,classes:Nt.object,className:Nt.string,clipboardCopyCellDelimiter:Nt.string,columnBufferPx:Nt.number,columnFilterDebounceMs:Nt.number,columnGroupHeaderHeight:Nt.number,columnGroupingModel:Nt.arrayOf(Nt.object),columnHeaderHeight:Nt.number,columns:Nt.arrayOf(Nt.object).isRequired,columnVisibilityModel:Nt.object,dataSource:Nt.shape({getRows:Nt.func.isRequired,updateRow:Nt.func}),dataSourceCache:Nt.shape({clear:Nt.func.isRequired,get:Nt.func.isRequired,set:Nt.func.isRequired}),density:Nt.oneOf(["comfortable","compact","standard"]),disableAutosize:Nt.bool,disableColumnFilter:Nt.bool,disableColumnMenu:Nt.bool,disableColumnResize:Nt.bool,disableColumnSelector:Nt.bool,disableColumnSorting:Nt.bool,disableDensitySelector:Nt.bool,disableEval:Nt.bool,disableMultipleRowSelection:Nt.bool,disableRowSelectionExcludeModel:Nt.bool,disableRowSelectionOnClick:Nt.bool,disableVirtualization:Nt.bool,editMode:Nt.oneOf(["cell","row"]),estimatedRowCount:Nt.number,experimentalFeatures:Nt.shape({warnIfFocusStateIsNotSynced:Nt.bool}),filterDebounceMs:Nt.number,filterMode:Nt.oneOf(["client","server"]),filterModel:Nt.shape({items:Nt.arrayOf(Nt.shape({field:Nt.string.isRequired,id:Nt.oneOfType([Nt.number,Nt.string]),operator:Nt.string.isRequired,value:Nt.any})).isRequired,logicOperator:Nt.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:Nt.bool,quickFilterLogicOperator:Nt.oneOf(["and","or"]),quickFilterValues:Nt.array}),getCellClassName:Nt.func,getDetailPanelContent:Nt.func,getEstimatedRowHeight:Nt.func,getRowClassName:Nt.func,getRowHeight:Nt.func,getRowId:Nt.func,getRowSpacing:Nt.func,hideFooter:Nt.bool,hideFooterPagination:Nt.bool,hideFooterSelectedRowCount:Nt.bool,ignoreDiacritics:Nt.bool,ignoreValueFormatterDuringExport:Nt.oneOfType([Nt.shape({clipboardExport:Nt.bool,csvExport:Nt.bool}),Nt.bool]),initialState:Nt.object,isCellEditable:Nt.func,isRowSelectable:Nt.func,keepNonExistentRowsSelected:Nt.bool,label:Nt.string,loading:Nt.bool,localeText:Nt.object,logger:Nt.shape({debug:Nt.func.isRequired,error:Nt.func.isRequired,info:Nt.func.isRequired,warn:Nt.func.isRequired}),logLevel:Nt.oneOf(["debug","error","info","warn",!1]),nonce:Nt.string,onCellClick:Nt.func,onCellDoubleClick:Nt.func,onCellEditStart:Nt.func,onCellEditStop:Nt.func,onCellKeyDown:Nt.func,onCellModesModelChange:Nt.func,onClipboardCopy:Nt.func,onColumnHeaderClick:Nt.func,onColumnHeaderContextMenu:Nt.func,onColumnHeaderDoubleClick:Nt.func,onColumnHeaderEnter:Nt.func,onColumnHeaderLeave:Nt.func,onColumnHeaderOut:Nt.func,onColumnHeaderOver:Nt.func,onColumnOrderChange:Nt.func,onColumnResize:Nt.func,onColumnVisibilityModelChange:Nt.func,onColumnWidthChange:Nt.func,onDataSourceError:Nt.func,onDensityChange:Nt.func,onFilterModelChange:Nt.func,onMenuClose:Nt.func,onMenuOpen:Nt.func,onPaginationMetaChange:Nt.func,onPaginationModelChange:Nt.func,onPreferencePanelClose:Nt.func,onPreferencePanelOpen:Nt.func,onProcessRowUpdateError:Nt.func,onResize:Nt.func,onRowClick:Nt.func,onRowCountChange:Nt.func,onRowDoubleClick:Nt.func,onRowEditStart:Nt.func,onRowEditStop:Nt.func,onRowModesModelChange:Nt.func,onRowSelectionModelChange:Nt.func,onSortModelChange:Nt.func,onStateChange:Nt.func,pageSizeOptions:Nt.arrayOf(Nt.oneOfType([Nt.number,Nt.shape({label:Nt.string.isRequired,value:Nt.number.isRequired})]).isRequired),pagination:Nt.oneOf([!0]),paginationMeta:Nt.shape({hasNextPage:Nt.bool}),paginationMode:Nt.oneOf(["client","server"]),paginationModel:Nt.shape({page:Nt.number.isRequired,pageSize:Nt.number.isRequired}),processRowUpdate:Nt.func,resizeThrottleMs:Nt.number,rowBufferPx:Nt.number,rowCount:Nt.number,rowHeight:Nt.number,rowModesModel:Nt.object,rows:Nt.arrayOf(Nt.object),rowSelection:Nt.bool,rowSelectionModel:Nt.shape({ids:Nt.instanceOf(Set).isRequired,type:Nt.oneOf(["exclude","include"]).isRequired}),rowSpacingType:Nt.oneOf(["border","margin"]),rowSpanning:Nt.bool,scrollbarSize:Nt.number,showCellVerticalBorder:Nt.bool,showColumnVerticalBorder:Nt.bool,showToolbar:Nt.bool,slotProps:Nt.object,slots:Nt.object,sortingMode:Nt.oneOf(["client","server"]),sortingOrder:Nt.arrayOf(Nt.oneOf(["asc","desc"])),sortModel:Nt.arrayOf(Nt.shape({field:Nt.string.isRequired,sort:Nt.oneOf(["asc","desc"])})),style:Nt.object,sx:Nt.oneOfType([Nt.arrayOf(Nt.oneOfType([Nt.func,Nt.object,Nt.bool])),Nt.func,Nt.object]),virtualizeColumnsWithAutoRowHeight:Nt.bool};function Jin(e){return kr("MuiCollapse",e)}Mr("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Qin=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return qn(r,Jin,n)},ean=qt("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(Ar(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),tan=qt("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),nan=qt("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),hne=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:l="0px",component:c,easing:u,in:d,onEnter:f,onEntered:h,onEntering:m,onExit:g,onExited:b,onExiting:y,orientation:v="vertical",slots:x={},slotProps:S={},style:C,timeout:_=KVe.standard,TransitionComponent:N=Om,...E}=r,I={...r,orientation:v,collapsedSize:l},A=Qin(I),R=Rm(),k=kp(),T=p.useRef(null),D=p.useRef(),O=typeof l=="number"?`${l}px`:l,z=v==="horizontal",F=z?"width":"height",U=p.useRef(null),G=Yi(n,U),W=te=>ye=>{if(te){const ve=U.current;ye===void 0?te(ve):te(ve,ye)}},Y=()=>T.current?T.current[z?"clientWidth":"clientHeight"]:0,B=W((te,ye)=>{T.current&&z&&(T.current.style.position="absolute"),te.style[F]=O,f&&f(te,ye)}),$=W((te,ye)=>{const ve=Y();T.current&&z&&(T.current.style.position="");const{duration:ge,easing:Ee}=PP({style:C,timeout:_,easing:u},{mode:"enter"});if(_==="auto"){const xe=R.transitions.getAutoHeightDuration(ve);te.style.transitionDuration=`${xe}ms`,D.current=xe}else te.style.transitionDuration=typeof ge=="string"?ge:`${ge}ms`;te.style[F]=`${ve}px`,te.style.transitionTimingFunction=Ee,m&&m(te,ye)}),K=W((te,ye)=>{te.style[F]="auto",h&&h(te,ye)}),q=W(te=>{te.style[F]=`${Y()}px`,g&&g(te)}),Z=W(b),J=W(te=>{const ye=Y(),{duration:ve,easing:ge}=PP({style:C,timeout:_,easing:u},{mode:"exit"});if(_==="auto"){const Ee=R.transitions.getAutoHeightDuration(ye);te.style.transitionDuration=`${Ee}ms`,D.current=Ee}else te.style.transitionDuration=typeof ve=="string"?ve:`${ve}ms`;te.style[F]=O,te.style.transitionTimingFunction=ge,y&&y(te)}),oe=te=>{_==="auto"&&k.start(D.current||0,te),o&&o(U.current,te)},de={slots:x,slotProps:S,component:c},[ae,ue]=Dr("root",{ref:G,className:Ae(A.root,a),elementType:ean,externalForwardedProps:de,ownerState:I,additionalProps:{style:{[z?"minWidth":"minHeight"]:O,...C}}}),[ce,se]=Dr("wrapper",{ref:T,className:A.wrapper,elementType:tan,externalForwardedProps:de,ownerState:I}),[me,fe]=Dr("wrapperInner",{className:A.wrapperInner,elementType:nan,externalForwardedProps:de,ownerState:I});return s.jsx(N,{in:d,onEnter:B,onEntered:K,onEntering:$,onExit:q,onExited:Z,onExiting:J,addEndListener:oe,nodeRef:U,timeout:_==="auto"?null:_,...E,children:(te,{ownerState:ye,...ve})=>{const ge={...I,state:te};return s.jsx(ae,{...ue,className:Ae(ue.className,{entered:A.entered,exited:!d&&O==="0px"&&A.hidden}[te]),ownerState:ge,...ve,children:s.jsx(ce,{...se,ownerState:ge,children:s.jsx(me,{...fe,ownerState:ge,children:i})})})}})});hne&&(hne.muiSupportAuto=!0);const EWe=p.createContext({});function ran(e){return kr("MuiAccordion",e)}const t6=Mr("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),oan=e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:i}=e;return qn({root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!i&&"gutters"],heading:["heading"],region:["region"]},ran,t)},ian=qt(ds,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${t6.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(Ar(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${t6.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${t6.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),Ar(({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${t6.expanded}`]:{margin:"16px 0"}}}]}))),aan=qt("h3",{name:"MuiAccordion",slot:"Heading"})({all:"unset"}),san=qt("div",{name:"MuiAccordion",slot:"Region"})({}),lan=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiAccordion"}),{children:o,className:i,defaultExpanded:a=!1,disabled:l=!1,disableGutters:c=!1,expanded:u,onChange:d,square:f=!1,slots:h={},slotProps:m={},TransitionComponent:g,TransitionProps:b,...y}=r,[v,x]=fS({controlled:u,default:a,name:"Accordion",state:"expanded"}),S=p.useCallback(Y=>{x(!v),d&&d(Y,!v)},[v,d,x]),[C,..._]=p.Children.toArray(o),N=p.useMemo(()=>({expanded:v,disabled:l,disableGutters:c,toggle:S}),[v,l,c,S]),E={...r,square:f,disabled:l,disableGutters:c,expanded:v},I=oan(E),A={transition:g,...h},R={transition:b,...m},k={slots:A,slotProps:R},[T,D]=Dr("root",{elementType:ian,externalForwardedProps:{...k,...y},className:Ae(I.root,i),shouldForwardComponentProp:!0,ownerState:E,ref:n,additionalProps:{square:f}}),[O,z]=Dr("heading",{elementType:aan,externalForwardedProps:k,className:I.heading,ownerState:E}),[F,U]=Dr("transition",{elementType:hne,externalForwardedProps:k,ownerState:E}),[G,W]=Dr("region",{elementType:san,externalForwardedProps:k,ownerState:E,className:I.region,additionalProps:{"aria-labelledby":C.props.id,id:C.props["aria-controls"],role:"region"}});return s.jsxs(T,{...D,children:[s.jsx(O,{...z,children:s.jsx(EWe.Provider,{value:N,children:C})}),s.jsx(F,{in:v,timeout:"auto",...U,children:s.jsx(G,{...W,children:_})})]})});function can(e){return kr("MuiAccordionDetails",e)}Mr("MuiAccordionDetails",["root"]);const uan=e=>{const{classes:t}=e;return qn({root:["root"]},can,t)},dan=qt("div",{name:"MuiAccordionDetails",slot:"Root"})(Ar(({theme:e})=>({padding:e.spacing(1,2,2)}))),zY=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiAccordionDetails"}),{className:o,...i}=r,a=r,l=uan(a);return s.jsx(dan,{className:Ae(l.root,o),ref:n,ownerState:a,...i})});function fan(e){return kr("MuiAccordionSummary",e)}const JE=Mr("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),pan=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e;return qn({root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},fan,t)},han=qt(Bb,{name:"MuiAccordionSummary",slot:"Root"})(Ar(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",width:"100%",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${JE.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${JE.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${JE.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${JE.expanded}`]:{minHeight:64}}}]}})),man=qt("span",{name:"MuiAccordionSummary",slot:"Content"})(Ar(({theme:e})=>({display:"flex",textAlign:"start",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${JE.expanded}`]:{margin:"20px 0"}}}]}))),gan=qt("span",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper"})(Ar(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${JE.expanded}`]:{transform:"rotate(180deg)"}}))),HY=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiAccordionSummary"}),{children:o,className:i,expandIcon:a,focusVisibleClassName:l,onClick:c,slots:u,slotProps:d,...f}=r,{disabled:h=!1,disableGutters:m,expanded:g,toggle:b}=p.useContext(EWe),y=R=>{b&&b(R),c&&c(R)},v={...r,expanded:g,disabled:h,disableGutters:m},x=pan(v),S={slots:u,slotProps:d},[C,_]=Dr("root",{ref:n,shouldForwardComponentProp:!0,className:Ae(x.root,i),elementType:han,externalForwardedProps:{...S,...f},ownerState:v,additionalProps:{focusRipple:!1,disableRipple:!0,disabled:h,"aria-expanded":g,focusVisibleClassName:Ae(x.focusVisible,l)},getSlotProps:R=>({...R,onClick:k=>{var T;(T=R.onClick)==null||T.call(R,k),y(k)}})}),[N,E]=Dr("content",{className:x.content,elementType:man,externalForwardedProps:S,ownerState:v}),[I,A]=Dr("expandIconWrapper",{className:x.expandIconWrapper,elementType:gan,externalForwardedProps:S,ownerState:v});return s.jsxs(C,{..._,children:[s.jsx(N,{...E,children:o}),a&&s.jsx(I,{...A,children:a})]})});function yan(e){return kr("MuiAlert",e)}const JNe=Mr("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),ban=si(s.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),van=si(s.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),xan=si(s.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),wan=si(s.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),San=e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root",`color${_n(n||r)}`,`${t}${_n(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return qn(i,yan,o)},Can=qt(ds,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${_n(n.color||n.severity)}`]]}})(Ar(({theme:e})=>{const t=e.palette.mode==="light"?e.darken:e.lighten,n=e.palette.mode==="light"?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(Us(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${JNe.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Us(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${JNe.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Us(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),_an=qt("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),jan=qt("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),Nan=qt("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),QNe={success:s.jsx(ban,{fontSize:"inherit"}),warning:s.jsx(van,{fontSize:"inherit"}),error:s.jsx(xan,{fontSize:"inherit"}),info:s.jsx(wan,{fontSize:"inherit"})},Su=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiAlert"}),{action:o,children:i,className:a,closeText:l="Close",color:c,components:u={},componentsProps:d={},icon:f,iconMapping:h=QNe,onClose:m,role:g="alert",severity:b="success",slotProps:y={},slots:v={},variant:x="standard",...S}=r,C={...r,color:c,severity:b,variant:x,colorSeverity:c||b},_=San(C),N={slots:{closeButton:u.CloseButton,closeIcon:u.CloseIcon,...v},slotProps:{...d,...y}},[E,I]=Dr("root",{ref:n,shouldForwardComponentProp:!0,className:Ae(_.root,a),elementType:Can,externalForwardedProps:{...N,...S},ownerState:C,additionalProps:{role:g,elevation:0}}),[A,R]=Dr("icon",{className:_.icon,elementType:_an,externalForwardedProps:N,ownerState:C}),[k,T]=Dr("message",{className:_.message,elementType:jan,externalForwardedProps:N,ownerState:C}),[D,O]=Dr("action",{className:_.action,elementType:Nan,externalForwardedProps:N,ownerState:C}),[z,F]=Dr("closeButton",{elementType:vd,externalForwardedProps:N,ownerState:C}),[U,G]=Dr("closeIcon",{elementType:mUe,externalForwardedProps:N,ownerState:C});return s.jsxs(E,{...I,children:[f!==!1?s.jsx(A,{...R,children:f||h[b]||QNe[b]}):null,s.jsx(k,{...T,children:i}),o!=null?s.jsx(D,{...O,children:o}):null,o==null&&m?s.jsx(D,{...O,children:s.jsx(z,{size:"small","aria-label":l,title:l,color:"inherit",onClick:m,...F,children:s.jsx(U,{fontSize:"small",...G})})}):null]})});function Ean(e){return kr("MuiAppBar",e)}Mr("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const Pan=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${_n(t)}`,`position${_n(n)}`]};return qn(o,Ean,r)},eEe=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,Ian=qt(ds,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${_n(n.position)}`],t[`color${_n(n.color)}`]]}})(Ar(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Us(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?eEe(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?eEe(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),Aan=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiAppBar"}),{className:o,color:i="primary",enableColorOnDark:a=!1,position:l="fixed",...c}=r,u={...r,color:i,position:l,enableColorOnDark:a},d=Pan(u);return s.jsx(Ian,{square:!0,component:"header",ownerState:u,elevation:4,className:Ae(d.root,o,l==="fixed"&&"mui-fixed"),ref:n,...c})}),Tan=Mr("MuiBox",["root"]),kan=UI(),fo=u7t({themeId:Nb,defaultTheme:kan,defaultClassName:Tan.root,generateClassName:MVe.generate});function Man(e){return kr("MuiCard",e)}Mr("MuiCard",["root"]);const Ran=e=>{const{classes:t}=e;return qn({root:["root"]},Man,t)},Oan=qt(ds,{name:"MuiCard",slot:"Root"})({overflow:"hidden"}),_f=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiCard"}),{className:o,raised:i=!1,...a}=r,l={...r,raised:i},c=Ran(l);return s.jsx(Oan,{className:Ae(c.root,o),elevation:i?8:void 0,ref:n,ownerState:l,...a})});function Dan(e){return kr("MuiCardActions",e)}Mr("MuiCardActions",["root","spacing"]);const Lan=e=>{const{classes:t,disableSpacing:n}=e;return qn({root:["root",!n&&"spacing"]},Dan,t)},$an=qt("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Fan=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiCardActions"}),{disableSpacing:o=!1,className:i,...a}=r,l={...r,disableSpacing:o},c=Lan(l);return s.jsx($an,{className:Ae(c.root,i),ownerState:l,ref:n,...a})});function Ban(e){return kr("MuiCardContent",e)}Mr("MuiCardContent",["root"]);const zan=e=>{const{classes:t}=e;return qn({root:["root"]},Ban,t)},Han=qt("div",{name:"MuiCardContent",slot:"Root"})({padding:16,"&:last-child":{paddingBottom:24}}),jf=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiCardContent"}),{className:o,component:i="div",...a}=r,l={...r,component:i},c=zan(l);return s.jsx(Han,{as:i,className:Ae(c.root,o),ownerState:l,ref:n,...a})});function Van(e){return kr("MuiCardMedia",e)}Mr("MuiCardMedia",["root","media","img"]);const Uan=e=>{const{classes:t,isMediaComponent:n,isImageComponent:r}=e;return qn({root:["root",n&&"media",r&&"img"]},Van,t)},Gan=qt("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{isMediaComponent:r,isImageComponent:o}=n;return[t.root,r&&t.media,o&&t.img]}})({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",variants:[{props:{isMediaComponent:!0},style:{width:"100%"}},{props:{isImageComponent:!0},style:{objectFit:"cover"}}]}),Wan=["video","audio","picture","iframe","img"],qan=["picture","img"],Kan=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiCardMedia"}),{children:o,className:i,component:a="div",image:l,src:c,style:u,...d}=r,f=Wan.includes(a),h=!f&&l?{backgroundImage:`url("${l}")`,...u}:u,m={...r,component:a,isMediaComponent:f,isImageComponent:qan.includes(a)},g=Uan(m);return s.jsx(Gan,{className:Ae(g.root,i),as:a,role:!f&&l?"img":void 0,ref:n,style:h,ownerState:m,src:f?l||c:void 0,...d,children:o})}),afe=J7t({createStyledComponent:qt("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${_n(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>Lr({props:e,name:"MuiContainer"})}),mne=typeof bde({})=="function",Yan=(e,t)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&!e.vars&&{colorScheme:e.palette.mode}}),Xan=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),PWe=(e,t=!1)=>{var i,a;const n={};t&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([l,c])=>{var d,f;const u=e.getColorSchemeSelector(l);u.startsWith("@")?n[u]={":root":{colorScheme:(d=c.palette)==null?void 0:d.mode}}:n[u.replace(/\s*&/,"")]={colorScheme:(f=c.palette)==null?void 0:f.mode}});let r={html:Yan(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...Xan(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...n};const o=(a=(i=e.components)==null?void 0:i.MuiCssBaseline)==null?void 0:a.styleOverrides;return o&&(r=[r,o]),r},b8="mui-ecs",Zan=e=>{const t=PWe(e,!1),n=Array.isArray(t)?t[0]:t;return!e.vars&&n&&(n.html[`:root:has(${b8})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([r,o])=>{var a,l;const i=e.getColorSchemeSelector(r);i.startsWith("@")?n[i]={[`:root:not(:has(.${b8}))`]:{colorScheme:(a=o.palette)==null?void 0:a.mode}}:n[i.replace(/\s*&/,"")]={[`&:not(:has(.${b8}))`]:{colorScheme:(l=o.palette)==null?void 0:l.mode}}}),t},Jan=bde(mne?({theme:e,enableColorScheme:t})=>PWe(e,t):({theme:e})=>Zan(e));function sfe(e){const t=Lr({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return s.jsxs(p.Fragment,{children:[mne&&s.jsx(Jan,{enableColorScheme:r}),!mne&&!r&&s.jsx("span",{className:b8,style:{display:"none"}}),n]})}function Qan(e){return kr("MuiDialog",e)}const VY=Mr("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),IWe=p.createContext({}),esn=qt(CUe,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),tsn=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${_n(n)}`],paper:["paper",`paperScroll${_n(n)}`,`paperWidth${_n(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return qn(a,Qan,t)},nsn=qt(_Ue,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),rsn=qt("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${_n(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),osn=qt(ds,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${_n(n.scroll)}`],t[`paperWidth${_n(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Ar(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${VY.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${VY.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${VY.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),lfe=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiDialog"}),o=Rm(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":l,"aria-modal":c=!0,BackdropComponent:u,BackdropProps:d,children:f,className:h,disableEscapeKeyDown:m=!1,fullScreen:g=!1,fullWidth:b=!1,maxWidth:y="sm",onClick:v,onClose:x,open:S,PaperComponent:C=ds,PaperProps:_={},scroll:N="paper",slots:E={},slotProps:I={},TransitionComponent:A=ene,transitionDuration:R=i,TransitionProps:k,...T}=r,D={...r,disableEscapeKeyDown:m,fullScreen:g,fullWidth:b,maxWidth:y,scroll:N},O=tsn(D),z=p.useRef(),F=me=>{z.current=me.target===me.currentTarget},U=me=>{v&&v(me),z.current&&(z.current=null,x&&x(me,"backdropClick"))},G=pi(l),W=p.useMemo(()=>({titleId:G}),[G]),Y={transition:A,...E},B={transition:k,paper:_,backdrop:d,...I},$={slots:Y,slotProps:B},[K,q]=Dr("root",{elementType:nsn,shouldForwardComponentProp:!0,externalForwardedProps:$,ownerState:D,className:Ae(O.root,h),ref:n}),[Z,J]=Dr("backdrop",{elementType:esn,shouldForwardComponentProp:!0,externalForwardedProps:$,ownerState:D}),[oe,de]=Dr("paper",{elementType:osn,shouldForwardComponentProp:!0,externalForwardedProps:$,ownerState:D,className:Ae(O.paper,_.className)}),[ae,ue]=Dr("container",{elementType:rsn,externalForwardedProps:$,ownerState:D,className:O.container}),[ce,se]=Dr("transition",{elementType:ene,externalForwardedProps:$,ownerState:D,additionalProps:{appear:!0,in:S,timeout:R,role:"presentation"}});return s.jsx(K,{closeAfterTransition:!0,slots:{backdrop:Z},slotProps:{backdrop:{transitionDuration:R,as:u,...J}},disableEscapeKeyDown:m,onClose:x,open:S,onClick:U,...q,...T,children:s.jsx(ce,{...se,children:s.jsx(ae,{onMouseDown:F,...ue,children:s.jsx(oe,{as:C,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":G,"aria-modal":c,...de,children:s.jsx(IWe.Provider,{value:W,children:f})})})})})});function isn(e){return kr("MuiDialogActions",e)}Mr("MuiDialogActions",["root","spacing"]);const asn=e=>{const{classes:t,disableSpacing:n}=e;return qn({root:["root",!n&&"spacing"]},isn,t)},ssn=qt("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),cfe=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...a}=r,l={...r,disableSpacing:i},c=asn(l);return s.jsx(ssn,{className:Ae(c.root,o),ownerState:l,ref:n,...a})});function lsn(e){return kr("MuiDialogContent",e)}Mr("MuiDialogContent",["root","dividers"]);function csn(e){return kr("MuiDialogTitle",e)}const usn=Mr("MuiDialogTitle",["root"]),dsn=e=>{const{classes:t,dividers:n}=e;return qn({root:["root",n&&"dividers"]},lsn,t)},fsn=qt("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Ar(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${usn.root} + &`]:{paddingTop:0}}}]}))),ufe=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...a}=r,l={...r,dividers:i},c=dsn(l);return s.jsx(fsn,{className:Ae(c.root,o),ownerState:l,ref:n,...a})});function psn(e){return kr("MuiDialogContentText",e)}Mr("MuiDialogContentText",["root"]);const hsn=e=>{const{classes:t}=e,r=qn({root:["root"]},psn,t);return{...t,...r}},msn=qt(An,{shouldForwardProp:e=>Hp(e)||e==="classes",name:"MuiDialogContentText",slot:"Root"})({}),gsn=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiDialogContentText"}),{children:o,className:i,...a}=r,l=hsn(a);return s.jsx(msn,{component:"p",variant:"body1",color:"textSecondary",ref:n,ownerState:a,className:Ae(l.root,i),...r,classes:l})}),ysn=e=>{const{classes:t}=e;return qn({root:["root"]},csn,t)},bsn=qt(An,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),dfe=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiDialogTitle"}),{className:o,id:i,...a}=r,l=r,c=ysn(l),{titleId:u=i}=p.useContext(IWe);return s.jsx(bsn,{component:"h2",className:Ae(c.root,o),ownerState:l,ref:n,variant:"h6",id:i??u,...a})}),tr=hBt({createStyledComponent:qt("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid",useThemeProps:e=>Lr({props:e,name:"MuiGrid"}),useTheme:Rm});function vsn(e){return kr("MuiLink",e)}const xsn=Mr("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),wsn=({theme:e,ownerState:t})=>{const n=t.color;if("colorSpace"in e&&e.colorSpace){const i=cb(e,`palette.${n}.main`)||cb(e,`palette.${n}`)||t.color;return e.alpha(i,.4)}const r=cb(e,`palette.${n}.main`,!1)||cb(e,`palette.${n}`,!1)||t.color,o=cb(e,`palette.${n}.mainChannel`)||cb(e,`palette.${n}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:Ux(r,.4)},tEe={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Ssn=e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e,i={root:["root",`underline${_n(o)}`,n==="button"&&"button",r&&"focusVisible"]};return qn(i,vsn,t)},Csn=qt(An,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${_n(n.underline)}`],n.component==="button"&&t.button]}})(Ar(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:t,ownerState:n})=>t==="always"&&n.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},{props:({underline:t,ownerState:n})=>t==="always"&&n.color==="inherit",style:e.colorSpace?{textDecorationColor:e.alpha("currentColor",.4)}:null},...Object.entries(e.palette).filter(Us()).map(([t])=>({props:{underline:"always",color:t},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette[t].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${xsn.focusVisible}`]:{outline:"auto"}}}]}))),n6=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiLink"}),o=Rm(),{className:i,color:a="primary",component:l="a",onBlur:c,onFocus:u,TypographyClasses:d,underline:f="always",variant:h="inherit",sx:m,...g}=r,[b,y]=p.useState(!1),v=_=>{jP(_.target)||y(!1),c&&c(_)},x=_=>{jP(_.target)&&y(!0),u&&u(_)},S={...r,color:a,component:l,focusVisible:b,underline:f,variant:h},C=Ssn(S);return s.jsx(Csn,{color:a,className:Ae(C.root,i),classes:d,component:l,onBlur:v,onFocus:x,ref:n,ownerState:S,variant:h,...g,sx:[...tEe[a]===void 0?[{color:a}]:[],...Array.isArray(m)?m:[m]],style:{...g.style,...f==="always"&&a!=="inherit"&&!tEe[a]&&{"--Link-underlineColor":wsn({theme:o,ownerState:S})}}})});function _sn(e){return kr("MuiListItem",e)}Mr("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const jsn=Mr("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Nsn(e){return kr("MuiListItemSecondaryAction",e)}Mr("MuiListItemSecondaryAction",["root","disableGutters"]);const Esn=e=>{const{disableGutters:t,classes:n}=e;return qn({root:["root",t&&"disableGutters"]},Nsn,n)},Psn=qt("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),AWe=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,a=p.useContext(Nx),l={...r,disableGutters:a.disableGutters},c=Esn(l);return s.jsx(Psn,{className:Ae(c.root,o),ownerState:l,ref:n,...i})});AWe.muiName="ListItemSecondaryAction";const Isn=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},Asn=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:l}=e;return qn({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider",t==="flex-start"&&"alignItemsFlexStart",l&&"secondaryAction"],container:["container"],secondaryAction:["secondaryAction"]},_sn,n)},Tsn=qt("div",{name:"MuiListItem",slot:"Root",overridesResolver:Isn})(Ar(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${jsn.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),ksn=qt("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),Y1=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiListItem"}),{alignItems:o="center",children:i,className:a,component:l,components:c={},componentsProps:u={},ContainerComponent:d="li",ContainerProps:{className:f,...h}={},dense:m=!1,disableGutters:g=!1,disablePadding:b=!1,divider:y=!1,secondaryAction:v,slotProps:x={},slots:S={},...C}=r,_=p.useContext(Nx),N=p.useMemo(()=>({dense:m||_.dense||!1,alignItems:o,disableGutters:g}),[o,_.dense,m,g]),E=p.useRef(null),I=p.Children.toArray(i),A=I.length&&m4(I[I.length-1],["ListItemSecondaryAction"]),R={...r,alignItems:o,dense:N.dense,disableGutters:g,disablePadding:b,divider:y,hasSecondaryAction:A},k=Asn(R),T=Yi(E,n),D={slots:S,slotProps:x},[O,z]=Dr("secondaryAction",{elementType:AWe,externalForwardedProps:D,ownerState:R,className:k.secondaryAction}),F=S.root||c.Root||Tsn,U=x.root||u.root||{},G={className:Ae(k.root,U.className,a),...C};let W=l||"li";return A?(W=!G.component&&!l?"div":W,d==="li"&&(W==="li"?W="div":G.component==="li"&&(G.component="div")),s.jsx(Nx.Provider,{value:N,children:s.jsxs(ksn,{as:d,className:Ae(k.container,f),ref:T,ownerState:R,...h,children:[s.jsx(F,{...U,...!CP(F)&&{as:W,ownerState:{...R,...U.ownerState}},...G,children:I}),I.pop()]})})):s.jsx(Nx.Provider,{value:N,children:s.jsxs(F,{...U,as:W,ref:T,...!CP(F)&&{ownerState:{...R,...U.ownerState}},...G,children:[I,v&&s.jsx(O,{...z,children:v})]})})});function Msn(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:i}=e,a=kp();p.useEffect(()=>{if(!o)return;function v(x){x.defaultPrevented||x.key==="Escape"&&(r==null||r(x,"escapeKeyDown"))}return document.addEventListener("keydown",v),()=>{document.removeEventListener("keydown",v)}},[o,r]);const l=no((v,x)=>{r==null||r(v,x)}),c=no(v=>{!r||v==null||a.start(v,()=>{l(null,"timeout")})});p.useEffect(()=>(o&&c(t),a.clear),[o,t,c,a]);const u=v=>{r==null||r(v,"clickaway")},d=a.clear,f=p.useCallback(()=>{t!=null&&c(i??t*.5)},[t,i,c]),h=v=>x=>{const S=v.onBlur;S==null||S(x),f()},m=v=>x=>{const S=v.onFocus;S==null||S(x),d()},g=v=>x=>{const S=v.onMouseEnter;S==null||S(x),d()},b=v=>x=>{const S=v.onMouseLeave;S==null||S(x),f()};return p.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",f),window.addEventListener("blur",d),()=>{window.removeEventListener("focus",f),window.removeEventListener("blur",d)}},[n,o,f,d]),{getRootProps:(v={})=>{const x={...TB(e),...TB(v)};return{role:"presentation",...v,...x,onBlur:h(x),onFocus:m(x),onMouseEnter:g(x),onMouseLeave:b(x)}},onClickAway:u}}function Rsn(e){return kr("MuiSnackbarContent",e)}Mr("MuiSnackbarContent",["root","message","action"]);const Osn=e=>{const{classes:t}=e;return qn({root:["root"],action:["action"],message:["message"]},Rsn,t)},Dsn=qt(ds,{name:"MuiSnackbarContent",slot:"Root"})(Ar(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98;return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(Rte(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:Rte(e.palette.background.default,t),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),Lsn=qt("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),$sn=qt("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),Fsn=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiSnackbarContent"}),{action:o,className:i,message:a,role:l="alert",...c}=r,u=r,d=Osn(u);return s.jsxs(Dsn,{role:l,elevation:6,className:Ae(d.root,i),ownerState:u,ref:n,...c,children:[s.jsx(Lsn,{className:d.message,ownerState:u,children:a}),o?s.jsx($sn,{className:d.action,ownerState:u,children:o}):null]})});function Bsn(e){return kr("MuiSnackbar",e)}Mr("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const zsn=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${_n(n.vertical)}${_n(n.horizontal)}`]};return qn(r,Bsn,t)},Hsn=qt("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${_n(n.anchorOrigin.vertical)}${_n(n.anchorOrigin.horizontal)}`]]}})(Ar(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),Vsn=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiSnackbar"}),o=Rm(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:l,horizontal:c}={vertical:"bottom",horizontal:"left"},autoHideDuration:u=null,children:d,className:f,ClickAwayListenerProps:h,ContentProps:m,disableWindowBlurListener:g=!1,message:b,onBlur:y,onClose:v,onFocus:x,onMouseEnter:S,onMouseLeave:C,open:_,resumeHideDuration:N,slots:E={},slotProps:I={},TransitionComponent:A,transitionDuration:R=i,TransitionProps:{onEnter:k,onExited:T,...D}={},...O}=r,z={...r,anchorOrigin:{vertical:l,horizontal:c},autoHideDuration:u,disableWindowBlurListener:g,TransitionComponent:A,transitionDuration:R},F=zsn(z),{getRootProps:U,onClickAway:G}=Msn(z),[W,Y]=p.useState(!0),B=me=>{Y(!0),T&&T(me)},$=(me,fe)=>{Y(!1),k&&k(me,fe)},K={slots:{transition:A,...E},slotProps:{content:m,clickAwayListener:h,transition:D,...I}},[q,Z]=Dr("root",{ref:n,className:[F.root,f],elementType:Hsn,getSlotProps:U,externalForwardedProps:{...K,...O},ownerState:z}),[J,{ownerState:oe,...de}]=Dr("clickAwayListener",{elementType:OUe,externalForwardedProps:K,getSlotProps:me=>({onClickAway:(...fe)=>{var ye;const te=fe[0];(ye=me.onClickAway)==null||ye.call(me,...fe),!(te!=null&&te.defaultMuiPrevented)&&G(...fe)}}),ownerState:z}),[ae,ue]=Dr("content",{elementType:Fsn,shouldForwardComponentProp:!0,externalForwardedProps:K,additionalProps:{message:b,action:a},ownerState:z}),[ce,se]=Dr("transition",{elementType:IP,externalForwardedProps:K,getSlotProps:me=>({onEnter:(...fe)=>{var te;(te=me.onEnter)==null||te.call(me,...fe),$(...fe)},onExited:(...fe)=>{var te;(te=me.onExited)==null||te.call(me,...fe),B(...fe)}}),additionalProps:{appear:!0,in:_,timeout:R,direction:l==="top"?"down":"up"},ownerState:z});return!_&&W?null:s.jsx(J,{...de,...E.clickAwayListener&&{ownerState:oe},children:s.jsx(q,{...Z,children:s.jsx(ce,{...se,children:d||s.jsx(ae,{...ue})})})})}),Iw=wBt({createStyledComponent:qt("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Lr({props:e,name:"MuiStack"})});function Usn(e){return kr("MuiTable",e)}Mr("MuiTable",["root","stickyHeader"]);const Gsn=e=>{const{classes:t,stickyHeader:n}=e;return qn({root:["root",n&&"stickyHeader"]},Usn,t)},Wsn=qt("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(Ar(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:t})=>t.stickyHeader,style:{borderCollapse:"separate"}}]}))),nEe="table",F_=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiTable"}),{className:o,component:i=nEe,padding:a="normal",size:l="medium",stickyHeader:c=!1,...u}=r,d={...r,component:i,padding:a,size:l,stickyHeader:c},f=Gsn(d),h=p.useMemo(()=>({padding:a,size:l,stickyHeader:c}),[a,l,c]);return s.jsx(TUe.Provider,{value:h,children:s.jsx(Wsn,{as:i,role:i===nEe?null:"table",ref:n,className:Ae(f.root,o),ownerState:d,...u})})});function qsn(e){return kr("MuiTableBody",e)}Mr("MuiTableBody",["root"]);const Ksn=e=>{const{classes:t}=e;return qn({root:["root"]},qsn,t)},Ysn=qt("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),Xsn={variant:"body"},rEe="tbody",B_=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiTableBody"}),{className:o,component:i=rEe,...a}=r,l={...r,component:i},c=Ksn(l);return s.jsx(yV.Provider,{value:Xsn,children:s.jsx(Ysn,{className:Ae(c.root,o),as:i,ref:n,role:i===rEe?null:"rowgroup",ownerState:l,...a})})});function Zsn(e){return kr("MuiTableContainer",e)}Mr("MuiTableContainer",["root"]);const Jsn=e=>{const{classes:t}=e;return qn({root:["root"]},Zsn,t)},Qsn=qt("div",{name:"MuiTableContainer",slot:"Root"})({width:"100%",overflowX:"auto"}),z_=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiTableContainer"}),{className:o,component:i="div",...a}=r,l={...r,component:i},c=Jsn(l);return s.jsx(Qsn,{ref:n,as:i,className:Ae(c.root,o),ownerState:l,...a})});function eln(e){return kr("MuiTableHead",e)}Mr("MuiTableHead",["root"]);const tln=e=>{const{classes:t}=e;return qn({root:["root"]},eln,t)},nln=qt("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),rln={variant:"head"},oEe="thead",H_=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiTableHead"}),{className:o,component:i=oEe,...a}=r,l={...r,component:i},c=tln(l);return s.jsx(yV.Provider,{value:rln,children:s.jsx(nln,{as:i,className:Ae(c.root,o),ref:n,role:i===oEe?null:"rowgroup",ownerState:l,...a})})});function oln(e){return kr("MuiTableRow",e)}const iEe=Mr("MuiTableRow",["root","selected","hover","head","footer"]),iln=e=>{const{classes:t,selected:n,hover:r,head:o,footer:i}=e;return qn({root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]},oln,t)},aln=qt("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(Ar(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${iEe.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${iEe.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)}}}))),aEe="tr",Ef=p.forwardRef(function(t,n){const r=Lr({props:t,name:"MuiTableRow"}),{className:o,component:i=aEe,hover:a=!1,selected:l=!1,...c}=r,u=p.useContext(yV),d={...r,component:i,hover:a,selected:l,head:u&&u.variant==="head",footer:u&&u.variant==="footer"},f=iln(d);return s.jsx(aln,{as:i,ref:n,className:Ae(f.root,o),role:i===aEe?null:"row",ownerState:d,...c})}),sln=({statementLines:e})=>{const t=p.useMemo(()=>[{field:"BookgDt",headerName:"Booking Date",width:130,valueGetter:n=>new Date(n.row.BookgDt).toLocaleDateString()},{field:"Amt",headerName:"Amount",width:150,align:"right",headerAlign:"right",renderCell:n=>s.jsxs("span",{style:{color:n.row.CdtDbtInd==="CRDT"?"green":"red",fontWeight:"bold"},children:[n.row.CdtDbtInd==="CRDT"?"+":"-"," ",n.value]})},{field:"NtryRef",headerName:"Reference",width:200}],[]);return s.jsx(fo,{sx:{height:600,width:"100%",mt:3},children:s.jsx(NWe,{rows:e.map((n,r)=>({id:r,...n})),columns:t,pageSize:10,autoHeight:!0})})},lln=Object.freeze(Object.defineProperty({__proto__:null,default:sln},Symbol.toStringTag,{value:"Module"})),cln=({children:e,isOpen:t,onClose:n})=>t?s.jsx("div",{className:"modal",children:e}):null,uln=()=>null,dln=({children:e})=>s.jsx("div",{className:"modal-content",children:e}),fln=({children:e})=>s.jsx("h3",{children:e}),pln=({children:e})=>s.jsx("div",{children:e}),hln=({children:e})=>s.jsx("div",{children:e}),mln=()=>s.jsx("button",{children:"Close"}),DT=e=>s.jsx("button",{...e}),UY=({children:e})=>s.jsx("div",{children:e}),GY=({children:e})=>s.jsx("label",{children:e}),sEe=({children:e})=>s.jsx("span",{children:e}),lEe=e=>s.jsx("input",{...e}),VN=({children:e})=>s.jsx("p",{children:e}),WY=({children:e})=>s.jsx("div",{children:e}),gln=({children:e})=>s.jsx("div",{children:e}),yln=({children:e,...t})=>s.jsx("select",{...t,children:e}),cEe=()=>s.jsx("span",{children:"Loading..."}),bln=({children:e})=>s.jsx("div",{children:e}),uEe=()=>s.jsx("span",{children:"!"}),vln=()=>e=>console.log(e),xln=({isOpen:e,onClose:t,onSuccess:n,externalAccount:r})=>{const[o,i]=p.useState("initiate"),[a,l]=p.useState(!1),[c,u]=p.useState(null),[d,f]=p.useState(["",""]),[h,m]=p.useState([]),[g,b]=p.useState(""),y=vln();p.useEffect(()=>{e&&r&&(u(null),l(!1),f(["",""]),r.verification_status==="pending_verification"?i("confirm"):(i("initiate"),(async()=>{try{l(!0);const E=[{id:"int_1",name:"Operating",currency:"USD"}];m(E),E.length>0&&b(E[0].id)}catch{u("Failed to load necessary data. Please try again.")}finally{l(!1)}})()))},[e,r]);const v=async()=>{var N,E,I;if(!(!r||!g)){l(!0),u(null);try{await new Promise(A=>setTimeout(A,1e3)),i("confirm"),y({title:"Verification Started",description:"Micro-deposits are on their way to your account.",status:"success",duration:5e3,isClosable:!0})}catch(A){u(((I=(E=(N=A.response)==null?void 0:N.data)==null?void 0:E.errors)==null?void 0:I.message)||"An unexpected error occurred.")}finally{l(!1)}}},x=async()=>{var E,I,A;if(!r)return;const N=d.map(R=>Math.round(parseFloat(R)*100)).filter(R=>!isNaN(R));if(N.length!==2||N.some(R=>R<=0)){u("Please enter two valid, positive deposit amounts.");return}l(!0),u(null);try{await new Promise(R=>setTimeout(R,1e3)),i("success"),setTimeout(()=>{n(),t()},2e3)}catch(R){u(((A=(I=(E=R.response)==null?void 0:E.data)==null?void 0:I.errors)==null?void 0:A.message)||"Verification failed. Please double-check the amounts and try again.")}finally{l(!1)}},S=(N,E)=>{const I=[...d];/^[0-9]*\.?[0-9]{0,2}$/.test(E)&&(I[N]=E,f(I))},C=()=>{if(!r)return s.jsx(cEe,{});switch(o){case"initiate":return s.jsxs(WY,{children:[s.jsxs(VN,{children:["To verify your account, we will send two small deposits (less than $1.00) to"," ",s.jsx("strong",{children:r.party_name}),"."]}),s.jsx(VN,{children:"These should appear in your bank account in 1-2 business days. Once you see them, come back here to enter the amounts."}),s.jsxs(UY,{children:[s.jsx(GY,{children:"Originate Deposits From"}),h.length>0?s.jsx(yln,{value:g,onChange:N=>b(N.target.value),children:h.map(N=>s.jsxs("option",{value:N.id,children:[N.name," (",N.currency,")"]},N.id))}):s.jsx(VN,{children:"No internal accounts found."}),!g&&s.jsx(sEe,{children:"An originating account must be selected."})]})]});case"confirm":return s.jsxs(WY,{children:[s.jsx(VN,{children:"Check your bank account for two small deposits from Modern Treasury. Enter the amounts below in USD to complete the verification."}),s.jsxs(gln,{children:[s.jsxs(UY,{children:[s.jsx(GY,{children:"First Deposit Amount"}),s.jsx(lEe,{type:"text",placeholder:"0.21",value:d[0],onChange:N=>S(0,N.target.value)})]}),s.jsxs(UY,{children:[s.jsx(GY,{children:"Second Deposit Amount"}),s.jsx(lEe,{type:"text",placeholder:"0.45",value:d[1],onChange:N=>S(1,N.target.value)})]})]}),c&&s.jsx(sEe,{children:c})]});case"success":return s.jsxs(WY,{children:[s.jsx(uEe,{}),s.jsx(VN,{children:"Account Verified!"}),s.jsx(VN,{children:"Your account has been successfully verified and is ready for use."})]});default:return null}},_=()=>{switch(o){case"initiate":return s.jsxs(s.Fragment,{children:[s.jsx(DT,{onClick:t,children:"Cancel"}),s.jsx(DT,{onClick:v,disabled:!g||a,children:a?"Sending...":"Send Micro-Deposits"})]});case"confirm":return s.jsxs(s.Fragment,{children:[s.jsx(DT,{onClick:t,children:"Cancel"}),s.jsx(DT,{onClick:x,disabled:a,children:a?"Verifying...":"Verify Account"})]});case"success":return null;default:return s.jsx(DT,{onClick:t,children:"Close"})}};return s.jsxs(cln,{isOpen:e,onClose:t,children:[s.jsx(uln,{}),s.jsxs(dln,{children:[s.jsx(fln,{children:"Verify Bank Account"}),s.jsx(mln,{}),s.jsxs(hln,{children:[c&&s.jsxs(bln,{children:[s.jsx(uEe,{}),c]}),a&&o!=="confirm"&&s.jsx(cEe,{}),!a||o==="confirm"?C():null]}),s.jsx(pln,{children:_()})]})]})},wln=Object.freeze(Object.defineProperty({__proto__:null,AccountVerificationModal:xln},Symbol.toStringTag,{value:"Module"})),qY=({children:e,p:t,mb:n,className:r})=>s.jsx("div",{style:{padding:t?`${t*4}px`:void 0,marginBottom:n?`${n*4}px`:void 0},className:r,children:e}),dEe=({children:e,mb:t})=>s.jsx("div",{style:{border:"1px solid #e0e0e0",borderRadius:"8px",padding:"16px",marginBottom:t?`${t*4}px`:void 0,boxShadow:"0 2px 4px rgba(0,0,0,0.05)"},children:e}),KY=({children:e,as:t="h2",size:n="md",mb:r})=>{const o=t,i=n==="xl"?"2.5rem":n==="lg"?"2rem":"1.5rem";return s.jsx(o,{style:{fontSize:i,marginBottom:r?`${r*4}px`:void 0,fontWeight:"600"},children:e})},LT=({children:e,mt:t})=>s.jsx("p",{style:{marginTop:t?`${t*4}px`:void 0,lineHeight:"1.5"},children:e}),Sln=()=>s.jsx("div",{style:{border:"4px solid #f3f3f3",borderTop:"4px solid #3498db",borderRadius:"50%",width:"20px",height:"20px",animation:"spin 1s linear infinite"}}),Cln=({status:e,children:t})=>s.jsx("div",{style:{padding:"12px",borderRadius:"4px",backgroundColor:e==="error"?"#fdecea":"#e0f2f7",color:e==="error"?"#c53030":"#2c5282"},children:t}),_ln=({children:e})=>s.jsx("table",{style:{width:"100%",borderCollapse:"collapse"},children:e}),jln=({children:e,direction:t="row",gap:n})=>s.jsx("div",{style:{display:"flex",flexDirection:t,gap:n?`${n*4}px`:void 0},children:e});if(typeof document<"u"){const e=document.createElement("style");e.type="text/css",e.innerText=`@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } + }`,document.head.appendChild(e)}const Nln=[{id:"ia_12345",object:"internal_account",live_mode:!1,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),account_type:"checking",party_name:"My Company Inc.",party_type:"business",name:"Main Checking USD",account_details:[],routing_details:[],connection:{id:"conn_abc",object:"connection",live_mode:!1,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),discarded_at:null,vendor_id:"vend_1",vendor_customer_id:null,vendor_name:"Bank One"},currency:"USD",metadata:{},parent_account_id:null,counterparty_id:null},{id:"ia_67890",object:"internal_account",live_mode:!1,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),account_type:"savings",party_name:"My Company Inc.",party_type:"business",name:"Savings CAD",account_details:[],routing_details:[],connection:{id:"conn_def",object:"connection",live_mode:!1,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),discarded_at:null,vendor_id:"vend_2",vendor_customer_id:null,vendor_name:"Bank Two"},currency:"CAD",metadata:{},parent_account_id:null,counterparty_id:null}],Eln={ia_12345:[{id:"br_usd_1",object:"balance_report",live_mode:!1,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),balance_report_type:"real_time",as_of_date:"2024-01-26",as_of_time:"14:30:00",balances:[{amount:15e5,currency:"USD",balance_type:"current_available"},{amount:152e4,currency:"USD",balance_type:"current_ledger"},{amount:1e5,currency:"USD",balance_type:"opening_ledger"}],internal_account_id:"ia_12345"}],ia_67890:[{id:"br_cad_1",object:"balance_report",live_mode:!1,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),balance_report_type:"real_time",as_of_date:"2024-01-26",as_of_time:"14:30:00",balances:[{amount:5e5,currency:"CAD",balance_type:"current_available"},{amount:51e4,currency:"CAD",balance_type:"current_ledger"}],internal_account_id:"ia_67890"}]},fEe={listInternalAccounts:async()=>new Promise(e=>setTimeout(()=>e({data:Nln}),500)),listBalanceReports:async(e,t)=>new Promise(n=>setTimeout(()=>{let r=Eln[e]||[];t!=null&&t.balance_report_type&&(r=r.filter(o=>o.balance_report_type===t.balance_report_type)),t!=null&&t.per_page&&(r=r.slice(0,t.per_page)),n({data:r})},300))},ffe=()=>{const[e,t]=p.useState([]),[n,r]=p.useState({}),[o,i]=p.useState(!0),[a,l]=p.useState(null);p.useEffect(()=>{(async()=>{var f;try{i(!0),l(null);const m=(await fEe.listInternalAccounts()).data||[];t(m);const g={},b=m.map(async y=>{try{const v=await fEe.listBalanceReports(y.id,{per_page:1,balance_report_type:"real_time"});v.data&&v.data.length>0&&(g[y.id]=v.data[0])}catch(v){console.warn(`Failed to fetch balance report for account ${y.name} (${y.id}):`,v)}});await Promise.allSettled(b),r(g)}catch(h){console.error("Failed to fetch accounts data:",h);const m=((f=h.errors)==null?void 0:f.message)||h.message||h.message||"Failed to load accounts data.";l(m)}finally{i(!1)}})()},[]);const c=(d,f)=>{if(!d)return null;const h=d.balances.find(m=>m.balance_type===f);return h?h.amount:null},u=p.useMemo(()=>{const d={};return e.forEach(f=>{const h=f.currency;d[h]||(d[h]={available:0,ledger:0});const m=n[f.id],g=c(m,"current_available"),b=c(m,"current_ledger");g!==null&&(d[h].available+=g),b!==null&&(d[h].ledger+=b)}),Object.entries(d).map(([f,h])=>({currency:f,available_balance:h.available,current_ledger:h.ledger}))},[e,n]);return o?s.jsxs(qY,{p:4,children:[s.jsx(Sln,{}),s.jsx(LT,{mt:2,children:"Loading accounts overview..."})]}):a?s.jsx(qY,{p:4,children:s.jsx(Cln,{status:"error",children:s.jsxs(LT,{children:["Error: ",a]})})}):s.jsxs(qY,{p:4,className:"accounts-dashboard-view",children:[s.jsx(KY,{as:"h1",size:"xl",mb:6,children:"Accounts Dashboard"}),s.jsxs(dEe,{mb:6,children:[s.jsx(KY,{as:"h2",size:"lg",mb:4,children:"Total Balances Across Currencies"}),u.length>0?s.jsx(jln,{direction:"column",gap:2,children:u.map((d,f)=>s.jsxs(LT,{children:[s.jsxs("strong",{children:[d.currency,":"]})," Available ",(d.available_balance/100).toFixed(2)," | Ledger ",(d.current_ledger/100).toFixed(2)]},f))}):s.jsx(LT,{children:"No aggregated balances available."})]}),s.jsxs(dEe,{children:[s.jsx(KY,{as:"h2",size:"lg",mb:4,children:"Individual Internal Accounts"}),e.length>0?s.jsxs(_ln,{children:[s.jsx("thead",{style:{borderBottom:"1px solid #e0e0e0"},children:s.jsxs("tr",{children:[s.jsx("th",{style:{padding:"8px",textAlign:"left"},children:"Account Name"}),s.jsx("th",{style:{padding:"8px",textAlign:"left"},children:"Currency"}),s.jsx("th",{style:{padding:"8px",textAlign:"left"},children:"Account Type"}),s.jsx("th",{style:{padding:"8px",textAlign:"left"},children:"Bank/Vendor"}),s.jsx("th",{style:{padding:"8px",textAlign:"left"},children:"Available Balance"}),s.jsx("th",{style:{padding:"8px",textAlign:"left"},children:"Current Ledger"})]})}),s.jsx("tbody",{children:e.map(d=>{var g;const f=n[d.id],h=c(f,"current_available"),m=c(f,"current_ledger");return s.jsxs("tr",{style:{borderBottom:"1px solid #eee"},children:[s.jsx("td",{style:{padding:"8px"},children:d.name||d.id}),s.jsx("td",{style:{padding:"8px"},children:d.currency}),s.jsx("td",{style:{padding:"8px"},children:d.account_type||"N/A"}),s.jsx("td",{style:{padding:"8px"},children:((g=d.connection)==null?void 0:g.vendor_name)||"N/A"}),s.jsx("td",{style:{padding:"8px"},children:h!==null?`${(h/100).toFixed(2)} ${d.currency}`:"N/A"}),s.jsx("td",{style:{padding:"8px"},children:m!==null?`${(m/100).toFixed(2)} ${d.currency}`:"N/A"})]},d.id)})})]}):s.jsx(LT,{children:"No internal accounts found."})]})]})},Pln=Object.freeze(Object.defineProperty({__proto__:null,default:ffe},Symbol.toStringTag,{value:"Module"}));function Xo(e){const t=p.useRef(e);return t.current=e,p.useCallback((...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function Lp(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}const pEe=Lp()?p.useLayoutEffect:p.useEffect,ai=(e,t)=>{const n=p.useRef(!0);pEe(()=>e(n.current),t),pEe(()=>(n.current=!1,()=>{n.current=!0}),[])};function XM(e){const t=p.useRef(!1),[n,r]=p.useState(e);p.useEffect(()=>(t.current=!1,()=>{t.current=!0}),[]);function o(i,a){a&&t.current||r(i)}return[n,o]}function Ku(e,t){const[n,r]=p.useState(e),o=t!==void 0?t:n;return ai(i=>{i||r(t)},[t]),[o,r]}var YY={exports:{}},rs={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var hEe;function Iln(){if(hEe)return rs;hEe=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function b(y){if(typeof y=="object"&&y!==null){var v=y.$$typeof;switch(v){case e:switch(y=y.type,y){case n:case o:case r:case u:case d:return y;default:switch(y=y&&y.$$typeof,y){case l:case a:case c:case h:case f:case i:return y;default:return v}}case t:return v}}}return rs.ContextConsumer=a,rs.ContextProvider=i,rs.Element=e,rs.ForwardRef=c,rs.Fragment=n,rs.Lazy=h,rs.Memo=f,rs.Portal=t,rs.Profiler=o,rs.StrictMode=r,rs.Suspense=u,rs.SuspenseList=d,rs.isAsyncMode=function(){return!1},rs.isConcurrentMode=function(){return!1},rs.isContextConsumer=function(y){return b(y)===a},rs.isContextProvider=function(y){return b(y)===i},rs.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},rs.isForwardRef=function(y){return b(y)===c},rs.isFragment=function(y){return b(y)===n},rs.isLazy=function(y){return b(y)===h},rs.isMemo=function(y){return b(y)===f},rs.isPortal=function(y){return b(y)===t},rs.isProfiler=function(y){return b(y)===o},rs.isStrictMode=function(y){return b(y)===r},rs.isSuspense=function(y){return b(y)===u},rs.isSuspenseList=function(y){return b(y)===d},rs.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===o||y===r||y===u||y===d||y===m||typeof y=="object"&&y!==null&&(y.$$typeof===h||y.$$typeof===f||y.$$typeof===i||y.$$typeof===a||y.$$typeof===c||y.$$typeof===g||y.getModuleId!==void 0)},rs.typeOf=b,rs}var mEe;function Aln(){return mEe||(mEe=1,YY.exports=Iln()),YY.exports}var XY=Aln();function Mj(e,t,n){const r=p.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}const Tln=Symbol.for("react.element"),kln=Symbol.for("react.transitional.element"),Mln=Symbol.for("react.fragment");function TWe(e){return e&&typeof e=="object"&&(e.$$typeof===Tln||e.$$typeof===kln)&&e.type===Mln}const Rln=Number(p.version.split(".")[0]),gne=(e,t)=>{typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t)},hp=(...e)=>{const t=e.filter(Boolean);return t.length<=1?t[0]:n=>{e.forEach(r=>{gne(r,n)})}},ZI=(...e)=>Mj(()=>hp(...e),e,(t,n)=>t.length!==n.length||t.every((r,o)=>r!==n[o])),Hb=e=>{var n,r;if(!e)return!1;if(pfe(e)&&Rln>=19)return!0;const t=XY.isMemo(e)?e.type.type:e.type;return!(typeof t=="function"&&!((n=t.prototype)!=null&&n.render)&&t.$$typeof!==XY.ForwardRef||typeof e=="function"&&!((r=e.prototype)!=null&&r.render)&&e.$$typeof!==XY.ForwardRef)};function pfe(e){return p.isValidElement(e)&&!TWe(e)}const Oln=e=>pfe(e)&&Hb(e),oC=e=>{if(e&&pfe(e)){const t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function rp(e,t){let n=e;for(let r=0;r"u"?Object.keys:Reflect.ownKeys;function $ln(e,t={}){const{prepareArray:n}=t,r=n||(()=>[]);let o=gEe(e[0]);return e.forEach(i=>{function a(l,c){const u=new Set(c),d=rp(i,l),f=Array.isArray(d);if(f||Dln(d)){if(!u.has(d)){u.add(d);const h=rp(o,l);f?o=om(o,l,r(h,d)):(!h||typeof h!="object")&&(o=om(o,l,gEe(d))),Lln(d).forEach(m=>{a([...l,m],u)})}}else o=om(o,l,d)}a([])}),o}function h2(...e){return $ln(e)}let yne={};const Fln=e=>{};function Bln(e,t){}function zln(e,t){}function Hln(){yne={}}function MWe(e,t,n){!t&&!yne[n]&&(e(!1,n),yne[n]=!0)}function ic(e,t){MWe(Bln,e,t)}function Vln(e,t){MWe(zln,e,t)}ic.preMessage=Fln;ic.resetWarned=Hln;ic.noteOnce=Vln;function $l(e,t){const n=Object.assign({},e);return Array.isArray(t)&&t.forEach(r=>{delete n[r]}),n}function $p(e,t={}){let n=[];return Pe.Children.forEach(e,r=>{r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat($p(r)):TWe(r)&&r.props?n=n.concat($p(r.props.children,t)):n.push(r))}),n}function Uln(){}const Gln=p.createContext({}),Rj=()=>{const e=()=>{};return e.deprecated=Uln,e};function MP(e){return e instanceof HTMLElement||e instanceof SVGElement}function Wx(e){return e&&typeof e=="object"&&MP(e.nativeElement)?e.nativeElement:MP(e)?e:null}const bne=p.createContext(null);function Wln({children:e,onBatchResize:t}){const n=p.useRef(0),r=p.useRef([]),o=p.useContext(bne),i=p.useCallback((a,l,c)=>{n.current+=1;const u=n.current;r.current.push({size:a,element:l,data:c}),Promise.resolve().then(()=>{u===n.current&&(t==null||t(r.current),r.current=[])}),o==null||o(a,l,c)},[t,o]);return p.createElement(bne.Provider,{value:i},e)}const Zw=new Map;function qln(e){e.forEach(t=>{var r;const{target:n}=t;(r=Zw.get(n))==null||r.forEach(o=>o(n))})}let ZY;function RWe(){return ZY||(ZY=new ResizeObserver(qln)),ZY}function Kln(e,t){Zw.has(e)||(Zw.set(e,new Set),RWe().observe(e)),Zw.get(e).add(t)}function Yln(e,t){Zw.has(e)&&(Zw.get(e).delete(t),Zw.get(e).size||(RWe().unobserve(e),Zw.delete(e)))}function Xln(e,t){const{children:n,disabled:r}=e,o=p.useRef(null),i=p.useContext(bne),a=typeof n=="function",l=a?n(o):n,c=p.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!a&&p.isValidElement(l)&&Hb(l),d=u?oC(l):null,f=ZI(d,o),h=()=>Wx(o.current);p.useImperativeHandle(t,()=>h());const m=p.useRef(e);m.current=e;const g=p.useCallback(b=>{const{onResize:y,data:v}=m.current,{width:x,height:S}=b.getBoundingClientRect(),{offsetWidth:C,offsetHeight:_}=b,N=Math.floor(x),E=Math.floor(S);if(c.current.width!==N||c.current.height!==E||c.current.offsetWidth!==C||c.current.offsetHeight!==_){const I={width:N,height:E,offsetWidth:C,offsetHeight:_};c.current=I;const A=C===Math.round(x)?x:C,R=_===Math.round(S)?S:_,k={...I,offsetWidth:A,offsetHeight:R};i==null||i(k,b,v),y&&Promise.resolve().then(()=>{y(k,b)})}},[]);return p.useEffect(()=>{const b=h();return b&&!r&&Kln(b,g),()=>Yln(b,g)},[o.current,r]),u?p.cloneElement(l,{ref:f}):l}const Zln=p.forwardRef(Xln);function vne(){return vne=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const a=(o==null?void 0:o.key)||`${Jln}-${i}`;return p.createElement(Zln,vne({},e,{key:a,ref:i===0?t:void 0}),o)})}const Wg=p.forwardRef(Qln);Wg.Collection=Wln;function xne(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n+setTimeout(e,16),LWe=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(DWe=e=>window.requestAnimationFrame(e),LWe=e=>window.cancelAnimationFrame(e));let yEe=0;const hfe=new Map;function $We(e){hfe.delete(e)}const Ri=(e,t=1)=>{yEe+=1;const n=yEe;function r(o){if(o===0)$We(n),e();else{const i=DWe(()=>{r(o-1)});hfe.set(n,i)}}return r(t),n};Ri.cancel=e=>{const t=hfe.get(e);return $We(e),LWe(t)};const ZM="ant",RV="anticon",rcn=["outlined","borderless","filled","underlined"],ocn=(e,t)=>t||(e?`${ZM}-${e}`:ZM),Ho=p.createContext({getPrefixCls:ocn,iconPrefixCls:RV}),{Consumer:g8r}=Ho,bEe={};function cu(e){const t=p.useContext(Ho),{getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}=t,a=t[e];return{classNames:bEe,styles:bEe,...a,getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}}function A5(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function wne(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}const vEe="data-rc-order",xEe="data-rc-priority",icn="rc-util-key",Sne=new Map;function FWe({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:icn}function OV(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function acn(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function mfe(e){return Array.from((Sne.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function BWe(e,t={}){if(!Lp())return null;const{csp:n,prepend:r,priority:o=0}=t,i=acn(r),a=i==="prependQueue",l=document.createElement("style");l.setAttribute(vEe,i),a&&o&&l.setAttribute(xEe,`${o}`),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=e;const c=OV(t),{firstChild:u}=c;if(r){if(a){const d=(t.styles||mfe(c)).filter(f=>{if(!["prepend","prependQueue"].includes(f.getAttribute(vEe)))return!1;const h=Number(f.getAttribute(xEe)||0);return o>=h});if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function zWe(e,t={}){let{styles:n}=t;return n||(n=mfe(OV(t))),n.find(r=>r.getAttribute(FWe(t))===e)}function JM(e,t={}){const n=zWe(e,t);n&&OV(t).removeChild(n)}function scn(e,t){const n=Sne.get(e);if(!n||!wne(document,n)){const r=BWe("",t),{parentNode:o}=r;Sne.set(e,o),e.removeChild(r)}}function pS(e,t,n={}){var c,u,d;const r=OV(n),o=mfe(r),i={...n,styles:o};scn(r,i);const a=zWe(t,i);if(a)return(c=i.csp)!=null&&c.nonce&&a.nonce!==((u=i.csp)==null?void 0:u.nonce)&&(a.nonce=(d=i.csp)==null?void 0:d.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;const l=BWe(e,i);return l.setAttribute(FWe(i),t),l}function ey(e,t,n=!1){const r=new Set;function o(i,a,l=1){const c=r.has(i);if(ic(!c,"Warning: There may be circular references"),c)return!1;if(i===a)return!0;if(n&&l>1)return!1;r.add(i);const u=l+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return!1;for(let d=0;do(i[f],a[f],u))}return!1}return o(e,t)}const lcn="%";function Cne(e){return e.join(lcn)}let wEe=0;class ccn{constructor(t){Le(this,"instanceId");Le(this,"cache",new Map);Le(this,"updateTimes",new Map);Le(this,"extracted",new Set);this.instanceId=t}get(t){return this.opGet(Cne(t))}opGet(t){return this.cache.get(t)||null}update(t,n){return this.opUpdate(Cne(t),n)}opUpdate(t,n){const r=this.cache.get(t),o=n(r);o===null?(this.cache.delete(t),this.updateTimes.delete(t)):(this.cache.set(t,o),this.updateTimes.set(t,wEe),wEe+=1)}}const gfe="data-token-hash",Ex="data-css-hash",Jw="__cssinjs_instance__";function ucn(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${Ex}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(o=>{o[Jw]=o[Jw]||e,o[Jw]===e&&document.head.insertBefore(o,n)});const r={};Array.from(document.querySelectorAll(`style[${Ex}]`)).forEach(o=>{var a;const i=o.getAttribute(Ex);r[i]?o[Jw]===e&&((a=o.parentNode)==null||a.removeChild(o)):r[i]=!0})}return new ccn(e)}const SO=p.createContext({hashPriority:"low",cache:ucn(),defaultCache:!0,autoPrefix:!1});function dcn(e,t){if(e.length!==t.length)return!1;for(let n=0;n{var i;r?r=(i=r==null?void 0:r.map)==null?void 0:i.get(o):r=void 0}),r!=null&&r.value&&n&&(r.value[1]=this.cacheCallTimes++),r==null?void 0:r.value}get(t){var n;return(n=this.internalGet(t,!0))==null?void 0:n[0]}has(t){return!!this.internalGet(t)}set(t,n){if(!this.has(t)){if(this.size()+1>y5.MAX_CACHE_SIZE+y5.MAX_CACHE_OFFSET){const[o]=this.keys.reduce((i,a)=>{const[,l]=i;return this.internalGet(a)[1]{if(i===t.length-1)r.set(o,{value:[n,this.cacheCallTimes++]});else{const a=r.get(o);a?a.map||(a.map=new Map):r.set(o,{map:new Map}),r=r.get(o).map}})}deleteByPath(t,n){var i;const r=t.get(n[0]);if(n.length===1)return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),(i=r.value)==null?void 0:i[0];const o=this.deleteByPath(r.map,n.slice(1));return(!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),o}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!dcn(n,t)),this.deleteByPath(this.cache,t)}};Le(y5,"MAX_CACHE_SIZE",20),Le(y5,"MAX_CACHE_OFFSET",5);let _ne=y5,SEe=0;class HWe{constructor(t){Le(this,"derivatives");Le(this,"id");this.derivatives=Array.isArray(t)?t:[t],this.id=SEe,t.length===0&&(t.length>0,void 0),SEe+=1}getDerivativeToken(t){return this.derivatives.reduce((n,r)=>r(t,n),void 0)}}const JY=new _ne;function jne(e){const t=Array.isArray(e)?e:[e];return JY.has(t)||JY.set(t,new HWe(t)),JY.get(t)}const fcn=new WeakMap,QY={};function pcn(e,t){let n=fcn;for(let r=0;r{const r=e[n];t+=n,r instanceof HWe?t+=r.id:r&&typeof r=="object"?t+=j4(r):t+=r}),t=A5(t),CEe.set(e,t)),t}function hcn(e,t){return A5(`${t}_${j4(e)}`)}const Nne=Lp();function en(e){return typeof e=="number"?`${e}px`:e}function mcn(e){const{hashCls:t,hashPriority:n="low"}=e||{};if(!t)return"";const r=`.${t}`;return n==="low"?`:where(${r})`:r}const v8=(e,t="")=>`--${t?`${t}-`:""}${e}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase(),gcn=(e,t,n)=>{const{hashCls:r,hashPriority:o="low"}=n||{};return Object.keys(e).length?`${mcn({hashCls:r,hashPriority:o})}.${t}${n!=null&&n.scope?`.${n.scope}`:""}{${Object.entries(e).map(([i,a])=>`${i}:${a};`).join("")}}`:""},VWe=(e,t,n)=>{const{hashCls:r,hashPriority:o="low",prefix:i,unitless:a,ignore:l,preserve:c}=n||{},u={},d={};return Object.entries(e).forEach(([f,h])=>{if(c!=null&&c[f])d[f]=h;else if((typeof h=="string"||typeof h=="number")&&!(l!=null&&l[f])){const m=v8(f,i);u[m]=typeof h=="number"&&!(a!=null&&a[f])?`${h}px`:String(h),d[f]=`var(${m})`}}),[d,gcn(u,t,{scope:n==null?void 0:n.scope,hashCls:r,hashPriority:o})]},r6=new Map;function yfe(e,t,n,r,o){const{cache:i}=p.useContext(SO),a=[e,...t],l=Cne(a),c=f=>{i.opUpdate(l,h=>{const[m=0,g]=h||[void 0,void 0],y=g||n(),v=[m,y];return f?f(v):v})};p.useMemo(()=>{c()},[l]);const d=i.opGet(l)[1];return p.useInsertionEffect(()=>(c(([f,h])=>[f+1,h]),r6.has(l)||(o==null||o(d),r6.set(l,!0),Promise.resolve().then(()=>{r6.delete(l)})),()=>{i.opUpdate(l,f=>{const[h=0,m]=f||[];return h-1===0?(r==null||r(m,!1),r6.delete(l),null):[h-1,m]})}),[l]),d}const ycn={},bcn="css",m2=new Map;function vcn(e){m2.set(e,(m2.get(e)||0)+1)}function xcn(e,t){typeof document<"u"&&document.querySelectorAll(`style[${gfe}="${e}"]`).forEach(r=>{var o;r[Jw]===t&&((o=r.parentNode)==null||o.removeChild(r))})}const wcn=-1;function Scn(e,t){m2.set(e,(m2.get(e)||0)-1);const n=new Set;m2.forEach((r,o)=>{r<=0&&n.add(o)}),m2.size-n.size>wcn&&n.forEach(r=>{xcn(r,t),m2.delete(r)})}const Ccn=(e,t,n,r)=>{let i={...n.getDerivativeToken(e),...t};return r&&(i=r(i)),i},_cn="token";function jcn(e,t,n){const{cache:{instanceId:r},container:o,hashPriority:i}=p.useContext(SO),{salt:a="",override:l=ycn,formatToken:c,getComputedToken:u,cssVar:d}=n,f=pcn(()=>Object.assign({},...t),t),h=j4(f),m=j4(l),g=j4(d);return yfe(_cn,[a,e.id,h,m,g],()=>{const y=u?u(f,l,e):Ccn(f,l,e,c),v={...y},x=`${a}_${d.prefix}`,S=A5(x),C=`${bcn}-${A5(x)}`;v._tokenKey=hcn(v,x);const[_,N]=VWe(y,d.key,{prefix:d.prefix,ignore:d.ignore,unitless:d.unitless,preserve:d.preserve,hashPriority:i,hashCls:d.hashed?C:void 0});return _._hashId=S,vcn(d.key),[_,C,v,N,d.key]},([,,,,y])=>{Scn(y,r)},([,,,y,v])=>{if(!y)return;const x=pS(y,A5(`css-var-${v}`),{mark:Ex,prepend:"queue",attachTo:o,priority:-999});x[Jw]=r,x.setAttribute(gfe,v)})}var Ncn={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Pl="-ms-",N4="-moz-",qa="-webkit-",UWe="comm",bfe="rule",vfe="decl",Ecn="@import",Pcn="@namespace",GWe="@keyframes",Icn="@layer",WWe=Math.abs,xfe=String.fromCharCode,Ene=Object.assign;function Acn(e,t){return bd(e,0)^45?(((t<<2^bd(e,0))<<2^bd(e,1))<<2^bd(e,2))<<2^bd(e,3):0}function qWe(e){return e.trim()}function Xv(e,t){return(e=t.exec(e))?e[0]:e}function vi(e,t,n){return e.replace(t,n)}function x8(e,t,n){return e.indexOf(t,n)}function bd(e,t){return e.charCodeAt(t)|0}function V_(e,t,n){return e.slice(t,n)}function _0(e){return e.length}function KWe(e){return e.length}function Fk(e,t){return t.push(e),e}function Tcn(e,t){return e.map(t).join("")}function _Ee(e,t){return e.filter(function(n){return!Xv(n,t)})}var DV=1,RP=1,YWe=0,Dg=0,Gu=0,JI="";function LV(e,t,n,r,o,i,a,l){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:DV,column:RP,length:a,return:"",siblings:l}}function hw(e,t){return Ene(LV("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function UN(e){for(;e.root;)e=hw(e.root,{children:[e]});Fk(e,e.siblings)}function kcn(){return Gu}function Mcn(){return Gu=Dg>0?bd(JI,--Dg):0,RP--,Gu===10&&(RP=1,DV--),Gu}function G0(){return Gu=Dg2||QM(Gu)>3?"":" "}function Lcn(e,t){for(;--t&&G0()&&!(Gu<48||Gu>102||Gu>57&&Gu<65||Gu>70&&Gu<97););return $V(e,w8()+(t<6&&Qw()==32&&G0()==32))}function Pne(e){for(;G0();)switch(Gu){case e:return Dg;case 34:case 39:e!==34&&e!==39&&Pne(Gu);break;case 40:e===41&&Pne(e);break;case 92:G0();break}return Dg}function $cn(e,t){for(;G0()&&e+Gu!==57;)if(e+Gu===84&&Qw()===47)break;return"/*"+$V(t,Dg-1)+"*"+xfe(e===47?e:G0())}function Fcn(e){for(;!QM(Qw());)G0();return $V(e,Dg)}function jEe(e){return Ocn(S8("",null,null,null,[""],e=Rcn(e),0,[0],e))}function S8(e,t,n,r,o,i,a,l,c){for(var u=0,d=0,f=a,h=0,m=0,g=0,b=1,y=1,v=1,x=0,S="",C=o,_=i,N=r,E=S;y;)switch(g=x,x=G0()){case 40:if(g!=108&&bd(E,f-1)==58){x8(E+=vi(eX(x),"&","&\f"),"&\f",WWe(u?l[u-1]:0))!=-1&&(v=-1);break}case 34:case 39:case 91:E+=eX(x);break;case 9:case 10:case 13:case 32:E+=Dcn(g);break;case 92:E+=Lcn(w8()-1,7);continue;case 47:switch(Qw()){case 42:case 47:Fk(Bcn($cn(G0(),w8()),t,n,c),c),(QM(g||1)==5||QM(Qw()||1)==5)&&_0(E)&&V_(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*b:l[u++]=_0(E)*v;case 125*b:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+d:v==-1&&(E=vi(E,/\f/g,"")),m>0&&(_0(E)-f||b===0&&g===47)&&Fk(m>32?EEe(E+";",r,n,f-1,c):EEe(vi(E," ","")+";",r,n,f-2,c),c);break;case 59:E+=";";default:if(Fk(N=NEe(E,t,n,u,d,o,l,S,C=[],_=[],f,i),i),x===123)if(d===0)S8(E,t,N,N,C,i,f,l,_);else{switch(h){case 99:if(bd(E,3)===110)break;case 108:if(bd(E,2)===97)break;default:d=0;case 100:case 109:case 115:}d?S8(e,N,N,r&&Fk(NEe(e,N,N,0,0,o,l,S,o,C=[],f,_),_),o,_,f,l,r?C:_):S8(E,N,N,N,[""],_,0,l,_)}}u=d=m=0,b=v=1,S=E="",f=a;break;case 58:f=1+_0(E),m=g;default:if(b<1){if(x==123)--b;else if(x==125&&b++==0&&Mcn()==125)continue}switch(E+=xfe(x),x*b){case 38:v=d>0?1:(E+="\f",-1);break;case 44:l[u++]=(_0(E)-1)*v,v=1;break;case 64:Qw()===45&&(E+=eX(G0())),h=Qw(),d=f=_0(S=E+=Fcn(w8())),x++;break;case 45:g===45&&_0(E)==2&&(b=0)}}return i}function NEe(e,t,n,r,o,i,a,l,c,u,d,f){for(var h=o-1,m=o===0?i:[""],g=KWe(m),b=0,y=0,v=0;b0?m[x]+" "+S:vi(S,/&\f/g,m[x])))&&(c[v++]=C);return LV(e,t,n,o===0?bfe:l,c,u,d,f)}function Bcn(e,t,n,r){return LV(e,t,n,UWe,xfe(kcn()),V_(e,2,-2),0,r)}function EEe(e,t,n,r,o){return LV(e,t,n,vfe,V_(e,0,r),V_(e,r+1,-1),r,o)}function XWe(e,t,n){switch(Acn(e,t)){case 5103:return qa+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return qa+e+e;case 4855:return qa+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return N4+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return qa+e+N4+e+Pl+e+e;case 5936:switch(bd(e,t+11)){case 114:return qa+e+Pl+vi(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return qa+e+Pl+vi(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return qa+e+Pl+vi(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return qa+e+Pl+e+e;case 6165:return qa+e+Pl+"flex-"+e+e;case 5187:return qa+e+vi(e,/(\w+).+(:[^]+)/,qa+"box-$1$2"+Pl+"flex-$1$2")+e;case 5443:return qa+e+Pl+"flex-item-"+vi(e,/flex-|-self/g,"")+(Xv(e,/flex-|baseline/)?"":Pl+"grid-row-"+vi(e,/flex-|-self/g,""))+e;case 4675:return qa+e+Pl+"flex-line-pack"+vi(e,/align-content|flex-|-self/g,"")+e;case 5548:return qa+e+Pl+vi(e,"shrink","negative")+e;case 5292:return qa+e+Pl+vi(e,"basis","preferred-size")+e;case 6060:return qa+"box-"+vi(e,"-grow","")+qa+e+Pl+vi(e,"grow","positive")+e;case 4554:return qa+vi(e,/([^-])(transform)/g,"$1"+qa+"$2")+e;case 6187:return vi(vi(vi(e,/(zoom-|grab)/,qa+"$1"),/(image-set)/,qa+"$1"),e,"")+e;case 5495:case 3959:return vi(e,/(image-set\([^]*)/,qa+"$1$`$1");case 4968:return vi(vi(e,/(.+:)(flex-)?(.*)/,qa+"box-pack:$3"+Pl+"flex-pack:$3"),/space-between/,"justify")+qa+e+e;case 4200:if(!Xv(e,/flex-|baseline/))return Pl+"grid-column-align"+V_(e,t)+e;break;case 2592:case 3360:return Pl+vi(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,o){return t=o,Xv(r.props,/grid-\w+-end/)})?~x8(e+(n=n[t].value),"span",0)?e:Pl+vi(e,"-start","")+e+Pl+"grid-row-span:"+(~x8(n,"span",0)?Xv(n,/\d+/):+Xv(n,/\d+/)-+Xv(e,/\d+/))+";":Pl+vi(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return Xv(r.props,/grid-\w+-start/)})?e:Pl+vi(vi(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return vi(e,/(.+)-inline(.+)/,qa+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(_0(e)-1-t>6)switch(bd(e,t+1)){case 109:if(bd(e,t+4)!==45)break;case 102:return vi(e,/(.+:)(.+)-([^]+)/,"$1"+qa+"$2-$3$1"+N4+(bd(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~x8(e,"stretch",0)?XWe(vi(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return vi(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,o,i,a,l,c,u){return Pl+o+":"+i+u+(a?Pl+o+"-span:"+(l?c:+c-+i)+u:"")+e});case 4949:if(bd(e,t+6)===121)return vi(e,":",":"+qa)+e;break;case 6444:switch(bd(e,bd(e,14)===45?18:11)){case 120:return vi(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+qa+(bd(e,14)===45?"inline-":"")+"box$3$1"+qa+"$2$3$1"+Pl+"$2box$3")+e;case 100:return vi(e,":",":"+Pl)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return vi(e,"scroll-","scroll-snap-")+e}return e}function eR(e,t){for(var n="",r=0;r-1&&!e.return)switch(e.type){case vfe:e.return=XWe(e.value,e.length,n);return;case GWe:return eR([hw(e,{value:vi(e.value,"@","@"+qa)})],r);case bfe:if(e.length)return Tcn(n=e.props,function(o){switch(Xv(o,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":UN(hw(e,{props:[vi(o,/:(read-\w+)/,":"+N4+"$1")]})),UN(hw(e,{props:[o]})),Ene(e,{props:_Ee(n,r)});break;case"::placeholder":UN(hw(e,{props:[vi(o,/:(plac\w+)/,":"+qa+"input-$1")]})),UN(hw(e,{props:[vi(o,/:(plac\w+)/,":"+N4+"$1")]})),UN(hw(e,{props:[vi(o,/:(plac\w+)/,Pl+"input-$1")]})),UN(hw(e,{props:[o]})),Ene(e,{props:_Ee(n,r)});break}return""})}}const IEe="data-ant-cssinjs-cache-path",ZWe="_FILE_STYLE__";let l_,JWe=!0;function Vcn(){var e;if(!l_&&(l_={},Lp())){const t=document.createElement("div");t.className=IEe,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);let n=getComputedStyle(t).content||"";n=n.replace(/^"/,"").replace(/"$/,""),n.split(";").forEach(o=>{const[i,a]=o.split(":");l_[i]=a});const r=document.querySelector(`style[${IEe}]`);r&&(JWe=!1,(e=r.parentNode)==null||e.removeChild(r)),document.body.removeChild(t)}}function Ucn(e){return Vcn(),!!l_[e]}function Gcn(e){const t=l_[e];let n=null;if(t&&Lp())if(JWe)n=ZWe;else{const r=document.querySelector(`style[${Ex}="${l_[e]}"]`);r?n=r.innerHTML:delete l_[e]}return[n,t]}const Wcn="_skip_check_",QWe="_multi_value_";function tX(e,t){return(t?eR(jEe(e),zcn([Hcn,PEe])):eR(jEe(e),PEe)).replace(/\{%%%\:[^;];}/g,";")}function qcn(e){return typeof e=="object"&&e&&(Wcn in e||QWe in e)}function AEe(e,t,n){if(!t)return e;const r=`.${t}`,o=n==="low"?`:where(${r})`:r;return e.split(",").map(a=>{var d;const l=a.trim().split(/\s+/);let c=l[0]||"";const u=((d=c.match(/^\w+/))==null?void 0:d[0])||"";return c=`${u}${o}${c.slice(u.length)}`,[c,...l.slice(1)].join(" ")}).join(",")}const Ine=(e,t={},{root:n,injectHash:r,parentSelectors:o}={root:!0,parentSelectors:[]})=>{const{hashId:i,layer:a,path:l,hashPriority:c,transformers:u=[],linters:d=[]}=t;let f="",h={};function m(y){const v=y.getName(i);if(!h[v]){const[x]=Ine(y.style,t,{root:!1,parentSelectors:o});h[v]=`@keyframes ${y.getName(i)}${x}`}}function g(y,v=[]){return y.forEach(x=>{Array.isArray(x)?g(x,v):x&&v.push(x)}),v}return g(Array.isArray(e)?e:[e]).forEach(y=>{const v=typeof y=="string"&&!n?{}:y;if(typeof v=="string")f+=`${v} +`;else if(v._keyframe)m(v);else{const x=u.reduce((S,C)=>{var _;return((_=C==null?void 0:C.visit)==null?void 0:_.call(C,S))||S},v);Object.keys(x).forEach(S=>{const C=x[S];if(typeof C=="object"&&C&&(S!=="animationName"||!C._keyframe)&&!qcn(C)){let _=!1,N=S.trim(),E=!1;(n||r)&&i?N.startsWith("@")?_=!0:N==="&"?N=AEe("",i,c):N=AEe(S,i,c):n&&!i&&(N==="&"||N==="")&&(N="",E=!0);const[I,A]=Ine(C,t,{root:E,injectHash:_,parentSelectors:[...o,N]});h={...h,...A},f+=`${N}${I}`}else{let _=function(E,I){const A=E.replace(/[A-Z]/g,k=>`-${k.toLowerCase()}`);let R=I;!Ncn[E]&&typeof R=="number"&&R!==0&&(R=`${R}px`),E==="animationName"&&(I!=null&&I._keyframe)&&(m(I),R=I.getName(i)),f+=`${A}:${R};`};const N=(C==null?void 0:C.value)??C;typeof C=="object"&&(C!=null&&C[QWe])&&Array.isArray(N)?N.forEach(E=>{_(S,E)}):_(S,N)}})}}),n?a&&(f&&(f=`@layer ${a.name} {${f}}`),a.dependencies&&(h[`@layer ${a.name}`]=a.dependencies.map(y=>`@layer ${y}, ${a.name};`).join(` +`))):f=`{${f}}`,[f,h]};function eqe(e,t){return A5(`${e.join("%")}${t}`)}const Kcn="style";function Ane(e,t){const{path:n,hashId:r,layer:o,nonce:i,clientOnly:a,order:l=0}=e,{mock:c,hashPriority:u,container:d,transformers:f,linters:h,cache:m,layer:g,autoPrefix:b}=p.useContext(SO),y=[r||""];g&&y.push("layer"),y.push(...n);let v=Nne;yfe(Kcn,y,()=>{const x=y.join("|");if(Ucn(x)){const[I,A]=Gcn(x);if(I)return[I,A,{},a,l]}const S=t(),[C,_]=Ine(S,{hashId:r,hashPriority:u,layer:g?o:void 0,path:n.join("-"),transformers:f,linters:h}),N=tX(C,b||!1),E=eqe(y,N);return[N,E,_,a,l]},(x,S)=>{const[,C]=x;S&&Nne&&JM(C,{mark:Ex,attachTo:d})},x=>{const[S,C,_,,N]=x;if(v&&S!==ZWe){const E={mark:Ex,prepend:g?!1:"queue",attachTo:d,priority:N},I=typeof i=="function"?i():i;I&&(E.csp={nonce:I});const A=[],R=[];Object.keys(_).forEach(T=>{T.startsWith("@layer")?A.push(T):R.push(T)}),A.forEach(T=>{pS(tX(_[T],b||!1),`_layer-${T}`,{...E,prepend:!0})});const k=pS(S,C,E);k[Jw]=m.instanceId,R.forEach(T=>{pS(tX(_[T],b||!1),`_effect-${T}`,E)})}})}const Ycn="cssVar",Xcn=(e,t)=>{const{key:n,prefix:r,unitless:o,ignore:i,token:a,hashId:l,scope:c=""}=e,{cache:{instanceId:u},container:d,hashPriority:f}=p.useContext(SO),{_tokenKey:h}=a,m=[...e.path,n,c,h];return yfe(Ycn,m,()=>{const b=t(),[y,v]=VWe(b,n,{prefix:r,unitless:o,ignore:i,scope:c,hashPriority:f,hashCls:l}),x=eqe(m,v);return[y,v,x,n]},([,,b])=>{Nne&&JM(b,{mark:Ex,attachTo:d})},([,b,y])=>{if(!b)return;const v=pS(b,y,{mark:Ex,prepend:"queue",attachTo:d,priority:-999});v[Jw]=u,v.setAttribute(gfe,n)})};class Ca{constructor(t,n){Le(this,"name");Le(this,"style");Le(this,"_keyframe",!0);this.name=t,this.style=n}getName(t=""){return t?`${t}-${this.name}`:this.name}}function GN(e){return e.notSplit=!0,e}GN(["borderTop","borderBottom"]),GN(["borderTop"]),GN(["borderBottom"]),GN(["borderLeft","borderRight"]),GN(["borderLeft"]),GN(["borderRight"]);function Zcn(e){if(Array.isArray(e))return e}function Jcn(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,o=d}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}function Qcn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _m(e,t){return Zcn(e)||Jcn(e,t)||OWe(e,t)||Qcn()}function Cc(e,t,n){return(t=L_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TEe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Fr(e){for(var t=1;t1e4){var r=Date.now();this.lastAccessBeat.forEach(function(o,i){r-o>lun&&(n.map.delete(i),n.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),e})(),LEe=new cun;function uun(e,t){return Pe.useMemo(function(){var n=LEe.get(t);if(n)return n;var r=e();return LEe.set(t,r),r},t)}var dun=function(){return{}};function fun(e){var t=e.useCSP,n=t===void 0?dun:t,r=e.useToken,o=e.usePrefix,i=e.getResetStyles,a=e.getCommonStyle,l=e.getCompUnitless;function c(h,m,g,b){var y=Array.isArray(h)?h[0]:h;function v(I){return"".concat(String(y)).concat(I.slice(0,1).toUpperCase()).concat(I.slice(1))}var x=(b==null?void 0:b.unitless)||{},S=typeof l=="function"?l(h):{},C=Fr(Fr({},S),{},Cc({},v("zIndexPopup"),!0));Object.keys(x).forEach(function(I){C[v(I)]=x[I]});var _=Fr(Fr({},b),{},{unitless:C,prefixToken:v}),N=d(h,m,g,_),E=u(y,g,_);return function(I){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I,R=N(I,A),k=E(A);return[R,k]}}function u(h,m,g){var b=g.unitless,y=g.prefixToken,v=g.ignore;return function(x){var S=r(),C=S.cssVar,_=S.realToken;return Xcn({path:[h],prefix:C.prefix,key:C.key,unitless:b,ignore:v,token:_,scope:x},function(){var N=DEe(h,_,m),E=REe(h,_,N,{deprecatedTokens:g==null?void 0:g.deprecatedTokens});return N&&Object.keys(N).forEach(function(I){E[y(I)]=E[I],delete E[I]}),E}),C==null?void 0:C.key}}function d(h,m,g){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},y=Array.isArray(h)?h:[h,h],v=_m(y,1),x=v[0],S=y.join("-"),C=e.layer||{name:"antd"};return function(_){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_,E=r(),I=E.theme,A=E.realToken,R=E.hashId,k=E.token,T=E.cssVar,D=E.zeroRuntime,O=p.useMemo(function(){return D},[]);if(O)return R;var z=o(),F=z.rootPrefixCls,U=z.iconPrefixCls,G=n(),W="css",Y=uun(function(){var Z=new Set;return Object.keys(b.unitless||{}).forEach(function(J){Z.add(v8(J,T.prefix)),Z.add(v8(J,MEe(x,T.prefix)))}),oun(W,Z)},[W,x,T==null?void 0:T.prefix]),B=sun(),$=B.max,K=B.min,q={theme:I,token:k,hashId:R,nonce:function(){return G.nonce},clientOnly:b.clientOnly,layer:C,order:b.order||-999};return typeof i=="function"&&Ane(Fr(Fr({},q),{},{clientOnly:!1,path:["Shared",F]}),function(){return i(k,{prefix:{rootPrefixCls:F,iconPrefixCls:U},csp:G})}),Ane(Fr(Fr({},q),{},{path:[S,_,U]}),function(){if(b.injectStyle===!1)return[];var Z=aun(k),J=Z.token,oe=Z.flush,de=DEe(x,A,g),ae=".".concat(_),ue=REe(x,A,de,{deprecatedTokens:b.deprecatedTokens});de&&Ro(de)==="object"&&Object.keys(de).forEach(function(fe){de[fe]="var(".concat(v8(fe,MEe(x,T.prefix)),")")});var ce=hs(J,{componentCls:ae,prefixCls:_,iconCls:".".concat(U),antCls:".".concat(F),calc:Y,max:$,min:K},de),se=m(ce,{hashId:R,prefixCls:_,rootPrefixCls:F,iconPrefixCls:U});oe(x,ue);var me=typeof a=="function"?a(ce,_,N,b.resetFont):null;return[b.resetStyle===!1?null:me,se]}),R}}function f(h,m,g){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},y=d(h,m,g,Fr({resetStyle:!1,order:-998},b)),v=function(S){var C=S.prefixCls,_=S.rootCls,N=_===void 0?C:_;return y(C,N),null};return v}return{genStyleHooks:c,genSubStyleComponent:f,genComponentStyleHook:d}}const U_=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function C8(e){return(e+8)/e}function pun(e){const t=Array.from({length:10}).map((n,r)=>{const o=r-1,i=e*Math.E**(o/5),a=r>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:C8(n)}))}const hun="6.1.0",rqe={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},nR={...rqe,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, +'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', +'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0},mun={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},Bd=Math.round;function rX(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const $Ee=(e,t,n)=>n===0?e:e/100;function $T(e,t){const n=t||255;return e>n?n:e<0?0:e}class Xa{constructor(t){Le(this,"isValid",!0);Le(this,"r",0);Le(this,"g",0);Le(this,"b",0);Le(this,"a",1);Le(this,"_h");Le(this,"_s");Le(this,"_l");Le(this,"_v");Le(this,"_max");Le(this,"_min");Le(this,"_brightness");function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let o=function(i){return r.startsWith(i)};const r=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(r))this.fromHexString(r);else if(o("rgb"))this.fromRgbString(r);else if(o("hsl"))this.fromHslString(r);else if(o("hsv")||o("hsb"))this.fromHsvString(r);else{const i=mun[r.toLowerCase()];i&&this.fromHexString(parseInt(i,36).toString(16).padStart(6,"0"))}}else if(t instanceof Xa)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=$T(t.r),this.g=$T(t.g),this.b=$T(t.b),this.a=typeof t.a=="number"?$T(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(i){const a=i/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),o=t(this.b);return .2126*n+.7152*r+.0722*o}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Bd(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:n,s:r,l:o,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:n,s:r,l:o,a:this.a})}mix(t,n=50){const r=this._c(t),o=n/100,i=l=>(r[l]-this[l])*o+this[l],a={r:Bd(i("r")),g:Bd(i("g")),b:Bd(i("b")),a:Bd(i("a")*100)/100};return this._c(a)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),o=i=>Bd((this[i]*this.a+n[i]*n.a*(1-this.a))/r);return this._c({r:o("r"),g:o("g"),b:o("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=Bd(this.a*255).toString(16);t+=i.length===2?i:"0"+i}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Bd(this.getSaturation()*100),r=Bd(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const o=this.clone();return o[t]=$T(n,r),o}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(o,i){return parseInt(n[o]+n[i||o],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a:o}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof o=="number"?o:1,n<=0){const h=Bd(r*255);this.r=h,this.g=h,this.b=h}let i=0,a=0,l=0;const c=t/60,u=(1-Math.abs(2*r-1))*n,d=u*(1-Math.abs(c%2-1));c>=0&&c<1?(i=u,a=d):c>=1&&c<2?(i=d,a=u):c>=2&&c<3?(a=u,l=d):c>=3&&c<4?(a=d,l=u):c>=4&&c<5?(i=d,l=u):c>=5&&c<6&&(i=u,l=d);const f=r-u/2;this.r=Bd((i+f)*255),this.g=Bd((a+f)*255),this.b=Bd((l+f)*255)}fromHsv({h:t,s:n,v:r,a:o}){this._h=t%360,this._s=n,this._v=r,this.a=typeof o=="number"?o:1;const i=Bd(r*255);if(this.r=i,this.g=i,this.b=i,n<=0)return;const a=t/60,l=Math.floor(a),c=a-l,u=Bd(r*(1-n)*255),d=Bd(r*(1-n*c)*255),f=Bd(r*(1-n*(1-c))*255);switch(l){case 0:this.g=f,this.b=u;break;case 1:this.r=d,this.b=u;break;case 2:this.r=u,this.b=f;break;case 3:this.r=u,this.g=d;break;case 4:this.r=f,this.g=u;break;case 5:default:this.g=u,this.b=d;break}}fromHsvString(t){const n=rX(t,$Ee);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=rX(t,$Ee);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=rX(t,(r,o)=>o.includes("%")?Bd(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}const o6=2,FEe=.16,gun=.05,yun=.05,bun=.15,oqe=5,iqe=4,vun=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function BEe(e,t,n){let r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-o6*t:Math.round(e.h)+o6*t:r=n?Math.round(e.h)+o6*t:Math.round(e.h)-o6*t,r<0?r+=360:r>=360&&(r-=360),r}function zEe(e,t,n){if(e.h===0&&e.s===0)return e.s;let r;return n?r=e.s-FEe*t:t===iqe?r=e.s+FEe:r=e.s+gun*t,r>1&&(r=1),n&&t===oqe&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function HEe(e,t,n){let r;return n?r=e.v+yun*t:r=e.v-bun*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function _fe(e,t={}){const n=[],r=new Xa(e),o=r.toHsv();for(let i=oqe;i>0;i-=1){const a=new Xa({h:BEe(o,i,!0),s:zEe(o,i,!0),v:HEe(o,i,!0)});n.push(a)}n.push(r);for(let i=1;i<=iqe;i+=1){const a=new Xa({h:BEe(o,i),s:zEe(o,i),v:HEe(o,i)});n.push(a)}return t.theme==="dark"?vun.map(({index:i,amount:a})=>new Xa(t.backgroundColor||"#141414").mix(n[i],a).toHexString()):n.map(i=>i.toHexString())}const oX={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},kne=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];kne.primary=kne[5];const Mne=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Mne.primary=Mne[5];const Rne=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Rne.primary=Rne[5];const UB=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];UB.primary=UB[5];const One=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];One.primary=One[5];const Dne=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Dne.primary=Dne[5];const Lne=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Lne.primary=Lne[5];const $ne=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];$ne.primary=$ne[5];const GB=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];GB.primary=GB[5];const Fne=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Fne.primary=Fne[5];const Bne=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Bne.primary=Bne[5];const zne=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];zne.primary=zne[5];const Hne=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Hne.primary=Hne[5];const iX={red:kne,volcano:Mne,orange:Rne,gold:UB,yellow:One,lime:Dne,green:Lne,cyan:$ne,blue:GB,geekblue:Fne,purple:Bne,magenta:zne,grey:Hne};function xun(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:o,colorError:i,colorInfo:a,colorPrimary:l,colorBgBase:c,colorTextBase:u}=e,d=t(l),f=t(r),h=t(o),m=t(i),g=t(a),b=n(c,u),y=e.colorLink||e.colorInfo,v=t(y),x=new Xa(m[1]).mix(new Xa(m[3]),50).toHexString();return{...b,colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBgFilledHover:x,colorErrorBgActive:m[3],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:g[1],colorInfoBgHover:g[2],colorInfoBorder:g[3],colorInfoBorderHover:g[4],colorInfoHover:g[4],colorInfo:g[6],colorInfoActive:g[7],colorInfoTextHover:g[8],colorInfoText:g[9],colorInfoTextActive:g[10],colorLinkHover:v[4],colorLink:v[6],colorLinkActive:v[7],colorBgMask:new Xa("#000").setA(.45).toRgbString(),colorWhite:"#fff"}}const wun=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}};function Sun(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return{motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:o+1,...wun(r)}}const Cun=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},_un=e=>{const t=pun(e),n=t.map(d=>d.size),r=t.map(d=>d.lineHeight),o=n[1],i=n[0],a=n[2],l=r[1],c=r[0],u=r[2];return{fontSizeSM:i,fontSize:o,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:l,lineHeightLG:u,lineHeightSM:c,fontHeight:Math.round(l*o),fontHeightLG:Math.round(u*a),fontHeightSM:Math.round(c*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function jun(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const Ym=(e,t)=>new Xa(e).setA(t).toRgbString(),WN=(e,t)=>new Xa(e).darken(t).toHexString(),Nun=e=>{const t=_fe(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},Eun=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:Ym(r,.88),colorTextSecondary:Ym(r,.65),colorTextTertiary:Ym(r,.45),colorTextQuaternary:Ym(r,.25),colorFill:Ym(r,.15),colorFillSecondary:Ym(r,.06),colorFillTertiary:Ym(r,.04),colorFillQuaternary:Ym(r,.02),colorBgSolid:Ym(r,1),colorBgSolidHover:Ym(r,.75),colorBgSolidActive:Ym(r,.95),colorBgLayout:WN(n,4),colorBgContainer:WN(n,0),colorBgElevated:WN(n,0),colorBgSpotlight:Ym(r,.85),colorBgBlur:"transparent",colorBorder:WN(n,15),colorBorderDisabled:WN(n,15),colorBorderSecondary:WN(n,6)}};function Pun(e){oX.pink=oX.magenta,iX.pink=iX.magenta;const t=Object.keys(rqe).map(n=>{const r=e[n]===oX[n]?iX[n]:_fe(e[n]);return Array.from({length:10},()=>1).reduce((o,i,a)=>(o[`${n}-${a+1}`]=r[a],o[`${n}${a+1}`]=r[a],o),{})}).reduce((n,r)=>(n={...n,...r},n),{});return{...e,...t,...xun(e,{generateColorPalettes:Nun,generateNeutralColorPalettes:Eun}),..._un(e.fontSize),...jun(e),...Cun(e),...Sun(e)}}const aqe=jne(Pun),Vne={token:nR,override:{override:nR},hashed:!0},sqe=Pe.createContext(Vne);function aX(e){return e>=0&&e<=255}function Bk(e,t){const{r:n,g:r,b:o,a:i}=new Xa(e).toRgb();if(i<1)return e;const{r:a,g:l,b:c}=new Xa(t).toRgb();for(let u=.01;u<=1;u+=.01){const d=Math.round((n-a*(1-u))/u),f=Math.round((r-l*(1-u))/u),h=Math.round((o-c*(1-u))/u);if(aX(d)&&aX(f)&&aX(h))return new Xa({r:d,g:f,b:h,a:Math.round(u*100)/100}).toRgbString()}return new Xa({r:n,g:r,b:o,a:1}).toRgbString()}function Iun(e){const{override:t,...n}=e,r={...t};Object.keys(nR).forEach(h=>{delete r[h]});const o={...n,...r},i=480,a=576,l=768,c=992,u=1200,d=1600;return o.motion===!1&&(o.motionDurationFast="0s",o.motionDurationMid="0s",o.motionDurationSlow="0s"),{...o,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:Bk(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:Bk(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Bk(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:Bk(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowSecondary:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowTertiary:` + 0 1px 2px 0 rgba(0, 0, 0, 0.03), + 0 1px 6px -1px rgba(0, 0, 0, 0.02), + 0 2px 4px 0 rgba(0, 0, 0, 0.02) + `,screenXS:i,screenXSMin:i,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:l-1,screenMD:l,screenMDMin:l,screenMDMax:c-1,screenLG:c,screenLGMin:c,screenLGMax:u-1,screenXL:u,screenXLMin:u,screenXLMax:d-1,screenXXL:d,screenXXLMin:d,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:` + 0 1px 2px -2px ${new Xa("rgba(0, 0, 0, 0.16)").toRgbString()}, + 0 3px 6px 0 ${new Xa("rgba(0, 0, 0, 0.12)").toRgbString()}, + 0 5px 12px 4px ${new Xa("rgba(0, 0, 0, 0.09)").toRgbString()} + `,boxShadowDrawerRight:` + -6px 0 16px 0 rgba(0, 0, 0, 0.08), + -3px 0 6px -4px rgba(0, 0, 0, 0.12), + -9px 0 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerLeft:` + 6px 0 16px 0 rgba(0, 0, 0, 0.08), + 3px 0 6px -4px rgba(0, 0, 0, 0.12), + 9px 0 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerUp:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerDown:` + 0 -6px 16px 0 rgba(0, 0, 0, 0.08), + 0 -3px 6px -4px rgba(0, 0, 0, 0.12), + 0 -9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)",...r}}const lqe={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},Aun={motionBase:!0,motionUnit:!0},Tun={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},cqe=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o,...i}=t;let a={...r,override:o};return a=Iun(a),i&&Object.entries(i).forEach(([l,c])=>{const{theme:u,...d}=c;let f=d;u&&(f=cqe({...a,...d},{override:d},u)),a[l]=f}),a};function mp(){const{token:e,hashed:t,theme:n,override:r,cssVar:o,zeroRuntime:i}=Pe.useContext(sqe),a={prefix:(o==null?void 0:o.prefix)||"ant",key:(o==null?void 0:o.key)||"css-var-root"},l=`${hun}-${t||""}`,c=n||aqe,[u,d,f]=jcn(c,[nR,e],{salt:l,override:r,getComputedToken:cqe,cssVar:{...a,unitless:lqe,ignore:Aun,preserve:Tun}});return[c,f,t?d:"",u,a,!!i]}const Px={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},ou=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),FV=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),rR=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),kun=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),Mun=(e,t,n,r)=>{const o=`[class^="${t}"], [class*=" ${t}"]`,i=n?`.${n}`:o,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let l={};return r!==!1&&(l={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:{...l,...a,[o]:a}}},$S=(e,t)=>({outline:`${en(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),OP=(e,t)=>({"&:focus-visible":$S(e,t)}),uqe=e=>({[`.${e}`]:{...FV(),[`.${e} .${e}-icon`]:{display:"block"}}}),jfe=e=>({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none",...OP(e),"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:vl,genComponentStyleHook:Run,genSubStyleComponent:BV}=fun({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=p.useContext(Ho);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,o,i]=mp();return{theme:e,realToken:t,hashId:n,token:r,cssVar:o,zeroRuntime:i}},useCSP:()=>{const{csp:e}=p.useContext(Ho);return e??{}},getResetStyles:(e,t)=>{const n=kun(e);return[n,{"&":n},uqe((t==null?void 0:t.prefix.iconPrefixCls)??RV)]},getCommonStyle:Mun,getCompUnitless:()=>lqe}),Oun=(e,t)=>{const n=`--${e.replace(".","")}-${t}-`;return(r,o=!1)=>{const i=`${n}${r}`;return o?`var(${i})`:i}};function Dun(e,t){return U_.reduce((n,r)=>{const o=e[`${r}1`],i=e[`${r}3`],a=e[`${r}6`],l=e[`${r}7`];return{...n,...t(r,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:l})}},{})}const Lun=(e,t)=>(mp(),Ane({hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>uqe(e)));var $un={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};const Nfe=p.createContext({});function dqe(e){var t;return(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e)}function Fun(e){return dqe(e)instanceof ShadowRoot}function WB(e){return Fun(e)?dqe(e):null}function Bun(e){return e.replace(/-(.)/g,(t,n)=>n.toUpperCase())}function zun(e,t){ic(e,`[@ant-design/icons] ${t}`)}function VEe(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function UEe(e={}){return Object.keys(e).reduce((t,n)=>{const r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[Bun(n)]=r}return t},{})}function Une(e,t,n){return n?Pe.createElement(e.tag,{key:t,...UEe(e.attrs),...n},(e.children||[]).map((r,o)=>Une(r,`${t}-${e.tag}-${o}`))):Pe.createElement(e.tag,{key:t,...UEe(e.attrs)},(e.children||[]).map((r,o)=>Une(r,`${t}-${e.tag}-${o}`)))}function fqe(e){return _fe(e)[0]}function pqe(e){return e?Array.isArray(e)?e:[e]:[]}const Hun=` +.anticon { + display: inline-flex; + align-items: center; + color: inherit; + font-style: normal; + line-height: 0; + text-align: center; + text-transform: none; + vertical-align: -0.125em; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.anticon > * { + line-height: 1; +} + +.anticon svg { + display: inline-block; + vertical-align: inherit; +} + +.anticon::before { + display: none; +} + +.anticon .anticon-icon { + display: block; +} + +.anticon[tabindex] { + cursor: pointer; +} + +.anticon-spin::before, +.anticon-spin { + display: inline-block; + -webkit-animation: loadingCircle 1s infinite linear; + animation: loadingCircle 1s infinite linear; +} + +@-webkit-keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +`,Vun=e=>{const{csp:t,prefixCls:n,layer:r}=p.useContext(Nfe);let o=Hun;n&&(o=o.replace(/anticon/g,n)),r&&(o=`@layer ${r} { +${o} +}`),p.useEffect(()=>{const i=e.current,a=WB(i);pS(o,"@ant-design-icons",{prepend:!r,csp:t,attachTo:a})},[])},E4={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Uun({primaryColor:e,secondaryColor:t}){E4.primaryColor=e,E4.secondaryColor=t||fqe(e),E4.calculated=!!t}function Gun(){return{...E4}}const QI=e=>{const{icon:t,className:n,onClick:r,style:o,primaryColor:i,secondaryColor:a,...l}=e,c=p.useRef(null);let u=E4;if(i&&(u={primaryColor:i,secondaryColor:a||fqe(i)}),Vun(c),zun(VEe(t),`icon should be icon definiton, but got ${t}`),!VEe(t))return null;let d=t;return d&&typeof d.icon=="function"&&(d={...d,icon:d.icon(u.primaryColor,u.secondaryColor)}),Une(d.icon,`svg-${d.name}`,{className:n,onClick:r,style:o,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...l,ref:c})};QI.displayName="IconReact";QI.getTwoToneColors=Gun;QI.setTwoToneColors=Uun;function hqe(e){const[t,n]=pqe(e);return QI.setTwoToneColors({primaryColor:t,secondaryColor:n})}function Wun(){const e=QI.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}function Gne(){return Gne=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:n,icon:r,spin:o,rotate:i,tabIndex:a,onClick:l,twoToneColor:c,...u}=e,{prefixCls:d="anticon",rootClassName:f}=p.useContext(Nfe),h=Ae(f,d,{[`${d}-${r.name}`]:!!r.name,[`${d}-spin`]:!!o||r.name==="loading"},n);let m=a;m===void 0&&l&&(m=-1);const g=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0,[b,y]=pqe(c);return p.createElement("span",Gne({role:"img","aria-label":r.name},u,{ref:t,tabIndex:m,onClick:l,className:h}),p.createElement(QI,{icon:r,primaryColor:b,secondaryColor:y,style:g}))});Pa.getTwoToneColor=Wun;Pa.setTwoToneColor=hqe;function Wne(){return Wne=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,Wne({},e,{ref:t,icon:$un})),mqe=p.forwardRef(qun);var Kun={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function qne(){return qne=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,qne({},e,{ref:t,icon:Kun})),zV=p.forwardRef(Yun);var Xun={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};function Kne(){return Kne=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,Kne({},e,{ref:t,icon:Xun})),CO=p.forwardRef(Zun);var Jun={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};function Yne(){return Yne=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,Yne({},e,{ref:t,icon:Jun})),gqe=p.forwardRef(Qun);var edn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};function Xne(){return Xne=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,Xne({},e,{ref:t,icon:edn})),ndn=p.forwardRef(tdn),yqe=p.createContext({});function rdn({children:e,...t}){return p.createElement(yqe.Provider,{value:t},e)}function odn(e){const[,t]=p.useReducer(i=>i+1,0),n=p.useRef(e),r=Xo(()=>n.current),o=Xo(i=>{n.current=typeof i=="function"?i(n.current):i,t()});return[r,o]}const Zv="none",i6="appear",a6="enter",s6="leave",GEe="none",j0="prepare",QE="start",e5="active",Efe="end",bqe="prepared";function WEe(e,t){const n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit${e}`]=`webkit${t}`,n[`Moz${e}`]=`moz${t}`,n[`ms${e}`]=`MS${t}`,n[`O${e}`]=`o${t.toLowerCase()}`,n}function idn(e,t){const n={animationend:WEe("Animation","AnimationEnd"),transitionend:WEe("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}const adn=idn(Lp(),typeof window<"u"?window:{});let vqe={};Lp()&&({style:vqe}=document.createElement("div"));const l6={};function xqe(e){if(l6[e])return l6[e];const t=adn[e];if(t){const n=Object.keys(t),r=n.length;for(let o=0;or[1].toUpperCase());return e[n]}return`${e}-${t}`}const ldn=(e=>{const t=p.useRef();function n(o){o&&(o.removeEventListener(KEe,e),o.removeEventListener(qEe,e))}function r(o){t.current&&t.current!==o&&n(t.current),o&&o!==t.current&&(o.addEventListener(KEe,e),o.addEventListener(qEe,e),t.current=o)}return p.useEffect(()=>()=>{n(t.current),t.current=null},[]),[r,n]}),Cqe=Lp()?p.useLayoutEffect:p.useEffect,cdn=(()=>{const e=p.useRef(null);function t(){Ri.cancel(e.current)}function n(r,o=2){t();const i=Ri(()=>{o<=1?r({isCanceled:()=>i!==e.current}):n(r,o-1)});e.current=i}return p.useEffect(()=>()=>{t()},[]),[n,t]}),udn=[j0,QE,e5,Efe],ddn=[j0,bqe],_qe=!1,fdn=!0;function jqe(e){return e===e5||e===Efe}const pdn=((e,t,n)=>{const[r,o]=XM(GEe),[i,a]=cdn();function l(){o(j0,!0)}const c=t?ddn:udn;return Cqe(()=>{if(r!==GEe&&r!==Efe){const u=c.indexOf(r),d=c[u+1],f=n(r);f===_qe?o(d,!0):d&&i(h=>{function m(){h.isCanceled()||o(d,!0)}f===!0?m():Promise.resolve(f).then(m)})}},[e,r]),p.useEffect(()=>()=>{a()},[]),[l,r]});function hdn(e,t,n,{motionEnter:r=!0,motionAppear:o=!0,motionLeave:i=!0,motionDeadline:a,motionLeaveImmediately:l,onAppearPrepare:c,onEnterPrepare:u,onLeavePrepare:d,onAppearStart:f,onEnterStart:h,onLeaveStart:m,onAppearActive:g,onEnterActive:b,onLeaveActive:y,onAppearEnd:v,onEnterEnd:x,onLeaveEnd:S,onVisibleChanged:C}){const[_,N]=XM(),[E,I]=odn(Zv),[A,R]=XM(null),k=E(),T=p.useRef(!1),D=p.useRef(null);function O(){return n()}const z=p.useRef(!1);function F(){I(Zv),R(null,!0)}const U=Xo(oe=>{const de=E();if(de===Zv)return;const ae=O();if(oe&&!oe.deadline&&oe.target!==ae)return;const ue=z.current;let ce;de===i6&&ue?ce=v==null?void 0:v(ae,oe):de===a6&&ue?ce=x==null?void 0:x(ae,oe):de===s6&&ue&&(ce=S==null?void 0:S(ae,oe)),ue&&ce!==!1&&F()}),[G]=ldn(U),W=oe=>{switch(oe){case i6:return{[j0]:c,[QE]:f,[e5]:g};case a6:return{[j0]:u,[QE]:h,[e5]:b};case s6:return{[j0]:d,[QE]:m,[e5]:y};default:return{}}},Y=p.useMemo(()=>W(k),[k]),[B,$]=pdn(k,!e,oe=>{var de;if(oe===j0){const ae=Y[j0];return ae?ae(O()):_qe}return $ in Y&&R(((de=Y[$])==null?void 0:de.call(Y,O(),null))||null),$===e5&&k!==Zv&&(G(O()),a>0&&(clearTimeout(D.current),D.current=setTimeout(()=>{U({deadline:!0})},a))),$===bqe&&F(),fdn}),K=jqe($);z.current=K;const q=p.useRef(null);Cqe(()=>{if(T.current&&q.current===t)return;N(t);const oe=T.current;T.current=!0;let de;!oe&&t&&o&&(de=i6),oe&&t&&r&&(de=a6),(oe&&!t&&i||!oe&&l&&!t&&i)&&(de=s6);const ae=W(de);de&&(e||ae[j0])?(I(de),B()):I(Zv),q.current=t},[t]),p.useEffect(()=>{(k===i6&&!o||k===a6&&!r||k===s6&&!i)&&I(Zv)},[o,r,i]),p.useEffect(()=>()=>{T.current=!1,clearTimeout(D.current)},[]);const Z=p.useRef(!1);p.useEffect(()=>{_&&(Z.current=!0),_!==void 0&&k===Zv&&((Z.current||_)&&(C==null||C(_)),Z.current=!0)},[_,k]);let J=A;return Y[j0]&&$===QE&&(J={transition:"none",...J}),[E,$,J,_??t]}function mdn(e){let t=e;typeof e=="object"&&({transitionSupport:t}=e);function n(o,i){return!!(o.motionName&&t&&i!==!1)}const r=p.forwardRef((o,i)=>{const{visible:a=!0,removeOnLeave:l=!0,forceRender:c,children:u,motionName:d,leavedClassName:f,eventProps:h}=o,{motion:m}=p.useContext(yqe),g=n(o,m),b=p.useRef();function y(){return Wx(b.current)}const[v,x,S,C]=hdn(g,a,y,o),_=v(),N=p.useRef(C);C&&(N.current=!0);const E=p.useMemo(()=>{const R={};return Object.defineProperties(R,{nativeElement:{enumerable:!0,get:y},inMotion:{enumerable:!0,get:()=>()=>v()!==Zv},enableMotion:{enumerable:!0,get:()=>()=>g}}),R},[]);p.useImperativeHandle(i,()=>E,[]);let I;const A={...h,visible:a};if(!u)I=null;else if(_===Zv)C?I=u({...A},b):!l&&N.current&&f?I=u({...A,className:f},b):c||!l&&!f?I=u({...A,style:{display:"none"}},b):I=null;else{let R;x===j0?R="prepare":jqe(x)?R="active":x===QE&&(R="start");const k=YEe(d,`${_}-${R}`);I=u({...A,className:Ae(YEe(d,_),{[k]:k&&R,[d]:typeof d=="string"}),style:S},b)}return p.isValidElement(I)&&Hb(I)&&(oC(I)||(I=p.cloneElement(I,{ref:b}))),I});return r.displayName="CSSMotion",r}const qg=mdn(sdn),Zne="add",Jne="keep",Qne="remove",sX="removed";function gdn(e){let t;return e&&typeof e=="object"&&"key"in e?t=e:t={key:e},{...t,key:String(t.key)}}function ere(e=[]){return e.map(gdn)}function ydn(e=[],t=[]){let n=[],r=0;const o=t.length,i=ere(e),a=ere(t);i.forEach(u=>{let d=!1;for(let f=r;f({...m,status:Zne}))),r=f),n.push({...h,status:Jne}),r+=1,d=!0;break}}d||n.push({...u,status:Qne})}),r({...u,status:Zne}))));const l={};return n.forEach(({key:u})=>{l[u]=(l[u]||0)+1}),Object.keys(l).filter(u=>l[u]>1).forEach(u=>{n=n.filter(({key:d,status:f})=>d!==u||f!==Qne),n.forEach(d=>{d.key===u&&(d.status=Jne)})}),n}function tre(){return tre=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.setState(a=>({keyEntities:a.keyEntities.map(c=>c.key!==i?c:{...c,status:sX})}),()=>{const{keyEntities:a}=this.state;a.filter(({status:c})=>c!==sX).length===0&&this.props.onAllRemoved&&this.props.onAllRemoved()})})}static getDerivedStateFromProps({keys:i},{keyEntities:a}){const l=ere(i);return{keyEntities:ydn(a,l).filter(u=>{const d=a.find(({key:f})=>u.key===f);return!(d&&d.status===sX&&u.status===Qne)})}}render(){const{keyEntities:i}=this.state,{component:a,children:l,onVisibleChanged:c,onAllRemoved:u,...d}=this.props,f=a||p.Fragment,h={};return bdn.forEach(m=>{h[m]=d[m],delete d[m]}),delete d.keys,p.createElement(f,d,i.map(({status:m,...g},b)=>{const y=m===Zne||m===Jne;return p.createElement(t,tre({},h,{key:g.key,visible:y,eventProps:g,onVisibleChanged:v=>{c==null||c(v,{key:g.key}),v||this.removeKey(g.key)}}),(v,x)=>l({...v,index:b},x))}))}}return Le(n,"defaultProps",{component:"div"}),n}const xdn=vdn(),wdn=`accept acceptCharset accessKey action allowFullScreen allowTransparency + alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge + charSet checked classID className colSpan cols content contentEditable contextMenu + controls coords crossOrigin data dateTime default defer dir disabled download draggable + encType form formAction formEncType formMethod formNoValidate formTarget frameBorder + headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity + is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media + mediaGroup method min minLength multiple muted name noValidate nonce open + optimum pattern placeholder poster preload radioGroup readOnly rel required + reversed role rowSpan rows sandbox scope scoped scrolling seamless selected + shape size sizes span spellCheck src srcDoc srcLang srcSet start step style + summary tabIndex target title type useMap value width wmode wrap`,Sdn=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown + onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick + onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown + onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel + onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough + onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata + onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Cdn=`${wdn} ${Sdn}`.split(/[\s\n]+/),_dn="aria-",jdn="data-";function XEe(e,t){return e.indexOf(t)===0}function Mh(e,t=!1){let n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n={...t};const r={};return Object.keys(e).forEach(o=>{(n.aria&&(o==="role"||XEe(o,_dn))||n.data&&XEe(o,jdn)||n.attr&&Cdn.includes(o))&&(r[o]=e[o])}),r}const Nqe={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var Ndn={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0};function oR(e){"@babel/helpers - typeof";return oR=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oR(e)}function ZEe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function JEe(e){for(var t=1;tj8.reduce((e,t)=>({...e,...t}),ty.Modal);function Tdn(e){if(e){const t={...e};return j8.push(t),_8=e5e(),()=>{j8=j8.filter(n=>n!==t),_8=e5e()}}_8={...ty.Modal}}function Pqe(){return _8}const Pfe=p.createContext(void 0),dy=(e,t)=>{const n=p.useContext(Pfe),r=p.useMemo(()=>{const i=t||ty[e],a=(n==null?void 0:n[e])??{};return{...typeof i=="function"?i():i,...a||{}}},[e,t,n]),o=p.useMemo(()=>{const i=n==null?void 0:n.locale;return n!=null&&n.exist&&!i?ty.locale:i},[n]);return[r,o]},kdn="internalMark",Mdn=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;p.useEffect(()=>Tdn(t==null?void 0:t.Modal),[t]);const o=p.useMemo(()=>({...t,exist:!0}),[t]);return p.createElement(Pfe.Provider,{value:o},n)};function qB(...e){const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(t[r]=n[r])})}),t}const Fp=e=>e!=null,t5e=e=>{if(!e)return;const{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}},Iqe={},n5e=(e,t)=>{if(!e&&(e===!1||t===!1||t===null))return!1;if(e===void 0&&t===void 0)return null;let n={closeIcon:typeof t!="boolean"&&t!==null?t:void 0};return e&&typeof e=="object"&&(n={...n,...e}),n},Rdn=(e,t,n)=>e===!1?!1:e?qB(n,t,e):t===!1?!1:t?qB(n,t):n.closable?n:!1,Odn=(e,t,n)=>{const{closeIconRender:r}=t,{closeIcon:o,...i}=e;let a=o;const l=Mh(i,!0);return Fp(a)&&(r&&(a=r(a)),a=Pe.isValidElement(a)?Pe.cloneElement(a,{"aria-label":n,...a.props,...l}):Pe.createElement("span",{"aria-label":n,...l},a)),[a,l]},Ddn=(e,t,n=Iqe,r="Close")=>{const o=n5e(e==null?void 0:e.closable,e==null?void 0:e.closeIcon),i=n5e(t==null?void 0:t.closable,t==null?void 0:t.closeIcon),a={closeIcon:Pe.createElement(CO,null),...n},l=Rdn(o,i,a),c=typeof l!="boolean"?!!(l!=null&&l.disabled):!1;if(l===!1)return[!1,null,c,{}];const[u,d]=Odn(l,a,r);return[!0,u,c,d]},Ldn=(e,t,n=Iqe)=>{const[r]=dy("global",ty.global);return Pe.useMemo(()=>Ddn(e,t,{closeIcon:Pe.createElement(CO,null),...n},r.close),[e,t,n,r.close])},Aqe=()=>Pe.useReducer(e=>e+1,0),r5e=e=>e&&typeof e=="object"?e:typeof e=="boolean"?{enabled:e,blur:e}:{},$dn=(e,t,n)=>p.useMemo(()=>{const r=r5e(e),i={...r5e(t),...r},a=i.blur!==!1?`${n}-mask-blur`:void 0;return[i.enabled!==!1,{mask:a}]},[e,t,n]),Tqe=(e,...t)=>{const n=e||{};return t.filter(Boolean).reduce((r,o)=>(Object.keys(o||{}).forEach(i=>{const a=n[i],l=o[i];if(a&&typeof a=="object")if(l&&typeof l=="object")r[i]=Tqe(a,r[i],l);else{const{_default:c}=a;c&&(r[i]=r[i]||{},r[i][c]=Ae(r[i][c],l))}else r[i]=Ae(r[i],l)}),r),{})},Fdn=(e,...t)=>p.useMemo(()=>Tqe.apply(void 0,[e].concat(t)),[e].concat(t)),Bdn=(...e)=>e.filter(Boolean).reduce((t,n={})=>(Object.keys(n).forEach(r=>{t[r]={...t[r],...n[r]}}),t),{}),zdn=(...e)=>p.useMemo(()=>Bdn.apply(void 0,e),[].concat(e)),nre=(e,t)=>{const n={...e};return Object.keys(t).forEach(r=>{if(r!=="_default"){const o=t[r],i=n[r]||{};n[r]=o?nre(i,o):i}}),n},o5e=(e,t)=>typeof e=="function"?e(t):e,Mu=(e,t,n,r)=>{const o=e.map(c=>c?o5e(c,n):void 0),i=t.map(c=>c?o5e(c,n):void 0),a=Fdn.apply(void 0,[r].concat(So(o))),l=zdn.apply(void 0,So(i));return p.useMemo(()=>r?[nre(a,r),nre(l,r)]:[a,l],[a,l,r])},Hdn=e=>{const[t,n]=p.useState(null);return[p.useCallback((o,i,a)=>{const l=t??o,c=Math.min(l||0,o),u=Math.max(l||0,o),d=i.slice(c,u+1).map(e),f=d.some(m=>!a.has(m)),h=[];return d.forEach(m=>{f?(a.has(m)||h.push(m),a.add(m)):(a.delete(m),h.push(m))}),n(f?u:null),h},[t]),n]},i5e=e=>e==="horizontal"||e==="vertical",Ife=(e,t,n)=>p.useMemo(()=>{const r=i5e(e);let o;return r?o=e:typeof t=="boolean"?o=t?"vertical":"horizontal":o=i5e(n)?n:"horizontal",[o,o==="vertical"]},[n,e,t]),Vdn=()=>{const[e,t]=p.useState([]),n=p.useCallback(r=>(t(o=>[].concat(So(o),[r])),()=>{t(o=>o.filter(i=>i!==r))}),[]);return[e,n]},Udn=(e,t)=>(e._antProxy=e._antProxy||{},Object.keys(t).forEach(n=>{if(!(n in e._antProxy)){const r=e[n];e._antProxy[n]=r,e[n]=t[n]}}),e),Gdn=(e,t)=>p.useImperativeHandle(e,()=>{const n=t(),{nativeElement:r}=n;return typeof Proxy<"u"?new Proxy(r,{get(o,i){return n[i]?n[i]:Reflect.get(o,i)}}):Udn(r,n)}),Wdn=e=>{const t=p.useRef(e),[,n]=Aqe();return[()=>t.current,r=>{t.current=r,n()}]},HV=Pe.createContext(void 0),mw=100,qdn=10,Kdn=mw*qdn,kqe={Modal:mw,Drawer:mw,Popover:mw,Popconfirm:mw,Tooltip:mw,Tour:mw,FloatButton:mw},Ydn={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},Xdn=e=>e in kqe,_O=(e,t)=>{const[,n]=mp(),r=Pe.useContext(HV),o=Xdn(e);let i;if(t!==void 0)i=[t,t];else{let a=r??0;o?a+=(r?0:n.zIndexPopupBase)+kqe[e]:a+=Ydn[e],i=[r===void 0?t:a,a]}return i};function Mqe(e){return e&&Pe.isValidElement(e)&&e.type===Pe.Fragment}const Zdn=(e,t,n)=>Pe.isValidElement(e)?Pe.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t;function Bp(e,t){return Zdn(e,e,t)}const a5e=e=>typeof e=="object"&&e!=null&&e.nodeType===1,s5e=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",c6=(e,t)=>{if(e.clientHeight{const o=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!o&&(o.clientHeightit||i>e&&a=t&&l>=n?i-e-r:a>t&&ln?a-t+o:0,Jdn=e=>{const t=e.parentElement;return t??(e.getRootNode().host||null)},l5e=(e,t)=>{var n,r,o,i;if(typeof document>"u")return[];const{scrollMode:a,block:l,inline:c,boundary:u,skipOverflowHiddenElements:d}=t,f=typeof u=="function"?u:F=>F!==u;if(!a5e(e))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,m=[];let g=e;for(;a5e(g)&&f(g);){if(g=Jdn(g),g===h){m.push(g);break}g!=null&&g===document.body&&c6(g)&&!c6(document.documentElement)||g!=null&&c6(g,d)&&m.push(g)}const b=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,y=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,{scrollX:v,scrollY:x}=window,{height:S,width:C,top:_,right:N,bottom:E,left:I}=e.getBoundingClientRect(),{top:A,right:R,bottom:k,left:T}=(F=>{const U=window.getComputedStyle(F);return{top:parseFloat(U.scrollMarginTop)||0,right:parseFloat(U.scrollMarginRight)||0,bottom:parseFloat(U.scrollMarginBottom)||0,left:parseFloat(U.scrollMarginLeft)||0}})(e);let D=l==="start"||l==="nearest"?_-A:l==="end"?E+k:_+S/2-A+k,O=c==="center"?I+C/2-T+R:c==="end"?N+R:I-T;const z=[];for(let F=0;F=0&&I>=0&&E<=y&&N<=b&&(U===h&&!c6(U)||_>=Y&&E<=$&&I>=K&&N<=B))return z;const q=getComputedStyle(U),Z=parseInt(q.borderLeftWidth,10),J=parseInt(q.borderTopWidth,10),oe=parseInt(q.borderRightWidth,10),de=parseInt(q.borderBottomWidth,10);let ae=0,ue=0;const ce="offsetWidth"in U?U.offsetWidth-U.clientWidth-Z-oe:0,se="offsetHeight"in U?U.offsetHeight-U.clientHeight-J-de:0,me="offsetWidth"in U?U.offsetWidth===0?0:W/U.offsetWidth:0,fe="offsetHeight"in U?U.offsetHeight===0?0:G/U.offsetHeight:0;if(h===U)ae=l==="start"?D:l==="end"?D-y:l==="nearest"?u6(x,x+y,y,J,de,x+D,x+D+S,S):D-y/2,ue=c==="start"?O:c==="center"?O-b/2:c==="end"?O-b:u6(v,v+b,b,Z,oe,v+O,v+O+C,C),ae=Math.max(0,ae+x),ue=Math.max(0,ue+v);else{ae=l==="start"?D-Y-J:l==="end"?D-$+de+se:l==="nearest"?u6(Y,$,G,J,de+se,D,D+S,S):D-(Y+G/2)+se/2,ue=c==="start"?O-K-Z:c==="center"?O-(K+W/2)+ce/2:c==="end"?O-B+oe+ce:u6(K,B,W,Z,oe+ce,O,O+C,C);const{scrollLeft:te,scrollTop:ye}=U;ae=fe===0?0:Math.max(0,Math.min(ye+ae/fe,U.scrollHeight-G/fe+se)),ue=me===0?0:Math.max(0,Math.min(te+ue/me,U.scrollWidth-W/me+ce)),D+=ye-ae,O+=te-ue}z.push({el:U,top:ae,left:ue})}return z},Qdn=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function efn(e,t){if(!e.isConnected||!(o=>{let i=o;for(;i&&i.parentNode;){if(i.parentNode===document)return!0;i=i.parentNode instanceof ShadowRoot?i.parentNode.host:i.parentNode}return!1})(e))return;const n=(o=>{const i=window.getComputedStyle(o);return{top:parseFloat(i.scrollMarginTop)||0,right:parseFloat(i.scrollMarginRight)||0,bottom:parseFloat(i.scrollMarginBottom)||0,left:parseFloat(i.scrollMarginLeft)||0}})(e);if((o=>typeof o=="object"&&typeof o.behavior=="function")(t))return t.behavior(l5e(e,t));const r=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:o,top:i,left:a}of l5e(e,Qdn(t))){const l=i-n.top+n.bottom,c=a-n.left+n.right;o.scroll({top:l,left:c,behavior:r})}}function rre(e){return Fp(e)&&e===e.window}const tfn=e=>{var n;if(typeof window>"u")return 0;let t=0;return rre(e)?t=e.pageYOffset:e instanceof Document?t=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(t=e.scrollTop),e&&!rre(e)&&typeof t!="number"&&(t=(n=(e.ownerDocument??e).documentElement)==null?void 0:n.scrollTop),t};function nfn(e,t,n,r){const o=n-t;return e/=r/2,e<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}function rfn(e,t={}){const{getContainer:n=()=>window,callback:r,duration:o=450}=t,i=n(),a=tfn(i),l=Date.now();let c;const u=()=>{const f=Date.now()-l,h=nfn(f>o?o:f,a,e,o);rre(i)?i.scrollTo(window.pageXOffset,h):i instanceof Document||i.constructor.name==="HTMLDocument"?i.documentElement.scrollTop=h:i.scrollTop=h,f{Ri.cancel(c)}}const Mf=e=>`${e}-css-var`,Rqe=p.createContext(void 0),Oqe=p.createContext(null);let ofn=!1;function ifn(e){return ofn}const c5e=[];function afn(e,t){const[n]=p.useState(()=>Lp()?document.createElement("div"):null),r=p.useRef(!1),o=p.useContext(Oqe),[i,a]=p.useState(c5e),l=o||(r.current?void 0:d=>{a(f=>[d,...f])});function c(){n.parentElement||document.body.appendChild(n),r.current=!0}function u(){var d;(d=n.parentElement)==null||d.removeChild(n),r.current=!1}return ai(()=>(e?o?o(c):c():u(),u),[e]),ai(()=>{i.length&&(i.forEach(d=>d()),a(c5e))},[i]),[n,l]}let lX;function Dqe(e){const t=`rc-scrollbar-measure-${Math.random().toString(36).substring(7)}`,n=document.createElement("div");n.id=t;const r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";let o,i;if(e){const c=getComputedStyle(e);r.scrollbarColor=c.scrollbarColor,r.scrollbarWidth=c.scrollbarWidth;const u=getComputedStyle(e,"::-webkit-scrollbar"),d=parseInt(u.width,10),f=parseInt(u.height,10);try{const h=d?`width: ${u.width};`:"",m=f?`height: ${u.height};`:"";pS(` +#${t}::-webkit-scrollbar { +${h} +${m} +}`,t)}catch(h){console.error(h),o=d,i=f}}document.body.appendChild(n);const a=e&&o&&!isNaN(o)?o:n.offsetWidth-n.clientWidth,l=e&&i&&!isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),JM(t),{width:a,height:l}}function u5e(e){return typeof document>"u"?0:(lX===void 0&&(lX=Dqe()),lX.width)}function ore(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:Dqe(e)}function sfn(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}const lfn=`rc-util-locker-${Date.now()}`;let d5e=0;function cfn(e){const t=!!e,[n]=p.useState(()=>(d5e+=1,`${lfn}_${d5e}`));ai(()=>{if(t){const r=ore(document.body).width,o=sfn();pS(` +html body { + overflow-y: hidden; + ${o?`width: calc(100% - ${r}px);`:""} +}`,n)}else JM(n);return()=>{JM(n)}},[t,n])}const f5e=e=>e===!1?!1:!Lp()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,VV=p.forwardRef((e,t)=>{const{open:n,autoLock:r,getContainer:o,debug:i,autoDestroy:a=!0,children:l}=e,[c,u]=p.useState(n),d=c||n;p.useEffect(()=>{(a||n)&&u(n)},[n,a]);const[f,h]=p.useState(()=>f5e(o));p.useEffect(()=>{const C=f5e(o);h(C??null)});const[m,g]=afn(d&&!f),b=f??m;cfn(r&&n&&Lp()&&(b===m||b===document.body));let y=null;l&&Hb(l)&&t&&(y=oC(l));const v=ZI(y,t);if(!d||!Lp()||f===void 0)return null;const x=b===!1||ifn();let S=l;return t&&(S=p.cloneElement(l,{ref:v})),p.createElement(Oqe.Provider,{value:g},x?S:au.createPortal(S,b))});function ufn(){return{...IS}.useId}let p5e=0;const h5e=ufn(),eA=h5e?(function(t){const n=h5e();return t||n}):(function(t){const[n,r]=p.useState("ssr-id");return p.useEffect(()=>{const o=p5e;p5e+=1,r(`rc_unique_${o}`)},[]),t||n});function dfn(e){const{prefixCls:t,align:n,arrow:r,arrowPos:o}=e,{className:i,content:a,style:l}=r||{},{x:c=0,y:u=0}=o,d=p.useRef(null);if(!n||!n.points)return null;const f={position:"absolute"};if(n.autoArrow!==!1){const h=n.points[0],m=n.points[1],g=h[0],b=h[1],y=m[0],v=m[1];g===y||!["t","b"].includes(g)?f.top=u:g==="t"?f.top=0:f.bottom=0,b===v||!["l","r"].includes(b)?f.left=c:b==="l"?f.left=0:f.right=0}return p.createElement("div",{ref:d,className:Ae(`${t}-arrow`,i),style:{...f,...l}},a)}function ire(){return ire=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement("div",{style:{zIndex:r},className:Ae(`${t}-mask`,a&&`${t}-mobile-mask`,l)})):null}const pfn=p.memo(({children:e})=>e,(e,t)=>t.cache);function Lqe(e,t,n,r,o,i,a,l){var d;const c="auto",u=e?{}:{left:"-1000vw",top:"-1000vh",right:c,bottom:c};if(!e&&(t||!n)){const{points:f}=r,h=r.dynamicInset||((d=r._experimental)==null?void 0:d.dynamicInset),m=h&&f[0][1]==="r",g=h&&f[0][0]==="b";m?(u.right=o,u.left=c):(u.left=a,u.right=c),g?(u.bottom=i,u.top=c):(u.top=l,u.bottom=c)}return u}function are(){return are=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{popup:n,className:r,prefixCls:o,style:i,target:a,onVisibleChanged:l,open:c,keepDom:u,fresh:d,onClick:f,mask:h,arrow:m,arrowPos:g,align:b,motion:y,maskMotion:v,mobile:x,forceRender:S,getPopupContainer:C,autoDestroy:_,portal:N,children:E,zIndex:I,onMouseEnter:A,onMouseLeave:R,onPointerEnter:k,onPointerDownCapture:T,ready:D,offsetX:O,offsetY:z,offsetR:F,offsetB:U,onAlign:G,onPrepare:W,onResize:Y,stretch:B,targetWidth:$,targetHeight:K}=e,q=typeof n=="function"?n():n,Z=c||u,J=!!x,[oe,de,ae]=p.useMemo(()=>x?[x.mask,x.maskMotion,x.motion]:[h,v,y],[x,h,v,y]),ue=(C==null?void 0:C.length)>0,[ce,se]=p.useState(!C||!ue);ai(()=>{!ce&&ue&&a&&se(!0)},[ce,ue,a]);const me=Xo((ye,ve)=>{Y==null||Y(ye,ve),G()}),fe=Lqe(J,D,c,b,F,U,O,z);if(!ce)return null;const te={};return B&&(B.includes("height")&&K?te.height=K:B.includes("minHeight")&&K&&(te.minHeight=K),B.includes("width")&&$?te.width=$:B.includes("minWidth")&&$&&(te.minWidth=$)),c||(te.pointerEvents="none"),p.createElement(N,{open:S||Z,getContainer:C&&(()=>C(a)),autoDestroy:_},p.createElement(ffn,{prefixCls:o,open:c,zIndex:I,mask:oe,motion:de,mobile:J}),p.createElement(Wg,{onResize:me,disabled:!c},ye=>p.createElement(qg,are({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:S,leavedClassName:`${o}-hidden`},ae,{onAppearPrepare:W,onEnterPrepare:W,visible:c,onVisibleChanged:ve=>{var ge;(ge=y==null?void 0:y.onVisibleChanged)==null||ge.call(y,ve),l(ve)}}),({className:ve,style:ge},Ee)=>{const xe=Ae(o,ve,r,{[`${o}-mobile`]:J});return p.createElement("div",{ref:hp(ye,t,Ee),className:xe,style:{"--arrow-x":`${g.x||0}px`,"--arrow-y":`${g.y||0}px`,...fe,...te,...ge,boxSizing:"border-box",zIndex:I,...i},onMouseEnter:A,onMouseLeave:R,onPointerEnter:k,onClick:f,onPointerDownCapture:T},m&&p.createElement(dfn,{prefixCls:o,arrow:m,arrowPos:g,align:b}),p.createElement(pfn,{cache:!c&&!d},q))})),E)}),KB=p.createContext(null),Fqe=p.createContext(null);function m5e(e){return e?Array.isArray(e)?e:[e]:[]}function hfn(e,t,n){return p.useMemo(()=>{const r=m5e(t??e),o=m5e(n??e),i=new Set(r),a=new Set(o);return i.has("hover")&&!i.has("click")&&i.add("touch"),a.has("hover")&&!a.has("click")&&a.add("touch"),[i,a]},[e,t,n])}const jO=(e=>{if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){const{width:t,height:n}=e.getBBox();if(t||n)return!0}if(e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();if(t||n)return!0}}return!1});function mfn(e=[],t=[],n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function Bqe(e,t,n,r){var a;const{points:o}=n,i=Object.keys(e);for(let l=0;lr.includes(l))&&t.push(n),n=n.parentElement}return t}function iR(e,t=1){return Number.isNaN(e)?t:e}function FT(e){return iR(parseFloat(e),0)}function g5e(e,t){const n={...e};return(t||[]).forEach(r=>{if(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)return;const{overflow:o,overflowClipMargin:i,borderTopWidth:a,borderBottomWidth:l,borderLeftWidth:c,borderRightWidth:u}=NO(r).getComputedStyle(r),d=r.getBoundingClientRect(),{offsetHeight:f,clientHeight:h,offsetWidth:m,clientWidth:g}=r,b=FT(a),y=FT(l),v=FT(c),x=FT(u),S=iR(Math.round(d.width/m*1e3)/1e3),C=iR(Math.round(d.height/f*1e3)/1e3),_=(m-g-v-x)*S,N=(f-h-b-y)*C,E=b*C,I=y*C,A=v*S,R=x*S;let k=0,T=0;if(o==="clip"){const U=FT(i);k=U*S,T=U*C}const D=d.x+A-k,O=d.y+E-T,z=D+d.width+2*k-A-R-_,F=O+d.height+2*T-E-I-N;n.left=Math.max(n.left,D),n.top=Math.max(n.top,O),n.right=Math.min(n.right,z),n.bottom=Math.min(n.bottom,F)}),n}function y5e(e,t=0){const n=`${t}`,r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function b5e(e,t){const[n,r]=t||[];return[y5e(e.width,n),y5e(e.height,r)]}function v5e(e=""){return[e[0],e[1]]}function qN(e,t){const n=t[0],r=t[1];let o,i;return n==="t"?i=e.y:n==="b"?i=e.y+e.height:i=e.y+e.height/2,r==="l"?o=e.x:r==="r"?o=e.x+e.width:o=e.x+e.width/2,{x:o,y:i}}function X1(e,t){const n={t:"b",b:"t",l:"r",r:"l"};return e.map((r,o)=>o===t?n[r]||"c":r).join("")}function zqe(e,t,n,r,o,i,a,l){const[c,u]=p.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[r]||{}}),d=p.useRef(0),f=p.useMemo(()=>!t||l?[]:sre(t),[t]),h=p.useRef({});e||(()=>{h.current={}})();const g=Xo(()=>{var v,x;if(t&&n&&e&&!l){let mt=function(xt,Vt,bt=ye){const Lt=z.x+xt,Jt=z.y+Vt,bn=Lt+Z,ar=Jt+q,Tr=Math.max(Lt,bt.left),rr=Math.max(Jt,bt.top),lr=Math.min(bn,bt.right),dn=Math.min(ar,bt.bottom);return Math.max(0,(lr-Tr)*(dn-rr))},ln=function(){tt=z.y+Ye,jt=tt+q,Nn=z.x+qe,Xt=Nn+Z};const S=t,C=S.ownerDocument,_=NO(S),{position:N}=_.getComputedStyle(S),E=S.style.left,I=S.style.top,A=S.style.right,R=S.style.bottom,k=S.style.overflow,T={...o[r],...i},D=C.createElement("div");(v=S.parentElement)==null||v.appendChild(D),D.style.left=`${S.offsetLeft}px`,D.style.top=`${S.offsetTop}px`,D.style.position=N,D.style.height=`${S.offsetHeight}px`,D.style.width=`${S.offsetWidth}px`,S.style.left="0",S.style.top="0",S.style.right="auto",S.style.bottom="auto",S.style.overflow="hidden";let O;if(Array.isArray(n))O={x:n[0],y:n[1],width:0,height:0};else{const xt=n.getBoundingClientRect();xt.x=xt.x??xt.left,xt.y=xt.y??xt.top,O={x:xt.x,y:xt.y,width:xt.width,height:xt.height}}const z=S.getBoundingClientRect(),{height:F,width:U}=_.getComputedStyle(S);z.x=z.x??z.left,z.y=z.y??z.top;const{clientWidth:G,clientHeight:W,scrollWidth:Y,scrollHeight:B,scrollTop:$,scrollLeft:K}=C.documentElement,q=z.height,Z=z.width,J=O.height,oe=O.width,de={left:0,top:0,right:G,bottom:W},ae={left:-K,top:-$,right:Y-K,bottom:B-$};let{htmlRegion:ue}=T;const ce="visible",se="visibleFirst";ue!=="scroll"&&ue!==se&&(ue=ce);const me=ue===se,fe=g5e(ae,f),te=g5e(de,f),ye=ue===ce?te:fe,ve=me?te:ye;S.style.left="auto",S.style.top="auto",S.style.right="0",S.style.bottom="0";const ge=S.getBoundingClientRect();S.style.left=E,S.style.top=I,S.style.right=A,S.style.bottom=R,S.style.overflow=k,(x=S.parentElement)==null||x.removeChild(D);const Ee=iR(Math.round(Z/parseFloat(U)*1e3)/1e3),xe=iR(Math.round(q/parseFloat(F)*1e3)/1e3);if(Ee===0||xe===0||MP(n)&&!jO(n))return;const{offset:Ne,targetOffset:_e}=T;let[Be,Te]=b5e(z,Ne);const[Ge,Ze]=b5e(O,_e);O.x-=Ge,O.y-=Ze;const[ht,Oe]=T.points||[],ft=v5e(Oe),Qe=v5e(ht),De=qN(O,ft),st=qN(z,Qe),vt={...T};let qe=De.x-st.x+Be,Ye=De.y-st.y+Te;const Et=mt(qe,Ye),vn=mt(qe,Ye,te),gt=qN(O,["t","l"]),Fe=qN(z,["t","l"]),$e=qN(O,["b","r"]),nt=qN(z,["b","r"]),wt=T.overflow||{},{adjustX:Dt,adjustY:on,shiftX:jn,shiftY:kt}=wt,pn=xt=>typeof xt=="boolean"?xt:xt>=0;let tt,jt,Nn,Xt;ln();const un=pn(on),Kt=Qe[0]===ft[0];if(un&&Qe[0]==="t"&&(jt>ve.bottom||h.current.bt)){let xt=Ye;Kt?xt-=q-J:xt=gt.y-nt.y-Te;const Vt=mt(qe,xt),bt=mt(qe,xt,te);Vt>Et||Vt===Et&&(!me||bt>=vn)?(h.current.bt=!0,Ye=xt,Te=-Te,vt.points=[X1(Qe,0),X1(ft,0)]):h.current.bt=!1}if(un&&Qe[0]==="b"&&(ttEt||Vt===Et&&(!me||bt>=vn)?(h.current.tb=!0,Ye=xt,Te=-Te,vt.points=[X1(Qe,0),X1(ft,0)]):h.current.tb=!1}const On=pn(Dt),Pr=Qe[1]===ft[1];if(On&&Qe[1]==="l"&&(Xt>ve.right||h.current.rl)){let xt=qe;Pr?xt-=Z-oe:xt=gt.x-nt.x-Be;const Vt=mt(xt,Ye),bt=mt(xt,Ye,te);Vt>Et||Vt===Et&&(!me||bt>=vn)?(h.current.rl=!0,qe=xt,Be=-Be,vt.points=[X1(Qe,1),X1(ft,1)]):h.current.rl=!1}if(On&&Qe[1]==="r"&&(NnEt||Vt===Et&&(!me||bt>=vn)?(h.current.lr=!0,qe=xt,Be=-Be,vt.points=[X1(Qe,1),X1(ft,1)]):h.current.lr=!1}ln();const ur=jn===!0?0:jn;typeof ur=="number"&&(Nnte.right&&(qe-=Xt-te.right-Be,O.x>te.right-ur&&(qe+=O.x-te.right+ur)));const Ht=kt===!0?0:kt;typeof Ht=="number"&&(ttte.bottom&&(Ye-=jt-te.bottom-Te,O.y>te.bottom-Ht&&(Ye+=O.y-te.bottom+Ht)));const Tt=z.x+qe,Zt=Tt+Z,Ut=z.y+Ye,Sn=Ut+q,Mn=O.x,lt=Mn+oe,Xe=O.y,yt=Xe+J,Mt=Math.max(Tt,Mn),tn=Math.min(Zt,lt),Tn=(Mt+tn)/2-Tt,Fn=Math.max(Ut,Xe),mr=Math.min(Sn,yt),En=(Fn+mr)/2-Ut;a==null||a(t,vt);let Me=ge.right-z.x-(qe+z.width),Ie=ge.bottom-z.y-(Ye+z.height);Ee===1&&(qe=Math.round(qe),Me=Math.round(Me)),xe===1&&(Ye=Math.round(Ye),Ie=Math.round(Ie));const et={ready:!0,offsetX:qe/Ee,offsetY:Ye/xe,offsetR:Me/Ee,offsetB:Ie/xe,arrowX:Tn/Ee,arrowY:En/xe,scaleX:Ee,scaleY:xe,align:vt};u(et)}}),b=()=>{d.current+=1;const v=d.current;Promise.resolve().then(()=>{d.current===v&&g()})},y=()=>{u(v=>({...v,ready:!1}))};return ai(y,[r]),ai(()=>{e||y()},[e]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,b]}function Hqe(){const e=p.useRef(null),t=()=>{e.current&&(clearTimeout(e.current),e.current=null)},n=(r,o)=>{t(),o===0?r():e.current=setTimeout(()=>{r()},o*1e3)};return p.useEffect(()=>()=>{t()},[]),n}function gfn(e,t,n,r,o){ai(()=>{if(e&&t&&n){let f=function(){r(),o()};const i=t,a=n,l=sre(i),c=sre(a),u=NO(a),d=new Set([u,...l,...c]);return d.forEach(h=>{h.addEventListener("scroll",f,{passive:!0})}),u.addEventListener("resize",f,{passive:!0}),r(),()=>{d.forEach(h=>{h.removeEventListener("scroll",f),u.removeEventListener("resize",f)})}}},[e,t,n])}function yfn(e,t,n,r,o,i,a,l){const c=p.useRef(e);c.current=e;const u=p.useRef(!1);p.useEffect(()=>{if(t&&r&&(!o||i)){const f=()=>{u.current=!1},h=b=>{var y,v;c.current&&!a(((v=(y=b.composedPath)==null?void 0:y.call(b))==null?void 0:v[0])||b.target)&&!u.current&&l(!1)},m=NO(r);m.addEventListener("pointerdown",f,!0),m.addEventListener("mousedown",h,!0),m.addEventListener("contextmenu",h,!0);const g=WB(n);return g&&(g.addEventListener("mousedown",h,!0),g.addEventListener("contextmenu",h,!0)),()=>{m.removeEventListener("pointerdown",f,!0),m.removeEventListener("mousedown",h,!0),m.removeEventListener("contextmenu",h,!0),g&&(g.removeEventListener("mousedown",h,!0),g.removeEventListener("contextmenu",h,!0))}}},[t,n,r,o,i]);function d(){u.current=!0}return d}function bfn(){const[e,t]=Pe.useState(null),[n,r]=Pe.useState(!1),[o,i]=Pe.useState(!1),a=Pe.useRef(null),l=Xo(u=>{u===!1?(a.current=null,r(!1)):o&&n?a.current=u:(r(!0),t(u),a.current=null,n||i(!0))}),c=Xo(u=>{u?(i(!1),a.current&&(t(a.current),a.current=null)):(i(!1),a.current=null)});return[l,n,e,c]}function lre(){return lre=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:t,isMobile:n,ready:r,open:o,align:i,offsetR:a,offsetB:l,offsetX:c,offsetY:u,arrowPos:d,popupSize:f,motion:h,uniqueContainerClassName:m,uniqueContainerStyle:g}=e,b=`${t}-unique-container`,[y,v]=Pe.useState(!1),x=Lqe(n,r,o,i,a,l,c,u),S=Pe.useRef(x);r&&(S.current=x);const C={};return f&&(C.width=f.width,C.height=f.height),Pe.createElement(qg,lre({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${b}-hidden`},h,{visible:o,onVisibleChanged:_=>{v(_)}}),({className:_,style:N})=>{const E=Ae(b,_,m,{[`${b}-visible`]:y});return Pe.createElement("div",{className:E,style:{"--arrow-x":`${(d==null?void 0:d.x)||0}px`,"--arrow-y":`${(d==null?void 0:d.y)||0}px`,...S.current,...C,...N,...g}})})},xfn=({children:e,postTriggerProps:t})=>{const[n,r,o,i]=bfn(),a=p.useMemo(()=>!o||!t?o:t(o),[o,t]),[l,c]=p.useState(null),[u,d]=p.useState(null),f=p.useRef(null),h=Xo(G=>{f.current=G,MP(G)&&l!==G&&c(G)}),m=p.useRef(null),g=Hqe(),b=Xo((G,W)=>{m.current=W,g(()=>{n(G)},G.delay)}),y=G=>{g(()=>{var W;(W=m.current)!=null&&W.call(m)||n(!1)},G)},v=Xo(G=>{i(G)}),[x,S,C,_,N,E,I,,,A,R]=zqe(r,l,a==null?void 0:a.target,a==null?void 0:a.popupPlacement,(a==null?void 0:a.builtinPlacements)||{},a==null?void 0:a.popupAlign,void 0,!1),k=p.useMemo(()=>{var W;if(!a)return"";const G=Bqe(a.builtinPlacements||{},a.prefixCls||"",A,!1);return Ae(G,(W=a.getPopupClassNameFromAlign)==null?void 0:W.call(a,A))},[A,a==null?void 0:a.getPopupClassNameFromAlign,a==null?void 0:a.builtinPlacements,a==null?void 0:a.prefixCls]),T=p.useMemo(()=>({show:b,hide:y}),[]);p.useEffect(()=>{R()},[a==null?void 0:a.target]);const D=Xo(()=>(R(),Promise.resolve())),O=p.useRef({}),z=p.useContext(KB),F=p.useMemo(()=>({registerSubPopup:(G,W)=>{O.current[G]=W,z==null||z.registerSubPopup(G,W)}}),[z]),U=a==null?void 0:a.prefixCls;return p.createElement(Fqe.Provider,{value:T},e,a&&p.createElement(KB.Provider,{value:F},p.createElement($qe,{ref:h,portal:VV,prefixCls:U,popup:a.popup,className:Ae(a.popupClassName,k,`${U}-unique-controlled`),style:a.popupStyle,target:a.target,open:r,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:v,ready:x,offsetX:S,offsetY:C,offsetR:_,offsetB:N,onAlign:R,onPrepare:D,onResize:G=>d({width:G.offsetWidth,height:G.offsetHeight}),arrowPos:{x:E,y:I},align:A,zIndex:a.zIndex,mask:a.mask,arrow:a.arrow,motion:a.popupMotion,maskMotion:a.maskMotion,getPopupContainer:a.getPopupContainer},p.createElement(vfn,{prefixCls:U,isMobile:!1,ready:x,open:r,align:A,offsetR:_,offsetB:N,offsetX:S,offsetY:C,arrowPos:{x:E,y:I},popupSize:u,motion:a.popupMotion,uniqueContainerClassName:Ae(a.uniqueContainerClassName,k),uniqueContainerStyle:a.uniqueContainerStyle}))))};function wfn(e=VV){return p.forwardRef((n,r)=>{const{prefixCls:o="rc-trigger-popup",children:i,action:a="hover",showAction:l,hideAction:c,popupVisible:u,defaultPopupVisible:d,onOpenChange:f,afterOpenChange:h,onPopupVisibleChange:m,afterPopupVisibleChange:g,mouseEnterDelay:b,mouseLeaveDelay:y=.1,focusDelay:v,blurDelay:x,mask:S,maskClosable:C=!0,getPopupContainer:_,forceRender:N,autoDestroy:E,popup:I,popupClassName:A,uniqueContainerClassName:R,uniqueContainerStyle:k,popupStyle:T,popupPlacement:D,builtinPlacements:O={},popupAlign:z,zIndex:F,stretch:U,getPopupClassNameFromAlign:G,fresh:W,unique:Y,alignPoint:B,onPopupClick:$,onPopupAlign:K,arrow:q,popupMotion:Z,maskMotion:J,mobile:oe,...de}=n,ae=E||!1,ue=u===void 0,ce=!!oe,se=p.useRef({}),me=p.useContext(KB),fe=p.useMemo(()=>({registerSubPopup:(dn,gr)=>{se.current[dn]=gr,me==null||me.registerSubPopup(dn,gr)}}),[me]),te=p.useContext(Fqe),ye=eA(),[ve,ge]=p.useState(null),Ee=p.useRef(null),xe=Xo(dn=>{Ee.current=dn,MP(dn)&&ve!==dn&&ge(dn),me==null||me.registerSubPopup(ye,dn)}),[Ne,_e]=p.useState(null),Be=p.useRef(null),Te=Xo(dn=>{MP(dn)&&Ne!==dn&&(_e(dn),Be.current=dn)}),Ge={},Ze=Xo(dn=>{var vr,zi;const gr=Ne;return(gr==null?void 0:gr.contains(dn))||((vr=WB(gr))==null?void 0:vr.host)===dn||dn===gr||(ve==null?void 0:ve.contains(dn))||((zi=WB(ve))==null?void 0:zi.host)===dn||dn===ve||Object.values(se.current).some(Vo=>(Vo==null?void 0:Vo.contains(dn))||dn===Vo)}),ht=q?{...q!==!0?q:{}}:null,[Oe,ft]=Ku(d||!1,u),Qe=Oe||!1,De=p.useMemo(()=>{const dn=typeof i=="function"?i({open:Qe}):i;return p.Children.only(dn)},[i,Qe]),st=(De==null?void 0:De.props)||{},vt=Xo(()=>Qe),qe=Xo((dn=0)=>({popup:I,target:Ne,delay:dn,prefixCls:o,popupClassName:A,uniqueContainerClassName:R,uniqueContainerStyle:k,popupStyle:T,popupPlacement:D,builtinPlacements:O,popupAlign:z,zIndex:F,mask:S,maskClosable:C,popupMotion:Z,maskMotion:J,arrow:ht,getPopupContainer:_,getPopupClassNameFromAlign:G,id:ye}));ai(()=>{te&&Y&&Ne&&!ue&&!me&&(Qe?te.show(qe(b),vt):te.hide(y))},[Qe,Ne]);const Ye=p.useRef(Qe);Ye.current=Qe;const mt=p.useRef([]);mt.current=[];const Et=Xo(dn=>{ft(dn),(mt.current[mt.current.length-1]??Qe)!==dn&&(mt.current.push(dn),f==null||f(dn),m==null||m(dn))}),vn=Hqe(),gt=(dn,gr=0)=>{if(u!==void 0){vn(()=>{Et(dn)},gr);return}if(te&&Y&&ue&&!me){dn?te.show(qe(gr),vt):te.hide(gr);return}vn(()=>{Et(dn)},gr)},[Fe,$e]=p.useState(!1);ai(dn=>{(!dn||Qe)&&$e(!0)},[Qe]);const[nt,wt]=p.useState(null),[Dt,on]=p.useState(null),jn=dn=>{on([dn.clientX,dn.clientY])},[kt,pn,tt,jt,Nn,Xt,ln,un,Kt,On,Pr]=zqe(Qe,ve,B&&Dt!==null?Dt:Ne,D,O,z,K,ce),[ur,Ht]=hfn(a,l,c),Tt=ur.has("click"),Zt=Ht.has("click")||Ht.has("contextMenu"),Ut=Xo(()=>{Fe||Pr()});gfn(Qe,Ne,ve,Ut,()=>{Ye.current&&B&&Zt&>(!1)}),ai(()=>{Ut()},[Dt,D]),ai(()=>{Qe&&!(O!=null&&O[D])&&Ut()},[JSON.stringify(z)]);const Mn=p.useMemo(()=>{const dn=Bqe(O,o,On,B);return Ae(dn,G==null?void 0:G(On))},[On,G,O,o,B]);p.useImperativeHandle(r,()=>({nativeElement:Be.current,popupElement:Ee.current,forceAlign:Ut}));const[lt,Xe]=p.useState(0),[yt,Mt]=p.useState(0),tn=()=>{if(U&&Ne){const dn=Ne.getBoundingClientRect();Xe(dn.width),Mt(dn.height)}},mn=()=>{tn(),Ut()},Tn=dn=>{$e(!1),Pr(),h==null||h(dn),g==null||g(dn)},Fn=()=>new Promise(dn=>{tn(),wt(()=>dn)});ai(()=>{nt&&(Pr(),nt(),wt(null))},[nt]);function mr(dn,gr,vr,zi,Vo){Ge[dn]=(li,...lo)=>{var la;(!Vo||!Vo())&&(zi==null||zi(li),gt(gr,vr)),(la=st[dn])==null||la.call(st,li,...lo)}}const fr=ur.has("touch"),En=Ht.has("touch"),Me=p.useRef(!1);(fr||En)&&(Ge.onTouchStart=(...dn)=>{var gr;Me.current=!0,Ye.current&&En?gt(!1):!Ye.current&&fr&>(!0),(gr=st.onTouchStart)==null||gr.call(st,...dn)}),(Tt||Zt)&&(Ge.onClick=(dn,...gr)=>{var vr;Ye.current&&Zt?gt(!1):!Ye.current&&Tt&&(jn(dn),gt(!0)),(vr=st.onClick)==null||vr.call(st,dn,...gr),Me.current=!1});const Ie=yfn(Qe,Zt||En,Ne,ve,S,C,Ze,gt),et=ur.has("hover"),xt=Ht.has("hover");let Vt,bt;const Lt=()=>Me.current;if(et){const dn=gr=>{jn(gr)};mr("onMouseEnter",!0,b,dn,Lt),mr("onPointerEnter",!0,b,dn,Lt),Vt=gr=>{(Qe||Fe)&&(ve!=null&&ve.contains(gr.target))&>(!0,b)},B&&(Ge.onMouseMove=gr=>{var vr;(vr=st.onMouseMove)==null||vr.call(st,gr)})}xt&&(mr("onMouseLeave",!1,y,void 0,Lt),mr("onPointerLeave",!1,y,void 0,Lt),bt=()=>{gt(!1,y)}),ur.has("focus")&&mr("onFocus",!0,v),Ht.has("focus")&&mr("onBlur",!1,x),ur.has("contextMenu")&&(Ge.onContextMenu=(dn,...gr)=>{var vr;Ye.current&&Ht.has("contextMenu")?gt(!1):(jn(dn),gt(!0)),dn.preventDefault(),(vr=st.onContextMenu)==null||vr.call(st,dn,...gr)});const Jt=p.useRef(!1);Jt.current||(Jt.current=N||Qe||Fe);const bn={...st,...Ge},ar={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(dn=>{de[dn]&&(ar[dn]=(...gr)=>{var vr;(vr=bn[dn])==null||vr.call(bn,...gr),de[dn](...gr)})});const rr={x:Xt,y:ln},lr=p.cloneElement(De,{...bn,...ar});return p.createElement(p.Fragment,null,p.createElement(Wg,{disabled:!Qe,ref:Te,onResize:mn},lr),Jt.current&&(!te||!Y)&&p.createElement(KB.Provider,{value:fe},p.createElement($qe,{portal:e,ref:xe,prefixCls:o,popup:I,className:Ae(A,!ce&&Mn),style:T,target:Ne,onMouseEnter:Vt,onMouseLeave:bt,onPointerEnter:Vt,zIndex:F,open:Qe,keepDom:Fe,fresh:W,onClick:$,onPointerDownCapture:Ie,mask:S,motion:Z,maskMotion:J,onVisibleChanged:Tn,onPrepare:Fn,forceRender:N,autoDestroy:ae,getPopupContainer:_,align:On,arrow:ht,arrowPos:rr,ready:kt,offsetX:pn,offsetY:tt,offsetR:jt,offsetB:Nn,onAlign:Ut,stretch:U,targetWidth:lt/un,targetHeight:yt/Kt,mobile:oe})))})}const UV=wfn(VV),Sfn=({children:e})=>{const{getPrefixCls:t}=Pe.useContext(Ho),n=t();return Pe.isValidElement(e)?Pe.createElement(qg,{visible:!0,motionName:`${n}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:r,className:o})=>{const{className:i,style:a}=e.props,l={...a,...r};return Pe.cloneElement(e,{className:Ae(i,o),style:l})}):e},d6=[null,null];function Cfn(e){if(d6[0]!==e){const t={};Object.keys(e).forEach(n=>{t[n]={...e[n],dynamicInset:!1}}),d6[0]=e,d6[1]=t}return d6[1]}const Vqe=({children:e})=>{const t=n=>{const r=typeof n.popup=="function"?n.popup():n.popup,{id:o,builtinPlacements:i}=n,a=Cfn(i);return{...n,getPopupContainer:null,arrow:!1,popup:Pe.createElement(Sfn,{key:o},r),builtinPlacements:a}};return Pe.createElement(xfn,{postTriggerProps:t},e)},Lg=p.createContext(!1),Afe=({children:e,disabled:t})=>{const n=p.useContext(Lg);return p.createElement(Lg.Provider,{value:t??n},e)},G_=p.createContext(void 0),_fn=({children:e,size:t})=>{const n=p.useContext(G_);return p.createElement(G_.Provider,{value:t||n},e)};function jfn(){const e=p.useContext(Lg),t=p.useContext(G_);return{componentDisabled:e,componentSize:t}}function Nfn(e,t,n){Rj();const r=e||{},o=r.inherit===!1||!t?{...Vne,hashed:(t==null?void 0:t.hashed)??Vne.hashed,cssVar:t==null?void 0:t.cssVar}:t,i=p.useId();return Mj(()=>{var u;if(!e)return t;const a={...o.components};Object.keys(e.components||{}).forEach(d=>{a[d]={...a[d],...e.components[d]}});const l=`css-var-${i.replace(/:/g,"")}`,c={prefix:n==null?void 0:n.prefixCls,...o.cssVar,...r.cssVar,key:((u=r.cssVar)==null?void 0:u.key)||l};return{...o,...r,token:{...o.token,...r.token},components:a,cssVar:c}},[r,o],(a,l)=>a.some((c,u)=>{const d=l[u];return!ey(c,d,!0)}))}const x5e=p.createContext(!0);function Efn(e){const t=p.useContext(x5e),{children:n}=e,[,r]=mp(),{motion:o}=r,i=p.useRef(!1);return i.current||(i.current=t!==o),i.current?p.createElement(x5e.Provider,{value:o},p.createElement(rdn,{motion:o},n)):n}const Pfn=()=>null,Ifn=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let YB,Uqe,Gqe,Wqe;function cX(){return YB||ZM}function Afn(){return Uqe||RV}const Tfn=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e;t!==void 0&&(YB=t),n!==void 0&&(Uqe=n),"holderRender"in e&&(Wqe=o),r&&(Gqe=r)},kfn=()=>({getPrefixCls:(e,t)=>t||(e?`${cX()}-${e}`:cX()),getIconPrefixCls:Afn,getRootPrefixCls:()=>YB||cX(),getTheme:()=>Gqe,holderRender:Wqe}),Mfn=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:a,form:l,locale:c,componentSize:u,direction:d,space:f,splitter:h,virtual:m,dropdownMatchSelectWidth:g,popupMatchSelectWidth:b,popupOverflow:y,legacyLocale:v,parentContext:x,iconPrefixCls:S,theme:C,componentDisabled:_,segmented:N,statistic:E,spin:I,calendar:A,carousel:R,cascader:k,collapse:T,typography:D,checkbox:O,descriptions:z,divider:F,drawer:U,skeleton:G,steps:W,image:Y,layout:B,list:$,mentions:K,modal:q,progress:Z,result:J,slider:oe,breadcrumb:de,masonry:ae,menu:ue,pagination:ce,input:se,textArea:me,otp:fe,empty:te,badge:ye,radio:ve,rate:ge,ribbon:Ee,switch:xe,transfer:Ne,avatar:_e,message:Be,tag:Te,table:Ge,card:Ze,cardMeta:ht,tabs:Oe,timeline:ft,timePicker:Qe,upload:De,notification:st,tree:vt,colorPicker:qe,datePicker:Ye,rangePicker:mt,flex:Et,wave:vn,dropdown:gt,warning:Fe,tour:$e,tooltip:nt,popover:wt,popconfirm:Dt,qrcode:on,floatButton:jn,floatButtonGroup:kt,variant:pn,inputNumber:tt,treeSelect:jt,watermark:Nn}=e,Xt=p.useCallback((Mn,lt)=>{const{prefixCls:Xe}=e;if(lt)return lt;const yt=Xe||x.getPrefixCls("");return Mn?`${yt}-${Mn}`:yt},[x.getPrefixCls,e.prefixCls]),ln=S||x.iconPrefixCls||RV,un=n||x.csp;Lun(ln,un);const Kt=Nfn(C,x.theme,{prefixCls:Xt("")}),On={csp:un,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:a,locale:c||v,direction:d,space:f,splitter:h,virtual:m,popupMatchSelectWidth:b??g,popupOverflow:y,getPrefixCls:Xt,iconPrefixCls:ln,theme:Kt,segmented:N,statistic:E,spin:I,calendar:A,carousel:R,cascader:k,collapse:T,typography:D,checkbox:O,descriptions:z,divider:F,drawer:U,skeleton:G,steps:W,image:Y,input:se,textArea:me,otp:fe,layout:B,list:$,mentions:K,modal:q,progress:Z,result:J,slider:oe,breadcrumb:de,masonry:ae,menu:ue,pagination:ce,empty:te,badge:ye,radio:ve,rate:ge,ribbon:Ee,switch:xe,transfer:Ne,avatar:_e,message:Be,tag:Te,table:Ge,card:Ze,cardMeta:ht,tabs:Oe,timeline:ft,timePicker:Qe,upload:De,notification:st,tree:vt,colorPicker:qe,datePicker:Ye,rangePicker:mt,flex:Et,wave:vn,dropdown:gt,warning:Fe,tour:$e,tooltip:nt,popover:wt,popconfirm:Dt,qrcode:on,floatButton:jn,floatButtonGroup:kt,variant:pn,inputNumber:tt,treeSelect:jt,watermark:Nn},Pr={...x};Object.keys(On).forEach(Mn=>{On[Mn]!==void 0&&(Pr[Mn]=On[Mn])}),Ifn.forEach(Mn=>{const lt=e[Mn];lt&&(Pr[Mn]=lt)}),typeof r<"u"&&(Pr.button={autoInsertSpace:r,...Pr.button});const ur=Mj(()=>Pr,Pr,(Mn,lt)=>{const Xe=Object.keys(Mn),yt=Object.keys(lt);return Xe.length!==yt.length||Xe.some(Mt=>Mn[Mt]!==lt[Mt])}),{layer:Ht}=p.useContext(SO),Tt=p.useMemo(()=>({prefixCls:ln,csp:un,layer:Ht?"antd":void 0}),[ln,un,Ht]);let Zt=p.createElement(p.Fragment,null,p.createElement(Pfn,{dropdownMatchSelectWidth:g}),t);const Ut=p.useMemo(()=>{var Mn,lt,Xe,yt;return h2(((Mn=ty.Form)==null?void 0:Mn.defaultValidateMessages)||{},((Xe=(lt=ur.locale)==null?void 0:lt.Form)==null?void 0:Xe.defaultValidateMessages)||{},((yt=ur.form)==null?void 0:yt.validateMessages)||{},(l==null?void 0:l.validateMessages)||{})},[ur,l==null?void 0:l.validateMessages]);Object.keys(Ut).length>0&&(Zt=p.createElement(Rqe.Provider,{value:Ut},Zt)),c&&(Zt=p.createElement(Mdn,{locale:c,_ANT_MARK__:kdn},Zt)),Zt=p.createElement(Nfe.Provider,{value:Tt},Zt),u&&(Zt=p.createElement(_fn,{size:u},Zt)),Zt=p.createElement(Efn,null,Zt),nt!=null&&nt.unique&&(Zt=p.createElement(Vqe,null,Zt));const Sn=p.useMemo(()=>{const{algorithm:Mn,token:lt,components:Xe,cssVar:yt,...Mt}=Kt||{},tn=Mn&&(!Array.isArray(Mn)||Mn.length>0)?jne(Mn):aqe,mn={};Object.entries(Xe||{}).forEach(([Fn,mr])=>{const fr={...mr};"algorithm"in fr&&(fr.algorithm===!0?fr.theme=tn:(Array.isArray(fr.algorithm)||typeof fr.algorithm=="function")&&(fr.theme=jne(fr.algorithm)),delete fr.algorithm),mn[Fn]=fr});const Tn={...nR,...lt};return{...Mt,theme:tn,token:Tn,components:mn,override:{override:Tn,...mn},cssVar:yt}},[Kt]);return C&&(Zt=p.createElement(sqe.Provider,{value:Sn},Zt)),ur.warning&&(Zt=p.createElement(Gln.Provider,{value:ur.warning},Zt)),_!==void 0&&(Zt=p.createElement(Afe,{disabled:_},Zt)),p.createElement(Ho.Provider,{value:ur},Zt)},g1=e=>{const t=p.useContext(Ho),n=p.useContext(Pfe);return p.createElement(Mfn,{parentContext:t,legacyLocale:n,...e})};g1.ConfigContext=Ho;g1.SizeContext=G_;g1.config=Tfn;g1.useConfig=jfn;Object.defineProperty(g1,"SizeContext",{get:()=>G_});const Wr={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224};var Rfn={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function cre(){return cre=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,cre({},e,{ref:t,icon:Rfn})),EO=p.forwardRef(Ofn),XB="__rc_react_root__";function qqe(e,t){const n=t[XB]||a8e.createRoot(t);n.render(e),t[XB]=n}async function Kqe(e){return Promise.resolve().then(()=>{var t;(t=e[XB])==null||t.unmount(),delete e[XB]})}const uX=()=>({height:0,opacity:0}),w5e=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},Dfn=e=>({height:e?e.offsetHeight:0}),dX=(e,t)=>(t==null?void 0:t.deadline)===!0||t.propertyName==="height",ZB=(e=ZM)=>({motionName:`${e}-motion-collapse`,onAppearStart:uX,onEnterStart:uX,onAppearActive:w5e,onEnterActive:w5e,onLeaveStart:Dfn,onLeaveActive:uX,onAppearEnd:dX,onEnterEnd:dX,onLeaveEnd:dX,motionDeadline:500}),DP=(e,t,n)=>n!==void 0?n:`${e}-${t}`,Lfn=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},$fn=Run("Wave",Lfn),GV=`${ZM}-wave-target`;function S5e(e){return e&&typeof e=="string"&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"&&e!=="canvastext"}function Ffn(e,t=null){const n=getComputedStyle(e),{borderTopColor:r,borderColor:o,backgroundColor:i}=n;return t&&S5e(n[t])?n[t]:[r,o,i].find(S5e)??null}function fX(e){return Number.isNaN(e)?0:e}const Bfn=e=>{const{className:t,target:n,component:r,colorSource:o}=e,i=p.useRef(null),[a,l]=p.useState(null),[c,u]=p.useState([]),[d,f]=p.useState(0),[h,m]=p.useState(0),[g,b]=p.useState(0),[y,v]=p.useState(0),[x,S]=p.useState(!1),C={left:d,top:h,width:g,height:y,borderRadius:c.map(E=>`${E}px`).join(" ")};a&&(C["--wave-color"]=a);function _(){const E=getComputedStyle(n);l(Ffn(n,o));const I=E.position==="static",{borderLeftWidth:A,borderTopWidth:R}=E;f(I?n.offsetLeft:fX(-Number.parseFloat(A))),m(I?n.offsetTop:fX(-Number.parseFloat(R))),b(n.offsetWidth),v(n.offsetHeight);const{borderTopLeftRadius:k,borderTopRightRadius:T,borderBottomLeftRadius:D,borderBottomRightRadius:O}=E;u([k,T,O,D].map(z=>fX(Number.parseFloat(z))))}if(p.useEffect(()=>{if(n){const E=Ri(()=>{_(),S(!0)});let I;return typeof ResizeObserver<"u"&&(I=new ResizeObserver(_),I.observe(n)),()=>{Ri.cancel(E),I==null||I.disconnect()}}},[n]),!x)return null;const N=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(GV));return p.createElement(qg,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(E,I)=>{var A;if(I.deadline||I.propertyName==="opacity"){const R=(A=i.current)==null?void 0:A.parentElement;Kqe(R).then(()=>{R==null||R.remove()})}return!1}},({className:E},I)=>p.createElement("div",{ref:hp(i,I),className:Ae(t,E,{"wave-quick":N}),style:C}))},zfn=(e,t)=>{var o;const{component:n}=t;if(n==="Checkbox"&&!((o=e.querySelector("input"))!=null&&o.checked))return;const r=document.createElement("div");r.style.position="absolute",r.style.left="0px",r.style.top="0px",e==null||e.insertBefore(r,e==null?void 0:e.firstChild),qqe(p.createElement(Bfn,{...t,target:e}),r)},Hfn=(e,t,n,r)=>{const{wave:o}=p.useContext(Ho),[,i,a]=mp(),l=Xo(d=>{const f=e.current;if(o!=null&&o.disabled||!f)return;const h=f.querySelector(`.${GV}`)||f,{showEffect:m}=o||{};(m||zfn)(h,{className:t,token:i,component:n,event:d,hashId:a,colorSource:r})}),c=p.useRef(null);return p.useEffect(()=>()=>{Ri.cancel(c.current)},[]),d=>{Ri.cancel(c.current),c.current=Ri(()=>{l(d)})}},Tfe=e=>{const{children:t,disabled:n,component:r,colorSource:o}=e,{getPrefixCls:i}=p.useContext(Ho),a=p.useRef(null),l=i("wave"),[,c]=$fn(l),u=Hfn(a,Ae(l,c),r,o);if(Pe.useEffect(()=>{const f=a.current;if(!f||f.nodeType!==window.Node.ELEMENT_NODE||n)return;const h=m=>{!jO(m.target)||!f.getAttribute||f.getAttribute("disabled")||f.disabled||f.className.includes("disabled")&&!f.className.includes("disabled:")||f.getAttribute("aria-disabled")==="true"||f.className.includes("-leave")||u(m)};return f.addEventListener("click",h,!0),()=>{f.removeEventListener("click",h,!0)}},[n]),!Pe.isValidElement(t))return t??null;const d=Hb(t)?hp(oC(t),a):a;return Bp(t,{ref:d})},fy=e=>{const t=Pe.useContext(G_);return Pe.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},Vfn=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},Ufn=vl(["Space","Compact"],e=>[Vfn(e)],()=>({}),{resetStyle:!1}),WV=p.createContext(null),Lj=(e,t)=>{const n=p.useContext(WV),r=p.useMemo(()=>{if(!n)return"";const{compactDirection:o,isFirstItem:i,isLastItem:a}=n,l=o==="vertical"?"-vertical-":"-";return Ae(`${e}-compact${l}item`,{[`${e}-compact${l}first-item`]:i,[`${e}-compact${l}last-item`]:a,[`${e}-compact${l}item-rtl`]:t==="rtl"})},[e,t,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},Gfn=e=>{const{children:t}=e;return p.createElement(WV.Provider,{value:null},t)},Wfn=e=>{const{children:t,...n}=e;return p.createElement(WV.Provider,{value:p.useMemo(()=>n,[n])},t)},Yqe=e=>{const{getPrefixCls:t,direction:n}=p.useContext(Ho),{size:r,direction:o,orientation:i,block:a,prefixCls:l,className:c,rootClassName:u,children:d,vertical:f,...h}=e,[m,g]=Ife(i,f,o),b=fy(N=>r??N),y=t("space-compact",l),[v]=Ufn(y),x=Ae(y,v,{[`${y}-rtl`]:n==="rtl",[`${y}-block`]:a,[`${y}-vertical`]:g},c,u),S=p.useContext(WV),C=$p(d),_=p.useMemo(()=>C.map((N,E)=>{const I=(N==null?void 0:N.key)||`${y}-item-${E}`;return p.createElement(Wfn,{key:I,compactSize:b,compactDirection:m,isFirstItem:E===0&&(!S||(S==null?void 0:S.isFirstItem)),isLastItem:E===C.length-1&&(!S||(S==null?void 0:S.isLastItem))},N)}),[C,S,m,b,y]);return C.length===0?null:p.createElement("div",{className:x,...h},_)},Xqe=p.createContext(void 0),qfn=e=>{const{getPrefixCls:t,direction:n}=p.useContext(Ho),{prefixCls:r,size:o,className:i,...a}=e,l=t("btn-group",r),[,,c]=mp(),u=p.useMemo(()=>{switch(o){case"large":return"lg";case"small":return"sm";default:return""}},[o]),d=Ae(l,{[`${l}-${u}`]:u,[`${l}-rtl`]:n==="rtl"},i,c);return p.createElement(Xqe.Provider,{value:o},p.createElement("div",{...a,className:d}))},C5e=/^[\u4E00-\u9FA5]{2}$/,ure=C5e.test.bind(C5e);function Zqe(e){return e==="danger"?{danger:!0}:{type:e}}function _5e(e){return typeof e=="string"}function pX(e){return e==="text"||e==="link"}function Kfn(e,t,n,r){if(!Fp(e)||e==="")return;const o=t?" ":"";return typeof e!="string"&&typeof e!="number"&&_5e(e.type)&&ure(e.props.children)?Bp(e,i=>({...i,children:i.children.split("").join(o),className:r,style:n})):_5e(e)?Pe.createElement("span",{className:r,style:n},ure(e)?e.split("").join(o):e):Mqe(e)?Pe.createElement("span",{className:r,style:n},e):Bp(e,i=>({...i,className:Ae(i.className,r)||void 0,style:{...i.style,...n}}))}function Yfn(e,t,n,r){let o=!1;const i=[];return Pe.Children.forEach(e,a=>{const l=typeof a,c=l==="string"||l==="number";if(o&&c){const u=i.length-1,d=i[u];i[u]=`${d}${a}`}else i.push(a);o=c}),Pe.Children.map(i,a=>Kfn(a,t,n,r))}["default","primary","danger"].concat(So(U_));const Jqe=p.forwardRef((e,t)=>{const{className:n,style:r,children:o,prefixCls:i}=e,a=Ae(`${i}-icon`,n);return Pe.createElement("span",{ref:t,className:a,style:r},o)}),j5e=p.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=e,a=Ae(`${n}-loading-icon`,r);return Pe.createElement(Jqe,{prefixCls:n,className:a,style:o,ref:t},Pe.createElement(EO,{className:i}))}),hX=()=>({width:0,opacity:0,transform:"scale(0)"}),mX=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),Xfn=e=>{const{prefixCls:t,loading:n,existIcon:r,className:o,style:i,mount:a}=e,l=!!n;return r?Pe.createElement(j5e,{prefixCls:t,className:o,style:i}):Pe.createElement(qg,{visible:l,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:hX,onAppearActive:mX,onEnterStart:hX,onEnterActive:mX,onLeaveStart:mX,onLeaveActive:hX},({className:c,style:u},d)=>{const f={...i,...u};return Pe.createElement(j5e,{prefixCls:t,className:Ae(o,c),style:f,ref:d})})},N5e=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),Zfn=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},N5e(`${t}-primary`,o),N5e(`${t}-danger`,i)]}},gX=e=>Math.round(Number(e||0)),Jfn=e=>{if(e instanceof Xa)return e;if(e&&typeof e=="object"&&"h"in e&&"b"in e){const{b:t,...n}=e;return{...n,v:t}}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e};let aR=class extends Xa{constructor(t){super(Jfn(t))}toHsbString(){const t=this.toHsb(),n=gX(t.s*100),r=gX(t.b*100),o=gX(t.h),i=t.a,a=`hsb(${o}, ${n}%, ${r}%)`,l=`hsba(${o}, ${n}%, ${r}%, ${i.toFixed(i===0?0:2)})`;return i===1?a:l}toHsb(){const{v:t,...n}=this.toHsv();return{...n,b:t,a:this.a}}};const Qfn=e=>e instanceof aR?e:new aR(e);Qfn("#1677ff");const epn=(e,t)=>(e==null?void 0:e.replace(/[^\w/]/g,"").slice(0,t?8:6))||"",tpn=(e,t)=>e?epn(e,t):"";let dre=(function(){function e(t){var r;if(Oj(this,e),this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(r=t.colors)==null?void 0:r.map(o=>({color:new e(o.color),percent:o.percent})),this.cleared=t.cleared;return}const n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:o,percent:i})=>({color:new e(o),percent:i})),this.metaColor=new aR(this.colors[0].color.metaColor)):this.metaColor=new aR(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return Dj(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return tpn(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(o=>`${o.color.toRgbString()} ${o.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,o)=>{const i=n.colors[o];return r.percent===i.percent&&r.color.equals(i.color)}):this.toHexString()===n.toHexString()}}])})();var npn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function fre(){return fre=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,fre({},e,{ref:t,icon:npn})),pre=p.forwardRef(rpn),kfe=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, + opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, + opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),opn=e=>({animationDuration:e,animationFillMode:"both"}),ipn=e=>({animationDuration:e,animationFillMode:"both"}),qV=(e,t,n,r,o=!1)=>{const i=o?"&":"";return{[` + ${i}${e}-enter, + ${i}${e}-appear + `]:{...opn(r),animationPlayState:"paused"},[`${i}${e}-leave`]:{...ipn(r),animationPlayState:"paused"},[` + ${i}${e}-enter${e}-enter-active, + ${i}${e}-appear${e}-appear-active + `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},apn=new Ca("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),spn=new Ca("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),Qqe=(e,t=!1)=>{const{antCls:n}=e,r=`${n}-fade`,o=t?"&":"";return[qV(r,apn,spn,e.motionDurationMid,t),{[` + ${o}${r}-enter, + ${o}${r}-appear + `]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},lpn=new Ca("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),cpn=new Ca("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),upn=new Ca("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),dpn=new Ca("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),fpn=new Ca("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ppn=new Ca("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),hpn=new Ca("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),mpn=new Ca("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),gpn={"move-up":{inKeyframes:hpn,outKeyframes:mpn},"move-down":{inKeyframes:lpn,outKeyframes:cpn},"move-left":{inKeyframes:upn,outKeyframes:dpn},"move-right":{inKeyframes:fpn,outKeyframes:ppn}},JB=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=gpn[t];return[qV(r,o,i,e.motionDurationMid),{[` + ${r}-enter, + ${r}-appear + `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Mfe=new Ca("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Rfe=new Ca("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Ofe=new Ca("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Dfe=new Ca("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),ypn=new Ca("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),bpn=new Ca("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),vpn=new Ca("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),xpn=new Ca("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),wpn={"slide-up":{inKeyframes:Mfe,outKeyframes:Rfe},"slide-down":{inKeyframes:Ofe,outKeyframes:Dfe},"slide-left":{inKeyframes:ypn,outKeyframes:bpn},"slide-right":{inKeyframes:vpn,outKeyframes:xpn}},LP=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=wpn[t];return[qV(r,o,i,e.motionDurationMid),{[` + ${r}-enter, + ${r}-appear + `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},Lfe=new Ca("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Spn=new Ca("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),E5e=new Ca("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),P5e=new Ca("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),Cpn=new Ca("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),_pn=new Ca("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),jpn=new Ca("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),Npn=new Ca("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),Epn=new Ca("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),Ppn=new Ca("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),Ipn=new Ca("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),Apn=new Ca("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),Tpn={zoom:{inKeyframes:Lfe,outKeyframes:Spn},"zoom-big":{inKeyframes:E5e,outKeyframes:P5e},"zoom-big-fast":{inKeyframes:E5e,outKeyframes:P5e},"zoom-left":{inKeyframes:jpn,outKeyframes:Npn},"zoom-right":{inKeyframes:Epn,outKeyframes:Ppn},"zoom-up":{inKeyframes:Cpn,outKeyframes:_pn},"zoom-down":{inKeyframes:Ipn,outKeyframes:Apn}},KV=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=Tpn[t];return[qV(r,o,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[` + ${r}-enter, + ${r}-appear + `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},kpn=e=>e instanceof dre?e:new dre(e),Mpn=(e,t)=>{const{r:n,g:r,b:o,a:i}=e.toRgb(),a=new aR(e.toRgbString()).onBackground(t).toHsv();return i<=.5?a.v>.5:n*.299+r*.587+o*.114>192},eKe=e=>{const{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return hs(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},tKe=e=>{const t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,o=e.contentLineHeight??C8(t),i=e.contentLineHeightSM??C8(n),a=e.contentLineHeightLG??C8(r),l=Mpn(new dre(e.colorBgSolid),"#fff")?"#000":"#fff",c=U_.reduce((f,h)=>({...f,[`${h}ShadowColor`]:`0 ${en(e.controlOutlineWidth)} 0 ${Bk(e[`${h}1`],e.colorBgContainer)}`}),{}),u=e.colorBgContainerDisabled,d=e.colorBgContainerDisabled;return{...c,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:l,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:o,contentLineHeightSM:i,contentLineHeightLG:a,paddingBlock:Math.max((e.controlHeight-t*o)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*i)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*a)/2-e.lineWidth,0),defaultBgDisabled:u,dashedBgDisabled:d}},Rpn=e=>{const{componentCls:t,antCls:n}=e,r=Oun(n,"btn");return{[t]:[{[r("border-width")]:"1px",[r("border-color")]:"#000",[r("border-color-hover")]:`var(${r("border-color")})`,[r("border-color-active")]:`var(${r("border-color")})`,[r("border-color-disabled")]:`var(${r("border-color")})`,[r("border-style")]:"solid",[r("text-color")]:"#000",[r("text-color-hover")]:`var(${r("text-color")})`,[r("text-color-active")]:`var(${r("text-color")})`,[r("text-color-disabled")]:`var(${r("text-color")})`,[r("bg-color")]:"#ddd",[r("bg-color-hover")]:`var(${r("bg-color")})`,[r("bg-color-active")]:`var(${r("bg-color")})`,[r("bg-color-disabled")]:e.colorBgContainerDisabled,[r("bg-color-container")]:e.colorBgContainer,[r("shadow")]:"none"},{border:`var(${r("border-width")}) var(${r("border-style")}) var(${r("border-color")})`,color:`var(${r("text-color")})`,backgroundColor:`var(${r("bg-color")})`,[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:`var(${r("border-width")}) var(${r("border-style")}) var(${r("border-color-hover")})`,color:`var(${r("text-color-hover")})`,backgroundColor:`var(${r("bg-color-hover")})`},"&:active":{border:`var(${r("border-width")}) var(${r("border-style")}) var(${r("border-color-active")})`,color:`var(${r("text-color-active")})`,backgroundColor:`var(${r("bg-color-active")})`}}},{[`&${t}-variant-solid`]:{[r("solid-bg-color")]:`var(${r("color-base")})`,[r("solid-bg-color-hover")]:`var(${r("color-hover")})`,[r("solid-bg-color-active")]:`var(${r("color-active")})`,[r("border-color")]:"transparent",[r("text-color")]:e.colorTextLightSolid,[r("bg-color")]:`var(${r("solid-bg-color")})`,[r("bg-color-hover")]:`var(${r("solid-bg-color-hover")})`,[r("bg-color-active")]:`var(${r("solid-bg-color-active")})`,boxShadow:`var(${r("shadow")})`},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[r("border-color")]:`var(${r("color-base")})`,[r("border-color-hover")]:`var(${r("color-hover")})`,[r("border-color-active")]:`var(${r("color-active")})`,[r("bg-color")]:`var(${r("bg-color-container")})`,[r("text-color")]:`var(${r("color-base")})`,[r("text-color-hover")]:`var(${r("color-hover")})`,[r("text-color-active")]:`var(${r("color-active")})`,boxShadow:`var(${r("shadow")})`},[`&${t}-variant-dashed`]:{[r("border-style")]:"dashed",[r("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[r("border-color")]:"transparent",[r("text-color")]:`var(${r("color-base")})`,[r("bg-color")]:`var(${r("color-light")})`,[r("bg-color-hover")]:`var(${r("color-light-hover")})`,[r("bg-color-active")]:`var(${r("color-light-active")})`},[`&${t}-variant-text, &${t}-variant-link`]:{[r("border-color")]:"transparent",[r("text-color")]:`var(${r("color-base")})`,[r("text-color-hover")]:`var(${r("color-hover")})`,[r("text-color-active")]:`var(${r("color-active")})`,[r("bg-color")]:"transparent",[r("bg-color-hover")]:"transparent",[r("bg-color-active")]:"transparent",[`&:disabled, &${e.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${t}-variant-text`]:{[r("bg-color-hover")]:`var(${r("color-light")})`,[r("bg-color-active")]:`var(${r("color-light-active")})`}},{[`&${t}-variant-link`]:{[r("color-base")]:e.colorLink,[r("color-hover")]:e.colorLinkHover,[r("color-active")]:e.colorLinkActive},[`&${t}-color-primary`]:{[r("color-base")]:e.colorPrimary,[r("color-hover")]:e.colorPrimaryHover,[r("color-active")]:e.colorPrimaryActive,[r("color-light")]:e.colorPrimaryBg,[r("color-light-hover")]:e.colorPrimaryBgHover,[r("color-light-active")]:e.colorPrimaryBorder,[r("shadow")]:e.primaryShadow,[`&${t}-variant-solid`]:{[r("text-color")]:e.primaryColor,[r("text-color-hover")]:`var(${r("text-color")})`,[r("text-color-active")]:`var(${r("text-color")})`}},[`&${t}-color-dangerous`]:{[r("color-base")]:e.colorError,[r("color-hover")]:e.colorErrorHover,[r("color-active")]:e.colorErrorActive,[r("color-light")]:e.colorErrorBg,[r("color-light-hover")]:e.colorErrorBgFilledHover,[r("color-light-active")]:e.colorErrorBgActive,[r("shadow")]:e.dangerShadow,[`&${t}-variant-solid`]:{[r("text-color")]:e.dangerColor,[r("text-color-hover")]:`var(${r("text-color")})`,[r("text-color-active")]:`var(${r("text-color")})`}},[`&${t}-color-default`]:{[r("solid-bg-color")]:e.colorBgSolid,[r("solid-bg-color-hover")]:e.colorBgSolidHover,[r("solid-bg-color-active")]:e.colorBgSolidActive,[r("color-base")]:e.defaultBorderColor,[r("color-hover")]:e.defaultHoverBorderColor,[r("color-active")]:e.defaultActiveBorderColor,[r("color-light")]:e.colorFillTertiary,[r("color-light-hover")]:e.colorFillSecondary,[r("color-light-active")]:e.colorFill,[r("text-color")]:e.colorText,[r("text-color-hover")]:e.defaultHoverBorderColor,[r("text-color-active")]:e.defaultActiveBorderColor,[r("shadow")]:e.defaultShadow,[`&${t}-variant-solid`]:{[r("text-color")]:e.solidTextColor,[r("text-color-hover")]:`var(${r("text-color")})`,[r("text-color-active")]:`var(${r("text-color")})`},[`&${t}-variant-filled, &${t}-variant-text`]:{[r("text-color-hover")]:`var(${r("text-color")})`,[r("text-color-active")]:`var(${r("text-color")})`},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[r("bg-color-hover")]:e.defaultHoverBg,[r("bg-color-active")]:e.defaultActiveBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[r("text-color")]:e.defaultGhostColor,[r("border-color")]:e.defaultGhostBorderColor}}}},U_.map(o=>{const i=e[`${o}6`],a=e[`${o}1`],l=e[`${o}5`],c=e[`${o}2`],u=e[`${o}3`],d=e[`${o}7`],f=e[`${o}ShadowColor`];return{[`&${t}-color-${o}`]:{[r("color-base")]:i,[r("color-hover")]:l,[r("color-active")]:d,[r("color-light")]:a,[r("color-light-hover")]:c,[r("color-light-active")]:u,[r("shadow")]:f}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:`var(${r("bg-color-disabled")})`,color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[r("bg-color")]:"transparent",[r("shadow")]:"none"}}]}},Opn=e=>{const{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,iconGap:l,calc:c}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:l,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation","&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:FV(),"> a":{color:"currentColor"},"&:not(:disabled)":OP(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(u=>`${u} ${i} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:c(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:c(l).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:c(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:c(l).mul(-1).equal()}}}}}},Dpn=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),$fe=(e,t="")=>{const{componentCls:n,controlHeight:r,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:l,buttonPaddingVertical:c,buttonIconOnlyFontSize:u}=e;return[{[t]:{fontSize:o,height:r,padding:`${en(c)} ${en(a)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[l]:{fontSize:u}}}},{[`${n}${n}-circle${t}`]:Dpn(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},Lpn=e=>{const t=hs(e,{fontSize:e.contentFontSize});return $fe(t,e.componentCls)},$pn=e=>{const t=hs(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return $fe(t,`${e.componentCls}-sm`)},Fpn=e=>{const t=hs(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return $fe(t,`${e.componentCls}-lg`)},Bpn=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},zpn=vl("Button",e=>{const t=eKe(e);return[Opn(t),Lpn(t),$pn(t),Fpn(t),Bpn(t),Rpn(t),Zfn(t)]},tKe,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function Hpn(e,t,n,r){const{focusElCls:o,focus:i,borderElCls:a}=n,l=a?"> *":"",c=["hover",i?"focus":null,"active"].filter(Boolean).map(u=>`&:${u} ${l}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[c]:{zIndex:3},...o?{[`&${o}`]:{zIndex:3}}:{},[`&[disabled] ${l}`]:{zIndex:0}}}}function Vpn(e,t,n){const{borderElCls:r}=n,o=r?`> ${r}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function YV(e,t={focus:!0}){const{componentCls:n}=e,{componentCls:r}=t,o=r||n,i=`${o}-compact`;return{[i]:{...Hpn(e,i,t,o),...Vpn(o,i,t)}}}function Upn(e,t,n){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function Gpn(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function Wpn(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:{...Upn(e,t,e.componentCls),...Gpn(e.componentCls,t)}}}const qpn=e=>{const{componentCls:t,colorPrimaryHover:n,lineWidth:r,calc:o}=e,i=o(r).mul(-1).equal(),a=l=>{const c=`${t}-compact${l?"-vertical":""}-item`,u=`${c}${t}-primary:not([disabled])`;return{[c]:{transition:"none"},[`${u} + ${u}::before`]:{position:"absolute",top:l?i:0,insetInlineStart:l?0:i,backgroundColor:n,content:'""',width:l?"100%":r,height:l?r:"100%"}}};return{...a(),...a(!0)}},Kpn=BV(["Button","compact"],e=>{const t=eKe(e);return[YV(t),Wpn(t),qpn(t)]},tKe);function Ypn(e){if(typeof e=="object"&&e){let t=e==null?void 0:e.delay;return t=!Number.isNaN(t)&&typeof t=="number"?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}const Xpn={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},Zpn=Pe.forwardRef((e,t)=>{const{_skipSemantic:n,loading:r=!1,prefixCls:o,color:i,variant:a,type:l,danger:c=!1,shape:u,size:d,disabled:f,className:h,rootClassName:m,children:g,icon:b,iconPosition:y,iconPlacement:v,ghost:x=!1,block:S=!1,htmlType:C="button",classNames:_,styles:N,style:E,autoInsertSpace:I,autoFocus:A,...R}=e,k=$p(g),T=l||"default",{button:D}=Pe.useContext(Ho),O=u||(D==null?void 0:D.shape)||"default",[z,F]=p.useMemo(()=>{if(i&&a)return[i,a];if(l||c){const Dt=Xpn[T]||[];return c?["danger",Dt[1]]:Dt}return D!=null&&D.color&&(D!=null&&D.variant)?[D.color,D.variant]:["default","outlined"]},[i,a,l,c,D==null?void 0:D.color,D==null?void 0:D.variant,T]),[U,G]=p.useMemo(()=>x&&F==="solid"?[z,"outlined"]:[z,F],[z,F,x]),W=U==="danger",Y=W?"dangerous":U,{getPrefixCls:B,direction:$,autoInsertSpace:K,className:q,style:Z,classNames:J,styles:oe}=cu("button"),de=I??K??!0,ae=B("btn",o),[ue,ce]=zpn(ae),se=p.useContext(Lg),me=f??se,fe=p.useContext(Xqe),te=p.useMemo(()=>Ypn(r),[r]),[ye,ve]=p.useState(te.loading),[ge,Ee]=p.useState(!1),xe=p.useRef(null),Ne=ZI(t,xe),_e=k.length===1&&!b&&!pX(G),Be=p.useRef(!0);Pe.useEffect(()=>(Be.current=!1,()=>{Be.current=!0}),[]),ai(()=>{let Dt=null;te.delay>0?Dt=setTimeout(()=>{Dt=null,ve(!0)},te.delay):ve(te.loading);function on(){Dt&&(clearTimeout(Dt),Dt=null)}return on},[te.delay,te.loading]),p.useEffect(()=>{if(!xe.current||!de)return;const Dt=xe.current.textContent||"";_e&&ure(Dt)?ge||Ee(!0):ge&&Ee(!1)}),p.useEffect(()=>{A&&xe.current&&xe.current.focus()},[]);const Te=Pe.useCallback(Dt=>{var on;if(ye||me){Dt.preventDefault();return}(on=e.onClick)==null||on.call(e,("href"in e,Dt))},[e.onClick,ye,me]),{compactSize:Ge,compactItemClassnames:Ze}=Lj(ae,$),ht={large:"lg",small:"sm",middle:void 0},Oe=fy(Dt=>d??Ge??fe??Dt),ft=Oe?ht[Oe]??"":"",Qe=ye?"loading":b,De=v??y??"start",st=$l(R,["navigate"]),vt={...e,type:T,color:U,variant:G,danger:W,shape:O,size:Oe,disabled:me,loading:ye,iconPlacement:De},[qe,Ye]=Mu([n?void 0:J,_],[n?void 0:oe,N],{props:vt}),mt=Ae(ae,ue,ce,{[`${ae}-${O}`]:O!=="default"&&O!=="square"&&O,[`${ae}-${T}`]:T,[`${ae}-dangerous`]:c,[`${ae}-color-${Y}`]:Y,[`${ae}-variant-${G}`]:G,[`${ae}-${ft}`]:ft,[`${ae}-icon-only`]:!g&&g!==0&&!!Qe,[`${ae}-background-ghost`]:x&&!pX(G),[`${ae}-loading`]:ye,[`${ae}-two-chinese-chars`]:ge&&de&&!ye,[`${ae}-block`]:S,[`${ae}-rtl`]:$==="rtl",[`${ae}-icon-end`]:De==="end"},Ze,h,m,q,qe.root),Et={...Ye.root,...Z,...E},vn={className:qe.icon,style:Ye.icon},gt=Dt=>Pe.createElement(Jqe,{prefixCls:ae,...vn},Dt),Fe=Pe.createElement(Xfn,{existIcon:!!b,prefixCls:ae,loading:ye,mount:Be.current,...vn});let $e;b&&!ye?$e=gt(b):r&&typeof r=="object"&&r.icon?$e=gt(r.icon):$e=Fe;const nt=Fp(g)?Yfn(g,_e&&de,Ye.content,qe.content):null;if(st.href!==void 0)return Pe.createElement("a",{...st,className:Ae(mt,{[`${ae}-disabled`]:me}),href:me?void 0:st.href,style:Et,onClick:Te,ref:Ne,tabIndex:me?-1:0,"aria-disabled":me},$e,nt);let wt=Pe.createElement("button",{...R,type:C,className:mt,style:Et,onClick:Te,disabled:me,ref:Ne},$e,nt,Ze&&Pe.createElement(Kpn,{prefixCls:ae}));return pX(G)||(wt=Pe.createElement(Tfe,{component:"Button",disabled:ye},wt)),wt}),wd=Zpn;wd.Group=qfn;wd.__ANT_BUTTON=!0;const yX=e=>typeof(e==null?void 0:e.then)=="function",nKe=e=>{const{type:t,children:n,prefixCls:r,buttonProps:o,close:i,autoFocus:a,emitEvent:l,isSilent:c,quitOnNullishReturnValue:u,actionFn:d}=e,f=p.useRef(!1),h=p.useRef(null),[m,g]=XM(!1),b=(...x)=>{i==null||i(...x)};p.useEffect(()=>{let x=null;return a&&(x=setTimeout(()=>{var S;(S=h.current)==null||S.focus({preventScroll:!0})})),()=>{x&&clearTimeout(x)}},[a]);const y=x=>{yX(x)&&(g(!0),x.then((...S)=>{g(!1,!0),b.apply(void 0,S),f.current=!1},S=>{if(g(!1,!0),f.current=!1,!(c!=null&&c()))return Promise.reject(S)}))},v=x=>{if(f.current)return;if(f.current=!0,!d){b();return}let S;if(l){if(S=d(x),u&&!yX(S)){f.current=!1,b(x);return}}else if(d.length)S=d(i),f.current=!1;else if(S=d(),!yX(S)){b();return}y(S)};return p.createElement(wd,{...Zqe(t),onClick:v,loading:m,prefixCls:r,...o,ref:h},n)},PO=Pe.createContext({}),{Provider:rKe}=PO,I5e=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:o,rootPrefixCls:i,close:a,onCancel:l,onConfirm:c,onClose:u}=p.useContext(PO);return o?Pe.createElement(nKe,{isSilent:r,actionFn:l,close:(...d)=>{a==null||a(...d),c==null||c(!1),u==null||u()},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${i}-btn`},n):null},A5e=()=>{const{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:o,okTextLocale:i,okType:a,onConfirm:l,onOk:c,onClose:u}=p.useContext(PO);return Pe.createElement(nKe,{isSilent:n,type:a||"primary",actionFn:c,close:(...d)=>{t==null||t(...d),l==null||l(!0),u==null||u()},autoFocus:e==="ok",buttonProps:r,prefixCls:`${o}-btn`},i)},oKe=p.createContext({});function T5e(e,t,n){let r=t;return!r&&n&&(r=`${e}-${n}`),r}function k5e(e,t){let n=e[`page${t?"Y":"X"}Offset`];const r=`scroll${t?"Top":"Left"}`;if(typeof n!="number"){const o=e.document;n=o.documentElement[r],typeof n!="number"&&(n=o.body[r])}return n}function Jpn(e){const t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,o=r.defaultView||r.parentWindow;return n.left+=k5e(o),n.top+=k5e(o,!0),n}const Qpn=p.memo(({children:e})=>e,(e,{shouldUpdate:t})=>!t);function QB(){return QB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,className:r,style:o,title:i,ariaId:a,footer:l,closable:c,closeIcon:u,onClose:d,children:f,bodyStyle:h,bodyProps:m,modalRender:g,onMouseDown:b,onMouseUp:y,holderRef:v,visible:x,forceRender:S,width:C,height:_,classNames:N,styles:E}=e,{panel:I}=Pe.useContext(oKe),A=ZI(v,I),R=p.useRef(null),k=p.useRef(null);Pe.useImperativeHandle(t,()=>({focus:()=>{var Y;(Y=R.current)==null||Y.focus({preventScroll:!0})},changeActive:Y=>{const{activeElement:B}=document;Y&&B===k.current?R.current.focus({preventScroll:!0}):!Y&&B===R.current&&k.current.focus({preventScroll:!0})}}));const T={};C!==void 0&&(T.width=C),_!==void 0&&(T.height=_);const D=l?Pe.createElement("div",{className:Ae(`${n}-footer`,N==null?void 0:N.footer),style:{...E==null?void 0:E.footer}},l):null,O=i?Pe.createElement("div",{className:Ae(`${n}-header`,N==null?void 0:N.header),style:{...E==null?void 0:E.header}},Pe.createElement("div",{className:Ae(`${n}-title`,N==null?void 0:N.title),id:a,style:{...E==null?void 0:E.title}},i)):null,z=p.useMemo(()=>typeof c=="object"&&c!==null?c:c?{closeIcon:u??Pe.createElement("span",{className:`${n}-close-x`})}:{},[c,u,n]),F=Mh(z,!0),U=typeof c=="object"&&c.disabled,G=c?Pe.createElement("button",QB({type:"button",onClick:d,"aria-label":"Close"},F,{className:`${n}-close`,disabled:U}),z.closeIcon):null,W=Pe.createElement("div",{className:Ae(`${n}-container`,N==null?void 0:N.container),style:E==null?void 0:E.container},G,O,Pe.createElement("div",QB({className:Ae(`${n}-body`,N==null?void 0:N.body),style:{...h,...E==null?void 0:E.body}},m),f),D);return Pe.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?a:null,"aria-modal":"true",ref:A,style:{...o,...T},className:Ae(n,r),onMouseDown:b,onMouseUp:y},Pe.createElement("div",{ref:R,tabIndex:0,style:thn},Pe.createElement(Qpn,{shouldUpdate:x||S},g?g(W):W)),Pe.createElement("div",{tabIndex:0,ref:k,style:ehn}))});function hre(){return hre=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,title:r,style:o,className:i,visible:a,forceRender:l,destroyOnHidden:c,motionName:u,ariaId:d,onVisibleChanged:f,mousePosition:h}=e,m=p.useRef(null),g=p.useRef(null);p.useImperativeHandle(t,()=>({...g.current,inMotion:m.current.inMotion,enableMotion:m.current.enableMotion}));const[b,y]=p.useState(),v={};b&&(v.transformOrigin=b);function x(){const S=Jpn(m.current.nativeElement);y(h&&(h.x||h.y)?`${h.x-S.left}px ${h.y-S.top}px`:"")}return p.createElement(qg,{visible:a,onVisibleChanged:f,onAppearPrepare:x,onEnterPrepare:x,forceRender:l,motionName:u,removeOnLeave:c,ref:m},({className:S,style:C},_)=>p.createElement(iKe,hre({},e,{ref:g,title:r,ariaId:d,prefixCls:n,holderRef:_,style:{...C,...o,...v},className:Ae(i,S)})))});function mre(){return mre=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:t,style:n,visible:r,maskProps:o,motionName:i,className:a}=e;return p.createElement(qg,{key:"mask",visible:r,motionName:i,leavedClassName:`${t}-mask-hidden`},({className:l,style:c},u)=>p.createElement("div",mre({ref:u,style:{...c,...n},className:Ae(`${t}-mask`,l,a)},o)))};function P4(){return P4=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:t="rc-dialog",zIndex:n,visible:r=!1,keyboard:o=!0,focusTriggerAfterClose:i=!0,wrapStyle:a,wrapClassName:l,wrapProps:c,onClose:u,afterOpenChange:d,afterClose:f,transitionName:h,animation:m,closable:g=!0,mask:b=!0,maskTransitionName:y,maskAnimation:v,maskClosable:x=!0,maskStyle:S,maskProps:C,rootClassName:_,rootStyle:N,classNames:E,styles:I}=e,A=p.useRef(null),R=p.useRef(null),k=p.useRef(null),[T,D]=p.useState(r),O=eA();function z(){wne(R.current,document.activeElement)||(A.current=document.activeElement)}function F(){var oe;wne(R.current,document.activeElement)||(oe=k.current)==null||oe.focus()}function U(){if(D(!1),b&&A.current&&i){try{A.current.focus({preventScroll:!0})}catch{}A.current=null}T&&(f==null||f())}function G(oe){oe?F():U(),d==null||d(oe)}function W(oe){u==null||u(oe)}const Y=p.useRef(!1),B=p.useRef(null),$=()=>{clearTimeout(B.current),Y.current=!0},K=()=>{B.current=setTimeout(()=>{Y.current=!1})};let q=null;x&&(q=oe=>{Y.current?Y.current=!1:R.current===oe.target&&W(oe)});function Z(oe){if(o&&oe.keyCode===Wr.ESC){oe.stopPropagation(),W(oe);return}r&&oe.keyCode===Wr.TAB&&k.current.changeActive(!oe.shiftKey)}p.useEffect(()=>{r?(D(!0),z()):T&&k.current.enableMotion()&&!k.current.inMotion()&&U()},[r]),p.useEffect(()=>()=>{clearTimeout(B.current)},[]);const J={zIndex:n,...a,...I==null?void 0:I.wrapper,display:T?null:"none"};return p.createElement("div",P4({className:Ae(`${t}-root`,_),style:N},Mh(e,{data:!0})),p.createElement(rhn,{prefixCls:t,visible:b&&r,motionName:T5e(t,y,v),style:{zIndex:n,...S,...I==null?void 0:I.mask},maskProps:C,className:E==null?void 0:E.mask}),p.createElement("div",P4({tabIndex:-1,onKeyDown:Z,className:Ae(`${t}-wrap`,l,E==null?void 0:E.wrapper),ref:R,onClick:q,style:J},c),p.createElement(nhn,P4({},e,{onMouseDown:$,onMouseUp:K,ref:k,closable:g,ariaId:O,prefixCls:t,visible:r&&T,onClose:W,onVisibleChanged:G,motionName:T5e(t,h,m)}))))};function gre(){return gre=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{visible:t,getContainer:n,forceRender:r,destroyOnHidden:o=!1,afterClose:i,closable:a,panelRef:l}=e,[c,u]=p.useState(t),d=p.useMemo(()=>({panel:l}),[l]);return p.useEffect(()=>{t&&u(!0)},[t]),!r&&o&&!c?null:p.createElement(oKe.Provider,{value:d},p.createElement(VV,{open:t||r||c,autoDestroy:!1,getContainer:n,autoLock:t||c},p.createElement(ohn,gre({},e,{destroyOnHidden:o,afterClose:()=>{const f=a&&typeof a=="object"?a:{},{afterClose:h}=f||{};h==null||h(),i==null||i(),u(!1)}}))))},I2="RC_FORM_INTERNAL_HOOKS",Cs=()=>{ic(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},W_=p.createContext({getFieldValue:Cs,getFieldsValue:Cs,getFieldError:Cs,getFieldWarning:Cs,getFieldsError:Cs,isFieldsTouched:Cs,isFieldTouched:Cs,isFieldValidating:Cs,isFieldsValidating:Cs,resetFields:Cs,setFields:Cs,setFieldValue:Cs,setFieldsValue:Cs,validateFields:Cs,submit:Cs,getInternalHooks:()=>(Cs(),{dispatch:Cs,initEntityValue:Cs,registerField:Cs,useSubscribe:Cs,setInitialValues:Cs,destroyForm:Cs,setCallbacks:Cs,registerWatch:Cs,getFields:Cs,setValidateMessages:Cs,setPreserve:Cs,getInitialValue:Cs,setBatchUpdate:Cs})}),sR=p.createContext(null);function yre(e){return e==null?[]:Array.isArray(e)?e:[e]}function ahn(e){return e&&!!e._init}function bre(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var vre=bre();function shn(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function lhn(e,t,n){if(Sfe())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&NP(o,n.prototype),o}function xre(e){var t=typeof Map=="function"?new Map:void 0;return xre=function(r){if(r===null||!shn(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,o)}function o(){return lhn(r,arguments,tR(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),NP(o,r)},xre(e)}var chn=/%[sdj%]/g,uhn=function(){};function wre(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function gm(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=i)return l;switch(l){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch{return"[Circular]"}break;default:return l}});return a}return e}function dhn(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Cd(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||dhn(t)&&typeof e=="string"&&!e)}function fhn(e,t,n){var r=[],o=0,i=e.length;function a(l){r.push.apply(r,So(l||[])),o++,o===i&&n(r)}e.forEach(function(l){t(l,a)})}function M5e(e,t,n){var r=0,o=e.length;function i(a){if(a&&a.length){n(a);return}var l=r;r=r+1,lt.max?o.push(gm(i.messages[f].max,t.fullField,t.max)):l&&c&&(dt.max)&&o.push(gm(i.messages[f].range,t.fullField,t.min,t.max))},aKe=function(t,n,r,o,i,a){t.required&&(!r.hasOwnProperty(t.field)||Cd(n,a||t.type))&&o.push(gm(i.messages.required,t.fullField))},f6;const xhn=(function(){if(f6)return f6;var e="[a-fA-F\\d:]",t=function(N){return N&&N.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",o=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],i="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(o.join("|"),")").concat(i),l=new RegExp("(?:^".concat(n,"$)|(?:^").concat(a,"$)")),c=new RegExp("^".concat(n,"$")),u=new RegExp("^".concat(a,"$")),d=function(N){return N&&N.exact?l:new RegExp("(?:".concat(t(N)).concat(n).concat(t(N),")|(?:").concat(t(N)).concat(a).concat(t(N),")"),"g")};d.v4=function(_){return _&&_.exact?c:new RegExp("".concat(t(_)).concat(n).concat(t(_)),"g")},d.v6=function(_){return _&&_.exact?u:new RegExp("".concat(t(_)).concat(a).concat(t(_)),"g")};var f="(?:(?:[a-z]+:)?//)",h="(?:\\S+(?::\\S*)?@)?",m=d.v4().source,g=d.v6().source,b="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",y="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",v="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",x="(?::\\d{2,5})?",S='(?:[/?#][^\\s"]*)?',C="(?:".concat(f,"|www\\.)").concat(h,"(?:localhost|").concat(m,"|").concat(g,"|").concat(b).concat(y).concat(v,")").concat(x).concat(S);return f6=new RegExp("(?:^".concat(C,"$)"),"i"),f6});var L5e={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},zk={integer:function(t){return zk.number(t)&&parseInt(t,10)===t},float:function(t){return zk.number(t)&&!zk.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return Ro(t)==="object"&&!zk.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(L5e.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(xhn())},hex:function(t){return typeof t=="string"&&!!t.match(L5e.hex)}},whn=function(t,n,r,o,i){if(t.required&&n===void 0){aKe(t,n,r,o,i);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=t.type;a.indexOf(l)>-1?zk[l](n)||o.push(gm(i.messages.types[l],t.fullField,t.type)):l&&Ro(n)!==t.type&&o.push(gm(i.messages.types[l],t.fullField,t.type))},Shn=function(t,n,r,o,i){(/^\s+$/.test(n)||n==="")&&o.push(gm(i.messages.whitespace,t.fullField))};const qi={required:aKe,whitespace:Shn,type:whn,range:vhn,enum:yhn,pattern:bhn};var Chn=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Cd(n)&&!t.required)return r();qi.required(t,n,o,a,i)}r(a)},_hn=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(n==null&&!t.required)return r();qi.required(t,n,o,a,i,"array"),n!=null&&(qi.type(t,n,o,a,i),qi.range(t,n,o,a,i))}r(a)},jhn=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Cd(n)&&!t.required)return r();qi.required(t,n,o,a,i),n!==void 0&&qi.type(t,n,o,a,i)}r(a)},Nhn=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Cd(n,"date")&&!t.required)return r();if(qi.required(t,n,o,a,i),!Cd(n,"date")){var c;n instanceof Date?c=n:c=new Date(n),qi.type(t,c,o,a,i),c&&qi.range(t,c.getTime(),o,a,i)}}r(a)},Ehn="enum",Phn=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Cd(n)&&!t.required)return r();qi.required(t,n,o,a,i),n!==void 0&&qi[Ehn](t,n,o,a,i)}r(a)},Ihn=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Cd(n)&&!t.required)return r();qi.required(t,n,o,a,i),n!==void 0&&(qi.type(t,n,o,a,i),qi.range(t,n,o,a,i))}r(a)},Ahn=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Cd(n)&&!t.required)return r();qi.required(t,n,o,a,i),n!==void 0&&(qi.type(t,n,o,a,i),qi.range(t,n,o,a,i))}r(a)},Thn=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Cd(n)&&!t.required)return r();qi.required(t,n,o,a,i),n!==void 0&&qi.type(t,n,o,a,i)}r(a)},khn=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(n===""&&(n=void 0),Cd(n)&&!t.required)return r();qi.required(t,n,o,a,i),n!==void 0&&(qi.type(t,n,o,a,i),qi.range(t,n,o,a,i))}r(a)},Mhn=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Cd(n)&&!t.required)return r();qi.required(t,n,o,a,i),n!==void 0&&qi.type(t,n,o,a,i)}r(a)},Rhn=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Cd(n,"string")&&!t.required)return r();qi.required(t,n,o,a,i),Cd(n,"string")||qi.pattern(t,n,o,a,i)}r(a)},Ohn=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Cd(n)&&!t.required)return r();qi.required(t,n,o,a,i),Cd(n)||qi.type(t,n,o,a,i)}r(a)},Dhn=function(t,n,r,o,i){var a=[],l=Array.isArray(n)?"array":Ro(n);qi.required(t,n,o,a,i,l),r(a)},Lhn=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Cd(n,"string")&&!t.required)return r();qi.required(t,n,o,a,i,"string"),Cd(n,"string")||(qi.type(t,n,o,a,i),qi.range(t,n,o,a,i),qi.pattern(t,n,o,a,i),t.whitespace===!0&&qi.whitespace(t,n,o,a,i))}r(a)},bX=function(t,n,r,o,i){var a=t.type,l=[],c=t.required||!t.required&&o.hasOwnProperty(t.field);if(c){if(Cd(n,a)&&!t.required)return r();qi.required(t,n,o,l,i,a),Cd(n,a)||qi.type(t,n,o,l,i)}r(l)};const I4={string:Lhn,method:Thn,number:khn,boolean:jhn,regexp:Ohn,integer:Ahn,float:Ihn,array:_hn,object:Mhn,enum:Phn,pattern:Rhn,date:Nhn,url:bX,hex:bX,email:bX,required:Dhn,any:Chn};var IO=(function(){function e(t){Oj(this,e),Cc(this,"rules",null),Cc(this,"_messages",vre),this.define(t)}return Dj(e,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(Ro(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(o){var i=n[o];r.rules[o]=Array.isArray(i)?i:[i]})}},{key:"messages",value:function(n){return n&&(this._messages=D5e(bre(),n)),this._messages}},{key:"validate",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=n,l=o,c=i;if(typeof l=="function"&&(c=l,l={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,a),Promise.resolve(a);function u(g){var b=[],y={};function v(S){if(Array.isArray(S)){var C;b=(C=b).concat.apply(C,So(S))}else b.push(S)}for(var x=0;x0&&arguments[0]!==void 0?arguments[0]:[],I=Array.isArray(E)?E:[E];!l.suppressWarning&&I.length&&e.warning("async-validator:",I),I.length&&y.message!==void 0&&(I=[].concat(y.message));var A=I.map(O5e(y,a));if(l.first&&A.length)return m[y.field]=1,b(A);if(!v)b(A);else{if(y.required&&!g.value)return y.message!==void 0?A=[].concat(y.message).map(O5e(y,a)):l.error&&(A=[l.error(y,gm(l.messages.required,y.field))]),b(A);var R={};y.defaultField&&Object.keys(g.value).map(function(D){R[D]=y.defaultField}),R=Fr(Fr({},R),g.rule.fields);var k={};Object.keys(R).forEach(function(D){var O=R[D],z=Array.isArray(O)?O:[O];k[D]=z.map(x.bind(null,D))});var T=new e(k);T.messages(l.messages),g.rule.options&&(g.rule.options.messages=l.messages,g.rule.options.error=l.error),T.validate(g.value,g.rule.options||l,function(D){var O=[];A&&A.length&&O.push.apply(O,So(A)),D&&D.length&&O.push.apply(O,So(D)),b(O.length?O:null)})}}var C;if(y.asyncValidator)C=y.asyncValidator(y,g.value,S,g.source,l);else if(y.validator){try{C=y.validator(y,g.value,S,g.source,l)}catch(E){var _,N;(_=(N=console).error)===null||_===void 0||_.call(N,E),l.suppressValidatorError||setTimeout(function(){throw E},0),S(E.message)}C===!0?S():C===!1?S(typeof y.message=="function"?y.message(y.fullField||y.field):y.message||"".concat(y.fullField||y.field," fails")):C instanceof Array?S(C):C instanceof Error&&S(C.message)}C&&C.then&&C.then(function(){return S()},function(E){return S(E)})},function(g){u(g)},a)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!I4.hasOwnProperty(n.type))throw new Error(gm("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),o=r.indexOf("message");return o!==-1&&r.splice(o,1),r.length===1&&r[0]==="required"?I4.required:I4[this.getType(n)]||void 0}}]),e})();Cc(IO,"register",function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");I4[t]=n});Cc(IO,"warning",uhn);Cc(IO,"messages",vre);Cc(IO,"validators",I4);const Zh="'${name}' is not a valid ${type}",sKe={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Zh,method:Zh,array:Zh,object:Zh,number:Zh,date:Zh,boolean:Zh,integer:Zh,float:Zh,regexp:Zh,email:Zh,url:Zh,hex:Zh},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},$5e=IO;function $hn(e,t){return e.replace(/\\?\$\{\w+\}/g,n=>{if(n.startsWith("\\"))return n.slice(1);const r=n.slice(2,-1);return t[r]})}const F5e="CODE_LOGIC_ERROR";async function Sre(e,t,n,r,o){const i={...n};if(delete i.ruleIndex,$5e.warning=()=>{},i.validator){const h=i.validator;i.validator=(...m)=>{try{return h(...m)}catch(g){return console.error(g),Promise.reject(F5e)}}}let a=null;i&&i.type==="array"&&i.defaultField&&(a=i.defaultField,delete i.defaultField);const l=new $5e({[e]:[i]}),c=h2(sKe,r.validateMessages);l.messages(c);let u=[];try{await Promise.resolve(l.validate({[e]:t},{...r}))}catch(h){h.errors&&(u=h.errors.map(({message:m},g)=>{const b=m===F5e?c.default:m;return p.isValidElement(b)?p.cloneElement(b,{key:`error_${g}`}):b}))}if(!u.length&&a&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((m,g)=>Sre(`${e}.${g}`,m,a,r,o)))).reduce((m,g)=>[...m,...g],[]);const d={...n,name:e,enum:(n.enum||[]).join(", "),...o};return u.map(h=>typeof h=="string"?$hn(h,d):h)}function Fhn(e,t,n,r,o,i){const a=e.join("."),l=n.map((u,d)=>{const f=u.validator,h={...u,ruleIndex:d};return f&&(h.validator=(m,g,b)=>{let y=!1;const x=f(m,g,(...S)=>{Promise.resolve().then(()=>{ic(!y,"Your validator function has already return a promise. `callback` will be ignored."),y||b(...S)})});y=x&&typeof x.then=="function"&&typeof x.catch=="function",ic(y,"`callback` is deprecated. Please return a promise instead."),y&&x.then(()=>{b()}).catch(S=>{b(S||" ")})}),h}).sort(({warningOnly:u,ruleIndex:d},{warningOnly:f,ruleIndex:h})=>!!u==!!f?d-h:u?1:-1);let c;if(o===!0)c=new Promise(async(u,d)=>{for(let f=0;fSre(a,t,d,r,i).then(f=>({errors:f,rule:d})));c=(o?zhn(u):Bhn(u)).then(d=>Promise.reject(d))}return c.catch(u=>u),c}async function Bhn(e){return Promise.all(e).then(t=>[].concat(...t))}async function zhn(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(o=>{o.errors.length&&n([o]),t+=1,t===e.length&&n([])})})})}function xu(e){return yre(e)}function B5e(e,t){let n={};return t.forEach(r=>{const o=rp(e,r);n=om(n,r,o)}),n}function T5(e,t,n=!1){return e&&e.some(r=>Cre(t,r,n))}function Cre(e,t,n=!1){return!e||!t||!n&&e.length!==t.length?!1:t.every((r,o)=>e[o]===r)}function Hhn(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),r=Object.keys(t);return[...new Set([...n,...r])].every(i=>{const a=e[i],l=t[i];return typeof a=="function"&&typeof l=="function"?!0:a===l})}function Vhn(e,...t){const n=t[0];return n&&n.target&&typeof n.target=="object"&&e in n.target?n.target[e]:n}function z5e(e,t,n){const{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;const o=e[t],i=t-n;return i>0?[...e.slice(0,n),o,...e.slice(n,t),...e.slice(t+1,r)]:i<0?[...e.slice(0,t),...e.slice(t+1,n+1),o,...e.slice(n+1,r)]:e}function _re(){return _re=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{preserve:n,isListField:r,name:o}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(r,n,xu(o)),this.cancelRegisterFunc=null});Le(this,"getNamePath",()=>{const{name:n,fieldContext:r}=this.props,{prefixName:o=[]}=r;return n!==void 0?[...o,...n]:[]});Le(this,"getRules",()=>{const{rules:n=[],fieldContext:r}=this.props;return n.map(o=>typeof o=="function"?o(r):o)});Le(this,"refresh",()=>{this.mounted&&this.setState(({resetCount:n})=>({resetCount:n+1}))});Le(this,"metaCache",null);Le(this,"triggerMetaEvent",n=>{const{onMetaChange:r}=this.props;if(r){const o={...this.getMeta(),destroy:n};ey(this.metaCache,o)||r(o),this.metaCache=o}else this.metaCache=null});Le(this,"onStoreChange",(n,r,o)=>{const{shouldUpdate:i,dependencies:a=[],onReset:l}=this.props,{store:c}=o,u=this.getNamePath(),d=this.getValue(n),f=this.getValue(c),h=r&&T5(r,u);switch(o.type==="valueUpdate"&&o.source==="external"&&!ey(d,f)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=RC,this.warnings=BT,this.triggerMetaEvent()),o.type){case"reset":if(!r||h){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=RC,this.warnings=BT,this.triggerMetaEvent(),l==null||l(),this.refresh();return}break;case"remove":{if(i&&vX(i,n,c,d,f,o)){this.reRender();return}break}case"setField":{const{data:m}=o;if(h){"touched"in m&&(this.touched=m.touched),"validating"in m&&!("originRCField"in m)&&(this.validatePromise=m.validating?Promise.resolve([]):null),"errors"in m&&(this.errors=m.errors||RC),"warnings"in m&&(this.warnings=m.warnings||BT),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if("value"in m&&T5(r,u,!0)){this.reRender();return}if(i&&!u.length&&vX(i,n,c,d,f,o)){this.reRender();return}break}case"dependenciesUpdate":{if(a.map(xu).some(g=>T5(o.relatedFields,g))){this.reRender();return}break}default:if(h||(!a.length||u.length||i)&&vX(i,n,c,d,f,o)){this.reRender();return}break}i===!0&&this.reRender()});Le(this,"validateRules",n=>{const r=this.getNamePath(),o=this.getValue(),{triggerName:i,validateOnly:a=!1}=n||{},l=Promise.resolve().then(async()=>{if(!this.mounted)return[];const{validateFirst:c=!1,messageVariables:u,validateDebounce:d}=this.props;let f=this.getRules();if(i&&(f=f.filter(m=>m).filter(m=>{const{validateTrigger:g}=m;return g?yre(g).includes(i):!0})),d&&i&&(await new Promise(m=>{setTimeout(m,d)}),this.validatePromise!==l))return[];const h=Fhn(r,o,f,n,c,u);return h.catch(m=>m).then((m=RC)=>{var g;if(this.validatePromise===l){this.validatePromise=null;const b=[],y=[];(g=m.forEach)==null||g.call(m,({rule:{warningOnly:v},errors:x=RC})=>{v?y.push(...x):b.push(...x)}),this.errors=b,this.warnings=y,this.triggerMetaEvent(),this.reRender()}}),h});return a||(this.validatePromise=l,this.dirty=!0,this.errors=RC,this.warnings=BT,this.triggerMetaEvent(),this.reRender()),l});Le(this,"isFieldValidating",()=>!!this.validatePromise);Le(this,"isFieldTouched",()=>this.touched);Le(this,"isFieldDirty",()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;const{fieldContext:n}=this.props,{getInitialValue:r}=n.getInternalHooks(I2);return r(this.getNamePath())!==void 0});Le(this,"getErrors",()=>this.errors);Le(this,"getWarnings",()=>this.warnings);Le(this,"isListField",()=>this.props.isListField);Le(this,"isList",()=>this.props.isList);Le(this,"isPreserve",()=>this.props.preserve);Le(this,"getMeta",()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null}));Le(this,"getOnlyChild",n=>{if(typeof n=="function"){const o=this.getMeta();return{...this.getOnlyChild(n(this.getControlled(),o,this.props.fieldContext)),isFunction:!0}}const r=$p(n);return r.length!==1||!p.isValidElement(r[0])?{child:r,isFunction:!1}:{child:r[0],isFunction:!1}});Le(this,"getValue",n=>{const{getFieldsValue:r}=this.props.fieldContext,o=this.getNamePath();return rp(n||r(!0),o)});Le(this,"getControlled",(n={})=>{const{name:r,trigger:o="onChange",validateTrigger:i,getValueFromEvent:a,normalize:l,valuePropName:c="value",getValueProps:u,fieldContext:d}=this.props,f=i!==void 0?i:d.validateTrigger,h=this.getNamePath(),{getInternalHooks:m,getFieldsValue:g}=d,{dispatch:b}=m(I2),y=this.getValue(),v=u||(N=>({[c]:N})),x=n[o],S=r!==void 0?v(y):{},C={...n,...S};return C[o]=(...N)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let E;a?E=a(...N):E=Vhn(c,...N),l&&(E=l(E,y,g(!0))),E!==y&&b({type:"updateValue",namePath:h,value:E}),x&&x(...N)},yre(f||[]).forEach(N=>{const E=C[N];C[N]=(...I)=>{E&&E(...I);const{rules:A}=this.props;A&&A.length&&b({type:"validateField",namePath:h,triggerName:N})}}),C});if(n.fieldContext){const{getInternalHooks:r}=n.fieldContext,{initEntityValue:o}=r(I2);o(this)}}componentDidMount(){const{shouldUpdate:n,fieldContext:r}=this.props;if(this.mounted=!0,r){const{getInternalHooks:o}=r,{registerField:i}=o(I2);this.cancelRegisterFunc=i(this)}n===!0&&this.reRender()}componentWillUnmount(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}reRender(){this.mounted&&this.forceUpdate()}render(){const{resetCount:n}=this.state,{children:r}=this.props,{child:o,isFunction:i}=this.getOnlyChild(r);let a;return i?a=o:p.isValidElement(o)?a=p.cloneElement(o,this.getControlled(o.props)):(ic(!o,"`children` of Field is not validate ReactElement."),a=o),p.createElement(p.Fragment,{key:n},a)}}Le(lKe,"contextType",W_);function Ffe({name:e,...t}){const n=p.useContext(W_),r=p.useContext(sR),o=e!==void 0?xu(e):void 0,i=t.isListField??!!r;let a="keep";return i||(a=`_${(o||[]).join("_")}`),p.createElement(lKe,_re({key:a,name:o,isListField:i},t,{fieldContext:n}))}function cKe({name:e,initialValue:t,children:n,rules:r,validateTrigger:o,isListField:i}){const a=p.useContext(W_),l=p.useContext(sR),u=p.useRef({keys:[],id:0}).current,d=p.useMemo(()=>[...xu(a.prefixName)||[],...xu(e)],[a.prefixName,e]),f=p.useMemo(()=>({...a,prefixName:d}),[a,d]),h=p.useMemo(()=>({getKey:g=>{const b=d.length,y=g[b];return[u.keys[y],g.slice(b+1)]}}),[u,d]);if(typeof n!="function")return ic(!1,"Form.List only accepts function as children."),null;const m=(g,b,{source:y})=>y==="internal"?!1:g!==b;return p.createElement(sR.Provider,{value:h},p.createElement(W_.Provider,{value:f},p.createElement(Ffe,{name:[],shouldUpdate:m,rules:r,validateTrigger:o,initialValue:t,isList:!0,isListField:i??!!l},({value:g=[],onChange:b},y)=>{const{getFieldValue:v}=a,x=()=>v(d||[])||[],S={add:(_,N)=>{const E=x();N>=0&&N<=E.length?(u.keys=[...u.keys.slice(0,N),u.id,...u.keys.slice(N)],b([...E.slice(0,N),_,...E.slice(N)])):(u.keys=[...u.keys,u.id],b([...E,_])),u.id+=1},remove:_=>{const N=x(),E=new Set(Array.isArray(_)?_:[_]);E.size<=0||(u.keys=u.keys.filter((I,A)=>!E.has(A)),b(N.filter((I,A)=>!E.has(A))))},move(_,N){if(_===N)return;const E=x();_<0||_>=E.length||N<0||N>=E.length||(u.keys=z5e(u.keys,_,N),b(z5e(E,_,N)))}};let C=g||[];return Array.isArray(C)||(C=[]),n(C.map((_,N)=>{let E=u.keys[N];return E===void 0&&(u.keys[N]=u.id,E=u.keys[N],u.id+=1),{name:N,key:E,isListField:!0}}),S,y)})))}function Uhn(e){let t=!1,n=e.length;const r=[];return e.length?new Promise((o,i)=>{e.forEach((a,l)=>{a.catch(c=>(t=!0,c)).then(c=>{n-=1,r[l]=c,!(n>0)&&(t&&i(r),o(r))})})}):Promise.resolve([])}const uKe="__@field_split__";function xX(e){return e.map(t=>`${typeof t}:${t}`).join(uKe)}class YN{constructor(){Le(this,"kvs",new Map)}set(t,n){this.kvs.set(xX(t),n)}get(t){return this.kvs.get(xX(t))}update(t,n){const r=this.get(t),o=n(r);o?this.set(t,o):this.delete(t)}delete(t){this.kvs.delete(xX(t))}map(t){return[...this.kvs.entries()].map(([n,r])=>{const o=n.split(uKe);return t({key:o.map(i=>{const[,a,l]=i.match(/^([^:]*):(.*)$/);return a==="number"?Number(l):l}),value:r})})}toJSON(){const t={};return this.map(({key:n,value:r})=>(t[n.join(".")]=r,null)),t}}class Ghn{constructor(t){Le(this,"formHooked",!1);Le(this,"forceRootUpdate");Le(this,"subscribable",!0);Le(this,"store",{});Le(this,"fieldEntities",[]);Le(this,"initialValues",{});Le(this,"callbacks",{});Le(this,"validateMessages",null);Le(this,"preserve",null);Le(this,"lastValidatePromise",null);Le(this,"getForm",()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks}));Le(this,"getInternalHooks",t=>t===I2?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch,setBatchUpdate:this.setBatchUpdate}):(ic(!1,"`getInternalHooks` is internal usage. Should not call directly."),null));Le(this,"useSubscribe",t=>{this.subscribable=t});Le(this,"prevWithoutPreserves",null);Le(this,"setInitialValues",(t,n)=>{var r;if(this.initialValues=t||{},n){let o=h2(t,this.store);(r=this.prevWithoutPreserves)==null||r.map(({key:i})=>{o=om(o,i,rp(t,i))}),this.prevWithoutPreserves=null,this.updateStore(o)}});Le(this,"destroyForm",t=>{if(t)this.updateStore({});else{const n=new YN;this.getFieldEntities(!0).forEach(r=>{this.isMergedPreserve(r.isPreserve())||n.set(r.getNamePath(),!0)}),this.prevWithoutPreserves=n}});Le(this,"getInitialValue",t=>{const n=rp(this.initialValues,t);return t.length?h2(n):n});Le(this,"setCallbacks",t=>{this.callbacks=t});Le(this,"setValidateMessages",t=>{this.validateMessages=t});Le(this,"setPreserve",t=>{this.preserve=t});Le(this,"watchList",[]);Le(this,"registerWatch",t=>(this.watchList.push(t),()=>{this.watchList=this.watchList.filter(n=>n!==t)}));Le(this,"notifyWatch",(t=[])=>{if(this.watchList.length){const n=this.getFieldsValue(),r=this.getFieldsValue(!0);this.watchList.forEach(o=>{o(n,r,t)})}});Le(this,"notifyWatchNamePathList",[]);Le(this,"batchNotifyWatch",t=>{this.notifyWatchNamePathList.push(t),this.batch("notifyWatch",()=>{this.notifyWatch(this.notifyWatchNamePathList),this.notifyWatchNamePathList=[]})});Le(this,"batchUpdate");Le(this,"setBatchUpdate",t=>{this.batchUpdate=t});Le(this,"batch",(t,n)=>{this.batchUpdate(t,n)});Le(this,"timeoutId",null);Le(this,"warningUnhooked",()=>{});Le(this,"updateStore",t=>{this.store=t});Le(this,"getFieldEntities",(t=!1)=>t?this.fieldEntities.filter(n=>n.getNamePath().length):this.fieldEntities);Le(this,"getFieldsMap",(t=!1)=>{const n=new YN;return this.getFieldEntities(t).forEach(r=>{const o=r.getNamePath();n.set(o,r)}),n});Le(this,"getFieldEntitiesForNamePathList",t=>{if(!t)return this.getFieldEntities(!0);const n=this.getFieldsMap(!0);return t.map(r=>{const o=xu(r);return n.get(o)||{INVALIDATE_NAME_PATH:xu(r)}})});Le(this,"getFieldsValue",(t,n)=>{this.warningUnhooked();let r,o;if(t===!0||Array.isArray(t)?(r=t,o=n):t&&typeof t=="object"&&(o=t.filter),r===!0&&!o)return this.store;const i=this.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),a=[],l=[];i.forEach(u=>{var f;const d=u.INVALIDATE_NAME_PATH||u.getNamePath();if((f=u.isList)!=null&&f.call(u)){l.push(d);return}if(!o)a.push(d);else{const h="getMeta"in u?u.getMeta():null;o(h)&&a.push(d)}});let c=B5e(this.store,a.map(xu));return l.forEach(u=>{rp(c,u)||(c=om(c,u,[]))}),c});Le(this,"getFieldValue",t=>{this.warningUnhooked();const n=xu(t);return rp(this.store,n)});Le(this,"getFieldsError",t=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(t).map((r,o)=>r&&!r.INVALIDATE_NAME_PATH?{name:r.getNamePath(),errors:r.getErrors(),warnings:r.getWarnings()}:{name:xu(t[o]),errors:[],warnings:[]})));Le(this,"getFieldError",t=>{this.warningUnhooked();const n=xu(t);return this.getFieldsError([n])[0].errors});Le(this,"getFieldWarning",t=>{this.warningUnhooked();const n=xu(t);return this.getFieldsError([n])[0].warnings});Le(this,"isFieldsTouched",(...t)=>{this.warningUnhooked();const[n,r]=t;let o,i=!1;t.length===0?o=null:t.length===1?Array.isArray(n)?(o=n.map(xu),i=!1):(o=null,i=n):(o=n.map(xu),i=r);const a=this.getFieldEntities(!0),l=f=>f.isFieldTouched();if(!o)return i?a.every(f=>l(f)||f.isList()):a.some(l);const c=new YN;o.forEach(f=>{c.set(f,[])}),a.forEach(f=>{const h=f.getNamePath();o.forEach(m=>{m.every((g,b)=>h[b]===g)&&c.update(m,g=>[...g,f])})});const u=f=>f.some(l),d=c.map(({value:f})=>f);return i?d.every(u):d.some(u)});Le(this,"isFieldTouched",t=>(this.warningUnhooked(),this.isFieldsTouched([t])));Le(this,"isFieldsValidating",t=>{this.warningUnhooked();const n=this.getFieldEntities();if(!t)return n.some(o=>o.isFieldValidating());const r=t.map(xu);return n.some(o=>{const i=o.getNamePath();return T5(r,i)&&o.isFieldValidating()})});Le(this,"isFieldValidating",t=>(this.warningUnhooked(),this.isFieldsValidating([t])));Le(this,"resetWithFieldInitialValue",(t={})=>{const n=new YN,r=this.getFieldEntities(!0);r.forEach(a=>{const{initialValue:l}=a.props,c=a.getNamePath();if(l!==void 0){const u=n.get(c)||new Set;u.add({entity:a,value:l}),n.set(c,u)}});const o=a=>{a.forEach(l=>{const{initialValue:c}=l.props;if(c!==void 0){const u=l.getNamePath();if(this.getInitialValue(u)!==void 0)ic(!1,`Form already set 'initialValues' with path '${u.join(".")}'. Field can not overwrite it.`);else{const f=n.get(u);if(f&&f.size>1)ic(!1,`Multiple Field with path '${u.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(f){const h=this.getFieldValue(u);!l.isListField()&&(!t.skipExist||h===void 0)&&this.updateStore(om(this.store,u,[...f][0].value))}}}})};let i;t.entities?i=t.entities:t.namePathList?(i=[],t.namePathList.forEach(a=>{const l=n.get(a);l&&i.push(...[...l].map(c=>c.entity))})):i=r,o(i)});Le(this,"resetFields",t=>{this.warningUnhooked();const n=this.store;if(!t){this.updateStore(h2(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(n,null,{type:"reset"}),this.notifyWatch();return}const r=t.map(xu);r.forEach(o=>{const i=this.getInitialValue(o);this.updateStore(om(this.store,o,i))}),this.resetWithFieldInitialValue({namePathList:r}),this.notifyObservers(n,r,{type:"reset"}),this.notifyWatch(r)});Le(this,"setFields",t=>{this.warningUnhooked();const n=this.store,r=[];t.forEach(o=>{const{name:i,...a}=o,l=xu(i);r.push(l),"value"in a&&this.updateStore(om(this.store,l,a.value)),this.notifyObservers(n,[l],{type:"setField",data:o})}),this.notifyWatch(r)});Le(this,"getFields",()=>this.getFieldEntities(!0).map(r=>{const o=r.getNamePath(),a={...r.getMeta(),name:o,value:this.getFieldValue(o)};return Object.defineProperty(a,"originRCField",{value:!0}),a}));Le(this,"initEntityValue",t=>{const{initialValue:n}=t.props;if(n!==void 0){const r=t.getNamePath();rp(this.store,r)===void 0&&this.updateStore(om(this.store,r,n))}});Le(this,"isMergedPreserve",t=>(t!==void 0?t:this.preserve)??!0);Le(this,"registerField",t=>{this.fieldEntities.push(t);const n=t.getNamePath();if(this.batchNotifyWatch(n),t.props.initialValue!==void 0){const r=this.store;this.resetWithFieldInitialValue({entities:[t],skipExist:!0}),this.notifyObservers(r,[t.getNamePath()],{type:"valueUpdate",source:"internal"})}return(r,o,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(a=>a!==t),!this.isMergedPreserve(o)&&(!r||i.length>1)){const a=r?void 0:this.getInitialValue(n);if(n.length&&this.getFieldValue(n)!==a&&this.fieldEntities.every(l=>!Cre(l.getNamePath(),n))){const l=this.store;this.updateStore(om(l,n,a,!0)),this.notifyObservers(l,[n],{type:"remove"}),this.triggerDependenciesUpdate(l,n)}}this.batchNotifyWatch(n)}});Le(this,"dispatch",t=>{switch(t.type){case"updateValue":{const{namePath:n,value:r}=t;this.updateValue(n,r);break}case"validateField":{const{namePath:n,triggerName:r}=t;this.validateFields([n],{triggerName:r});break}}});Le(this,"notifyObservers",(t,n,r)=>{if(this.subscribable){const o={...r,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:i})=>{i(t,n,o)})}else this.forceRootUpdate()});Le(this,"triggerDependenciesUpdate",(t,n)=>{const r=this.getDependencyChildrenFields(n);return r.length&&this.validateFields(r),this.notifyObservers(t,r,{type:"dependenciesUpdate",relatedFields:[n,...r]}),r});Le(this,"updateValue",(t,n)=>{const r=xu(t),o=this.store;this.updateStore(om(this.store,r,n)),this.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),this.notifyWatch([r]);const i=this.triggerDependenciesUpdate(o,r),{onValuesChange:a}=this.callbacks;if(a){const l=B5e(this.store,[r]),c=this.getFieldsValue(),u=h2(c,l);a(l,u)}this.triggerOnFieldsChange([r,...i])});Le(this,"setFieldsValue",t=>{this.warningUnhooked();const n=this.store;if(t){const r=h2(this.store,t);this.updateStore(r)}this.notifyObservers(n,null,{type:"valueUpdate",source:"external"}),this.notifyWatch()});Le(this,"setFieldValue",(t,n)=>{this.setFields([{name:t,value:n,errors:[],warnings:[],touched:!0}])});Le(this,"getDependencyChildrenFields",t=>{const n=new Set,r=[],o=new YN;this.getFieldEntities().forEach(a=>{const{dependencies:l}=a.props;(l||[]).forEach(c=>{const u=xu(c);o.update(u,(d=new Set)=>(d.add(a),d))})});const i=a=>{(o.get(a)||new Set).forEach(c=>{if(!n.has(c)){n.add(c);const u=c.getNamePath();c.isFieldDirty()&&u.length&&(r.push(u),i(u))}})};return i(t),r});Le(this,"triggerOnFieldsChange",(t,n)=>{const{onFieldsChange:r}=this.callbacks;if(r){const o=this.getFields();if(n){const a=new YN;n.forEach(({name:l,errors:c})=>{a.set(l,c)}),o.forEach(l=>{l.errors=a.get(l.name)||l.errors})}const i=o.filter(({name:a})=>T5(t,a));i.length&&r(i,o)}});Le(this,"validateFields",(t,n)=>{this.warningUnhooked();let r,o;Array.isArray(t)||typeof t=="string"||typeof n=="string"?(r=t,o=n):o=t;const i=!!r,a=i?r.map(xu):[],l=[...a],c=[],u=String(Date.now()),d=new Set,{recursive:f,dirty:h}=o||{};this.getFieldEntities(!0).forEach(y=>{const v=y.getNamePath();if(i||((!y.isList()||!a.some(x=>Cre(x,v,!0)))&&l.push(v),a.push(v)),!(!y.props.rules||!y.props.rules.length)&&!(h&&!y.isFieldDirty())&&(d.add(v.join(u)),!i||T5(a,v,f))){const x=y.validateRules({validateMessages:{...sKe,...this.validateMessages},...o});c.push(x.then(()=>({name:v,errors:[],warnings:[]})).catch(S=>{var N;const C=[],_=[];return(N=S.forEach)==null||N.call(S,({rule:{warningOnly:E},errors:I})=>{E?_.push(...I):C.push(...I)}),C.length?Promise.reject({name:v,errors:C,warnings:_}):{name:v,errors:C,warnings:_}}))}});const m=Uhn(c);this.lastValidatePromise=m,m.catch(y=>y).then(y=>{const v=y.map(({name:x})=>x);this.notifyObservers(this.store,v,{type:"validateFinish"}),this.triggerOnFieldsChange(v,y)});const g=m.then(()=>this.lastValidatePromise===m?Promise.resolve(this.getFieldsValue(l)):Promise.reject([])).catch(y=>{var S,C;const v=y.filter(_=>_&&_.errors.length),x=(C=(S=v[0])==null?void 0:S.errors)==null?void 0:C[0];return Promise.reject({message:x,values:this.getFieldsValue(a),errorFields:v,outOfDate:this.lastValidatePromise!==m})});g.catch(y=>y);const b=a.filter(y=>d.has(y.join(u)));return this.triggerOnFieldsChange(b),g});Le(this,"submit",()=>{this.warningUnhooked(),this.validateFields().then(t=>{const{onFinish:n}=this.callbacks;if(n)try{n(t)}catch(r){console.error(r)}}).catch(t=>{const{onFinishFailed:n}=this.callbacks;n&&n(t)})});this.forceRootUpdate=t}}function Bfe(e){const t=p.useRef(null),[,n]=p.useState({});if(!t.current)if(e)t.current=e;else{const r=()=>{n({})},o=new Ghn(r);t.current=o.getForm()}return[t.current]}const jre=p.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),dKe=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{const o=p.useContext(jre),i=p.useRef({});return p.createElement(jre.Provider,{value:{...o,validateMessages:{...o.validateMessages,...e},triggerFormChange:(a,l)=>{t&&t(a,{changedFields:l,forms:i.current}),o.triggerFormChange(a,l)},triggerFormFinish:(a,l)=>{n&&n(a,{values:l,forms:i.current}),o.triggerFormFinish(a,l)},registerForm:(a,l)=>{a&&(i.current={...i.current,[a]:l}),o.registerForm(a,l)},unregisterForm:a=>{const l={...i.current};delete l[a],i.current=l,o.unregisterForm(a)}}},r)},Whn=p.forwardRef((e,t)=>{const[n,r]=p.useState({});return p.useLayoutEffect(()=>{const o=Object.keys(n);o.length&&(o.forEach(i=>{var a;(a=n[i])==null||a.call(n)}),r({}))},[n]),p.useImperativeHandle(t,()=>({batch:(o,i)=>{r(a=>({...a,[o]:i}))}})),null});function Nre(){return Nre=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const y=p.useRef(null),v=p.useContext(jre),[x]=Bfe(r),{useSubscribe:S,setInitialValues:C,setCallbacks:_,setValidateMessages:N,setPreserve:E,destroyForm:I,setBatchUpdate:A}=x.getInternalHooks(I2);p.useImperativeHandle(b,()=>({...x,nativeElement:y.current})),p.useEffect(()=>(v.registerForm(e,x),()=>{v.unregisterForm(e)}),[v,x,e]),N({...v.validateMessages,...l}),_({onValuesChange:u,onFieldsChange:(B,...$)=>{v.triggerFormChange(e,B),d&&d(B,...$)},onFinish:B=>{v.triggerFormFinish(e,B),f&&f(B)},onFinishFailed:h}),E(o);const R=p.useRef(null);C(t,!R.current),R.current||(R.current=!0);const k=p.useRef(null),T=p.useRef([]),D=()=>{k.current&&(T.current.forEach(([B,$])=>{k.current.batch(B,$)}),T.current=[])},O=p.useCallback(B=>{k.current=B,D()},[]);A((B,$)=>{T.current.push([B,$]),D()}),p.useEffect(()=>()=>I(m),[]);let F;const U=typeof i=="function";if(U){const B=x.getFieldsValue(!0);F=i(B,x)}else F=i;S(!U);const G=p.useRef(null);p.useEffect(()=>{Hhn(G.current||[],n||[])||x.setFields(n||[]),G.current=n},[n,x]);const W=p.useMemo(()=>({...x,validateTrigger:c}),[x,c]),Y=p.createElement(sR.Provider,{value:null},p.createElement(W_.Provider,{value:W},F),p.createElement(Whn,{ref:O}));return a===!1?Y:p.createElement(a,Nre({},g,{ref:y,onSubmit:B=>{B.preventDefault(),B.stopPropagation(),x.submit()},onReset:B=>{var $;B.preventDefault(),x.resetFields(),($=g.onReset)==null||$.call(g,B)}}),Y)};function wX(e){try{return JSON.stringify(e)}catch{return Math.random()}}function fKe(...e){const[t,n={}]=e,r=ahn(n)?{form:n}:n,o=r.form,[i,a]=p.useState(()=>typeof t=="function"?t({}):void 0),l=p.useMemo(()=>wX(i),[i]),c=p.useRef(l);c.current=l;const u=p.useContext(W_),d=o||u,f=d&&d._init,{getFieldsValue:h,getInternalHooks:m}=d,{registerWatch:g}=m(I2),b=Xo((v,x)=>{const S=r.preserve?x??h(!0):v??h(),C=typeof t=="function"?t(S):rp(S,xu(t));wX(i)!==wX(C)&&a(C)}),y=typeof t=="function"?t:JSON.stringify(t);return p.useEffect(()=>{f&&b()},[f,y]),p.useEffect(()=>f?g((x,S)=>{b(x,S)}):void 0,[f]),i}const Khn=p.forwardRef(qhn),tA=Khn;tA.FormProvider=dKe;tA.Field=Ffe;tA.List=cKe;tA.useForm=Bfe;tA.useWatch=fKe;const qx=p.createContext({labelAlign:"right",layout:"horizontal",itemRef:()=>{}}),pKe=p.createContext(null),hKe=e=>{const t=$l(e,["prefixCls"]);return p.createElement(dKe,{...t})},zfe=p.createContext({prefixCls:""}),dp=p.createContext({}),mKe=({children:e,status:t,override:n})=>{const r=p.useContext(dp),o=p.useMemo(()=>{const i={...r};return n&&delete i.isFormItemInput,t&&(delete i.status,delete i.hasFeedback,delete i.feedbackIcon),i},[t,n,r]);return p.createElement(dp.Provider,{value:o},e)},gKe=p.createContext(void 0),$P=e=>{const{space:t,form:n,children:r}=e;if(!Fp(r))return null;let o=r;return n&&(o=Pe.createElement(mKe,{override:!0,status:!0},o)),t&&(o=Pe.createElement(Gfn,null,o)),o},Yhn=e=>{if(Lp()&&window.document.documentElement){const t=Array.isArray(e)?e:[e],{documentElement:n}=window.document;return t.some(r=>r in n.style)}return!1};function H5e(e,t){return Yhn(e)}const Xhn=()=>Lp()&&window.document.documentElement,XV=e=>{const{prefixCls:t,className:n,style:r,size:o,shape:i}=e,a=Ae({[`${t}-lg`]:o==="large",[`${t}-sm`]:o==="small"}),l=Ae({[`${t}-circle`]:i==="circle",[`${t}-square`]:i==="square",[`${t}-round`]:i==="round"}),c=p.useMemo(()=>typeof o=="number"?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return p.createElement("span",{className:Ae(t,a,l,n),style:{...c,...r}})},Zhn=new Ca("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Hfe=e=>({height:e,lineHeight:en(e)}),hS=e=>({width:e,...Hfe(e)}),Jhn=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Zhn,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),SX=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...Hfe(e)}),Qhn=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i}=e;return{[t]:{display:"inline-block",verticalAlign:"top",background:n,...hS(r)},[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:{...hS(o)},[`${t}${t}-sm`]:{...hS(i)}}},emn=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:l}=e;return{[r]:{display:"inline-block",verticalAlign:"top",background:a,borderRadius:n,...SX(t,l)},[`${r}-lg`]:{...SX(o,l)},[`${r}-sm`]:{...SX(i,l)}}},yKe=e=>{const{gradientFromColor:t,borderRadiusSM:n,imageSizeBase:r,calc:o}=e;return{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:t,borderRadius:n,...hS(o(r).mul(2).equal())}},tmn=e=>({[e.skeletonNodeCls]:{...yKe(e)}}),nmn=e=>{const{skeletonImageCls:t,imageSizeBase:n,calc:r}=e;return{[t]:{...yKe(e),[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:{...hS(n),maxWidth:r(n).mul(4).equal(),maxHeight:r(n).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}},[`${t}${t}-circle`]:{borderRadius:"50%"}}},CX=(e,t,n)=>{const{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:t}}},_X=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...Hfe(e)}),rmn=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:l}=e;return{[n]:{display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:l(r).mul(2).equal(),minWidth:l(r).mul(2).equal(),..._X(r,l)},...CX(e,r,n),[`${n}-lg`]:{..._X(o,l)},...CX(e,o,`${n}-lg`),[`${n}-sm`]:{..._X(i,l)},...CX(e,i,`${n}-sm`)}},omn=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:o,skeletonButtonCls:i,skeletonInputCls:a,skeletonNodeCls:l,skeletonImageCls:c,controlHeight:u,controlHeightLG:d,controlHeightSM:f,gradientFromColor:h,padding:m,marginSM:g,borderRadius:b,titleHeight:y,blockRadius:v,paragraphLiHeight:x,controlHeightXS:S,paragraphMarginTop:C}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:m,verticalAlign:"top",[n]:{display:"inline-block",verticalAlign:"top",background:h,...hS(u)},[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:{...hS(d)},[`${n}-sm`]:{...hS(f)}},[`${t}-section`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:y,background:h,borderRadius:v,[`+ ${o}`]:{marginBlockStart:f}},[o]:{padding:0,"> li":{width:"100%",height:x,listStyle:"none",background:h,borderRadius:v,"+ li":{marginBlockStart:S}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-section`]:{[`${r}, ${o} > li`]:{borderRadius:b}}},[`${t}-with-avatar ${t}-section`]:{[r]:{marginBlockStart:g,[`+ ${o}`]:{marginBlockStart:C}}},[`${t}${t}-element`]:{display:"inline-block",width:"auto",...rmn(e),...Qhn(e),...emn(e),...tmn(e),...nmn(e)},[`${t}${t}-block`]:{width:"100%",[i]:{width:"100%"},[a]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${r}, + ${o} > li, + ${n}, + ${i}, + ${a}, + ${l}, + ${c} + `]:{...Jhn(e)}}}},imn=e=>{const{colorFillContent:t,colorFill:n}=e,r=t,o=n;return{color:r,colorGradientEnd:o,gradientFromColor:r,gradientToColor:o,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},AO=vl("Skeleton",e=>{const{componentCls:t,calc:n}=e,r=hs(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return omn(r)},imn,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),amn=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:o,active:i,style:a,styles:l,shape:c="circle",size:u="default",...d}=e,{getPrefixCls:f}=p.useContext(Ho),h=f("skeleton",t),[m,g]=AO(h),b=Ae(h,`${h}-element`,{[`${h}-active`]:i},r==null?void 0:r.root,n,o,m,g);return p.createElement("div",{className:b,style:l==null?void 0:l.root},p.createElement(XV,{prefixCls:`${h}-avatar`,className:r==null?void 0:r.content,style:{...l==null?void 0:l.content,...a},shape:c,size:u,...d}))},smn=e=>{const{prefixCls:t,className:n,rootClassName:r,classNames:o,active:i,style:a,styles:l,block:c=!1,size:u="default",...d}=e,{getPrefixCls:f}=p.useContext(Ho),h=f("skeleton",t),[m,g]=AO(h),b=Ae(h,`${h}-element`,{[`${h}-active`]:i,[`${h}-block`]:c},o==null?void 0:o.root,n,r,m,g);return p.createElement("div",{className:b,style:l==null?void 0:l.root},p.createElement(XV,{prefixCls:`${h}-button`,className:o==null?void 0:o.content,style:{...l==null?void 0:l.content,...a},size:u,...d}))},bKe=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:o,internalClassName:i,style:a,styles:l,active:c,children:u}=e,{getPrefixCls:d}=p.useContext(Ho),f=d("skeleton",t),[h,m]=AO(f),g=Ae(f,`${f}-element`,{[`${f}-active`]:c},h,r==null?void 0:r.root,n,o,m);return p.createElement("div",{className:g,style:l==null?void 0:l.root},p.createElement("div",{className:Ae(r==null?void 0:r.content,i||`${f}-node`),style:{...l==null?void 0:l.content,...a}},u))},lmn="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",cmn=e=>{const{getPrefixCls:t}=p.useContext(Ho),n=t("skeleton",e.prefixCls);return p.createElement(bKe,{...e,internalClassName:`${n}-image`},p.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${n}-image-svg`},p.createElement("title",null,"Image placeholder"),p.createElement("path",{d:lmn,className:`${n}-image-path`})))},umn=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:o,active:i,block:a,style:l,styles:c,size:u="default",...d}=e,{getPrefixCls:f}=p.useContext(Ho),h=f("skeleton",t),[m,g]=AO(h),b=Ae(h,`${h}-element`,{[`${h}-active`]:i,[`${h}-block`]:a},r==null?void 0:r.root,n,o,m,g);return p.createElement("div",{className:b,style:c==null?void 0:c.root},p.createElement(XV,{prefixCls:`${h}-input`,className:r==null?void 0:r.content,style:{...c==null?void 0:c.content,...l},size:u,...d}))},dmn=(e,t)=>{const{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},fmn=e=>{const{prefixCls:t,className:n,style:r,rows:o=0}=e,i=Array.from({length:o}).map((a,l)=>p.createElement("li",{key:l,style:{width:dmn(l,e)}}));return p.createElement("ul",{className:Ae(t,n),style:r},i)},pmn=({prefixCls:e,className:t,width:n,style:r})=>p.createElement("h3",{className:Ae(e,t),style:{width:n,...r}});function jX(e){return e&&typeof e=="object"?e:{}}function hmn(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function mmn(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function gmn(e,t){const n={};return(!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const nA=e=>{const{prefixCls:t,loading:n,className:r,rootClassName:o,classNames:i,style:a,styles:l,children:c,avatar:u=!1,title:d=!0,paragraph:f=!0,active:h,round:m}=e,{getPrefixCls:g,direction:b,className:y,style:v,classNames:x,styles:S}=cu("skeleton"),C=g("skeleton",t),[_,N]=AO(C),E={...e,avatar:u,title:d,paragraph:f},[I,A]=Mu([x,i],[S,l],{props:E});if(n||!("loading"in e)){const R=!!u,k=!!d,T=!!f;let D;if(R){const F={className:I.avatar,prefixCls:`${C}-avatar`,...hmn(k,T),...jX(u),style:A.avatar};D=p.createElement("div",{className:Ae(I.header,`${C}-header`),style:A.header},p.createElement(XV,{...F}))}let O;if(k||T){let F;if(k){const G={className:I.title,prefixCls:`${C}-title`,...mmn(R,T),...jX(d),style:A.title};F=p.createElement(pmn,{...G})}let U;if(T){const G={className:I.paragraph,prefixCls:`${C}-paragraph`,...gmn(R,k),...jX(f),style:A.paragraph};U=p.createElement(fmn,{...G})}O=p.createElement("div",{className:Ae(I.section,`${C}-section`),style:A.section},F,U)}const z=Ae(C,{[`${C}-with-avatar`]:R,[`${C}-active`]:h,[`${C}-rtl`]:b==="rtl",[`${C}-round`]:m},I.root,y,r,o,_,N);return p.createElement("div",{className:z,style:{...A.root,...v,...a}},D,O)}return c??null};nA.Button=smn;nA.Avatar=amn;nA.Input=umn;nA.Image=cmn;nA.Node=bKe;function V5e(){}const ymn=p.createContext({add:V5e,remove:V5e});function bmn(e){const t=p.useContext(ymn),n=p.useRef(null);return Xo(o=>{if(o){const i=e?o.querySelector(e):o;i&&(t.add(i),n.current=i)}else t.remove(n.current)})}const U5e=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=p.useContext(PO);return Pe.createElement(wd,{onClick:n,...e},t)},G5e=()=>{const{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:o}=p.useContext(PO);return Pe.createElement(wd,{...Zqe(n),loading:e,onClick:o,...t},r)};function vKe(e,t){return Pe.createElement("span",{className:`${e}-close-x`},t||Pe.createElement(CO,{className:`${e}-close-icon`}))}const xKe=e=>{const{okText:t,okType:n="primary",cancelText:r,confirmLoading:o,onOk:i,onCancel:a,okButtonProps:l,cancelButtonProps:c,footer:u}=e,[d]=dy("Modal",Pqe()),f=t||(d==null?void 0:d.okText),h=r||(d==null?void 0:d.cancelText),m=Pe.useMemo(()=>({confirmLoading:o,okButtonProps:l,cancelButtonProps:c,okTextLocale:f,cancelTextLocale:h,okType:n,onOk:i,onCancel:a}),[o,l,c,f,h,n,i,a]);let g;return typeof u=="function"||typeof u>"u"?(g=Pe.createElement(Pe.Fragment,null,Pe.createElement(U5e,null),Pe.createElement(G5e,null)),typeof u=="function"&&(g=u(g,{OkBtn:G5e,CancelBtn:U5e})),g=Pe.createElement(rKe,{value:m},g)):g=u,Pe.createElement(Afe,{disabled:!1},g)},vmn=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},xmn=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},wmn=(e,t)=>{const{prefixCls:n,componentCls:r,gridColumns:o}=e,i={};for(let a=o;a>=0;a--)a===0?(i[`${r}${t}-${a}`]={display:"none"},i[`${r}-push-${a}`]={insetInlineStart:"auto"},i[`${r}-pull-${a}`]={insetInlineEnd:"auto"},i[`${r}${t}-push-${a}`]={insetInlineStart:"auto"},i[`${r}${t}-pull-${a}`]={insetInlineEnd:"auto"},i[`${r}${t}-offset-${a}`]={marginInlineStart:0},i[`${r}${t}-order-${a}`]={order:0}):(i[`${r}${t}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/o*100}%`,maxWidth:`${a/o*100}%`}],i[`${r}${t}-push-${a}`]={insetInlineStart:`${a/o*100}%`},i[`${r}${t}-pull-${a}`]={insetInlineEnd:`${a/o*100}%`},i[`${r}${t}-offset-${a}`]={marginInlineStart:`${a/o*100}%`},i[`${r}${t}-order-${a}`]={order:a});return i[`${r}${t}-flex`]={flex:`var(--${n}${t}-flex)`},i},Ere=(e,t)=>wmn(e,t),Smn=(e,t,n)=>({[`@media (min-width: ${en(t)})`]:{...Ere(e,n)}}),Cmn=()=>({}),_mn=()=>({}),jmn=vl("Grid",vmn,Cmn),wKe=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin}),Nmn=vl("Grid",e=>{const t=hs(e,{gridColumns:24}),n=wKe(t);return delete n.xs,[xmn(t),Ere(t,""),Ere(t,"-xs"),Object.keys(n).map(r=>Smn(t,n[r],`-${r}`)).reduce((r,o)=>({...r,...o}),{})]},_mn);function W5e(e){return{position:e,inset:0}}const Emn=e=>{const{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${n}-zoom-leave ${t}-container`]:{pointerEvents:"none"},[`${t}-mask`]:{...W5e("fixed"),zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`&${t}-mask-blur`]:{backdropFilter:"blur(4px)"},[`${t}-hidden`]:{display:"none"}},[`${t}-wrap`]:{...W5e("fixed"),zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"}}},{[`${t}-root`]:Qqe(e)}]},Pmn=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${en(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:{...ou(e),pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${en(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-container`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:{position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:en(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive},...OP(e)},[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${en(e.borderRadiusLG)} ${en(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${en(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}}},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-container, + ${t}-body, + ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},Imn=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},Amn=e=>{const{componentCls:t}=e,n=wKe(e),r={...n};delete r.xs;const o=`--${t.replace(".","")}-`,i=Object.keys(r).map(a=>({[`@media (min-width: ${en(r[a])})`]:{width:`var(${o}${a}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(So(Object.keys(n).map((a,l)=>{const c=Object.keys(n)[l-1];return c?{[`${o}${a}-width`]:`var(${o}${c}-width)`}:null})),[{width:`var(${o}xs-width)`}],So(i))}}},SKe=e=>{const t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return hs(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},CKe=e=>({footerBg:"transparent",headerBg:"transparent",titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${en(e.paddingMD)} ${en(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${en(e.padding)} ${en(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${en(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${en(e.paddingXS)} ${en(e.padding)}`:0,footerBorderTop:e.wireframe?`${en(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${en(e.borderRadiusLG)} ${en(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${en(e.padding*2)} ${en(e.padding*2)} ${en(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM,mask:!0}),_Ke=vl("Modal",e=>{const t=SKe(e);return[Pmn(t),Imn(t),Emn(t),KV(t,"zoom"),Amn(t)]},CKe,{unitless:{titleLineHeight:!0}});let Pre;const Tmn=e=>{Pre={x:e.pageX,y:e.pageY},setTimeout(()=>{Pre=null},100)};Xhn()&&document.documentElement.addEventListener("click",Tmn,!0);const jKe=e=>{const{prefixCls:t,className:n,rootClassName:r,open:o,wrapClassName:i,centered:a,getContainer:l,focusTriggerAfterClose:c=!0,style:u,width:d=520,footer:f,classNames:h,styles:m,children:g,loading:b,confirmLoading:y,zIndex:v,mousePosition:x,onOk:S,onCancel:C,okButtonProps:_,cancelButtonProps:N,destroyOnHidden:E,destroyOnClose:I,panelRef:A=null,closable:R,mask:k,modalRender:T,...D}=e,{getPopupContainer:O,getPrefixCls:z,direction:F,className:U,style:G,classNames:W,styles:Y,centered:B,cancelButtonProps:$,okButtonProps:K,mask:q}=cu("modal"),{modal:Z}=p.useContext(Ho),[J,oe]=p.useMemo(()=>typeof R=="boolean"?[void 0,void 0]:[R==null?void 0:R.afterClose,R==null?void 0:R.onClose],[R]),de=z("modal",t),ae=z(),[ue,ce]=$dn(k,q,de),se=mt=>{y||(C==null||C(mt),oe==null||oe())},me=mt=>{S==null||S(mt),oe==null||oe()},fe=Mf(de),[te,ye]=_Ke(de,fe),ve=Ae(i,{[`${de}-centered`]:a??B,[`${de}-wrap-rtl`]:F==="rtl"}),ge=f!==null&&!b?p.createElement(xKe,{...e,okButtonProps:{...K,..._},onOk:me,cancelButtonProps:{...$,...N},onCancel:se}):null,[Ee,xe,Ne,_e]=Ldn(t5e(e),t5e(Z),{closable:!0,closeIcon:p.createElement(CO,{className:`${de}-close-icon`}),closeIconRender:mt=>vKe(de,mt)}),Be=Ee?{disabled:Ne,closeIcon:xe,afterClose:J,..._e}:!1,Te=T?mt=>p.createElement("div",{className:`${de}-render`},T(mt)):void 0,Ge=`.${de}-${T?"render":"container"}`,Ze=bmn(Ge),ht=hp(A,Ze),[Oe,ft]=_O("Modal",v),Qe={...e,width:d,panelRef:A,focusTriggerAfterClose:c,mask:ue,zIndex:Oe},[De,st]=Mu([W,h,ce],[Y,m],{props:Qe}),[vt,qe]=p.useMemo(()=>d&&typeof d=="object"?[void 0,d]:[d,void 0],[d]),Ye=p.useMemo(()=>{const mt={};return qe&&Object.keys(qe).forEach(Et=>{const vn=qe[Et];vn!==void 0&&(mt[`--${de}-${Et}-width`]=typeof vn=="number"?`${vn}px`:vn)}),mt},[de,qe]);return p.createElement($P,{form:!0,space:!0},p.createElement(HV.Provider,{value:ft},p.createElement(ihn,{width:vt,...D,zIndex:Oe,getContainer:l===void 0?O:l,prefixCls:de,rootClassName:Ae(te,r,ye,fe,De.root),rootStyle:st.root,footer:ge,visible:o,mousePosition:x??Pre,onClose:se,closable:Be,closeIcon:xe,focusTriggerAfterClose:c,transitionName:DP(ae,"zoom",e.transitionName),maskTransitionName:DP(ae,"fade",e.maskTransitionName),mask:ue,className:Ae(te,n,U),style:{...G,...u,...Ye},classNames:{...De,wrapper:Ae(De.wrapper,ve)},styles:st,panelRef:ht,destroyOnHidden:E??I,modalRender:Te},b?p.createElement(nA,{active:!0,title:!1,paragraph:{rows:4},className:`${de}-body-skeleton`}):g)))},kmn=e=>{const{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:o,fontSize:i,lineHeight:a,modalTitleHeight:l,fontHeight:c,confirmBodyPadding:u}=e,d=`${t}-confirm`;return{[d]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${d}-body-wrapper`]:{...rR()},[`&${t} ${t}-body`]:{padding:u},[`${d}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:o,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(c).sub(o).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(l).sub(o).equal()).div(2).equal()}},[`${d}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${en(e.marginSM)})`},[`${e.iconCls} + ${d}-paragraph`]:{maxWidth:`calc(100% - ${en(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${d}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${d}-container`]:{color:e.colorText,fontSize:i,lineHeight:a},[`${d}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${d}-error ${d}-body > ${e.iconCls}`]:{color:e.colorError},[`${d}-warning ${d}-body > ${e.iconCls}, + ${d}-confirm ${d}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${d}-info ${d}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${d}-success ${d}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},Mmn=BV(["Modal","confirm"],e=>{const t=SKe(e);return kmn(t)},CKe,{order:-1e3}),NKe=e=>{const{prefixCls:t,icon:n,okText:r,cancelText:o,confirmPrefixCls:i,type:a,okCancel:l,footer:c,locale:u,...d}=e;let f=n;if(!n&&n!==null)switch(a){case"info":f=p.createElement(ndn,null);break;case"success":f=p.createElement(mqe,null);break;case"error":f=p.createElement(zV,null);break;default:f=p.createElement(gqe,null)}const h=l??a==="confirm",m=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",[g]=dy("Modal"),b=u||g,y=r||(h?b==null?void 0:b.okText:b==null?void 0:b.justOkText),v=o||(b==null?void 0:b.cancelText),{closable:x}=d,{onClose:S}=x&&typeof x=="object"?x:{},C=p.useMemo(()=>({autoFocusButton:m,cancelTextLocale:v,okTextLocale:y,mergedOkCancel:h,onClose:S,...d}),[m,v,y,h,S,d]),_=p.createElement(p.Fragment,null,p.createElement(I5e,null),p.createElement(A5e,null)),N=e.title!==void 0&&e.title!==null,E=`${i}-body`;return p.createElement("div",{className:`${i}-body-wrapper`},p.createElement("div",{className:Ae(E,{[`${E}-has-title`]:N})},f,p.createElement("div",{className:`${i}-paragraph`},N&&p.createElement("span",{className:`${i}-title`},e.title),p.createElement("div",{className:`${i}-content`},e.content))),c===void 0||typeof c=="function"?p.createElement(rKe,{value:C},p.createElement("div",{className:`${i}-btns`},typeof c=="function"?c(_,{OkBtn:A5e,CancelBtn:I5e}):_)):c,p.createElement(Mmn,{prefixCls:t}))},Rmn=e=>{const{close:t,zIndex:n,maskStyle:r,direction:o,prefixCls:i,wrapClassName:a,rootPrefixCls:l,bodyStyle:c,closable:u=!1,onConfirm:d,styles:f,title:h,okButtonProps:m,cancelButtonProps:g}=e,{cancelButtonProps:b,okButtonProps:y}=cu("modal"),v=`${i}-confirm`,x=e.width||416,S=e.style||{},C=e.maskClosable===void 0?!1:e.maskClosable,_=Ae(v,`${v}-${e.type}`,{[`${v}-rtl`]:o==="rtl"},e.className),[,N]=mp(),E=p.useMemo(()=>n!==void 0?n:N.zIndexPopupBase+Kdn,[n,N]);return p.createElement(jKe,{...e,className:_,wrapClassName:Ae({[`${v}-centered`]:!!e.centered},a),onCancel:()=>{t==null||t({triggerCancel:!0}),d==null||d(!1)},title:h,footer:null,transitionName:DP(l||"","zoom",e.transitionName),maskTransitionName:DP(l||"","fade",e.maskTransitionName),maskClosable:C,style:S,styles:{body:c,mask:r,...f},width:x,zIndex:E,closable:u},p.createElement(NKe,{...e,confirmPrefixCls:v,okButtonProps:{...y,...m},cancelButtonProps:{...b,...g}}))},EKe=e=>{const{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:o}=e;return p.createElement(g1,{prefixCls:t,iconPrefixCls:n,direction:r,theme:o},p.createElement(Rmn,{...e}))},A2=[];let PKe="";function IKe(){return PKe}const Omn=e=>{var u;const{prefixCls:t,getContainer:n,direction:r}=e,o=Pqe(),i=p.useContext(Ho),a=IKe()||i.getPrefixCls(),l=t||`${a}-modal`;let c=n;return c===!1&&(c=void 0),Pe.createElement(EKe,{...e,rootPrefixCls:a,prefixCls:l,iconPrefixCls:i.iconPrefixCls,theme:i.theme,direction:r??i.direction,locale:((u=i.locale)==null?void 0:u.Modal)??o,getContainer:c})};function TO(e){const t=kfn(),n=document.createDocumentFragment();let r={...e,close:l,open:!0},o;function i(...u){var f;u.some(h=>h==null?void 0:h.triggerCancel)&&((f=e.onCancel)==null||f.call(e,()=>{},...u.slice(1)));for(let h=0;h{})}const a=u=>{clearTimeout(o),o=setTimeout(()=>{const d=t.getPrefixCls(void 0,IKe()),f=t.getIconPrefixCls(),h=t.getTheme(),m=Pe.createElement(Omn,{...u});qqe(Pe.createElement(g1,{prefixCls:d,iconPrefixCls:f,theme:h},typeof t.holderRender=="function"?t.holderRender(m):m),n)})};function l(...u){r={...r,open:!1,afterClose:()=>{typeof e.afterClose=="function"&&e.afterClose(),i.apply(this,u)}},a(r)}function c(u){typeof u=="function"?r=u(r):r={...r,...u},a(r)}return a(r),A2.push(l),{destroy:l,update:c}}function AKe(e){return{...e,type:"warning"}}function TKe(e){return{...e,type:"info"}}function kKe(e){return{...e,type:"success"}}function MKe(e){return{...e,type:"error"}}function RKe(e){return{...e,type:"confirm"}}function Dmn({rootPrefixCls:e}){PKe=e}const Lmn=({afterClose:e,config:t,...n},r)=>{const[o,i]=p.useState(!0),[a,l]=p.useState(t),{direction:c,getPrefixCls:u}=p.useContext(Ho),d=u("modal"),f=u(),h=()=>{var y;e(),(y=a.afterClose)==null||y.call(a)},m=(...y)=>{var x;i(!1),y.some(S=>S==null?void 0:S.triggerCancel)&&((x=a.onCancel)==null||x.call(a,()=>{},...y.slice(1)))};p.useImperativeHandle(r,()=>({destroy:m,update:y=>{l(v=>{const x=typeof y=="function"?y(v):y;return{...v,...x}})}}));const g=a.okCancel??a.type==="confirm",[b]=dy("Modal",ty.Modal);return p.createElement(EKe,{prefixCls:d,rootPrefixCls:f,...a,close:m,open:o,afterClose:h,okText:a.okText||(g?b==null?void 0:b.okText:b==null?void 0:b.justOkText),direction:a.direction||c,cancelText:a.cancelText||(b==null?void 0:b.cancelText),...n})},$mn=p.forwardRef(Lmn);let q5e=0;const Fmn=p.memo(p.forwardRef((e,t)=>{const[n,r]=Vdn();return p.useImperativeHandle(t,()=>({patchElement:r}),[r]),p.createElement(p.Fragment,null,n)}));function Bmn(){const e=p.useRef(null),[t,n]=p.useState([]);p.useEffect(()=>{t.length&&(So(t).forEach(a=>{a()}),n([]))},[t]);const r=p.useCallback(i=>function(l){var b;q5e+=1;const c=p.createRef();let u;const d=new Promise(y=>{u=y});let f=!1,h;const m=p.createElement($mn,{key:`modal-${q5e}`,config:i(l),ref:c,afterClose:()=>{h==null||h()},isSilent:()=>f,onConfirm:y=>{u(y)}});return h=(b=e.current)==null?void 0:b.patchElement(m),h&&A2.push(h),{destroy:()=>{function y(){var v;(v=c.current)==null||v.destroy()}c.current?y():n(v=>[].concat(So(v),[y]))},update:y=>{function v(){var x;(x=c.current)==null||x.update(y)}c.current?v():n(x=>[].concat(So(x),[v]))},then:y=>(f=!0,d.then(y))}},[]);return[p.useMemo(()=>({info:r(TKe),success:r(kKe),error:r(MKe),warning:r(AKe),confirm:r(RKe)}),[r]),p.createElement(Fmn,{key:"modal-holder",ref:e})]}function OKe(e){return t=>p.createElement(g1,{theme:{token:{motion:!1,zIndexPopupBase:0}}},p.createElement(e,{...t}))}const DKe=(e,t,n,r,o)=>OKe(a=>{const{prefixCls:l,style:c}=a,u=p.useRef(null),[d,f]=p.useState(0),[h,m]=p.useState(0),[g,b]=Ku(!1,a.open),{getPrefixCls:y}=p.useContext(Ho),v=y(r||"select",l);p.useEffect(()=>{if(b(!0),typeof ResizeObserver<"u"){const C=new ResizeObserver(N=>{const E=N[0].target;f(E.offsetHeight+8),m(E.offsetWidth)}),_=setInterval(()=>{var I;const N=o?`.${o(v)}`:`.${v}-dropdown`,E=(I=u.current)==null?void 0:I.querySelector(N);E&&(clearInterval(_),C.observe(E))},10);return()=>{clearInterval(_),C.disconnect()}}},[v]);let x={...a,style:{...c,margin:0},open:g,getPopupContainer:()=>u.current};t&&Object.assign(x,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const S={paddingBottom:d,position:"relative",minWidth:h};return p.createElement("div",{ref:u,style:S},p.createElement(e,{...x}))}),zmn=(e,t,n,r,o=!1,i,a)=>{const l=p.useMemo(()=>typeof n=="boolean"?{allowClear:n}:n&&typeof n=="object"?n:{allowClear:!1},[n]);return p.useMemo(()=>{const c=!o&&l.allowClear!==!1&&(t.length||i)&&!(a==="combobox"&&i==="");return{allowClear:c,clearIcon:c?l.clearIcon||r||"×":null}},[l,r,o,t.length,i,a])},LKe=p.createContext(null);function $j(){return p.useContext(LKe)}function Hmn(e=250){const t=p.useRef(null),n=p.useRef(null);p.useEffect(()=>()=>{window.clearTimeout(n.current)},[]);function r(o){(o||t.current===null)&&(t.current=o),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current=null},e)}return[()=>t.current,r]}function $Ke(e,t){return e.filter(n=>n).some(n=>n.contains(t)||n===t)}function Vmn(e,t,n,r){const o=Xo(i=>{if(r)return;let a=i.target;a.shadowRoot&&i.composed&&(a=i.composedPath()[0]||a),i._ori_target&&(a=i._ori_target),t&&!$Ke(e(),a)&&n(!1)});p.useEffect(()=>(window.addEventListener("mousedown",o),()=>window.removeEventListener("mousedown",o)),[o])}function Ire(){return Ire=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}},Gmn=(e,t)=>{const{prefixCls:n,disabled:r,visible:o,children:i,popupElement:a,animation:l,transitionName:c,popupStyle:u,popupClassName:d,direction:f="ltr",placement:h,builtinPlacements:m,popupMatchSelectWidth:g,popupRender:b,popupAlign:y,getPopupContainer:v,empty:x,onPopupVisibleChange:S,onPopupMouseEnter:C,onPopupMouseDown:_,onPopupBlur:N,...E}=e,I=`${n}-dropdown`;let A=a;b&&(A=b(a));const R=p.useMemo(()=>m||Umn(g),[m,g]),k=l?`${I}-${l}`:c,T=typeof g=="number",D=p.useMemo(()=>T?null:g===!1?"minWidth":"width",[g,T]);let O=u;T&&(O={...u,width:g});const z=p.useRef(null);return p.useImperativeHandle(t,()=>({getPopupElement:()=>{var F;return(F=z.current)==null?void 0:F.popupElement}})),p.createElement(UV,Ire({},E,{showAction:S?["click"]:[],hideAction:S?["click"]:[],popupPlacement:h||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:R,prefixCls:I,popupMotion:{motionName:k},popup:p.createElement("div",{onMouseEnter:C,onMouseDown:_,onBlur:N},A),ref:z,stretch:D,popupAlign:y,popupVisible:o,getPopupContainer:v,popupClassName:Ae(d,{[`${I}-empty`]:x}),popupStyle:O,onPopupVisibleChange:S}),i)},Wmn=p.forwardRef(Gmn);function K5e(e,t){const{key:n}=e;let r;return"value"in e&&({value:r}=e),n??(r!==void 0?r:`rc-index-key-${t}`)}function Are(e){return typeof e<"u"&&!Number.isNaN(e)}function FKe(e,t){const{label:n,value:r,options:o,groupLabel:i}=e||{},a=n||(t?"children":"label");return{label:a,value:r||"value",options:o||"options",groupLabel:i||a}}function qmn(e,{fieldNames:t,childrenAsData:n}={}){const r=[],{label:o,value:i,options:a,groupLabel:l}=FKe(t,!1);function c(u,d){Array.isArray(u)&&u.forEach(f=>{if(d||!(a in f)){const h=f[i];r.push({key:K5e(f,r.length),groupOption:d,data:f,label:f[o],value:h})}else{let h=f[l];h===void 0&&n&&(h=f.label),r.push({key:K5e(f,r.length),group:!0,data:f,label:h}),c(f[a],!0)}})}return c(e,!1),r}function Tre(e){const t={...e};return"props"in t||Object.defineProperty(t,"props",{get(){return ic(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}const Kmn=(e,t,n)=>{if(!t||!t.length)return null;let r=!1;const o=(a,[l,...c])=>{if(!l)return[a];const u=a.split(l);return r=r||u.length>1,u.reduce((d,f)=>[...d,...o(f,c)],[]).filter(Boolean)},i=o(e,t);return r?typeof n<"u"?i.slice(0,n):i:null};function Ymn(e){const{visible:t,values:n}=e;if(!t)return null;const r=50;return p.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`${n.slice(0,r).map(({label:o,value:i})=>["number","string"].includes(typeof o)?o:i).join(", ")}`,n.length>r?", ...":null)}const Xmn=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},Vfe=(e,t=1)=>{if(t<=0){e();return}Xmn(()=>{Vfe(e,t-1)})};function Zmn(e,t,n){const[r,o]=p.useState(!1);p.useEffect(()=>{o(!0)},[]);const[i,a]=Ku(!1,e),c=n(r?i:!1),u=p.useRef(0),d=Xo(h=>{t&&c!==h&&t(h),a(h)}),f=Xo((h,m={})=>{const{cancelFun:g}=m;u.current+=1;const b=u.current,y=typeof h=="boolean"?h:!c;function v(){b===u.current&&!(g!=null&&g())&&d(y)}y?v():Vfe(()=>{v()})});return[c,f]}function NX(e){const{children:t,...n}=e;return t?p.createElement("div",n,t):null}const BKe=p.createContext(null);function kO(){return p.useContext(BKe)}const zKe=p.forwardRef((e,t)=>{const{onChange:n,onKeyDown:r,onBlur:o,style:i,syncWidth:a,value:l,className:c,autoComplete:u,...d}=e,{prefixCls:f,mode:h,onSearch:m,onSearchSubmit:g,onInputBlur:b,autoFocus:y,tokenWithEnter:v,placeholder:x,components:{input:S="input"}}=kO(),{id:C,classNames:_,styles:N,open:E,activeDescendantId:I,role:A,disabled:R}=$j()||{},k=Ae(`${f}-input`,_==null?void 0:_.input,c),T=p.useRef(!1),D=p.useRef(null),O=p.useRef(null);p.useImperativeHandle(t,()=>O.current);const z=Z=>{let{value:J}=Z.target;if(v&&D.current&&/[\r\n]/.test(D.current)){const oe=D.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");J=J.replace(oe,D.current)}D.current=null,m&&m(J,!0,T.current),n==null||n(Z)},F=Z=>{const{key:J}=Z,{value:oe}=Z.currentTarget;J==="Enter"&&h==="tags"&&!T.current&&g&&g(oe),r==null||r(Z)},U=Z=>{b==null||b(),o==null||o(Z)},G=()=>{T.current=!0},W=Z=>{if(T.current=!1,h!=="combobox"){const{value:J}=Z.currentTarget;m==null||m(J,!0,!1)}},Y=Z=>{const{clipboardData:J}=Z,oe=J==null?void 0:J.getData("text");D.current=oe||""},[B,$]=p.useState(void 0);ai(()=>{const Z=O.current;if(a&&Z){Z.style.width="0px";const J=Z.scrollWidth;$(J),Z.style.width=""}},[a,l]);const K={id:C,type:h==="combobox"?"text":"search",...d,ref:O,style:{...N==null?void 0:N.input,...i,"--select-input-width":B},autoFocus:y,autoComplete:u||"off",className:k,disabled:R,value:l||"",onChange:z,onKeyDown:F,onBlur:U,onPaste:Y,onCompositionStart:G,onCompositionEnd:W,role:A||"combobox","aria-expanded":E||!1,"aria-haspopup":"listbox","aria-owns":`${C}_list`,"aria-autocomplete":"list","aria-controls":`${C}_list`,"aria-activedescendant":E?I:void 0};if(p.isValidElement(S)){const Z=S.props||{},J={placeholder:e.placeholder||x,...K,...Z};return Object.keys(Z).forEach(oe=>{const de=Z[oe];typeof de=="function"&&(J[oe]=(...ae)=>{var ue;de(...ae),(ue=K[oe])==null||ue.call(K,...ae)})}),J.ref=hp(S.ref,K.ref),p.cloneElement(S,J)}const q=S;return p.createElement(q,K)});function HKe(e){const{prefixCls:t,placeholder:n,displayValues:r}=kO(),{classNames:o,styles:i}=$j(),{show:a=!0}=e;return r.length?null:p.createElement("div",{className:Ae(`${t}-placeholder`,o==null?void 0:o.placeholder),style:{visibility:a?"visible":"hidden",...i==null?void 0:i.placeholder}},n)}const Ufe=p.createContext(null);function VKe(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function Jmn(e){return e!=null}function Qmn(e){return!e&&e!==0}function Y5e(e){return["string","number"].includes(typeof e)}function kre(e){let t;return e&&(Y5e(e.title)?t=e.title.toString():Y5e(e.label)&&(t=e.label.toString())),t}function Mre(){return Mre=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,searchValue:r,activeValue:o,displayValues:i,maxLength:a,mode:l}=kO(),{triggerOpen:c,title:u,showSearch:d,classNames:f,styles:h}=$j(),m=p.useContext(Ufe),[g,b]=p.useState(!1),y=l==="combobox",v=i[0],x=p.useMemo(()=>y&&o&&!g&&c?o:d?r:"",[y,o,g,c,r,d]),S=p.useMemo(()=>{let C={className:`${n}-content-value`,style:{visibility:x?"hidden":"visible"}};if(v&&(m!=null&&m.flattenOptions)){const _=m.flattenOptions.find(N=>N.value===v.value);if(_!=null&&_.data){const{label:N,value:E,className:I,style:A,key:R,...k}=_.data;C={...C,...k,title:kre(_.data),className:Ae(C.className,I),style:{...C.style,...A}}}}return v&&!C.title&&(C.title=kre(v)),u!==void 0&&(C.title=u),C},[v,m==null?void 0:m.flattenOptions,n,x,u]);return p.useEffect(()=>{y&&b(!1)},[y,o]),p.createElement("div",{className:Ae(`${n}-content`,f==null?void 0:f.content),style:h==null?void 0:h.content},v?p.createElement("div",S,v.label):p.createElement(HKe,{show:!x}),p.createElement(zKe,Mre({ref:t},e,{value:x,maxLength:l==="combobox"?a:void 0,onChange:C=>{var _;b(!0),(_=e.onChange)==null||_.call(e,C)}})))}),XN=void 0;function tgn(e,t){const{prefixCls:n,invalidate:r,item:o,renderItem:i,responsive:a,responsiveDisabled:l,registerSize:c,itemKey:u,className:d,style:f,children:h,display:m,order:g,component:b="div",...y}=e,v=a&&!m;function x(E){c(u,E)}p.useEffect(()=>()=>{x(null)},[]);const S=i&&o!==XN?i(o,{index:g}):h;let C;r||(C={opacity:v?0:1,height:v?0:XN,overflowY:v?"hidden":XN,order:a?g:XN,pointerEvents:v?"none":XN,position:v?"absolute":XN});const _={};v&&(_["aria-hidden"]=!0);let N=p.createElement(b,we({className:Ae(!r&&n,d),style:{...C,...f}},_,y,{ref:t}),S);return a&&(N=p.createElement(Wg,{onResize:({offsetWidth:E})=>{x(E)},disabled:l},N)),N}const Hk=p.forwardRef(tgn);function ngn(e){if(typeof MessageChannel>"u")Ri(e);else{const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function rgn(){const e=p.useRef(null);return n=>{e.current||(e.current=[],ngn(()=>{au.unstable_batchedUpdates(()=>{e.current.forEach(r=>{r()}),e.current=null})})),e.current.push(n)}}function ZN(e,t){const[n,r]=p.useState(t),o=Xo(i=>{e(()=>{r(i)})});return[n,o]}const ez=Pe.createContext(null),ogn=(e,t)=>{const n=p.useContext(ez);if(!n){const{component:l="div",...c}=e;return p.createElement(l,we({},c,{ref:t}))}const{className:r,...o}=n,{className:i,...a}=e;return p.createElement(ez.Provider,{value:null},p.createElement(Hk,we({ref:t,className:Ae(r,i)},o,a)))},ign=p.forwardRef(ogn),UKe="responsive",GKe="invalidate";function agn(e){return`+ ${e.length} ...`}function sgn(e,t){const{prefixCls:n="rc-overflow",data:r=[],renderItem:o,renderRawItem:i,itemKey:a,itemWidth:l=10,ssr:c,style:u,className:d,maxCount:f,renderRest:h,renderRawRest:m,prefix:g,suffix:b,component:y="div",itemComponent:v,onVisibleChange:x,...S}=e,C=c==="full",_=rgn(),[N,E]=ZN(_,null),I=N||0,[A,R]=ZN(_,new Map),[k,T]=ZN(_,0),[D,O]=ZN(_,0),[z,F]=ZN(_,0),[U,G]=ZN(_,0),[W,Y]=p.useState(null),[B,$]=p.useState(null),K=p.useMemo(()=>B===null&&C?Number.MAX_SAFE_INTEGER:B||0,[B,N]),[q,Z]=p.useState(!1),J=`${n}-item`,oe=Math.max(k,D),de=f===UKe,ae=r.length&&de,ue=f===GKe,ce=ae||typeof f=="number"&&r.length>f,se=p.useMemo(()=>{let De=r;return ae?N===null&&C?De=r:De=r.slice(0,Math.min(r.length,I/l)):typeof f=="number"&&(De=r.slice(0,f)),De},[r,l,N,f,ae]),me=p.useMemo(()=>ae?r.slice(K+1):r.slice(se.length),[r,se,ae,K]),fe=p.useCallback((De,st)=>typeof a=="function"?a(De):(a&&(De==null?void 0:De[a]))??st,[a]),te=p.useCallback(o||(De=>De),[o]);function ye(De,st,vt){B===De&&(st===void 0||st===W)||($(De),vt||(Z(De{const qe=new Map(vt);return st===null?qe.delete(De):qe.set(De,st),qe})}function Ee(De,st){O(st),T(D)}function xe(De,st){F(st)}function Ne(De,st){G(st)}function _e(De){return A.get(fe(se[De],De))}ai(()=>{if(I&&typeof oe=="number"&&se){let De=z+U;const st=se.length,vt=st-1;if(!st){ye(0,null);return}for(let qe=0;qeI){ye(qe-1,De-Ye-U+D);break}}b&&_e(0)+U>I&&Y(null)}},[I,A,D,z,U,fe,se]);const Be=q&&!!me.length;let Te={};W!==null&&ae&&(Te={position:"absolute",left:W,top:0});const Ge={prefixCls:J,responsive:ae,component:v,invalidate:ue},Ze=i?(De,st)=>{const vt=fe(De,st);return p.createElement(ez.Provider,{key:vt,value:{...Ge,order:st,item:De,itemKey:vt,registerSize:ge,display:st<=K}},i(De,st))}:(De,st)=>{const vt=fe(De,st);return p.createElement(Hk,we({},Ge,{order:st,key:vt,item:De,renderItem:te,itemKey:vt,registerSize:ge,display:st<=K}))},ht={order:Be?K:Number.MAX_SAFE_INTEGER,className:`${J}-rest`,registerSize:Ee,display:Be},Oe=h||agn,ft=m?p.createElement(ez.Provider,{value:{...Ge,...ht}},m(me)):p.createElement(Hk,we({},Ge,ht),typeof Oe=="function"?Oe(me):Oe),Qe=p.createElement(y,we({className:Ae(!ue&&n,d),style:u,ref:t},S),g&&p.createElement(Hk,we({},Ge,{responsive:de,responsiveDisabled:!ae,order:-1,className:`${J}-prefix`,registerSize:xe,display:!0}),g),se.map(Ze),ce?ft:null,b&&p.createElement(Hk,we({},Ge,{responsive:de,responsiveDisabled:!ae,order:K,className:`${J}-suffix`,registerSize:Ne,display:!0,style:Te}),b));return de?p.createElement(Wg,{onResize:ve,disabled:!ae},Qe):Qe}const Ix=p.forwardRef(sgn);Ix.Item=ign;Ix.RESPONSIVE=UKe;Ix.INVALIDATE=GKe;const WKe=e=>{const{className:t,style:n,customizeIcon:r,customizeIconProps:o,children:i,onMouseDown:a,onClick:l}=e,c=typeof r=="function"?r(o):r;return p.createElement("span",{className:t,onMouseDown:u=>{u.preventDefault(),a==null||a(u)},style:{userSelect:"none",WebkitUserSelect:"none",...n},unselectable:"on",onClick:l,"aria-hidden":!0},c!==void 0?c:p.createElement("span",{className:Ae(t.split(/\s+/).map(u=>`${u}-icon`))},i))};function Rre(){return Rre=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.preventDefault(),e.stopPropagation()},cgn=p.forwardRef(function({inputProps:t},n){const{prefixCls:r,displayValues:o,searchValue:i,mode:a,onSelectorRemove:l,removeIcon:c}=kO(),{disabled:u,showSearch:d,triggerOpen:f,toggleOpen:h,autoClearSearchValue:m,tagRender:g,maxTagPlaceholder:b,maxTagTextLength:y,maxTagCount:v,classNames:x,styles:S}=$j(),C=`${r}-selection-item`;let _=i;!f&&a==="multiple"&&m!==!1&&(_="");const N=d&&_||"",E=d&&!u,I=c??"×",A=b??(U=>`+ ${U.length} ...`),R=g,k=U=>{h(U)},T=U=>{l==null||l(U)},D=(U,G,W,Y,B)=>p.createElement("span",{title:kre(U),className:Ae(C,{[`${C}-disabled`]:W},x==null?void 0:x.item),style:S==null?void 0:S.item},p.createElement("span",{className:Ae(`${C}-content`,x==null?void 0:x.itemContent),style:S==null?void 0:S.itemContent},G),Y&&p.createElement(WKe,{className:Ae(`${C}-remove`,x==null?void 0:x.itemRemove),style:S==null?void 0:S.itemRemove,onMouseDown:X5e,onClick:B,customizeIcon:I},"×")),O=(U,G,W,Y,B,$,K)=>{const q=Z=>{X5e(Z),k(!f)};return p.createElement("span",{onMouseDown:q},R({label:G,value:U,index:K==null?void 0:K.index,disabled:W,closable:Y,onClose:B,isMaxTag:!!$}))},z=(U,G)=>{const{disabled:W,label:Y,value:B}=U,$=!u&&!W;let K=Y;if(typeof y=="number"&&(typeof Y=="string"||typeof Y=="number")){const Z=String(K);Z.length>y&&(K=`${Z.slice(0,y)}...`)}const q=Z=>{Z&&Z.stopPropagation(),T(U)};return typeof R=="function"?O(B,K,W,$,q,void 0,G):D(U,K,W,$,q)},F=U=>{if(!o.length)return null;const G=typeof A=="function"?A(U):A;return typeof R=="function"?O(void 0,G,!1,!1,void 0,!0):D({title:G},G,!1)};return p.createElement(Ix,{prefixCls:`${r}-content`,className:x==null?void 0:x.content,style:S==null?void 0:S.content,prefix:!o.length&&(!i||!f)?p.createElement(HKe,null):null,data:o,renderItem:z,renderRest:F,suffix:p.createElement(zKe,Rre({ref:n,disabled:u,readOnly:!E},t,{value:N||"",syncWidth:!0})),itemKey:lgn,maxCount:v})}),ugn=p.forwardRef(function(t,n){const{multiple:r,onInputKeyDown:o,tabIndex:i}=kO(),a=$j(),{showSearch:l}=a,u={...Mh(a,{aria:!0}),onKeyDown:o,readOnly:!l,tabIndex:i};return r?p.createElement(cgn,{ref:n,inputProps:u}):p.createElement(egn,{ref:n,inputProps:u})});function dgn(e){return e&&![Wr.ESC,Wr.SHIFT,Wr.BACKSPACE,Wr.TAB,Wr.WIN_KEY,Wr.ALT,Wr.META,Wr.WIN_KEY_RIGHT,Wr.CTRL,Wr.SEMICOLON,Wr.EQUALS,Wr.CAPS_LOCK,Wr.CONTEXT_MENU,Wr.UP,Wr.LEFT,Wr.RIGHT,Wr.F1,Wr.F2,Wr.F3,Wr.F4,Wr.F5,Wr.F6,Wr.F7,Wr.F8,Wr.F9,Wr.F10,Wr.F11,Wr.F12].includes(e)}function tz(){return tz=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{which:J}=Z,oe=W.current instanceof HTMLTextAreaElement;!oe&&k&&(J===Wr.UP||J===Wr.DOWN)&&Z.preventDefault(),N&&N(Z),!(oe&&!k&&~[Wr.UP,Wr.DOWN,Wr.LEFT,Wr.RIGHT].indexOf(J))&&dgn(J)&&T(!0)});p.useImperativeHandle(n,()=>({focus:Z=>{var J,oe;(oe=(J=W.current||G.current).focus)==null||oe.call(J,Z)},blur:()=>{var Z,J;(J=(Z=W.current||G.current).blur)==null||J.call(Z)},nativeElement:G.current}));const B=Xo(Z=>{var J;if(!O){const oe=Wx(W.current);Z.nativeEvent._ori_target=oe,oe&&Z.target!==oe&&!oe.contains(Z.target)&&Z.preventDefault();const de=k&&!d&&(m==="combobox"||D);Z.nativeEvent._select_lazy?k&&T(!1):((J=W.current)==null||J.focus(),de||T())}C==null||C(Z)}),{root:$}=A,K=$l(R,fgn),q={...t,onInputKeyDown:Y};return $?p.isValidElement($)?p.cloneElement($,{...K,ref:hp($.ref,G)}):p.createElement($,tz({},K,{ref:G})):p.createElement(BKe.Provider,{value:q},p.createElement("div",tz({},K,{ref:G,className:o,style:i,onMouseDown:B}),p.createElement(NX,{className:Ae(`${r}-prefix`,F==null?void 0:F.prefix),style:U==null?void 0:U.prefix},a),p.createElement(ugn,{ref:W}),p.createElement(NX,{className:Ae(`${r}-suffix`,{[`${r}-suffix-loading`]:z},F==null?void 0:F.suffix),style:U==null?void 0:U.suffix},l),c&&p.createElement(NX,{className:Ae(`${r}-clear`,F==null?void 0:F.clear),style:U==null?void 0:U.clear,onMouseDown:Z=>{Z.nativeEvent._select_lazy=!0,_==null||_(Z)}},c),u))});function hgn(e,t,n){return p.useMemo(()=>{let{root:r,input:o}=e||{};return n&&(r=n()),t&&(o=t()),{root:r,input:o}},[e,t,n])}function Ore(){return Ore=Object.assign?Object.assign.bind():function(e){for(var t=1;te==="tags"||e==="multiple",mgn=p.forwardRef((e,t)=>{const{id:n,prefixCls:r,className:o,styles:i,classNames:a,showSearch:l,tagRender:c,showScrollBar:u="optional",direction:d,omitDomProps:f,displayValues:h,onDisplayValuesChange:m,emptyOptions:g,notFoundContent:b="Not Found",onClear:y,maxCount:v,placeholder:x,mode:S,disabled:C,loading:_,getInputElement:N,getRawInputElement:E,open:I,defaultOpen:A,onPopupVisibleChange:R,activeValue:k,onActiveValueChange:T,activeDescendantId:D,searchValue:O,autoClearSearchValue:z,onSearch:F,onSearchSplit:U,tokenSeparators:G,allowClear:W,prefix:Y,suffix:B,suffixIcon:$,clearIcon:K,OptionList:q,animation:Z,transitionName:J,popupStyle:oe,popupClassName:de,popupMatchSelectWidth:ae,popupRender:ue,popupAlign:ce,placement:se,builtinPlacements:me,getPopupContainer:fe,showAction:te=[],onFocus:ye,onBlur:ve,onKeyUp:ge,onKeyDown:Ee,onMouseDown:xe,components:Ne,..._e}=e,Be=Dre(S),Te=p.useRef(null),Ge=p.useRef(null),Ze=p.useRef(null),[ht,Oe]=p.useState(!1);p.useImperativeHandle(t,()=>{var Ut,Sn;return{focus:(Ut=Te.current)==null?void 0:Ut.focus,blur:(Sn=Te.current)==null?void 0:Sn.blur,scrollTo:Mn=>{var lt;return(lt=Ze.current)==null?void 0:lt.scrollTo(Mn)},nativeElement:Wx(Te.current)}});const ft=hgn(Ne,N,E),Qe=p.useMemo(()=>{var Sn;if(S!=="combobox")return O;const Ut=(Sn=h[0])==null?void 0:Sn.value;return typeof Ut=="string"||typeof Ut=="number"?String(Ut):""},[O,S,h]),De=S==="combobox"&&typeof N=="function"&&N()||null,st=!b&&g,[vt,qe]=Zmn(I,R,Ut=>C||st?!1:Ut),Ye=p.useMemo(()=>(G||[]).some(Ut=>[` +`,`\r +`].includes(Ut)),[G]),mt=(Ut,Sn,Mn)=>{if(Be&&Are(v)&&h.length>=v)return;let lt=!0,Xe=Ut;T==null||T(null);const yt=Kmn(Ut,G,Are(v)?v-h.length:void 0),Mt=Mn?null:yt;return S!=="combobox"&&Mt&&(Xe="",U==null||U(Mt),qe(!1),lt=!1),F&&Qe!==Xe&&F(Xe,{source:Sn?"typing":"effect"}),Ut&&Sn&<&&qe(!0),lt},Et=Ut=>{!Ut||!Ut.trim()||F(Ut,{source:"submit"})};p.useEffect(()=>{!vt&&!Be&&S!=="combobox"&&mt("",!1,!1)},[vt]),p.useEffect(()=>{C&&(qe(!1),Oe(!1))},[C,vt]);const[vn,gt]=Hmn(),Fe=p.useRef(!1),$e=Ut=>{var Xe;const Sn=vn(),{key:Mn}=Ut,lt=Mn==="Enter";if(lt&&(S!=="combobox"&&Ut.preventDefault(),vt||qe(!0)),gt(!!Qe),Mn==="Backspace"&&!Sn&&Be&&!Qe&&h.length){const yt=[...h];let Mt=null;for(let tn=yt.length-1;tn>=0;tn-=1){const mn=yt[tn];if(!mn.disabled){yt.splice(tn,1),Mt=mn;break}}Mt&&m(yt,{type:"remove",values:[Mt]})}vt&&(!lt||!Fe.current)&&(lt&&(Fe.current=!0),(Xe=Ze.current)==null||Xe.onKeyDown(Ut)),Ee==null||Ee(Ut)},nt=(Ut,...Sn)=>{var Mn;vt&&((Mn=Ze.current)==null||Mn.onKeyUp(Ut,...Sn)),Ut.key==="Enter"&&(Fe.current=!1),ge==null||ge(Ut,...Sn)},wt=Xo(Ut=>{const Sn=h.filter(Mn=>Mn!==Ut);m(Sn,{type:"remove",values:[Ut]})}),Dt=()=>{Fe.current=!1},on=()=>{var Ut;return[Wx(Te.current),(Ut=Ge.current)==null?void 0:Ut.getPopupElement()]};Vmn(on,vt,qe,!!ft.root);const jn=p.useRef(!1),kt=Ut=>{Oe(!0),C||(te.includes("focus")&&qe(!0),ye==null||ye(Ut))},pn=()=>{vt&&!jn.current&&qe(!1,{cancelFun:()=>$Ke(on(),document.activeElement)})},tt=Ut=>{Oe(!1),Qe&&(S==="tags"?F(Qe,{source:"submit"}):S==="multiple"&&F("",{source:"blur"})),pn(),C||ve==null||ve(Ut)},jt=(Ut,...Sn)=>{var Xe;const{target:Mn}=Ut,lt=(Xe=Ge.current)==null?void 0:Xe.getPopupElement();lt!=null&<.contains(Mn)&&qe&&qe(!0),xe==null||xe(Ut,...Sn),jn.current=!0,Vfe(()=>{jn.current=!1})},[,Nn]=p.useState({});function Xt(){Nn({})}let ln;ft.root&&(ln=Ut=>{qe(Ut)});const un=p.useMemo(()=>({...e,notFoundContent:b,open:vt,triggerOpen:vt,id:n,showSearch:l,multiple:Be,toggleOpen:qe,showScrollBar:u,styles:i,classNames:a}),[e,b,qe,n,l,Be,vt,u,i,a]),Kt=p.useMemo(()=>{const Ut=B??$;return typeof Ut=="function"?Ut({searchValue:Qe,open:vt,focused:ht,showSearch:l,loading:_}):Ut},[B,$,Qe,vt,ht,l,_]),On=()=>{var Ut;y==null||y(),(Ut=Te.current)==null||Ut.focus(),m([],{type:"clear",values:h}),mt("",!1,!1)},{allowClear:Pr,clearIcon:ur}=zmn(r,h,W,K,C,Qe,S),Ht=p.createElement(q,{ref:Ze}),Tt=Ae(r,o,{[`${r}-focused`]:ht,[`${r}-multiple`]:Be,[`${r}-single`]:!Be,[`${r}-allow-clear`]:Pr,[`${r}-show-arrow`]:Kt!=null,[`${r}-disabled`]:C,[`${r}-loading`]:_,[`${r}-open`]:vt,[`${r}-customize-input`]:De,[`${r}-show-search`]:l});let Zt=p.createElement(pgn,Ore({},_e,{ref:Te,prefixCls:r,className:Tt,focused:ht,prefix:Y,suffix:Kt,clearIcon:ur,multiple:Be,mode:S,displayValues:h,placeholder:x,searchValue:Qe,activeValue:k,onSearch:mt,onSearchSubmit:Et,onInputBlur:Dt,onFocus:kt,onBlur:tt,onClearMouseDown:On,onKeyDown:$e,onKeyUp:nt,onSelectorRemove:wt,tokenWithEnter:Ye,onMouseDown:jt,components:ft}));return Zt=p.createElement(Wmn,{ref:Ge,disabled:C,prefixCls:r,visible:vt,popupElement:Ht,animation:Z,transitionName:J,popupStyle:oe,popupClassName:de,direction:d,popupMatchSelectWidth:ae,popupRender:ue,popupAlign:ce,placement:se,builtinPlacements:me,getPopupContainer:fe,empty:g,onPopupVisibleChange:ln,onPopupMouseEnter:Xt,onPopupMouseDown:jt,onPopupBlur:pn},Zt),p.createElement(LKe.Provider,{value:un},p.createElement(Ymn,{visible:ht&&!vt,values:h}),Zt)}),Gfe=()=>null;Gfe.isSelectOptGroup=!0;const Wfe=()=>null;Wfe.isSelectOption=!0;const qKe=p.forwardRef(({height:e,offsetY:t,offsetX:n,children:r,prefixCls:o,onInnerResize:i,innerProps:a,rtl:l,extra:c},u)=>{let d={},f={display:"flex",flexDirection:"column"};return t!==void 0&&(d={height:e,position:"relative",overflow:"hidden"},f={...f,transform:`translateY(${t}px)`,[l?"marginRight":"marginLeft"]:-n,position:"absolute",left:0,right:0,top:0}),p.createElement("div",{style:d},p.createElement(Wg,{onResize:({offsetHeight:h})=>{h&&i&&i()}},p.createElement("div",we({style:f,className:Ae({[`${o}-holder-inner`]:o}),ref:u},a),r,c)))});qKe.displayName="Filler";function ggn({children:e,setRef:t}){const n=p.useCallback(r=>{t(r)},[]);return p.cloneElement(e,{ref:n})}function ygn(e,t,n,r,o,i,a,{getKey:l}){return e.slice(t,n+1).map((c,u)=>{const d=t+u,f=a(c,d,{style:{width:r},offsetX:o}),h=l(c);return p.createElement(ggn,{key:h,setRef:m=>i(c,m)},f)})}function bgn(e,t,n){const r=e.length,o=t.length;let i,a;if(r===0&&o===0)return null;r{const l=bgn(r||[],e||[],t);(l==null?void 0:l.index)!==void 0&&a(e[l.index]),o(e)},[e]),[i]}const Z5e=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),KKe=((e,t,n,r)=>{const o=p.useRef(!1),i=p.useRef(null);function a(){clearTimeout(i.current),o.current=!0,i.current=setTimeout(()=>{o.current=!1},50)}const l=p.useRef({top:e,bottom:t,left:n,right:r});return l.current.top=e,l.current.bottom=t,l.current.left=n,l.current.right=r,(c,u,d=!1)=>{const f=c?u<0&&l.current.left||u>0&&l.current.right:u<0&&l.current.top||u>0&&l.current.bottom;return d&&f?(clearTimeout(i.current),o.current=!1):(!f||o.current)&&a(),!o.current&&f}});function xgn(e,t,n,r,o,i,a){const l=p.useRef(0),c=p.useRef(null),u=p.useRef(null),d=p.useRef(!1),f=KKe(t,n,r,o);function h(x,S){if(Ri.cancel(c.current),f(!1,S))return;const C=x;if(!C._virtualHandled)C._virtualHandled=!0;else return;l.current+=S,u.current=S,Z5e||C.preventDefault(),c.current=Ri(()=>{const _=d.current?10:1;a(l.current*_,!1),l.current=0})}function m(x,S){a(S,!0),Z5e||x.preventDefault()}const g=p.useRef(null),b=p.useRef(null);function y(x){if(!e)return;Ri.cancel(b.current),b.current=Ri(()=>{g.current=null},2);const{deltaX:S,deltaY:C,shiftKey:_}=x;let N=S,E=C;(g.current==="sx"||!g.current&&_&&C&&!S)&&(N=C,E=0,g.current="sx");const I=Math.abs(N),A=Math.abs(E);g.current===null&&(g.current=i&&I>A?"x":"y"),g.current==="y"?h(x,E):m(x,N)}function v(x){e&&(d.current=x.detail===u.current)}return[y,v]}function wgn(e,t,n,r){const[o,i]=p.useMemo(()=>[new Map,[]],[e,n.id,r]);return(l,c=l)=>{let u=o.get(l),d=o.get(c);if(u===void 0||d===void 0){const f=e.length;for(let h=i.length;h{let m=!1;i.current.forEach((g,b)=>{if(g&&g.offsetParent){const{offsetHeight:y}=g,{marginTop:v,marginBottom:x}=getComputedStyle(g),S=J5e(v),C=J5e(x),_=y+S+C;a.current.get(b)!==_&&(a.current.set(b,_),m=!0)}}),m&&o(g=>g+1)};if(f)h();else{l.current+=1;const m=l.current;Promise.resolve().then(()=>{m===l.current&&h()})}}function d(f,h){const m=e(f);i.current.get(m),h?(i.current.set(m,h),u()):i.current.delete(m)}return p.useEffect(()=>c,[]),[d,u,a.current,r]}const Q5e=14/15;function _gn(e,t,n){const r=p.useRef(!1),o=p.useRef(0),i=p.useRef(0),a=p.useRef(null),l=p.useRef(null);let c;const u=h=>{if(r.current){const m=Math.ceil(h.touches[0].pageX),g=Math.ceil(h.touches[0].pageY);let b=o.current-m,y=i.current-g;const v=Math.abs(b)>Math.abs(y);v?o.current=m:i.current=g;const x=n(v,v?b:y,!1,h);x&&h.preventDefault(),clearInterval(l.current),x&&(l.current=setInterval(()=>{v?b*=Q5e:y*=Q5e;const S=Math.floor(v?b:y);(!n(v,S,!0)||Math.abs(S)<=.1)&&clearInterval(l.current)},16))}},d=()=>{r.current=!1,c()},f=h=>{c(),h.touches.length===1&&!r.current&&(r.current=!0,o.current=Math.ceil(h.touches[0].pageX),i.current=Math.ceil(h.touches[0].pageY),a.current=h.target,a.current.addEventListener("touchmove",u,{passive:!1}),a.current.addEventListener("touchend",d,{passive:!0}))};c=()=>{a.current&&(a.current.removeEventListener("touchmove",u),a.current.removeEventListener("touchend",d))},ai(()=>(e&&t.current.addEventListener("touchstart",f,{passive:!0}),()=>{var h;(h=t.current)==null||h.removeEventListener("touchstart",f),c(),clearInterval(l.current)}),[e])}function ePe(e){return Math.floor(e**.5)}function Lre(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function jgn(e,t,n){p.useEffect(()=>{const r=t.current;if(e&&r){let o=!1,i,a;const l=()=>{Ri.cancel(i)},c=()=>{l(),i=Ri(()=>{n(a),c()})},u=()=>{o=!1,l()},d=h=>{if(h.target.draggable||h.button!==0)return;const m=h;m._virtualHandled||(m._virtualHandled=!0,o=!0)},f=h=>{if(o){const m=Lre(h,!1),{top:g,bottom:b}=r.getBoundingClientRect();if(m<=g){const y=g-m;a=-ePe(y),c()}else if(m>=b){const y=m-b;a=ePe(y),c()}else l()}};return r.addEventListener("mousedown",d),r.ownerDocument.addEventListener("mouseup",u),r.ownerDocument.addEventListener("mousemove",f),r.ownerDocument.addEventListener("dragend",u),()=>{r.removeEventListener("mousedown",d),r.ownerDocument.removeEventListener("mouseup",u),r.ownerDocument.removeEventListener("mousemove",f),r.ownerDocument.removeEventListener("dragend",u),l()}}},[e])}const Ngn=10;function Egn(e,t,n,r,o,i,a,l){const c=p.useRef(),[u,d]=p.useState(null);return ai(()=>{if(u&&u.times({...S}));return}i();const{targetAlign:f,originAlign:h,index:m,offset:g}=u,b=e.current.clientHeight;let y=!1,v=f,x=null;if(b){const S=f||h;let C=0,_=0,N=0;const E=Math.min(t.length-1,m);for(let A=0;A<=E;A+=1){const R=o(t[A]);_=C;const k=n.get(R);N=_+(k===void 0?r:k),C=N}let I=S==="top"?g:b-g;for(let A=E;A>=0;A-=1){const R=o(t[A]),k=n.get(R);if(k===void 0){y=!0;break}if(I-=k,I<=0)break}switch(S){case"top":x=_-g;break;case"bottom":x=N-b+g;break;default:{const{scrollTop:A}=e.current,R=A+b;_R&&(v="bottom")}}x!==null&&a(x),x!==u.lastTop&&(y=!0)}y&&d({...u,times:u.times+1,targetAlign:v,lastTop:x})}},[u,e.current]),f=>{if(f==null){l();return}if(Ri.cancel(c.current),typeof f=="number")a(f);else if(f&&typeof f=="object"){let h;const{align:m}=f;"index"in f?{index:h}=f:h=t.findIndex(b=>o(b)===f.key);const{offset:g=0}=f;d({times:0,index:h,offset:g,originAlign:m})}}}const tPe=p.forwardRef((e,t)=>{const{prefixCls:n,rtl:r,scrollOffset:o,scrollRange:i,onStartMove:a,onStopMove:l,onScroll:c,horizontal:u,spinSize:d,containerSize:f,style:h,thumbStyle:m,showScrollBar:g}=e,[b,y]=p.useState(!1),[v,x]=p.useState(null),[S,C]=p.useState(null),_=!r,N=p.useRef(),E=p.useRef(),[I,A]=p.useState(g),R=p.useRef(),k=()=>{g===!0||g===!1||(clearTimeout(R.current),A(!0),R.current=setTimeout(()=>{A(!1)},3e3))},T=i-f||0,D=f-d||0,O=p.useMemo(()=>o===0||T===0?0:o/T*D,[o,T,D]),z=K=>{K.stopPropagation(),K.preventDefault()},F=p.useRef({top:O,dragging:b,pageY:v,startTop:S});F.current={top:O,dragging:b,pageY:v,startTop:S};const U=K=>{y(!0),x(Lre(K,u)),C(F.current.top),a(),K.stopPropagation(),K.preventDefault()};p.useEffect(()=>{const K=J=>{J.preventDefault()},q=N.current,Z=E.current;return q.addEventListener("touchstart",K,{passive:!1}),Z.addEventListener("touchstart",U,{passive:!1}),()=>{q.removeEventListener("touchstart",K),Z.removeEventListener("touchstart",U)}},[]);const G=p.useRef();G.current=T;const W=p.useRef();W.current=D,p.useEffect(()=>{if(b){let K;const q=J=>{const{dragging:oe,pageY:de,startTop:ae}=F.current;Ri.cancel(K);const ue=N.current.getBoundingClientRect(),ce=f/(u?ue.width:ue.height);if(oe){const se=(Lre(J,u)-de)*ce;let me=ae;!_&&u?me-=se:me+=se;const fe=G.current,te=W.current,ye=te?me/te:0;let ve=Math.ceil(ye*fe);ve=Math.max(ve,0),ve=Math.min(ve,fe),K=Ri(()=>{c(ve,u)})}},Z=()=>{y(!1),l()};return window.addEventListener("mousemove",q,{passive:!0}),window.addEventListener("touchmove",q,{passive:!0}),window.addEventListener("mouseup",Z,{passive:!0}),window.addEventListener("touchend",Z,{passive:!0}),()=>{window.removeEventListener("mousemove",q),window.removeEventListener("touchmove",q),window.removeEventListener("mouseup",Z),window.removeEventListener("touchend",Z),Ri.cancel(K)}}},[b]),p.useEffect(()=>(k(),()=>{clearTimeout(R.current)}),[o]),p.useImperativeHandle(t,()=>({delayHidden:k}));const Y=`${n}-scrollbar`,B={position:"absolute",visibility:I?null:"hidden"},$={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return u?(Object.assign(B,{height:8,left:0,right:0,bottom:0}),Object.assign($,{height:"100%",width:d,[_?"left":"right"]:O})):(Object.assign(B,{width:8,top:0,bottom:0,[_?"right":"left"]:0}),Object.assign($,{width:"100%",height:d,top:O})),p.createElement("div",{ref:N,className:Ae(Y,{[`${Y}-horizontal`]:u,[`${Y}-vertical`]:!u,[`${Y}-visible`]:I}),style:{...B,...h},onMouseDown:z,onMouseMove:k},p.createElement("div",{ref:E,className:Ae(`${Y}-thumb`,{[`${Y}-thumb-moving`]:b}),style:{...$,...m},onMouseDown:U}))}),Pgn=20;function nPe(e=0,t=0){let n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,Pgn),Math.floor(n)}const Ign=[],Agn={overflowY:"auto",overflowAnchor:"none"};function Tgn(e,t){const{prefixCls:n="rc-virtual-list",className:r,height:o,itemHeight:i,fullHeight:a=!0,style:l,data:c,children:u,itemKey:d,virtual:f,direction:h,scrollWidth:m,component:g="div",onScroll:b,onVirtualScroll:y,onVisibleChange:v,innerProps:x,extraRender:S,styles:C,showScrollBar:_="optional",...N}=e,E=p.useCallback(tt=>typeof d=="function"?d(tt):tt==null?void 0:tt[d],[d]),[I,A,R,k]=Cgn(E),T=!!(f!==!1&&o&&i),D=p.useMemo(()=>Object.values(R.maps).reduce((tt,jt)=>tt+jt,0),[R.id,R.maps]),O=T&&c&&(Math.max(i*c.length,D)>o||!!m),z=h==="rtl",F=Ae(n,{[`${n}-rtl`]:z},r),U=c||Ign,G=p.useRef(),W=p.useRef(),Y=p.useRef(),[B,$]=p.useState(0),[K,q]=p.useState(0),[Z,J]=p.useState(!1),oe=()=>{J(!0)},de=()=>{J(!1)},ae={getKey:E};function ue(tt){$(jt=>{let Nn;typeof tt=="function"?Nn=tt(jt):Nn=tt;const Xt=ht(Nn);return G.current.scrollTop=Xt,Xt})}const ce=p.useRef({start:0,end:U.length}),se=p.useRef(),[me]=vgn(U,E);se.current=me;const{scrollHeight:fe,start:te,end:ye,offset:ve}=p.useMemo(()=>{var un;if(!T)return{scrollHeight:void 0,start:0,end:U.length-1,offset:void 0};if(!O)return{scrollHeight:((un=W.current)==null?void 0:un.offsetHeight)||0,start:0,end:U.length-1,offset:void 0};let tt=0,jt,Nn,Xt;const ln=U.length;for(let Kt=0;Kt=B&&jt===void 0&&(jt=Kt,Nn=tt),Ht>B+o&&Xt===void 0&&(Xt=Kt),tt=Ht}return jt===void 0&&(jt=0,Nn=0,Xt=Math.ceil(o/i)),Xt===void 0&&(Xt=U.length-1),Xt=Math.min(Xt+1,U.length-1),{scrollHeight:tt,start:jt,end:Xt,offset:Nn}},[O,T,B,U,k,o]);ce.current.start=te,ce.current.end=ye,p.useLayoutEffect(()=>{const tt=R.getRecord();if(tt.size===1){const jt=Array.from(tt.keys())[0],Nn=tt.get(jt),Xt=U[te];if(Xt&&Nn===void 0&&E(Xt)===jt){const Kt=R.get(jt)-i;ue(On=>On+Kt)}}R.resetRecord()},[fe]);const[ge,Ee]=p.useState({width:0,height:o}),xe=tt=>{Ee({width:tt.offsetWidth,height:tt.offsetHeight})},Ne=p.useRef(),_e=p.useRef(),Be=p.useMemo(()=>nPe(ge.width,m),[ge.width,m]),Te=p.useMemo(()=>nPe(ge.height,fe),[ge.height,fe]),Ge=fe-o,Ze=p.useRef(Ge);Ze.current=Ge;function ht(tt){let jt=tt;return Number.isNaN(Ze.current)||(jt=Math.min(jt,Ze.current)),jt=Math.max(jt,0),jt}const Oe=B<=0,ft=B>=Ge,Qe=K<=0,De=K>=m,st=KKe(Oe,ft,Qe,De),vt=()=>({x:z?-K:K,y:B}),qe=p.useRef(vt()),Ye=Xo(tt=>{if(y){const jt={...vt(),...tt};(qe.current.x!==jt.x||qe.current.y!==jt.y)&&(y(jt),qe.current=jt)}});function mt(tt,jt){const Nn=tt;jt?(au.flushSync(()=>{q(Nn)}),Ye()):ue(Nn)}function Et(tt){const{scrollTop:jt}=tt.currentTarget;jt!==B&&ue(jt),b==null||b(tt),Ye()}const vn=tt=>{let jt=tt;const Nn=m?m-ge.width:0;return jt=Math.max(jt,0),jt=Math.min(jt,Nn),jt},gt=Xo((tt,jt)=>{jt?(au.flushSync(()=>{q(Nn=>{const Xt=Nn+(z?-tt:tt);return vn(Xt)})}),Ye()):ue(Nn=>Nn+tt)}),[Fe,$e]=xgn(T,Oe,ft,Qe,De,!!m,gt);_gn(T,G,(tt,jt,Nn,Xt)=>{const ln=Xt;return st(tt,jt,Nn)?!1:!ln||!ln._virtualHandled?(ln&&(ln._virtualHandled=!0),Fe({preventDefault(){},deltaX:tt?jt:0,deltaY:tt?0:jt}),!0):!1}),jgn(O,G,tt=>{ue(jt=>jt+tt)}),ai(()=>{function tt(Nn){const Xt=Oe&&Nn.detail<0,ln=ft&&Nn.detail>0;T&&!Xt&&!ln&&Nn.preventDefault()}const jt=G.current;return jt.addEventListener("wheel",Fe,{passive:!1}),jt.addEventListener("DOMMouseScroll",$e,{passive:!0}),jt.addEventListener("MozMousePixelScroll",tt,{passive:!1}),()=>{jt.removeEventListener("wheel",Fe),jt.removeEventListener("DOMMouseScroll",$e),jt.removeEventListener("MozMousePixelScroll",tt)}},[T,Oe,ft]),ai(()=>{if(m){const tt=vn(K);q(tt),Ye({x:tt})}},[ge.width,m]);const nt=()=>{var tt,jt;(tt=Ne.current)==null||tt.delayHidden(),(jt=_e.current)==null||jt.delayHidden()},wt=Egn(G,U,R,i,E,()=>A(!0),ue,nt);p.useImperativeHandle(t,()=>({nativeElement:Y.current,getScrollInfo:vt,scrollTo:tt=>{function jt(Nn){return Nn&&typeof Nn=="object"&&("left"in Nn||"top"in Nn)}jt(tt)?(tt.left!==void 0&&q(vn(tt.left)),wt(tt.top)):wt(tt)}})),ai(()=>{if(v){const tt=U.slice(te,ye+1);v(tt,U)}},[te,ye,U]);const Dt=wgn(U,E,R,i),on=S==null?void 0:S({start:te,end:ye,virtual:O,offsetX:K,offsetY:ve,rtl:z,getSize:Dt}),jn=ygn(U,te,ye,m,K,I,u,ae);let kt=null;o&&(kt={[a?"height":"maxHeight"]:o,...Agn},T&&(kt.overflowY="hidden",m&&(kt.overflowX="hidden"),Z&&(kt.pointerEvents="none")));const pn={};return z&&(pn.dir="rtl"),p.createElement("div",we({ref:Y,style:{...l,position:"relative"},className:F},pn,N),p.createElement(Wg,{onResize:xe},p.createElement(g,{className:`${n}-holder`,style:kt,ref:G,onScroll:Et,onMouseEnter:nt},p.createElement(qKe,{prefixCls:n,height:fe,offsetX:K,offsetY:ve,scrollWidth:m,onInnerResize:A,ref:W,innerProps:x,rtl:z,extra:on},jn))),O&&fe>o&&p.createElement(tPe,{ref:Ne,prefixCls:n,scrollOffset:B,scrollRange:fe,rtl:z,onScroll:mt,onStartMove:oe,onStopMove:de,spinSize:Te,containerSize:ge.height,style:C==null?void 0:C.verticalScrollBar,thumbStyle:C==null?void 0:C.verticalScrollBarThumb,showScrollBar:_}),O&&m>ge.width&&p.createElement(tPe,{ref:_e,prefixCls:n,scrollOffset:K,scrollRange:m,rtl:z,onScroll:mt,onStartMove:oe,onStopMove:de,spinSize:Be,containerSize:ge.width,horizontal:!0,style:C==null?void 0:C.horizontalScrollBar,thumbStyle:C==null?void 0:C.horizontalScrollBarThumb,showScrollBar:_}))}const ZV=p.forwardRef(Tgn);ZV.displayName="List";function kgn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}function A4(){return A4=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var ae,ue;const{prefixCls:n,id:r,open:o,multiple:i,mode:a,searchValue:l,toggleOpen:c,notFoundContent:u,onPopupScroll:d,showScrollBar:f}=$j(),{maxCount:h,flattenOptions:m,onActiveValue:g,defaultActiveFirstOption:b,onSelect:y,menuItemSelectedIcon:v,rawValues:x,fieldNames:S,virtual:C,direction:_,listHeight:N,listItemHeight:E,optionRender:I,classNames:A,styles:R}=p.useContext(Ufe),k=`${n}-item`,T=Mj(()=>m,[o,m],(ce,se)=>se[0]&&ce[1]!==se[1]),D=p.useRef(null),O=p.useMemo(()=>i&&Are(h)&&(x==null?void 0:x.size)>=h,[i,h,x==null?void 0:x.size]),z=ce=>{ce.preventDefault()},F=ce=>{var se;(se=D.current)==null||se.scrollTo(typeof ce=="number"?{index:ce}:ce)},U=p.useCallback(ce=>a==="combobox"?!1:x.has(ce),[a,[...x].toString(),x.size]),G=(ce,se=1)=>{const me=T.length;for(let fe=0;feG(0)),B=(ce,se=!1)=>{Y(ce);const me={source:se?"keyboard":"mouse"},fe=T[ce];if(!fe){g(null,-1,me);return}g(fe.value,ce,me)};p.useEffect(()=>{B(b!==!1?G(0):-1)},[T.length,l]);const $=p.useCallback(ce=>a==="combobox"?String(ce).toLowerCase()===l.toLowerCase():x.has(ce),[a,l,[...x].toString(),x.size]);p.useEffect(()=>{var se;let ce;if(!i&&o&&x.size===1){const me=Array.from(x)[0],fe=T.findIndex(({data:te})=>l?String(te.value).startsWith(l):te.value===me);fe!==-1&&(B(fe),ce=setTimeout(()=>{F(fe)}))}return o&&((se=D.current)==null||se.scrollTo(void 0)),()=>clearTimeout(ce)},[o,l]);const K=ce=>{ce!==void 0&&y(ce,{selected:!x.has(ce)}),i||c(!1)};if(p.useImperativeHandle(t,()=>({onKeyDown:ce=>{const{which:se,ctrlKey:me}=ce;switch(se){case Wr.N:case Wr.P:case Wr.UP:case Wr.DOWN:{let fe=0;if(se===Wr.UP?fe=-1:se===Wr.DOWN?fe=1:kgn()&&me&&(se===Wr.N?fe=1:se===Wr.P&&(fe=-1)),fe!==0){const te=G(W+fe,fe);F(te),B(te,!0)}break}case Wr.TAB:case Wr.ENTER:{const fe=T[W];if(!fe||fe.data.disabled)return K(void 0);!O||x.has(fe.value)?K(fe.value):K(void 0),o&&ce.preventDefault();break}case Wr.ESC:c(!1),o&&ce.stopPropagation()}},onKeyUp:()=>{},scrollTo:ce=>{F(ce)}})),T.length===0)return p.createElement("div",{role:"listbox",id:`${r}_list`,className:`${k}-empty`,onMouseDown:z},u);const q=Object.keys(S).map(ce=>S[ce]),Z=ce=>ce.label;function J(ce,se){const{group:me}=ce;return{role:me?"presentation":"option",id:`${r}_list_${se}`}}const oe=ce=>{const se=T[ce];if(!se)return null;const me=se.data||{},{value:fe}=me,{group:te}=se,ye=Mh(me,!0),ve=Z(se);return se?p.createElement("div",A4({"aria-label":typeof ve=="string"&&!te?ve:null},ye,{key:ce},J(se,ce),{"aria-selected":$(fe)}),fe):null},de={role:"listbox",id:`${r}_list`};return p.createElement(p.Fragment,null,C&&p.createElement("div",A4({},de,{style:{height:0,width:0,overflow:"hidden"}}),oe(W-1),oe(W),oe(W+1)),p.createElement(ZV,{itemKey:"key",ref:D,data:T,height:N,itemHeight:E,fullHeight:!1,onMouseDown:z,onScroll:d,virtual:C,direction:_,innerProps:C?null:de,showScrollBar:f,className:(ae=A==null?void 0:A.popup)==null?void 0:ae.list,style:(ue=R==null?void 0:R.popup)==null?void 0:ue.list},(ce,se)=>{var qe,Ye;const{group:me,groupOption:fe,data:te,label:ye,value:ve}=ce,{key:ge}=te;if(me){const mt=te.title??(rPe(ye)?ye.toString():void 0);return p.createElement("div",{className:Ae(k,`${k}-group`,te.className),title:mt},ye!==void 0?ye:ge)}const{disabled:Ee,title:xe,children:Ne,style:_e,className:Be,...Te}=te,Ge=$l(Te,q),Ze=U(ve),ht=Ee||!Ze&&O,Oe=`${k}-option`,ft=Ae(k,Oe,Be,(qe=A==null?void 0:A.popup)==null?void 0:qe.listItem,{[`${Oe}-grouped`]:fe,[`${Oe}-active`]:W===se&&!ht,[`${Oe}-disabled`]:ht,[`${Oe}-selected`]:Ze}),Qe=Z(ce),De=!v||typeof v=="function"||Ze,st=typeof Qe=="number"?Qe:Qe||ve;let vt=rPe(st)?st.toString():void 0;return xe!==void 0&&(vt=xe),p.createElement("div",A4({},Mh(Ge),C?{}:J(ce,se),{"aria-selected":C?void 0:$(ve),className:ft,title:vt,onMouseMove:()=>{W===se||ht||B(se)},onClick:()=>{ht||K(ve)},style:{...(Ye=R==null?void 0:R.popup)==null?void 0:Ye.listItem,..._e}}),p.createElement("div",{className:`${Oe}-content`},typeof I=="function"?I(ce,{index:se}):st),p.isValidElement(v)||Ze,De&&p.createElement(WKe,{className:`${k}-option-state`,customizeIcon:v,customizeIconProps:{value:ve,disabled:ht,isSelected:Ze}},Ze?"✓":null))}))},Rgn=p.forwardRef(Mgn),Ogn=((e,t)=>{const n=p.useRef({values:new Map,options:new Map}),r=p.useMemo(()=>{const{values:i,options:a}=n.current,l=e.map(d=>{var f;return d.label===void 0?{...d,label:(f=i.get(d.value))==null?void 0:f.label}:d}),c=new Map,u=new Map;return l.forEach(d=>{c.set(d.value,d),u.set(d.value,t.get(d.value)||a.get(d.value))}),n.current.values=c,n.current.options=u,l},[e,t]),o=p.useCallback(i=>t.get(i)||n.current.options.get(i),[t]);return[r,o]});function EX(e,t){return VKe(e).join("").toUpperCase().includes(t)}const Dgn=((e,t,n,r,o)=>p.useMemo(()=>{if(!n||r===!1)return e;const{options:i,label:a,value:l}=t,c=[],u=typeof r=="function",d=n.toUpperCase(),f=u?r:(m,g)=>o&&o.length?o.some(b=>EX(g[b],d)):g[i]?EX(g[a!=="children"?a:"label"],d):EX(g[l],d),h=u?m=>Tre(m):m=>m;return e.forEach(m=>{if(m[i]){if(f(n,h(m)))c.push(m);else{const b=m[i].filter(y=>f(n,h(y)));b.length&&c.push({...m,[i]:b})}return}f(n,h(m))&&c.push(m)}),c},[e,r,o,n,t]));function Lgn(e){const{key:t,props:{children:n,value:r,...o}}=e;return{key:t,value:r!==void 0?r:t,children:n,...o}}function YKe(e,t=!1){return $p(e).map((n,r)=>{if(!p.isValidElement(n)||!n.type)return null;const{type:{isSelectOptGroup:o},key:i,props:{children:a,...l}}=n;return t||!o?Lgn(n):{key:`__RC_SELECT_GRP__${i===null?r:i}__`,label:i,...l,options:YKe(a)}}).filter(n=>n)}const $gn=(e,t,n,r,o)=>p.useMemo(()=>{let i=e;!e&&(i=YKe(t));const l=new Map,c=new Map,u=(f,h,m)=>{m&&typeof m=="string"&&f.set(h[m],h)},d=(f,h=!1)=>{for(let m=0;m{u(c,g,b)}),u(c,g,o)):d(g[n.options],!0)}};return d(i),{options:i,valueOptions:l,labelOptions:c}},[e,t,n,r,o]);function oPe(e){const t=p.useRef();return t.current=e,p.useCallback((...r)=>t.current(...r),[])}function Fgn(e,t,n){const{filterOption:r,searchValue:o,optionFilterProp:i,filterSort:a,onSearch:l,autoClearSearchValue:c}=t;return p.useMemo(()=>{const u=typeof e=="object",d={filterOption:r,searchValue:o,optionFilterProp:i,filterSort:a,onSearch:l,autoClearSearchValue:c,...u?e:{}};return[u||n==="combobox"||n==="tags"||n==="multiple"&&e===void 0?!0:e,d]},[n,e,r,o,i,a,l,c])}function $re(){return $re=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{id:n,mode:r,prefixCls:o="rc-select",backfill:i,fieldNames:a,showSearch:l,searchValue:c,onSearch:u,autoClearSearchValue:d,filterOption:f,optionFilterProp:h,filterSort:m,onSelect:g,onDeselect:b,onActive:y,popupMatchSelectWidth:v=!0,optionLabelProp:x,options:S,optionRender:C,children:_,defaultActiveFirstOption:N,menuItemSelectedIcon:E,virtual:I,direction:A,listHeight:R=200,listItemHeight:k=20,labelRender:T,value:D,defaultValue:O,labelInValue:z,onChange:F,maxCount:U,classNames:G,styles:W,...Y}=e,B={searchValue:c,onSearch:u,autoClearSearchValue:d,filterOption:f,optionFilterProp:h,filterSort:m},[$,K]=Fgn(l,B,r),{filterOption:q,searchValue:Z,optionFilterProp:J,filterSort:oe,onSearch:de,autoClearSearchValue:ae=!0}=K,ue=p.useMemo(()=>J?Array.isArray(J)?J:[J]:[],[J]),ce=eA(n),se=Dre(r),me=!!(!S&&_),fe=p.useMemo(()=>q===void 0&&r==="combobox"?!1:q,[q,r]),te=p.useMemo(()=>FKe(a,me),[JSON.stringify(a),me]),[ye,ve]=Ku("",Z),ge=ye||"",Ee=$gn(S,_,te,ue,x),{valueOptions:xe,labelOptions:Ne,options:_e}=Ee,Be=p.useCallback(Xt=>VKe(Xt).map(un=>{let Kt,On,Pr,ur;zgn(un)?Kt=un:(On=un.label,Kt=un.value);const Ht=xe.get(Kt);return Ht&&(On===void 0&&(On=Ht==null?void 0:Ht[x||te.label]),Pr=Ht==null?void 0:Ht.disabled,ur=Ht==null?void 0:Ht.title),{label:On,value:Kt,key:Kt,disabled:Pr,title:ur}}),[te,x,xe]),[Te,Ge]=Ku(O,D),Ze=p.useMemo(()=>{var un;const ln=Be(se&&Te===null?[]:Te);return r==="combobox"&&Qmn((un=ln[0])==null?void 0:un.value)?[]:ln},[Te,Be,r,se]),[ht,Oe]=Ogn(Ze,xe),ft=p.useMemo(()=>{if(!r&&ht.length===1){const Xt=ht[0];if(Xt.value===null&&(Xt.label===null||Xt.label===void 0))return[]}return ht.map(Xt=>({...Xt,label:(typeof T=="function"?T(Xt):Xt.label)??Xt.value}))},[r,ht,T]),Qe=p.useMemo(()=>new Set(ht.map(Xt=>Xt.value)),[ht]);p.useEffect(()=>{var Xt;if(r==="combobox"){const ln=(Xt=ht[0])==null?void 0:Xt.value;ve(Jmn(ln)?String(ln):"")}},[ht]);const De=oPe((Xt,ln)=>{const un=ln??Xt;return{[te.value]:Xt,[te.label]:un}}),st=p.useMemo(()=>{if(r!=="tags")return _e;const Xt=[..._e],ln=un=>xe.has(un);return[...ht].sort((un,Kt)=>un.value{const Kt=un.value;ln(Kt)||Xt.push(De(Kt,un.label))}),Xt},[De,_e,xe,ht,r]),vt=Dgn(st,te,ge,fe,ue),qe=p.useMemo(()=>{const Xt=ln=>ue.length?ue.some(un=>(ln==null?void 0:ln[un])===ge):(ln==null?void 0:ln.value)===ge;return r!=="tags"||!ge||vt.some(ln=>Xt(ln))||vt.some(ln=>ln[te.value]===ge)?vt:[De(ge),...vt]},[De,ue,r,vt,ge,te]),Ye=Xt=>[...Xt].sort((un,Kt)=>oe(un,Kt,{searchValue:ge})).map(un=>Array.isArray(un.options)?{...un,options:un.options.length>0?Ye(un.options):un.options}:un),mt=p.useMemo(()=>oe?Ye(qe):qe,[qe,oe,ge]),Et=p.useMemo(()=>qmn(mt,{fieldNames:te,childrenAsData:me}),[mt,te,me]),vn=Xt=>{const ln=Be(Xt);if(Ge(ln),F&&(ln.length!==ht.length||ln.some((un,Kt)=>{var On;return((On=ht[Kt])==null?void 0:On.value)!==(un==null?void 0:un.value)}))){const un=z?ln.map(({label:On,value:Pr})=>({label:On,value:Pr})):ln.map(On=>On.value),Kt=ln.map(On=>Tre(Oe(On.value)));F(se?un:un[0],se?Kt:Kt[0])}},[gt,Fe]=p.useState(null),[$e,nt]=p.useState(0),wt=N!==void 0?N:r!=="combobox",Dt=p.useRef(),on=p.useCallback((Xt,ln,{source:un="keyboard"}={})=>{nt(ln),i&&r==="combobox"&&Xt!==null&&un==="keyboard"&&Fe(String(Xt));const Kt=Promise.resolve().then(()=>{Dt.current===Kt&&(y==null||y(Xt))});Dt.current=Kt},[i,r,y]),jn=(Xt,ln,un)=>{const Kt=()=>{const On=Oe(Xt);return[z?{label:On==null?void 0:On[te.label],value:Xt}:Xt,Tre(On)]};if(ln&&g){const[On,Pr]=Kt();g(On,Pr)}else if(!ln&&b&&un!=="clear"){const[On,Pr]=Kt();b(On,Pr)}},kt=oPe((Xt,ln)=>{let un;const Kt=se?ln.selected:!0;Kt?un=se?[...ht,Xt]:[Xt]:un=ht.filter(On=>On.value!==Xt),vn(un),jn(Xt,Kt),r==="combobox"?Fe(""):(!Dre||ae)&&(ve(""),Fe(""))}),pn=(Xt,ln)=>{vn(Xt);const{type:un,values:Kt}=ln;(un==="remove"||un==="clear")&&Kt.forEach(On=>{jn(On.value,!1,un)})},tt=(Xt,ln)=>{if(ve(Xt),Fe(null),ln.source==="submit"){const un=(Xt||"").trim();if(un){const Kt=Array.from(new Set([...Qe,un]));vn(Kt),jn(un,!0),ve("")}return}ln.source!=="blur"&&(r==="combobox"&&vn(Xt),de==null||de(Xt))},jt=Xt=>{let ln=Xt;r!=="tags"&&(ln=Xt.map(Kt=>{const On=Ne.get(Kt);return On==null?void 0:On.value}).filter(Kt=>Kt!==void 0));const un=Array.from(new Set([...Qe,...ln]));vn(un),un.forEach(Kt=>{jn(Kt,!0)})},Nn=p.useMemo(()=>({...Ee,flattenOptions:Et,onActiveValue:on,defaultActiveFirstOption:wt,onSelect:kt,menuItemSelectedIcon:E,rawValues:Qe,fieldNames:te,virtual:I!==!1&&v!==!1,direction:A,listHeight:R,listItemHeight:k,childrenAsData:me,maxCount:U,optionRender:C,classNames:G,styles:W}),[U,Ee,Et,on,wt,kt,E,Qe,te,I,v,A,R,k,me,C,G,W]);return p.createElement(Ufe.Provider,{value:Nn},p.createElement(mgn,$re({},Y,{id:ce,prefixCls:o,ref:t,omitDomProps:Bgn,mode:r,classNames:G,styles:W,displayValues:ft,onDisplayValuesChange:pn,maxCount:U,direction:A,showSearch:$,searchValue:ge,onSearch:tt,autoClearSearchValue:ae,onSearchSplit:jt,popupMatchSelectWidth:v,OptionList:Rgn,emptyOptions:!Et.length,activeValue:gt,activeDescendantId:`${ce}_list_${$e}`})))}),qfe=Hgn;qfe.Option=Wfe;qfe.OptGroup=Gfe;const lR=(e,t,n)=>Ae({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n}),JV=(e,t)=>t||e,Vgn=()=>{const[,e]=mp(),[t]=dy("Empty"),r=new Xa(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return p.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,(t==null?void 0:t.description)||"Empty"),p.createElement("g",{fill:"none",fillRule:"evenodd"},p.createElement("g",{transform:"translate(24 31.67)"},p.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),p.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),p.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),p.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),p.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),p.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),p.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},p.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),p.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Ugn=()=>{const[,e]=mp(),[t]=dy("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:o,colorBgContainer:i}=e,{borderColor:a,shadowColor:l,contentColor:c}=p.useMemo(()=>({borderColor:new Xa(n).onBackground(i).toHexString(),shadowColor:new Xa(r).onBackground(i).toHexString(),contentColor:new Xa(o).onBackground(i).toHexString()}),[n,r,o,i]);return p.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,(t==null?void 0:t.description)||"Empty"),p.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},p.createElement("ellipse",{fill:l,cx:"32",cy:"33",rx:"32",ry:"7"}),p.createElement("g",{fillRule:"nonzero",stroke:a},p.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),p.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:c}))))},Ggn=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:o,fontSize:i,lineHeight:a}=e;return{[t]:{marginInline:r,fontSize:i,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:o,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},Wgn=vl("Empty",e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,o=hs(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return Ggn(o)}),XKe=p.createElement(Vgn,null),ZKe=p.createElement(Ugn,null),ux=e=>{const{className:t,rootClassName:n,prefixCls:r,image:o,description:i,children:a,imageStyle:l,style:c,classNames:u,styles:d,...f}=e,{getPrefixCls:h,direction:m,className:g,style:b,classNames:y,styles:v,image:x}=cu("empty"),S=h("empty",r),[C,_]=Wgn(S),[N,E]=Mu([y,u],[v,d],{props:e}),[I]=dy("Empty"),A=typeof i<"u"?i:I==null?void 0:I.description,R=typeof A=="string"?A:"empty",k=o??x??XKe;let T=null;return typeof k=="string"?T=p.createElement("img",{draggable:!1,alt:R,src:k}):T=k,p.createElement("div",{className:Ae(C,_,S,g,{[`${S}-normal`]:k===ZKe,[`${S}-rtl`]:m==="rtl"},t,n,N.root),style:{...E.root,...b,...c},...f},p.createElement("div",{className:Ae(`${S}-image`,N.image),style:{...l,...E.image}},T),A&&p.createElement("div",{className:Ae(`${S}-description`,N.description),style:E.description},A),a&&p.createElement("div",{className:Ae(`${S}-footer`,N.footer),style:E.footer},a))};ux.PRESENTED_IMAGE_DEFAULT=XKe;ux.PRESENTED_IMAGE_SIMPLE=ZKe;const JKe=e=>{const{componentName:t}=e,{getPrefixCls:n}=p.useContext(Ho),r=n("empty");switch(t){case"Table":case"List":return Pe.createElement(ux,{image:ux.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return Pe.createElement(ux,{image:ux.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return Pe.createElement(ux,null)}},Kfe=(e,t,n)=>{const{variant:r,[e]:o}=p.useContext(Ho),i=p.useContext(gKe),a=o==null?void 0:o.variant;let l;typeof t<"u"?l=t:n===!1?l="borderless":l=i??a??r??"outlined";const c=rcn.includes(l);return[l,c]},qgn=e=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:{...n,points:["tl","bl"],offset:[0,4]},bottomRight:{...n,points:["tr","br"],offset:[0,4]},topLeft:{...n,points:["bl","tl"],offset:[0,-4]},topRight:{...n,points:["br","tr"],offset:[0,-4]}}};function Kgn(e,t){return e||qgn(t)}const iPe=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:o}=e;return{position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},Ygn=e=>{const{antCls:t,componentCls:n}=e,r=`${n}-item`,o=`&${t}-slide-up-enter${t}-slide-up-enter-active`,i=`&${t}-slide-up-appear${t}-slide-up-appear-active`,a=`&${t}-slide-up-leave${t}-slide-up-leave-active`,l=`${n}-dropdown-placement-`,c=`${r}-option-selected`;return[{[`${n}-dropdown`]:{...ou(e),position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[` + ${o}${l}bottomLeft, + ${i}${l}bottomLeft + `]:{animationName:Mfe},[` + ${o}${l}topLeft, + ${i}${l}topLeft, + ${o}${l}topRight, + ${i}${l}topRight + `]:{animationName:Ofe},[`${a}${l}bottomLeft`]:{animationName:Rfe},[` + ${a}${l}topLeft, + ${a}${l}topRight + `]:{animationName:Dfe},"&-hidden":{display:"none"},[r]:{...iPe(e),cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":{flex:"auto",...Px},"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...iPe(e),color:e.colorTextDisabled}},[`${c}:has(+ ${c})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${c}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}}},LP(e,"slide-up"),LP(e,"slide-down"),JB(e,"move-up"),JB(e,"move-down")]},Xgn=e=>{const{componentCls:t}=e;return{[`&${t}-customize`]:{border:0,padding:0,fontSize:"inherit",lineHeight:"inherit",[`${t}-placeholder`]:{display:"none"},[`${t}-content`]:{margin:0,padding:0,"&-value":{display:"none"}}}}},aPe=4,Zgn=e=>{const{componentCls:t,calc:n,iconCls:r,paddingXS:o,paddingXXS:i,INTERNAL_FIXED_ITEM_MARGIN:a,lineWidth:l,colorIcon:c,colorIconHover:u,inputPaddingHorizontalBase:d}=e;return{"&-multiple":{"--select-multi-item-background":e.multipleItemBg,"--select-multi-item-border-color":"transparent","--select-multi-item-border-radius":e.borderRadiusSM,"--select-multi-item-height":e.multipleItemHeight,"--select-multi-padding-base":"calc((var(--select-height) - var(--select-multi-item-height)) / 2)","--select-multi-padding-vertical":`calc(var(--select-multi-padding-base) - ${a} - ${l})`,"--select-multi-item-padding-horizontal":`calc(${d} - var(--select-multi-padding-vertical) - ${l} * 2)`,paddingBlock:"var(--select-multi-padding-vertical)",paddingInlineStart:`calc(var(--select-multi-padding-base) - ${l})`,[`${t}-prefix`]:{marginInlineStart:"var(--select-multi-item-padding-horizontal)"},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:"absolute",lineHeight:"var(--select-line-height)",insetInlineStart:"var(--select-multi-item-padding-horizontal)",width:"calc(100% - var(--select-multi-item-padding-horizontal))",top:"50%",transform:"translateY(-50%)"},[`${t}-content`]:{flexWrap:"wrap",alignItems:"center",lineHeight:1,"&-item-prefix":{height:"var(--select-font-size)"},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${aPe}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix, + ${t}-content-item-suffix:first-child`]:{marginInlineStart:"var(--select-multi-item-padding-horizontal)"},[`${t}-selection-item`]:{lineHeight:`calc(var(--select-multi-item-height) - ${l} * 2)`,border:`${l} solid var(--select-multi-item-border-color)`,display:"flex",marginBlock:a,marginInlineEnd:n(a).mul(2).equal(),background:"var(--select-multi-item-background)",borderRadius:"var(--select-multi-item-border-radius)",paddingInlineStart:o,paddingInlineEnd:i,transition:["height","line-height","padding"].map(f=>`${f} ${e.motionDurationSlow}`).join(","),"&-content":{...Px,marginInlineEnd:i},"&-remove":{...FV(),display:"inline-flex",alignItems:"center",color:c,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${r}`]:{verticalAlign:"-0.2em"},"&:hover":{color:u}}},[`${t}-input`]:{lineHeight:n(a).mul(2).add("var(--select-multi-item-height)").equal(),width:"calc(var(--select-input-width, 0) * 1px)",minWidth:aPe,maxWidth:"100%",transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{"--select-multi-item-height":e.multipleItemHeightSM,"--select-multi-item-border-radius":e.borderRadiusXS},[`&${t}-lg`]:{"--select-multi-item-height":e.multipleItemHeightLG,"--select-multi-item-border-radius":e.borderRadius},[`&${t}-filled`]:{"--select-multi-item-border-color":e.colorSplit,"--select-multi-item-background":e.colorBgContainer,[`&${t}-disabled`]:{"--select-multi-item-border-color":"transparent"}}}}},PX=(e,t)=>{const{componentCls:n}=e,{border:r,borderHover:o,borderActive:i,borderOutline:a}=t,l=t.background||e.colorBgContainer;return{"--select-border-color":r,"--select-background":l,"--select-color":t.color||e.colorText,[`&:not(${n}-disabled)`]:{"&:hover":{"--select-border-color":o,"--select-background":t.backgroundHover||l},[`&${n}-focused`]:{"--select-border-color":i,"--select-background":t.backgroundActive||l,boxShadow:`0 0 0 ${en(e.controlOutlineWidth)} ${a}`}},[`&${n}-disabled`]:{"--select-border-color":t.borderDisabled||t.border,"--select-background":t.backgroundDisabled||t.background}}},p6=(e,t,n,r={},o={},i)=>{const{componentCls:a}=e;return{[`&${a}-${t}`]:[PX(e,n),{[`&${a}-status-error`]:PX(e,{...n,color:r.color||e.colorError,...r}),[`&${a}-status-warning`]:PX(e,{...n,color:o.color||e.colorWarning,...o})},i]}},Jgn=e=>{const{componentCls:t,calc:n,fontHeight:r,controlHeight:o,iconCls:i}=e;return{[t]:[{"--select-border-radius":e.borderRadius,"--select-border-color":"#000","--select-border-size":e.lineWidth,"--select-background":e.colorBgContainer,"--select-font-size":e.fontSize,"--select-line-height":e.lineHeight,"--select-font-height":r,"--select-color":e.colorText,"--select-height":o,"--select-padding-horizontal":n(e.paddingSM).sub(e.lineWidth).equal(),"--select-padding-vertical":"calc((var(--select-height) - var(--select-font-height)) / 2 - var(--select-border-size))",...ou(e,!0),display:"inline-flex",flexWrap:"nowrap",position:"relative",transition:`all ${e.motionDurationSlow}`,alignItems:"flex-start",outline:0,cursor:"pointer",borderRadius:"var(--select-border-radius)",borderWidth:"var(--select-border-size)",borderStyle:e.lineType,borderColor:"var(--select-border-color)",background:"var(--select-background)",fontSize:"var(--select-font-size)",lineHeight:"var(--select-line-height)",color:"var(--select-color)",paddingInline:"var(--select-padding-horizontal)",paddingBlock:"var(--select-padding-vertical)",[`${t}-prefix`]:{flex:"none",lineHeight:1},[`${t}-placeholder`]:{...Px,color:e.colorTextPlaceholder,pointerEvents:"none",zIndex:1},[`${t}-content`]:{flex:"auto",minWidth:0,position:"relative",display:"flex",marginInlineEnd:n(e.paddingXXS).mul(1.5).equal(),"&:before":{content:'"\\a0"',width:0,overflow:"hidden"},"&-value":{...Px,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1},"input[readonly]":{cursor:"inherit",caretColor:"transparent"}},[`&-open ${t}-content-value`]:{color:e.colorTextPlaceholder},[`${t}-suffix`]:{flex:"none",color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:"center",[i]:{verticalAlign:"top"}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:"not-allowed"},"&-sm":{"--select-height":e.controlHeightSM,"--select-padding-horizontal":n(e.paddingXS).sub(e.lineWidth).equal(),"--select-border-radius":e.borderRadiusSM},"&-lg":{"--select-height":e.controlHeightLG,"--select-font-size":e.fontSizeLG,"--select-line-height":e.lineHeightLG,"--select-font-height":e.fontHeightLG,"--select-border-radius":e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:"none",background:"transparent",appearance:"none",border:0,margin:0,padding:0,color:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:"absolute",insetInline:0,insetBlock:"calc(var(--select-padding-vertical) * -1)",lineHeight:"calc(var(--select-font-height) + var(--select-padding-vertical) * 2)"},[`${t}-content`]:{alignSelf:"center"}}},Zgn(e),p6(e,"outlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline}),p6(e,"filled",{border:"transparent",borderHover:"transparent",borderActive:e.activeBorderColor,borderOutline:"transparent",borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),p6(e,"borderless",{border:"transparent",borderHover:"transparent",borderActive:"transparent",borderOutline:"transparent",background:"transparent"}),p6(e,"underlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:"transparent"},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent"}),Xgn(e)]}},Qgn=e=>{const{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:o,controlHeightSM:i,controlHeightLG:a,paddingXXS:l,controlPaddingHorizontal:c,zIndexPopupBase:u,colorText:d,fontWeightStrong:f,controlItemBgActive:h,controlItemBgHover:m,colorBgContainer:g,colorFillSecondary:b,colorBgContainerDisabled:y,colorTextDisabled:v,colorPrimaryHover:x,colorPrimary:S,controlOutline:C}=e,_=l*2,N=r*2,E=Math.min(o-_,o-N),I=Math.min(i-_,i-N),A=Math.min(a-_,a-N);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(l/2),zIndexPopup:u+50,optionSelectedColor:d,optionSelectedFontWeight:f,optionSelectedBg:h,optionActiveBg:m,optionPadding:`${(o-t*n)/2}px ${c}px`,optionFontSize:t,optionLineHeight:n,optionHeight:o,selectorBg:g,clearBg:g,singleItemHeightLG:a,multipleItemBg:b,multipleItemBorderColor:"transparent",multipleItemHeight:E,multipleItemHeightSM:I,multipleItemHeightLG:A,multipleSelectorBgDisabled:y,multipleItemColorDisabled:v,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:x,activeBorderColor:S,activeOutlineColor:C,selectAffixPadding:l}},e0n=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r}=e,o={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[n]:{...ou(e),[`${n}-selection-item`]:{flex:1,fontWeight:"normal",position:"relative",userSelect:"none",...Px,[`> ${t}-typography`]:{display:"inline"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":o,"&:hover":o},[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}}}},t0n=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},e0n(e),Ygn(e),{[`${t}-rtl`]:{direction:"rtl"}},YV(e,{focusElCls:`${t}-focused`})]},n0n=vl("Select",(e,{rootPrefixCls:t})=>{const n=hs(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[t0n(n),Jgn(n)]},Qgn,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var r0n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};function Fre(){return Fre=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,Fre({},e,{ref:t,icon:r0n})),QKe=p.forwardRef(o0n);var i0n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};function Bre(){return Bre=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,Bre({},e,{ref:t,icon:i0n})),eYe=p.forwardRef(a0n);var s0n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};function zre(){return zre=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,zre({},e,{ref:t,icon:s0n})),cR=p.forwardRef(l0n);function c0n({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:o,multiple:i,hasFeedback:a,showSuffixIcon:l,feedbackIcon:c,showArrow:u,componentName:d}){const f=t??p.createElement(zV,null),h=y=>e===null&&!a&&!u?null:p.createElement(p.Fragment,null,l!==!1&&y,a&&c);let m=null;e!==void 0?m=h(e):o?m=h(p.createElement(EO,{spin:!0})):m=({open:y,showSearch:v})=>h(y&&v?p.createElement(cR,null):p.createElement(eYe,null));let g=null;n!==void 0?g=n:i?g=p.createElement(QKe,null):g=null;let b=null;return r!==void 0?b=r:b=p.createElement(CO,null),{clearIcon:f,suffixIcon:m,itemIcon:g,removeIcon:b}}function u0n(e){return Pe.useMemo(()=>{if(e)return(...t)=>Pe.createElement($P,{space:!0},e.apply(void 0,t))},[e])}function d0n(e,t){return t!==void 0?t:e!==null}const tYe="SECRET_COMBOBOX_MODE_DO_NOT_USE",f0n=(e,t)=>{var ln,un,Kt,On,Pr;const{prefixCls:n,bordered:r,className:o,rootClassName:i,getPopupContainer:a,popupClassName:l,dropdownClassName:c,listHeight:u=256,placement:d,listItemHeight:f,size:h,disabled:m,notFoundContent:g,status:b,builtinPlacements:y,dropdownMatchSelectWidth:v,popupMatchSelectWidth:x,direction:S,style:C,allowClear:_,variant:N,popupStyle:E,dropdownStyle:I,transitionName:A,tagRender:R,maxCount:k,prefix:T,dropdownRender:D,popupRender:O,onDropdownVisibleChange:z,onOpenChange:F,styles:U,classNames:G,...W}=e,{getPopupContainer:Y,getPrefixCls:B,renderEmpty:$,direction:K,virtual:q,popupMatchSelectWidth:Z,popupOverflow:J}=p.useContext(Ho),{showSearch:oe,style:de,styles:ae,className:ue,classNames:ce}=cu("select"),[,se]=mp(),me=f??(se==null?void 0:se.controlHeight),fe=B("select",n),te=B(),ye=S??K,{compactSize:ve,compactItemClassnames:ge}=Lj(fe,ye),[Ee,xe]=Kfe("select",N,r),Ne=Mf(fe),[_e,Be]=n0n(fe,Ne),Te=p.useMemo(()=>{const{mode:ur}=e;if(ur!=="combobox")return ur===tYe?"combobox":ur},[e.mode]),Ge=Te==="multiple"||Te==="tags",Ze=d0n(e.suffixIcon,e.showArrow),ht=x??v??Z,Oe=u0n(O||D),ft=F||z,{status:Qe,hasFeedback:De,isFormItemInput:st,feedbackIcon:vt}=p.useContext(dp),qe=JV(Qe,b);let Ye;g!==void 0?Ye=g:Te==="combobox"?Ye=null:Ye=($==null?void 0:$("Select"))||p.createElement(JKe,{componentName:"Select"});const{suffixIcon:mt,itemIcon:Et,removeIcon:vn,clearIcon:gt}=c0n({...W,multiple:Ge,hasFeedback:De,feedbackIcon:vt,showSuffixIcon:Ze,componentName:"Select"}),Fe=_===!0?{clearIcon:gt}:_,$e=$l(W,["suffixIcon","itemIcon"]),nt=fy(ur=>h??ve??ur),wt=p.useContext(Lg),Dt=m??wt,on={...e,variant:Ee,status:qe,disabled:Dt,size:nt},[jn,kt]=Mu([ce,G],[ae,U],{props:on},{popup:{_default:"root"}}),pn=Ae((ln=jn.popup)==null?void 0:ln.root,l,c,{[`${fe}-dropdown-${ye}`]:ye==="rtl"},i,Be,Ne,_e),tt={...(un=kt.popup)==null?void 0:un.root,...E??I},jt=Ae({[`${fe}-lg`]:nt==="large",[`${fe}-sm`]:nt==="small",[`${fe}-rtl`]:ye==="rtl",[`${fe}-${Ee}`]:xe,[`${fe}-in-form-item`]:st},lR(fe,qe,De),ge,ue,o,jn.root,i,Be,Ne,_e),Nn=p.useMemo(()=>d!==void 0?d:ye==="rtl"?"bottomRight":"bottomLeft",[d,ye]),[Xt]=_O("SelectLike",((On=(Kt=kt.popup)==null?void 0:Kt.root)==null?void 0:On.zIndex)??(tt==null?void 0:tt.zIndex));return p.createElement(qfe,{ref:t,virtual:q,classNames:jn,styles:kt,showSearch:oe,...$e,style:{...kt.root,...de,...C},popupMatchSelectWidth:ht,transitionName:DP(te,"slide-up",A),builtinPlacements:Kgn(y,J),listHeight:u,listItemHeight:me,mode:Te,prefixCls:fe,placement:Nn,direction:ye,prefix:T,suffixIcon:mt,menuItemSelectedIcon:Et,removeIcon:vn,allowClear:Fe,notFoundContent:Ye,className:jt,getPopupContainer:a||Y,popupClassName:pn,disabled:Dt,popupStyle:{...(Pr=kt.popup)==null?void 0:Pr.root,...tt,zIndex:Xt},maxCount:Ge?k:void 0,tagRender:Ge?R:void 0,popupRender:Oe,onPopupVisibleChange:ft})},yb=p.forwardRef(f0n),p0n=DKe(yb,"popupAlign");yb.SECRET_COMBOBOX_MODE_DO_NOT_USE=tYe;yb.Option=Wfe;yb.OptGroup=Gfe;yb._InternalPanelDoNotUseOrYouWillBeFired=p0n;const uR=["xxl","xl","lg","md","sm","xs"],h0n=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}),m0n=e=>{const t=e,n=[].concat(uR).reverse();return n.forEach((r,o)=>{const i=r.toUpperCase(),a=`screen${i}Min`,l=`screen${i}`;if(!(t[a]<=t[l]))throw new Error(`${a}<=${l} fails : !(${t[a]}<=${t[l]})`);if(o{const[,e]=mp(),t=h0n(m0n(e));return Pe.useMemo(()=>{const n=new Map;let r=-1,o={};return{responsiveMap:t,matchHandlers:{},dispatch(i){return o=i,n.forEach(a=>a(o)),n.size>=1},subscribe(i){return n.size||this.register(),r+=1,n.set(r,i),i(o),r},unsubscribe(i){n.delete(i),n.size||this.unregister()},register(){Object.entries(t).forEach(([i,a])=>{const l=({matches:u})=>{this.dispatch({...o,[i]:u})},c=window.matchMedia(a);typeof(c==null?void 0:c.addEventListener)=="function"&&c.addEventListener("change",l),this.matchHandlers[a]={mql:c,listener:l},l(c)})},unregister(){Object.values(t).forEach(i=>{var l;const a=this.matchHandlers[i];typeof((l=a==null?void 0:a.mql)==null?void 0:l.removeEventListener)=="function"&&a.mql.removeEventListener("change",a==null?void 0:a.listener)}),n.clear()}}},[t])};function Yfe(e=!0,t={}){const n=p.useRef(t),[,r]=Aqe(),o=g0n();return ai(()=>{const i=o.subscribe(a=>{n.current=a,e&&r()});return()=>o.unsubscribe(i)},[]),n.current}const nYe=e=>{const{children:t,prefixCls:n,id:r,classNames:o,styles:i,className:a,style:l}=e;return p.createElement("div",{id:r,className:Ae(`${n}-container`,o==null?void 0:o.container,a),style:{...i==null?void 0:i.container,...l},role:"tooltip"},typeof t=="function"?t():t)},JN={shiftX:64,adjustY:1},QN={adjustX:1,shiftY:!0},Xm=[0,0],y0n={left:{points:["cr","cl"],overflow:QN,offset:[-4,0],targetOffset:Xm},right:{points:["cl","cr"],overflow:QN,offset:[4,0],targetOffset:Xm},top:{points:["bc","tc"],overflow:JN,offset:[0,-4],targetOffset:Xm},bottom:{points:["tc","bc"],overflow:JN,offset:[0,4],targetOffset:Xm},topLeft:{points:["bl","tl"],overflow:JN,offset:[0,-4],targetOffset:Xm},leftTop:{points:["tr","tl"],overflow:QN,offset:[-4,0],targetOffset:Xm},topRight:{points:["br","tr"],overflow:JN,offset:[0,-4],targetOffset:Xm},rightTop:{points:["tl","tr"],overflow:QN,offset:[4,0],targetOffset:Xm},bottomRight:{points:["tr","br"],overflow:JN,offset:[0,4],targetOffset:Xm},rightBottom:{points:["bl","br"],overflow:QN,offset:[4,0],targetOffset:Xm},bottomLeft:{points:["tl","bl"],overflow:JN,offset:[0,4],targetOffset:Xm},leftBottom:{points:["br","bl"],overflow:QN,offset:[-4,0],targetOffset:Xm}};function Hre(){return Hre=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{trigger:n=["hover"],mouseEnterDelay:r=0,mouseLeaveDelay:o=.1,prefixCls:i="rc-tooltip",children:a,onVisibleChange:l,afterVisibleChange:c,motion:u,placement:d="right",align:f={},destroyOnHidden:h=!1,defaultVisible:m,getTooltipContainer:g,arrowContent:b,overlay:y,id:v,showArrow:x=!0,classNames:S,styles:C,..._}=e,N=eA(v),E=p.useRef(null);p.useImperativeHandle(t,()=>E.current);const I={..._};"visible"in e&&(I.popupVisible=e.visible);const A=p.useMemo(()=>{if(!x)return!1;const k=x===!0?{}:x;return{...k,className:Ae(k.className,S==null?void 0:S.arrow),style:{...k.style,...C==null?void 0:C.arrow},content:k.content??b}},[x,S==null?void 0:S.arrow,C==null?void 0:C.arrow,b]),R=({open:k})=>{const T=p.Children.only(a),D={"aria-describedby":y&&k?N:void 0};return p.cloneElement(T,D)};return p.createElement(UV,Hre({popupClassName:S==null?void 0:S.root,prefixCls:i,popup:p.createElement(nYe,{key:"content",prefixCls:i,id:N,classNames:S,styles:C},y),action:n,builtinPlacements:y0n,popupPlacement:d,ref:E,popupAlign:f,getPopupContainer:g,onOpenChange:l,afterOpenChange:c,popupMotion:u,defaultPopupVisible:m,autoDestroy:h,mouseLeaveDelay:o,popupStyle:C==null?void 0:C.root,mouseEnterDelay:r,arrow:A,uniqueContainerClassName:S==null?void 0:S.uniqueContainer,uniqueContainerStyle:C==null?void 0:C.uniqueContainer},I),R)});function rYe(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,i=0,a=o,l=r*1/Math.sqrt(2),c=o-r*(1-1/Math.sqrt(2)),u=o-n*(1/Math.sqrt(2)),d=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),f=2*o-u,h=d,m=2*o-l,g=c,b=2*o-i,y=a,v=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),x=r*(Math.sqrt(2)-1),S=`polygon(${x}px 100%, 50% ${x}px, ${2*o-x}px 100%, ${x}px 100%)`,C=`path('M ${i} ${a} A ${r} ${r} 0 0 0 ${l} ${c} L ${u} ${d} A ${n} ${n} 0 0 1 ${f} ${h} L ${m} ${g} A ${r} ${r} 0 0 0 ${b} ${y} Z')`;return{arrowShadowWidth:v,arrowPath:C,arrowPolygon:S}}const v0n=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:l,calc:c}=e;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:c(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${en(l)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},oYe=8;function Xfe(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?oYe:r}}function h6(e,t){return e?t:{}}function iYe(e,t,n){const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a}=e,{arrowDistance:l=0,arrowPlacement:c={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:{[`${r}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...v0n(e,t,o),"&:before":{background:t}}],...h6(!!c.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:l,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${en(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}}),...h6(!!c.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:l,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${en(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}}),...h6(!!c.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:l},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:i},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:i}}),...h6(!!c.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:l},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:i},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:i}})}}}function x0n(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const o=r&&typeof r=="object"?r:{},i={};switch(e){case"top":case"bottom":i.shiftX=t.arrowOffsetHorizontal*2+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=t.arrowOffsetVertical*2+n,i.shiftX=!0,i.adjustX=!0;break}const a={...i,...o};return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const sPe={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},w0n={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},S0n=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function aYe(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=e,l=t/2,c={},u=Xfe({contentRadius:i,limitVerticalRadius:!0});return Object.keys(sPe).forEach(d=>{const h={...r&&w0n[d]||sPe[d],offset:[0,0],dynamicInset:!0};switch(c[d]=h,S0n.has(d)&&(h.autoArrow=!1),d){case"top":case"topLeft":case"topRight":h.offset[1]=-l-o;break;case"bottom":case"bottomLeft":case"bottomRight":h.offset[1]=l+o;break;case"left":case"leftTop":case"leftBottom":h.offset[0]=-l-o;break;case"right":case"rightTop":case"rightBottom":h.offset[0]=l+o;break}if(r)switch(d){case"topLeft":case"bottomLeft":h.offset[0]=-u.arrowOffsetHorizontal-l;break;case"topRight":case"bottomRight":h.offset[0]=u.arrowOffsetHorizontal+l;break;case"leftTop":case"rightTop":h.offset[1]=-u.arrowOffsetHorizontal*2+l;break;case"leftBottom":case"rightBottom":h.offset[1]=u.arrowOffsetHorizontal*2-l;break}h.overflow=x0n(d,u,t,n),a&&(h.htmlRegion="visibleFirst")}),c}const C0n=(e,t)=>{const n=r=>typeof r=="boolean"?{show:r}:r||{};return Pe.useMemo(()=>{const r=n(e),o=n(t);return{...o,...r,show:r.show??o.show??!0}},[e,t])},_0n=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:l,controlHeight:c,boxShadowSecondary:u,paddingSM:d,paddingXS:f,arrowOffsetHorizontal:h,sizePopupArrow:m}=e,g=t(a).add(m).add(h).equal(),y={minWidth:t(a).mul(2).add(m).equal(),minHeight:c,padding:`${en(e.calc(d).div(2).equal())} ${en(f)}`,color:`var(--ant-tooltip-color, ${o})`,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxShadow:u,boxSizing:"border-box"},v={"--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" ")};return[{[n]:{...ou(e),position:"absolute",zIndex:l,display:"block",width:"max-content",maxWidth:r,visibility:"visible",...v,"&-hidden":{display:"none"},"--antd-arrow-background-color":i,[`${n}-container`]:[y,Qqe(e,!0)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:"none",background:"transparent",boxShadow:"none"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:g},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(a,oYe)}},[`${n}-content`]:{position:"relative"},...Dun(e,(x,{darkColor:S})=>({[`&${n}-${x}`]:{[`${n}-container`]:{backgroundColor:S},[`${n}-arrow`]:{"--antd-arrow-background-color":S}}})),"&-rtl":{direction:"rtl"}}},iYe(e,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...y,...v,position:"absolute",zIndex:t(l).sub(1).equal(),"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},j0n=e=>({zIndexPopup:e.zIndexPopupBase+70,...Xfe({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...rYe(hs(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),sYe=(e,t,n=!0)=>vl("Tooltip",o=>{const{borderRadius:i,colorTextLightSolid:a,colorBgSpotlight:l}=o,c=hs(o,{tooltipMaxWidth:250,tooltipColor:a,tooltipBorderRadius:i,tooltipBg:l});return[_0n(c),KV(o,"zoom-big-fast")]},j0n,{resetStyle:!1,injectStyle:n})(e,t),N0n=U_.map(e=>`${e}-inverse`);function E0n(e,t=!0){return t?[].concat(So(N0n),So(U_)).includes(e):U_.includes(e)}function lYe(e,t){const n=E0n(t),r=Ae({[`${e}-${t}`]:t&&n}),o={},i={},a=kpn(t).toRgb(),c=(.299*a.r+.587*a.g+.114*a.b)/255<.5?"#FFF":"#000";return t&&!n&&(o.background=t,o["--ant-tooltip-color"]=c,i["--antd-arrow-background-color"]=t),{className:r,overlayStyle:o,arrowStyle:i}}const P0n=e=>{const{prefixCls:t,className:n,placement:r="top",title:o,color:i,overlayInnerStyle:a,classNames:l,styles:c}=e,{getPrefixCls:u}=p.useContext(Ho),d=u("tooltip",t),f=Mf(d),[h,m]=sYe(d,f),g=lYe(d,i),b=g.arrowStyle,y=p.useMemo(()=>({container:{...a,...g.overlayStyle}}),[a,g.overlayStyle]),v={...e,placement:r},[x,S]=Mu([l],[y,c],{props:v}),C=Ae(f,h,m,d,`${d}-pure`,`${d}-placement-${r}`,n,g.className);return p.createElement("div",{className:C,style:b},p.createElement("div",{className:`${d}-arrow`}),p.createElement(nYe,{...e,className:h,prefixCls:d,classNames:x,styles:S},o))},I0n=p.forwardRef((e,t)=>{const{prefixCls:n,openClassName:r,getTooltipContainer:o,color:i,children:a,afterOpenChange:l,arrow:c,destroyTooltipOnHide:u,destroyOnHidden:d,title:f,overlay:h,trigger:m,builtinPlacements:g,autoAdjustOverflow:b=!0,motion:y,getPopupContainer:v,placement:x="top",mouseEnterDelay:S=.1,mouseLeaveDelay:C=.1,rootClassName:_,styles:N,classNames:E,onOpenChange:I,overlayInnerStyle:A,overlayStyle:R,overlayClassName:k,...T}=e,[,D]=mp(),{getPopupContainer:O,getPrefixCls:z,direction:F,className:U,style:G,classNames:W,styles:Y,arrow:B,trigger:$}=cu("tooltip"),K=C0n(c,B),q=K.show,Z=m||$||"hover";Rj();const J=p.useRef(null),oe=()=>{var mt;(mt=J.current)==null||mt.forceAlign()};p.useImperativeHandle(t,()=>{var mt,Et;return{forceAlign:oe,nativeElement:(mt=J.current)==null?void 0:mt.nativeElement,popupElement:(Et=J.current)==null?void 0:Et.popupElement}});const[de,ae]=Ku(e.defaultOpen??!1,e.open),ue=!f&&!h&&f!==0,ce=mt=>{ae(ue?!1:mt),!ue&&I&&I(mt)},se=p.useMemo(()=>g||aYe({arrowPointAtCenter:(K==null?void 0:K.pointAtCenter)??!1,autoAdjustOverflow:b,arrowWidth:q?D.sizePopupArrow:0,borderRadius:D.borderRadius,offset:D.marginXXS,visibleFirst:!0}),[K,g,D,q,b]),me=p.useMemo(()=>f===0?f:h||f||"",[h,f]),fe=p.createElement($P,{space:!0},typeof me=="function"?me():me),te={...e,trigger:Z,color:i,placement:x,builtinPlacements:g,openClassName:r,arrow:c,autoAdjustOverflow:b,getPopupContainer:v,children:a,destroyTooltipOnHide:u,destroyOnHidden:d},[ye,ve]=Mu([W,E],[Y,N],{props:te}),ge=z("tooltip",n),Ee=z(),xe=e["data-popover-inject"];let Ne=de;!("open"in e)&&ue&&(Ne=!1);const _e=p.isValidElement(a)&&!Mqe(a)?a:p.createElement("span",null,a),Be=_e.props,Te=!Be.className||typeof Be.className=="string"?Ae(Be.className,r||`${ge}-open`):Be.className,Ge=Mf(ge),[Ze,ht]=sYe(ge,Ge,!xe),Oe=lYe(ge,i),ft=Oe.arrowStyle,Qe=Ae(Ge,Ze,ht),De=Ae(k,{[`${ge}-rtl`]:F==="rtl"},Oe.className,_,Qe,U,ye.root),[st,vt]=_O("Tooltip",T.zIndex),qe={...ve.container,...A,...Oe.overlayStyle},Ye=p.createElement(b0n,{unique:!0,...T,trigger:Z,zIndex:st,showArrow:q,placement:x,mouseEnterDelay:S,mouseLeaveDelay:C,prefixCls:ge,classNames:{root:De,container:ye.container,arrow:ye.arrow,uniqueContainer:Ae(Qe,ye.container)},styles:{root:{...ft,...ve.root,...G,...R},container:qe,uniqueContainer:qe,arrow:ve.arrow},getTooltipContainer:v||o||O,ref:J,builtinPlacements:se,overlay:fe,visible:Ne,onVisibleChange:ce,afterVisibleChange:l,arrowContent:p.createElement("span",{className:`${ge}-arrow-content`}),motion:{motionName:DP(Ee,"zoom-big-fast",typeof(y==null?void 0:y.motionName)=="string"?y==null?void 0:y.motionName:void 0),motionDeadline:1e3},destroyOnHidden:d??!!u},Ne?Bp(_e,{className:Te}):_e);return p.createElement(HV.Provider,{value:vt},Ye)}),Kx=I0n;Kx._InternalPanelDoNotUseOrYouWillBeFired=P0n;Kx.UniqueProvider=Vqe;var A0n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function Vre(){return Vre=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,Vre({},e,{ref:t,icon:A0n})),Ure=p.forwardRef(T0n),{ESC:k0n,TAB:M0n}=Wr;function R0n({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:o}){const i=p.useRef(!1),a=()=>{var u,d;e&&((d=(u=t.current)==null?void 0:u.focus)==null||d.call(u),n==null||n(!1))},l=()=>{var u;return(u=o.current)!=null&&u.focus?(o.current.focus(),i.current=!0,!0):!1},c=u=>{switch(u.keyCode){case k0n:a();break;case M0n:{let d=!1;i.current||(d=l()),d?u.preventDefault():a();break}}};p.useEffect(()=>e?(window.addEventListener("keydown",c),r&&Ri(l,3),()=>{window.removeEventListener("keydown",c),i.current=!1}):()=>{i.current=!1},[e])}const O0n=p.forwardRef((e,t)=>{const{overlay:n,arrow:r,prefixCls:o}=e,i=p.useMemo(()=>{let l;return typeof n=="function"?l=n():l=n,l},[n]),a=hp(t,oC(i));return Pe.createElement(Pe.Fragment,null,r&&Pe.createElement("div",{className:`${o}-arrow`}),Pe.cloneElement(i,{ref:Hb(i)?a:void 0}))}),eE={adjustX:1,adjustY:1},tE=[0,0],D0n={topLeft:{points:["bl","tl"],overflow:eE,offset:[0,-4],targetOffset:tE},top:{points:["bc","tc"],overflow:eE,offset:[0,-4],targetOffset:tE},topRight:{points:["br","tr"],overflow:eE,offset:[0,-4],targetOffset:tE},bottomLeft:{points:["tl","bl"],overflow:eE,offset:[0,4],targetOffset:tE},bottom:{points:["tc","bc"],overflow:eE,offset:[0,4],targetOffset:tE},bottomRight:{points:["tr","br"],overflow:eE,offset:[0,4],targetOffset:tE}};function Gre(){return Gre=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var Y;const{arrow:n=!1,prefixCls:r="rc-dropdown",transitionName:o,animation:i,align:a,placement:l="bottomLeft",placements:c=D0n,getPopupContainer:u,showAction:d,hideAction:f,overlayClassName:h,overlayStyle:m,visible:g,trigger:b=["hover"],autoFocus:y,overlay:v,children:x,onVisibleChange:S,...C}=e,[_,N]=Pe.useState(),E="visible"in e?g:_,I=i?`${r}-${i}`:o,A=Pe.useRef(null),R=Pe.useRef(null),k=Pe.useRef(null);Pe.useImperativeHandle(t,()=>A.current);const T=B=>{N(B),S==null||S(B)};R0n({visible:E,triggerRef:k,onVisibleChange:T,autoFocus:y,overlayRef:R});const D=B=>{const{onOverlayClick:$}=e;N(!1),$&&$(B)},O=()=>Pe.createElement(O0n,{ref:R,overlay:v,prefixCls:r,arrow:n}),z=()=>typeof v=="function"?O:O(),F=()=>{const{minOverlayWidthMatchTrigger:B,alignPoint:$}=e;return"minOverlayWidthMatchTrigger"in e?B:!$},U=()=>{const{openClassName:B}=e;return B!==void 0?B:`${r}-open`},G=Pe.cloneElement(x,{className:Ae((Y=x.props)==null?void 0:Y.className,E&&U()),ref:Hb(x)?hp(k,oC(x)):void 0});let W=f;return!W&&b.indexOf("contextMenu")!==-1&&(W=["click"]),Pe.createElement(UV,Gre({builtinPlacements:c},C,{prefixCls:r,ref:A,popupClassName:Ae(h,{[`${r}-show-arrow`]:n}),popupStyle:m,action:b,showAction:d,hideAction:W,popupPlacement:l,popupAlign:a,popupMotion:{motionName:I},popupVisible:E,stretch:F()?"minWidth":"",popup:z(),onOpenChange:T,onPopupClick:D,getPopupContainer:u}),G)}),$0n=e=>typeof e!="object"&&typeof e!="function"||e===null,cYe=p.createContext(null);function uYe(e,t){return`${e}-${t}`}function dYe(e){const t=p.useContext(cYe);return uYe(t,e)}const ny=p.createContext(null);function F0n(e,t){const n={...e};return Object.keys(t).forEach(r=>{const o=t[r];o!==void 0&&(n[r]=o)}),n}function dR({children:e,locked:t,...n}){const r=p.useContext(ny),o=Mj(()=>F0n(r,n),[r,n],(i,a)=>!t&&(i[0]!==a[0]||!ey(i[1],a[1],!0)));return p.createElement(ny.Provider,{value:o},e)}const B0n=[],fYe=p.createContext(null);function QV(){return p.useContext(fYe)}const pYe=p.createContext(B0n);function rA(e){const t=p.useContext(pYe);return p.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}const hYe=p.createContext(null),Zfe=p.createContext({});function lPe(e,t=!1){if(jO(e)){const n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),i=Number(o);let a=null;return o&&!Number.isNaN(i)?a=i:r&&a===null&&(a=0),r&&e.disabled&&(a=null),a!==null&&(a>=0||t&&a<0)}return!1}function z0n(e,t=!1){const n=[...e.querySelectorAll("*")].filter(r=>lPe(r,t));return lPe(e,t)&&n.unshift(e),n}function mYe(e,t){if(!e)return;e.focus(t);const{cursor:n}=t||{};if(n&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){const r=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}const{LEFT:Wre,RIGHT:qre,UP:Kre,DOWN:N8,ENTER:E8,ESC:gYe,HOME:zT,END:HT}=Wr,cPe=[Kre,N8,Wre,qre];function H0n(e,t,n,r){var m;const o="prev",i="next",a="children",l="parent";if(e==="inline"&&r===E8)return{inlineTrigger:!0};const c={[Kre]:o,[N8]:i},u={[Wre]:n?i:o,[qre]:n?o:i,[N8]:a,[E8]:a},d={[Kre]:o,[N8]:i,[E8]:a,[gYe]:l,[Wre]:n?a:l,[qre]:n?l:a};switch((m={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d}[`${e}${t?"":"Sub"}`])==null?void 0:m[r]){case o:return{offset:-1,sibling:!0};case i:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case a:return{offset:1,sibling:!1};default:return null}}function V0n(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function U0n(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement}return null}function Jfe(e,t){return z0n(e,!0).filter(r=>t.has(r))}function uPe(e,t,n,r=1){if(!e)return null;const o=Jfe(e,t),i=o.length;let a=o.findIndex(l=>n===l);return r<0?a===-1?a=i-1:a-=1:r>0&&(a+=1),a=(a+i)%i,o[a]}const nz=(e,t)=>{const n=new Set,r=new Map,o=new Map;return e.forEach(i=>{const a=document.querySelector(`[data-menu-id='${uYe(t,i)}']`);a&&(n.add(a),o.set(a,i),r.set(i,a))}),{elements:n,key2element:r,element2key:o}};function G0n(e,t,n,r,o,i,a,l,c,u){const d=p.useRef(),f=p.useRef();f.current=t;const h=()=>{Ri.cancel(d.current)};return p.useEffect(()=>()=>{h()},[]),m=>{const{which:g}=m;if([...cPe,E8,gYe,zT,HT].includes(g)){const b=i();let y=nz(b,r);const{elements:v,key2element:x,element2key:S}=y,C=x.get(t),_=U0n(C,v),N=S.get(_),E=H0n(e,a(N,!0).length===1,n,g);if(!E&&g!==zT&&g!==HT)return;(cPe.includes(g)||[zT,HT].includes(g))&&m.preventDefault();const I=A=>{if(A){let R=A;const k=A.querySelector("a");k!=null&&k.getAttribute("href")&&(R=k);const T=S.get(A);l(T),h(),d.current=Ri(()=>{f.current===T&&R.focus()})}};if([zT,HT].includes(g)||E.sibling||!_){let A;!_||e==="inline"?A=o.current:A=V0n(_);let R;const k=Jfe(A,v);g===zT?R=k[0]:g===HT?R=k[k.length-1]:R=uPe(A,v,_,E.offset),I(R)}else if(E.inlineTrigger)c(N);else if(E.offset>0)c(N,!0),h(),d.current=Ri(()=>{y=nz(b,r);const A=_.getAttribute("aria-controls"),R=document.getElementById(A),k=uPe(R,y.elements);I(k)},5);else if(E.offset<0){const A=a(N,!0),R=A[A.length-2],k=x.get(R);c(R,!1),I(k)}}u==null||u(m)}}function W0n(e){Promise.resolve().then(e)}const Qfe="__RC_UTIL_PATH_SPLIT__",dPe=e=>e.join(Qfe),q0n=e=>e.split(Qfe),Yre="rc-menu-more";function K0n(){const[,e]=p.useState({}),t=p.useRef(new Map),n=p.useRef(new Map),[r,o]=p.useState([]),i=p.useRef(0),a=p.useRef(!1),l=()=>{a.current||e({})},c=p.useCallback((b,y)=>{const v=dPe(y);n.current.set(v,b),t.current.set(b,v),i.current+=1;const x=i.current;W0n(()=>{x===i.current&&l()})},[]),u=p.useCallback((b,y)=>{const v=dPe(y);n.current.delete(v),t.current.delete(b)},[]),d=p.useCallback(b=>{o(b)},[]),f=p.useCallback((b,y)=>{const v=t.current.get(b)||"",x=q0n(v);return y&&r.includes(x[0])&&x.unshift(Yre),x},[r]),h=p.useCallback((b,y)=>b.filter(v=>v!==void 0).some(v=>f(v,!0).includes(y)),[f]),m=()=>{const b=[...t.current.keys()];return r.length&&b.push(Yre),b},g=p.useCallback(b=>{const y=`${t.current.get(b)}${Qfe}`,v=new Set;return[...n.current.keys()].forEach(x=>{x.startsWith(y)&&v.add(n.current.get(x))}),v},[]);return p.useEffect(()=>()=>{a.current=!0},[]),{registerPath:c,unregisterPath:u,refreshOverflowKeys:d,isSubPathKey:h,getKeyPath:f,getKeys:m,getSubPathKeys:g}}function Vk(e){const t=p.useRef(e);t.current=e;const n=p.useCallback((...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[]);return e?n:void 0}function yYe(e,t,n,r){const{activeKey:o,onActive:i,onInactive:a}=p.useContext(ny),l={active:o===e};return t||(l.onMouseEnter=c=>{n==null||n({key:e,domEvent:c}),i(e)},l.onMouseLeave=c=>{r==null||r({key:e,domEvent:c}),a(e)}),l}function bYe(e){const{mode:t,rtl:n,inlineIndent:r}=p.useContext(ny);if(t!=="inline")return null;const o=e;return n?{paddingRight:o*r}:{paddingLeft:o*r}}function vYe({icon:e,props:t,children:n}){let r;return e===null||e===!1?null:(typeof e=="function"?r=p.createElement(e,{...t}):typeof e!="boolean"&&(r=e),r||n||null)}function rz({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(ic(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function fR(){return fR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{style:n,className:r,eventKey:o,warnKey:i,disabled:a,itemIcon:l,children:c,role:u,onMouseEnter:d,onMouseLeave:f,onClick:h,onKeyDown:m,onFocus:g,...b}=e,y=dYe(o),{prefixCls:v,onItemClick:x,disabled:S,overflowDisabled:C,itemIcon:_,selectedKeys:N,onActive:E}=p.useContext(ny),{_internalRenderMenuItem:I}=p.useContext(Zfe),A=`${v}-item`,R=p.useRef(),k=p.useRef(),T=S||a,D=ZI(t,k),O=rA(o),z=J=>({key:o,keyPath:[...O].reverse(),item:R.current,domEvent:J}),F=l||_,{active:U,...G}=yYe(o,T,d,f),W=N.includes(o),Y=bYe(O.length),B=J=>{if(T)return;const oe=z(J);h==null||h(rz(oe)),x(oe)},$=J=>{if(m==null||m(J),J.which===Wr.ENTER){const oe=z(J);h==null||h(rz(oe)),x(oe)}},K=J=>{E(o),g==null||g(J)},q={};e.role==="option"&&(q["aria-selected"]=W);let Z=p.createElement(Y0n,fR({ref:R,elementRef:D,role:u===null?"none":u||"menuitem",tabIndex:a?null:-1,"data-menu-id":C&&y?null:y},$l(b,["extra"]),G,q,{component:"li","aria-disabled":a,style:{...Y,...n},className:Ae(A,{[`${A}-active`]:U,[`${A}-selected`]:W,[`${A}-disabled`]:T},r),onClick:B,onKeyDown:$,onFocus:K}),c,p.createElement(vYe,{props:{...e,isSelected:W},icon:F}));return I&&(Z=I(Z,e,{selected:W})),Z});function Z0n(e,t){const{eventKey:n}=e,r=QV(),o=rA(n);return p.useEffect(()=>{if(r)return r.registerPath(n,o),()=>{r.unregisterPath(n,o)}},[o]),r?null:p.createElement(X0n,fR({},e,{ref:t}))}const eU=p.forwardRef(Z0n);function Xre(){return Xre=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:o,mode:i,rtl:a}=p.useContext(ny);return p.createElement("ul",Xre({className:Ae(o,a&&`${o}-rtl`,`${o}-sub`,`${o}-${i==="inline"?"inline":"vertical"}`,e),role:"menu"},n,{"data-menu-list":!0,ref:r}),t)},xYe=p.forwardRef(J0n);function epe(e,t){return $p(e).map((n,r)=>{var o;if(p.isValidElement(n)){const{key:i}=n;let a=((o=n.props)==null?void 0:o.eventKey)??i;a==null&&(a=`tmp_key-${[...t,r].join("-")}`);const c={key:a,eventKey:a};return p.cloneElement(n,c)}return n})}const ep={adjustX:1,adjustY:1},Q0n={topLeft:{points:["bl","tl"],overflow:ep},topRight:{points:["br","tr"],overflow:ep},bottomLeft:{points:["tl","bl"],overflow:ep},bottomRight:{points:["tr","br"],overflow:ep},leftTop:{points:["tr","tl"],overflow:ep},leftBottom:{points:["br","bl"],overflow:ep},rightTop:{points:["tl","tr"],overflow:ep},rightBottom:{points:["bl","br"],overflow:ep}},eyn={topLeft:{points:["bl","tl"],overflow:ep},topRight:{points:["br","tr"],overflow:ep},bottomLeft:{points:["tl","bl"],overflow:ep},bottomRight:{points:["tr","br"],overflow:ep},rightTop:{points:["tr","tl"],overflow:ep},rightBottom:{points:["br","bl"],overflow:ep},leftTop:{points:["tl","tr"],overflow:ep},leftBottom:{points:["bl","br"],overflow:ep}};function wYe(e,t,n){if(t)return t;if(n)return n[e]||n.other}const tyn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function nyn({prefixCls:e,visible:t,children:n,popup:r,popupStyle:o,popupClassName:i,popupOffset:a,disabled:l,mode:c,onVisibleChange:u}){const{getPopupContainer:d,rtl:f,subMenuOpenDelay:h,subMenuCloseDelay:m,builtinPlacements:g,triggerSubMenuAction:b,forceSubMenuRender:y,rootClassName:v,motion:x,defaultMotions:S}=p.useContext(ny),[C,_]=p.useState(!1),N=f?{...eyn,...g}:{...Q0n,...g},E=tyn[c],I=wYe(c,x,S),A=p.useRef(I);c!=="inline"&&(A.current=I);const R={...A.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},k=p.useRef();return p.useEffect(()=>(k.current=Ri(()=>{_(t)}),()=>{Ri.cancel(k.current)}),[t]),p.createElement(UV,{prefixCls:e,popupClassName:Ae(`${e}-popup`,{[`${e}-rtl`]:f},i,v),stretch:c==="horizontal"?"minWidth":null,getPopupContainer:d,builtinPlacements:N,popupPlacement:E,popupVisible:C,popup:r,popupStyle:o,popupAlign:a&&{offset:a},action:l?[]:[b],mouseEnterDelay:h,mouseLeaveDelay:m,onPopupVisibleChange:u,forceRender:y,popupMotion:R,fresh:!0},n)}function Zre(){return Zre=Object.assign?Object.assign.bind():function(e){for(var t=1;t{d.current&&h(!1)},[u]);const g={...wYe(o,l,c)};n.length>1&&(g.motionAppear=!1);const b=g.onVisibleChanged;return g.onVisibleChanged=y=>(!d.current&&!y&&h(!0),b==null?void 0:b(y)),f?null:p.createElement(dR,{mode:o,locked:!d.current},p.createElement(qg,Zre({visible:m},g,{forceRender:a,removeOnLeave:!1,leavedClassName:`${i}-hidden`}),({className:y,style:v})=>p.createElement(xYe,{id:e,className:y,style:v},r)))}function pR(){return pR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{style:n,className:r,styles:o,classNames:i,title:a,eventKey:l,warnKey:c,disabled:u,internalPopupClose:d,children:f,itemIcon:h,expandIcon:m,popupClassName:g,popupOffset:b,popupStyle:y,onClick:v,onMouseEnter:x,onMouseLeave:S,onTitleClick:C,onTitleMouseEnter:_,onTitleMouseLeave:N,popupRender:E,...I}=e,A=dYe(l),{prefixCls:R,mode:k,openKeys:T,disabled:D,overflowDisabled:O,activeKey:z,selectedKeys:F,itemIcon:U,expandIcon:G,onItemClick:W,onOpenChange:Y,onActive:B,popupRender:$}=p.useContext(ny),{_internalRenderSubMenuItem:K}=p.useContext(Zfe),{isSubPathKey:q}=p.useContext(hYe),Z=rA(),J=`${R}-submenu`,oe=D||u,de=p.useRef(),ae=p.useRef(),ue=h??U,ce=m??G,se=T.includes(l),me=!O&&se,fe=q(F,l),{active:te,...ye}=yYe(l,oe,_,N),[ve,ge]=p.useState(!1),Ee=Ye=>{oe||ge(Ye)},xe=Ye=>{Ee(!0),x==null||x({key:l,domEvent:Ye})},Ne=Ye=>{Ee(!1),S==null||S({key:l,domEvent:Ye})},_e=p.useMemo(()=>te||(k!=="inline"?ve||q([z],l):!1),[k,te,z,ve,l,q]),Be=bYe(Z.length),Te=Ye=>{oe||(C==null||C({key:l,domEvent:Ye}),k==="inline"&&Y(l,!se))},Ge=Vk(Ye=>{v==null||v(rz(Ye)),W(Ye)}),Ze=Ye=>{k!=="inline"&&Y(l,Ye)},ht=()=>{B(l)},Oe=A&&`${A}-popup`,ft=p.useMemo(()=>p.createElement(vYe,{icon:k!=="horizontal"?ce:void 0,props:{...e,isOpen:me,isSubMenu:!0}},p.createElement("i",{className:`${J}-arrow`})),[k,ce,e,me,J]);let Qe=p.createElement("div",pR({role:"menuitem",style:Be,className:`${J}-title`,tabIndex:oe?null:-1,ref:de,title:typeof a=="string"?a:null,"data-menu-id":O&&A?null:A,"aria-expanded":me,"aria-haspopup":!0,"aria-controls":Oe,"aria-disabled":oe,onClick:Te,onFocus:ht},ye),a,ft);const De=p.useRef(k);k!=="inline"&&Z.length>1?De.current="vertical":De.current=k;const st=De.current,vt=p.useMemo(()=>{const Ye=p.createElement(dR,{classNames:i,styles:o,mode:st==="horizontal"?"vertical":st},p.createElement(xYe,{id:Oe,ref:ae},f)),mt=E||$;return mt?mt(Ye,{item:e,keys:Z}):Ye},[E,$,Z,Oe,f,e,st]);if(!O){const Ye=De.current;Qe=p.createElement(nyn,{mode:Ye,prefixCls:J,visible:!d&&me&&k!=="inline",popupClassName:g,popupOffset:b,popupStyle:y,popup:vt,disabled:oe,onVisibleChange:Ze},Qe)}let qe=p.createElement(Ix.Item,pR({ref:t,role:"none"},I,{component:"li",style:n,className:Ae(J,`${J}-${k}`,r,{[`${J}-open`]:me,[`${J}-active`]:_e,[`${J}-selected`]:fe,[`${J}-disabled`]:oe}),onMouseEnter:xe,onMouseLeave:Ne}),Qe,!O&&p.createElement(ryn,{id:Oe,open:me,keyPath:Z},f));return K&&(qe=K(qe,e,{selected:fe,active:_e,open:me,disabled:oe})),p.createElement(dR,{classNames:i,styles:o,onItemClick:Ge,mode:k==="horizontal"?"vertical":k,itemIcon:ue,expandIcon:ce},qe)}),tU=p.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=rA(n),i=epe(r,o),a=QV();p.useEffect(()=>{if(a)return a.registerPath(n,o),()=>{a.unregisterPath(n,o)}},[o]);let l;return a?l=i:l=p.createElement(oyn,pR({ref:t},e),i),p.createElement(pYe.Provider,{value:o},l)});function tpe({className:e,style:t}){const{prefixCls:n}=p.useContext(ny);return QV()?null:p.createElement("li",{role:"separator",className:Ae(`${n}-item-divider`,e),style:t})}function oz(){return oz=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:n,title:r,eventKey:o,children:i,...a}=e,{prefixCls:l,classNames:c,styles:u}=p.useContext(ny),d=`${l}-item-group`;return p.createElement("li",oz({ref:t,role:"presentation"},a,{onClick:f=>f.stopPropagation(),className:Ae(d,n)}),p.createElement("div",{role:"presentation",className:Ae(`${d}-title`,c==null?void 0:c.listTitle),style:u==null?void 0:u.listTitle,title:typeof r=="string"?r:void 0},r),p.createElement("ul",{role:"group",className:Ae(`${d}-list`,c==null?void 0:c.list),style:u==null?void 0:u.list},i))}),npe=p.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=rA(n),i=epe(r,o);return QV()?i:p.createElement(iyn,oz({ref:t},$l(e,["warnKey"])),i)});function t5(){return t5=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(l&&typeof l=="object"){const{label:u,children:d,key:f,type:h,extra:m,...g}=l,b=f??`tmp-${c}`;return d||h==="group"?h==="group"?p.createElement(o,t5({key:b},g,{title:u}),Jre(d,t,n)):p.createElement(i,t5({key:b},g,{title:u}),Jre(d,t,n)):h==="divider"?p.createElement(a,t5({key:b},g)):p.createElement(r,t5({key:b},g,{extra:m}),u,(!!m||m===0)&&p.createElement("span",{className:`${n}-item-extra`},m))}return null}).filter(l=>l)}function fPe(e,t,n,r,o){let i=e;const a={divider:tpe,item:eU,group:npe,submenu:tU,...r};return t&&(i=Jre(t,a,o)),epe(i,n)}function Qre(){return Qre=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var Ut;const{prefixCls:n="rc-menu",rootClassName:r,style:o,className:i,styles:a,classNames:l,tabIndex:c=0,items:u,children:d,direction:f,id:h,mode:m="vertical",inlineCollapsed:g,disabled:b,disabledOverflow:y,subMenuOpenDelay:v=.1,subMenuCloseDelay:x=.1,forceSubMenuRender:S,defaultOpenKeys:C,openKeys:_,activeKey:N,defaultActiveFirst:E,selectable:I=!0,multiple:A=!1,defaultSelectedKeys:R,selectedKeys:k,onSelect:T,onDeselect:D,inlineIndent:O=24,motion:z,defaultMotions:F,triggerSubMenuAction:U="hover",builtinPlacements:G,itemIcon:W,expandIcon:Y,overflowedIndicator:B="...",overflowedIndicatorPopupClassName:$,getPopupContainer:K,onClick:q,onOpenChange:Z,onKeyDown:J,openAnimation:oe,openTransitionName:de,_internalRenderMenuItem:ae,_internalRenderSubMenuItem:ue,_internalComponents:ce,popupRender:se,...me}=e,[fe,te]=p.useMemo(()=>[fPe(d,u,OC,ce,n),fPe(d,u,OC,{},n)],[d,u,ce]),[ye,ve]=p.useState(!1),ge=p.useRef(),Ee=eA(h?`rc-menu-uuid-${h}`:"rc-menu-uuid"),xe=f==="rtl",[Ne,_e]=Ku(C,_),Be=Ne||OC,Te=(Sn,Mn=!1)=>{function lt(){_e(Sn),Z==null||Z(Sn)}Mn?au.flushSync(lt):lt()},[Ge,Ze]=p.useState(Be),ht=p.useRef(!1),[Oe,ft]=p.useMemo(()=>(m==="inline"||m==="vertical")&&g?["vertical",g]:[m,!1],[m,g]),Qe=Oe==="inline",[De,st]=p.useState(Oe),[vt,qe]=p.useState(ft);p.useEffect(()=>{st(Oe),qe(ft),ht.current&&(Qe?_e(Ge):Te(OC))},[Oe,ft]);const[Ye,mt]=p.useState(0),Et=Ye>=fe.length-1||De!=="horizontal"||y;p.useEffect(()=>{Qe&&Ze(Be)},[Be]),p.useEffect(()=>(ht.current=!0,()=>{ht.current=!1}),[]);const{registerPath:vn,unregisterPath:gt,refreshOverflowKeys:Fe,isSubPathKey:$e,getKeyPath:nt,getKeys:wt,getSubPathKeys:Dt}=K0n(),on=p.useMemo(()=>({registerPath:vn,unregisterPath:gt}),[vn,gt]),jn=p.useMemo(()=>({isSubPathKey:$e}),[$e]);p.useEffect(()=>{Fe(Et?OC:fe.slice(Ye+1).map(Sn=>Sn.key))},[Ye,Et]);const[kt,pn]=Ku(N||E&&((Ut=fe[0])==null?void 0:Ut.key),N),tt=Vk(Sn=>{pn(Sn)}),jt=Vk(()=>{pn(void 0)});p.useImperativeHandle(t,()=>({list:ge.current,focus:Sn=>{var Tn,Fn;const Mn=wt(),{elements:lt,key2element:Xe,element2key:yt}=nz(Mn,Ee),Mt=Jfe(ge.current,lt);let tn;kt&&Mn.includes(kt)?tn=kt:tn=Mt[0]?yt.get(Mt[0]):(Tn=fe.find(mr=>!mr.props.disabled))==null?void 0:Tn.key;const mn=Xe.get(tn);tn&&mn&&((Fn=mn==null?void 0:mn.focus)==null||Fn.call(mn,Sn))},findItem:({key:Sn})=>{const Mn=wt(),{key2element:lt}=nz(Mn,Ee);return lt.get(Sn)||null}}));const[Nn,Xt]=Ku(R||[],k),ln=p.useMemo(()=>Array.isArray(Nn)?Nn:Nn==null?OC:[Nn],[Nn]),un=Sn=>{if(I){const{key:Mn}=Sn,lt=ln.includes(Mn);let Xe;A?lt?Xe=ln.filter(Mt=>Mt!==Mn):Xe=[...ln,Mn]:Xe=[Mn],Xt(Xe);const yt={...Sn,selectedKeys:Xe};lt?D==null||D(yt):T==null||T(yt)}!A&&Be.length&&De!=="inline"&&Te(OC)},Kt=Vk(Sn=>{q==null||q(rz(Sn)),un(Sn)}),On=Vk((Sn,Mn)=>{let lt=Be.filter(Xe=>Xe!==Sn);if(Mn)lt.push(Sn);else if(De!=="inline"){const Xe=Dt(Sn);lt=lt.filter(yt=>!Xe.has(yt))}ey(Be,lt,!0)||Te(lt,!0)}),ur=G0n(De,kt,xe,Ee,ge,wt,nt,pn,(Sn,Mn)=>{const lt=Mn??!Be.includes(Sn);On(Sn,lt)},J);p.useEffect(()=>{ve(!0)},[]);const Ht=p.useMemo(()=>({_internalRenderMenuItem:ae,_internalRenderSubMenuItem:ue}),[ae,ue]),Tt=De!=="horizontal"||y?fe:fe.map((Sn,Mn)=>p.createElement(dR,{key:Sn.key,overflowDisabled:Mn>Ye,classNames:l,styles:a},Sn)),Zt=p.createElement(Ix,Qre({id:h,ref:ge,prefixCls:`${n}-overflow`,component:"ul",itemComponent:eU,className:Ae(n,`${n}-root`,`${n}-${De}`,i,{[`${n}-inline-collapsed`]:vt,[`${n}-rtl`]:xe},r),dir:f,style:o,role:"menu",tabIndex:c,data:Tt,renderRawItem:Sn=>Sn,renderRawRest:Sn=>{const Mn=Sn.length,lt=Mn?fe.slice(-Mn):null;return p.createElement(tU,{eventKey:Yre,title:B,disabled:Et,internalPopupClose:Mn===0,popupClassName:$},lt)},maxCount:De!=="horizontal"||y?Ix.INVALIDATE:Ix.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:Sn=>{mt(Sn)},onKeyDown:ur},me));return p.createElement(Zfe.Provider,{value:Ht},p.createElement(cYe.Provider,{value:Ee},p.createElement(dR,{prefixCls:n,rootClassName:r,classNames:l,styles:a,mode:De,openKeys:Be,rtl:xe,disabled:b,motion:ye?z:null,defaultMotions:ye?F:null,activeKey:kt,onActive:tt,onInactive:jt,selectedKeys:ln,inlineIndent:O,subMenuOpenDelay:v,subMenuCloseDelay:x,forceSubMenuRender:S,builtinPlacements:G,triggerSubMenuAction:U,getPopupContainer:K,itemIcon:W,expandIcon:Y,onItemClick:Kt,onOpenChange:On,popupRender:se},p.createElement(hYe.Provider,{value:jn},Zt),p.createElement("div",{style:{display:"none"},"aria-hidden":!0},p.createElement(fYe.Provider,{value:on},te)))))}),MO=ayn;MO.Item=eU;MO.SubMenu=tU;MO.ItemGroup=npe;MO.Divider=tpe;const SYe=p.createContext({});var syn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function eoe(){return eoe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,eoe({},e,{ref:t,icon:syn})),CYe=p.forwardRef(lyn),iz=p.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),_Ye=e=>{const{prefixCls:t,className:n,dashed:r,...o}=e,{getPrefixCls:i}=p.useContext(Ho),a=i("menu",t),l=Ae({[`${a}-item-divider-dashed`]:!!r},n);return p.createElement(tpe,{className:l,...o})},jYe=e=>{const{className:t,children:n,icon:r,title:o,danger:i,extra:a}=e,{prefixCls:l,firstLevel:c,direction:u,disableMenuItemTitleTooltip:d,inlineCollapsed:f,styles:h,classNames:m}=p.useContext(iz),g=C=>{const _=n==null?void 0:n[0],N=p.createElement("span",{className:Ae(`${l}-title-content`,c?m.itemContent:m.subMenu.itemContent,{[`${l}-title-content-with-extra`]:!!a||a===0}),style:c?h.itemContent:h.subMenu.itemContent},n);return(!r||p.isValidElement(n)&&n.type==="span")&&n&&C&&c&&typeof _=="string"?p.createElement("div",{className:`${l}-inline-collapsed-noicon`},_.charAt(0)):N},{siderCollapsed:b}=p.useContext(SYe);let y=o;typeof o>"u"?y=c?n:"":o===!1&&(y="");const v={title:y};!b&&!f&&(v.title=null,v.open=!1);const x=$p(n).length;let S=p.createElement(eU,{...$l(e,["title","icon","danger"]),className:Ae(c?m.item:m.subMenu.item,{[`${l}-item-danger`]:i,[`${l}-item-only-child`]:(r?x+1:x)===1},t),style:{...c?h.item:h.subMenu.item,...e.style},title:typeof o=="string"?o:void 0},Bp(r,C=>({className:Ae(`${l}-item-icon`,c?m.itemIcon:m.subMenu.itemIcon,C.className),style:{...c?h.itemIcon:h.subMenu.itemIcon,...C.style}})),g(f));return d||(S=p.createElement(Kx,{...v,placement:u==="rtl"?"left":"right",classNames:{root:`${l}-inline-collapsed-tooltip`}},S)),S},az=p.createContext(null),NYe=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.useContext(az),i=p.useMemo(()=>({...o,...r}),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=Oln(n),l=ZI(t,a?oC(n):null);return p.createElement(az.Provider,{value:i},p.createElement($P,{space:!0},a?p.cloneElement(n,{ref:l}):n))}),cyn=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:a,itemPaddingInline:l}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${en(i)} ${a} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},[`> ${t}-item:hover, + > ${t}-item-active, + > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},uyn=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical, + ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${en(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${en(t)})`}}}}),pPe=e=>$S(e),hPe=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:o,subMenuItemSelectedColor:i,groupTitleColor:a,itemBg:l,subMenuItemBg:c,itemSelectedBg:u,activeBarHeight:d,activeBarWidth:f,activeBarBorderWidth:h,motionDurationSlow:m,motionEaseInOut:g,motionEaseOut:b,itemPaddingInline:y,motionDurationMid:v,itemHoverColor:x,lineType:S,colorSplit:C,itemDisabledColor:_,dangerItemColor:N,dangerItemHoverColor:E,dangerItemSelectedColor:I,dangerItemActiveBg:A,dangerItemSelectedBg:R,popupBg:k,itemHoverBg:T,itemActiveBg:D,menuSubMenuBg:O,horizontalItemSelectedColor:z,horizontalItemSelectedBg:F,horizontalItemBorderRadius:U,horizontalItemHoverBg:G}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:l,[`&${n}-root:focus-visible`]:{...pPe(e)},[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:i},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:{...pPe(e)}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${_} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:x}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:T},"&:active":{backgroundColor:D}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:T},"&:active":{backgroundColor:D}}},[`${n}-item-danger`]:{color:N,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:E}},[`&${n}-item:active`]:{background:A}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:I},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:u,[`&${n}-item-danger`]:{backgroundColor:R}},[`&${n}-submenu > ${n}`]:{backgroundColor:O},[`&${n}-popup > ${n}`]:{backgroundColor:k},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:k},[`&${n}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:h,marginTop:e.calc(h).mul(-1).equal(),marginBottom:0,borderRadius:U,"&::after":{position:"absolute",insetInline:y,bottom:0,borderBottom:`${en(d)} solid transparent`,transition:`border-color ${m} ${g}`,content:'""'},"&:hover, &-active, &-open":{background:G,"&::after":{borderBottomWidth:d,borderBottomColor:z}},"&-selected":{color:z,backgroundColor:F,"&:hover":{backgroundColor:F},"&::after":{borderBottomWidth:d,borderBottomColor:z}}}},[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${en(h)} ${S} ${C}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:c},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${en(f)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${v} ${b}`,`opacity ${v} ${b}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:I}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${v} ${g}`,`opacity ${v} ${g}`].join(",")}}}}}},mPe=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:i,marginXS:a,itemMarginBlock:l,itemWidth:c,itemPaddingInline:u}=e,d=e.calc(i).add(o).add(a).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:en(n),paddingInline:u,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:l,width:c},[`> ${t}-item, + > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:en(n)},[`${t}-item-group-list ${t}-submenu-title, + ${t}-submenu-title`]:{paddingInlineEnd:d}}},dyn=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:i,controlHeightLG:a,motionEaseOut:l,paddingXL:c,itemMarginInline:u,fontSizeLG:d,motionDurationFast:f,motionDurationSlow:h,paddingXS:m,boxShadowSecondary:g,collapsedWidth:b,collapsedIconSize:y}=e,v={height:r,lineHeight:en(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:"none"},...mPe(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...mPe(e),boxShadow:g}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${en(e.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${h}`,`background ${h}`,`padding ${f} ${l}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:v,[`& ${t}-item-group-title`]:{paddingInlineStart:c}},[`${t}-item`]:v}},{[`${t}-inline-collapsed`]:{width:b,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:d,textAlign:"center"}}},[`> ${t}-item, + > ${t}-item-group > ${t}-item-group-list > ${t}-item, + > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title, + > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${en(e.calc(y).div(2).equal())} - ${en(u)})`,textOverflow:"clip",[` + ${t}-submenu-arrow, + ${t}-submenu-expand-icon + `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:y,lineHeight:en(r),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:o}},[`${t}-item-group-title`]:{...Px,paddingInline:m}}}]},gPe=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:i,iconCls:a,iconSize:l,iconMarginInlineEnd:c}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${o}`].join(","),[`${t}-item-icon, ${a}`]:{minWidth:l,fontSize:l,transition:[`font-size ${r} ${i}`,`margin ${n} ${o}`,`color ${n}`].join(","),"+ span":{marginInlineStart:c,opacity:1,transition:[`opacity ${n} ${o}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:{...FV()},[`&${t}-item-only-child`]:{[`> ${a}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},yPe=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:i,menuArrowOffset:a}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(i).mul(.6).equal(),height:e.calc(i).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${en(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${en(a)})`}}}}},fyn=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:i,motionEaseInOut:a,paddingXS:l,padding:c,colorSplit:u,lineWidth:d,zIndexPopup:f,borderRadiusLG:h,subMenuItemBorderRadius:m,menuArrowSize:g,menuArrowOffset:b,lineType:y,groupTitleLineHeight:v,groupTitleFontSize:x}=e;return[{"":{[n]:{...rR(),"&-hidden":{display:"none"}}},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:{...ou(e),...rR(),marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${en(l)} ${en(c)}`,fontSize:x,lineHeight:v,transition:`all ${o}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${o} ${a}`,`background ${o} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${o} ${a}`,`background ${o} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${o} ${a}`,`padding ${o} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:u,borderStyle:y,borderWidth:0,borderTopWidth:d,marginBlock:d,padding:0,"&-dashed":{borderStyle:"dashed"}},...gPe(e),[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${en(e.calc(r).mul(2).equal())} ${en(c)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:f,borderRadius:h,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:{borderRadius:h,...gPe(e),...yPe(e),[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:m},[`${n}-submenu-title::after`]:{transition:`transform ${o} ${a}`}}},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}},...yPe(e),[`&-inline-collapsed ${n}-submenu-arrow, + &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${en(b)})`},"&::after":{transform:`rotate(45deg) translateX(${en(e.calc(b).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${en(e.calc(g).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${en(e.calc(b).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${en(b)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},pyn=e=>{const{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:o,colorText:i,colorTextDescription:a,colorBgContainer:l,colorFillAlter:c,colorFillContent:u,lineWidth:d,lineWidthBold:f,controlItemBgActive:h,colorBgTextHover:m,controlHeightLG:g,lineHeight:b,colorBgElevated:y,marginXXS:v,padding:x,fontSize:S,controlHeightSM:C,fontSizeLG:_,colorTextLightSolid:N,colorErrorHover:E}=e,I=e.activeBarWidth??0,A=e.activeBarBorderWidth??d,R=e.itemMarginInline??e.marginXXS,k=new Xa(N).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:i,itemColor:i,colorItemTextHover:i,itemHoverColor:i,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:a,groupTitleColor:a,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:l,itemBg:l,colorItemBgHover:m,itemHoverBg:m,colorItemBgActive:u,itemActiveBg:h,colorSubItemBg:c,subMenuItemBg:c,colorItemBgSelected:h,itemSelectedBg:h,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:I,colorActiveBarHeight:f,activeBarHeight:f,colorActiveBarBorderSize:d,activeBarBorderWidth:A,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:o,dangerItemActiveBg:o,colorDangerItemBgSelected:o,dangerItemSelectedBg:o,itemMarginInline:R,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:g,groupTitleLineHeight:b,collapsedWidth:g*2,popupBg:y,itemMarginBlock:v,itemPaddingInline:x,horizontalLineHeight:`${g*1.15}px`,iconSize:S,iconMarginInlineEnd:C-S,collapsedIconSize:_,groupTitleFontSize:S,darkItemDisabledColor:new Xa(N).setA(.25).toRgbString(),darkItemColor:k,darkDangerItemColor:n,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:N,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:"transparent",darkGroupTitleColor:k,darkItemHoverColor:N,darkDangerItemHoverColor:E,darkDangerItemSelectedColor:N,darkDangerItemActiveBg:n,itemWidth:I?`calc(100% + ${A}px)`:`calc(100% - ${R*2}px)`}},hyn=(e,t=e,n=!0)=>vl("Menu",o=>{const{colorBgElevated:i,controlHeightLG:a,fontSize:l,darkItemColor:c,darkDangerItemColor:u,darkItemBg:d,darkSubMenuItemBg:f,darkItemSelectedColor:h,darkItemSelectedBg:m,darkDangerItemSelectedBg:g,darkItemHoverBg:b,darkGroupTitleColor:y,darkItemHoverColor:v,darkItemDisabledColor:x,darkDangerItemHoverColor:S,darkDangerItemSelectedColor:C,darkDangerItemActiveBg:_,popupBg:N,darkPopupBg:E}=o,I=o.calc(l).div(7).mul(5).equal(),A=hs(o,{menuArrowSize:I,menuHorizontalHeight:o.calc(a).mul(1.15).equal(),menuArrowOffset:o.calc(I).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:N}),R=hs(A,{itemColor:c,itemHoverColor:v,groupTitleColor:y,itemSelectedColor:h,subMenuItemSelectedColor:h,itemBg:d,popupBg:E,subMenuItemBg:f,itemActiveBg:"transparent",itemSelectedBg:m,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:b,itemDisabledColor:x,dangerItemColor:u,dangerItemHoverColor:S,dangerItemSelectedColor:C,dangerItemActiveBg:_,dangerItemSelectedBg:g,menuSubMenuBg:f,horizontalItemSelectedColor:h,horizontalItemSelectedBg:m});return[fyn(A),cyn(A),dyn(A),hPe(A,"light"),hPe(R,"dark"),uyn(A),kfe(A),LP(A,"slide-up"),LP(A,"slide-down"),KV(A,"zoom-big")]},pyn,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t),EYe=e=>{const{popupClassName:t,icon:n,title:r,theme:o}=e,i=p.useContext(iz),{prefixCls:a,inlineCollapsed:l,theme:c,classNames:u,styles:d}=i,f=rA();let h;if(!n)h=l&&!f.length&&r&&typeof r=="string"?p.createElement("div",{className:`${a}-inline-collapsed-noicon`},r.charAt(0)):p.createElement("span",{className:`${a}-title-content`},r);else{const b=p.isValidElement(r)&&r.type==="span";h=p.createElement(p.Fragment,null,Bp(n,y=>({className:Ae(y.className,`${a}-item-icon`,u.itemIcon),style:{...y.style,...d.itemIcon}})),b?r:p.createElement("span",{className:`${a}-title-content`},r))}const m=p.useMemo(()=>({...i,firstLevel:!1}),[i]),[g]=_O("Menu");return p.createElement(iz.Provider,{value:m},p.createElement(tU,{...$l(e,["icon"]),title:h,classNames:{list:u.subMenu.list,listTitle:u.subMenu.itemTitle},styles:{list:d.subMenu.list,listTitle:d.subMenu.itemTitle},popupClassName:Ae(a,t,u.popup.root,`${a}-${o||c}`),popupStyle:{zIndex:g,...e.popupStyle,...d.popup.root}}))};function IX(e){return e===null||e===!1}const myn={item:jYe,submenu:EYe,divider:_Ye},gyn=p.forwardRef((e,t)=>{var ae;const n=p.useContext(az),r=n||{},{prefixCls:o,className:i,style:a,theme:l="light",expandIcon:c,_internalDisableMenuItemTitleTooltip:u,inlineCollapsed:d,siderCollapsed:f,rootClassName:h,mode:m,selectable:g,onClick:b,overflowedIndicatorPopupClassName:y,classNames:v,styles:x,...S}=e,{menu:C}=p.useContext(Ho),{getPrefixCls:_,getPopupContainer:N,direction:E,className:I,style:A,classNames:R,styles:k}=cu("menu"),T=_(),D=$l(S,["collapsedWidth"]);(ae=r.validator)==null||ae.call(r,{mode:m});const O=Xo((...ue)=>{var ce;b==null||b(...ue),(ce=r.onClick)==null||ce.call(r)}),z=r.mode||m,F=g??r.selectable,U=d??f,G={...e,mode:z,inlineCollapsed:U,selectable:F,theme:l},[W,Y]=Mu([R,v],[k,x],{props:G},{popup:{_default:"root"},subMenu:{_default:"item"}}),B={horizontal:{motionName:`${T}-slide-up`},inline:ZB(T),other:{motionName:`${T}-zoom-big`}},$=_("menu",o||r.prefixCls),K=Mf($),[q,Z]=hyn($,K,!n),J=Ae(`${$}-${l}`,I,i),oe=p.useMemo(()=>{var ce;if(typeof c=="function"||IX(c))return c||null;if(typeof r.expandIcon=="function"||IX(r.expandIcon))return r.expandIcon||null;if(typeof(C==null?void 0:C.expandIcon)=="function"||IX(C==null?void 0:C.expandIcon))return(C==null?void 0:C.expandIcon)||null;const ue=c??(r==null?void 0:r.expandIcon)??(C==null?void 0:C.expandIcon);return Bp(ue,{className:Ae(`${$}-submenu-expand-icon`,p.isValidElement(ue)?(ce=ue.props)==null?void 0:ce.className:void 0)})},[c,r==null?void 0:r.expandIcon,C==null?void 0:C.expandIcon,$]),de=p.useMemo(()=>({prefixCls:$,inlineCollapsed:U||!1,direction:E,firstLevel:!0,theme:l,mode:z,disableMenuItemTitleTooltip:u,classNames:W,styles:Y}),[$,U,E,u,l,z,W,Y]);return p.createElement(az.Provider,{value:null},p.createElement(iz.Provider,{value:de},p.createElement(MO,{getPopupContainer:N,overflowedIndicator:p.createElement(CYe,null),overflowedIndicatorPopupClassName:Ae($,`${$}-${l}`,y),classNames:{list:W.list,listTitle:W.itemTitle},styles:{list:Y.list,listTitle:Y.itemTitle},mode:z,selectable:F,onClick:O,...D,inlineCollapsed:U,style:{...Y.root,...A,...a},className:J,prefixCls:$,direction:E,defaultMotions:B,expandIcon:oe,ref:t,rootClassName:Ae(h,q,r.rootClassName,Z,K,W.root),_internalComponents:myn})))}),oA=p.forwardRef((e,t)=>{const n=p.useRef(null),r=p.useContext(SYe);return p.useImperativeHandle(t,()=>({menu:n.current,focus:o=>{var i;(i=n.current)==null||i.focus(o)}})),p.createElement(gyn,{ref:n,...e,...r})});oA.Item=jYe;oA.SubMenu=EYe;oA.Divider=_Ye;oA.ItemGroup=npe;const yyn=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:o}=e,i=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:r,"&:hover":{color:o,backgroundColor:r}}}}}},byn=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:i,antCls:a,iconCls:l,motionDurationMid:c,paddingBlock:u,fontSize:d,dropdownEdgeChildPadding:f,colorTextDisabled:h,fontSizeIcon:m,controlPaddingHorizontal:g,colorBgElevated:b}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(i).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${l}-down, & > ${a}-btn-icon > ${l}-down`]:{fontSize:m}},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${l}-down`]:{fontSize:m},[`${l}-down::before`]:{transition:`transform ${c}`}},[`${t}-wrap-open`]:{[`${l}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomLeft, + &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomLeft, + &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottom, + &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottom, + &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomRight, + &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Mfe},[`&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topLeft, + &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topLeft, + &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-top, + &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-top, + &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topRight, + &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Ofe},[`&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomLeft, + &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottom, + &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Rfe},[`&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topLeft, + &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-top, + &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Dfe}}},iYe(e,b,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:{...ou(e),[n]:{padding:f,listStyleType:"none",backgroundColor:b,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...OP(e),"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${en(u)} ${en(g)}`,color:e.colorTextDescription,transition:`all ${c}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:d,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${c}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:"flex",margin:0,padding:`${en(u)} ${en(g)}`,color:e.colorText,fontWeight:"normal",fontSize:d,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${c}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...OP(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:h,cursor:"not-allowed","&:hover":{color:h,backgroundColor:b,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${en(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:m,fontStyle:"normal"}}},[`${n}-item-group-list`]:{margin:`0 ${en(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(g).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:h,backgroundColor:b,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[LP(e,"slide-up"),LP(e,"slide-down"),JB(e,"move-up"),JB(e,"move-down"),KV(e,"zoom-big")]]},vyn=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...Xfe({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...rYe(e)}),xyn=vl("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:o}=e,i=hs(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[byn(i),yyn(i)]},vyn,{resetStyle:!1}),nU=e=>{const{menu:t,arrow:n,prefixCls:r,children:o,trigger:i,disabled:a,dropdownRender:l,popupRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:f,overlayStyle:h,open:m,onOpenChange:g,mouseEnterDelay:b=.15,mouseLeaveDelay:y=.1,autoAdjustOverflow:v=!0,placement:x="",transitionName:S,classNames:C,styles:_,destroyPopupOnHide:N,destroyOnHidden:E}=e,{getPrefixCls:I,direction:A,getPopupContainer:R,className:k,style:T,classNames:D,styles:O}=cu("dropdown"),z={...e,mouseEnterDelay:b,mouseLeaveDelay:y,autoAdjustOverflow:v},[F,U]=Mu([D,C],[O,_],{props:z}),G={...T,...h,...U.root},W=c||l;Rj();const Y=p.useMemo(()=>{const Ne=I();return S!==void 0?S:x.includes("top")?`${Ne}-slide-down`:`${Ne}-slide-up`},[I,x,S]),B=p.useMemo(()=>x?x.includes("Center")?x.slice(0,x.indexOf("Center")):x:A==="rtl"?"bottomRight":"bottomLeft",[x,A]),$=I("dropdown",r),K=Mf($),[q,Z]=xyn($,K),[,J]=mp(),oe=p.Children.only($0n(o)?p.createElement("span",null,o):o),de=Bp(oe,{className:Ae(`${$}-trigger`,{[`${$}-rtl`]:A==="rtl"},oe.props.className),disabled:oe.props.disabled??a}),ae=a?[]:i,ue=!!(ae!=null&&ae.includes("contextMenu")),[ce,se]=Ku(!1,m),me=Xo(Ne=>{g==null||g(Ne,{source:"trigger"}),se(Ne)}),fe=Ae(d,f,q,Z,K,k,F.root,{[`${$}-rtl`]:A==="rtl"}),te=aYe({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:v,offset:J.marginXXS,arrowWidth:n?J.sizePopupArrow:0,borderRadius:J.borderRadius}),ye=Xo(()=>{t!=null&&t.selectable&&(t!=null&&t.multiple)||(g==null||g(!1,{source:"menu"}),se(!1))}),ve=()=>{const Ne=$l(F,["root"]),_e=$l(U,["root"]);let Be;return t!=null&&t.items&&(Be=p.createElement(oA,{...t,classNames:{...Ne,subMenu:{...Ne}},styles:{..._e,subMenu:{..._e}}})),W&&(Be=W(Be)),Be=p.Children.only(typeof Be=="string"?p.createElement("span",null,Be):Be),p.createElement(NYe,{prefixCls:`${$}-menu`,rootClassName:Ae(Z,K),expandIcon:p.createElement("span",{className:`${$}-menu-submenu-arrow`},A==="rtl"?p.createElement(Ure,{className:`${$}-menu-submenu-arrow-icon`}):p.createElement(pre,{className:`${$}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ye,validator:({mode:Te})=>{}},Be)},[ge,Ee]=_O("Dropdown",G.zIndex);let xe=p.createElement(L0n,{alignPoint:ue,...$l(e,["rootClassName","onOpenChange"]),mouseEnterDelay:b,mouseLeaveDelay:y,visible:ce,builtinPlacements:te,arrow:!!n,overlayClassName:fe,prefixCls:$,getPopupContainer:u||R,transitionName:Y,trigger:ae,overlay:ve,placement:B,onVisibleChange:me,overlayStyle:{...G,zIndex:ge},autoDestroy:E??N},de);return ge&&(xe=p.createElement(HV.Provider,{value:Ee},xe)),xe},wyn=DKe(nU,"align",void 0,"dropdown",e=>e),Syn=e=>p.createElement(wyn,{...e},p.createElement("span",null));nU._InternalPanelDoNotUseOrYouWillBeFired=Syn;const Cyn=["parentNode"],_yn="form_item";function T4(e){return e===void 0||e===!1?[]:Array.isArray(e)?e:[e]}function PYe(e,t){if(!e.length)return;const n=e.join("_");return t?`${t}_${n}`:Cyn.includes(n)?`${_yn}_${n}`:n}function IYe(e,t,n,r,o,i){let a=r;return i!==void 0?a=i:n.validating?a="validating":e.length?a="error":t.length?a="warning":(n.touched||o&&n.validated)&&(a="success"),a}function toe(e){return T4(e).join("_")}function bPe(e,t){const n=t.getFieldInstance(e),r=Wx(n);if(r)return r;const o=PYe(T4(e),t.__INTERNAL__.name);if(o)return document.getElementById(o)}function AYe(e){const[t]=Bfe(),n=p.useRef({}),r=p.useMemo(()=>e??{...t,__INTERNAL__:{itemRef:o=>i=>{const a=toe(o);i?n.current[a]=i:delete n.current[a]}},scrollToField:(o,i={})=>{const{focus:a,...l}=i,c=bPe(o,r);c&&(efn(c,{scrollMode:"if-needed",block:"nearest",...l}),a&&r.focusField(o))},focusField:o=>{var a,l;const i=r.getFieldInstance(o);typeof(i==null?void 0:i.focus)=="function"?i.focus():(l=(a=bPe(o,r))==null?void 0:a.focus)==null||l.call(a)},getFieldInstance:o=>{const i=toe(o);return n.current[i]}},[e,t]);return[r]}const TYe=p.createContext(null),jyn=TYe.Provider,kYe=p.createContext(null),Nyn=kYe.Provider;function noe(){return noe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n="rc-checkbox",className:r,style:o,checked:i,disabled:a,defaultChecked:l=!1,type:c="checkbox",title:u,onChange:d,...f}=e,h=p.useRef(null),m=p.useRef(null),[g,b]=Ku(l,i);p.useImperativeHandle(t,()=>({focus:x=>{var S;(S=h.current)==null||S.focus(x)},blur:()=>{var x;(x=h.current)==null||x.blur()},input:h.current,nativeElement:m.current}));const y=Ae(n,r,{[`${n}-checked`]:g,[`${n}-disabled`]:a}),v=x=>{a||("checked"in e||b(x.target.checked),d==null||d({target:{...e,type:c,checked:x.target.checked},stopPropagation(){x.stopPropagation()},preventDefault(){x.preventDefault()},nativeEvent:x.nativeEvent}))};return p.createElement("span",{className:y,title:u,style:o,ref:m},p.createElement("input",noe({},f,{className:`${n}-input`,ref:h,onChange:v,disabled:a,checked:!!g,type:c})),p.createElement("span",{className:`${n}-inner`}))});function RYe(e){const t=Pe.useRef(null),n=()=>{Ri.cancel(t.current),t.current=null};return[()=>{n(),t.current=Ri(()=>{t.current=null})},i=>{t.current&&(i.stopPropagation(),n()),e==null||e(i)}]}const Eyn=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:{...ou(e),display:"inline-block",fontSize:0,[`&${r}-rtl`]:{direction:"rtl"},[`&${r}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"},"&-vertical":{display:"flex",flexDirection:"column",rowGap:e.marginXS}}}},Pyn=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:o,motionDurationSlow:i,motionDurationMid:a,motionEaseInOutCirc:l,colorBgContainer:c,colorBorder:u,lineWidth:d,colorBgContainerDisabled:f,colorTextDisabled:h,paddingXS:m,dotColorDisabled:g,lineType:b,radioColor:y,radioBgColor:v,calc:x}=e,S=`${t}-inner`,_=x(o).sub(x(4).mul(2)),N=x(1).mul(o).equal({unit:!0});return{[`${t}-wrapper`]:{...ou(e),display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${en(d)} ${b} ${r}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:{...ou(e),position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"},[`${t}-wrapper:hover &, + &:hover ${S}`]:{borderColor:r},[`${t}-input:focus-visible + ${S}`]:$S(e),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:N,height:N,marginBlockStart:x(1).mul(o).div(-2).equal({unit:!0}),marginInlineStart:x(1).mul(o).div(-2).equal({unit:!0}),backgroundColor:y,borderBlockStart:0,borderInlineStart:0,borderRadius:N,transform:"scale(0)",opacity:0,transition:`all ${i} ${l}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:N,height:N,backgroundColor:c,borderColor:u,borderStyle:"solid",borderWidth:d,borderRadius:"50%",transition:`all ${a}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[S]:{borderColor:r,backgroundColor:v,"&::after":{transform:`scale(${e.calc(e.dotSize).div(o).equal()})`,opacity:1,transition:`all ${i} ${l}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[S]:{backgroundColor:f,borderColor:u,cursor:"not-allowed","&::after":{backgroundColor:g}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:h,cursor:"not-allowed"},[`&${t}-checked`]:{[S]:{"&::after":{transform:`scale(${x(_).div(o).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:m,paddingInlineEnd:m}}}},Iyn=e=>{const{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:o,lineType:i,colorBorder:a,motionDurationMid:l,buttonPaddingInline:c,fontSize:u,buttonBg:d,fontSizeLG:f,controlHeightLG:h,controlHeightSM:m,paddingXS:g,borderRadius:b,borderRadiusSM:y,borderRadiusLG:v,buttonCheckedBg:x,buttonSolidCheckedColor:S,colorTextDisabled:C,colorBgContainerDisabled:_,buttonCheckedBgDisabled:N,buttonCheckedColorDisabled:E,colorPrimary:I,colorPrimaryHover:A,colorPrimaryActive:R,buttonSolidCheckedBg:k,buttonSolidCheckedHoverBg:T,buttonSolidCheckedActiveBg:D,calc:O}=e;return{[`${r}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:u,lineHeight:en(O(n).sub(O(o).mul(2)).equal()),background:d,border:`${en(o)} ${i} ${a}`,borderBlockStartWidth:O(o).add(.02).equal(),borderInlineEndWidth:o,cursor:"pointer",transition:[`color ${l}`,`background ${l}`,`box-shadow ${l}`].join(","),a:{color:t},[`> ${r}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:last-child)":{marginInlineEnd:O(o).mul(-1).equal()},"&:first-child":{borderInlineStart:`${en(o)} ${i} ${a}`,borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b},"&:first-child:last-child":{borderRadius:b},[`${r}-group-large &`]:{height:h,fontSize:f,lineHeight:en(O(h).sub(O(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v}},[`${r}-group-small &`]:{height:m,paddingInline:O(g).sub(o).equal(),paddingBlock:0,lineHeight:en(O(m).sub(O(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},"&:hover":{position:"relative",color:I},"&:has(:focus-visible)":$S(e),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:I,background:x,borderColor:I,"&::before":{backgroundColor:I},"&:first-child":{borderColor:I},"&:hover":{color:A,borderColor:A,"&::before":{backgroundColor:A}},"&:active":{color:R,borderColor:R,"&::before":{backgroundColor:R}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:S,background:k,borderColor:k,"&:hover":{color:S,background:T,borderColor:T},"&:active":{color:S,background:D,borderColor:D}},"&-disabled":{color:C,backgroundColor:_,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:C,backgroundColor:_,borderColor:a}},[`&-disabled${r}-button-wrapper-checked`]:{color:E,backgroundColor:N,borderColor:a,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},Ayn=e=>{const{wireframe:t,padding:n,marginXS:r,lineWidth:o,fontSizeLG:i,colorText:a,colorBgContainer:l,colorTextDisabled:c,controlItemBgActiveDisabled:u,colorTextLightSolid:d,colorPrimary:f,colorPrimaryHover:h,colorPrimaryActive:m,colorWhite:g}=e,b=4,y=i,v=t?y-b*2:y-(b+o)*2;return{radioSize:y,dotSize:v,dotColorDisabled:c,buttonSolidCheckedColor:d,buttonSolidCheckedBg:f,buttonSolidCheckedHoverBg:h,buttonSolidCheckedActiveBg:m,buttonBg:l,buttonCheckedBg:l,buttonColor:a,buttonCheckedBgDisabled:u,buttonCheckedColorDisabled:c,buttonPaddingInline:n-o,wrapperMarginInlineEnd:r,radioColor:t?f:g,radioBgColor:t?l:f}},OYe=vl("Radio",e=>{const{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${en(n)} ${t}`,i=hs(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[Eyn(i),Pyn(i),Iyn(i)]},Ayn,{unitless:{radioSize:!0,dotSize:!0}}),Tyn=(e,t)=>{const n=p.useContext(TYe),r=p.useContext(kYe),{getPrefixCls:o,direction:i,className:a,style:l,classNames:c,styles:u}=cu("radio"),d=p.useRef(null),f=hp(t,d),{isFormItemInput:h}=p.useContext(dp),m=B=>{var $,K;($=e.onChange)==null||$.call(e,B),(K=n==null?void 0:n.onChange)==null||K.call(n,B)},{prefixCls:g,className:b,rootClassName:y,children:v,style:x,title:S,classNames:C,styles:_,...N}=e,E=o("radio",g),I=((n==null?void 0:n.optionType)||r)==="button",A=I?`${E}-button`:E,R=Mf(E),[k,T]=OYe(E,R),D={...N},O=p.useContext(Lg);n&&(D.name=n.name,D.onChange=m,D.checked=e.value===n.value,D.disabled=D.disabled??n.disabled),D.disabled=D.disabled??O;const z={...e,...D},[F,U]=Mu([c,C],[u,_],{props:z}),G=Ae(`${A}-wrapper`,{[`${A}-wrapper-checked`]:D.checked,[`${A}-wrapper-disabled`]:D.disabled,[`${A}-wrapper-rtl`]:i==="rtl",[`${A}-wrapper-in-form-item`]:h,[`${A}-wrapper-block`]:!!(n!=null&&n.block)},a,b,y,F.root,k,T,R),[W,Y]=RYe(D.onClick);return p.createElement(Tfe,{component:"Radio",disabled:D.disabled},p.createElement("label",{className:G,style:{...U.root,...l,...x},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:S,onClick:W},p.createElement(MYe,{...D,className:Ae(F.icon,{[GV]:!I}),style:U.icon,type:"radio",prefixCls:A,ref:f,onClick:Y}),v!==void 0?p.createElement("span",{className:Ae(`${A}-label`,F.label),style:U.label},v):null))},sz=p.forwardRef(Tyn),kyn=p.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=p.useContext(Ho),{name:o}=p.useContext(dp),i=eA(toe(o)),{prefixCls:a,className:l,rootClassName:c,options:u,buttonStyle:d="outline",disabled:f,children:h,size:m,style:g,id:b,optionType:y,name:v=i,defaultValue:x,value:S,block:C=!1,onChange:_,onMouseEnter:N,onMouseLeave:E,onFocus:I,onBlur:A,orientation:R,vertical:k}=e,[T,D]=Ku(x,S),O=p.useCallback(Z=>{const J=T,oe=Z.target.value;"value"in e||D(oe),oe!==J&&(_==null||_(Z))},[T,D,_]),z=n("radio",a),F=`${z}-group`,U=Mf(z),[G,W]=OYe(z,U);let Y=h;u&&u.length>0&&(Y=u.map(Z=>typeof Z=="string"||typeof Z=="number"?p.createElement(sz,{key:Z.toString(),prefixCls:z,disabled:f,value:Z,checked:T===Z},Z):p.createElement(sz,{key:`radio-group-value-options-${Z.value}`,prefixCls:z,disabled:Z.disabled||f,value:Z.value,checked:T===Z.value,title:Z.title,style:Z.style,className:Z.className,id:Z.id,required:Z.required},Z.label)));const B=fy(m),[,$]=Ife(R,k),K=Ae(F,`${F}-${d}`,{[`${F}-${B}`]:B,[`${F}-rtl`]:r==="rtl",[`${F}-block`]:C},l,c,G,W,U),q=p.useMemo(()=>({onChange:O,value:T,disabled:f,name:v,optionType:y,block:C}),[O,T,f,v,y,C]);return p.createElement("div",{...Mh(e,{aria:!0,data:!0}),className:Ae(K,{[`${z}-group-vertical`]:$}),style:g,onMouseEnter:N,onMouseLeave:E,onFocus:I,onBlur:A,id:b,ref:t},p.createElement(jyn,{value:q},Y))}),Myn=p.memo(kyn),Ryn=(e,t)=>{const{getPrefixCls:n}=p.useContext(Ho),{prefixCls:r,...o}=e,i=n("radio",r);return p.createElement(Nyn,{value:"button"},p.createElement(sz,{prefixCls:i,...o,type:"radio",ref:t}))},Oyn=p.forwardRef(Ryn),RO=sz;RO.Button=Oyn;RO.Group=Myn;RO.__ANT_RADIO=!0;function OO(e){return hs(e,{inputAffixPadding:e.paddingXXS})}const DO=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:i,controlHeightLG:a,fontSizeLG:l,lineHeightLG:c,paddingSM:u,controlPaddingHorizontalSM:d,controlPaddingHorizontal:f,colorFillAlter:h,colorPrimaryHover:m,colorPrimary:g,controlOutlineWidth:b,controlOutline:y,colorErrorOutline:v,colorWarningOutline:x,colorBgContainer:S,inputFontSize:C,inputFontSizeLG:_,inputFontSizeSM:N}=e,E=C||n,I=N||E,A=_||l,R=Math.round((t-E*r)/2*10)/10-o,k=Math.round((i-I*r)/2*10)/10-o,T=Math.ceil((a-A*c)/2*10)/10-o;return{paddingBlock:Math.max(R,0),paddingBlockSM:Math.max(k,0),paddingBlockLG:Math.max(T,0),paddingInline:u-o,paddingInlineSM:d-o,paddingInlineLG:f-o,addonBg:h,activeBorderColor:g,hoverBorderColor:m,activeShadow:`0 0 0 ${b}px ${y}`,errorActiveShadow:`0 0 0 ${b}px ${v}`,warningActiveShadow:`0 0 0 ${b}px ${x}`,hoverBg:S,activeBg:S,inputFontSize:E,inputFontSizeLG:A,inputFontSizeSM:I}},Dyn=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),rU=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":{...Dyn(hs(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled}))}}),rpe=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),vPe=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...rpe(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),Lyn=(e,t)=>({"&-outlined":{...rpe(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...rU(e)},...vPe(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...vPe(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),xPe=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),$yn=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${en(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...xPe(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...xPe(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...rU(e)}}}}),Fyn=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":{background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}},...t}}},DYe=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(t==null?void 0:t.inputColor)??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),wPe=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...DYe(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),Byn=(e,t)=>({"&-filled":{...DYe(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...rU(e)},...wPe(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...wPe(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),SPe=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),zyn=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...SPe(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...SPe(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${en(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${en(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${en(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${en(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${en(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${en(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),LYe=(e,t)=>({background:e.colorBgContainer,borderWidth:`${en(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),CPe=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...LYe(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),Hyn=(e,t)=>({"&-underlined":{...LYe(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"},...CPe(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...CPe(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),Vyn=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),$Ye=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return{padding:`${en(t)} ${en(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},ope=e=>({padding:`${en(e.paddingBlockSM)} ${en(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),ipe=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${en(e.paddingBlock)} ${en(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...Vyn(e.colorTextPlaceholder),"&-lg":{...$Ye(e),...t.largeStyle},"&-sm":{...ope(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),Uyn=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{...$Ye(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...ope(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${en(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${en(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${en(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${en(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${n}-cascader-picker`]:{margin:`-9px ${en(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:"block",...rR(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[` + & > ${t}-affix-wrapper, + & > ${t}-number-affix-wrapper, + & > ${n}-picker-range + `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${n}-select, + & > ${n}-select-auto-complete ${t}, + & > ${n}-cascader-picker ${t}, + & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child, + & > ${n}-select:first-child, + & > ${n}-select-auto-complete:first-child ${t}, + & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child, + & > ${n}-select:last-child, + & > ${n}-cascader-picker:last-child ${t}, + & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},Gyn=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:o}=e,a=o(n).sub(o(r).mul(2)).sub(16).div(2).equal();return{[t]:{...ou(e),...ipe(e),...Lyn(e),...Byn(e),...Fyn(e),...Hyn(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}}}},Wyn=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${en(e.inputAffixPadding)}`}}}},qyn=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:i,colorIconHover:a,iconCls:l}=e,c=`${t}-affix-wrapper`,u=`${t}-affix-wrapper-disabled`;return{[c]:{...ipe(e),display:"inline-flex","&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}},...Wyn(e),[`${l}${t}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:a}}},[`${t}-underlined`]:{borderRadius:0},[u]:{[`${l}${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},Kyn=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:{...ou(e),...Uyn(e),"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}},...$yn(e),...zyn(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},Yyn=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},FYe=vl(["Input","Shared"],e=>{const t=hs(e,OO(e));return[Gyn(t),qyn(t)]},DO,{resetFont:!1}),BYe=vl(["Input","Component"],e=>{const t=hs(e,OO(e));return[Kyn(t),Yyn(t),YV(t)]},DO,{resetFont:!1});function y1(e,t){if(e==null)return{};var n,r,o=sr(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;re?l?(h=Date.now(),i||(d=setTimeout(u?N:_,e))):_():i!==!0&&(d=setTimeout(u?N:_,u===void 0?e-C:e))}return b.cancel=g,b}function Zyn(e,t,n){var r={},o=r.atBegin,i=o===void 0?!1:o;return Xyn(e,t,{debounceMode:i!==!1})}function bh(e,t){return e[t]}function zYe(e,t){return`${e}-${t}`}function Jyn(e){return e&&e.type&&e.type.isTreeNode}function LO(e,t){return e??t}function FP(e){const{title:t,_title:n,key:r,children:o}=e||{},i=t||"title";return{title:i,_title:n||[i],key:r||"key",children:o||"children"}}function HYe(e){function t(n){return $p(n).map(o=>{if(!Jyn(o))return ic(!o,"Tree/TreeNode can only accept TreeNode as children."),null;const{key:i}=o,{children:a,...l}=o.props,c={key:i,...l},u=t(a);return u.length&&(c.children=u),c}).filter(o=>o)}return t(e)}function AX(e,t,n){const{_title:r,key:o,children:i}=FP(n),a=new Set(t===!0?[]:t),l=[];function c(u,d=null){return u.map((f,h)=>{const m=zYe(d?d.pos:"0",h),g=LO(f[o],m);let b;for(let v=0;vh[i]:typeof i=="function"&&(d=h=>i(h)):d=(h,m)=>LO(h[l],m);function f(h,m,g,b){const y=h?h[u]:e,v=h?zYe(g.pos,m):"0",x=h?[...b,h]:[];if(h){const S=d(h,v),C={node:h,index:m,pos:v,key:S,parentPos:g.node?g.pos:null,level:g.level+1,nodes:x};t(C)}y&&y.forEach((S,C)=>{f(S,C,{node:h,pos:v,level:g?g.level+1:-1},x)})}f(null)}function ape(e,{initWrapper:t,processEntity:n,onProcessFinished:r,externalGetKey:o,childrenPropName:i,fieldNames:a}={},l){const c=o||l,u={},d={};let f={posEntities:u,keyEntities:d};return t&&(f=t(f)||f),Qyn(e,h=>{const{node:m,index:g,pos:b,key:y,parentPos:v,level:x,nodes:S}=h,C={node:m,nodes:S,index:g,key:y,pos:b,level:x},_=LO(y,b);u[b]=C,d[_]=C,C.parent=u[v],C.parent&&(C.parent.children=C.parent.children||[],C.parent.children.push(C)),n&&n(C,f)},{externalGetKey:c,childrenPropName:i,fieldNames:a}),r&&r(f),f}function k4(e,{expandedKeys:t,selectedKeys:n,loadedKeys:r,loadingKeys:o,checkedKeys:i,halfCheckedKeys:a,dragOverNodeKey:l,dropPosition:c,keyEntities:u}){const d=bh(u,e);return{eventKey:e,expanded:t.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:r.indexOf(e)!==-1,loading:o.indexOf(e)!==-1,checked:i.indexOf(e)!==-1,halfChecked:a.indexOf(e)!==-1,pos:String(d?d.pos:""),dragOver:l===e&&c===0,dragOverGapTop:l===e&&c===-1,dragOverGapBottom:l===e&&c===1}}function zu(e){const{data:t,expanded:n,selected:r,checked:o,loaded:i,loading:a,halfChecked:l,dragOver:c,dragOverGapTop:u,dragOverGapBottom:d,pos:f,active:h,eventKey:m}=e,g={...t,expanded:n,selected:r,checked:o,loaded:i,loading:a,halfChecked:l,dragOver:c,dragOverGapTop:u,dragOverGapBottom:d,pos:f,active:h,key:m};return"props"in g||Object.defineProperty(g,"props",{get(){return ic(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),g}function VYe(e,t){const n=new Set;return e.forEach(r=>{t.has(r)||n.add(r)}),n}function ebn(e){const{disabled:t,disableCheckbox:n,checkable:r}=e||{};return!!(t||n)||r===!1}function tbn(e,t,n,r){const o=new Set(e),i=new Set;for(let l=0;l<=n;l+=1)(t.get(l)||new Set).forEach(u=>{const{key:d,node:f,children:h=[]}=u;o.has(d)&&!r(f)&&h.filter(m=>!r(m.node)).forEach(m=>{o.add(m.key)})});const a=new Set;for(let l=n;l>=0;l-=1)(t.get(l)||new Set).forEach(u=>{const{parent:d,node:f}=u;if(r(f)||!u.parent||a.has(u.parent.key))return;if(r(u.parent.node)){a.add(d.key);return}let h=!0,m=!1;(d.children||[]).filter(g=>!r(g.node)).forEach(({key:g})=>{const b=o.has(g);h&&!b&&(h=!1),!m&&(b||i.has(g))&&(m=!0)}),h&&o.add(d.key),m&&i.add(d.key),a.add(d.key)});return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(VYe(i,o))}}function nbn(e,t,n,r,o){const i=new Set(e);let a=new Set(t);for(let c=0;c<=r;c+=1)(n.get(c)||new Set).forEach(d=>{const{key:f,node:h,children:m=[]}=d;!i.has(f)&&!a.has(f)&&!o(h)&&m.filter(g=>!o(g.node)).forEach(g=>{i.delete(g.key)})});a=new Set;const l=new Set;for(let c=r;c>=0;c-=1)(n.get(c)||new Set).forEach(d=>{const{parent:f,node:h}=d;if(o(h)||!d.parent||l.has(d.parent.key))return;if(o(d.parent.node)){l.add(f.key);return}let m=!0,g=!1;(f.children||[]).filter(b=>!o(b.node)).forEach(({key:b})=>{const y=i.has(b);m&&!y&&(m=!1),!g&&(y||a.has(b))&&(g=!0)}),m||i.delete(f.key),g&&a.add(f.key),l.add(f.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(VYe(a,i))}}function k5(e,t,n,r){const o=[];let i;r?i=r:i=ebn;const a=new Set(e.filter(d=>{const f=!!bh(n,d);return f||o.push(d),f})),l=new Map;let c=0;Object.keys(n).forEach(d=>{const f=n[d],{level:h}=f;let m=l.get(h);m||(m=new Set,l.set(h,m)),m.add(f),c=Math.max(c,h)}),ic(!o.length,`Tree missing follow keys: ${o.slice(0,100).map(d=>`'${d}'`).join(", ")}`);let u;return t===!0?u=tbn(a,l,c,i):u=nbn(a,t.halfCheckedKeys,l,c,i),u}const rbn=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:{...ou(e),display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[n]:{...ou(e),display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}},[t]:{...ou(e),position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:$S(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${en(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${en(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[` + ${n}:not(${n}-disabled), + ${t}:not(${t}-disabled) + `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[` + ${n}-checked:not(${n}-disabled), + ${t}-checked:not(${t}-disabled) + `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function UYe(e,t){const n=hs(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return rbn(n)}const GYe=vl("Checkbox",(e,{prefixCls:t})=>[UYe(t,e)]),WYe=Pe.createContext(null),obn=(e,t)=>{const{prefixCls:n,className:r,rootClassName:o,children:i,indeterminate:a=!1,style:l,onMouseEnter:c,onMouseLeave:u,skipGroup:d=!1,disabled:f,classNames:h,styles:m,...g}=e,{getPrefixCls:b,direction:y,className:v,style:x,classNames:S,styles:C}=cu("checkbox"),_=p.useContext(WYe),{isFormItemInput:N}=p.useContext(dp),E=p.useContext(Lg),I=((_==null?void 0:_.disabled)||f)??E,A={...e,indeterminate:a,disabled:I},[R,k]=Mu([S,h],[C,m],{props:A}),T=p.useRef(g.value),D=p.useRef(null),O=hp(t,D);p.useEffect(()=>{_==null||_.registerValue(g.value)},[]),p.useEffect(()=>{if(!d)return g.value!==T.current&&(_==null||_.cancelValue(T.current),_==null||_.registerValue(g.value),T.current=g.value),()=>_==null?void 0:_.cancelValue(g.value)},[g.value]),p.useEffect(()=>{var q;(q=D.current)!=null&&q.input&&(D.current.input.indeterminate=a)},[a]);const z=b("checkbox",n),F=Mf(z),[U,G]=GYe(z,F),W={...g};_&&!d&&(W.onChange=(...q)=>{g.onChange&&g.onChange.apply(g,q),_.toggleOption&&_.toggleOption({label:i,value:g.value})},W.name=_.name,W.checked=_.value.includes(g.value));const Y=Ae(`${z}-wrapper`,{[`${z}-rtl`]:y==="rtl",[`${z}-wrapper-checked`]:W.checked,[`${z}-wrapper-disabled`]:I,[`${z}-wrapper-in-form-item`]:N},v,r,R.root,o,G,F,U),B=Ae(R.icon,{[`${z}-indeterminate`]:a},GV,U),[$,K]=RYe(W.onClick);return p.createElement(Tfe,{component:"Checkbox",disabled:I},p.createElement("label",{className:Y,style:{...k.root,...x,...l},onMouseEnter:c,onMouseLeave:u,onClick:$},p.createElement(MYe,{...W,onClick:K,prefixCls:z,className:B,style:k.icon,disabled:I,ref:O}),Fp(i)&&p.createElement("span",{className:Ae(`${z}-label`,R.label),style:k.label},i)))},qYe=p.forwardRef(obn),ibn=p.forwardRef((e,t)=>{const{defaultValue:n,children:r,options:o=[],prefixCls:i,className:a,rootClassName:l,style:c,onChange:u,...d}=e,{getPrefixCls:f,direction:h}=p.useContext(Ho),[m,g]=p.useState(d.value||n||[]),[b,y]=p.useState([]);p.useEffect(()=>{"value"in d&&g(d.value||[])},[d.value]);const v=p.useMemo(()=>o.map(O=>typeof O=="string"||typeof O=="number"?{label:O,value:O}:O),[o]),x=O=>{y(z=>z.filter(F=>F!==O))},S=O=>{y(z=>[].concat(So(z),[O]))},C=O=>{const z=m.indexOf(O.value),F=So(m);z===-1?F.push(O.value):F.splice(z,1),"value"in d||g(F),u==null||u(F.filter(U=>b.includes(U)).sort((U,G)=>{const W=v.findIndex(B=>B.value===U),Y=v.findIndex(B=>B.value===G);return W-Y}))},_=f("checkbox",i),N=`${_}-group`,E=Mf(_),[I,A]=GYe(_,E),R=$l(d,["value","disabled"]),k=o.length?v.map(O=>p.createElement(qYe,{prefixCls:_,key:O.value.toString(),disabled:"disabled"in O?O.disabled:d.disabled,value:O.value,checked:m.includes(O.value),onChange:O.onChange,className:Ae(`${N}-item`,O.className),style:O.style,title:O.title,id:O.id,required:O.required},O.label)):r,T=p.useMemo(()=>({toggleOption:C,value:m,disabled:d.disabled,name:d.name,registerValue:S,cancelValue:x}),[C,m,d.disabled,d.name,S,x]),D=Ae(N,{[`${N}-rtl`]:h==="rtl"},a,l,A,E,I);return p.createElement("div",{className:D,style:c,...R,ref:t},p.createElement(WYe.Provider,{value:T},k))}),BP=qYe;BP.Group=ibn;BP.__ANT_CHECKBOX=!0;const KYe=p.createContext({});function _Pe(e){return e==="auto"?"1 1 auto":typeof e=="number"?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const abn=["xs","sm","md","lg","xl","xxl"],n5=p.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=p.useContext(Ho),{gutter:o,wrap:i}=p.useContext(KYe),{prefixCls:a,span:l,order:c,offset:u,push:d,pull:f,className:h,children:m,flex:g,style:b,...y}=e,v=n("col",a),[x,S]=Nmn(v),C={};let _={};abn.forEach(I=>{let A={};const R=e[I];typeof R=="number"?A.span=R:typeof R=="object"&&(A=R||{}),delete y[I],_={..._,[`${v}-${I}-${A.span}`]:A.span!==void 0,[`${v}-${I}-order-${A.order}`]:A.order||A.order===0,[`${v}-${I}-offset-${A.offset}`]:A.offset||A.offset===0,[`${v}-${I}-push-${A.push}`]:A.push||A.push===0,[`${v}-${I}-pull-${A.pull}`]:A.pull||A.pull===0,[`${v}-rtl`]:r==="rtl"},A.flex&&(_[`${v}-${I}-flex`]=!0,C[`--${v}-${I}-flex`]=_Pe(A.flex))});const N=Ae(v,{[`${v}-${l}`]:l!==void 0,[`${v}-order-${c}`]:c,[`${v}-offset-${u}`]:u,[`${v}-push-${d}`]:d,[`${v}-pull-${f}`]:f},h,_,x,S),E={};if(o!=null&&o[0]){const I=typeof o[0]=="number"?`${o[0]/2}px`:`calc(${o[0]} / 2)`;E.paddingInline=I}return g&&(E.flex=_Pe(g),i===!1&&!E.minWidth&&(E.minWidth=0)),p.createElement("div",{...y,style:{...E,...b,...C},className:N,ref:t},m)});function sbn(e,t){const n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],o=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return r.forEach((i,a)=>{if(typeof i=="object"&&i!==null)for(let l=0;l{if(typeof e=="string"&&r(e),typeof e=="object")for(let i=0;i{o()},[JSON.stringify(e),t]),n}const roe=p.forwardRef((e,t)=>{const{prefixCls:n,justify:r,align:o,className:i,style:a,children:l,gutter:c=0,wrap:u,...d}=e,{getPrefixCls:f,direction:h}=p.useContext(Ho),m=Yfe(!0,null),g=jPe(o,m),b=jPe(r,m),y=f("row",n),[v,x]=jmn(y),S=sbn(c,m),C=Ae(y,{[`${y}-no-wrap`]:u===!1,[`${y}-${b}`]:b,[`${y}-${g}`]:g,[`${y}-rtl`]:h==="rtl"},i,v,x),_={};if(S!=null&&S[0]){const A=typeof S[0]=="number"?`${S[0]/-2}px`:`calc(${S[0]} / -2)`;_.marginInline=A}const[N,E]=S;_.rowGap=E;const I=p.useMemo(()=>({gutter:[N,E],wrap:u}),[N,E,u]);return p.createElement(KYe.Provider,{value:I},p.createElement("div",{...d,className:C,style:{..._,...a},ref:t},l))});var lbn={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};function ooe(){return ooe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,ooe({},e,{ref:t,icon:lbn})),ubn=p.forwardRef(cbn);var dbn={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};function ioe(){return ioe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,ioe({},e,{ref:t,icon:dbn})),pbn=p.forwardRef(fbn);var hbn={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"};function aoe(){return aoe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,aoe({},e,{ref:t,icon:hbn})),gbn=p.forwardRef(mbn);var ybn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};function soe(){return soe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,soe({},e,{ref:t,icon:ybn})),vbn=p.forwardRef(bbn);var xbn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};function loe(){return loe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,loe({},e,{ref:t,icon:xbn})),NPe=p.forwardRef(wbn);var Sbn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};function coe(){return coe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,coe({},e,{ref:t,icon:Sbn})),EPe=p.forwardRef(Cbn);var _bn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};function uoe(){return uoe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,uoe({},e,{ref:t,icon:_bn})),Nbn=p.forwardRef(jbn);var Ebn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};function doe(){return doe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,doe({},e,{ref:t,icon:Ebn})),Ibn=p.forwardRef(Pbn);var Abn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};function foe(){return foe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,foe({},e,{ref:t,icon:Abn})),kbn=p.forwardRef(Tbn);var Mbn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};function poe(){return poe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,poe({},e,{ref:t,icon:Mbn})),Obn=p.forwardRef(Rbn);var Dbn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function hoe(){return hoe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,hoe({},e,{ref:t,icon:Dbn})),YYe=p.forwardRef(Lbn);var $bn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};function moe(){return moe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,moe({},e,{ref:t,icon:$bn})),XYe=p.forwardRef(Fbn);var Bbn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};function goe(){return goe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,goe({},e,{ref:t,icon:Bbn})),Hbn=p.forwardRef(zbn);var Vbn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};function yoe(){return yoe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,yoe({},e,{ref:t,icon:Vbn})),Gbn=p.forwardRef(Ubn);var Wbn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"};function boe(){return boe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,boe({},e,{ref:t,icon:Wbn})),Kbn=p.forwardRef(qbn);var Ybn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"};function voe(){return voe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,voe({},e,{ref:t,icon:Ybn})),Zbn=p.forwardRef(Xbn);var Jbn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};function xoe(){return xoe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,xoe({},e,{ref:t,icon:Jbn})),evn=p.forwardRef(Qbn);var tvn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"};function woe(){return woe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,woe({},e,{ref:t,icon:tvn})),rvn=p.forwardRef(nvn);var ovn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};function Soe(){return Soe=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(Pa,Soe({},e,{ref:t,icon:ovn})),avn=p.forwardRef(ivn),svn=e=>{const{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:o,paddingXS:i,fontSizeLG:a,fontSizeSM:l,borderRadiusLG:c,borderRadiusSM:u,colorBgContainerDisabled:d,lineWidth:f}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:r,margin:0,borderWidth:f,borderStyle:"solid",borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:a,borderRadius:c},"&-small":{paddingInline:i,borderRadius:u,fontSize:l},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{"--space-addon-border-color":o,"--space-addon-background":d,"--space-addon-border-color-outlined":o,"--space-addon-background-filled":d,borderColor:"var(--space-addon-border-color)",background:"var(--space-addon-background)","&-variant-outlined":{"--space-addon-border-color":"var(--space-addon-border-color-outlined)"},"&-variant-filled":{"--space-addon-border-color":"transparent","--space-addon-background":"var(--space-addon-background-filled)",[`&${t}-disabled`]:{"--space-addon-border-color":o,"--space-addon-background":d}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{"--space-addon-border-color-outlined":e.colorError,"--space-addon-background-filled":e.colorErrorBg,color:e.colorError},"&-status-warning":{"--space-addon-border-color-outlined":e.colorWarning,"--space-addon-background-filled":e.colorWarningBg,color:e.colorWarning}}]}},lvn=vl(["Space","Addon"],e=>[svn(e),YV(e,{focus:!1})]),cvn=Pe.forwardRef((e,t)=>{const{className:n,children:r,style:o,prefixCls:i,variant:a="outlined",disabled:l,status:c,...u}=e,{getPrefixCls:d,direction:f}=Pe.useContext(Ho),h=d("space-addon",i),[m,g]=lvn(h),{compactItemClassnames:b,compactSize:y}=Lj(h,f),v=lR(h,c),x=Ae(h,m,b,g,`${h}-variant-${a}`,v,{[`${h}-${y}`]:y,[`${h}-disabled`]:l},n);return Pe.createElement("div",{ref:t,className:x,style:o,...u},r)});function uvn(e){return!!(e.addonBefore||e.addonAfter)}function dvn(e){return!!(e.prefix||e.suffix||e.allowClear)}function PPe(e,t,n){const r=t.cloneNode(!0),o=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...i)=>{t.setSelectionRange(...i)},o}function lz(e,t,n,r){if(!n)return;let o=t;if(t.type==="click"){o=PPe(t,e,""),n(o);return}if(e.type!=="file"&&r!==void 0){o=PPe(t,e,r),n(o);return}n(o)}function Coe(){return Coe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var W,Y,B;const{inputElement:n,children:r,prefixCls:o,prefix:i,suffix:a,addonBefore:l,addonAfter:c,className:u,style:d,disabled:f,readOnly:h,focused:m,triggerFocus:g,allowClear:b,value:y,handleReset:v,hidden:x,classes:S,classNames:C,dataAttrs:_,styles:N,components:E,onClear:I}=e,A=r??n,R=(E==null?void 0:E.affixWrapper)||"span",k=(E==null?void 0:E.groupWrapper)||"span",T=(E==null?void 0:E.wrapper)||"span",D=(E==null?void 0:E.groupAddon)||"span",O=p.useRef(null),z=$=>{var K;(K=O.current)!=null&&K.contains($.target)&&(g==null||g())},F=dvn(e);let U=p.cloneElement(A,{value:y,className:Ae((W=A.props)==null?void 0:W.className,!F&&(C==null?void 0:C.variant))||null});const G=p.useRef(null);if(Pe.useImperativeHandle(t,()=>({nativeElement:G.current||O.current})),F){let $=null;if(b){const J=!f&&!h&&y,oe=`${o}-clear-icon`,de=typeof b=="object"&&(b!=null&&b.clearIcon)?b.clearIcon:"✖";$=Pe.createElement("button",{type:"button",tabIndex:-1,onClick:ae=>{v==null||v(ae),I==null||I()},onMouseDown:ae=>ae.preventDefault(),className:Ae(oe,{[`${oe}-hidden`]:!J,[`${oe}-has-suffix`]:!!a})},de)}const K=`${o}-affix-wrapper`,q=Ae(K,{[`${o}-disabled`]:f,[`${K}-disabled`]:f,[`${K}-focused`]:m,[`${K}-readonly`]:h,[`${K}-input-with-clear-btn`]:a&&b&&y},S==null?void 0:S.affixWrapper,C==null?void 0:C.affixWrapper,C==null?void 0:C.variant),Z=(a||b)&&Pe.createElement("span",{className:Ae(`${o}-suffix`,C==null?void 0:C.suffix),style:N==null?void 0:N.suffix},$,a);U=Pe.createElement(R,Coe({className:q,style:N==null?void 0:N.affixWrapper,onClick:z},_==null?void 0:_.affixWrapper,{ref:O}),i&&Pe.createElement("span",{className:Ae(`${o}-prefix`,C==null?void 0:C.prefix),style:N==null?void 0:N.prefix},i),U,Z)}if(uvn(e)){const $=`${o}-group`,K=`${$}-addon`,q=`${$}-wrapper`,Z=Ae(`${o}-wrapper`,$,S==null?void 0:S.wrapper,C==null?void 0:C.wrapper),J=Ae(q,{[`${q}-disabled`]:f},S==null?void 0:S.group,C==null?void 0:C.groupWrapper);U=Pe.createElement(k,{className:J,ref:G},Pe.createElement(T,{className:Z},l&&Pe.createElement(D,{className:K},l),U,c&&Pe.createElement(D,{className:K},c)))}return Pe.cloneElement(U,{className:Ae((Y=U.props)==null?void 0:Y.className,u)||null,style:{...(B=U.props)==null?void 0:B.style,...d},hidden:x})});function JYe(e,t){return p.useMemo(()=>{let n={};t&&(n.show=typeof t=="object"&&t.formatter?t.formatter:!!t),n={...n,...e};const{show:r,...o}=n;return{...o,show:!!r,showFormatter:typeof r=="function"?r:void 0,strategy:o.strategy||(i=>i.length)}},[e,t])}function cz(){return cz=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{autoComplete:n,onChange:r,onFocus:o,onBlur:i,onPressEnter:a,onKeyDown:l,onKeyUp:c,prefixCls:u="rc-input",disabled:d,htmlSize:f,className:h,maxLength:m,suffix:g,showCount:b,count:y,type:v="text",classes:x,classNames:S,styles:C,onCompositionStart:_,onCompositionEnd:N,...E}=e,[I,A]=p.useState(!1),R=p.useRef(!1),k=p.useRef(!1),T=p.useRef(null),D=p.useRef(null),O=te=>{T.current&&mYe(T.current,te)},[z,F]=Ku(e.defaultValue,e.value),U=z==null?"":String(z),[G,W]=p.useState(null),Y=JYe(y,b),B=Y.max||m,$=Y.strategy(U),K=!!B&&$>B;p.useImperativeHandle(t,()=>{var te;return{focus:O,blur:()=>{var ye;(ye=T.current)==null||ye.blur()},setSelectionRange:(ye,ve,ge)=>{var Ee;(Ee=T.current)==null||Ee.setSelectionRange(ye,ve,ge)},select:()=>{var ye;(ye=T.current)==null||ye.select()},input:T.current,nativeElement:((te=D.current)==null?void 0:te.nativeElement)||T.current}}),p.useEffect(()=>{k.current&&(k.current=!1),A(te=>te&&d?!1:te)},[d]);const q=(te,ye,ve)=>{var Ee,xe;let ge=ye;if(!R.current&&Y.exceedFormatter&&Y.max&&Y.strategy(ye)>Y.max)ge=Y.exceedFormatter(ye,{max:Y.max}),ye!==ge&&W([((Ee=T.current)==null?void 0:Ee.selectionStart)||0,((xe=T.current)==null?void 0:xe.selectionEnd)||0]);else if(ve.source==="compositionEnd")return;F(ge),T.current&&lz(T.current,te,r,ge)};p.useEffect(()=>{var te;G&&((te=T.current)==null||te.setSelectionRange(...G))},[G]);const Z=te=>{q(te,te.target.value,{source:"change"})},J=te=>{R.current=!1,q(te,te.currentTarget.value,{source:"compositionEnd"}),N==null||N(te)},oe=te=>{a&&te.key==="Enter"&&!k.current&&!te.nativeEvent.isComposing&&(k.current=!0,a(te)),l==null||l(te)},de=te=>{te.key==="Enter"&&(k.current=!1),c==null||c(te)},ae=te=>{A(!0),o==null||o(te)},ue=te=>{k.current&&(k.current=!1),A(!1),i==null||i(te)},ce=te=>{F(""),O(),T.current&&lz(T.current,te,r)},se=K&&`${u}-out-of-range`,me=()=>{const te=$l(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return Pe.createElement("input",cz({autoComplete:n},te,{onChange:Z,onFocus:ae,onBlur:ue,onKeyDown:oe,onKeyUp:de,className:Ae(u,{[`${u}-disabled`]:d},S==null?void 0:S.input),style:C==null?void 0:C.input,ref:T,size:f,type:v,onCompositionStart:ye=>{R.current=!0,_==null||_(ye)},onCompositionEnd:J}))},fe=()=>{const te=Number(B)>0;if(g||Y.show){const ye=Y.showFormatter?Y.showFormatter({value:U,count:$,maxLength:B}):`${$}${te?` / ${B}`:""}`;return Pe.createElement(Pe.Fragment,null,Y.show&&Pe.createElement("span",{className:Ae(`${u}-show-count-suffix`,{[`${u}-show-count-has-suffix`]:!!g},S==null?void 0:S.count),style:{...C==null?void 0:C.count}},ye),g)}return null};return Pe.createElement(ZYe,cz({},E,{prefixCls:u,className:Ae(h,se),handleReset:ce,value:U,focused:I,triggerFocus:O,suffix:fe(),disabled:d,classes:x,classNames:S,styles:C,ref:D}),me())}),QYe=e=>{let t;return typeof e=="object"&&(e!=null&&e.clearIcon)?t=e:e&&(t={clearIcon:Pe.createElement(zV,null)}),t};function eXe(e,t){const n=p.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var o,i,a,l;(o=e.current)!=null&&o.input&&((i=e.current)==null?void 0:i.input.getAttribute("type"))==="password"&&((a=e.current)!=null&&a.input.hasAttribute("value"))&&((l=e.current)==null||l.input.removeAttribute("value"))}))};return p.useEffect(()=>(t&&r(),()=>n.current.forEach(o=>{o&&clearTimeout(o)})),[]),r}function pvn(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}const $O=p.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=!0,status:o,size:i,disabled:a,onBlur:l,onFocus:c,suffix:u,allowClear:d,addonAfter:f,addonBefore:h,className:m,style:g,styles:b,rootClassName:y,onChange:v,classNames:x,variant:S,...C}=e,{getPrefixCls:_,direction:N,allowClear:E,autoComplete:I,className:A,style:R,classNames:k,styles:T}=cu("input"),D=_("input",n),O=p.useRef(null),z=Mf(D),[F,U]=FYe(D,y);BYe(D,z);const{compactSize:G,compactItemClassnames:W}=Lj(D,N),Y=fy(Ee=>i??G??Ee),B=Pe.useContext(Lg),$=a??B,K={...e,size:Y,disabled:$},[q,Z]=Mu([k,x],[T,b],{props:K}),{status:J,hasFeedback:oe,feedbackIcon:de}=p.useContext(dp),ae=JV(J,o),ue=pvn(e)||!!oe;p.useRef(ue);const ce=eXe(O,!0),se=Ee=>{ce(),l==null||l(Ee)},me=Ee=>{ce(),c==null||c(Ee)},fe=Ee=>{ce(),v==null||v(Ee)},te=(oe||u)&&Pe.createElement(Pe.Fragment,null,u,oe&&de),ye=QYe(d??E),[ve,ge]=Kfe("input",S,r);return Pe.createElement(fvn,{ref:hp(t,O),prefixCls:D,autoComplete:I,...C,disabled:$,onBlur:se,onFocus:me,style:{...Z.root,...R,...g},styles:Z,suffix:te,allowClear:ye,className:Ae(m,y,U,z,W,A,q.root),onChange:fe,addonBefore:h&&Pe.createElement($P,{form:!0,space:!0},h),addonAfter:f&&Pe.createElement($P,{form:!0,space:!0},f),classNames:{...q,input:Ae({[`${D}-sm`]:Y==="small",[`${D}-lg`]:Y==="large",[`${D}-rtl`]:N==="rtl"},q.input,F),variant:Ae({[`${D}-${ve}`]:ge},lR(D,ae)),affixWrapper:Ae({[`${D}-affix-wrapper-sm`]:Y==="small",[`${D}-affix-wrapper-lg`]:Y==="large",[`${D}-affix-wrapper-rtl`]:N==="rtl"},F),wrapper:Ae({[`${D}-group-rtl`]:N==="rtl"},F),groupWrapper:Ae({[`${D}-group-wrapper-sm`]:Y==="small",[`${D}-group-wrapper-lg`]:Y==="large",[`${D}-group-wrapper-rtl`]:N==="rtl",[`${D}-group-wrapper-${ve}`]:ge},lR(`${D}-group-wrapper`,ae,oe),F)}})});function IPe(e){return["small","middle","large"].includes(e)}function APe(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const tXe=Pe.createContext({latestIndex:0}),hvn=tXe.Provider,mvn=e=>{const{className:t,prefix:n,index:r,children:o,separator:i,style:a,classNames:l,styles:c}=e,{latestIndex:u}=p.useContext(tXe);return Fp(o)?p.createElement(p.Fragment,null,p.createElement("div",{className:t,style:a},o),r{const{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},yvn=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},bvn=vl("Space",e=>{const t=hs(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[gvn(t),yvn(t)]},()=>({}),{resetStyle:!1}),vvn=p.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,size:o,className:i,style:a,classNames:l,styles:c}=cu("space"),{size:u=o??"small",align:d,className:f,rootClassName:h,children:m,direction:g,orientation:b,prefixCls:y,split:v,separator:x,style:S,vertical:C,wrap:_=!1,classNames:N,styles:E,...I}=e,[A,R]=Array.isArray(u)?u:[u,u],k=IPe(R),T=IPe(A),D=APe(R),O=APe(A),z=$p(m,{keepEmpty:!0}),[F,U]=Ife(b,C,g),G=d===void 0&&!U?"center":d,W=x??v,Y=n("space",y),[B,$]=bvn(Y),K={...e,size:u,orientation:F,align:G},[q,Z]=Mu([l,N],[c,E],{props:K}),J=Ae(Y,i,B,`${Y}-${F}`,{[`${Y}-rtl`]:r==="rtl",[`${Y}-align-${G}`]:G,[`${Y}-gap-row-${R}`]:k,[`${Y}-gap-col-${A}`]:T},f,h,$,q.root),oe=Ae(`${Y}-item`,q.item),de=z.map((ce,se)=>{const me=(ce==null?void 0:ce.key)||`${oe}-${se}`;return p.createElement(mvn,{prefix:Y,classNames:q,styles:Z,className:oe,key:me,index:se,separator:W,style:Z.item},ce)}),ae=p.useMemo(()=>({latestIndex:z.reduce((se,me,fe)=>Fp(me)?fe:se,0)}),[z]);if(z.length===0)return null;const ue={};return _&&(ue.flexWrap="wrap"),!T&&O&&(ue.columnGap=A),!k&&D&&(ue.rowGap=R),p.createElement("div",{ref:t,className:J,style:{...ue,...Z.root,...a,...S},...I},p.createElement(hvn,{value:ae},de))}),iA=vvn;iA.Compact=Yqe;iA.Addon=cvn;const nXe=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=p.useContext(Ho),{prefixCls:o,type:i="default",danger:a,disabled:l,loading:c,onClick:u,htmlType:d,children:f,className:h,menu:m,arrow:g,autoFocus:b,trigger:y,align:v,open:x,onOpenChange:S,placement:C,getPopupContainer:_,href:N,icon:E=p.createElement(CYe,null),title:I,buttonsRender:A=ue=>ue,mouseEnterDelay:R,mouseLeaveDelay:k,overlayClassName:T,overlayStyle:D,destroyOnHidden:O,destroyPopupOnHide:z,dropdownRender:F,popupRender:U,...G}=e,W=n("dropdown",o),Y=`${W}-button`,$={menu:m,arrow:g,autoFocus:b,align:v,disabled:l,trigger:l?[]:y,onOpenChange:S,getPopupContainer:_||t,mouseEnterDelay:R,mouseLeaveDelay:k,classNames:{root:T},styles:{root:D},destroyOnHidden:O,popupRender:U||F},{compactSize:K,compactItemClassnames:q}=Lj(W,r),Z=Ae(Y,q,h);"destroyPopupOnHide"in e&&($.destroyPopupOnHide=z),"open"in e&&($.open=x),"placement"in e?$.placement=C:$.placement=r==="rtl"?"bottomLeft":"bottomRight";const J=p.createElement(wd,{type:i,danger:a,disabled:l,loading:c,onClick:u,htmlType:d,href:N,title:I},f),oe=p.createElement(wd,{type:i,danger:a,icon:E}),[de,ae]=A([J,oe]);return p.createElement(iA.Compact,{className:Z,size:K,block:!0,...G},de,p.createElement(nU,{...$},ae))};nXe.__ANT_BUTTON=!0;const spe=nU;spe.Button=nXe;const xvn=e=>Fp(e)?typeof e=="object"&&!p.isValidElement(e)?e:{title:e}:null;function uz(e){const[t,n]=p.useState(e);return p.useEffect(()=>{const r=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(r)}},[e]),t}const wvn=e=>{const{componentCls:t}=e,n=`${t}-show-help`,r=`${t}-show-help-item`;return{[n]:{transition:`opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:"hidden",transition:`height ${e.motionDurationFast} ${e.motionEaseInOut}, + opacity ${e.motionDurationFast} ${e.motionEaseInOut}, + transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${r}-leave-active`]:{transform:"translateY(-5px)"}}}}},Svn=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${en(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${en(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),TPe=(e,t)=>{const{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},Cvn=e=>{const{componentCls:t}=e;return{[e.componentCls]:{...ou(e),...Svn(e),[`${t}-text`]:{display:"inline-block",paddingInlineEnd:e.paddingSM},"&-small":{...TPe(e,e.controlHeightSM)},"&-large":{...TPe(e,e.controlHeightLG)}}}},_vn=e=>{const{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:o,labelRequiredMarkColor:i,labelColor:a,labelFontSize:l,labelHeight:c,labelColonMarginInlineStart:u,labelColonMarginInlineEnd:d,itemMarginBottom:f}=e;return{[t]:{...ou(e),marginBottom:f,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden, + &-hidden${o}-row`]:{display:"none"},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:e.lineHeight,whiteSpace:"unset","> label":{verticalAlign:"middle",textWrap:"balance"}},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:c,color:a,fontSize:l,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:"top"},[`&${t}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:e.marginXXS,color:i,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${t}-required-mark-hidden, &${t}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${t}-optional`]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`&${t}-required-mark-hidden`]:{display:"none"}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:u,marginInlineEnd:d},[`&${t}-no-colon::after`]:{content:'"\\a0"'}}},[`${t}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%",[`&:has(> ${o}-switch:only-child, > ${o}-rate:only-child)`]:{display:"flex",alignItems:"center"}}}},[t]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:"auto",opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:Lfe,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}}}},g2=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),jvn=e=>{const{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:"unset"}},[`${t}-col-24${n}-label, + ${t}-col-xl-24${n}-label`]:g2(e)}}},Nvn=e=>{const{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:"flex",flexWrap:"wrap",[`${n}-inline`]:{flex:"none",marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:"nowrap"},[`> ${n}-label, + > ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${t}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},Evn=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:g2(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:"wrap",[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Pvn=e=>{const{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:"column"},[`${n}-label > label`]:{height:"auto"},[`${n}-control`]:{width:"100%"},[`${n}-label, + ${r}-col-24${n}-label, + ${r}-col-xl-24${n}-label`]:g2(e)},[`@media (max-width: ${en(e.screenXSMax)})`]:[Evn(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:g2(e)}}}],[`@media (max-width: ${en(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:g2(e)}}},[`@media (max-width: ${en(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:g2(e)}}},[`@media (max-width: ${en(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:g2(e)}}}}},Ivn=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),rXe=(e,t)=>hs(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),lpe=vl("Form",(e,{rootPrefixCls:t})=>{const n=rXe(e,t);return[Cvn(n),_vn(n),wvn(n),jvn(n),Nvn(n),Pvn(n),kfe(n),Lfe]},Ivn,{order:-1e3}),kPe=[];function TX(e,t,n,r=0){return{key:typeof e=="string"?e:`${t}-${r}`,error:e,errorStatus:n}}const oXe=({help:e,helpStatus:t,errors:n=kPe,warnings:r=kPe,className:o,fieldId:i,onVisibleChanged:a})=>{const{prefixCls:l}=p.useContext(zfe),c=`${l}-item-explain`,u=Mf(l),[d,f]=lpe(l,u),h=p.useMemo(()=>ZB(l),[l]),m=uz(n),g=uz(r),b=p.useMemo(()=>Fp(e)?[TX(e,"help",t)]:[].concat(So(m.map((x,S)=>TX(x,"error","error",S))),So(g.map((x,S)=>TX(x,"warning","warning",S)))),[e,t,m,g]),y=p.useMemo(()=>{const x={};return b.forEach(({key:S})=>{x[S]=(x[S]||0)+1}),b.map((S,C)=>({...S,key:x[S.key]>1?`${S.key}-fallback-${C}`:S.key}))},[b]),v={};return i&&(v.id=`${i}_help`),p.createElement(qg,{motionDeadline:h.motionDeadline,motionName:`${l}-show-help`,visible:!!y.length,onVisibleChanged:a},x=>{const{className:S,style:C}=x;return p.createElement("div",{...v,className:Ae(c,S,f,u,o,d),style:C},p.createElement(xdn,{keys:y,...ZB(l),motionName:`${l}-show-help-item`,component:!1},_=>{const{key:N,error:E,errorStatus:I,className:A,style:R}=_;return p.createElement("div",{key:N,className:Ae(A,{[`${c}-${I}`]:I}),style:R},E)}))})},Avn=(e,t)=>{const n=p.useContext(Lg),{getPrefixCls:r,direction:o,requiredMark:i,colon:a,scrollToFirstError:l,className:c,style:u,styles:d,classNames:f}=cu("form"),{prefixCls:h,className:m,rootClassName:g,size:b,disabled:y=n,form:v,colon:x,labelAlign:S,labelWrap:C,labelCol:_,wrapperCol:N,layout:E="horizontal",scrollToFirstError:I,requiredMark:A,onFinishFailed:R,name:k,style:T,feedbackIcons:D,variant:O,classNames:z,styles:F,...U}=e,G=fy(b),W=p.useContext(Rqe),Y=p.useMemo(()=>A!==void 0?A:i!==void 0?i:!0,[A,i]),B=x??a,$=r("form",h),K=Mf($),[q,Z]=lpe($,K),J={...e,size:G,disabled:y,layout:E,colon:B,requiredMark:Y},[oe,de]=Mu([f,z],[d,F],{props:J}),ae=Ae($,`${$}-${E}`,{[`${$}-hide-required-mark`]:Y===!1,[`${$}-rtl`]:o==="rtl",[`${$}-${G}`]:G},Z,K,q,c,m,g,oe.root),[ue]=AYe(v),{__INTERNAL__:ce}=ue;ce.name=k;const se=p.useMemo(()=>({name:k,labelAlign:S,labelCol:_,labelWrap:C,wrapperCol:N,layout:E,colon:B,requiredMark:Y,itemRef:ce.itemRef,form:ue,feedbackIcons:D,classNames:oe,styles:de}),[k,S,_,N,E,B,Y,ue,D,oe,de]),me=p.useRef(null);p.useImperativeHandle(t,()=>{var ye;return{...ue,nativeElement:(ye=me.current)==null?void 0:ye.nativeElement}});const fe=(ye,ve)=>{if(ye){let ge={block:"nearest"};typeof ye=="object"&&(ge={...ge,...ye}),ue.scrollToField(ve,ge)}},te=ye=>{if(R==null||R(ye),ye.errorFields.length){const ve=ye.errorFields[0].name;if(I!==void 0){fe(I,ve);return}l!==void 0&&fe(l,ve)}};return p.createElement(gKe.Provider,{value:O},p.createElement(Afe,{disabled:y},p.createElement(G_.Provider,{value:G},p.createElement(hKe,{validateMessages:W},p.createElement(qx.Provider,{value:se},p.createElement(mKe,{status:!0},p.createElement(tA,{id:k,...U,name:k,onFinishFailed:te,form:ue,ref:me,style:{...de==null?void 0:de.root,...u,...T},className:ae})))))))},Tvn=p.forwardRef(Avn);function kvn(e){if(typeof e=="function")return e;const t=$p(e);return t.length<=1?t[0]:t}const iXe=()=>{const{status:e,errors:t=[],warnings:n=[]}=p.useContext(dp);return{status:e,errors:t,warnings:n}};iXe.Context=dp;function Mvn(e){const[t,n]=p.useState(e),r=p.useRef(null),o=p.useRef([]),i=p.useRef(!1);p.useEffect(()=>(i.current=!1,()=>{i.current=!0,Ri.cancel(r.current),r.current=null}),[]);function a(l){i.current||(r.current===null&&(o.current=[],r.current=Ri(()=>{r.current=null,n(c=>{let u=c;return o.current.forEach(d=>{u=d(u)}),u})})),o.current.push(l))}return[t,a]}function Rvn(){const{itemRef:e}=p.useContext(qx),t=p.useRef({});function n(r,o){const i=o&&typeof o=="object"&&oC(o),a=r.join("_");return(t.current.name!==a||t.current.originRef!==i)&&(t.current.name=a,t.current.originRef=i,t.current.ref=hp(e(r),i)),t.current.ref}return n}const Ovn=e=>{const{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:"flex"}}}},Dvn=BV(["Form","item-item"],(e,{rootPrefixCls:t})=>{const n=rXe(e,t);return Ovn(n)}),Lvn=24,$vn=e=>{const{prefixCls:t,status:n,labelCol:r,wrapperCol:o,children:i,errors:a,warnings:l,_internalItemRender:c,extra:u,help:d,fieldId:f,marginBottom:h,onErrorVisibleChanged:m,label:g}=e,b=`${t}-item`,y=p.useContext(qx),{classNames:v,styles:x}=y,S=p.useMemo(()=>{let F={...o||y.wrapperCol||{}};return g===null&&!r&&!o&&y.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(G=>{const W=G?[G]:[],Y=rp(y.labelCol,W),B=typeof Y=="object"?Y:{},$=rp(F,W),K=typeof $=="object"?$:{};"span"in B&&!("offset"in K)&&B.span{const{labelCol:F,wrapperCol:U,...G}=y;return G},[y]),N=p.useRef(null),[E,I]=p.useState(0);ai(()=>{u&&N.current?I(N.current.clientHeight):I(0)},[u]);const A=p.createElement("div",{className:`${b}-control-input`},p.createElement("div",{className:Ae(`${b}-control-input-content`,v==null?void 0:v.content),style:x==null?void 0:x.content},i)),R=p.useMemo(()=>({prefixCls:t,status:n}),[t,n]),k=h!==null||a.length||l.length?p.createElement(zfe.Provider,{value:R},p.createElement(oXe,{fieldId:f,errors:a,warnings:l,help:d,helpStatus:n,className:`${b}-explain-connected`,onVisibleChanged:m})):null,T={};f&&(T.id=`${f}_extra`);const D=u?p.createElement("div",{...T,className:`${b}-extra`,ref:N},u):null,O=k||D?p.createElement("div",{className:`${b}-additional`,style:h?{minHeight:h+E}:{}},k,D):null,z=c&&c.mark==="pro_table_render"&&c.render?c.render(e,{input:A,errorList:k,extra:D}):p.createElement(p.Fragment,null,A,O);return p.createElement(qx.Provider,{value:_},p.createElement(n5,{...S,className:C},z),p.createElement(Dvn,{prefixCls:t}))},Fvn=({prefixCls:e,label:t,htmlFor:n,labelCol:r,labelAlign:o,colon:i,required:a,requiredMark:l,tooltip:c,vertical:u})=>{var O;const[d]=dy("Form"),{labelAlign:f,labelCol:h,labelWrap:m,colon:g,classNames:b,styles:y}=p.useContext(qx);if(!t)return null;const v=r||h||{},x=o||f,S=`${e}-item-label`,C=Ae(S,x==="left"&&`${S}-left`,v.className,{[`${S}-wrap`]:!!m});let _=t;const N=i===!0||g!==!1&&i!==!1;N&&!u&&typeof t=="string"&&t.trim()&&(_=t.replace(/[:|:]\s*$/,""));const I=xvn(c);if(I){const{icon:z=p.createElement(avn,null),...F}=I,U=p.createElement(Kx,{...F},p.cloneElement(z,{className:`${e}-item-tooltip`,title:"",onClick:G=>{G.preventDefault()},tabIndex:null}));_=p.createElement(p.Fragment,null,_,U)}const A=l==="optional",R=typeof l=="function",k=l===!1;R?_=l(_,{required:!!a}):A&&!a&&(_=p.createElement(p.Fragment,null,_,p.createElement("span",{className:`${e}-item-optional`,title:""},(d==null?void 0:d.optional)||((O=ty.Form)==null?void 0:O.optional))));let T;k?T="hidden":(A||R)&&(T="optional");const D=Ae(b==null?void 0:b.label,{[`${e}-item-required`]:a,[`${e}-item-required-mark-${T}`]:T,[`${e}-item-no-colon`]:!N});return p.createElement(n5,{...v,className:C},p.createElement("label",{htmlFor:n,className:D,style:y==null?void 0:y.label,title:typeof t=="string"?t:""},_))},Bvn={success:mqe,warning:gqe,error:zV,validating:EO};function aXe({children:e,errors:t,warnings:n,hasFeedback:r,validateStatus:o,prefixCls:i,meta:a,noStyle:l,name:c}){const u=`${i}-item`,{feedbackIcons:d}=p.useContext(qx),f=IYe(t,n,a,null,!!r,o),{isFormItemInput:h,status:m,hasFeedback:g,feedbackIcon:b,name:y}=p.useContext(dp),v=p.useMemo(()=>{var C;let x;if(r){const _=r!==!0&&r.icons||d,N=f&&((C=_==null?void 0:_({status:f,errors:t,warnings:n}))==null?void 0:C[f]),E=f?Bvn[f]:null;x=N!==!1&&E?p.createElement("span",{className:Ae(`${u}-feedback-icon`,`${u}-feedback-icon-${f}`)},N||p.createElement(E,null)):null}const S={status:f||"",errors:t,warnings:n,hasFeedback:!!r,feedbackIcon:x,isFormItemInput:!0,name:c};return l&&(S.status=(f??m)||"",S.isFormItemInput=h,S.hasFeedback=!!(r??g),S.feedbackIcon=r!==void 0?S.feedbackIcon:b,S.name=c??y),S},[f,r,l,h,m]);return p.createElement(dp.Provider,{value:v},e)}function zvn(e){const{prefixCls:t,className:n,rootClassName:r,style:o,help:i,errors:a,warnings:l,validateStatus:c,meta:u,hasFeedback:d,hidden:f,children:h,fieldId:m,required:g,isRequired:b,onSubItemMetaChange:y,layout:v,name:x,...S}=e,C=`${t}-item`,{requiredMark:_,layout:N}=p.useContext(qx),E=v||N,I=E==="vertical",A=p.useRef(null),R=uz(a),k=uz(l),T=Fp(i),D=!!(T||a.length||l.length),O=!!A.current&&jO(A.current),[z,F]=p.useState(null);ai(()=>{if(D&&A.current){const B=getComputedStyle(A.current);F(Number.parseInt(B.marginBottom,10))}},[D,O]);const U=B=>{B||F(null)},W=((B=!1)=>{const $=B?R:u.errors,K=B?k:u.warnings;return IYe($,K,u,"",!!d,c)})(),Y=Ae(C,n,r,{[`${C}-with-help`]:T||R.length||k.length,[`${C}-has-feedback`]:W&&d,[`${C}-has-success`]:W==="success",[`${C}-has-warning`]:W==="warning",[`${C}-has-error`]:W==="error",[`${C}-is-validating`]:W==="validating",[`${C}-hidden`]:f,[`${C}-${E}`]:E});return p.createElement("div",{className:Y,style:o,ref:A},p.createElement(roe,{className:`${C}-row`,...$l(S,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])},p.createElement(Fvn,{htmlFor:m,...e,requiredMark:_,required:g??b,prefixCls:t,vertical:I}),p.createElement($vn,{...e,...u,errors:R,warnings:k,prefixCls:t,status:W,help:i,marginBottom:z,onErrorVisibleChanged:U},p.createElement(pKe.Provider,{value:y},p.createElement(aXe,{prefixCls:t,meta:u,errors:u.errors,warnings:u.warnings,hasFeedback:d,validateStatus:W,name:x},h)))),!!z&&p.createElement("div",{className:`${C}-margin-offset`,style:{marginBottom:-z}}))}const Hvn="__SPLIT__";function Vvn(e,t){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(o=>{const i=e[o],a=t[o];return i===a||typeof i=="function"||typeof a=="function"})}const Uvn=p.memo(e=>e.children,(e,t)=>Vvn(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((n,r)=>n===t.childProps[r]));function MPe(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Gvn(e){const{name:t,noStyle:n,className:r,dependencies:o,prefixCls:i,shouldUpdate:a,rules:l,children:c,required:u,label:d,messageVariables:f,trigger:h="onChange",validateTrigger:m,hidden:g,help:b,layout:y}=e,{getPrefixCls:v}=p.useContext(Ho),{name:x}=p.useContext(qx),S=kvn(c),C=typeof S=="function",_=p.useContext(pKe),{validateTrigger:N}=p.useContext(W_),E=Fp(m)?m:N,I=Fp(t),A=v("form",i),R=Mf(A),[k,T]=lpe(A,R);Rj();const D=p.useContext(sR),O=p.useRef(null),[z,F]=Mvn({}),[U,G]=XM(()=>MPe()),W=J=>{const oe=D==null?void 0:D.getKey(J.name);if(G(J.destroy?MPe():J,!0),n&&b!==!1&&_){let de=J.name;if(J.destroy)de=O.current||de;else if(oe!==void 0){const[ae,ue]=oe;de=[ae].concat(So(ue)),O.current=de}_(J,de)}},Y=(J,oe)=>{F(de=>{const ae={...de},ce=[].concat(So(J.name.slice(0,-1)),So(oe)).join(Hvn);return J.destroy?delete ae[ce]:ae[ce]=J,ae})},[B,$]=p.useMemo(()=>{const J=So(U.errors),oe=So(U.warnings);return Object.values(z).forEach(de=>{J.push.apply(J,So(de.errors||[])),oe.push.apply(oe,So(de.warnings||[]))}),[J,oe]},[z,U.errors,U.warnings]),K=Rvn();function q(J,oe,de){return n&&!g?p.createElement(aXe,{prefixCls:A,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:U,errors:B,warnings:$,noStyle:!0,name:t},J):p.createElement(zvn,{key:"row",...e,className:Ae(r,T,R,k),prefixCls:A,fieldId:oe,isRequired:de,errors:B,warnings:$,meta:U,onSubItemMetaChange:Y,layout:y,name:t},J)}if(!I&&!C&&!o)return q(S);let Z={};return typeof d=="string"?Z.label=d:t&&(Z.label=String(t)),f&&(Z={...Z,...f}),p.createElement(Ffe,{...e,messageVariables:Z,trigger:h,validateTrigger:E,onMetaChange:W},(J,oe,de)=>{const ae=T4(t).length&&oe?oe.name:[],ue=PYe(ae,x),ce=u!==void 0?u:!!(l!=null&&l.some(fe=>{if(fe&&typeof fe=="object"&&fe.required&&!fe.warningOnly)return!0;if(typeof fe=="function"){const te=fe(de);return(te==null?void 0:te.required)&&!(te!=null&&te.warningOnly)}return!1})),se={...J};let me=null;if(Array.isArray(S)&&I)me=S;else if(!(C&&(!(a||o)||I))){if(!(o&&!C&&!I))if(p.isValidElement(S)){const fe={...S.props,...se};if(fe.id||(fe.id=ue),b||B.length>0||$.length>0||e.extra){const ve=[];(b||B.length>0)&&ve.push(`${ue}_help`),e.extra&&ve.push(`${ue}_extra`),fe["aria-describedby"]=ve.join(" ")}B.length>0&&(fe["aria-invalid"]="true"),ce&&(fe["aria-required"]="true"),Hb(S)&&(fe.ref=K(ae,S)),new Set([].concat(So(T4(h)),So(T4(E)))).forEach(ve=>{fe[ve]=(...ge)=>{var Ee,xe,Ne;(Ee=se[ve])==null||Ee.call(se,...ge),(Ne=(xe=S.props)[ve])==null||Ne.call(xe,...ge)}});const ye=[fe["aria-required"],fe["aria-invalid"],fe["aria-describedby"]];me=p.createElement(Uvn,{control:se,update:S,childProps:ye},Bp(S,fe))}else C&&(a||o)&&!I?me=S(de):me=S}return q(me,ue,ce)})}const sXe=Gvn;sXe.useStatus=iXe;const Wvn=({prefixCls:e,children:t,...n})=>{const{getPrefixCls:r}=p.useContext(Ho),o=r("form",e),i=p.useMemo(()=>({prefixCls:o,status:"error"}),[o]);return p.createElement(cKe,{...n},(a,l,c)=>p.createElement(zfe.Provider,{value:i},t(a.map(u=>({...u,fieldKey:u.key})),l,{errors:c.errors,warnings:c.warnings})))};function qvn(){const{form:e}=p.useContext(qx);return e}const yh=Tvn;yh.Item=sXe;yh.List=Wvn;yh.ErrorList=oXe;yh.useForm=AYe;yh.useFormInstance=qvn;yh.useWatch=fKe;yh.Provider=hKe;const Kvn=e=>{const{getPrefixCls:t,direction:n}=p.useContext(Ho),{prefixCls:r,className:o}=e,i=t("input-group",r),a=t("input"),[l,c]=BYe(a),u=Ae(i,c,{[`${i}-lg`]:e.size==="large",[`${i}-sm`]:e.size==="small",[`${i}-compact`]:e.compact,[`${i}-rtl`]:n==="rtl"},l,o),d=p.useContext(dp),f=p.useMemo(()=>({...d,isFormItemInput:!1}),[d]);return p.createElement(dp.Provider,{value:f},p.createElement(iA.Compact,{className:u,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},Yvn=e=>{const{componentCls:t,paddingXS:n}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,[`${t}-input-wrapper`]:{position:"relative",[`${t}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${t}-mask-input`]:{color:"transparent",caretColor:e.colorText},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},Xvn=vl(["Input","OTP"],e=>{const t=hs(e,OO(e));return Yvn(t)},DO),Zvn=p.forwardRef((e,t)=>{const{className:n,value:r,onChange:o,onActiveChange:i,index:a,mask:l,onFocus:c,...u}=e,{getPrefixCls:d}=p.useContext(Ho),f=d("otp"),h=typeof l=="string"?l:r,m=p.useRef(null);p.useImperativeHandle(t,()=>m.current);const g=x=>{o(a,x.target.value)},b=()=>{Ri(()=>{var S;const x=(S=m.current)==null?void 0:S.input;document.activeElement===x&&x&&x.select()})},y=x=>{c==null||c(x),b()},v=x=>{const{key:S,ctrlKey:C,metaKey:_}=x;S==="ArrowLeft"?i(a-1):S==="ArrowRight"?i(a+1):S==="z"&&(C||_)?x.preventDefault():S==="Backspace"&&!r&&i(a-1),b()};return p.createElement("span",{className:`${f}-input-wrapper`,role:"presentation"},l&&r!==""&&r!==void 0&&p.createElement("span",{className:`${f}-mask-icon`,"aria-hidden":"true"},h),p.createElement($O,{"aria-label":`OTP Input ${a+1}`,type:l===!0?"password":"text",...u,ref:m,value:r,onInput:g,onFocus:y,onKeyDown:v,onMouseDown:b,onMouseUp:b,className:Ae(n,{[`${f}-mask-input`]:l})}))});function m6(e){return(e||"").split("")}const Jvn=e=>{const{index:t,prefixCls:n,separator:r,className:o,style:i}=e,a=typeof r=="function"?r(t):r;return a?p.createElement("span",{className:Ae(`${n}-separator`,o),style:i},a):null},Qvn=p.forwardRef((e,t)=>{const{prefixCls:n,length:r=6,size:o,defaultValue:i,value:a,onChange:l,formatter:c,separator:u,variant:d,disabled:f,status:h,autoFocus:m,mask:g,type:b,onInput:y,onFocus:v,inputMode:x,classNames:S,styles:C,className:_,style:N,...E}=e,{classNames:I,styles:A,getPrefixCls:R,direction:k,style:T,className:D}=cu("otp"),O=R("otp",n),z={...e,length:r},[F,U]=Mu([I,S],[A,C],{props:z}),G=Mh(E,{aria:!0,data:!0,attr:!0}),[W,Y]=Xvn(O),B=fy(ye=>o??ye),$=p.useContext(dp),K=JV($.status,h),q=p.useMemo(()=>({...$,status:K,hasFeedback:!1,feedbackIcon:null}),[$,K]),Z=p.useRef(null),J=p.useRef({});p.useImperativeHandle(t,()=>({focus:()=>{var ye;(ye=J.current[0])==null||ye.focus()},blur:()=>{var ye;for(let ve=0;vec?c(ye):ye,[de,ae]=p.useState(()=>m6(oe(i||"")));p.useEffect(()=>{a!==void 0&&ae(m6(a))},[a]);const ue=Xo(ye=>{ae(ye),y&&y(ye),l&&ye.length===r&&ye.every(ve=>ve)&&ye.some((ve,ge)=>de[ge]!==ve)&&l(ye.join(""))}),ce=Xo((ye,ve)=>{let ge=So(de);for(let xe=0;xe=0&&!ge[xe];xe-=1)ge.pop();const Ee=oe(ge.map(xe=>xe||" ").join(""));return ge=m6(Ee).map((xe,Ne)=>xe===" "&&!ge[Ne]?ge[Ne]:xe),ge}),se=(ye,ve)=>{var xe;const ge=ce(ye,ve),Ee=Math.min(ye+ve.length,r-1);Ee!==ye&&ge[ye]!==void 0&&((xe=J.current[Ee])==null||xe.focus()),ue(ge)},me=ye=>{var ve;(ve=J.current[ye])==null||ve.focus()},fe=(ye,ve)=>{var ge,Ee,xe;for(let Ne=0;Ne{const ge=`otp-${ve}`,Ee=de[ve]||"";return p.createElement(p.Fragment,{key:ge},p.createElement(Zvn,{ref:xe=>{J.current[ve]=xe},index:ve,size:B,htmlSize:1,className:Ae(F.input,`${O}-input`),style:U.input,onChange:se,value:Ee,onActiveChange:me,autoFocus:ve===0&&m,onFocus:xe=>fe(xe,ve),...te}),vee?p.createElement(YYe,null):p.createElement(Obn,null),txn={click:"onClick",hover:"onMouseOver"},nxn=p.forwardRef((e,t)=>{const{disabled:n,action:r="click",visibilityToggle:o=!0,iconRender:i=exn,suffix:a}=e,l=p.useContext(Lg),c=n??l,u=typeof o=="object"&&o.visible!==void 0,[d,f]=p.useState(()=>u?o.visible:!1),h=p.useRef(null);p.useEffect(()=>{u&&f(o.visible)},[u,o]);const m=eXe(h),g=()=>{var T;if(c)return;d&&m();const k=!d;f(k),typeof o=="object"&&((T=o.onVisibleChange)==null||T.call(o,k))},b=k=>{const T=txn[r]||"",D=i(d),O={[T]:g,className:`${k}-icon`,key:"passwordIcon",onMouseDown:z=>{z.preventDefault()},onMouseUp:z=>{z.preventDefault()}};return p.cloneElement(p.isValidElement(D)?D:p.createElement("span",null,D),O)},{className:y,prefixCls:v,inputPrefixCls:x,size:S,...C}=e,{getPrefixCls:_}=p.useContext(Ho),N=_("input",x),E=_("input-password",v),I=o&&b(E),A=Ae(E,y,{[`${E}-${S}`]:!!S}),R={...$l(C,["suffix","iconRender","visibilityToggle"]),type:d?"text":"password",className:A,prefixCls:N,suffix:p.createElement(p.Fragment,null,I,a)};return S&&(R.size=S),p.createElement($O,{ref:hp(t,h),...R})}),rxn=e=>{const{componentCls:t}=e,n=`${t}-btn`;return{[t]:{width:"100%",[n]:{"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}}}}},oxn=vl(["Input","Search"],e=>[rxn(e)]),ixn=p.forwardRef((e,t)=>{const{prefixCls:n,inputPrefixCls:r,className:o,size:i,style:a,enterButton:l=!1,addonAfter:c,loading:u,disabled:d,onSearch:f,onChange:h,onCompositionStart:m,onCompositionEnd:g,variant:b,onPressEnter:y,classNames:v,styles:x,hidden:S,...C}=e,{direction:_,getPrefixCls:N,classNames:E,styles:I}=cu("inputSearch"),A={...e,enterButton:l},[R,k]=Mu([E,v],[I,x],{props:A},{button:{_default:"root"}}),T=p.useRef(!1),D=N("input-search",n),O=N("input",r),[z,F]=oxn(D),{compactSize:U}=Lj(D,_),G=fy(te=>i??U??te),W=p.useRef(null),Y=te=>{te!=null&&te.target&&te.type==="click"&&f&&f(te.target.value,te,{source:"clear"}),h==null||h(te)},B=te=>{var ye;document.activeElement===((ye=W.current)==null?void 0:ye.input)&&te.preventDefault()},$=te=>{var ye,ve;f&&f((ve=(ye=W.current)==null?void 0:ye.input)==null?void 0:ve.value,te,{source:"input"})},K=te=>{T.current||u||(y==null||y(te),$(te))},q=typeof l=="boolean"?p.createElement(cR,null):null,Z=`${D}-btn`,J=Ae(Z,{[`${Z}-${b}`]:b});let oe;const de=l||{},ae=de.type&&de.type.__ANT_BUTTON===!0;ae||de.type==="button"?oe=Bp(de,{onMouseDown:B,onClick:te=>{var ye,ve;(ve=(ye=de==null?void 0:de.props)==null?void 0:ye.onClick)==null||ve.call(ye,te),$(te)},key:"enterButton",...ae?{className:J,size:G}:{}}):oe=p.createElement(wd,{classNames:R.button,styles:k.button,className:J,color:l?"primary":"default",size:G,disabled:d,key:"enterButton",onMouseDown:B,onClick:$,loading:u,icon:q,variant:b==="borderless"||b==="filled"||b==="underlined"?"text":l?"solid":void 0},l),c&&(oe=[oe,Bp(c,{key:"addonAfter"})]);const ue=Ae(D,F,{[`${D}-rtl`]:_==="rtl",[`${D}-${G}`]:!!G,[`${D}-with-button`]:!!l},o,z,R.root),ce=te=>{T.current=!0,m==null||m(te)},se=te=>{T.current=!1,g==null||g(te)},me=Mh(C,{data:!0}),fe=$l({...C,classNames:$l(R,["button","root"]),styles:$l(k,["button","root"]),prefixCls:O,type:"search",size:G,variant:b,onPressEnter:K,onCompositionStart:ce,onCompositionEnd:se,onChange:Y,disabled:d},Object.keys(me));return p.createElement(Yqe,{className:ue,style:{...a,...k.root},...me,hidden:S},p.createElement($O,{ref:hp(W,t),...fe}),oe)}),axn=` + min-height:0 !important; + max-height:none !important; + height:0 !important; + visibility:hidden !important; + overflow:hidden !important; + position:absolute !important; + z-index:-1000 !important; + top:0 !important; + right:0 !important; + pointer-events: none !important; +`,sxn=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],kX={};let Jh;function lxn(e,t=!1){const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&kX[n])return kX[n];const r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),c={sizingStyle:sxn.map(u=>`${u}:${r.getPropertyValue(u)}`).join(";"),paddingSize:i,borderSize:a,boxSizing:o};return t&&n&&(kX[n]=c),c}function cxn(e,t=!1,n=null,r=null){Jh||(Jh=document.createElement("textarea"),Jh.setAttribute("tab-index","-1"),Jh.setAttribute("aria-hidden","true"),Jh.setAttribute("name","hiddenTextarea"),document.body.appendChild(Jh)),e.getAttribute("wrap")?Jh.setAttribute("wrap",e.getAttribute("wrap")):Jh.removeAttribute("wrap");const{paddingSize:o,borderSize:i,boxSizing:a,sizingStyle:l}=lxn(e,t);Jh.setAttribute("style",`${l};${axn}`),Jh.value=e.value||e.placeholder||"";let c,u,d,f=Jh.scrollHeight;if(a==="border-box"?f+=i:a==="content-box"&&(f-=o),n!==null||r!==null){Jh.value=" ";const m=Jh.scrollHeight-o;n!==null&&(c=m*n,a==="border-box"&&(c=c+o+i),f=Math.max(c,f)),r!==null&&(u=m*r,a==="border-box"&&(u=u+o+i),d=f>u?"":"hidden",f=Math.min(u,f))}const h={height:f,overflowY:d,resize:"none"};return c&&(h.minHeight=c),u&&(h.maxHeight=u),h}function _oe(){return _oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,defaultValue:r,value:o,autoSize:i,onResize:a,className:l,style:c,disabled:u,onChange:d,onInternalAutoSize:f,...h}=e,[m,g]=Ku(r,o),b=m??"",y=z=>{g(z.target.value),d==null||d(z)},v=p.useRef();p.useImperativeHandle(t,()=>({textArea:v.current}));const[x,S]=p.useMemo(()=>i&&typeof i=="object"?[i.minRows,i.maxRows]:[],[i]),C=!!i,[_,N]=p.useState(OX),[E,I]=p.useState(),A=()=>{N(MX)};ai(()=>{C&&A()},[o,x,S,C]),ai(()=>{if(_===MX)N(RX);else if(_===RX){const z=cxn(v.current,!1,x,S);N(OX),I(z)}},[_]);const R=p.useRef(),k=()=>{Ri.cancel(R.current)},T=z=>{_===OX&&(a==null||a(z),i&&(k(),R.current=Ri(()=>{A()})))};p.useEffect(()=>k,[]);const O={...c,...C?E:null};return(_===MX||_===RX)&&(O.overflowY="hidden",O.overflowX="hidden"),p.createElement(Wg,{onResize:T,disabled:!(i||a)},p.createElement("textarea",_oe({},h,{ref:v,style:O,className:Ae(n,l,{[`${n}-disabled`]:u}),disabled:u,value:b,onChange:y})))});function joe(){return joe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[k,T]=Ku(e,t),D=k==null?"":String(k),[O,z]=Pe.useState(!1),F=Pe.useRef(!1),[U,G]=Pe.useState(null),W=p.useRef(null),Y=p.useRef(null),B=()=>{var _e;return(_e=Y.current)==null?void 0:_e.textArea},$=()=>{B().focus()};p.useImperativeHandle(R,()=>{var _e;return{resizableTextArea:Y.current,focus:$,blur:()=>{B().blur()},nativeElement:((_e=W.current)==null?void 0:_e.nativeElement)||B()}}),p.useEffect(()=>{z(_e=>!b&&_e)},[b]);const[K,q]=Pe.useState(null);Pe.useEffect(()=>{K&&B().setSelectionRange(...K)},[K]);const Z=JYe(h,f),J=Z.max??a,oe=Number(J)>0,de=Z.strategy(D),ae=!!J&&de>J,ue=(_e,Be)=>{let Te=Be;!F.current&&Z.exceedFormatter&&Z.max&&Z.strategy(Be)>Z.max&&(Te=Z.exceedFormatter(Be,{max:Z.max}),Be!==Te&&q([B().selectionStart||0,B().selectionEnd||0])),T(Te),lz(_e.currentTarget,_e,o,Te)},ce=_e=>{F.current=!0,l==null||l(_e)},se=_e=>{F.current=!1,ue(_e,_e.currentTarget.value),c==null||c(_e)},me=_e=>{ue(_e,_e.target.value)},fe=_e=>{_e.key==="Enter"&&_&&!_e.nativeEvent.isComposing&&_(_e),I==null||I(_e)},te=_e=>{z(!0),n==null||n(_e)},ye=_e=>{z(!1),r==null||r(_e)},ve=_e=>{T(""),$(),lz(B(),_e,o)};let ge=u,Ee;Z.show&&(Z.showFormatter?Ee=Z.showFormatter({value:D,count:de,maxLength:J}):Ee=`${de}${oe?` / ${J}`:""}`,ge=Pe.createElement(Pe.Fragment,null,ge,Pe.createElement("span",{className:Ae(`${d}-data-count`,v==null?void 0:v.count),style:x==null?void 0:x.count},Ee)));const xe=_e=>{var Be;S==null||S(_e),(Be=B())!=null&&Be.style.height&&G(!0)},Ne=!E&&!f&&!i;return Pe.createElement(ZYe,{ref:W,value:D,allowClear:i,handleReset:ve,suffix:ge,prefixCls:d,classNames:{...v,affixWrapper:Ae(v==null?void 0:v.affixWrapper,{[`${d}-show-count`]:f,[`${d}-textarea-allow-clear`]:i})},disabled:b,focused:O,className:Ae(m,ae&&`${d}-out-of-range`),style:{...g,...U&&!Ne?{height:"auto"}:{}},dataAttrs:{affixWrapper:{"data-count":typeof Ee=="string"?Ee:void 0}},hidden:y,readOnly:N,onClear:C},Pe.createElement(uxn,joe({},A,{autoSize:E,maxLength:a,onKeyDown:fe,onChange:me,onFocus:te,onBlur:ye,onCompositionStart:ce,onCompositionEnd:se,className:Ae(v==null?void 0:v.textarea),style:{resize:g==null?void 0:g.resize,...x==null?void 0:x.textarea},disabled:b,prefixCls:d,onResize:xe,ref:Y,readOnly:N})))}),fxn=e=>{const{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[` + &-allow-clear > ${t}, + &-affix-wrapper${r}-has-feedback ${t} + `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},pxn=vl(["Input","TextArea"],e=>{const t=hs(e,OO(e));return fxn(t)},DO,{resetFont:!1}),lXe=p.forwardRef((e,t)=>{var te;const{prefixCls:n,bordered:r=!0,size:o,disabled:i,status:a,allowClear:l,classNames:c,rootClassName:u,className:d,style:f,styles:h,variant:m,showCount:g,onMouseDown:b,onResize:y,...v}=e,{getPrefixCls:x,direction:S,allowClear:C,autoComplete:_,className:N,style:E,classNames:I,styles:A}=cu("textArea"),R=p.useContext(Lg),k=i??R,{status:T,hasFeedback:D,feedbackIcon:O}=p.useContext(dp),z=JV(T,a),[F,U]=Mu([I,c],[A,h],{props:e}),G=p.useRef(null);p.useImperativeHandle(t,()=>{var ye;return{resizableTextArea:(ye=G.current)==null?void 0:ye.resizableTextArea,focus:ve=>{var ge,Ee;mYe((Ee=(ge=G.current)==null?void 0:ge.resizableTextArea)==null?void 0:Ee.textArea,ve)},blur:()=>{var ve;return(ve=G.current)==null?void 0:ve.blur()}}});const W=x("input",n),Y=Mf(W),[B,$]=FYe(W,u);pxn(W,Y);const{compactSize:K,compactItemClassnames:q}=Lj(W,S),Z=fy(ye=>o??K??ye),[J,oe]=Kfe("textArea",m,r),de=QYe(l??C),[ae,ue]=p.useState(!1),[ce,se]=p.useState(!1),me=ye=>{ue(!0),b==null||b(ye);const ve=()=>{ue(!1),document.removeEventListener("mouseup",ve)};document.addEventListener("mouseup",ve)},fe=ye=>{var ve,ge;if(y==null||y(ye),ae&&typeof getComputedStyle=="function"){const Ee=(ge=(ve=G.current)==null?void 0:ve.nativeElement)==null?void 0:ge.querySelector("textarea");Ee&&getComputedStyle(Ee).resize==="both"&&se(!0)}};return p.createElement(dxn,{autoComplete:_,...v,style:{...U.root,...E,...f},styles:U,disabled:k,allowClear:de,className:Ae($,Y,d,u,q,N,F.root,{[`${W}-textarea-affix-wrapper-resize-dirty`]:ce}),classNames:{...F,textarea:Ae({[`${W}-sm`]:Z==="small",[`${W}-lg`]:Z==="large"},B,F.textarea,ae&&`${W}-mouse-active`),variant:Ae({[`${W}-${J}`]:oe},lR(W,z)),affixWrapper:Ae(`${W}-textarea-affix-wrapper`,{[`${W}-affix-wrapper-rtl`]:S==="rtl",[`${W}-affix-wrapper-sm`]:Z==="small",[`${W}-affix-wrapper-lg`]:Z==="large",[`${W}-textarea-show-count`]:g||((te=e.count)==null?void 0:te.show)},B)},prefixCls:W,suffix:D&&p.createElement("span",{className:`${W}-textarea-suffix`},O),showCount:g,ref:G,onResize:fe,onMouseDown:me})}),FS=$O;FS.Group=Kvn;FS.Search=ixn;FS.TextArea=lXe;FS.Password=nxn;FS.OTP=Qvn;const hxn={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},mxn=[10,20,50,100],gxn=e=>{const{pageSizeOptions:t=mxn,locale:n,changeSize:r,pageSize:o,goButton:i,quickGo:a,rootPrefixCls:l,disabled:c,buildOptionText:u,showSizeChanger:d,sizeChangerRender:f}=e,[h,m]=Pe.useState(""),g=Pe.useMemo(()=>!h||Number.isNaN(h)?void 0:Number(h),[h]),b=typeof u=="function"?u:I=>`${I} ${n.items_per_page}`,y=I=>{const A=I.target.value;/^\d*$/.test(A)&&m(A)},v=I=>{i||h===""||(m(""),!(I.relatedTarget&&(I.relatedTarget.className.includes(`${l}-item-link`)||I.relatedTarget.className.includes(`${l}-item`)))&&(a==null||a(g)))},x=I=>{h!==""&&(I.keyCode===Wr.ENTER||I.type==="click")&&(m(""),a==null||a(g))},S=()=>t.some(I=>I.toString()===o.toString())?t:t.concat([o]).sort((I,A)=>{const R=Number.isNaN(Number(I))?0:Number(I),k=Number.isNaN(Number(A))?0:Number(A);return R-k}),C=`${l}-options`;if(!d&&!a)return null;let _=null,N=null,E=null;return d&&f&&(_=f({disabled:c,size:o,onSizeChange:I=>{r==null||r(Number(I))},"aria-label":n.page_size,className:`${C}-size-changer`,options:S().map(I=>({label:b(I),value:I}))})),a&&(i&&(E=typeof i=="boolean"?Pe.createElement("button",{type:"button",onClick:x,onKeyUp:x,disabled:c,className:`${C}-quick-jumper-button`},n.jump_to_confirm):Pe.createElement("span",{onClick:x,onKeyUp:x},i)),N=Pe.createElement("div",{className:`${C}-quick-jumper`},n.jump_to,Pe.createElement("input",{disabled:c,type:"text",value:h,onChange:y,onKeyUp:x,onBlur:v,"aria-label":n.page}),n.page,E)),Pe.createElement("li",{className:C},_,N)},VT=e=>{const{rootPrefixCls:t,page:n,active:r,className:o,style:i,showTitle:a,onClick:l,onKeyPress:c,itemRender:u}=e,d=`${t}-item`,f=Ae(d,`${d}-${n}`,{[`${d}-active`]:r,[`${d}-disabled`]:!n},o),h=()=>{l(n)},m=b=>{c(b,l,n)},g=u(n,"page",Pe.createElement("a",{rel:"nofollow"},n));return g?Pe.createElement("li",{title:a?String(n):null,className:f,style:i,onClick:h,onKeyDown:m,tabIndex:0},g):null};function Aw(){return Aw=Object.assign?Object.assign.bind():function(e){for(var t=1;tn;function RPe(){}function OPe(e){const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function DC(e,t,n){const r=typeof e>"u"?t:e;return Math.floor((n-1)/r)+1}const bxn=e=>{const{prefixCls:t="rc-pagination",selectPrefixCls:n="rc-select",className:r,classNames:o,styles:i,current:a,defaultCurrent:l=1,total:c=0,pageSize:u,defaultPageSize:d=10,onChange:f=RPe,hideOnSinglePage:h,align:m,showPrevNextJumpers:g=!0,showQuickJumper:b,showLessItems:y,showTitle:v=!0,onShowSizeChange:x=RPe,locale:S=hxn,style:C,totalBoundaryShowSizeChanger:_=50,disabled:N,simple:E,showTotal:I,showSizeChanger:A=c>_,sizeChangerRender:R,pageSizeOptions:k,itemRender:T=yxn,jumpPrevIcon:D,jumpNextIcon:O,prevIcon:z,nextIcon:F}=e,U=Pe.useRef(null),[G,W]=Ku(d,u),[Y,B]=Ku(l,a),$=Math.max(1,Math.min(Y,DC(void 0,G,c))),[K,q]=Pe.useState($);p.useEffect(()=>{q($)},[$]);const Z=Math.max(1,$-(y?3:5)),J=Math.min(DC(void 0,G,c),$+(y?3:5));function oe(kt,pn){let tt=kt||Pe.createElement("button",{type:"button","aria-label":pn,className:`${t}-item-link`});return typeof kt=="function"&&(tt=Pe.createElement(kt,e)),tt}function de(kt){const pn=kt.target.value,tt=DC(void 0,G,c);let jt;return pn===""?jt=pn:Number.isNaN(Number(pn))?jt=K:pn>=tt?jt=tt:jt=Number(pn),jt}function ae(kt){return OPe(kt)&&kt!==$&&OPe(c)&&c>0}const ue=c>G?b:!1;function ce(kt){(kt.keyCode===Wr.UP||kt.keyCode===Wr.DOWN)&&kt.preventDefault()}function se(kt){const pn=de(kt);switch(pn!==K&&q(pn),kt.keyCode){case Wr.ENTER:te(pn);break;case Wr.UP:te(pn-1);break;case Wr.DOWN:te(pn+1);break}}function me(kt){te(de(kt))}function fe(kt){const pn=DC(kt,G,c),tt=$>pn&&pn!==0?pn:$;W(kt),q(tt),x==null||x($,kt),B(tt),f==null||f(tt,kt)}function te(kt){if(ae(kt)&&!N){const pn=DC(void 0,G,c);let tt=kt;return kt>pn?tt=pn:kt<1&&(tt=1),tt!==K&&q(tt),B(tt),f==null||f(tt,G),tt}return $}const ye=$>1,ve=$c?c:$*G]));let vt=null;const qe=DC(void 0,G,c);if(h&&c<=G)return null;const Ye=[],mt={rootPrefixCls:t,onClick:te,onKeyPress:_e,showTitle:v,itemRender:T,page:-1,className:o==null?void 0:o.item,style:i==null?void 0:i.item},Et=$-1>0?$-1:0,vn=$+1=wt*2&&$!==3&&(Ye[0]=Pe.cloneElement(Ye[0],{className:Ae(`${t}-item-after-jump-prev`,Ye[0].props.className)}),Ye.unshift(Qe)),qe-$>=wt*2&&$!==qe-2){const ln=Ye[Ye.length-1];Ye[Ye.length-1]=Pe.cloneElement(ln,{className:Ae(`${t}-item-before-jump-next`,ln.props.className)}),Ye.push(vt)}Nn!==1&&Ye.unshift(Pe.createElement(VT,Aw({},mt,{key:1,page:1}))),Xt!==qe&&Ye.push(Pe.createElement(VT,Aw({},mt,{key:qe,page:qe})))}let Dt=ht(Et);if(Dt){const kt=!ye||!qe;Dt=Pe.createElement("li",{title:v?S.prev_page:null,onClick:ge,tabIndex:kt?null:0,onKeyDown:Be,className:Ae(`${t}-prev`,o==null?void 0:o.item,{[`${t}-disabled`]:kt}),style:i==null?void 0:i.item,"aria-disabled":kt},Dt)}let on=Oe(vn);if(on){let kt,pn;E?(kt=!ve,pn=ye?0:null):(kt=!ve||!qe,pn=kt?null:0),on=Pe.createElement("li",{title:v?S.next_page:null,onClick:Ee,tabIndex:pn,onKeyDown:Te,className:Ae(`${t}-next`,o==null?void 0:o.item,{[`${t}-disabled`]:kt}),style:i==null?void 0:i.item,"aria-disabled":kt},on)}const jn=Ae(t,r,{[`${t}-start`]:m==="start",[`${t}-center`]:m==="center",[`${t}-end`]:m==="end",[`${t}-simple`]:E,[`${t}-disabled`]:N});return Pe.createElement("ul",Aw({className:jn,style:C,ref:U},De),st,Dt,E?nt:Ye,on,Pe.createElement(gxn,{locale:S,rootPrefixCls:t,disabled:N,selectPrefixCls:n,changeSize:fe,pageSize:G,pageSizeOptions:k,quickGo:ue?te:null,goButton:$e,showSizeChanger:A,sizeChangerRender:R}))},vxn=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},xxn=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:en(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:en(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:en(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[` + &${t}-mini ${t}-prev ${t}-item-link, + &${t}-mini ${t}-next ${t}-item-link + `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:en(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:en(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:en(e.itemSizeSM),input:{...ope(e),width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM}}}}},wxn=e=>{const{componentCls:t}=e;return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSize,lineHeight:en(e.itemSize),verticalAlign:"top",[`${t}-item-link`]:{height:e.itemSize,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSize,lineHeight:en(e.itemSize)}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:e.itemSize,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${en(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${en(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${en(e.inputOutlineOffset)} 0 ${en(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-mini`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSizeSM,lineHeight:en(e.itemSizeSM),[`${t}-item-link`]:{height:e.itemSizeSM,"&::after":{height:e.itemSizeSM,lineHeight:en(e.itemSizeSM)}}},[`${t}-simple-pager`]:{height:e.itemSizeSM,input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},Sxn=e=>{const{componentCls:t}=e;return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[` + ${t}-prev, + ${t}-jump-prev, + ${t}-jump-next + `]:{marginInlineEnd:e.marginXS},[` + ${t}-prev, + ${t}-next, + ${t}-jump-prev, + ${t}-jump-next + `]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:en(e.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${en(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:en(e.controlHeight),verticalAlign:"top",input:{...ipe(e),...rpe(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...rU(e)},width:e.quickJumperInputWidth,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS}}}}},Cxn=e=>{const{componentCls:t}=e;return{[`${t}-item`]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:en(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${en(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${en(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},_xn=e=>{const{componentCls:t}=e;return{[t]:{...ou(e),display:"flex","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:en(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"},...Cxn(e),...Sxn(e),...wxn(e),...xxn(e),...vxn(e),[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},jxn=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...OP(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},...$S(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:$S(e)}}}},cXe=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,...DO(e)}),uXe=e=>hs(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},OO(e)),Nxn=vl("Pagination",e=>{const t=uXe(e);return[_xn(t),jxn(t)]},cXe),Exn=e=>{const{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled:not(${t}-mini)`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered:not(${t}-mini)`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${en(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},Pxn=BV(["Pagination","bordered"],e=>{const t=uXe(e);return Exn(t)},cXe);function DPe(e){return p.useMemo(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[!0,e]:[void 0,void 0],[e])}const Ixn=e=>{const{align:t,prefixCls:n,selectPrefixCls:r,className:o,rootClassName:i,style:a,size:l,locale:c,responsive:u,showSizeChanger:d,selectComponentClass:f,pageSizeOptions:h,styles:m,classNames:g,...b}=e,{xs:y}=Yfe(u),[,v]=mp(),{getPrefixCls:x,direction:S,showSizeChanger:C,className:_,style:N,classNames:E,styles:I}=cu("pagination"),A=x("pagination",n),[R,k]=Nxn(A),T=fy(l),D=T==="small"||!!(y&&!T&&u),O={...e,size:T},[z,F]=Mu([E,g],[I,m],{props:O}),[U]=dy("Pagination",Nqe),G={...U,...c},[W,Y]=DPe(d),[B,$]=DPe(C),K=W??B,q=Y??$,Z=f||yb,J=p.useMemo(()=>h?h.map(se=>Number(se)):void 0,[h]),oe=se=>{var _e;const{disabled:me,size:fe,onSizeChange:te,"aria-label":ye,className:ve,options:ge}=se,{className:Ee,onChange:xe}=q||{},Ne=(_e=ge.find(Be=>String(Be.value)===String(fe)))==null?void 0:_e.value;return p.createElement(Z,{disabled:me,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:Be=>Be.parentNode,"aria-label":ye,options:ge,...q,value:Ne,onChange:(Be,Te)=>{te==null||te(Be),xe==null||xe(Be,Te)},size:D?"small":"middle",className:Ae(ve,Ee)})},de=p.useMemo(()=>{const se=p.createElement("span",{className:`${A}-item-ellipsis`},"•••"),me=p.createElement("button",{className:`${A}-item-link`,type:"button",tabIndex:-1},S==="rtl"?p.createElement(pre,null):p.createElement(Ure,null)),fe=p.createElement("button",{className:`${A}-item-link`,type:"button",tabIndex:-1},S==="rtl"?p.createElement(Ure,null):p.createElement(pre,null)),te=p.createElement("a",{className:`${A}-item-link`},p.createElement("div",{className:`${A}-item-container`},S==="rtl"?p.createElement(EPe,{className:`${A}-item-link-icon`}):p.createElement(NPe,{className:`${A}-item-link-icon`}),se)),ye=p.createElement("a",{className:`${A}-item-link`},p.createElement("div",{className:`${A}-item-container`},S==="rtl"?p.createElement(NPe,{className:`${A}-item-link-icon`}):p.createElement(EPe,{className:`${A}-item-link-icon`}),se));return{prevIcon:me,nextIcon:fe,jumpPrevIcon:te,jumpNextIcon:ye}},[S,A]),ae=x("select",r),ue=Ae({[`${A}-${t}`]:!!t,[`${A}-mini`]:D,[`${A}-rtl`]:S==="rtl",[`${A}-bordered`]:v.wireframe},_,o,i,z.root,R,k),ce={...F.root,...N,...a};return p.createElement(p.Fragment,null,v.wireframe&&p.createElement(Pxn,{prefixCls:A}),p.createElement(bxn,{...de,...b,styles:F,classNames:z,style:ce,prefixCls:A,selectPrefixCls:ae,className:ue,locale:G,pageSizeOptions:J,showSizeChanger:K,sizeChangerRender:oe}))},dz=100,dXe=dz/5,fXe=dz/2-dXe/2,DX=fXe*2*Math.PI,LPe=50,$Pe=e=>{const{dotClassName:t,style:n,hasCircleCls:r}=e;return p.createElement("circle",{className:Ae(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:fXe,cx:LPe,cy:LPe,strokeWidth:dXe,style:n})},Axn=({percent:e,prefixCls:t})=>{const n=`${t}-dot`,r=`${n}-holder`,o=`${r}-hidden`,[i,a]=p.useState(!1);ai(()=>{e!==0&&a(!0)},[e!==0]);const l=Math.max(Math.min(e,100),0);if(!i)return null;const c={strokeDashoffset:`${DX/4}`,strokeDasharray:`${DX*l/100} ${DX*(100-l)/100}`};return p.createElement("span",{className:Ae(r,`${n}-progress`,l<=0&&o)},p.createElement("svg",{viewBox:`0 0 ${dz} ${dz}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":l},p.createElement($Pe,{dotClassName:n,hasCircleCls:!0}),p.createElement($Pe,{dotClassName:n,style:c})))};function Txn(e){const{prefixCls:t,percent:n=0,className:r,style:o}=e,i=`${t}-dot`,a=`${i}-holder`,l=`${a}-hidden`;return p.createElement(p.Fragment,null,p.createElement("span",{className:Ae(a,r,n>0&&l),style:o},p.createElement("span",{className:Ae(i,`${t}-dot-spin`)},[1,2,3,4].map(c=>p.createElement("i",{className:`${t}-dot-item`,key:c})))),p.createElement(Axn,{prefixCls:t,percent:n}))}function kxn(e){const{prefixCls:t,indicator:n,percent:r,className:o,style:i}=e,a=`${t}-dot`;return n&&p.isValidElement(n)?Bp(n,l=>({className:Ae(l.className,a,o),style:{...l.style,...i},percent:r})):p.createElement(Txn,{prefixCls:t,percent:r,className:o,style:i})}const Mxn=new Ca("antSpinMove",{to:{opacity:1}}),Rxn=new Ca("antRotate",{to:{transform:"rotate(405deg)"}}),Oxn=e=>{const{componentCls:t,calc:n}=e;return{[t]:{...ou(e),position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:n(n(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),height:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:Mxn,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:Rxn,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(r=>`${r} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal(),height:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}}}},Dxn=e=>{const{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}},Lxn=vl("Spin",e=>{const t=hs(e,{spinDotDefault:e.colorTextDescription});return Oxn(t)},Dxn),$xn=200,FPe=[[30,.05],[70,.03],[96,.01]];function Fxn(e,t){const[n,r]=p.useState(0),o=p.useRef(null),i=t==="auto";return p.useEffect(()=>(i&&e&&(r(0),o.current=setInterval(()=>{r(a=>{const l=100-a;for(let c=0;c{o.current&&(clearInterval(o.current),o.current=null)}),[i,e]),i?n:t}let pXe;function Bxn(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}const hXe=e=>{const{prefixCls:t,spinning:n=!0,delay:r=0,className:o,rootClassName:i,size:a="default",tip:l,wrapperClassName:c,style:u,children:d,fullscreen:f=!1,indicator:h,percent:m,classNames:g,styles:b,...y}=e,{getPrefixCls:v,direction:x,indicator:S,className:C,style:_,classNames:N,styles:E}=cu("spin"),I=v("spin",t),[A,R]=Lxn(I),[k,T]=p.useState(()=>n&&!Bxn(n,r)),D=Fxn(k,m);p.useEffect(()=>{if(n){const K=Zyn(r,()=>{T(!0)});return K(),()=>{var q;(q=K==null?void 0:K.cancel)==null||q.call(K)}}T(!1)},[r,n]);const O=p.useMemo(()=>typeof d<"u"&&!f,[d,f]),z={...e,size:a,spinning:k,tip:l,fullscreen:f,children:d,percent:D},[F,U]=Mu([N,g],[E,b],{props:z}),G=Ae(I,C,{[`${I}-sm`]:a==="small",[`${I}-lg`]:a==="large",[`${I}-spinning`]:k,[`${I}-show-text`]:!!l,[`${I}-rtl`]:x==="rtl"},o,!f&&i,!f&&F.root,A,R),W=Ae(`${I}-container`,{[`${I}-blur`]:k}),Y=h??S??pXe,B={..._,...u},$=p.createElement("div",{...y,style:f?B:{...U.root,...B},className:G,"aria-live":"polite","aria-busy":k},p.createElement(kxn,{className:F.indicator,style:U.indicator,prefixCls:I,indicator:Y,percent:D}),l&&(O||f)?p.createElement("div",{className:Ae(`${I}-text`,F.tip),style:U.tip},l):null);return O?p.createElement("div",{...y,className:Ae(`${I}-nested-loading`,c,F.wrapper,A,R),style:U.wrapper},k&&p.createElement("div",{key:"loading"},$),p.createElement("div",{className:W,key:"container"},d)):f?p.createElement("div",{className:Ae(`${I}-fullscreen`,{[`${I}-fullscreen-show`]:k},i,A,R,F.mask),style:U.mask},$):$};hXe.setDefaultIndicator=e=>{pXe=e};const zxn=(e,t=!1)=>t&&!Fp(e)?[]:Array.isArray(e)?e:[e],Hxn=e=>{const{prefixCls:t,className:n,closeIcon:r,closable:o,type:i,title:a,children:l,footer:c,...u}=e,{getPrefixCls:d}=p.useContext(Ho),f=d(),h=t||d("modal"),m=Mf(f),[g,b]=_Ke(h,m),y=`${h}-confirm`;let v={};return i?v={closable:o??!1,title:"",footer:"",children:p.createElement(NKe,{...e,prefixCls:h,confirmPrefixCls:y,rootPrefixCls:f,content:l})}:v={closable:o??!0,title:a,footer:c!==null&&p.createElement(xKe,{...e}),children:l},p.createElement(iKe,{prefixCls:h,className:Ae(g,`${h}-pure-panel`,i&&y,i&&`${y}-${i}`,n,b,m),...u,closeIcon:vKe(h,r),closable:o,...v})},Vxn=OKe(Hxn);function mXe(e){return TO(AKe(e))}const py=jKe;py.useModal=Bmn;py.info=function(t){return TO(TKe(t))};py.success=function(t){return TO(kKe(t))};py.error=function(t){return TO(MKe(t))};py.warning=mXe;py.warn=mXe;py.confirm=function(t){return TO(RKe(t))};py.destroyAll=function(){for(;A2.length;){const t=A2.pop();t&&t()}};py.config=Dmn;py._InternalPanelDoNotUseOrYouWillBeFired=Vxn;const Tw={},FO="rc-table-internal-hook";function cpe(e){const t=p.createContext(void 0);return{Context:t,Provider:({value:r,children:o})=>{const i=p.useRef(r);i.current=r;const[a]=p.useState(()=>({getValue:()=>i.current,listeners:new Set}));return ai(()=>{au.unstable_batchedUpdates(()=>{a.listeners.forEach(l=>{l(r)})})},[r]),p.createElement(t.Provider,{value:a},o)},defaultValue:e}}function _d(e,t){const n=Xo(typeof t=="function"?t:c=>{if(t===void 0)return c;if(!Array.isArray(t))return c[t];const u={};return t.forEach(d=>{u[d]=c[d]}),u}),r=p.useContext(e==null?void 0:e.Context),{listeners:o,getValue:i}=r||{},a=p.useRef();a.current=n(r?i():e==null?void 0:e.defaultValue);const[,l]=p.useState({});return ai(()=>{if(!r)return;function c(u){const d=n(u);ey(a.current,d,!0)||l({})}return o.add(c),()=>{o.delete(c)}},[r]),a.current}function M4(){return M4=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const d=a?{ref:u}:{},f=p.useRef(0),h=p.useRef(c);return t()!==null?p.createElement(o,M4({},c,d)):((!i||i(h.current,c))&&(f.current+=1),h.current=c,p.createElement(e.Provider,{value:f.current},p.createElement(o,M4({},c,d))))};return a?p.forwardRef(l):l}function r(o,i){const a=Hb(o),l=(c,u)=>{const d=a?{ref:u}:{};return t(),p.createElement(o,M4({},c,d))};return p.memo(a?p.forwardRef(l):l,i)}return{makeImmutable:n,responseImmutable:r,useImmutableMark:t}}const{makeImmutable:gXe,responseImmutable:aA,useImmutableMark:Gxn}=Uxn(),kf=cpe(),yXe=p.createContext({renderWithProps:!1}),Wxn="RC_TABLE_KEY";function qxn(e){return e==null?[]:Array.isArray(e)?e:[e]}function oU(e){const t=[],n={};return e.forEach(r=>{const{key:o,dataIndex:i}=r||{};let a=o||qxn(i).join("-")||Wxn;for(;n[a];)a=`${a}_next`;n[a]=!0,t.push(a)}),t}function Noe(e){return e!=null}function Kxn(e){return typeof e=="number"&&!Number.isNaN(e)}function Yxn(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!p.isValidElement(e)}function Xxn(e,t,n,r,o,i){const a=p.useContext(yXe),l=Gxn();return Mj(()=>{if(Noe(r))return[r];const u=t==null||t===""?[]:Array.isArray(t)?t:[t],d=rp(e,u);let f=d,h;if(o){const m=o(d,e,n);Yxn(m)?(f=m.children,h=m.props,a.renderWithProps=!0):f=m}return[f,h]},[l,e,r,t,o,n],(u,d)=>{if(i){const[,f]=u,[,h]=d;return i(h,f)}return a.renderWithProps?!0:!ey(u,d,!0)})}function Zxn(e,t,n,r){const o=e+t-1;return e<=r&&o>=n}function Jxn(e,t){return _d(kf,n=>[Zxn(e,t||1,n.hoverStartRow,n.hoverEndRow),n.onHover])}function Eoe(){return Eoe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var i,a;let r;const o=e===!0?{showTitle:!0}:e;return o&&(o.showTitle||t==="header")&&(typeof n=="string"||typeof n=="number"?r=n.toString():p.isValidElement(n)&&typeof((i=n.props)==null?void 0:i.children)=="string"&&(r=(a=n.props)==null?void 0:a.children)),r},e1n=e=>{const{component:t,children:n,ellipsis:r,scope:o,prefixCls:i,className:a,style:l,align:c,record:u,render:d,dataIndex:f,renderIndex:h,shouldCellUpdate:m,index:g,rowType:b,colSpan:y,rowSpan:v,fixStart:x,fixEnd:S,fixedStartShadow:C,fixedEndShadow:_,offsetFixedStartShadow:N,offsetFixedEndShadow:E,zIndex:I,zIndexReverse:A,appendNode:R,additionalProps:k={},isSticky:T}=e,D=`${i}-cell`,{allColumnsFixedLeft:O,rowHoverable:z}=_d(kf,["allColumnsFixedLeft","rowHoverable"]),[F,U]=Xxn(u,f,h,n,d,m),G={},W=typeof x=="number"&&!O,Y=typeof S=="number"&&!O,[B,$]=_d(kf,({scrollInfo:fe})=>{if(!W&&!Y)return[!1,!1];const[te,ye]=fe,ve=(W&&C&&te)-N>=1,ge=(Y&&_&&ye-te)-E>1;return[ve,ge]});W&&(G.insetInlineStart=x,G["--z-offset"]=I,G["--z-offset-reverse"]=A),Y&&(G.insetInlineEnd=S,G["--z-offset"]=I,G["--z-offset-reverse"]=A);const K=(U==null?void 0:U.colSpan)??k.colSpan??y??1,q=(U==null?void 0:U.rowSpan)??k.rowSpan??v??1,[Z,J]=Jxn(g,q),oe=Xo(fe=>{var te;u&&J(g,g+q-1),(te=k==null?void 0:k.onMouseEnter)==null||te.call(k,fe)}),de=Xo(fe=>{var te;u&&J(-1,-1),(te=k==null?void 0:k.onMouseLeave)==null||te.call(k,fe)});if(K===0||q===0)return null;const ae=k.title??Qxn({rowType:b,ellipsis:r,children:F}),ue=Ae(D,a,{[`${D}-fix`]:W||Y,[`${D}-fix-start`]:W,[`${D}-fix-end`]:Y,[`${D}-fix-start-shadow`]:C,[`${D}-fix-start-shadow-show`]:C&&B,[`${D}-fix-end-shadow`]:_,[`${D}-fix-end-shadow-show`]:_&&$,[`${D}-ellipsis`]:r,[`${D}-with-append`]:R,[`${D}-fix-sticky`]:(W||Y)&&T,[`${D}-row-hover`]:!U&&Z},k.className,U==null?void 0:U.className),ce={};c&&(ce.textAlign=c);const se={...U==null?void 0:U.style,...G,...ce,...k.style,...l};let me=F;return typeof me=="object"&&!Array.isArray(me)&&!p.isValidElement(me)&&(me=null),r&&(C||_)&&(me=p.createElement("span",{className:`${D}-content`},me)),p.createElement(t,Eoe({},U,k,{className:ue,style:se,title:ae,scope:o,onMouseEnter:z?oe:void 0,onMouseLeave:z?de:void 0,colSpan:K!==1?K:null,rowSpan:q!==1?q:null}),R,me)},sA=p.memo(e1n);function g6(e){return e.fixed==="start"}function y6(e){return e.fixed==="end"}function upe(e,t,n,r){const o=n[e]||{},i=n[t]||{};let a=null,l=null;g6(o)&&g6(i)?a=r.start[e]:y6(i)&&y6(o)&&(l=r.end[t]);let c=!1,u=!1,d=0,f=0;a!==null&&(c=!n[t+1]||!g6(n[t+1]),d=n.length*2-e,f=n.length+e),l!==null&&(u=!n[e-1]||!y6(n[e-1]),d=t,f=n.length-t);let h=0,m=0;if(c)for(let g=0;gt;g-=1)y6(n[g])||(m+=r.widths[g]||0);return{fixStart:a,fixEnd:l,fixedStartShadow:c,fixedEndShadow:u,offsetFixedStartShadow:h,offsetFixedEndShadow:m,isSticky:r.isSticky,zIndex:d,zIndexReverse:f}}const bXe=p.createContext({});function Poe(){return Poe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:t,index:n,children:r,colSpan:o=1,rowSpan:i,align:a}=e,{prefixCls:l}=_d(kf,["prefixCls"]),{scrollColumnIndex:c,stickyOffsets:u,flattenColumns:d}=p.useContext(bXe),h=n+o-1+1===c?o+1:o,m=p.useMemo(()=>upe(n,n+h-1,d,u),[n,h,d,u]);return p.createElement(sA,Poe({className:t,index:n,component:"td",prefixCls:l,record:null,dataIndex:null,align:a,colSpan:h,rowSpan:i,render:()=>r},m))},n1n=e=>{const{children:t,...n}=e;return p.createElement("tr",n,t)},iU=e=>{const{children:t}=e;return t};iU.Row=n1n;iU.Cell=t1n;const r1n=e=>{const{children:t,stickyOffsets:n,flattenColumns:r}=e,o=_d(kf,"prefixCls"),i=r.length-1,a=r[i],l=p.useMemo(()=>({stickyOffsets:n,flattenColumns:r,scrollColumnIndex:a!=null&&a.scrollbar?i:null}),[a,r,i,n]);return p.createElement(bXe.Provider,{value:l},p.createElement("tfoot",{className:`${o}-summary`},t))},b6=aA(r1n),vXe=iU;function o1n(e){return null}function i1n(e){return null}function xXe(e,t,n,r,o,i,a){const l=i(t,a);e.push({record:t,indent:n,index:a,rowKey:l});const c=o==null?void 0:o.has(l);if(t&&Array.isArray(t[r])&&c)for(let u=0;u{if(n!=null&&n.size){const i=[];for(let a=0;a<(e==null?void 0:e.length);a+=1){const l=e[a];xXe(i,l,0,t,n,r,a)}return i}return e==null?void 0:e.map((i,a)=>({record:i,indent:0,index:a,rowKey:r(i,a)}))},[e,t,n,r])}function SXe(e,t,n,r){const o=_d(kf,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),{flattenColumns:i,expandableType:a,expandedKeys:l,childrenColumnName:c,onTriggerExpand:u,rowExpandable:d,onRow:f,expandRowByClick:h,rowClassName:m}=o,g=a==="nest",b=a==="row"&&(!d||d(e)),y=b||g,v=l&&l.has(t),x=c&&e&&e[c],S=Xo(u),C=f==null?void 0:f(e,n),_=C==null?void 0:C.onClick,N=(A,...R)=>{h&&y&&u(e,A),_==null||_(A,...R)};let E;typeof m=="string"?E=m:typeof m=="function"&&(E=m(e,n,r));const I=oU(i);return{...o,columnsKey:I,nestExpandable:g,expanded:v,hasNestChildren:x,record:e,onTriggerExpand:S,rowSupportExpand:b,expandable:y,rowProps:{...C,className:Ae(E,C==null?void 0:C.className),onClick:N}}}const CXe=e=>{const{prefixCls:t,children:n,component:r,cellComponent:o,className:i,expanded:a,colSpan:l,isEmpty:c,stickyOffset:u=0}=e,{scrollbarSize:d,fixHeader:f,fixColumn:h,componentWidth:m,horizonScroll:g}=_d(kf,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]);let b=n;return(c?g&&m:h)&&(b=p.createElement("div",{style:{width:m-u-(f&&!c?d:0),position:"sticky",left:u,overflow:"hidden"},className:`${t}-expanded-row-fixed`},b)),p.createElement(r,{className:i,style:{display:a?null:"none"}},p.createElement(sA,{component:o,prefixCls:t,colSpan:l},b))};function a1n({prefixCls:e,record:t,onExpand:n,expanded:r,expandable:o}){const i=`${e}-row-expand-icon`;if(!o)return p.createElement("span",{className:Ae(i,`${e}-row-spaced`)});const a=l=>{n(t,l),l.stopPropagation()};return p.createElement("span",{className:Ae(i,{[`${e}-row-expanded`]:r,[`${e}-row-collapsed`]:!r}),onClick:a})}function s1n(e,t,n){const r=[];function o(i){(i||[]).forEach((a,l)=>{r.push(t(a,l)),o(a[n])})}return o(e),r}function _Xe(e,t,n,r){return typeof e=="string"?e:typeof e=="function"?e(t,n,r):""}function fz(){return fz=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:t,style:n,classNames:r,styles:o,record:i,index:a,renderIndex:l,rowKey:c,rowKeys:u,indent:d=0,rowComponent:f,cellComponent:h,scopeCellComponent:m,expandedRowInfo:g}=e,b=SXe(i,c,a,d),{prefixCls:y,flattenColumns:v,expandedRowClassName:x,expandedRowRender:S,rowProps:C,expanded:_,rowSupportExpand:N}=b,E=p.useRef(!1);E.current||(E.current=_);const I=_Xe(x,i,a,d),A=p.createElement(f,fz({},C,{"data-row-key":c,className:Ae(t,`${y}-row`,`${y}-row-level-${d}`,C==null?void 0:C.className,r.row,{[I]:d>=1}),style:{...n,...C==null?void 0:C.style,...o.row}}),v.map((k,T)=>{const{render:D,dataIndex:O,className:z}=k,{key:F,fixedInfo:U,appendCellNode:G,additionalCellProps:W}=jXe(b,k,T,d,a,u,g==null?void 0:g.offset);return p.createElement(sA,fz({className:Ae(z,r.cell),style:o.cell,ellipsis:k.ellipsis,align:k.align,scope:k.rowScope,component:k.rowScope?m:h,prefixCls:y,key:F,record:i,index:a,renderIndex:l,dataIndex:O,render:D,shouldCellUpdate:k.shouldCellUpdate},U,{appendNode:G,additionalProps:W}))}));let R;if(N&&(E.current||_)){const k=S(i,a,d+1,_);R=p.createElement(CXe,{expanded:_,className:Ae(`${y}-expanded-row`,`${y}-expanded-row-level-${d+1}`,I),prefixCls:y,component:f,cellComponent:h,colSpan:g?g.colSpan:v.length,isEmpty:!1,stickyOffset:g==null?void 0:g.sticky},k)}return p.createElement(p.Fragment,null,A,R)},c1n=aA(l1n),u1n=e=>{const{columnKey:t,onColumnResize:n,title:r}=e,o=p.useRef(null);return ai(()=>{o.current&&n(t,o.current.offsetWidth)},[]),p.createElement(Wg,{data:t},p.createElement("td",{ref:o,style:{paddingTop:0,paddingBottom:0,borderTop:0,borderBottom:0,height:0}},p.createElement("div",{style:{height:0,overflow:"hidden",fontWeight:"bold"}},r||" ")))},d1n=({prefixCls:e,columnsKey:t,onColumnResize:n,columns:r})=>{const o=p.useRef(null),{measureRowRender:i}=_d(kf,["measureRowRender"]),a=p.createElement("tr",{"aria-hidden":"true",className:`${e}-measure-row`,style:{height:0},ref:o},p.createElement(Wg.Collection,{onBatchResize:l=>{jO(o.current)&&l.forEach(({data:c,size:u})=>{n(c,u.offsetWidth)})}},t.map(l=>{const c=r.find(f=>f.key===l),u=c==null?void 0:c.title,d=p.isValidElement(u)?p.cloneElement(u,{ref:null}):u;return p.createElement(u1n,{key:l,columnKey:l,onColumnResize:n,title:d})})));return typeof i=="function"?i(a):a},f1n=e=>{const{data:t,measureColumnWidth:n}=e,{prefixCls:r,getComponent:o,onColumnResize:i,flattenColumns:a,getRowKey:l,expandedKeys:c,childrenColumnName:u,emptyNode:d,classNames:f,styles:h,expandedRowOffset:m=0,colWidths:g}=_d(kf,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","classNames","styles","expandedRowOffset","fixedInfoList","colWidths"]),{body:b={}}=f||{},{body:y={}}=h||{},v=wXe(t,u,c,l),x=p.useMemo(()=>v.map(k=>k.rowKey),[v]),S=p.useRef({renderWithProps:!1}),C=p.useMemo(()=>{const k=a.length-m;let T=0;for(let D=0;D{const{record:D,indent:O,index:z,rowKey:F}=k;return p.createElement(c1n,{classNames:b,styles:y,key:F,rowKey:F,rowKeys:x,record:D,index:T,renderIndex:z,rowComponent:N,cellComponent:E,scopeCellComponent:I,indent:O,expandedRowInfo:C})}):A=p.createElement(CXe,{expanded:!0,className:`${r}-placeholder`,prefixCls:r,component:N,cellComponent:E,colSpan:a.length,isEmpty:!0},d);const R=oU(a);return p.createElement(yXe.Provider,{value:S.current},p.createElement(_,{style:y.wrapper,className:Ae(`${r}-tbody`,b.wrapper)},n&&p.createElement(d1n,{prefixCls:r,columnsKey:R,onColumnResize:i,columns:a}),A))},p1n=aA(f1n),R4="RC_TABLE_INTERNAL_COL_DEFINE";function h1n(e){const{expandable:t,...n}=e;let r;return"expandable"in e?r={...n,...t}:r=n,r.showExpandColumn===!1&&(r.expandIconColumnIndex=-1),r}function Ioe(){return Ioe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{colWidths:t,columns:n,columCount:r}=e,{tableLayout:o}=_d(kf,["tableLayout"]),i=[],a=r||n.length;let l=!1;for(let c=a-1;c>=0;c-=1){const u=t[c],d=n&&n[c];let f,h;if(d&&(f=d[R4],o==="auto"&&(h=d.minWidth)),u||h||f||l){const{columnType:m,...g}=f||{};i.unshift(p.createElement("col",Ioe({key:c,style:{width:u,minWidth:h}},g))),l=!0}}return i.length>0?p.createElement("colgroup",null,i):null};function m1n(e,t){return p.useMemo(()=>{const n=[];for(let r=0;r{const{className:n,style:r,noData:o,columns:i,flattenColumns:a,colWidths:l,colGroup:c,columCount:u,stickyOffsets:d,direction:f,fixHeader:h,stickyTopOffset:m,stickyBottomOffset:g,stickyClassName:b,scrollX:y,tableLayout:v="fixed",onScroll:x,maxContentScroll:S,children:C,..._}=e,{prefixCls:N,scrollbarSize:E,isSticky:I,getComponent:A}=_d(kf,["prefixCls","scrollbarSize","isSticky","getComponent"]),R=A(["header","table"],"table"),k=I&&!h?0:E,T=p.useRef(null),D=p.useCallback(B=>{gne(t,B),gne(T,B)},[]);p.useEffect(()=>{function B(K){const{currentTarget:q,deltaX:Z}=K;if(Z){const{scrollLeft:J,scrollWidth:oe,clientWidth:de}=q,ae=oe-de;let ue=J+Z;f==="rtl"?(ue=Math.max(-ae,ue),ue=Math.min(0,ue)):(ue=Math.min(ae,ue),ue=Math.max(0,ue)),x({currentTarget:q,scrollLeft:ue}),K.preventDefault()}}const $=T.current;return $==null||$.addEventListener("wheel",B,{passive:!1}),()=>{$==null||$.removeEventListener("wheel",B)}},[]);const O=a[a.length-1],z={fixed:O?O.fixed:null,scrollbar:!0,onHeaderCell:()=>({className:`${N}-cell-scrollbar`})},F=p.useMemo(()=>k?[...i,z]:i,[k,i]),U=p.useMemo(()=>k?[...a,z]:a,[k,a]),G=p.useMemo(()=>{const{start:B,end:$}=d;return{...d,start:B,end:[...$.map(K=>K+k),0],isSticky:I}},[k,d,I]),W=m1n(l,u),Y=p.useMemo(()=>{const B=!W||!W.length||W.every($=>!$);return o||B},[o,W]);return p.createElement("div",{style:{overflow:"hidden",...I?{top:m,bottom:g}:{},...r},ref:D,className:Ae(n,{[b]:!!b})},p.createElement(R,{style:{tableLayout:v,minWidth:"100%",width:y}},Y?c:p.createElement(NXe,{colWidths:[...W,k],columCount:u+1,columns:U}),C({..._,stickyOffsets:G,columns:F,flattenColumns:U})))}),BPe=p.memo(g1n);function pz(){return pz=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{cells:t,stickyOffsets:n,flattenColumns:r,rowComponent:o,cellComponent:i,onHeaderRow:a,index:l,classNames:c,styles:u}=e,{prefixCls:d}=_d(kf,["prefixCls"]);let f;a&&(f=a(t.map(m=>m.column),l));const h=oU(t.map(m=>m.column));return p.createElement(o,pz({},f,{className:c.row,style:u.row}),t.map((m,g)=>{var _;const{column:b,colStart:y,colEnd:v,colSpan:x}=m,S=upe(y,v,r,n),C=((_=b==null?void 0:b.onHeaderCell)==null?void 0:_.call(b,b))||{};return p.createElement(sA,pz({},m,{scope:b.title?x>1?"colgroup":"col":null,ellipsis:b.ellipsis,align:b.align,component:i,prefixCls:d,key:h[g]},S,{additionalProps:C,rowType:"header"}))}))};function b1n(e,t,n){const r=[];function o(a,l,c=0){r[c]=r[c]||[];let u=l;return a.filter(Boolean).map(f=>{const h={key:f.key,className:Ae(f.className,t.cell)||"",style:n.cell,children:f.title,column:f,colStart:u};let m=1;const g=f.children;return g&&g.length>0&&(m=o(g,u,c+1).reduce((b,y)=>b+y,0),h.hasSubColumns=!0),"colSpan"in f&&({colSpan:m}=f),"rowSpan"in f&&(h.rowSpan=f.rowSpan),h.colSpan=m,h.colEnd=h.colStart+m-1,r[c].push(h),u+=m,m})}o(e,0);const i=r.length;for(let a=0;a{!("rowSpan"in l)&&!l.hasSubColumns&&(l.rowSpan=i-a)});return r}const v1n=e=>{const{stickyOffsets:t,columns:n,flattenColumns:r,onHeaderRow:o}=e,{prefixCls:i,getComponent:a,classNames:l,styles:c}=_d(kf,["prefixCls","getComponent","classNames","styles"]),{header:u={}}=l||{},{header:d={}}=c||{},f=p.useMemo(()=>b1n(n,u,d),[n,u,d]),h=a(["header","wrapper"],"thead"),m=a(["header","row"],"tr"),g=a(["header","cell"],"th");return p.createElement(h,{className:Ae(`${i}-thead`,u.wrapper),style:d.wrapper},f.map((b,y)=>p.createElement(y1n,{classNames:u,styles:d,key:y,flattenColumns:r,cells:b,stickyOffsets:t,rowComponent:m,cellComponent:g,onHeaderRow:o,index:y})))},zPe=aA(v1n);function HPe(e,t=""){return typeof t=="number"?t:t.endsWith("%")?e*parseFloat(t)/100:null}function x1n(e,t,n){return p.useMemo(()=>{if(t&&t>0){let r=0,o=0;e.forEach(f=>{const h=HPe(t,f.width);h?r+=h:o+=1});const i=Math.max(t,n);let a=Math.max(i-r,o),l=o;const c=a/o;let u=0;const d=e.map(f=>{const h={...f},m=HPe(t,h.width);if(m)h.width=m;else{const g=Math.floor(c);h.width=l===1?a:g,a-=g,l-=1}return u+=h.width,h});if(u{const g=Math.floor(h.width*f);h.width=m===d.length-1?a:g,a-=g})}return[d,Math.max(u,i)]}return[e,t]},[e,t,n])}function dpe(e){return $p(e).filter(t=>p.isValidElement(t)).map(t=>{const{key:n,props:r}=t,{children:o,...i}=r,a={key:n,...i};return o&&(a.children=dpe(o)),a})}function EXe(e){return e.filter(t=>t&&typeof t=="object"&&!t.hidden).map(t=>{const n=t.children;return n&&n.length>0?{...t,children:EXe(n)}:t})}function PXe(e,t="key"){return e.filter(n=>n&&typeof n=="object").reduce((n,r,o)=>{const{fixed:i}=r,a=i===!0||i==="left"?"start":i==="right"?"end":i,l=`${t}-${o}`,c=r.children;return c&&c.length>0?[...n,...PXe(c,l).map(u=>({...u,fixed:u.fixed??a}))]:[...n,{key:l,...r,fixed:a}]},[])}function w1n({prefixCls:e,columns:t,children:n,expandable:r,expandedKeys:o,columnTitle:i,getRowKey:a,onTriggerExpand:l,expandIcon:c,rowExpandable:u,expandIconColumnIndex:d,expandedRowOffset:f=0,direction:h,expandRowByClick:m,columnWidth:g,fixed:b,scrollWidth:y,clientWidth:v},x){const S=p.useMemo(()=>{const A=t||dpe(n)||[];return EXe(A.slice())},[t,n]),C=p.useMemo(()=>{if(r){let A=S.slice();if(!A.includes(Tw)){const O=d||0,z=O===0&&(b==="right"||b==="end")?S.length:O;z>=0&&A.splice(z,0,Tw)}const R=A.indexOf(Tw);A=A.filter((O,z)=>O!==Tw||z===R);const k=S[R];let T;b?T=b:T=k?k.fixed:null;const D={[R4]:{className:`${e}-expand-icon-col`,columnType:"EXPAND_COLUMN"},title:i,fixed:T,className:`${e}-row-expand-icon-cell`,width:g,render:(O,z,F)=>{const U=a(z,F),G=o.has(U),W=u?u(z):!0,Y=c({prefixCls:e,expanded:G,expandable:W,record:z,onExpand:l});return m?p.createElement("span",{onClick:B=>B.stopPropagation()},Y):Y}};return A.map((O,z)=>{const F=O===Tw?D:O;return zA!==Tw)},[r,S,a,o,c,h,f]),_=p.useMemo(()=>{let A=C;return x&&(A=x(A)),A.length||(A=[{render:()=>null}]),A},[x,C,h]),N=p.useMemo(()=>PXe(_),[_,h,y]),[E,I]=x1n(N,y,v);return[_,E,I]}function S1n(e,t,n){const r=h1n(e),{expandIcon:o,expandedRowKeys:i,defaultExpandedRowKeys:a,defaultExpandAllRows:l,expandedRowRender:c,onExpand:u,onExpandedRowsChange:d,childrenColumnName:f}=r,h=o||a1n,m=f||"children",g=p.useMemo(()=>c?"row":e.expandable&&e.internalHooks===FO&&e.expandable.__PARENT_RENDER_ICON__||t.some(S=>S&&typeof S=="object"&&S[m])?"nest":!1,[!!c,t]),[b,y]=p.useState(()=>a||(l?s1n(t,n,m):[])),v=p.useMemo(()=>new Set(i||b||[]),[i,b]),x=p.useCallback(S=>{const C=n(S,t.indexOf(S));let _;const N=v.has(C);N?(v.delete(C),_=[...v]):_=[...v,C],y(_),u&&u(!N,S),d&&d(_)},[n,v,t,u,d]);return[r,g,v,h,m,x]}function C1n(e,t){const n=p.useMemo(()=>e.map((r,o)=>upe(o,o,e,t)),[e,t]);return Mj(()=>n,[n],(r,o)=>!ey(r,o))}function _1n(e){const t=p.useRef(e),[,n]=p.useState({}),r=p.useRef(null),o=p.useRef([]);function i(a){o.current.push(a);const l=Promise.resolve();r.current=l,l.then(()=>{if(r.current===l){const c=o.current,u=t.current;o.current=[],c.forEach(d=>{t.current=d(t.current)}),r.current=null,u!==t.current&&n({})}})}return p.useEffect(()=>()=>{r.current=null},[]),[t.current,i]}function j1n(e){const t=p.useRef(null),n=p.useRef(null);function r(){clearTimeout(n.current)}function o(a){t.current=a,r(),n.current=setTimeout(()=>{t.current=null,n.current=void 0},100)}function i(){return t.current}return p.useEffect(()=>r,[]),[o,i]}function N1n(){const[e,t]=p.useState(-1),[n,r]=p.useState(-1),o=p.useCallback((i,a)=>{t(i),r(a)},[]);return[e,n,o]}const VPe=Lp()?window:null;function E1n(e,t){const{offsetHeader:n=0,offsetSummary:r=0,offsetScroll:o=0,getContainer:i=()=>VPe}=typeof e=="object"?e:{},a=i()||VPe,l=!!e;return p.useMemo(()=>({isSticky:l,stickyClassName:l?`${t}-sticky-holder`:"",offsetHeader:n,offsetSummary:r,offsetScroll:o,container:a}),[l,o,n,r,t,a])}function P1n(e,t){return p.useMemo(()=>{const r=t.length,o=(l,c,u)=>{const d=[];let f=0;for(let h=l;h!==c;h+=u)d.push(f),t[h].fixed&&(f+=e[h]||0);return d},i=o(0,r,1),a=o(r-1,-1,-1).reverse();return{start:i,end:a,widths:e}},[e,t])}const UPe=e=>{const{children:t,className:n,style:r}=e;return p.createElement("div",{className:n,style:r},t)};function GPe(e){const n=Wx(e).getBoundingClientRect(),r=document.documentElement;return{left:n.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||document.body.clientLeft||0),top:n.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||document.body.clientTop||0)}}const WPe="mouseup",qPe="mousemove",nE="scroll",KPe="resize",I1n=(e,t)=>{var E,I;const{scrollBodyRef:n,onScroll:r,offsetScroll:o,container:i,direction:a}=e,l=_d(kf,"prefixCls"),c=((E=n.current)==null?void 0:E.scrollWidth)||0,u=((I=n.current)==null?void 0:I.clientWidth)||0,d=c&&u*(u/c),f=p.useRef(null),[h,m]=_1n({scrollLeft:0,isHiddenScrollBar:!0}),g=p.useRef({delta:0,x:0}),[b,y]=p.useState(!1),v=p.useRef(null);p.useEffect(()=>()=>{Ri.cancel(v.current)},[]);const x=()=>{y(!1)},S=A=>{A.persist(),g.current.delta=A.pageX-h.scrollLeft,g.current.x=0,y(!0),A.preventDefault()},C=A=>{const{buttons:R}=A||(window==null?void 0:window.event);if(!b||R===0){b&&y(!1);return}let k=g.current.x+A.pageX-g.current.x-g.current.delta;const T=a==="rtl";k=Math.max(T?d-u:0,Math.min(T?0:u-d,k)),(!T||Math.abs(k)+Math.abs(d){Ri.cancel(v.current),v.current=Ri(()=>{if(!n.current)return;const A=GPe(n.current).top,R=A+n.current.offsetHeight,k=i===window?document.documentElement.scrollTop+window.innerHeight:GPe(i).top+i.clientHeight;R-u5e()<=k||A>=k-o?m(T=>({...T,isHiddenScrollBar:!0})):m(T=>({...T,isHiddenScrollBar:!1}))})},N=A=>{m(R=>({...R,scrollLeft:A/c*u||0}))};return p.useImperativeHandle(t,()=>({setScrollLeft:N,checkScrollBarVisible:_})),p.useEffect(()=>(document.body.addEventListener(WPe,x,!1),document.body.addEventListener(qPe,C,!1),_(),()=>{document.body.removeEventListener(WPe,x),document.body.removeEventListener(qPe,C)}),[d,b]),p.useEffect(()=>{if(n.current){const A=[];let R=Wx(n.current);for(;R;)A.push(R),R=R.parentElement;return A.forEach(k=>{k.addEventListener(nE,_,!1)}),window.addEventListener(KPe,_,!1),window.addEventListener(nE,_,!1),i.addEventListener(nE,_,!1),()=>{A.forEach(k=>{k.removeEventListener(nE,_)}),window.removeEventListener(KPe,_),window.removeEventListener(nE,_),i.removeEventListener(nE,_)}}},[i]),p.useEffect(()=>{h.isHiddenScrollBar||m(A=>{const R=n.current;return R?{...A,scrollLeft:R.scrollLeft/R.scrollWidth*R.clientWidth}:A})},[h.isHiddenScrollBar]),c<=u||!d||h.isHiddenScrollBar?null:p.createElement("div",{style:{height:u5e(),width:u,bottom:o},className:`${l}-sticky-scroll`},p.createElement("div",{onMouseDown:S,ref:f,className:Ae(`${l}-sticky-scroll-bar`,{[`${l}-sticky-scroll-bar-active`]:b}),style:{width:`${d}px`,transform:`translate3d(${h.scrollLeft}px, 0, 0)`}}))},A1n=p.forwardRef(I1n);function kw(){return kw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var xt,Vt;const n={rowKey:"key",prefixCls:IXe,emptyText:M1n,...e},{prefixCls:r,className:o,rowClassName:i,style:a,classNames:l,styles:c,data:u,rowKey:d,scroll:f,tableLayout:h,direction:m,title:g,footer:b,summary:y,caption:v,id:x,showHeader:S,components:C,emptyText:_,onRow:N,onHeaderRow:E,measureRowRender:I,onScroll:A,internalHooks:R,transformColumns:k,internalRefs:T,tailor:D,getContainerWidth:O,sticky:z,rowHoverable:F=!0}=n,U=u||T1n,G=!!U.length,W=R===FO,Y=p.useCallback((bt,Lt)=>rp(C,bt)||Lt,[C]),B=p.useMemo(()=>typeof d=="function"?d:bt=>bt&&bt[d],[d]),$=Y(["body"]),[K,q,Z]=N1n(),[J,oe,de,ae,ue,ce]=S1n(n,U,B),se=f==null?void 0:f.x,[me,fe]=p.useState(0),[te,ye,ve]=w1n({...n,...J,expandable:!!J.expandedRowRender,columnTitle:J.columnTitle,expandedKeys:de,getRowKey:B,onTriggerExpand:ce,expandIcon:ae,expandIconColumnIndex:J.expandIconColumnIndex,direction:m,scrollWidth:W&&D&&typeof se=="number"?se:null,clientWidth:me},W?k:null),ge=ve??se,Ee=p.useMemo(()=>({columns:te,flattenColumns:ye}),[te,ye]),xe=p.useRef(null),Ne=p.useRef(null),_e=p.useRef(null),Be=p.useRef(null);p.useImperativeHandle(t,()=>({nativeElement:xe.current,scrollTo:bt=>{var Lt,Jt;if(_e.current instanceof HTMLElement){const{index:bn,top:ar,key:Tr,offset:rr}=bt;if(Kxn(ar))(Lt=_e.current)==null||Lt.scrollTo({top:ar});else{const lr=Tr??B(U[bn]),dn=_e.current.querySelector(`[data-row-key="${lr}"]`);if(dn)if(!rr)dn.scrollIntoView();else{const gr=dn.offsetTop;_e.current.scrollTo({top:gr+rr})}}}else(Jt=_e.current)!=null&&Jt.scrollTo&&_e.current.scrollTo(bt)}}));const Te=p.useRef(null),[Ge,Ze]=p.useState(!1),[ht,Oe]=p.useState(!1),[ft,Qe]=p.useState(new Map),st=oU(ye).map(bt=>ft.get(bt)),vt=p.useMemo(()=>st,[st.join("_")]),qe=P1n(vt,ye),Ye=f&&Noe(f.y),mt=f&&Noe(ge)||!!J.fixed,Et=mt&&ye.some(({fixed:bt})=>bt),vn=p.useRef(null),{isSticky:gt,offsetHeader:Fe,offsetSummary:$e,offsetScroll:nt,stickyClassName:wt,container:Dt}=E1n(z,r),on=p.useMemo(()=>y==null?void 0:y(U),[y,U]),jn=(Ye||gt)&&p.isValidElement(on)&&on.type===iU&&on.props.fixed;let kt,pn,tt;Ye&&(pn={overflowY:G?"scroll":"auto",maxHeight:f.y}),mt&&(kt={overflowX:"auto"},Ye||(pn={overflowY:"hidden"}),tt={width:ge===!0?"auto":ge,minWidth:"100%"});const jt=p.useCallback((bt,Lt)=>{Qe(Jt=>{if(Jt.get(bt)!==Lt){const bn=new Map(Jt);return bn.set(bt,Lt),bn}return Jt})},[]),[Nn,Xt]=j1n();function ln(bt,Lt){Lt&&(typeof Lt=="function"?Lt(bt):Lt.scrollLeft!==bt&&(Lt.scrollLeft=bt,Lt.scrollLeft!==bt&&setTimeout(()=>{Lt.scrollLeft=bt},0)))}const[un,Kt]=p.useState([0,0]),On=Xo(({currentTarget:bt,scrollLeft:Lt})=>{var Tr;const Jt=typeof Lt=="number"?Lt:bt.scrollLeft,bn=bt||k1n;(!Xt()||Xt()===bn)&&(Nn(bn),ln(Jt,Ne.current),ln(Jt,_e.current),ln(Jt,Te.current),ln(Jt,(Tr=vn.current)==null?void 0:Tr.setScrollLeft));const ar=bt||Ne.current;if(ar){const rr=W&&D&&typeof ge=="number"?ge:ar.scrollWidth,lr=ar.clientWidth,dn=Math.abs(Jt);if(Kt(gr=>{const vr=[dn,rr-lr];return ey(gr,vr)?gr:vr}),rr===lr){Ze(!1),Oe(!1);return}Ze(dn>0),Oe(dn{On(bt),A==null||A(bt)}),ur=()=>{var bt;mt&&_e.current?On({currentTarget:Wx(_e.current),scrollLeft:(bt=_e.current)==null?void 0:bt.scrollLeft}):(Ze(!1),Oe(!1))},Ht=bt=>{var Jt,bn;(Jt=vn.current)==null||Jt.checkScrollBarVisible();let Lt=bt??((bn=xe.current)==null?void 0:bn.offsetWidth)??0;W&&O&&xe.current&&(Lt=O(xe.current,Lt)||Lt),Lt!==me&&(ur(),fe(Lt))};ai(()=>{mt&&Ht()},[mt]);const Tt=p.useRef(!1);p.useEffect(()=>{Tt.current&&ur()},[mt,u,te.length]),p.useEffect(()=>{Tt.current=!0},[]);const[Zt,Ut]=p.useState(0);ai(()=>{(!D||!W)&&(_e.current instanceof Element?Ut(ore(_e.current).width):Ut(ore(Be.current).width))},[]),p.useEffect(()=>{W&&T&&(T.body.current=_e.current)});const Sn=p.useCallback(bt=>p.createElement(p.Fragment,null,p.createElement(zPe,bt),jn==="top"&&p.createElement(b6,bt,on)),[jn,on]),Mn=p.useCallback(bt=>p.createElement(b6,bt,on),[on]),lt=Y(["table"],"table"),Xe=p.useMemo(()=>h||(Et?ge==="max-content"?"auto":"fixed":Ye||gt||ye.some(({ellipsis:bt})=>bt)?"fixed":"auto"),[Ye,Et,ye,h,gt]);let yt;const Mt={colWidths:vt,columCount:ye.length,stickyOffsets:qe,onHeaderRow:E,fixHeader:Ye,scroll:f},tn=p.useMemo(()=>G?null:typeof _=="function"?_():_,[G,_]),mn=p.createElement(p1n,{data:U,measureColumnWidth:Ye||mt||gt}),Tn=p.createElement(NXe,{colWidths:ye.map(({width:bt})=>bt),columns:ye}),Fn=v!=null?p.createElement("caption",{className:`${r}-caption`},v):void 0,mr=Mh(n,{data:!0}),fr=Mh(n,{aria:!0});if(Ye||gt){let bt;typeof $=="function"?(bt=$(U,{scrollbarSize:Zt,ref:_e,onScroll:On}),Mt.colWidths=ye.map(({width:Jt},bn)=>{const ar=bn===ye.length-1?Jt-Zt:Jt;return typeof ar=="number"&&!Number.isNaN(ar)?ar:0})):bt=p.createElement("div",{style:{...kt,...pn},onScroll:Pr,ref:_e,className:`${r}-body`},p.createElement(lt,kw({style:{...tt,tableLayout:Xe}},fr),Fn,Tn,mn,!jn&&on&&p.createElement(b6,{stickyOffsets:qe,flattenColumns:ye},on)));const Lt={noData:!U.length,maxContentScroll:mt&&ge==="max-content",...Mt,...Ee,direction:m,stickyClassName:wt,scrollX:ge,tableLayout:Xe,onScroll:On};yt=p.createElement(p.Fragment,null,S!==!1&&p.createElement(BPe,kw({},Lt,{stickyTopOffset:Fe,className:`${r}-header`,ref:Ne,colGroup:Tn}),Sn),bt,jn&&jn!=="top"&&p.createElement(BPe,kw({},Lt,{stickyBottomOffset:$e,className:`${r}-summary`,ref:Te,colGroup:Tn}),Mn),gt&&_e.current&&_e.current instanceof Element&&p.createElement(A1n,{ref:vn,offsetScroll:nt,scrollBodyRef:_e,onScroll:On,container:Dt,direction:m}))}else yt=p.createElement("div",{style:{...kt,...pn,...c==null?void 0:c.content},className:Ae(`${r}-content`,l==null?void 0:l.content),onScroll:On,ref:_e},p.createElement(lt,kw({style:{...tt,tableLayout:Xe}},fr),Fn,Tn,S!==!1&&p.createElement(zPe,kw({},Mt,Ee)),mn,on&&p.createElement(b6,{stickyOffsets:qe,flattenColumns:ye},on)));const En={...a};gt&&(En["--columns-count"]=ye.length);let Me=p.createElement("div",kw({className:Ae(r,o,{[`${r}-rtl`]:m==="rtl",[`${r}-fix-start-shadow`]:mt,[`${r}-fix-end-shadow`]:mt,[`${r}-fix-start-shadow-show`]:mt&&Ge,[`${r}-fix-end-shadow-show`]:mt&&ht,[`${r}-layout-fixed`]:h==="fixed",[`${r}-fixed-header`]:Ye,[`${r}-fixed-column`]:Et,[`${r}-scroll-horizontal`]:mt,[`${r}-has-fix-start`]:(xt=ye[0])==null?void 0:xt.fixed,[`${r}-has-fix-end`]:((Vt=ye[ye.length-1])==null?void 0:Vt.fixed)==="end"}),style:En,id:x,ref:xe},mr),g&&p.createElement(UPe,{className:Ae(`${r}-title`,l==null?void 0:l.title),style:c==null?void 0:c.title},g(U)),p.createElement("div",{ref:Be,className:Ae(`${r}-container`,l==null?void 0:l.section),style:c==null?void 0:c.section},yt),b&&p.createElement(UPe,{className:Ae(`${r}-footer`,l==null?void 0:l.footer),style:c==null?void 0:c.footer},b(U)));mt&&(Me=p.createElement(Wg,{onResize:({offsetWidth:bt})=>Ht(bt)},Me));const Ie=C1n(ye,qe),et=p.useMemo(()=>({scrollX:ge,scrollInfo:un,classNames:l,styles:c,prefixCls:r,getComponent:Y,scrollbarSize:Zt,direction:m,fixedInfoList:Ie,isSticky:gt,componentWidth:me,fixHeader:Ye,fixColumn:Et,horizonScroll:mt,tableLayout:Xe,rowClassName:i,expandedRowClassName:J.expandedRowClassName,expandIcon:ae,expandableType:oe,expandRowByClick:J.expandRowByClick,expandedRowRender:J.expandedRowRender,expandedRowOffset:J.expandedRowOffset,onTriggerExpand:ce,expandIconColumnIndex:J.expandIconColumnIndex,indentSize:J.indentSize,allColumnsFixedLeft:ye.every(bt=>bt.fixed==="start"),emptyNode:tn,columns:te,flattenColumns:ye,onColumnResize:jt,colWidths:vt,hoverStartRow:K,hoverEndRow:q,onHover:Z,rowExpandable:J.rowExpandable,onRow:N,getRowKey:B,expandedKeys:de,childrenColumnName:ue,rowHoverable:F,measureRowRender:I}),[ge,un,l,c,r,Y,Zt,m,Ie,gt,me,Ye,Et,mt,Xe,i,J.expandedRowClassName,ae,oe,J.expandRowByClick,J.expandedRowRender,J.expandedRowOffset,ce,J.expandIconColumnIndex,J.indentSize,tn,te,ye,jt,vt,K,q,Z,J.rowExpandable,N,B,de,ue,F,I]);return p.createElement(kf.Provider,{value:et},Me)},O1n=p.forwardRef(R1n),AXe=e=>gXe(O1n,e),lA=AXe();lA.EXPAND_COLUMN=Tw;lA.INTERNAL_HOOKS=FO;lA.Column=o1n;lA.ColumnGroup=i1n;lA.Summary=vXe;const fpe=cpe(null),TXe=cpe(null);function Aoe(){return Aoe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{rowInfo:t,column:n,colIndex:r,indent:o,index:i,component:a,renderIndex:l,record:c,style:u,className:d,inverse:f,getHeight:h}=e,{render:m,dataIndex:g,className:b,width:y}=n,{columnsOffset:v}=_d(TXe,["columnsOffset"]),{key:x,fixedInfo:S,appendCellNode:C,additionalCellProps:_}=jXe(t,n,r,o,i),{style:N,colSpan:E=1,rowSpan:I=1}=_,A=r-1,R=D1n(A,E,v),k=E>1?y-R:0,T={...N,...u,flex:`0 0 ${R}px`,width:`${R}px`,marginRight:k,pointerEvents:"auto"},D=p.useMemo(()=>f?I<=1:E===0||I===0||I>1,[I,E,f]);D?T.visibility="hidden":f&&(T.height=h==null?void 0:h(I));const O=D?()=>null:m,z={};return(I===0||E===0)&&(z.rowSpan=1,z.colSpan=1),p.createElement(sA,Aoe({className:Ae(b,d),ellipsis:n.ellipsis,align:n.align,scope:n.rowScope,component:a,prefixCls:t.prefixCls,key:x,record:c,index:i,renderIndex:l,dataIndex:g,render:O,shouldCellUpdate:n.shouldCellUpdate},S,{appendNode:C,additionalProps:{..._,style:T,...z}}))};function Toe(){return Toe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{data:n,index:r,className:o,rowKey:i,style:a,extra:l,getHeight:c,...u}=e,{record:d,indent:f,index:h}=n,{scrollX:m,flattenColumns:g,prefixCls:b,fixColumn:y,componentWidth:v}=_d(kf,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),{getComponent:x}=_d(fpe,["getComponent"]),S=SXe(d,i,r,f),C=x(["body","row"],"div"),_=x(["body","cell"],"div"),{rowSupportExpand:N,expanded:E,rowProps:I,expandedRowRender:A,expandedRowClassName:R}=S;let k;if(N&&E){const O=A(d,r,f+1,E),z=_Xe(R,d,r,f);let F={};y&&(F={style:{"--virtual-width":`${v}px`}});const U=`${b}-expanded-row-cell`;k=p.createElement(C,{className:Ae(`${b}-expanded-row`,`${b}-expanded-row-level-${f+1}`,z)},p.createElement(sA,{component:_,prefixCls:b,className:Ae(U,{[`${U}-fixed`]:y}),additionalProps:F},O))}const T={...a,width:m};l&&(T.position="absolute",T.pointerEvents="none");const D=p.createElement(C,Toe({},I,u,{"data-row-key":i,ref:N?null:t,className:Ae(o,`${b}-row`,I==null?void 0:I.className,{[`${b}-row-extra`]:l}),style:{...T,...I==null?void 0:I.style}}),g.map((O,z)=>p.createElement(L1n,{key:z,component:_,rowInfo:S,column:O,colIndex:z,indent:f,index:r,renderIndex:h,record:d,inverse:l,getHeight:c})));return N?p.createElement("div",{ref:t},D,k):D}),YPe=aA($1n),F1n=p.forwardRef((e,t)=>{const{data:n,onScroll:r}=e,{flattenColumns:o,onColumnResize:i,getRowKey:a,expandedKeys:l,prefixCls:c,childrenColumnName:u,scrollX:d,direction:f}=_d(kf,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),{sticky:h,scrollY:m,listItemHeight:g,getComponent:b,onScroll:y}=_d(fpe),v=p.useRef(null),x=wXe(n,u,l,a),S=p.useMemo(()=>{let k=0;return o.map(({width:T,minWidth:D,key:O})=>{const z=Math.max(T||0,D||0);return k+=z,[O,z,k]})},[o]),C=p.useMemo(()=>S.map(k=>k[2]),[S]);p.useEffect(()=>{S.forEach(([k,T])=>{i(k,T)})},[S]),p.useImperativeHandle(t,()=>{var T;const k={scrollTo:D=>{var F,U;const{offset:O,...z}=D;O?(F=v.current)==null||F.scrollTo({...z,offset:O,align:"top"}):(U=v.current)==null||U.scrollTo(D)},nativeElement:(T=v.current)==null?void 0:T.nativeElement};return Object.defineProperty(k,"scrollLeft",{get:()=>{var D;return((D=v.current)==null?void 0:D.getScrollInfo().x)||0},set:D=>{var O;(O=v.current)==null||O.scrollTo({left:D})}}),Object.defineProperty(k,"scrollTop",{get:()=>{var D;return((D=v.current)==null?void 0:D.getScrollInfo().y)||0},set:D=>{var O;(O=v.current)==null||O.scrollTo({top:D})}}),k});const _=(k,T)=>{var z;const D=(z=x[T])==null?void 0:z.record,{onCell:O}=k;if(O){const F=O(D,T);return(F==null?void 0:F.rowSpan)??1}return 1},N=k=>{const{start:T,end:D,getSize:O,offsetY:z}=k;if(D<0)return null;let F=o.filter($=>_($,T)===0),U=T;for(let $=T;$>=0;$-=1)if(F=F.filter(K=>_(K,$)===0),!F.length){U=$;break}let G=o.filter($=>_($,D)!==1),W=D;for(let $=D;$_(K,$)!==1),!G.length){W=Math.max($-1,D);break}const Y=[];for(let $=U;$<=W;$+=1)x[$]&&o.some(q=>_(q,$)>1)&&Y.push($);return Y.map($=>{const K=x[$],q=a(K.record,$),Z=oe=>{const de=$+oe-1,ae=a(x[de].record,de),ue=O(q,ae);return ue.bottom-ue.top},J=O(q);return p.createElement(YPe,{key:$,data:K,rowKey:q,index:$,style:{top:-z+J.top},extra:!0,getHeight:Z})})},E=p.useMemo(()=>({columnsOffset:C}),[C]),I=`${c}-tbody`,A=b(["body","wrapper"]),R={};return h&&(R.position="sticky",R.bottom=0,typeof h=="object"&&h.offsetScroll&&(R.bottom=h.offsetScroll)),p.createElement(TXe.Provider,{value:E},p.createElement(ZV,{fullHeight:!1,ref:v,prefixCls:`${I}-virtual`,styles:{horizontalScrollBar:R},className:I,height:m,itemHeight:g||24,data:x,itemKey:k=>a(k.record),component:A,scrollWidth:d,direction:f,onVirtualScroll:({x:k})=>{var T;r({currentTarget:(T=v.current)==null?void 0:T.nativeElement,scrollLeft:k})},onScroll:y,extraRender:N},(k,T,D)=>{const O=a(k.record,T);return p.createElement(YPe,{data:k,rowKey:O,index:T,style:D.style})}))}),B1n=aA(F1n);function koe(){return koe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{ref:n,onScroll:r}=t;return p.createElement(B1n,{ref:n,data:e,onScroll:r})},H1n=(e,t)=>{const{data:n,columns:r,scroll:o,sticky:i,prefixCls:a=IXe,className:l,listItemHeight:c,components:u,onScroll:d}=e;let{x:f,y:h}=o||{};typeof f!="number"&&(f=1),typeof h!="number"&&(h=500);const m=Xo((y,v)=>rp(u,y)||v),g=Xo(d),b=p.useMemo(()=>({sticky:i,scrollY:h,listItemHeight:c,getComponent:m,onScroll:g}),[i,h,c,m,g]);return p.createElement(fpe.Provider,{value:b},p.createElement(lA,koe({},e,{className:Ae(l,`${a}-virtual`),scroll:{...o,x:f},components:{...u,body:n!=null&&n.length?z1n:void 0},columns:r,internalHooks:FO,tailor:!0,ref:t})))},V1n=p.forwardRef(H1n),kXe=e=>gXe(V1n,e);kXe();const U1n=e=>null,G1n=e=>null,ppe=p.createContext(null),W1n=p.createContext({}),q1n=({prefixCls:e,level:t,isStart:n,isEnd:r})=>{const o=`${e}-indent-unit`,i=[];for(let a=0;a{var Ze,ht;const{eventKey:t,className:n,style:r,dragOver:o,dragOverGapTop:i,dragOverGapBottom:a,isLeaf:l,isStart:c,isEnd:u,expanded:d,selected:f,checked:h,halfChecked:m,loading:g,domRef:b,active:y,data:v,onMouseMove:x,selectable:S,...C}=e,_=Pe.useContext(ppe),{classNames:N,styles:E}=_||{},I=Pe.useContext(W1n),A=Pe.useRef(null),[R,k]=Pe.useState(!1),T=!!(_.disabled||e.disabled||(Ze=I.nodeDisabled)!=null&&Ze.call(I,v)),D=Pe.useMemo(()=>!_.checkable||e.checkable===!1?!1:_.checkable,[_.checkable,e.checkable]),O=Oe=>{T||_.onNodeSelect(Oe,zu(e))},z=Oe=>{T||!D||e.disableCheckbox||_.onNodeCheck(Oe,zu(e),!h)},F=Pe.useMemo(()=>typeof S=="boolean"?S:_.selectable,[S,_.selectable]),U=Oe=>{_.onNodeClick(Oe,zu(e)),F?O(Oe):z(Oe)},G=Oe=>{_.onNodeDoubleClick(Oe,zu(e))},W=Oe=>{_.onNodeMouseEnter(Oe,zu(e))},Y=Oe=>{_.onNodeMouseLeave(Oe,zu(e))},B=Oe=>{_.onNodeContextMenu(Oe,zu(e))},$=Pe.useMemo(()=>!!(_.draggable&&(!_.draggable.nodeDraggable||_.draggable.nodeDraggable(v))),[_.draggable,v]),K=Oe=>{Oe.stopPropagation(),k(!0),_.onNodeDragStart(Oe,e);try{Oe.dataTransfer.setData("text/plain","")}catch{}},q=Oe=>{Oe.preventDefault(),Oe.stopPropagation(),_.onNodeDragEnter(Oe,e)},Z=Oe=>{Oe.preventDefault(),Oe.stopPropagation(),_.onNodeDragOver(Oe,e)},J=Oe=>{Oe.stopPropagation(),_.onNodeDragLeave(Oe,e)},oe=Oe=>{Oe.stopPropagation(),k(!1),_.onNodeDragEnd(Oe,e)},de=Oe=>{Oe.preventDefault(),Oe.stopPropagation(),k(!1),_.onNodeDrop(Oe,e)},ae=Oe=>{g||_.onNodeExpand(Oe,zu(e))},ue=Pe.useMemo(()=>{const{children:Oe}=bh(_.keyEntities,t)||{};return!!(Oe||[]).length},[_.keyEntities,t]),ce=Pe.useMemo(()=>l===!1?!1:l||!_.loadData&&!ue||_.loadData&&e.loaded&&!ue,[l,_.loadData,ue,e.loaded]);Pe.useEffect(()=>{g||typeof _.loadData=="function"&&d&&!ce&&!e.loaded&&_.onNodeLoad(zu(e))},[g,_.loadData,_.onNodeLoad,d,ce,e]);const se=Pe.useMemo(()=>{var Oe;return(Oe=_.draggable)!=null&&Oe.icon?Pe.createElement("span",{className:`${_.prefixCls}-draggable-icon`},_.draggable.icon):null},[_.draggable]),me=Oe=>{const ft=e.switcherIcon||_.switcherIcon;return typeof ft=="function"?ft({...e,isLeaf:Oe}):ft},fe=()=>{if(ce){const ft=me(!0);return ft!==!1?Pe.createElement("span",{className:Ae(`${_.prefixCls}-switcher`,`${_.prefixCls}-switcher-noop`)},ft):null}const Oe=me(!1);return Oe!==!1?Pe.createElement("span",{onClick:ae,className:Ae(`${_.prefixCls}-switcher`,`${_.prefixCls}-switcher_${d?XPe:ZPe}`)},Oe):null},te=Pe.useMemo(()=>{if(!D)return null;const Oe=typeof D!="boolean"?D:null;return Pe.createElement("span",{className:Ae(`${_.prefixCls}-checkbox`,{[`${_.prefixCls}-checkbox-checked`]:h,[`${_.prefixCls}-checkbox-indeterminate`]:!h&&m,[`${_.prefixCls}-checkbox-disabled`]:T||e.disableCheckbox}),onClick:z,role:"checkbox","aria-checked":m?"mixed":h,"aria-disabled":T||e.disableCheckbox,"aria-label":`Select ${typeof e.title=="string"?e.title:"tree node"}`},Oe)},[D,h,m,T,e.disableCheckbox,e.title]),ye=Pe.useMemo(()=>ce?null:d?XPe:ZPe,[ce,d]),ve=Pe.useMemo(()=>Pe.createElement("span",{className:Ae(N==null?void 0:N.itemIcon,`${_.prefixCls}-iconEle`,`${_.prefixCls}-icon__${ye||"docu"}`,{[`${_.prefixCls}-icon_loading`]:g}),style:E==null?void 0:E.itemIcon}),[_.prefixCls,ye,g]),ge=Pe.useMemo(()=>{const Oe=!!_.draggable;return!e.disabled&&Oe&&_.dragOverNodeKey===t?_.dropIndicatorRender({dropPosition:_.dropPosition,dropLevelOffset:_.dropLevelOffset,indent:_.indent,prefixCls:_.prefixCls,direction:_.direction}):null},[_.dropPosition,_.dropLevelOffset,_.indent,_.prefixCls,_.direction,_.draggable,_.dragOverNodeKey,_.dropIndicatorRender]),Ee=Pe.useMemo(()=>{const{title:Oe=Y1n}=e,ft=`${_.prefixCls}-node-content-wrapper`;let Qe;if(_.showIcon){const st=e.icon||_.icon;Qe=st?Pe.createElement("span",{className:Ae(N==null?void 0:N.itemIcon,`${_.prefixCls}-iconEle`,`${_.prefixCls}-icon__customize`),style:E==null?void 0:E.itemIcon},typeof st=="function"?st(e):st):ve}else _.loadData&&g&&(Qe=ve);let De;return typeof Oe=="function"?De=Oe(v):_.titleRender?De=_.titleRender(v):De=Oe,Pe.createElement("span",{ref:A,title:typeof Oe=="string"?Oe:"",className:Ae(ft,`${ft}-${ye||"normal"}`,{[`${_.prefixCls}-node-selected`]:!T&&(f||R)}),onMouseEnter:W,onMouseLeave:Y,onContextMenu:B,onClick:U,onDoubleClick:G},Qe,Pe.createElement("span",{className:Ae(`${_.prefixCls}-title`,N==null?void 0:N.itemTitle),style:E==null?void 0:E.itemTitle},De),ge)},[_.prefixCls,_.showIcon,e,_.icon,ve,_.titleRender,v,ye,W,Y,B,U,G]),xe=Mh(C,{aria:!0,data:!0}),{level:Ne}=bh(_.keyEntities,t)||{},_e=u[u.length-1],Be=!T&&$,Te=_.draggingNodeKey===t,Ge=S!==void 0?{"aria-selected":!!S}:void 0;return Pe.createElement("div",Moe({ref:b,role:"treeitem","aria-expanded":l?void 0:d,className:Ae(n,`${_.prefixCls}-treenode`,N==null?void 0:N.item,{[`${_.prefixCls}-treenode-disabled`]:T,[`${_.prefixCls}-treenode-switcher-${d?"open":"close"}`]:!l,[`${_.prefixCls}-treenode-checkbox-checked`]:h,[`${_.prefixCls}-treenode-checkbox-indeterminate`]:m,[`${_.prefixCls}-treenode-selected`]:f,[`${_.prefixCls}-treenode-loading`]:g,[`${_.prefixCls}-treenode-active`]:y,[`${_.prefixCls}-treenode-leaf-last`]:_e,[`${_.prefixCls}-treenode-draggable`]:$,dragging:Te,"drop-target":_.dropTargetKey===t,"drop-container":_.dropContainerKey===t,"drag-over":!T&&o,"drag-over-gap-top":!T&&i,"drag-over-gap-bottom":!T&&a,"filter-node":(ht=_.filterTreeNode)==null?void 0:ht.call(_,zu(e)),[`${_.prefixCls}-treenode-leaf`]:ce}),style:{...r,...E==null?void 0:E.item},draggable:Be,onDragStart:Be?K:void 0,onDragEnter:$?q:void 0,onDragOver:$?Z:void 0,onDragLeave:$?J:void 0,onDrop:$?de:void 0,onDragEnd:$?oe:void 0,onMouseMove:x},Ge,xe),Pe.createElement(K1n,{prefixCls:_.prefixCls,level:Ne,isStart:c,isEnd:u}),se,fe(),te,Ee)};hR.isTreeNode=1;function Ky(e,t){if(!e)return[];const n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function Wv(e,t){const n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function hpe(e){return e.split("-")}function X1n(e,t){const n=[],r=bh(t,e);function o(i=[]){i.forEach(({key:a,children:l})=>{n.push(a),o(l)})}return o(r.children),n}function Z1n(e){if(e.parent){const t=hpe(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function J1n(e){const t=hpe(e.pos);return Number(t[t.length-1])===0}function JPe(e,t,n,r,o,i,a,l,c,u){var R;const{clientX:d,clientY:f}=e,{top:h,height:m}=e.target.getBoundingClientRect(),b=((u==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-d)-12)/r,y=c.filter(k=>{var T,D;return(D=(T=l[k])==null?void 0:T.children)==null?void 0:D.length});let v=bh(l,n.eventKey);if(fO.key===v.key),T=k<=0?0:k-1,D=a[T].key;v=bh(l,D)}const x=v.key,S=v,C=v.key;let _=0,N=0;if(!y.includes(x))for(let k=0;k-1.5?i({dragNode:E,dropNode:I,dropPosition:1})?_=1:A=!1:i({dragNode:E,dropNode:I,dropPosition:0})?_=0:i({dragNode:E,dropNode:I,dropPosition:1})?_=1:A=!1:i({dragNode:E,dropNode:I,dropPosition:1})?_=1:A=!1,{dropPosition:_,dropLevelOffset:N,dropTargetKey:v.key,dropTargetPos:v.pos,dragOverNodeKey:C,dropContainerKey:_===0?null:((R=v.parent)==null?void 0:R.key)||null,dropAllowed:A}}function QPe(e,t){if(!e)return;const{multiple:n}=t;return n?e.slice():e.length?[e[0]]:e}function LX(e){if(!e)return null;let t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(typeof e=="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return ic(!1,"`checkedKeys` is not an array or an object"),null;return t}function Roe(e,t){const n=new Set;function r(o){if(n.has(o))return;const i=bh(t,o);if(!i)return;n.add(o);const{parent:a,node:l}=i;l.disabled||a&&r(a.key)}return(e||[]).forEach(o=>{r(o)}),[...n]}const gw={},Ooe="SELECT_ALL",Doe="SELECT_INVERT",Loe="SELECT_NONE",eIe=[],MXe=(e,t,n=[])=>((t||[]).forEach(r=>{n.push(r),r&&typeof r=="object"&&e in r&&MXe(e,r[e],n)}),n),Q1n=(e,t)=>{const{preserveSelectedRowKeys:n,selectedRowKeys:r,defaultSelectedRowKeys:o,getCheckboxProps:i,getTitleCheckboxProps:a,onChange:l,onSelect:c,onSelectAll:u,onSelectInvert:d,onSelectNone:f,onSelectMultiple:h,columnWidth:m,type:g,selections:b,fixed:y,renderCell:v,hideSelectAll:x,checkStrictly:S=!0}=t||{},{prefixCls:C,data:_,pageData:N,getRecordByKey:E,getRowKey:I,expandType:A,childrenColumnName:R,locale:k,getPopupContainer:T}=e,D=Rj(),[O,z]=Hdn(se=>se),[F,U]=Ku(o||eIe,r),G=p.useRef(new Map),W=p.useCallback(se=>{if(n){const me=new Map;se.forEach(fe=>{let te=E(fe);!te&&G.current.has(fe)&&(te=G.current.get(fe)),me.set(fe,te)}),G.current=me}},[E,n]);p.useEffect(()=>{W(F)},[F]);const Y=p.useMemo(()=>MXe(R,N),[R,N]),{keyEntities:B}=p.useMemo(()=>{if(S)return{keyEntities:null};let se=_;if(n){const me=new Set(Y.map(I)),fe=Array.from(G.current).reduce((te,[ye,ve])=>me.has(ye)?te:te.concat(ve),[]);se=[].concat(So(se),So(fe))}return ape(se,{externalGetKey:I,childrenPropName:R})},[_,I,S,R,n,Y]),$=p.useMemo(()=>{const se=new Map;return Y.forEach((me,fe)=>{const te=I(me,fe),ye=(i?i(me):null)||{};se.set(te,ye)}),se},[Y,I,i]),K=p.useCallback(se=>{const me=I(se);let fe;return $.has(me)?fe=$.get(I(se)):fe=i?i(se):void 0,!!(fe!=null&&fe.disabled)},[$,I]),[q,Z]=p.useMemo(()=>{if(S)return[F||[],[]];const{checkedKeys:se,halfCheckedKeys:me}=k5(F,!0,B,K);return[se||[],me]},[F,S,B,K]),J=p.useMemo(()=>{const se=g==="radio"?q.slice(0,1):q;return new Set(se)},[q,g]),oe=p.useMemo(()=>g==="radio"?new Set:new Set(Z),[Z,g]);p.useEffect(()=>{t||U(eIe)},[!!t]);const de=p.useCallback((se,me)=>{let fe,te;W(se),n?(fe=se,te=se.map(ye=>G.current.get(ye))):(fe=[],te=[],se.forEach(ye=>{const ve=E(ye);ve!==void 0&&(fe.push(ye),te.push(ve))})),U(fe),l==null||l(fe,te,{type:me})},[U,E,l,n]),ae=p.useCallback((se,me,fe,te)=>{if(c){const ye=fe.map(ve=>E(ve));c(E(se),me,ye,te)}de(fe,"single")},[c,E,de]),ue=p.useMemo(()=>!b||x?null:(b===!0?[Ooe,Doe,Loe]:b).map(me=>me===Ooe?{key:"all",text:k.selectionAll,onSelect(){de(_.map((fe,te)=>I(fe,te)).filter(fe=>{const te=$.get(fe);return!(te!=null&&te.disabled)||J.has(fe)}),"all")}}:me===Doe?{key:"invert",text:k.selectInvert,onSelect(){const fe=new Set(J);N.forEach((ye,ve)=>{const ge=I(ye,ve),Ee=$.get(ge);Ee!=null&&Ee.disabled||(fe.has(ge)?fe.delete(ge):fe.add(ge))});const te=Array.from(fe);d&&(D.deprecated(!1,"onSelectInvert","onChange"),d(te)),de(te,"invert")}}:me===Loe?{key:"none",text:k.selectNone,onSelect(){f==null||f(),de(Array.from(J).filter(fe=>{const te=$.get(fe);return te==null?void 0:te.disabled}),"none")}}:me).map(me=>({...me,onSelect:(...fe)=>{var te;(te=me.onSelect)==null||te.call(me,...fe),z(null)}})),[b,x,k.selectionAll,k.selectInvert,k.selectNone,$,J,_,N,I,d,de]);return[p.useCallback(se=>{var Qe;if(!t)return se.filter(De=>De!==gw);let me=So(se);const fe=new Set(J),te=Y.map(I).filter(De=>!$.get(De).disabled),ye=te.every(De=>fe.has(De)),ve=te.some(De=>fe.has(De)),ge=()=>{const De=[];ye?te.forEach(vt=>{fe.delete(vt),De.push(vt)}):te.forEach(vt=>{fe.has(vt)||(fe.add(vt),De.push(vt))});const st=Array.from(fe);u==null||u(!ye,st.map(vt=>E(vt)),De.map(vt=>E(vt))),de(st,"all"),z(null)};let Ee,xe;if(g!=="radio"){let De;if(ue){const gt={getPopupContainer:T,items:ue.map((Fe,$e)=>{const{key:nt,text:wt,onSelect:Dt}=Fe;return{key:nt??$e,onClick:()=>{Dt==null||Dt(te)},label:wt}})};De=p.createElement("div",{className:`${C}-selection-extra`},p.createElement(spe,{menu:gt,getPopupContainer:T},p.createElement("span",null,p.createElement(eYe,null))))}const st=Y.map((gt,Fe)=>{const $e=I(gt,Fe),nt=$.get($e)||{};return{checked:fe.has($e),...nt}}).filter(({disabled:gt})=>gt),vt=!!st.length&&st.length===Y.length,qe=vt&&st.every(({checked:gt})=>gt),Ye=vt&&st.some(({checked:gt})=>gt),mt=(a==null?void 0:a())||{},{onChange:Et,disabled:vn}=mt;xe=p.createElement(BP,{"aria-label":De?"Custom selection":"Select all",...mt,checked:vt?qe:!!Y.length&&ye,indeterminate:vt?!qe&&Ye:!ye&&ve,onChange:gt=>{ge(),Et==null||Et(gt)},disabled:vn??(Y.length===0||vt),skipGroup:!0}),Ee=!x&&p.createElement("div",{className:`${C}-selection`},xe,De)}let Ne;g==="radio"?Ne=(De,st,vt)=>{const qe=I(st,vt),Ye=fe.has(qe),mt=$.get(qe);return{node:p.createElement(RO,{...mt,checked:Ye,onClick:Et=>{var vn;Et.stopPropagation(),(vn=mt==null?void 0:mt.onClick)==null||vn.call(mt,Et)},onChange:Et=>{var vn;fe.has(qe)||ae(qe,!0,[qe],Et.nativeEvent),(vn=mt==null?void 0:mt.onChange)==null||vn.call(mt,Et)}}),checked:Ye}}:Ne=(De,st,vt)=>{const qe=I(st,vt),Ye=fe.has(qe),mt=oe.has(qe),Et=$.get(qe);let vn;return A==="nest"?vn=mt:vn=(Et==null?void 0:Et.indeterminate)??mt,{node:p.createElement(BP,{...Et,indeterminate:vn,checked:Ye,skipGroup:!0,onClick:gt=>{var Fe;gt.stopPropagation(),(Fe=Et==null?void 0:Et.onClick)==null||Fe.call(Et,gt)},onChange:gt=>{var Dt;const{nativeEvent:Fe}=gt,{shiftKey:$e}=Fe,nt=te.indexOf(qe),wt=q.some(on=>te.includes(on));if($e&&S&&wt){const on=O(nt,te,fe),jn=Array.from(fe);h==null||h(!Ye,jn.map(kt=>E(kt)),on.map(kt=>E(kt))),de(jn,"multiple")}else{const on=q;if(S){const jn=Ye?Ky(on,qe):Wv(on,qe);ae(qe,!Ye,jn,Fe)}else{const jn=k5([].concat(So(on),[qe]),!0,B,K),{checkedKeys:kt,halfCheckedKeys:pn}=jn;let tt=kt;if(Ye){const jt=new Set(kt);jt.delete(qe),tt=k5(Array.from(jt),{halfCheckedKeys:pn},B,K).checkedKeys}ae(qe,!Ye,tt,Fe)}}z(Ye?null:nt),(Dt=Et==null?void 0:Et.onChange)==null||Dt.call(Et,gt)}}),checked:Ye}};const _e=(De,st,vt)=>{const{node:qe,checked:Ye}=Ne(De,st,vt);return v?v(Ye,st,vt,qe):qe};if(!me.includes(gw))if(me.findIndex(De=>{var st;return((st=De[R4])==null?void 0:st.columnType)==="EXPAND_COLUMN"})===0){const[De,...st]=me;me=[De,gw].concat(So(st))}else me=[gw].concat(So(me));const Be=me.indexOf(gw);me=me.filter((De,st)=>De!==gw||st===Be);const Te=me[Be-1],Ge=me[Be+1];let Ze=y;Ze===void 0&&((Ge==null?void 0:Ge.fixed)!==void 0?Ze=Ge.fixed:(Te==null?void 0:Te.fixed)!==void 0&&(Ze=Te.fixed)),Ze&&Te&&((Qe=Te[R4])==null?void 0:Qe.columnType)==="EXPAND_COLUMN"&&Te.fixed===void 0&&(Te.fixed=Ze);const ht=Ae(`${C}-selection-col`,{[`${C}-selection-col-with-dropdown`]:b&&g==="checkbox"}),Oe=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(xe):t.columnTitle:Ee,ft={fixed:Ze,width:m,className:`${C}-selection-column`,title:Oe(),render:_e,onCell:t.onCell,align:t.align,[R4]:{className:ht}};return me.map(De=>De===gw?ft:De)},[I,Y,t,q,J,oe,m,ue,A,$,h,ae,K]),J]};function ewn(e){return t=>{const{prefixCls:n,onExpand:r,record:o,expanded:i,expandable:a}=t,l=`${n}-row-expand-icon`;return p.createElement("button",{type:"button",onClick:c=>{r(o,c),c.stopPropagation()},className:Ae(l,{[`${l}-spaced`]:!a,[`${l}-expanded`]:a&&i,[`${l}-collapsed`]:a&&!i}),"aria-label":i?e.collapse:e.expand,"aria-expanded":i})}}function twn(e){return(n,r)=>{const o=n.querySelector(`.${e}-container`);let i=r;if(o){const a=getComputedStyle(o),l=Number.parseInt(a.borderLeftWidth,10),c=Number.parseInt(a.borderRightWidth,10);i=r-l-c}return i}}const BS=(e,t)=>"key"in e&&e.key!==void 0&&e.key!==null?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function cA(e,t){return t?`${t}-${e}`:`${e}`}const aU=(e,t)=>typeof e=="function"?e(t):e,nwn=(e,t)=>{const n=aU(e,t);return Object.prototype.toString.call(n)==="[object Object]"?"":n},rwn=e=>{const{dropPosition:t,dropLevelOffset:n,indent:r}=e,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:o.top=0,o.left=-n*r;break;case 1:o.bottom=0,o.left=-n*r;break;case 0:o.bottom=0,o.left=r;break}return Pe.createElement("div",{style:o})};function own(e,t){const[n,r]=p.useState(!1);ai(()=>{if(n)return e(),()=>{t()}},[n]),ai(()=>(r(!0),()=>{r(!1)}),[])}function O4(){return O4=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:n,style:r,motion:o,motionNodes:i,motionType:a,onMotionStart:l,onMotionEnd:c,active:u,treeNodeRequiredProps:d,...f}=e,[h,m]=p.useState(!0),{prefixCls:g}=p.useContext(ppe),b=i&&a!=="hide";ai(()=>{i&&b!==h&&m(b)},[i]);const y=()=>{i&&l()},v=p.useRef(!1),x=()=>{i&&!v.current&&(v.current=!0,c())};own(y,x);const S=C=>{b===C&&x()};return i?p.createElement(qg,O4({ref:t,visible:h},o,{motionAppear:a==="show",onVisibleChanged:S}),({className:C,style:_},N)=>p.createElement("div",{ref:N,className:Ae(`${g}-treenode-motion`,C),style:_},i.map(E=>{const{data:{...I},title:A,key:R,isStart:k,isEnd:T}=E;delete I.children;const D=k4(R,d);return p.createElement(hR,O4({},I,D,{title:A,active:u,data:E.data,key:R,isStart:k,isEnd:T}))}))):p.createElement(hR,O4({domRef:t,className:n,style:r},f,{active:u}))});function awn(e=[],t=[]){const n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function o(i,a){const l=new Map;i.forEach(u=>{l.set(u,!0)});const c=a.filter(u=>!l.has(u));return c.length===1?c[0]:null}return na.key===n),o=e[r+1],i=t.findIndex(a=>a.key===n);if(o){const a=t.findIndex(l=>l.key===o.key);return t.slice(i+1,a)}return t.slice(i+1)}function hz(){return hz=Object.assign?Object.assign.bind():function(e){for(var t=1;t{},q_=`RC_TREE_MOTION_${Math.random()}`,$oe={key:q_},RXe={key:q_,level:0,index:0,pos:"0",node:$oe,nodes:[$oe]},rIe={parent:null,children:[],pos:RXe.pos,data:$oe,title:null,key:q_,isStart:[],isEnd:[]};function oIe(e,t,n,r){return t===!1||!n?e:e.slice(0,Math.ceil(n/r)+1)}function iIe(e){const{key:t,pos:n}=e;return LO(t,n)}function lwn(e){let t=String(e.data.key),n=e;for(;n.parent;)n=n.parent,t=`${n.data.key} > ${t}`;return t}const cwn=p.forwardRef((e,t)=>{const{prefixCls:n,data:r,selectable:o,checkable:i,expandedKeys:a,selectedKeys:l,checkedKeys:c,loadedKeys:u,loadingKeys:d,halfCheckedKeys:f,keyEntities:h,disabled:m,dragging:g,dragOverNodeKey:b,dropPosition:y,motion:v,height:x,itemHeight:S,virtual:C,scrollWidth:_,focusable:N,activeItem:E,focused:I,tabIndex:A,onKeyDown:R,onFocus:k,onBlur:T,onActiveChange:D,onListChangeStart:O,onListChangeEnd:z,...F}=e,U=p.useRef(null),G=p.useRef(null);p.useImperativeHandle(t,()=>({scrollTo:me=>{U.current.scrollTo(me)},getIndentWidth:()=>G.current.offsetWidth}));const[W,Y]=p.useState(a),[B,$]=p.useState(r),[K,q]=p.useState(r),[Z,J]=p.useState([]),[oe,de]=p.useState(null),ae=p.useRef(r);ae.current=r;function ue(){const me=ae.current;$(me),q(me),J([]),de(null),z()}ai(()=>{Y(a);const me=awn(W,a);if(me.key!==null)if(me.add){const fe=B.findIndex(({key:ve})=>ve===me.key),te=oIe(tIe(B,r,me.key),C,x,S),ye=B.slice();ye.splice(fe+1,0,rIe),q(ye),J(te),de("show")}else{const fe=r.findIndex(({key:ve})=>ve===me.key),te=oIe(tIe(r,B,me.key),C,x,S),ye=r.slice();ye.splice(fe+1,0,rIe),q(ye),J(te),de("hide")}else B!==r&&($(r),q(r))},[a,r]),p.useEffect(()=>{g||ue()},[g]);const ce=v?K:r,se={expandedKeys:a,selectedKeys:l,loadedKeys:u,loadingKeys:d,checkedKeys:c,halfCheckedKeys:f,dragOverNodeKey:b,dropPosition:y,keyEntities:h};return p.createElement(p.Fragment,null,I&&E&&p.createElement("span",{style:nIe,"aria-live":"assertive"},lwn(E)),p.createElement("div",null,p.createElement("input",{style:nIe,disabled:N===!1||m,tabIndex:N!==!1?A:null,onKeyDown:R,onFocus:k,onBlur:T,value:"",onChange:swn,"aria-label":"for screen reader"})),p.createElement("div",{className:`${n}-treenode`,"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},p.createElement("div",{className:`${n}-indent`},p.createElement("div",{ref:G,className:`${n}-indent-unit`}))),p.createElement(ZV,hz({},F,{data:ce,itemKey:iIe,height:x,fullHeight:!1,virtual:C,itemHeight:S,scrollWidth:_,prefixCls:`${n}-list`,ref:U,role:"tree",onVisibleChange:me=>{me.every(fe=>iIe(fe)!==q_)&&ue()}}),me=>{const{pos:fe,data:{...te},title:ye,key:ve,isStart:ge,isEnd:Ee}=me,xe=LO(ve,fe);delete te.key,delete te.children;const Ne=k4(xe,se);return p.createElement(iwn,hz({},te,Ne,{title:ye,active:!!E&&ve===E.key,pos:fe,data:me.data,isStart:ge,isEnd:Ee,motion:v,motionNodes:ve===q_?Z:null,motionType:oe,onMotionStart:O,onMotionEnd:ue,treeNodeRequiredProps:se,onMouseMove:()=>{D(null)}}))}))});function Foe(){return Foe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{expandedKeys:o,keyEntities:i}=this.state,{onDragStart:a}=this.props,{eventKey:l}=r;this.dragNodeProps=r,this.dragStartMousePosition={x:n.clientX,y:n.clientY};const c=Ky(o,l);this.setState({draggingNodeKey:l,dragChildrenKeys:X1n(l,i),indent:this.listRef.current.getIndentWidth()}),this.setExpandedKeys(c),window.addEventListener("dragend",this.onWindowDragEnd),a==null||a({event:n,node:zu(r)})});Le(this,"onNodeDragEnter",(n,r)=>{const{expandedKeys:o,keyEntities:i,dragChildrenKeys:a,flattenNodes:l,indent:c}=this.state,{onDragEnter:u,onExpand:d,allowDrop:f,direction:h}=this.props,{pos:m,eventKey:g}=r;if(this.currentMouseOverDroppableNodeKey!==g&&(this.currentMouseOverDroppableNodeKey=g),!this.dragNodeProps){this.resetDragState();return}const{dropPosition:b,dropLevelOffset:y,dropTargetKey:v,dropContainerKey:x,dropTargetPos:S,dropAllowed:C,dragOverNodeKey:_}=JPe(n,this.dragNodeProps,r,c,this.dragStartMousePosition,f,l,i,o,h);if(a.includes(v)||!C){this.resetDragState();return}if(this.delayedDragEnterLogic||(this.delayedDragEnterLogic={}),Object.keys(this.delayedDragEnterLogic).forEach(N=>{clearTimeout(this.delayedDragEnterLogic[N])}),this.dragNodeProps.eventKey!==r.eventKey&&(n.persist(),this.delayedDragEnterLogic[m]=window.setTimeout(()=>{if(this.state.draggingNodeKey===null)return;let N=[...o];const E=bh(i,r.eventKey);E&&(E.children||[]).length&&(N=Wv(o,r.eventKey)),this.props.hasOwnProperty("expandedKeys")||this.setExpandedKeys(N),d==null||d(N,{node:zu(r),expanded:!0,nativeEvent:n.nativeEvent})},800)),this.dragNodeProps.eventKey===v&&y===0){this.resetDragState();return}this.setState({dragOverNodeKey:_,dropPosition:b,dropLevelOffset:y,dropTargetKey:v,dropContainerKey:x,dropTargetPos:S,dropAllowed:C}),u==null||u({event:n,node:zu(r),expandedKeys:o})});Le(this,"onNodeDragOver",(n,r)=>{const{dragChildrenKeys:o,flattenNodes:i,keyEntities:a,expandedKeys:l,indent:c}=this.state,{onDragOver:u,allowDrop:d,direction:f}=this.props;if(!this.dragNodeProps)return;const{dropPosition:h,dropLevelOffset:m,dropTargetKey:g,dropContainerKey:b,dropTargetPos:y,dropAllowed:v,dragOverNodeKey:x}=JPe(n,this.dragNodeProps,r,c,this.dragStartMousePosition,d,i,a,l,f);o.includes(g)||!v||(this.dragNodeProps.eventKey===g&&m===0?this.state.dropPosition===null&&this.state.dropLevelOffset===null&&this.state.dropTargetKey===null&&this.state.dropContainerKey===null&&this.state.dropTargetPos===null&&this.state.dropAllowed===!1&&this.state.dragOverNodeKey===null||this.resetDragState():h===this.state.dropPosition&&m===this.state.dropLevelOffset&&g===this.state.dropTargetKey&&b===this.state.dropContainerKey&&y===this.state.dropTargetPos&&v===this.state.dropAllowed&&x===this.state.dragOverNodeKey||this.setState({dropPosition:h,dropLevelOffset:m,dropTargetKey:g,dropContainerKey:b,dropTargetPos:y,dropAllowed:v,dragOverNodeKey:x}),u==null||u({event:n,node:zu(r)}))});Le(this,"onNodeDragLeave",(n,r)=>{this.currentMouseOverDroppableNodeKey===r.eventKey&&!n.currentTarget.contains(n.relatedTarget)&&(this.resetDragState(),this.currentMouseOverDroppableNodeKey=null);const{onDragLeave:o}=this.props;o==null||o({event:n,node:zu(r)})});Le(this,"onWindowDragEnd",n=>{this.onNodeDragEnd(n,null,!0),window.removeEventListener("dragend",this.onWindowDragEnd)});Le(this,"onNodeDragEnd",(n,r)=>{const{onDragEnd:o}=this.props;this.setState({dragOverNodeKey:null}),this.cleanDragState(),o==null||o({event:n,node:zu(r)}),this.dragNodeProps=null,window.removeEventListener("dragend",this.onWindowDragEnd)});Le(this,"onNodeDrop",(n,r,o=!1)=>{var b;const{dragChildrenKeys:i,dropPosition:a,dropTargetKey:l,dropTargetPos:c,dropAllowed:u}=this.state;if(!u)return;const{onDrop:d}=this.props;if(this.setState({dragOverNodeKey:null}),this.cleanDragState(),l===null)return;const f={...k4(l,this.getTreeNodeRequiredProps()),active:((b=this.getActiveItem())==null?void 0:b.key)===l,data:bh(this.state.keyEntities,l).node},h=i.includes(l);ic(!h,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");const m=hpe(c),g={event:n,node:zu(f),dragNode:this.dragNodeProps?zu(this.dragNodeProps):null,dragNodesKeys:[this.dragNodeProps.eventKey].concat(i),dropToGap:a!==0,dropPosition:a+Number(m[m.length-1])};o||d==null||d(g),this.dragNodeProps=null});Le(this,"cleanDragState",()=>{const{draggingNodeKey:n}=this.state;n!==null&&this.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),this.dragStartMousePosition=null,this.currentMouseOverDroppableNodeKey=null});Le(this,"triggerExpandActionExpand",(n,r)=>{const{expandedKeys:o,flattenNodes:i}=this.state,{expanded:a,key:l,isLeaf:c}=r;if(c||n.shiftKey||n.metaKey||n.ctrlKey)return;const u=i.filter(f=>f.key===l)[0],d=zu({...k4(l,this.getTreeNodeRequiredProps()),data:u.data});this.setExpandedKeys(a?Ky(o,l):Wv(o,l)),this.onNodeExpand(n,d)});Le(this,"onNodeClick",(n,r)=>{const{onClick:o,expandAction:i}=this.props;i==="click"&&this.triggerExpandActionExpand(n,r),o==null||o(n,r)});Le(this,"onNodeDoubleClick",(n,r)=>{const{onDoubleClick:o,expandAction:i}=this.props;i==="doubleClick"&&this.triggerExpandActionExpand(n,r),o==null||o(n,r)});Le(this,"onNodeSelect",(n,r)=>{let{selectedKeys:o}=this.state;const{keyEntities:i,fieldNames:a}=this.state,{onSelect:l,multiple:c}=this.props,{selected:u}=r,d=r[a.key],f=!u;f?c?o=Wv(o,d):o=[d]:o=Ky(o,d);const h=o.map(m=>{const g=bh(i,m);return g?g.node:null}).filter(Boolean);this.setUncontrolledState({selectedKeys:o}),l==null||l(o,{event:"select",selected:f,node:r,selectedNodes:h,nativeEvent:n.nativeEvent})});Le(this,"onNodeCheck",(n,r,o)=>{const{keyEntities:i,checkedKeys:a,halfCheckedKeys:l}=this.state,{checkStrictly:c,onCheck:u}=this.props,{key:d}=r;let f;const h={event:"check",node:r,checked:o,nativeEvent:n.nativeEvent};if(c){const m=o?Wv(a,d):Ky(a,d),g=Ky(l,d);f={checked:m,halfChecked:g},h.checkedNodes=m.map(b=>bh(i,b)).filter(Boolean).map(b=>b.node),this.setUncontrolledState({checkedKeys:m})}else{let{checkedKeys:m,halfCheckedKeys:g}=k5([...a,d],!0,i);if(!o){const b=new Set(m);b.delete(d),{checkedKeys:m,halfCheckedKeys:g}=k5(Array.from(b),{halfCheckedKeys:g},i)}f=m,h.checkedNodes=[],h.checkedNodesPositions=[],h.halfCheckedKeys=g,m.forEach(b=>{const y=bh(i,b);if(!y)return;const{node:v,pos:x}=y;h.checkedNodes.push(v),h.checkedNodesPositions.push({node:v,pos:x})}),this.setUncontrolledState({checkedKeys:m},!1,{halfCheckedKeys:g})}u==null||u(f,h)});Le(this,"onNodeLoad",n=>{var l;const{key:r}=n,{keyEntities:o}=this.state,i=bh(o,r);if((l=i==null?void 0:i.children)!=null&&l.length)return;const a=new Promise((c,u)=>{this.setState(({loadedKeys:d=[],loadingKeys:f=[]})=>{const{loadData:h,onLoad:m}=this.props;return!h||d.includes(r)||f.includes(r)?null:(h(n).then(()=>{const{loadedKeys:b}=this.state,y=Wv(b,r);m==null||m(y,{event:"load",node:n}),this.setUncontrolledState({loadedKeys:y}),this.setState(v=>({loadingKeys:Ky(v.loadingKeys,r)})),c()}).catch(b=>{if(this.setState(y=>({loadingKeys:Ky(y.loadingKeys,r)})),this.loadingRetryTimes[r]=(this.loadingRetryTimes[r]||0)+1,this.loadingRetryTimes[r]>=uwn){const{loadedKeys:y}=this.state;ic(!1,"Retry for `loadData` many times but still failed. No more retry."),this.setUncontrolledState({loadedKeys:Wv(y,r)}),c()}u(b)}),{loadingKeys:Wv(f,r)})})});return a.catch(()=>{}),a});Le(this,"onNodeMouseEnter",(n,r)=>{const{onMouseEnter:o}=this.props;o==null||o({event:n,node:r})});Le(this,"onNodeMouseLeave",(n,r)=>{const{onMouseLeave:o}=this.props;o==null||o({event:n,node:r})});Le(this,"onNodeContextMenu",(n,r)=>{const{onRightClick:o}=this.props;o&&(n.preventDefault(),o({event:n,node:r}))});Le(this,"onFocus",(...n)=>{const{onFocus:r}=this.props;this.setState({focused:!0}),r==null||r(...n)});Le(this,"onBlur",(...n)=>{const{onBlur:r}=this.props;this.setState({focused:!1}),this.onActiveChange(null),r==null||r(...n)});Le(this,"getTreeNodeRequiredProps",()=>{const{expandedKeys:n,selectedKeys:r,loadedKeys:o,loadingKeys:i,checkedKeys:a,halfCheckedKeys:l,dragOverNodeKey:c,dropPosition:u,keyEntities:d}=this.state;return{expandedKeys:n||[],selectedKeys:r||[],loadedKeys:o||[],loadingKeys:i||[],checkedKeys:a||[],halfCheckedKeys:l||[],dragOverNodeKey:c,dropPosition:u,keyEntities:d}});Le(this,"setExpandedKeys",n=>{const{treeData:r,fieldNames:o}=this.state,i=AX(r,n,o);this.setUncontrolledState({expandedKeys:n,flattenNodes:i},!0)});Le(this,"onNodeExpand",(n,r)=>{let{expandedKeys:o}=this.state;const{listChanging:i,fieldNames:a}=this.state,{onExpand:l,loadData:c}=this.props,{expanded:u}=r,d=r[a.key];if(i)return;const f=o.includes(d),h=!u;if(ic(u&&f||!u&&!f,"Expand state not sync with index check"),o=h?Wv(o,d):Ky(o,d),this.setExpandedKeys(o),l==null||l(o,{node:r,expanded:h,nativeEvent:n.nativeEvent}),h&&c){const m=this.onNodeLoad(r);m&&m.then(()=>{const g=AX(this.state.treeData,o,a);this.setUncontrolledState({flattenNodes:g})}).catch(()=>{const{expandedKeys:g}=this.state,b=Ky(g,d);this.setExpandedKeys(b)})}});Le(this,"onListChangeStart",()=>{this.setUncontrolledState({listChanging:!0})});Le(this,"onListChangeEnd",()=>{setTimeout(()=>{this.setUncontrolledState({listChanging:!1})})});Le(this,"onActiveChange",n=>{const{activeKey:r}=this.state,{onActiveChange:o,itemScrollOffset:i=0}=this.props;r!==n&&(this.setState({activeKey:n}),n!==null&&this.scrollTo({key:n,offset:i}),o==null||o(n))});Le(this,"getActiveItem",()=>{const{activeKey:n,flattenNodes:r}=this.state;return n===null?null:r.find(({key:o})=>o===n)||null});Le(this,"offsetActiveKey",n=>{const{flattenNodes:r,activeKey:o}=this.state;let i=r.findIndex(({key:l})=>l===o);i===-1&&n<0&&(i=r.length),i=(i+n+r.length)%r.length;const a=r[i];if(a){const{key:l}=a;this.onActiveChange(l)}else this.onActiveChange(null)});Le(this,"onKeyDown",n=>{const{activeKey:r,expandedKeys:o,checkedKeys:i,fieldNames:a}=this.state,{onKeyDown:l,checkable:c,selectable:u}=this.props;switch(n.which){case Wr.UP:{this.offsetActiveKey(-1),n.preventDefault();break}case Wr.DOWN:{this.offsetActiveKey(1),n.preventDefault();break}}const d=this.getActiveItem();if(d&&d.data){const f=this.getTreeNodeRequiredProps(),h=d.data.isLeaf===!1||!!(d.data[a.children]||[]).length,m=zu({...k4(r,f),data:d.data,active:!0});switch(n.which){case Wr.LEFT:{h&&o.includes(r)?this.onNodeExpand({},m):d.parent&&this.onActiveChange(d.parent.key),n.preventDefault();break}case Wr.RIGHT:{h&&!o.includes(r)?this.onNodeExpand({},m):d.children&&d.children.length&&this.onActiveChange(d.children[0].key),n.preventDefault();break}case Wr.ENTER:case Wr.SPACE:{c&&!m.disabled&&m.checkable!==!1&&!m.disableCheckbox?this.onNodeCheck({},m,!i.includes(r)):!c&&u&&!m.disabled&&m.selectable!==!1&&this.onNodeSelect({},m);break}}}l==null||l(n)});Le(this,"setUncontrolledState",(n,r=!1,o=null)=>{if(!this.destroyed){let i=!1,a=!0;const l={};Object.keys(n).forEach(c=>{if(this.props.hasOwnProperty(c)){a=!1;return}i=!0,l[c]=n[c]}),i&&(!r||a)&&this.setState({...l,...o})}});Le(this,"scrollTo",n=>{this.listRef.current.scrollTo(n)})}componentDidMount(){this.destroyed=!1,this.onUpdated()}componentDidUpdate(){this.onUpdated()}onUpdated(){const{activeKey:n,itemScrollOffset:r=0}=this.props;n!==void 0&&n!==this.state.activeKey&&(this.setState({activeKey:n}),n!==null&&this.scrollTo({key:n,offset:r}))}componentWillUnmount(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}static getDerivedStateFromProps(n,r){const{prevProps:o}=r,i={prevProps:n};function a(d){return!o&&n.hasOwnProperty(d)||o&&o[d]!==n[d]}let l,{fieldNames:c}=r;if(a("fieldNames")&&(c=FP(n.fieldNames),i.fieldNames=c),a("treeData")?{treeData:l}=n:a("children")&&(ic(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),l=HYe(n.children)),l){i.treeData=l;const d=ape(l,{fieldNames:c});i.keyEntities={[q_]:RXe,...d.keyEntities}}const u=i.keyEntities||r.keyEntities;if(a("expandedKeys")||o&&a("autoExpandParent"))i.expandedKeys=n.autoExpandParent||!o&&n.defaultExpandParent?Roe(n.expandedKeys,u):n.expandedKeys;else if(!o&&n.defaultExpandAll){const d={...u};delete d[q_];const f=[];Object.keys(d).forEach(h=>{const m=d[h];m.children&&m.children.length&&f.push(m.key)}),i.expandedKeys=f}else!o&&n.defaultExpandedKeys&&(i.expandedKeys=n.autoExpandParent||n.defaultExpandParent?Roe(n.defaultExpandedKeys,u):n.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,l||i.expandedKeys){const d=AX(l||r.treeData,i.expandedKeys||r.expandedKeys,c);i.flattenNodes=d}if(n.selectable&&(a("selectedKeys")?i.selectedKeys=QPe(n.selectedKeys,n):!o&&n.defaultSelectedKeys&&(i.selectedKeys=QPe(n.defaultSelectedKeys,n))),n.checkable){let d;if(a("checkedKeys")?d=LX(n.checkedKeys)||{}:!o&&n.defaultCheckedKeys?d=LX(n.defaultCheckedKeys)||{}:l&&(d=LX(n.checkedKeys)||{checkedKeys:r.checkedKeys,halfCheckedKeys:r.halfCheckedKeys}),d){let{checkedKeys:f=[],halfCheckedKeys:h=[]}=d;n.checkStrictly||({checkedKeys:f,halfCheckedKeys:h}=k5(f,!0,u)),i.checkedKeys=f,i.halfCheckedKeys=h}}return a("loadedKeys")&&(i.loadedKeys=n.loadedKeys),i}resetDragState(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}render(){const{focused:n,flattenNodes:r,keyEntities:o,draggingNodeKey:i,activeKey:a,dropLevelOffset:l,dropContainerKey:c,dropTargetKey:u,dropPosition:d,dragOverNodeKey:f,indent:h}=this.state,{prefixCls:m,className:g,style:b,styles:y,classNames:v,showLine:x,focusable:S,tabIndex:C=0,selectable:_,showIcon:N,icon:E,switcherIcon:I,draggable:A,checkable:R,checkStrictly:k,disabled:T,motion:D,loadData:O,filterTreeNode:z,height:F,itemHeight:U,scrollWidth:G,virtual:W,titleRender:Y,dropIndicatorRender:B,onContextMenu:$,onScroll:K,direction:q,rootClassName:Z,rootStyle:J}=this.props,oe=Mh(this.props,{aria:!0,data:!0});let de;A&&(typeof A=="object"?de=A:typeof A=="function"?de={nodeDraggable:A}:de={});const ae={styles:y,classNames:v,prefixCls:m,selectable:_,showIcon:N,icon:E,switcherIcon:I,draggable:de,draggingNodeKey:i,checkable:R,checkStrictly:k,disabled:T,keyEntities:o,dropLevelOffset:l,dropContainerKey:c,dropTargetKey:u,dropPosition:d,dragOverNodeKey:f,indent:h,direction:q,dropIndicatorRender:B,loadData:O,filterTreeNode:z,titleRender:Y,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return p.createElement(ppe.Provider,{value:ae},p.createElement("div",{className:Ae(m,g,Z,{[`${m}-show-line`]:x,[`${m}-focused`]:n,[`${m}-active-focused`]:a!==null}),style:J},p.createElement(cwn,Foe({ref:this.listRef,prefixCls:m,style:b,data:r,disabled:T,selectable:_,checkable:!!R,motion:D,dragging:i!==null,height:F,itemHeight:U,virtual:W,focusable:S,focused:n,tabIndex:C,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:$,onScroll:K,scrollWidth:G},this.getTreeNodeRequiredProps(),oe))))}},Le(qF,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:rwn,allowDrop:()=>!0,expandAction:!1}),Le(qF,"TreeNode",hR),qF);const fwn=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:n,directoryNodeSelectedColor:r,motionDurationMid:o,borderRadius:i,controlItemBgHover:a})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:"static",[`&:has(${e}-drop-indicator)`]:{position:"relative"},[`> *:not(${e}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${o}`,content:'""',borderRadius:i},"&:hover:before":{background:a}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:n,borderRadius:i,[`${e}-switcher, ${e}-draggable-icon`]:{color:r},[`${e}-node-content-wrapper`]:{color:r,background:"transparent","&, &:hover":{color:r},"&:before, &:hover:before":{background:n}}}}}),pwn=new Ca("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),hwn=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),mwn=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${en(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),gwn=(e,t)=>{const{treeCls:n,treeNodeCls:r,treeNodePadding:o,titleHeight:i,indentSize:a,nodeSelectedBg:l,nodeHoverBg:c,colorTextQuaternary:u,controlItemBgActiveDisabled:d}=t;return{[n]:{...ou(t),"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${n}-rtl ${n}-switcher_close ${n}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${n}-active-focused)`]:$S(t),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${r}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:pwn,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[r]:{display:"flex",alignItems:"flex-start",marginBottom:o,lineHeight:en(i),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:o},[`&-disabled ${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${n}-checkbox-disabled + ${n}-node-selected,&${r}-disabled${r}-selected ${n}-node-content-wrapper`]:{backgroundColor:d},[`${n}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${r}-disabled)`]:{[`${n}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${r}-disabled).filter-node ${n}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",[`${n}-draggable-icon`]:{flexShrink:0,width:i,textAlign:"center",visibility:"visible",color:u},[`&${r}-disabled ${n}-draggable-icon`]:{visibility:"hidden"}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:a}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher, ${n}-checkbox`]:{marginInlineEnd:t.calc(t.calc(i).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-switcher`]:{...hwn(e,t),position:"relative",flex:"none",alignSelf:"stretch",width:i,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:i,height:i,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${n}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(i).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(i).div(2).equal()).mul(.8).equal(),height:t.calc(i).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}},[`${n}-node-content-wrapper`]:{position:"relative",minHeight:i,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,...mwn(e,t),"&:hover":{backgroundColor:c},[`&${n}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:l},[`${n}-iconEle`]:{display:"inline-block",width:i,height:i,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${r}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${n}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(i).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${r}-leaf-last ${n}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${en(t.calc(i).div(2).equal())} !important`}}}},ywn=(e,t,n=!0)=>{const r=`.${e}`,o=`${r}-treenode`,i=t.calc(t.paddingXS).div(2).equal(),a=hs(t,{treeCls:r,treeNodeCls:o,treeNodePadding:i});return[gwn(e,a),n&&fwn(a)].filter(Boolean)},bwn=e=>{const{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:r}=e,o=t;return{titleHeight:o,indentSize:o,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:r,nodeSelectedColor:e.colorText}},vwn=e=>{const{colorTextLightSolid:t,colorPrimary:n}=e;return{...bwn(e),directoryNodeSelectedColor:t,directoryNodeSelectedBg:n}},xwn=vl("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:UYe(`${t}-checkbox`,e)},ywn(t,e),kfe(e)],vwn),aIe=4;function wwn(e){const{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:o,direction:i="ltr"}=e,a=i==="ltr"?"left":"right",l=i==="ltr"?"right":"left",c={[a]:-n*o+aIe,[l]:0};switch(t){case-1:c.top=-3;break;case 1:c.bottom=-3;break;default:c.bottom=-3,c[a]=o+aIe;break}return Pe.createElement("div",{style:c,className:`${r}-drop-indicator`})}const Swn=e=>{var h,m;const{prefixCls:t,switcherIcon:n,treeNodeProps:r,showLine:o,switcherLoadingIcon:i}=e,{isLeaf:a,expanded:l,loading:c}=r;if(c)return p.isValidElement(i)?i:p.createElement(EO,{className:`${t}-switcher-loading-icon`});let u;if(o&&typeof o=="object"&&(u=o.showLeafIcon),a){if(!o)return null;if(typeof u!="boolean"&&u){const g=typeof u=="function"?u(r):u,b=`${t}-switcher-line-custom-icon`;return p.isValidElement(g)?Bp(g,{className:Ae((h=g.props)==null?void 0:h.className,b)}):g}return u?p.createElement(XYe,{className:`${t}-switcher-line-icon`}):p.createElement("span",{className:`${t}-switcher-leaf-line`})}const d=`${t}-switcher-icon`,f=typeof n=="function"?n(r):n;return p.isValidElement(f)?Bp(f,{className:Ae((m=f.props)==null?void 0:m.className,d)}):f!==void 0?f:o?l?p.createElement(evn,{className:`${t}-switcher-line-icon`}):p.createElement(rvn,{className:`${t}-switcher-line-icon`}):p.createElement(ubn,{className:d})},OXe=Pe.forwardRef((e,t)=>{var Z;const{getPrefixCls:n,direction:r,className:o,style:i,classNames:a,styles:l}=cu("tree"),{virtual:c}=Pe.useContext(Ho),{prefixCls:u,className:d,showIcon:f=!1,showLine:h,switcherIcon:m,switcherLoadingIcon:g,blockNode:b=!1,children:y,checkable:v=!1,selectable:x=!0,draggable:S,disabled:C,motion:_,style:N,rootClassName:E,classNames:I,styles:A}=e,R=Pe.useContext(Lg),k=C??R,T=n("tree",u),D=n(),O=_??{...ZB(D),motionAppear:!1},z={...e,showIcon:f,blockNode:b,checkable:v,selectable:x,disabled:k,motion:O},[F,U]=Mu([a,I],[l,A],{props:z}),G={...e,checkable:v,selectable:x,showIcon:f,motion:O,blockNode:b,disabled:k,showLine:!!h,dropIndicatorRender:wwn},[W,Y]=xwn(T),[,B]=mp(),$=B.paddingXS/2+(((Z=B.Tree)==null?void 0:Z.titleHeight)||B.controlHeightSM),K=Pe.useMemo(()=>{if(!S)return!1;let J={};switch(typeof S){case"function":J.nodeDraggable=S;break;case"object":J={...S};break}return J.icon!==!1&&(J.icon=J.icon||Pe.createElement(Zbn,null)),J},[S]),q=J=>Pe.createElement(Swn,{prefixCls:T,switcherIcon:m,switcherLoadingIcon:g,treeNodeProps:J,showLine:h});return Pe.createElement(dwn,{itemHeight:$,ref:t,virtual:c,...G,prefixCls:T,className:Ae({[`${T}-icon-hide`]:!f,[`${T}-block-node`]:b,[`${T}-unselectable`]:!x,[`${T}-rtl`]:r==="rtl",[`${T}-disabled`]:k},o,d,W,Y),style:{...i,...N},rootClassName:Ae(F==null?void 0:F.root,E),rootStyle:U==null?void 0:U.root,classNames:F,styles:U,direction:r,checkable:v&&Pe.createElement("span",{className:`${T}-checkbox-inner`}),selectable:x,switcherIcon:q,draggable:K},y)}),sIe=0,$X=1,lIe=2;function mpe(e,t,n){const{key:r,children:o}=n;function i(a){const l=a[r],c=a[o];t(l,a)!==!1&&mpe(c||[],t,n)}e.forEach(i)}function Cwn({treeData:e,expandedKeys:t,startKey:n,endKey:r,fieldNames:o}){const i=[];let a=sIe;if(n&&n===r)return[n];if(!n||!r)return[];function l(c){return c===n||c===r}return mpe(e,c=>{if(a===lIe)return!1;if(l(c)){if(i.push(c),a===sIe)a=$X;else if(a===$X)return a=lIe,!1}else a===$X&&i.push(c);return t.includes(c)},FP(o)),i}function FX(e,t,n){const r=So(t),o=[];return mpe(e,(i,a)=>{const l=r.indexOf(i);return l!==-1&&(o.push(a),r.splice(l,1)),!!r.length},FP(n)),o}function _wn(e){const{isLeaf:t,expanded:n}=e;return t?p.createElement(XYe,null):n?p.createElement(Gbn,null):p.createElement(Kbn,null)}function cIe({treeData:e,children:t}){return e||HYe(t)}const jwn=({defaultExpandAll:e,defaultExpandParent:t,defaultExpandedKeys:n,...r},o)=>{const i=p.useRef(null),a=p.useRef(null),l=()=>{const{keyEntities:E}=ape(cIe(r),{fieldNames:r.fieldNames});let I;return e?I=Object.keys(E):t?I=Roe(r.expandedKeys||n||[],E):I=r.expandedKeys||n||[],I},[c,u]=p.useState(r.selectedKeys||r.defaultSelectedKeys||[]),[d,f]=p.useState(()=>l());p.useEffect(()=>{"selectedKeys"in r&&u(r.selectedKeys)},[r.selectedKeys]),p.useEffect(()=>{"expandedKeys"in r&&f(r.expandedKeys)},[r.expandedKeys]);const h=(E,I)=>{var A;return"expandedKeys"in r||f(E),(A=r.onExpand)==null?void 0:A.call(r,E,I)},m=(E,I)=>{var W;const{multiple:A,fieldNames:R}=r,{node:k,nativeEvent:T}=I,{key:D=""}=k,O=cIe(r),z={...I,selected:!0},F=(T==null?void 0:T.ctrlKey)||(T==null?void 0:T.metaKey),U=T==null?void 0:T.shiftKey;let G;A&&F?(G=E,i.current=D,a.current=G,z.selectedNodes=FX(O,G,R)):A&&U?(G=Array.from(new Set([].concat(So(a.current||[]),So(Cwn({treeData:O,expandedKeys:d,startKey:D,endKey:i.current,fieldNames:R}))))),z.selectedNodes=FX(O,G,R)):(G=[D],i.current=D,a.current=G,z.selectedNodes=FX(O,G,R)),(W=r.onSelect)==null||W.call(r,G,z),"selectedKeys"in r||u(G)},{getPrefixCls:g,direction:b}=p.useContext(Ho),{prefixCls:y,className:v,showIcon:x=!0,expandAction:S="click",...C}=r,_=g("tree",y),N=Ae(`${_}-directory`,{[`${_}-directory-rtl`]:b==="rtl"},v);return p.createElement(OXe,{icon:_wn,ref:o,blockNode:!0,...C,showIcon:x,expandAction:S,prefixCls:_,className:N,expandedKeys:d,selectedKeys:c,onSelect:m,onExpand:h})},Nwn=p.forwardRef(jwn),gpe=OXe;gpe.DirectoryTree=Nwn;gpe.TreeNode=hR;const uIe=e=>{const{value:t,filterSearch:n,tablePrefixCls:r,locale:o,onChange:i}=e;return n?p.createElement("div",{className:`${r}-filter-dropdown-search`},p.createElement($O,{prefix:p.createElement(cR,null),placeholder:o.filterSearchPlaceholder,onChange:i,value:t,htmlSize:1,className:`${r}-filter-dropdown-search-input`})):null},Ewn=e=>{const{keyCode:t}=e;t===Wr.ENTER&&e.stopPropagation()},Pwn=p.forwardRef((e,t)=>p.createElement("div",{className:e.className,onClick:n=>n.stopPropagation(),onKeyDown:Ewn,ref:t},e.children));function M5(e){let t=[];return(e||[]).forEach(({value:n,children:r})=>{t.push(n),r&&(t=[].concat(So(t),So(M5(r))))}),t}function Iwn(e){return e.some(({children:t})=>t)}function DXe(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function LXe({filters:e,prefixCls:t,filteredKeys:n,filterMultiple:r,searchValue:o,filterSearch:i}){return e.map((a,l)=>{const c=String(a.value);if(a.children)return{key:c||l,label:a.text,popupClassName:`${t}-dropdown-submenu`,children:LXe({filters:a.children,prefixCls:t,filteredKeys:n,filterMultiple:r,searchValue:o,filterSearch:i})};const u=r?BP:RO,d={key:a.value!==void 0?c:l,label:p.createElement(p.Fragment,null,p.createElement(u,{checked:n.includes(c)}),p.createElement("span",null,a.text))};return o.trim()?typeof i=="function"?i(o,a)?d:null:DXe(o,a.text)?d:null:d})}function BX(e){return e||[]}const Awn=e=>{var te;const{tablePrefixCls:t,prefixCls:n,column:r,dropdownPrefixCls:o,columnKey:i,filterOnClose:a,filterMultiple:l,filterMode:c="menu",filterSearch:u=!1,filterState:d,triggerFilter:f,locale:h,children:m,getPopupContainer:g,rootClassName:b}=e,{filterResetToDefaultFilteredValue:y,defaultFilteredValue:v,filterDropdownProps:x={},filterDropdownOpen:S,onFilterDropdownOpenChange:C}=r,[_,N]=p.useState(!1),E=!!(d&&((te=d.filteredKeys)!=null&&te.length||d.forceFiltered)),I=ye=>{var ve;N(ye),(ve=x.onOpenChange)==null||ve.call(x,ye),C==null||C(ye)},A=x.open??S??_,R=d==null?void 0:d.filteredKeys,[k,T]=Wdn(BX(R)),D=({selectedKeys:ye})=>{T(ye)},O=(ye,{node:ve,checked:ge})=>{D(l?{selectedKeys:ye}:{selectedKeys:ge&&ve.key?[ve.key]:[]})};p.useEffect(()=>{_&&D({selectedKeys:BX(R)})},[R]);const[z,F]=p.useState([]),U=ye=>{F(ye)},[G,W]=p.useState(""),Y=ye=>{const{value:ve}=ye.target;W(ve)};p.useEffect(()=>{_||W("")},[_]);const B=ye=>{const ve=ye!=null&&ye.length?ye:null;if(ve===null&&(!d||!d.filteredKeys)||ey(ve,d==null?void 0:d.filteredKeys,!0))return null;f({column:r,key:i,filteredKeys:ve})},$=()=>{I(!1),B(k())},K=({confirm:ye,closeDropdown:ve}={confirm:!1,closeDropdown:!1})=>{ye&&B([]),ve&&I(!1),W(""),T(y?(v||[]).map(ge=>String(ge)):[])},q=({closeDropdown:ye}={closeDropdown:!0})=>{ye&&I(!1),B(k())},Z=(ye,ve)=>{ve.source==="trigger"&&(ye&&R!==void 0&&T(BX(R)),I(ye),!ye&&!r.filterDropdown&&a&&$())},J=Ae({[`${o}-menu-without-submenu`]:!Iwn(r.filters||[])}),oe=ye=>{if(ye.target.checked){const ve=M5(r==null?void 0:r.filters).map(ge=>String(ge));T(ve)}else T([])},de=({filters:ye})=>(ye||[]).map((ve,ge)=>{const Ee=String(ve.value),xe={title:ve.text,key:ve.value!==void 0?Ee:String(ge)};return ve.children&&(xe.children=de({filters:ve.children})),xe}),ae=ye=>{var ve;return{...ye,text:ye.title,value:ye.key,children:((ve=ye.children)==null?void 0:ve.map(ge=>ae(ge)))||[]}};let ue;const{direction:ce,renderEmpty:se}=p.useContext(Ho);if(typeof r.filterDropdown=="function")ue=r.filterDropdown({prefixCls:`${o}-custom`,setSelectedKeys:ye=>D({selectedKeys:ye}),selectedKeys:k(),confirm:q,clearFilters:K,filters:r.filters,visible:A,close:()=>{I(!1)}});else if(r.filterDropdown)ue=r.filterDropdown;else{const ye=k()||[],ve=()=>{const Ee=(se==null?void 0:se("Table.filter"))??p.createElement(ux,{image:ux.PRESENTED_IMAGE_SIMPLE,description:h.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((r.filters||[]).length===0)return Ee;if(c==="tree")return p.createElement(p.Fragment,null,p.createElement(uIe,{filterSearch:u,value:G,onChange:Y,tablePrefixCls:t,locale:h}),p.createElement("div",{className:`${t}-filter-dropdown-tree`},l?p.createElement(BP,{checked:ye.length===M5(r.filters).length,indeterminate:ye.length>0&&ye.lengthtypeof u=="function"?u(G,ae(_e)):DXe(G,_e.title):void 0})));const xe=LXe({filters:r.filters||[],filterSearch:u,prefixCls:n,filteredKeys:k(),filterMultiple:l,searchValue:G}),Ne=xe.every(_e=>_e===null);return p.createElement(p.Fragment,null,p.createElement(uIe,{filterSearch:u,value:G,onChange:Y,tablePrefixCls:t,locale:h}),Ne?Ee:p.createElement(oA,{selectable:!0,multiple:l,prefixCls:`${o}-menu`,className:J,onSelect:D,onDeselect:D,selectedKeys:ye,getPopupContainer:g,openKeys:z,onOpenChange:U,items:xe}))},ge=()=>y?ey((v||[]).map(Ee=>String(Ee)),ye,!0):ye.length===0;ue=p.createElement(p.Fragment,null,ve(),p.createElement("div",{className:`${n}-dropdown-btns`},p.createElement(wd,{type:"link",size:"small",disabled:ge(),onClick:()=>K()},h.filterReset),p.createElement(wd,{type:"primary",size:"small",onClick:$},h.filterConfirm)))}r.filterDropdown&&(ue=p.createElement(NYe,{selectable:void 0},ue)),ue=p.createElement(Pwn,{className:`${n}-dropdown`},ue);const fe=qB({trigger:["click"],placement:ce==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let ye;return typeof r.filterIcon=="function"?ye=r.filterIcon(E):r.filterIcon?ye=r.filterIcon:ye=p.createElement(Hbn,null),p.createElement("span",{role:"button",tabIndex:-1,className:Ae(`${n}-trigger`,{active:E}),onClick:ve=>{ve.stopPropagation()}},ye)})(),getPopupContainer:g},{...x,rootClassName:Ae(b,x.rootClassName),open:A,onOpenChange:Z,popupRender:()=>typeof(x==null?void 0:x.dropdownRender)=="function"?x.dropdownRender(ue):ue});return p.createElement("div",{className:`${n}-column`},p.createElement("span",{className:`${t}-column-title`},m),p.createElement(spe,{...fe}))},Boe=(e,t,n)=>{let r=[];return(e||[]).forEach((o,i)=>{const a=cA(i,n),l=o.filterDropdown!==void 0;if(o.filters||l||"onFilter"in o)if("filteredValue"in o){let c=o.filteredValue;l||(c=(c==null?void 0:c.map(String))??c),r.push({column:o,key:BS(o,a),filteredKeys:c,forceFiltered:o.filtered})}else r.push({column:o,key:BS(o,a),filteredKeys:t&&o.defaultFilteredValue?o.defaultFilteredValue:void 0,forceFiltered:o.filtered});"children"in o&&(r=[].concat(So(r),So(Boe(o.children,t,a))))}),r};function $Xe(e,t,n,r,o,i,a,l,c){return n.map((u,d)=>{const f=cA(d,l),{filterOnClose:h=!0,filterMultiple:m=!0,filterMode:g,filterSearch:b}=u;let y=u;if(y.filters||y.filterDropdown){const v=BS(y,f),x=r.find(({key:S})=>v===S);y={...y,title:S=>p.createElement(Awn,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:y,columnKey:v,filterState:x,filterOnClose:h,filterMultiple:m,filterMode:g,filterSearch:b,triggerFilter:i,locale:o,getPopupContainer:a,rootClassName:c},aU(u.title,S))}}return"children"in y&&(y={...y,children:$Xe(e,t,y.children,r,o,i,a,f,c)}),y})}const dIe=e=>{const t={};return e.forEach(({key:n,filteredKeys:r,column:o})=>{const i=n,{filters:a,filterDropdown:l}=o;if(l)t[i]=r||null;else if(Array.isArray(r)){const c=M5(a);t[i]=c.filter(u=>r.includes(String(u)))}else t[i]=null}),t},zoe=(e,t,n)=>t.reduce((o,i)=>{const{column:{onFilter:a,filters:l},filteredKeys:c}=i;return a&&c&&c.length?o.map(u=>({...u})).filter(u=>c.some(d=>{const f=M5(l),h=f.findIndex(g=>String(g)===String(d)),m=h!==-1?f[h]:d;return u[n]&&(u[n]=zoe(u[n],t,n)),a(m,u)})):o},e),FXe=e=>e.flatMap(t=>"children"in t?[t].concat(So(FXe(t.children||[]))):[t]),Twn=e=>{const{prefixCls:t,dropdownPrefixCls:n,mergedColumns:r,onFilterChange:o,getPopupContainer:i,locale:a,rootClassName:l}=e;Rj();const c=p.useMemo(()=>FXe(r||[]),[r]),[u,d]=p.useState(()=>Boe(c,!0)),f=p.useMemo(()=>{const b=Boe(c,!1);if(b.length===0)return b;let y=!0;if(b.forEach(({filteredKeys:v})=>{v!==void 0&&(y=!1)}),y){const v=(c||[]).map((x,S)=>BS(x,cA(S)));return u.filter(({key:x})=>v.includes(x)).map(x=>{const S=c[v.indexOf(x.key)];return{...x,column:{...x.column,...S},forceFiltered:S.filtered}})}return b},[c,u]),h=p.useMemo(()=>dIe(f),[f]),m=b=>{const y=f.filter(({key:v})=>v!==b.key);y.push(b),d(y),o(dIe(y),y)};return[b=>$Xe(t,n,b,f,a,m,i,void 0,l),f,h]},kwn=(e,t,n)=>{const r=p.useRef({});function o(i){var a;if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let c=function(u){u.forEach((d,f)=>{const h=n(d,f);l.set(h,d),d&&typeof d=="object"&&t in d&&c(d[t]||[])})};const l=new Map;c(e),r.current={data:e,childrenColumnName:t,kvMap:l,getRowKey:n}}return(a=r.current.kvMap)==null?void 0:a.get(i)}return[o]},BXe=10;function Mwn(e,t){const n={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(o=>{const i=e[o];typeof i!="function"&&(n[o]=i)}),n}function Rwn(e,t,n){const{total:r=0,...o}=n&&typeof n=="object"?n:{},[i,a]=p.useState(()=>({current:"defaultCurrent"in o?o.defaultCurrent:1,pageSize:"defaultPageSize"in o?o.defaultPageSize:BXe})),l=qB(i,o,{total:r>0?r:e}),c=Math.ceil((r||e)/l.pageSize);l.current>c&&(l.current=c||1);const u=(f,h)=>{a({current:f??1,pageSize:h||l.pageSize})},d=(f,h)=>{var m;n&&((m=n.onChange)==null||m.call(n,f,h)),u(f,h),t(f,h||(l==null?void 0:l.pageSize))};return n===!1?[{},()=>{}]:[{...l,onChange:d},u]}const P8="ascend",zX="descend",mz=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,fIe=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,Own=(e,t)=>t?e[e.indexOf(t)+1]:e[0],Hoe=(e,t,n)=>{let r=[];const o=(i,a)=>{r.push({column:i,key:BS(i,a),multiplePriority:mz(i),sortOrder:i.sortOrder})};return(e||[]).forEach((i,a)=>{const l=cA(a,n);i.children?("sortOrder"in i&&o(i,l),r=[].concat(So(r),So(Hoe(i.children,t,l)))):i.sorter&&("sortOrder"in i?o(i,l):t&&i.defaultSortOrder&&r.push({column:i,key:BS(i,l),multiplePriority:mz(i),sortOrder:i.defaultSortOrder}))}),r},zXe=(e,t,n,r,o,i,a,l,c)=>(t||[]).map((d,f)=>{const h=cA(f,l);let m=d;if(m.sorter){const g=m.sortDirections||o,b=m.showSorterTooltip===void 0?a:m.showSorterTooltip,y=BS(m,h),v=n.find(({key:R})=>R===y),x=v?v.sortOrder:null,S=Own(g,x);let C;if(d.sortIcon)C=d.sortIcon({sortOrder:x});else{const R=g.includes(P8)&&p.createElement(gbn,{className:Ae(`${e}-column-sorter-up`,{active:x===P8})}),k=g.includes(zX)&&p.createElement(pbn,{className:Ae(`${e}-column-sorter-down`,{active:x===zX})});C=p.createElement("span",{className:Ae(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(R&&k)})},p.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},R,k))}const{cancelSort:_,triggerAsc:N,triggerDesc:E}=i||{};let I=_;S===zX?I=E:S===P8&&(I=N);const A=typeof b=="object"?{title:I,...b}:{title:I};m={...m,className:Ae(m.className,{[`${e}-column-sort`]:x}),title:R=>{const k=`${e}-column-sorters`,T=p.createElement("span",{className:`${e}-column-title`},aU(d.title,R)),D=p.createElement("div",{className:k},T,C);return b?typeof b!="boolean"&&(b==null?void 0:b.target)==="sorter-icon"?p.createElement("div",{className:Ae(k,`${k}-tooltip-target-sorter`)},T,p.createElement(Kx,{...A},C)):p.createElement(Kx,{...A},D):D},onHeaderCell:R=>{var F;const k=((F=d.onHeaderCell)==null?void 0:F.call(d,R))||{},T=k.onClick,D=k.onKeyDown;k.onClick=U=>{r({column:d,key:y,sortOrder:S,multiplePriority:mz(d)}),T==null||T(U)},k.onKeyDown=U=>{U.keyCode===Wr.ENTER&&(r({column:d,key:y,sortOrder:S,multiplePriority:mz(d)}),D==null||D(U))};const O=nwn(d.title,{}),z=O==null?void 0:O.toString();return x&&(k["aria-sort"]=x==="ascend"?"ascending":"descending"),k["aria-description"]=c==null?void 0:c.sortable,k["aria-label"]=z||"",k.className=Ae(k.className,`${e}-column-has-sorters`),k.tabIndex=0,d.ellipsis&&(k.title=(O??"").toString()),k}}}return"children"in m&&(m={...m,children:zXe(e,m.children,n,r,o,i,a,h,c)}),m}),pIe=e=>{const{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}},hIe=e=>{const t=e.filter(({sortOrder:n})=>n).map(pIe);if(t.length===0&&e.length){const n=e.length-1;return{...pIe(e[n]),column:void 0,order:void 0,field:void 0,columnKey:void 0}}return t.length<=1?t[0]||{}:t},Voe=(e,t,n)=>{const r=t.slice().sort((a,l)=>l.multiplePriority-a.multiplePriority),o=e.slice(),i=r.filter(({column:{sorter:a},sortOrder:l})=>fIe(a)&&l);return i.length?o.sort((a,l)=>{for(let c=0;c{const l=a[n];return l?{...a,[n]:Voe(l,t,n)}:a}):o},Dwn=e=>{const{prefixCls:t,mergedColumns:n,sortDirections:r,tableLocale:o,showSorterTooltip:i,onSorterChange:a,globalLocale:l}=e,[c,u]=p.useState(()=>Hoe(n,!0)),d=(y,v)=>{const x=[];return y.forEach((S,C)=>{const _=cA(C,v);if(x.push(BS(S,_)),Array.isArray(S.children)){const N=d(S.children,_);x.push.apply(x,So(N))}}),x},f=p.useMemo(()=>{let y=!0;const v=Hoe(n,!1);if(!v.length){const _=d(n);return c.filter(({key:N})=>_.includes(N))}const x=[];function S(_){y?x.push(_):x.push({..._,sortOrder:null})}let C=null;return v.forEach(_=>{C===null?(S(_),_.sortOrder&&(_.multiplePriority===!1?y=!1:C=!0)):(C&&_.multiplePriority!==!1||(y=!1),S(_))}),x},[n,c]),h=p.useMemo(()=>{var v,x;const y=f.map(({column:S,sortOrder:C})=>({column:S,order:C}));return{sortColumns:y,sortColumn:(v=y[0])==null?void 0:v.column,sortOrder:(x=y[0])==null?void 0:x.order}},[f]),m=y=>{let v;y.multiplePriority===!1||!f.length||f[0].multiplePriority===!1?v=[y]:v=[].concat(So(f.filter(({key:x})=>x!==y.key)),[y]),u(v),a(hIe(v),v)};return[y=>zXe(t,y,f,m,r,o,i,void 0,l),f,h,()=>hIe(f)]},HXe=(e,t)=>e.map(r=>{const o={...r};return o.title=aU(r.title,t),"children"in o&&(o.children=HXe(o.children,t)),o}),Lwn=e=>[p.useCallback(n=>HXe(n,e),[e])],$wn=AXe((e,t)=>{const{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),Fwn=kXe((e,t)=>{const{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),Bwn=e=>{const{componentCls:t,lineWidth:n,lineType:r,tableBorderColor:o,tableHeaderBg:i,tablePaddingVertical:a,tablePaddingHorizontal:l,calc:c}=e,u=`${en(n)} ${r} ${o}`,d=(f,h,m)=>({[`&${t}-${f}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${en(c(h).mul(-1).equal())} + ${en(c(c(m).add(n)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:{[`> ${t}-title`]:{border:u,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:u,borderTop:u,[` + > ${t}-content, + > ${t}-header, + > ${t}-body, + > ${t}-summary + `]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:u},"> thead":{"> tr:not(:last-child) > th":{borderBottom:u},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:u}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${en(c(a).mul(-1).equal())} ${en(c(c(l).add(n)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:u,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[` + > tr${t}-expanded-row, + > tr${t}-placeholder + `]:{"> th, > td":{borderInlineEnd:0}}}}},...d("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle),...d("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall),[`> ${t}-footer`]:{border:u,borderTop:0}},[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${en(n)} 0 ${en(n)} ${i}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:u}}}},zwn=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:{...Px,wordBreak:"keep-all",[` + &${t}-cell-fix-start-shadow, + &${t}-cell-fix-end-shadow + `]:{overflow:"visible",[`${t}-cell-content`]:{...Px,display:"block"}},[`${t}-column-title`]:{...Px,wordBreak:"keep-all"}}}}},Hwn=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},Vwn=e=>{const{componentCls:t,antCls:n,motionDurationSlow:r,lineWidth:o,paddingXS:i,lineType:a,tableBorderColor:l,tableExpandIconBg:c,tableExpandColumnWidth:u,borderRadius:d,tablePaddingVertical:f,tablePaddingHorizontal:h,tableExpandedRowBg:m,paddingXXS:g,expandIconMarginTop:b,expandIconSize:y,expandIconHalfInner:v,expandIconScale:x,calc:S}=e,C=`${en(o)} ${a} ${l}`,_=S(g).sub(o).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:u},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:{...jfe(e),position:"relative",float:"left",width:y,height:y,color:"inherit",lineHeight:en(y),background:c,border:C,borderRadius:d,transform:`scale(${x})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${r} ease-out`,content:'""'},"&::before":{top:v,insetInlineEnd:_,insetInlineStart:_,height:o},"&::after":{top:_,bottom:_,insetInlineStart:v,width:o,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}},[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:b,marginInlineEnd:i},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:m}},[`${n}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${en(S(f).mul(-1).equal())} ${en(S(h).mul(-1).equal())}`,padding:`${en(f)} ${en(h)}`}}}},Uwn=e=>{const{componentCls:t,antCls:n,iconCls:r,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:i,paddingXXS:a,paddingXS:l,colorText:c,lineWidth:u,lineType:d,tableBorderColor:f,headerIconColor:h,fontSizeSM:m,tablePaddingHorizontal:g,borderRadius:b,motionDurationSlow:y,colorIcon:v,colorPrimary:x,tableHeaderFilterActiveBg:S,colorTextDisabled:C,tableFilterDropdownBg:_,tableFilterDropdownHeight:N,controlItemBgHover:E,controlItemBgActive:I,boxShadowSecondary:A,filterDropdownMenuBg:R,calc:k}=e,T=`${n}-dropdown`,D=`${t}-filter-dropdown`,O=`${n}-tree`,z=`${en(u)} ${d} ${f}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:k(a).mul(-1).equal(),marginInline:`${en(a)} ${en(k(g).div(2).mul(-1).equal())}`,padding:`0 ${en(a)}`,color:h,fontSize:m,borderRadius:b,cursor:"pointer",transition:`all ${y}`,"&:hover":{color:v,background:S},"&.active":{color:x}}}},{[`${n}-dropdown`]:{[D]:{...ou(e),minWidth:o,backgroundColor:_,borderRadius:b,boxShadow:A,overflow:"hidden",[`${T}-menu`]:{maxHeight:N,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:R,"&:empty::after":{display:"block",padding:`${en(l)} 0`,color:C,fontSize:m,textAlign:"center",content:'"Not Found"'}},[`${D}-tree`]:{paddingBlock:`${en(l)} 0`,paddingInline:l,[O]:{padding:0},[`${O}-treenode ${O}-node-content-wrapper:hover`]:{backgroundColor:E},[`${O}-treenode-checkbox-checked ${O}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:I}}},[`${D}-search`]:{padding:l,borderBottom:z,"&-input":{input:{minWidth:i},[r]:{color:C}}},[`${D}-checkall`]:{width:"100%",marginBottom:a,marginInlineStart:a},[`${D}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${en(k(l).sub(u).equal())} ${en(l)}`,overflow:"hidden",borderTop:z}}}},{[`${n}-dropdown ${D}, ${D}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:l,color:c},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]};function VXe({colorSplit:e}){const t={boxShadow:`inset 10px 0 8px -8px ${e}`},n={boxShadow:`inset -10px 0 8px -8px ${e}`};return[t,n]}const Gwn=e=>{const{componentCls:t,lineWidth:n,motionDurationSlow:r,zIndexTableFixed:o,tableBg:i,calc:a}=e,l=`${t}-cell`,c=`${l}-fix`,u={position:"absolute",top:0,bottom:a(n).mul(-1).equal(),width:30,transition:`box-shadow ${r}`,content:'""',pointerEvents:"none"},[d,f]=VXe(e);return{[`${t}-wrapper`]:{[`${l}${c}`]:{position:"sticky"},[c]:{zIndex:`calc(var(--z-offset-reverse) + ${o})`,background:i,"&:after":u,"&-start:after":{insetInlineStart:"100%"},"&-end:after":{insetInlineEnd:"100%"},"&-start-shadow-show:after":d,"&-end-shadow-show:after":f},[`${t}-container`]:{position:"relative","&:before, &:after":{...u,zIndex:`calc(var(--columns-count) * 2 + ${o} + 1)`},"&:before":{insetInlineStart:0},"&:after":{insetInlineEnd:0}},[`${t}-has-fix-start ${t}-container:before`]:{display:"none"},[`${t}-has-fix-end ${t}-container:after`]:{display:"none"},[`${t}-fix-start-shadow-show ${t}-container:before`]:d,[`${t}-fix-end-shadow-show ${t}-container:after`]:f}}},Wwn=e=>{const{componentCls:t,antCls:n,margin:r}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${n}-pagination`]:{margin:`${en(r)} 0`},[`${t}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"> *":{flex:"none"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"}}}}},qwn=e=>{const{componentCls:t,tableRadius:n}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${en(n)} ${en(n)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${en(n)} ${en(n)}`}}}}},Kwn=e=>{const{componentCls:t}=e,[n,r]=VXe(e);return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${t}-cell-fix`]:{"&-start-shadow-show:after":r,"&-end-shadow-show:after":n},[`${t}-container`]:{[`${t}-row-indent`]:{float:"right"}},[`${t}-fix-start-shadow-show ${t}-container:before`]:r,[`${t}-fix-end-shadow-show ${t}-container:after`]:n}}},Ywn=e=>{const{componentCls:t,antCls:n,iconCls:r,fontSizeIcon:o,padding:i,paddingXS:a,headerIconColor:l,headerIconHoverColor:c,tableSelectionColumnWidth:u,tableSelectedRowBg:d,tableSelectedRowHoverBg:f,tableRowHoverBg:h,tablePaddingHorizontal:m,calc:g}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:u,[`&${t}-selection-col-with-dropdown`]:{width:g(u).add(o).add(g(i).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:g(u).add(g(a).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:g(u).add(o).add(g(i).div(4)).add(g(a).mul(2)).equal()}},[` + table tr th${t}-selection-column, + table tr td${t}-selection-column, + ${t}-selection-column + `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:g(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:en(g(m).div(4).equal()),[r]:{color:l,fontSize:o,verticalAlign:"baseline","&:hover":{color:c}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:d,"&-row-hover":{background:f}}},[`> ${t}-cell-row-hover`]:{background:h}}}}}},Xwn=e=>{const{componentCls:t,tableExpandColumnWidth:n,calc:r}=e,o=(i,a,l,c)=>({[`${t}${t}-${i}`]:{fontSize:c,[` + ${t}-title, + ${t}-footer, + ${t}-cell, + ${t}-thead > tr > th, + ${t}-tbody > tr > th, + ${t}-tbody > tr > td, + tfoot > tr > th, + tfoot > tr > td + `]:{padding:`${en(a)} ${en(l)}`},[`${t}-filter-trigger`]:{marginInlineEnd:en(r(l).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${en(r(a).mul(-1).equal())} ${en(r(l).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:en(r(a).mul(-1).equal()),marginInline:`${en(r(n).sub(l).equal())} ${en(r(l).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:en(r(l).div(4).equal())}}});return{[`${t}-wrapper`]:{...o("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle),...o("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall)}}},Zwn=e=>{const{componentCls:t,marginXXS:n,fontSizeIcon:r,headerIconColor:o,headerIconHoverColor:i}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[` + &${t}-cell-fix-left:hover, + &${t}-cell-fix-right:hover + `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${t}-column-sorter`]:{marginInlineStart:n,color:o,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:r,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:i}}}},Jwn=e=>{const{componentCls:t,opacityLoading:n,tableScrollThumbBg:r,tableScrollThumbBgHover:o,tableScrollThumbSize:i,tableScrollBg:a,stickyScrollBarBorderRadius:l,lineWidth:c,lineType:u,tableBorderColor:d,zIndexTableFixed:f}=e,h=`${en(c)} ${u} ${d}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:`calc(var(--columns-count) * 2 + ${f} + 1)`,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${en(i)} !important`,zIndex:`calc(var(--columns-count) * 2 + ${f} + 1)`,display:"flex",alignItems:"center",background:a,borderTop:h,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:i,backgroundColor:r,borderRadius:l,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:o}}}}}}},mIe=e=>{const{componentCls:t,lineWidth:n,tableBorderColor:r,calc:o}=e,i=`${en(n)} ${e.lineType} ${r}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:i}}},[`div${t}-summary`]:{boxShadow:`0 ${en(o(n).mul(-1).equal())} 0 ${r}`}}}},Qwn=e=>{const{componentCls:t,motionDurationMid:n,lineWidth:r,lineType:o,tableBorderColor:i,calc:a}=e,l=`${en(r)} ${o} ${i}`,c=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[` + & > ${t}-row, + & > div:not(${t}-row) > ${t}-row + `]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:l,transition:`background ${n}`},[`${t}-expanded-row`]:{[`${c}${c}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${en(r)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:l,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:l,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:a(r).mul(-1).equal(),borderInlineStart:l}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:l,borderBottom:l}}}}}},eSn=e=>{const{componentCls:t,fontWeightStrong:n,tablePaddingVertical:r,tablePaddingHorizontal:o,tableExpandColumnWidth:i,lineWidth:a,lineType:l,tableBorderColor:c,tableFontSize:u,tableBg:d,tableRadius:f,tableHeaderTextColor:h,motionDurationMid:m,tableHeaderBg:g,tableHeaderCellSplitColor:b,tableFooterTextColor:y,tableFooterBg:v,calc:x}=e,S=`${en(a)} ${l} ${c}`;return{[`${t}-wrapper`]:{clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg,...rR(),[t]:{...ou(e),fontSize:u,background:d,borderRadius:`${en(f)} ${en(f)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`},table:{width:"100%",textAlign:"start",borderRadius:`${en(f)} ${en(f)} 0 0`,borderCollapse:"separate",borderSpacing:0},[` + ${t}-cell, + ${t}-thead > tr > th, + ${t}-tbody > tr > th, + ${t}-tbody > tr > td, + tfoot > tr > th, + tfoot > tr > td + `]:{position:"relative",padding:`${en(r)} ${en(o)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${en(r)} ${en(o)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:h,fontWeight:n,textAlign:"start",background:g,borderBottom:S,transition:`background ${m} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:b,transform:"translateY(-50%)",transition:`background-color ${m}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${m}, border-color ${m}`,borderBottom:S,[` + > ${t}-wrapper:only-child, + > ${t}-expanded-row-fixed > ${t}-wrapper:only-child + `]:{[t]:{marginBlock:en(x(r).mul(-1).equal()),marginInline:`${en(x(i).sub(o).equal())} + ${en(x(o).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:h,fontWeight:n,textAlign:"start",background:g,borderBottom:S,transition:`background ${m} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${en(r)} ${en(o)}`,color:y,background:v}}}},tSn=e=>{const{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:o,colorFillContent:i,controlItemBgActive:a,controlItemBgActiveHover:l,padding:c,paddingSM:u,paddingXS:d,colorBorderSecondary:f,borderRadiusLG:h,controlHeight:m,colorTextPlaceholder:g,fontSize:b,fontSizeSM:y,lineHeight:v,lineWidth:x,colorIcon:S,colorIconHover:C,opacityLoading:_,controlInteractiveSize:N}=e,E=new Xa(o).onBackground(n).toHexString(),I=new Xa(i).onBackground(n).toHexString(),A=new Xa(t).onBackground(n).toHexString(),R=new Xa(S),k=new Xa(C),T=N/2-x,D=T*2+x*3;return{headerBg:A,headerColor:r,headerSortActiveBg:E,headerSortHoverBg:I,bodySortBg:A,rowHoverBg:A,rowSelectedBg:a,rowSelectedHoverBg:l,rowExpandedBg:t,cellPaddingBlock:c,cellPaddingInline:c,cellPaddingBlockMD:u,cellPaddingInlineMD:d,cellPaddingBlockSM:d,cellPaddingInlineSM:d,borderColor:f,headerBorderRadius:h,footerBg:A,footerColor:r,cellFontSize:b,cellFontSizeMD:b,cellFontSizeSM:b,headerSplitColor:f,fixedHeaderSortActiveBg:E,headerFilterHoverBg:i,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:m,stickyScrollBarBg:g,stickyScrollBarBorderRadius:100,expandIconMarginTop:(b*v-x*3)/2-Math.ceil((y*1.4-x*3)/2),headerIconColor:R.clone().setA(R.a*_).toRgbString(),headerIconHoverColor:k.clone().setA(k.a*_).toRgbString(),expandIconHalfInner:T,expandIconSize:D,expandIconScale:N/D}},nSn=2,rSn=vl("Table",e=>{const{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:o,headerBg:i,headerColor:a,headerSortActiveBg:l,headerSortHoverBg:c,bodySortBg:u,rowHoverBg:d,rowSelectedBg:f,rowSelectedHoverBg:h,rowExpandedBg:m,cellPaddingBlock:g,cellPaddingInline:b,cellPaddingBlockMD:y,cellPaddingInlineMD:v,cellPaddingBlockSM:x,cellPaddingInlineSM:S,borderColor:C,footerBg:_,footerColor:N,headerBorderRadius:E,cellFontSize:I,cellFontSizeMD:A,cellFontSizeSM:R,headerSplitColor:k,fixedHeaderSortActiveBg:T,headerFilterHoverBg:D,filterDropdownBg:O,expandIconBg:z,selectionColumnWidth:F,stickyScrollBarBg:U,calc:G}=e,W=hs(e,{tableFontSize:I,tableBg:r,tableRadius:E,tablePaddingVertical:g,tablePaddingHorizontal:b,tablePaddingVerticalMiddle:y,tablePaddingHorizontalMiddle:v,tablePaddingVerticalSmall:x,tablePaddingHorizontalSmall:S,tableBorderColor:C,tableHeaderTextColor:a,tableHeaderBg:i,tableFooterTextColor:N,tableFooterBg:_,tableHeaderCellSplitColor:k,tableHeaderSortBg:l,tableHeaderSortHoverBg:c,tableBodySortBg:u,tableFixedHeaderSortActiveBg:T,tableHeaderFilterActiveBg:D,tableFilterDropdownBg:O,tableRowHoverBg:d,tableSelectedRowBg:f,tableSelectedRowHoverBg:h,zIndexTableFixed:nSn,tableFontSizeMiddle:A,tableFontSizeSmall:R,tableSelectionColumnWidth:F,tableExpandIconBg:z,tableExpandColumnWidth:G(o).add(G(e.padding).mul(2)).equal(),tableExpandedRowBg:m,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:U,tableScrollThumbBgHover:t,tableScrollBg:n});return[eSn(W),Wwn(W),mIe(W),Zwn(W),Uwn(W),Bwn(W),qwn(W),Vwn(W),mIe(W),Hwn(W),Ywn(W),Gwn(W),Jwn(W),zwn(W),Xwn(W),Kwn(W),Qwn(W)]},tSn,{resetFont:!1,unitless:{expandIconScale:!0}}),gIe=[],oSn=(e,t)=>{var Xe;const{prefixCls:n,className:r,rootClassName:o,style:i,classNames:a,styles:l,size:c,bordered:u,dropdownPrefixCls:d,dataSource:f,pagination:h,rowSelection:m,rowKey:g,rowClassName:b,columns:y,children:v,childrenColumnName:x,onChange:S,getPopupContainer:C,loading:_,expandIcon:N,expandable:E,expandedRowRender:I,expandIconColumnIndex:A,indentSize:R,scroll:k,sortDirections:T,locale:D,showSorterTooltip:O={target:"full-header"},virtual:z}=e;Rj();const F=p.useMemo(()=>y||dpe(v),[y,v]),U=p.useMemo(()=>F.some(yt=>yt.responsive),[F]),G=Yfe(U),W=p.useMemo(()=>{const yt=new Set(Object.keys(G).filter(Mt=>G[Mt]));return F.filter(Mt=>!Mt.responsive||Mt.responsive.some(tn=>yt.has(tn)))},[F,G]),Y=$l(e,["className","style","columns"]),{locale:B=ty,table:$}=p.useContext(Ho),{getPrefixCls:K,direction:q,renderEmpty:Z,getPopupContainer:J,className:oe,style:de,classNames:ae,styles:ue}=cu("table"),ce=fy(c),se={...e,size:ce,bordered:u},[me,fe]=Mu([ae,a],[ue,l],{props:se},{pagination:{_default:"root"},header:{_default:"wrapper"},body:{_default:"wrapper"}}),te={...B.Table,...D},[ye]=dy("global",ty.global),ve=f||gIe,ge=K("table",n),Ee=K("dropdown",d),[,xe]=mp(),Ne=Mf(ge),[_e,Be]=rSn(ge,Ne),Te={childrenColumnName:x,expandIconColumnIndex:A,...E,expandIcon:(E==null?void 0:E.expandIcon)??((Xe=$==null?void 0:$.expandable)==null?void 0:Xe.expandIcon)},{childrenColumnName:Ge="children"}=Te,Ze=p.useMemo(()=>ve.some(yt=>yt==null?void 0:yt[Ge])?"nest":I||E!=null&&E.expandedRowRender?"row":null,[Ge,ve]),ht={body:p.useRef(null)},Oe=twn(ge),ft=p.useRef(null),Qe=p.useRef(null);Gdn(t,()=>({...Qe.current,nativeElement:ft.current}));const De=g||($==null?void 0:$.rowKey)||"key",st=p.useMemo(()=>typeof De=="function"?De:yt=>yt==null?void 0:yt[De],[De]),[vt]=kwn(ve,Ge,st),qe={},Ye=(yt,Mt,tn=!1)=>{var Tn,Fn,mr,fr;const mn={...qe,...yt};tn&&((Tn=qe.resetPagination)==null||Tn.call(qe),(Fn=mn.pagination)!=null&&Fn.current&&(mn.pagination.current=1),h&&((fr=h.onChange)==null||fr.call(h,1,(mr=mn.pagination)==null?void 0:mr.pageSize))),k&&k.scrollToFirstRowOnChange!==!1&&ht.body.current&&rfn(0,{getContainer:()=>ht.body.current}),S==null||S(mn.pagination,mn.filters,mn.sorter,{currentDataSource:zoe(Voe(ve,mn.sorterStates,Ge),mn.filterStates,Ge),action:Mt})},mt=(yt,Mt)=>{Ye({sorter:yt,sorterStates:Mt},"sort",!1)},[Et,vn,gt,Fe]=Dwn({prefixCls:ge,mergedColumns:W,onSorterChange:mt,sortDirections:T||["ascend","descend"],tableLocale:te,showSorterTooltip:O,globalLocale:ye}),$e=p.useMemo(()=>Voe(ve,vn,Ge),[Ge,ve,vn]);qe.sorter=Fe(),qe.sorterStates=vn;const nt=(yt,Mt)=>{Ye({filters:yt,filterStates:Mt},"filter",!0)},[wt,Dt,on]=Twn({prefixCls:ge,locale:te,dropdownPrefixCls:Ee,mergedColumns:W,onFilterChange:nt,getPopupContainer:C||J,rootClassName:Ae(o,Ne)}),jn=zoe($e,Dt,Ge);qe.filters=on,qe.filterStates=Dt;const kt=p.useMemo(()=>{const yt={};return Object.keys(on).forEach(Mt=>{on[Mt]!==null&&(yt[Mt]=on[Mt])}),{...gt,filters:yt}},[gt,on]),[pn]=Lwn(kt),tt=(yt,Mt)=>{Ye({pagination:{...qe.pagination,current:yt,pageSize:Mt}},"paginate")},[jt,Nn]=Rwn(jn.length,tt,h);qe.pagination=h===!1?{}:Mwn(jt,h),qe.resetPagination=Nn;const Xt=p.useMemo(()=>{if(h===!1||!jt.pageSize)return jn;const{current:yt=1,total:Mt,pageSize:tn=BXe}=jt;return jn.lengthtn?jn.slice((yt-1)*tn,yt*tn):jn:jn.slice((yt-1)*tn,yt*tn)},[!!h,jn,jt==null?void 0:jt.current,jt==null?void 0:jt.pageSize,jt==null?void 0:jt.total]),[ln,un]=Q1n({prefixCls:ge,data:jn,pageData:Xt,getRowKey:st,getRecordByKey:vt,expandType:Ze,childrenColumnName:Ge,locale:te,getPopupContainer:C||J},m),Kt=(yt,Mt,tn)=>{const mn=typeof b=="function"?b(yt,Mt,tn):b;return Ae({[`${ge}-row-selected`]:un.has(st(yt,Mt))},mn)};Te.__PARENT_RENDER_ICON__=Te.expandIcon,Te.expandIcon=Te.expandIcon||N||ewn(te),Ze==="nest"&&Te.expandIconColumnIndex===void 0?Te.expandIconColumnIndex=m?1:0:Te.expandIconColumnIndex>0&&m&&(Te.expandIconColumnIndex-=1),typeof Te.indentSize!="number"&&(Te.indentSize=typeof R=="number"?R:15);const On=p.useCallback(yt=>pn(ln(wt(Et(yt)))),[Et,wt,ln]);let Pr,ur;if(h!==!1&&(jt!=null&&jt.total)){let yt;jt.size?yt=jt.size:yt=ce==="small"||ce==="middle"?"small":void 0;const Mt=(mr="end")=>p.createElement(Ixn,{...jt,classNames:me.pagination,styles:fe.pagination,className:Ae(`${ge}-pagination ${ge}-pagination-${mr}`,jt.className),size:yt}),{placement:tn,position:mn}=jt,Tn=tn??mn,Fn=mr=>{const fr=mr.toLowerCase();return fr.includes("center")?"center":fr.includes("left")||fr.includes("start")?"start":"end"};if(Array.isArray(Tn)){const[mr,fr]=["top","bottom"].map(Me=>Tn.find(Ie=>Ie.includes(Me))),En=Tn.every(Me=>`${Me}`=="none");!mr&&!fr&&!En&&(ur=Mt()),mr&&(Pr=Mt(Fn(mr))),fr&&(ur=Mt(Fn(fr)))}else ur=Mt()}const Ht=p.useMemo(()=>typeof _=="boolean"?{spinning:_}:typeof _=="object"&&_!==null?{spinning:!0,..._}:void 0,[_]),Tt=Ae(Be,Ne,`${ge}-wrapper`,oe,{[`${ge}-wrapper-rtl`]:q==="rtl"},r,o,me.root,_e),Zt={...fe.root,...de,...i},Ut=p.useMemo(()=>Ht!=null&&Ht.spinning&&ve===gIe?null:typeof(D==null?void 0:D.emptyText)<"u"?D.emptyText:(Z==null?void 0:Z("Table"))||p.createElement(JKe,{componentName:"Table"}),[Ht==null?void 0:Ht.spinning,ve,D==null?void 0:D.emptyText,Z]),Sn=z?Fwn:$wn,Mn={},lt=p.useMemo(()=>{const{fontSize:yt,lineHeight:Mt,lineWidth:tn,padding:mn,paddingXS:Tn,paddingSM:Fn}=xe,mr=Math.floor(yt*Mt);switch(ce){case"middle":return Fn*2+mr+tn;case"small":return Tn*2+mr+tn;default:return mn*2+mr+tn}},[xe,ce]);return z&&(Mn.listItemHeight=lt),p.createElement("div",{ref:ft,className:Tt,style:Zt},p.createElement(hXe,{spinning:!1,...Ht},Pr,p.createElement(Sn,{...Mn,...Y,classNames:me,styles:fe,ref:Qe,columns:W,direction:q,expandable:Te,prefixCls:ge,className:Ae({[`${ge}-middle`]:ce==="middle",[`${ge}-small`]:ce==="small",[`${ge}-bordered`]:u,[`${ge}-empty`]:ve.length===0},Be,Ne,_e),data:Xt,rowKey:st,rowClassName:Kt,emptyText:Ut,internalHooks:FO,internalRefs:ht,transformColumns:On,getContainerWidth:Oe,measureRowRender:yt=>p.createElement(g1,{getPopupContainer:Mt=>Mt},yt)}),ur))},iSn=p.forwardRef(oSn),aSn=(e,t)=>{const n=p.useRef(0);return n.current+=1,p.createElement(iSn,{...e,ref:t,_renderTimes:n.current})},hy=p.forwardRef(aSn);hy.SELECTION_COLUMN=gw;hy.EXPAND_COLUMN=Tw;hy.SELECTION_ALL=Ooe;hy.SELECTION_INVERT=Doe;hy.SELECTION_NONE=Loe;hy.Column=U1n;hy.ColumnGroup=G1n;hy.Summary=vXe;const sSn=(e,t,n,r)=>{const{titleMarginBottom:o,fontWeightStrong:i}=r;return{marginBottom:o,color:n,fontWeight:i,fontSize:e,lineHeight:t}},lSn=e=>{const t=[1,2,3,4,5],n={};return t.forEach(r=>{n[` + h${r}&, + div&-h${r}, + div&-h${r} > textarea, + h${r} + `]=sSn(e[`fontSizeHeading${r}`],e[`lineHeightHeading${r}`],e.colorTextHeading,e)}),n},cSn=e=>{const{componentCls:t}=e;return{"a&, a":{...jfe(e),userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}}}},uSn=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:UB[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),dSn=e=>{const{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},fSn=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),pSn=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),hSn=e=>{const{componentCls:t,titleMarginTop:n}=e;return{[t]:{color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"},...lSn(e),[` + & + h1${t}, + & + h2${t}, + & + h3${t}, + & + h4${t}, + & + h5${t} + `]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}},...uSn(e),...cSn(e),[` + ${t}-expand, + ${t}-collapse, + ${t}-edit, + ${t}-copy + `]:{...jfe(e),marginInlineStart:e.marginXXS},...dSn(e),...fSn(e),...pSn(),"&-rtl":{direction:"rtl"}}}},mSn=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),UXe=vl("Typography",hSn,mSn),gSn=e=>{const{prefixCls:t,"aria-label":n,className:r,style:o,direction:i,maxLength:a,autoSize:l=!0,value:c,onSave:u,onCancel:d,onEnd:f,component:h,enterIcon:m=p.createElement(kbn,null)}=e,g=p.useRef(null),b=p.useRef(!1),y=p.useRef(null),[v,x]=p.useState(c);p.useEffect(()=>{x(c)},[c]),p.useEffect(()=>{var D;if((D=g.current)!=null&&D.resizableTextArea){const{textArea:O}=g.current.resizableTextArea;O.focus();const{length:z}=O.value;O.setSelectionRange(z,z)}},[]);const S=({target:D})=>{x(D.value.replace(/[\n\r]/g,""))},C=()=>{b.current=!0},_=()=>{b.current=!1},N=({keyCode:D})=>{b.current||(y.current=D)},E=()=>{u(v.trim())},I=({keyCode:D,ctrlKey:O,altKey:z,metaKey:F,shiftKey:U})=>{y.current!==D||b.current||O||z||F||U||(D===Wr.ENTER?(E(),f==null||f()):D===Wr.ESC&&d())},A=()=>{E()},[R,k]=UXe(t),T=Ae(t,`${t}-edit-content`,{[`${t}-rtl`]:i==="rtl",[`${t}-${h}`]:!!h},r,R,k);return p.createElement("div",{className:T,style:o},p.createElement(lXe,{ref:g,maxLength:a,value:v,onChange:S,onKeyDown:N,onKeyUp:I,onCompositionStart:C,onCompositionEnd:_,onBlur:A,"aria-label":n,rows:1,autoSize:l}),m!==null?Bp(m,{className:`${t}-edit-content-confirm`}):null)},ySn=(e,t)=>{let n=!1;const r=o=>{var i,a,l;o.stopPropagation(),o.preventDefault(),(i=o.clipboardData)==null||i.clearData(),(a=o.clipboardData)==null||a.setData("text/plain",e),t&&((l=o.clipboardData)==null||l.setData("text/html",e)),n=!0};try{return document.addEventListener("copy",r,{capture:!0}),document.execCommand("copy"),n}catch{return!1}finally{document.removeEventListener("copy",r,{capture:!0})}},bSn=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function vSn(e,t){if(typeof e!="string")return!1;const n=(t==null?void 0:t.format)==="text/html";return!!(await bSn(e,n)||ySn(e,n))}const xSn=({copyConfig:e,children:t})=>{const[n,r]=p.useState(!1),[o,i]=p.useState(!1),a=p.useRef(null),l=()=>{a.current&&clearTimeout(a.current)},c={};e.format&&(c.format=e.format),p.useEffect(()=>l,[]);const u=Xo(async d=>{var f;d==null||d.preventDefault(),d==null||d.stopPropagation(),i(!0);try{const h=typeof e.text=="function"?await e.text():e.text;await vSn(h||zxn(t,!0).join("")||"",c),i(!1),r(!0),l(),a.current=setTimeout(()=>{r(!1)},3e3),(f=e.onCopy)==null||f.call(e,d)}catch(h){throw i(!1),h}});return{copied:n,copyLoading:o,onClick:u}};function HX(e,t){return p.useMemo(()=>{const n=!!e;return[n,{...t,...n&&typeof e=="object"?e:null}]},[e])}const wSn=e=>{const t=p.useRef(void 0);return p.useEffect(()=>{t.current=e}),t.current},SSn=(e,t,n)=>p.useMemo(()=>e===!0?{title:t??n}:p.isValidElement(e)?{title:e}:typeof e=="object"?{title:t??n,...e}:{title:e},[e,t,n]),GXe=p.forwardRef((e,t)=>{const{prefixCls:n,component:r="article",className:o,rootClassName:i,children:a,direction:l,style:c,...u}=e,{getPrefixCls:d,direction:f,className:h,style:m}=cu("typography"),g=l??f,b=d("typography",n),[y,v]=UXe(b),x=Ae(b,h,{[`${b}-rtl`]:g==="rtl"},o,i,y,v),S={...m,...c};return p.createElement(r,{className:x,style:S,ref:t,...u},a)});function yIe(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function VX(e,t,n){return e===!0||e===void 0?t:e||n&&t}function CSn(e){const t=document.createElement("em");e.appendChild(t);const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}const ype=e=>["string","number"].includes(typeof e),_Sn=({prefixCls:e,copied:t,locale:n,iconOnly:r,tooltips:o,icon:i,tabIndex:a,onCopy:l,loading:c})=>{const u=yIe(o),d=yIe(i),{copied:f,copy:h}=n??{},m=t?f:h,g=VX(u[t?1:0],m),b=typeof g=="string"?g:m;return p.createElement(Kx,{title:g},p.createElement("button",{type:"button",className:Ae(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:r}),onClick:l,"aria-label":b,tabIndex:a},t?VX(d[1],p.createElement(QKe,null),!0):VX(d[0],c?p.createElement(EO,null):p.createElement(vbn,null),!0)))},v6=p.forwardRef(({style:e,children:t},n)=>{const r=p.useRef(null);return p.useImperativeHandle(n,()=>({isExceed:()=>{const o=r.current;return o.scrollHeight>o.clientHeight},getHeight:()=>r.current.clientHeight})),p.createElement("span",{"aria-hidden":!0,ref:r,style:{position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)",...e}},t)}),jSn=e=>e.reduce((t,n)=>t+(ype(n)?String(n).length:1),0);function bIe(e,t){let n=0;const r=[];for(let o=0;ot){const u=t-n;return r.push(String(i).slice(0,u)),r}r.push(i),n=c}return e}const UX=0,GX=1,WX=2,qX=3,vIe=4,x6={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function NSn(e){const{enableMeasure:t,width:n,text:r,children:o,rows:i,expanded:a,miscDeps:l,onEllipsis:c}=e,u=p.useMemo(()=>$p(r),[r]),d=p.useMemo(()=>jSn(u),[r]),f=p.useMemo(()=>o(u,!1),[r]),[h,m]=p.useState(null),g=p.useRef(null),b=p.useRef(null),y=p.useRef(null),v=p.useRef(null),x=p.useRef(null),[S,C]=p.useState(!1),[_,N]=p.useState(UX),[E,I]=p.useState(0),[A,R]=p.useState(null);ai(()=>{N(t&&n&&d?GX:UX)},[n,r,i,t,u]),ai(()=>{var O,z,F,U;if(_===GX){N(WX);const G=b.current&&getComputedStyle(b.current).whiteSpace;R(G)}else if(_===WX){const G=!!((O=y.current)!=null&&O.isExceed());N(G?qX:vIe),m(G?[0,d]:null),C(G);const W=((z=y.current)==null?void 0:z.getHeight())||0,Y=i===1?0:((F=v.current)==null?void 0:F.getHeight())||0,B=((U=x.current)==null?void 0:U.getHeight())||0,$=Math.max(W,Y+B);I($+1),c(G)}},[_]);const k=h?Math.ceil((h[0]+h[1])/2):0;ai(()=>{var F;const[O,z]=h||[0,0];if(O!==z){const G=(((F=g.current)==null?void 0:F.getHeight())||0)>E;let W=k;z-O===1&&(W=G?O:z),m(G?[O,W]:[W,z])}},[h,k]);const T=p.useMemo(()=>{if(!t)return o(u,!1);if(_!==qX||!h||h[0]!==h[1]){const O=o(u,!1);return[vIe,UX].includes(_)?O:p.createElement("span",{style:{...x6,WebkitLineClamp:i}},O)}return o(a?u:bIe(u,h[0]),S)},[a,_,h,u].concat(So(l))),D={width:n,margin:0,padding:0,whiteSpace:A==="nowrap"?"normal":"inherit"};return p.createElement(p.Fragment,null,T,_===WX&&p.createElement(p.Fragment,null,p.createElement(v6,{style:{...D,...x6,WebkitLineClamp:i},ref:y},f),p.createElement(v6,{style:{...D,...x6,WebkitLineClamp:i-1},ref:v},f),p.createElement(v6,{style:{...D,...x6,WebkitLineClamp:1},ref:x},o([],!0))),_===qX&&h&&h[0]!==h[1]&&p.createElement(v6,{style:{...D,top:400},ref:g},o(bIe(u,k),!0)),_===GX&&p.createElement("span",{style:{whiteSpace:"inherit"},ref:b}))}const ESn=({enableEllipsis:e,isEllipsis:t,children:n,tooltipProps:r})=>!(r!=null&&r.title)||!e?n:p.createElement(Kx,{open:t?void 0:!1,...r},n);function PSn({mark:e,code:t,underline:n,delete:r,strong:o,keyboard:i,italic:a},l){let c=l;function u(d,f){f&&(c=p.createElement(d,{},c))}return u("strong",o),u("u",n),u("del",r),u("code",t),u("mark",e),u("kbd",i),u("i",a),c}const ISn="...",xIe=["delete","mark","code","underline","strong","keyboard","italic"],sU=p.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,type:i,disabled:a,children:l,ellipsis:c,editable:u,copyable:d,component:f,title:h,...m}=e,{getPrefixCls:g,direction:b}=p.useContext(Ho),[y]=dy("Text"),v=p.useRef(null),x=p.useRef(null),S=g("typography",n),C=$l(m,xIe),[_,N]=HX(u),[E,I]=Ku(!1,N.editing),{triggerType:A=["icon"]}=N,R=Ye=>{var mt;Ye&&((mt=N.onStart)==null||mt.call(N)),I(Ye)},k=wSn(E);ai(()=>{var Ye;!E&&k&&((Ye=x.current)==null||Ye.focus())},[E]);const T=Ye=>{Ye==null||Ye.preventDefault(),R(!0)},D=Ye=>{var mt;(mt=N.onChange)==null||mt.call(N,Ye),R(!1)},O=()=>{var Ye;(Ye=N.onCancel)==null||Ye.call(N),R(!1)},[z,F]=HX(d),{copied:U,copyLoading:G,onClick:W}=xSn({copyConfig:F,children:l}),[Y,B]=p.useState(!1),[$,K]=p.useState(!1),[q,Z]=p.useState(!1),[J,oe]=p.useState(!1),[de,ae]=p.useState(!0),[ue,ce]=HX(c,{expandable:!1,symbol:Ye=>Ye?y==null?void 0:y.collapse:y==null?void 0:y.expand}),[se,me]=Ku(ce.defaultExpanded||!1,ce.expanded),fe=ue&&(!se||ce.expandable==="collapsible"),{rows:te=1}=ce,ye=p.useMemo(()=>fe&&(ce.suffix!==void 0||ce.onEllipsis||ce.expandable||_||z),[fe,ce,_,z]);ai(()=>{ue&&!ye&&(B(H5e("webkitLineClamp")),K(H5e("textOverflow")))},[ye,ue]);const[ve,ge]=p.useState(fe),Ee=p.useMemo(()=>ye?!1:te===1?$:Y,[ye,$,Y]);ai(()=>{ge(Ee&&fe)},[Ee,fe]);const xe=fe&&(ve?J:q),Ne=fe&&te===1&&ve,_e=fe&&te>1&&ve,Be=(Ye,mt)=>{var Et;me(mt.expanded),(Et=ce.onExpand)==null||Et.call(ce,Ye,mt)},[Te,Ge]=p.useState(0),Ze=({offsetWidth:Ye})=>{Ge(Ye)},ht=Ye=>{var mt;Z(Ye),q!==Ye&&((mt=ce.onEllipsis)==null||mt.call(ce,Ye))};p.useEffect(()=>{const Ye=v.current;if(ue&&ve&&Ye){const mt=CSn(Ye);J!==mt&&oe(mt)}},[ue,ve,l,_e,de,Te]),p.useEffect(()=>{const Ye=v.current;if(typeof IntersectionObserver>"u"||!Ye||!ve||!fe)return;const mt=new IntersectionObserver(()=>{ae(!!Ye.offsetParent)});return mt.observe(Ye),()=>{mt.disconnect()}},[ve,fe]);const Oe=SSn(ce.tooltip,N.text,l),ft=p.useMemo(()=>{if(!(!ue||ve))return[N.text,l,h,Oe.title].find(ype)},[ue,ve,h,Oe.title,xe]);if(E)return p.createElement(gSn,{value:N.text??(typeof l=="string"?l:""),onSave:D,onCancel:O,onEnd:N.onEnd,prefixCls:S,className:r,style:o,direction:b,component:f,maxLength:N.maxLength,autoSize:N.autoSize,enterIcon:N.enterIcon});const Qe=()=>{const{expandable:Ye,symbol:mt}=ce;return Ye?p.createElement("button",{type:"button",key:"expand",className:`${S}-${se?"collapse":"expand"}`,onClick:Et=>Be(Et,{expanded:!se}),"aria-label":se?y.collapse:y==null?void 0:y.expand},typeof mt=="function"?mt(se):mt):null},De=()=>{if(!_)return;const{icon:Ye,tooltip:mt,tabIndex:Et}=N,vn=$p(mt)[0]||(y==null?void 0:y.edit),gt=typeof vn=="string"?vn:"";return A.includes("icon")?p.createElement(Kx,{key:"edit",title:mt===!1?"":vn},p.createElement("button",{type:"button",ref:x,className:`${S}-edit`,onClick:T,"aria-label":gt,tabIndex:Et},Ye||p.createElement(Ibn,{role:"button"}))):null},st=()=>z?p.createElement(_Sn,{key:"copy",...F,prefixCls:S,copied:U,locale:y,onCopy:W,loading:G,iconOnly:!Fp(l)}):null,vt=Ye=>[Ye&&Qe(),De(),st()],qe=Ye=>[Ye&&!se&&p.createElement("span",{"aria-hidden":!0,key:"ellipsis"},ISn),ce.suffix,vt(Ye)];return p.createElement(Wg,{onResize:Ze,disabled:!fe},Ye=>p.createElement(ESn,{tooltipProps:Oe,enableEllipsis:fe,isEllipsis:xe},p.createElement(GXe,{className:Ae({[`${S}-${i}`]:i,[`${S}-disabled`]:a,[`${S}-ellipsis`]:ue,[`${S}-ellipsis-single-line`]:Ne,[`${S}-ellipsis-multiple-line`]:_e},r),prefixCls:n,style:{...o,WebkitLineClamp:_e?te:void 0},component:f,ref:hp(Ye,v,t),direction:b,onClick:A.includes("text")?T:void 0,"aria-label":ft==null?void 0:ft.toString(),title:h,...C},p.createElement(NSn,{enableMeasure:fe&&!ve,text:l,rows:te,width:Te,onEllipsis:ht,expanded:se,miscDeps:[U,se,G,_,z,y].concat(So(xIe.map(mt=>e[mt])))},(mt,Et)=>PSn(e,p.createElement(p.Fragment,null,mt.length>0&&Et&&!se&&ft?p.createElement("span",{key:"show-content","aria-hidden":!0},mt):mt,qe(Et)))))))}),ASn=p.forwardRef((e,t)=>{const{ellipsis:n,rel:r,children:o,navigate:i,...a}=e,l={...a,rel:r===void 0&&a.target==="_blank"?"noopener noreferrer":r};return p.createElement(sU,{...l,ref:t,ellipsis:!!n,component:"a"},o)}),TSn=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.createElement(sU,{ref:t,...r,component:"div"},n)}),kSn=(e,t)=>{const{ellipsis:n,children:r,...o}=e,i=p.useMemo(()=>n&&typeof n=="object"?$l(n,["expandable","rows"]):n,[n]);return p.createElement(sU,{ref:t,...o,ellipsis:i,component:"span"},r)},MSn=p.forwardRef(kSn),RSn=[1,2,3,4,5],OSn=p.forwardRef((e,t)=>{const{level:n=1,children:r,...o}=e,i=RSn.includes(n)?`h${n}`:"h1";return p.createElement(sU,{ref:t,...o,component:i},r)}),uA=GXe;uA.Text=MSn;uA.Link=ASn;uA.Title=OSn;uA.Paragraph=TSn;const WXe=({transactions:e,onTransactionSelect:t})=>{const[n,r]=p.useState(""),[o,i]=p.useState(""),[a,l]=p.useState(e);p.useEffect(()=>{l(e)},[e]);const c=(m,g,b)=>{g(),r(m[0]),i(b)},u=m=>{m(),r("")},d=m=>({filterDropdown:({setSelectedKeys:g,selectedKeys:b,confirm:y,clearFilters:v})=>s.jsxs("div",{style:{padding:8},children:[s.jsx(FS,{placeholder:`Search ${m}`,value:b[0],onChange:x=>g(x.target.value?[x.target.value]:[]),onPressEnter:()=>c(b,y,m),style:{marginBottom:8,display:"block"}}),s.jsxs(iA,{children:[s.jsx(wd,{type:"primary",onClick:()=>c(b,y,m),icon:s.jsx(cR,{}),size:"small",style:{width:90},children:"Search"}),s.jsx(wd,{onClick:()=>u(v),size:"small",style:{width:90},children:"Reset"}),s.jsx(wd,{type:"link",size:"small",onClick:()=>{y({closeDropdown:!1}),r(b[0]),i(m)},children:"Filter"})]})]}),filterIcon:g=>s.jsx(cR,{style:{color:g?"#1890ff":void 0}}),onFilter:(g,b)=>b[m]?b[m].toString().toLowerCase().includes(g.toString().toLowerCase()):"",onFilterDropdownVisibleChange:g=>{},render:g=>o===m?s.jsx("span",{children:g.split(new RegExp(`(?<=(.))(${n})`,"i")).map((b,y,v)=>(v.length,y>0?s.jsxs(Pe.Fragment,{children:[y===1&&s.jsx("span",{children:n}),b]},`${g}-${y}`):b))}):g}),f=[{title:"Date",dataIndex:"date",key:"date",...d("date")},{title:"Description",dataIndex:"description",key:"description",...d("description")},{title:"Amount",dataIndex:"amount",key:"amount",sorter:(m,g)=>m.amount-g.amount},{title:"Category",dataIndex:"category",key:"category",...d("category")}],h={onChange:(m,g)=>{t&&g.length>0&&t(g[0])},type:"radio"};return s.jsx(hy,{rowSelection:h,columns:f,dataSource:a,rowKey:"id"})},DSn=Object.freeze(Object.defineProperty({__proto__:null,default:WXe},Symbol.toStringTag,{value:"Module"})),KX=[{id:"1",name:"Main Checking",accountNumberDisplay:"...1234",balance:12500.5,currency:"USD",status:"active",type:"checking",customerId:"c1",institutionId:"i1",institutionLoginId:1,createdDate:1625097600,balanceDate:1679e6},{id:"2",name:"Savings",accountNumberDisplay:"...5678",balance:5e4,currency:"USD",status:"active",type:"savings",customerId:"c1",institutionId:"i1",institutionLoginId:1,createdDate:1625097600,balanceDate:1679e6}],LSn=[{id:"t1",amount:-50,date:"2023-10-27",description:"Grocery Store",category:"Food",type:"debit"},{id:"t2",amount:1500,date:"2023-10-26",description:"Paycheck",category:"Income",type:"credit"},{id:"t3",amount:-120,date:"2023-10-25",description:"Electric Bill",category:"Utilities",type:"debit"}],wIe=({text:e})=>s.jsxs("div",{className:"flex flex-col items-center justify-center p-10",children:[s.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-cyan-500 mb-3"}),e&&s.jsx("p",{className:"text-gray-400",children:e})]}),$Sn=({message:e,onRetry:t})=>s.jsxs("div",{className:"p-4 bg-red-900/20 border border-red-500/50 rounded-lg text-center",children:[s.jsx("p",{className:"text-red-400 mb-2",children:e}),t&&s.jsx("button",{onClick:t,className:"text-sm text-white bg-red-600 px-3 py-1 rounded hover:bg-red-500 transition",children:"Retry"})]}),FSn=({title:e,subtitle:t,buttonText:n,onButtonClick:r})=>s.jsxs("div",{className:"flex justify-between items-center mb-6 pb-4 border-b border-gray-700",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-white",children:e}),t&&s.jsx("p",{className:"text-gray-400 text-sm mt-1",children:t})]}),n&&r&&s.jsx("button",{onClick:r,className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 text-white rounded-lg font-medium transition shadow-lg",children:n})]}),BSn=()=>{const[e,t]=p.useState([]),[n,r]=p.useState(!0),[o,i]=p.useState(null),[a,l]=p.useState(null),[c,u]=p.useState([]),[d,f]=p.useState(!1);p.useEffect(()=>{(async()=>{r(!0);try{await new Promise(g=>setTimeout(g,800)),t(KX),KX.length>0&&l(KX[0])}catch{i("Failed to load accounts.")}finally{r(!1)}})()},[]),p.useEffect(()=>{a&&(f(!0),setTimeout(()=>{u(LSn),f(!1)},600))},[a]);const h=m=>{const g=e.find(b=>b.id===m);g&&l(g)};return n?s.jsx(wIe,{text:"Loading financial accounts..."}):o?s.jsx($Sn,{message:o,onRetry:()=>window.location.reload()}):s.jsxs("div",{className:"p-6 max-w-7xl mx-auto",children:[s.jsx(FSn,{title:"Accounts Overview",subtitle:"Manage your connected financial institutions.",buttonText:"Link New Account",onButtonClick:()=>alert("Link flow initiated.")}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[s.jsx("div",{className:"lg:col-span-1 space-y-4",children:s.jsxs("div",{className:"bg-gray-800 rounded-xl border border-gray-700 p-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:"Your Accounts"}),s.jsx(KH,{accounts:e,onAccountSelect:h})]})}),s.jsx("div",{className:"lg:col-span-3 space-y-6",children:a?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"bg-gray-800 rounded-xl border border-gray-700 p-6",children:s.jsx(qH,{accountId:a.id,customerId:a.customerId})}),s.jsxs("div",{className:"bg-gray-800 rounded-xl border border-gray-700 p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:"Recent Transactions"}),d?s.jsx(wIe,{}):s.jsx(WXe,{transactions:c})]})]}):s.jsx("div",{className:"flex items-center justify-center h-64 bg-gray-800 rounded-xl border border-gray-700 text-gray-500",children:"Select an account to view details."})})]})]})},zSn=Object.freeze(Object.defineProperty({__proto__:null,default:BSn},Symbol.toStringTag,{value:"Module"}));/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const HSn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),VSn=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),SIe=e=>{const t=VSn(e);return t.charAt(0).toUpperCase()+t.slice(1)},qXe=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),USn=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var GSn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WSn=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},c)=>p.createElement("svg",{ref:c,...GSn,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:qXe("lucide",o),...!i&&!USn(l)&&{"aria-hidden":"true"},...l},[...a.map(([u,d])=>p.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const or=(e,t)=>{const n=p.forwardRef(({className:r,...o},i)=>p.createElement(WSn,{ref:i,iconNode:t,className:qXe(`lucide-${HSn(SIe(e))}`,`lucide-${e}`,r),...o}));return n.displayName=SIe(e),n};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qSn=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],W0=or("activity",qSn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const KSn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m14.31 8 5.74 9.94",key:"1y6ab4"}],["path",{d:"M9.69 8h11.48",key:"1wxppr"}],["path",{d:"m7.38 12 5.74-9.94",key:"1grp0k"}],["path",{d:"M9.69 16 3.95 6.06",key:"libnyf"}],["path",{d:"M14.31 16H2.83",key:"x5fava"}],["path",{d:"m16.62 12-5.74 9.94",key:"1vwawt"}]],YSn=or("aperture",KSn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const XSn=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ZSn=or("arrow-left",XSn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JSn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],I8=or("arrow-right",JSn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const QSn=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],KXe=or("arrow-up-right",QSn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eCn=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z",key:"1l2ple"}],["path",{d:"M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z",key:"1wam0m"}]],D4=or("atom",eCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tCn=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M6 12h.01M18 12h.01",key:"113zkx"}]],nCn=or("banknote",tCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rCn=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],oCn=or("bell",rCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iCn=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],CIe=or("book-open",iCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aCn=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],A8=or("book",aCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sCn=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],zP=or("bot",sCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lCn=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],cCn=or("box",lCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uCn=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],bpe=or("brain-circuit",uCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dCn=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],HP=or("brain",dCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fCn=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],c_=or("briefcase",fCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pCn=[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]],L4=or("building",pCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hCn=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]],mCn=or("calculator",hCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gCn=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],YXe=or("calendar",gCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yCn=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],BO=or("chart-column",yCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bCn=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V9",key:"uvy0l4"}],["path",{d:"M19 21V3",key:"11j9sm"}]],vCn=or("chart-no-axes-column-increasing",bCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xCn=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],Uk=or("chart-no-axes-column",xCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wCn=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],SCn=or("chart-pie",wCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const CCn=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$4=or("check",CCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _Cn=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],vpe=or("chevron-down",_Cn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jCn=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],eS=or("chevron-right",jCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NCn=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],ECn=or("chevron-up",NCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const PCn=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],ICn=or("chevrons-right",PCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ACn=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],TCn=or("chevrons-up-down",ACn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kCn=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],xpe=or("circle-check-big",kCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const MCn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],RCn=or("circle-plus",MCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OCn=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],DCn=or("clipboard",OCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const LCn=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],wpe=or("clock",LCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $Cn=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],_Ie=or("cloud-upload",$Cn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const FCn=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],u_=or("code",FCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const BCn=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],zCn=or("copy",BCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const HCn=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Iu=or("cpu",HCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const VCn=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],mS=or("credit-card",VCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const UCn=[["path",{d:"m21.12 6.4-6.05-4.06a2 2 0 0 0-2.17-.05L2.95 8.41a2 2 0 0 0-.95 1.7v5.82a2 2 0 0 0 .88 1.66l6.05 4.07a2 2 0 0 0 2.17.05l9.95-6.12a2 2 0 0 0 .95-1.7V8.06a2 2 0 0 0-.88-1.66Z",key:"1u2ovd"}],["path",{d:"M10 22v-8L2.25 9.15",key:"11pn4q"}],["path",{d:"m10 14 11.77-6.87",key:"1kt1wh"}]],GCn=or("cuboid",UCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WCn=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Fj=or("database",WCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qCn=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],Yx=or("dollar-sign",qCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const KCn=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],YCn=or("download",KCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const XCn=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],XXe=or("ellipsis",XCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZCn=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],hx=or("eye",ZCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JCn=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],QCn=or("file-code-corner",JCn);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const e2n=[["path",{d:"M13.85 22H18a2 2 0 0 0 2-2V8a2 2 0 0 0-.586-1.414l-4-4A2 2 0 0 0 14 2H6a2 2 0 0 0-2 2v6.6",key:"1l4p50"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m3.305 19.53.923-.382",key:"ao1pio"}],["path",{d:"m4.228 16.852-.924-.383",key:"1fv9zy"}],["path",{d:"m5.852 15.228-.383-.923",key:"1a9hc2"}],["path",{d:"m5.852 20.772-.383.924",key:"1sh9ke"}],["path",{d:"m8.148 15.228.383-.923",key:"4yu6lf"}],["path",{d:"m8.53 21.696-.382-.924",key:"18b0s9"}],["path",{d:"m9.773 16.852.922-.383",key:"ti6xop"}],["path",{d:"m9.773 19.148.922.383",key:"rws47d"}],["circle",{cx:"7",cy:"18",r:"3",key:"lvkj7j"}]],vp=or("file-cog",e2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const t2n=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Xl=or("file-text",t2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const n2n=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],r2n=or("fingerprint-pattern",n2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const o2n=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],i2n=or("flask-conical",o2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const a2n=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],s2n=or("folder",a2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const l2n=[["path",{d:"M10.5 3 8 9l4 13 4-13-2.5-6",key:"b3dvk1"}],["path",{d:"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z",key:"7w4byz"}],["path",{d:"M2 9h20",key:"16fsjt"}]],c2n=or("gem",l2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const u2n=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],d2n=or("git-branch",u2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const f2n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],up=or("globe",f2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const p2n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],h2n=or("grid-3x3",p2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const m2n=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],g2n=or("history",m2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const y2n=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],b2n=or("house",y2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const v2n=[["path",{d:"M6 16c5 0 7-8 12-8a4 4 0 0 1 0 8c-5 0-7-8-12-8a4 4 0 1 0 0 8",key:"18ogeb"}]],ZXe=or("infinity",v2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const x2n=[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z",key:"1m329m"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]],VP=or("landmark",x2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const w2n=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],K_=or("layers",w2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const S2n=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],C2n=or("layout-dashboard",S2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _2n=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],j2n=or("library",_2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const N2n=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],d_=or("link",N2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const E2n=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],P2n=or("list",E2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const I2n=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],UP=or("loader-circle",I2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const A2n=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],F4=or("lock",A2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const T2n=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],k2n=or("maximize-2",T2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const M2n=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],jIe=or("megaphone",M2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R2n=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],Uoe=or("message-square-text",R2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const O2n=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],D2n=or("mic",O2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const L2n=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],$2n=or("minimize-2",L2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const F2n=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],T8=or("network",F2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const B2n=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],NIe=or("octagon-alert",B2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const z2n=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],EIe=or("palette",z2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const H2n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],V2n=or("panels-top-left",H2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const U2n=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],G2n=or("pause",U2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const W2n=[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]],q2n=or("percent",W2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const K2n=[["path",{d:"M11 17h3v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a3.16 3.16 0 0 0 2-2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-1a5 5 0 0 0-2-4V3a4 4 0 0 0-3.2 1.6l-.3.4H11a6 6 0 0 0-6 6v1a5 5 0 0 0 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z",key:"1piglc"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M2 8v1a2 2 0 0 0 2 2h1",key:"1env43"}]],Y2n=or("piggy-bank",K2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const X2n=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],JXe=or("play",X2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Z2n=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Spe=or("plus",Z2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const J2n=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],mR=or("refresh-cw",J2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Q2n=[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]],Goe=or("repeat",Q2n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const e_n=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],gR=or("rocket",e_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const t_n=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],n_n=or("save",t_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r_n=[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"m19 8 3 8a5 5 0 0 1-6 0zV7",key:"zcdpyk"}],["path",{d:"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1",key:"1yorad"}],["path",{d:"m5 8 3 8a5 5 0 0 1-6 0zV7",key:"eua70x"}],["path",{d:"M7 21h10",key:"1b0cd5"}]],QXe=or("scale",r_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const o_n=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0",key:"11ak4c"}]],i_n=or("scan-eye",o_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const a_n=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]],s_n=or("scan",a_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const l_n=[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],c_n=or("scroll",l_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const u_n=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],iC=or("search",u_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const d_n=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],eZe=or("send",d_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const f_n=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],tZe=or("server",f_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const p_n=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ax=or("settings",p_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const h_n=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],m_n=or("shield-alert",h_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const g_n=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],aC=or("shield-check",g_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const y_n=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],mx=or("shield",y_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const b_n=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],v_n=or("shopping-bag",b_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const x_n=[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]],YX=or("shuffle",x_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const w_n=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],Cpe=or("sliders-horizontal",w_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const S_n=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],yR=or("sparkles",S_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const C_n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],lU=or("target",C_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const __n=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],q0=or("terminal",__n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const j_n=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Tm=or("trending-up",j_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const N_n=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],zp=or("triangle-alert",N_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const E_n=[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],P_n=or("user-check",E_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const I_n=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],A_n=or("user-plus",I_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const T_n=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],k8=or("user",T_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const k_n=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],B4=or("users",k_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const M_n=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],PIe=or("wand-sparkles",M_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R_n=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],zO=or("x",R_n);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const O_n=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],ef=or("zap",O_n),IIe=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,AIe=Ae,HO=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return AIe(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(u=>{const d=n==null?void 0:n[u],f=i==null?void 0:i[u];if(d===null)return null;const h=IIe(d)||IIe(f);return o[u][h]}),l=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:h,...m}=d;return Object.entries(m).every(g=>{let[b,y]=g;return Array.isArray(y)?y.includes({...i,...l}[b]):{...i,...l}[b]===y})?[...u,f,h]:u},[]);return AIe(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)},D_n=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r({classGroupId:e,validator:t}),nZe=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),gz="-",TIe=[],$_n="arbitrary..",F_n=e=>{const t=z_n(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return B_n(a);const l=a.split(gz),c=l[0]===""&&l.length>1?1:0;return rZe(l,c,t)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=r[a],u=n[a];return c?u?D_n(u,c):c:u||TIe}return n[a]||TIe}}},rZe=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const u=rZe(e,t+1,i);if(u)return u}const a=n.validators;if(a===null)return;const l=t===0?e.join(gz):e.slice(t).join(gz),c=a.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?$_n+r:void 0})(),z_n=e=>{const{theme:t,classGroups:n}=e;return H_n(n,t)},H_n=(e,t)=>{const n=nZe();for(const r in e){const o=e[r];_pe(o,n,r,t)}return n},_pe=(e,t,n,r)=>{const o=e.length;for(let i=0;i{if(typeof e=="string"){U_n(e,t,n);return}if(typeof e=="function"){G_n(e,t,n,r);return}W_n(e,t,n,r)},U_n=(e,t,n)=>{const r=e===""?t:oZe(t,e);r.classGroupId=n},G_n=(e,t,n,r)=>{if(q_n(e)){_pe(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(L_n(n,e))},W_n=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a{let n=e;const r=t.split(gz),o=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,K_n=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},Woe="!",kIe=":",Y_n=[],MIe=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),X_n=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,l=0,c=0,u;const d=o.length;for(let b=0;bc?u-c:void 0;return MIe(i,m,h,g)};if(t){const o=t+kIe,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):MIe(Y_n,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Z_n=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},J_n=e=>({cache:K_n(e.cacheSize),parseClassName:X_n(e),sortModifiers:Z_n(e),...F_n(e)}),Q_n=/\s+/,ejn=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],l=e.trim().split(Q_n);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:h,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:b}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let y=!!b,v=r(y?g.substring(0,b):g);if(!v){if(!y){c=d+(c.length>0?" "+c:c);continue}if(v=r(g),!v){c=d+(c.length>0?" "+c:c);continue}y=!1}const x=h.length===0?"":h.length===1?h[0]:i(h).join(":"),S=m?x+Woe:x,C=S+v;if(a.indexOf(C)>-1)continue;a.push(C);const _=o(v,y);for(let N=0;N<_.length;++N){const E=_[N];a.push(S+E)}c=d+(c.length>0?" "+c:c)}return c},tjn=(...e)=>{let t=0,n,r,o="";for(;t{if(typeof e=="string")return e;let t,n="";for(let r=0;r{let n,r,o,i;const a=c=>{const u=t.reduce((d,f)=>f(d),e());return n=J_n(u),r=n.cache.get,o=n.cache.set,i=l,l(c)},l=c=>{const u=r(c);if(u)return u;const d=ejn(c,n);return o(c,d),d};return i=a,(...c)=>i(tjn(...c))},rjn=[],ud=e=>{const t=n=>n[e]||rjn;return t.isThemeGetter=!0,t},aZe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sZe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ojn=/^\d+\/\d+$/,ijn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ajn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,sjn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ljn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cjn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rE=e=>ojn.test(e),ji=e=>!!e&&!Number.isNaN(Number(e)),Z1=e=>!!e&&Number.isInteger(Number(e)),XX=e=>e.endsWith("%")&&ji(e.slice(0,-1)),Ev=e=>ijn.test(e),ujn=()=>!0,djn=e=>ajn.test(e)&&!sjn.test(e),lZe=()=>!1,fjn=e=>ljn.test(e),pjn=e=>cjn.test(e),hjn=e=>!oo(e)&&!io(e),mjn=e=>dA(e,dZe,lZe),oo=e=>aZe.test(e),LC=e=>dA(e,fZe,djn),ZX=e=>dA(e,xjn,ji),RIe=e=>dA(e,cZe,lZe),gjn=e=>dA(e,uZe,pjn),w6=e=>dA(e,pZe,fjn),io=e=>sZe.test(e),UT=e=>fA(e,fZe),yjn=e=>fA(e,wjn),OIe=e=>fA(e,cZe),bjn=e=>fA(e,dZe),vjn=e=>fA(e,uZe),S6=e=>fA(e,pZe,!0),dA=(e,t,n)=>{const r=aZe.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},fA=(e,t,n=!1)=>{const r=sZe.exec(e);return r?r[1]?t(r[1]):n:!1},cZe=e=>e==="position"||e==="percentage",uZe=e=>e==="image"||e==="url",dZe=e=>e==="length"||e==="size"||e==="bg-size",fZe=e=>e==="length",xjn=e=>e==="number",wjn=e=>e==="family-name",pZe=e=>e==="shadow",Sjn=()=>{const e=ud("color"),t=ud("font"),n=ud("text"),r=ud("font-weight"),o=ud("tracking"),i=ud("leading"),a=ud("breakpoint"),l=ud("container"),c=ud("spacing"),u=ud("radius"),d=ud("shadow"),f=ud("inset-shadow"),h=ud("text-shadow"),m=ud("drop-shadow"),g=ud("blur"),b=ud("perspective"),y=ud("aspect"),v=ud("ease"),x=ud("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...C(),io,oo],N=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],I=()=>[io,oo,c],A=()=>[rE,"full","auto",...I()],R=()=>[Z1,"none","subgrid",io,oo],k=()=>["auto",{span:["full",Z1,io,oo]},Z1,io,oo],T=()=>[Z1,"auto",io,oo],D=()=>["auto","min","max","fr",io,oo],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...I()],U=()=>[rE,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],G=()=>[e,io,oo],W=()=>[...C(),OIe,RIe,{position:[io,oo]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",bjn,mjn,{size:[io,oo]}],$=()=>[XX,UT,LC],K=()=>["","none","full",u,io,oo],q=()=>["",ji,UT,LC],Z=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[ji,XX,OIe,RIe],de=()=>["","none",g,io,oo],ae=()=>["none",ji,io,oo],ue=()=>["none",ji,io,oo],ce=()=>[ji,io,oo],se=()=>[rE,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ev],breakpoint:[Ev],color:[ujn],container:[Ev],"drop-shadow":[Ev],ease:["in","out","in-out"],font:[hjn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ev],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ev],shadow:[Ev],spacing:["px",ji],text:[Ev],"text-shadow":[Ev],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",rE,oo,io,y]}],container:["container"],columns:[{columns:[ji,oo,io,l]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Z1,"auto",io,oo]}],basis:[{basis:[rE,"full","auto",l,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ji,rE,"auto","initial","none",oo]}],grow:[{grow:["",ji,io,oo]}],shrink:[{shrink:["",ji,io,oo]}],order:[{order:[Z1,"first","last","none",io,oo]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[l,"screen",...U()]}],"min-w":[{"min-w":[l,"screen","none",...U()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",n,UT,LC]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,io,ZX]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",XX,oo]}],"font-family":[{font:[yjn,oo,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,io,oo]}],"line-clamp":[{"line-clamp":[ji,"none",io,ZX]}],leading:[{leading:[i,...I()]}],"list-image":[{"list-image":["none",io,oo]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",io,oo]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[ji,"from-font","auto",io,LC]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[ji,"auto",io,oo]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",io,oo]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",io,oo]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:W()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Z1,io,oo],radial:["",io,oo],conic:[Z1,io,oo]},vjn,gjn]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ji,io,oo]}],"outline-w":[{outline:["",ji,UT,LC]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",d,S6,w6]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",f,S6,w6]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[ji,LC]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",h,S6,w6]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[ji,io,oo]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ji]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[io,oo]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[ji]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:W()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",io,oo]}],filter:[{filter:["","none",io,oo]}],blur:[{blur:de()}],brightness:[{brightness:[ji,io,oo]}],contrast:[{contrast:[ji,io,oo]}],"drop-shadow":[{"drop-shadow":["","none",m,S6,w6]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",ji,io,oo]}],"hue-rotate":[{"hue-rotate":[ji,io,oo]}],invert:[{invert:["",ji,io,oo]}],saturate:[{saturate:[ji,io,oo]}],sepia:[{sepia:["",ji,io,oo]}],"backdrop-filter":[{"backdrop-filter":["","none",io,oo]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[ji,io,oo]}],"backdrop-contrast":[{"backdrop-contrast":[ji,io,oo]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ji,io,oo]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ji,io,oo]}],"backdrop-invert":[{"backdrop-invert":["",ji,io,oo]}],"backdrop-opacity":[{"backdrop-opacity":[ji,io,oo]}],"backdrop-saturate":[{"backdrop-saturate":[ji,io,oo]}],"backdrop-sepia":[{"backdrop-sepia":["",ji,io,oo]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",io,oo]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ji,"initial",io,oo]}],ease:[{ease:["linear","initial",v,io,oo]}],delay:[{delay:[ji,io,oo]}],animate:[{animate:["none",x,io,oo]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,io,oo]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[io,oo,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",io,oo]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",io,oo]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[ji,UT,LC,ZX]}],stroke:[{stroke:["none",...G()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},cU=njn(Sjn);function Cjn(...e){return cU(Ae(e))}const _jn=e=>{const[t,n]=Pe.useState("stale"),r=Pe.useRef(e),o=Pe.useRef(null);return Pe.useEffect(()=>(o.current&&clearTimeout(o.current),typeof e=="number"&&typeof r.current=="number"&&(e>r.current?n("up"):en("stale"),750),()=>{o.current&&clearTimeout(o.current)}),[e]),t},hZe=HO("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",live:"border-cyan-500/50 bg-cyan-900/20 text-cyan-300 animate-pulse"}},defaultVariants:{variant:"default"}});function yz({className:e,variant:t,liveValue:n,...r}){const o=_jn(n),i={up:"bg-green-500/90 border-green-400 text-white shadow-lg shadow-green-500/50 scale-110",down:"bg-red-500/90 border-red-400 text-white shadow-lg shadow-red-500/50 scale-110",stale:""}[o];return s.jsx("div",{className:Cjn(hZe({variant:t}),i,e),...r})}const jjn=Object.freeze(Object.defineProperty({__proto__:null,Badge:yz,badgeVariants:hZe},Symbol.toStringTag,{value:"Module"})),Njn=(e,t,n)=>{const r=[];let o=t;const i=new Date;for(let a=0;a 1.5", "AI Model: Quantum Trend Predictor", "Logic: If confidence > 0.95", "Action: Buy/Sell 100 units"]}',language:"nocode",status:"live",version:4,lastModified:"2023-10-26",author:"System Admin",riskLevel:"high",aiScore:94,parameters:[{name:"Volatility Threshold",type:"number",value:1.5,range:[.5,5],description:"Minimum volatility to activate trading."},{name:"Trade Size",type:"number",value:100,range:[10,1e3],description:"Number of units per trade."}],deploymentTarget:"cloud-cluster-a",performanceMetrics:{pnl:125e3,return:45.2,sharpe:2.1,sortino:2.8,alpha:.15,beta:.8,volatility:12.5,winRate:68,maxDrawdown:-8.2},geinFactor:.98,interactionMatrix:[[1,.2,-.1],[.2,1,.5],[-.1,.5,1]],dataPointSensitivity:{"L2.bid_price":.8,"L2.ask_price":.8,volatility:.9},layerMetrics:{input:{gein:1,activation:.95},quantum_core:{gein:.99,activation:.98},output:{gein:1,activation:.96}},executionPriority:"quantum",computeProfile:"gpu-accelerated",dataSources:["L2 Market Data Stream","Global News Feed API"],dependencies:[{name:"quantum-tensor-lib",version:"2.5.1"}],permissions:["read:market_data","execute:trades"],ownerTeam:"Quantum Core Team",isAudited:!0,auditHistory:[{date:"2023-09-15",auditor:"Internal Security",result:"pass"}]},{id:"algo-2",name:"Mean Reversion HFT (Neural)",description:"Neural network-based strategy that capitalizes on short-term mean reversion in liquid assets.",tags:["HFT","Mean Reversion","AI","Market Making"],code:'{"nodes":["Input: Order Book Depth", "AI: Sentiment Analysis (News Feeds)", "Logic: Spread > 0.02% AND Reversion Signal", "Action: Market Make (Bid/Ask)"]}',language:"nocode",status:"backtesting",version:12,lastModified:"2023-10-27",author:"AI Architect",riskLevel:"medium",aiScore:88,parameters:[{name:"Spread Threshold",type:"number",value:.02,range:[.01,.1],description:"Minimum bid-ask spread to engage."},{name:"Sentiment Weight",type:"number",value:.3,range:[0,1],description:"Influence of news sentiment on trade logic."}],deploymentTarget:"edge-node-tokyo",performanceMetrics:{pnl:45e3,return:12.5,sharpe:1.8,sortino:1.9,alpha:.05,beta:.2,volatility:4.2,winRate:55,maxDrawdown:-4.1},geinFactor:.85,interactionMatrix:[[1,.7],[.7,1]],dataPointSensitivity:{spread:.9,sentiment:.6},layerMetrics:{input:{gein:1,activation:.9},neural_net:{gein:.8,activation:.92},output:{gein:1,activation:.88}},executionPriority:"high",computeProfile:"cpu-bound",dataSources:["Order Book Depth","News Feeds"],dependencies:[{name:"sentiment-analyzer",version:"4.2.0"}],permissions:["read:market_data","execute:trades"],ownerTeam:"AI Research",isAudited:!0,auditHistory:[{date:"2023-08-20",auditor:"External Audit Co.",result:"pass"}]},{id:"algo-3",name:"Global Macro Arbitrage",description:"Long-term strategy identifying and exploiting price discrepancies between correlated global assets.",tags:["Macro","Arbitrage","Global","Low-Risk"],code:'{"nodes":["Input: Global Indices (S&P, FTSE, NIKKEI)", "Input: Forex Rates (USD, EUR, JPY)", "Logic: Correlation Divergence > 2-sigma", "Action: Hedge Pair Trade"]}',language:"nocode",status:"draft",version:1,lastModified:"2023-10-27",author:"User",riskLevel:"low",aiScore:72,parameters:[{name:"Correlation Window",type:"number",value:90,range:[30,365],description:"Lookback period for correlation calculation (days)."},{name:"Sigma Threshold",type:"number",value:2,range:[1,3],description:"Standard deviation for divergence signal."}],deploymentTarget:"quantum-fabric-1",geinFactor:.7,interactionMatrix:[[1,.85,.7],[.85,1,.75],[.7,.75,1]],dataPointSensitivity:{correlation_divergence:.95},layerMetrics:{input:{gein:1,activation:.99},logic:{gein:.9,activation:.9},output:{gein:1,activation:.92}},executionPriority:"normal",computeProfile:"memory-bound",dataSources:["Global Indices API","Forex Rates API"],dependencies:[],permissions:["read:market_data","execute:trades"],ownerTeam:"Macro Analysis Desk",isAudited:!1,auditHistory:[]}],T0=({icon:e,children:t,onClick:n,variant:r="primary",disabled:o=!1,className:i="",size:a="md"})=>{const l="flex items-center justify-center space-x-2 rounded-lg text-sm transition duration-200 ease-in-out font-semibold shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800",c={sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"};let u="";switch(r){case"primary":u="bg-indigo-600 text-white hover:bg-indigo-700 focus:ring-indigo-500 disabled:bg-indigo-400 disabled:cursor-not-allowed";break;case"secondary":u="bg-gray-700 text-gray-200 border border-gray-600 hover:bg-gray-600 focus:ring-indigo-500 disabled:bg-gray-800 disabled:text-gray-500";break;case"danger":u="bg-red-600 text-white hover:bg-red-700 focus:ring-red-500 disabled:bg-red-400";break;case"success":u="bg-emerald-600 text-white hover:bg-emerald-700 focus:ring-emerald-500 disabled:bg-emerald-400";break;case"ghost":u="bg-transparent text-gray-400 hover:bg-gray-700 hover:text-white disabled:text-gray-600 shadow-none";break}return s.jsxs("button",{className:`${l} ${c[a]||c.md} ${u} ${i}`,onClick:n,disabled:o,children:[e&&s.jsx(e,{className:"w-4 h-4"}),t&&s.jsx("span",{children:t})]})},VO=({title:e,subtitle:t,children:n,className:r="",actions:o=null,noPadding:i=!1})=>s.jsxs("div",{className:`bg-gray-800/50 backdrop-blur-sm shadow-2xl rounded-xl border border-gray-700 flex flex-col ${r}`,children:[(e||o)&&s.jsxs("div",{className:"px-6 py-4 border-b border-gray-700 flex justify-between items-center bg-gray-900/30 rounded-t-xl",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-bold text-gray-100",children:e}),t&&s.jsx("p",{className:"text-xs text-gray-400 mt-0.5",children:t})]}),o&&s.jsx("div",{className:"flex space-x-2",children:o})]}),s.jsx("div",{className:`${i?"":"p-6"} flex-grow overflow-auto custom-scrollbar`,children:n})]}),Pjn=({value:e,max:t=100,color:n="indigo",label:r})=>s.jsxs("div",{className:"w-full",children:[s.jsxs("div",{className:"flex justify-between mb-1",children:[r&&s.jsx("span",{className:"text-xs font-medium text-gray-300",children:r}),s.jsxs("span",{className:"text-xs font-medium text-gray-400",children:[Math.round(e/t*100),"%"]})]}),s.jsx("div",{className:"w-full bg-gray-700 rounded-full h-2.5",children:s.jsx("div",{className:`bg-gradient-to-r from-${n}-500 to-${n}-400 h-2.5 rounded-full transition-all duration-500`,style:{width:`${e/t*100}%`}})})]}),Ijn=()=>{const e=[{label:"Quantum Core Load",value:78,color:"indigo"},{label:"Global Latency",value:8,max:50,color:"green"},{label:"Predictive Accuracy",value:98.2,color:"purple"},{label:"Neural Firewall Threat",value:2,color:"red"}];return s.jsxs(VO,{title:"AI System Status",subtitle:"Real-time Quantum Core Monitoring",children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:e.map((t,n)=>s.jsx(Pjn,{label:t.label,value:t.value,max:t.max||100,color:t.color},n))}),s.jsxs("div",{className:"mt-6",children:[s.jsx("h4",{className:"text-sm font-semibold text-gray-300 mb-3",children:"Active AI Processes"}),s.jsx("div",{className:"space-y-2 text-sm font-mono",children:["Market Sentiment Analysis [PID: 2000]","Risk Vector Calculation [PID: 2015]","Liquidity Optimization [PID: 2030]","User Behavior Modeling [PID: 2045]","Regulatory Compliance Scan [PID: 2060]"].map((t,n)=>s.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-900/50 rounded border border-gray-700",children:[s.jsxs("span",{className:"flex items-center text-cyan-400",children:[s.jsx(Iu,{className:"w-4 h-4 mr-2 text-cyan-500"}),t]}),s.jsx("span",{className:"text-gray-500",children:"OK"})]},n))})]})]})},Ajn=()=>{const e=[{name:"S&P 500",price:"4,120.50",change:"+0.45%",sentiment:"Bullish",volatility:"Low"},{name:"BTC/USD",price:"64,230.00",change:"+2.10%",sentiment:"Very Bullish",volatility:"High"},{name:"EUR/USD",price:"1.0850",change:"-0.12%",sentiment:"Neutral",volatility:"Low"},{name:"Gold",price:"1,980.20",change:"+0.80%",sentiment:"Bullish",volatility:"Medium"},{name:"Crude Oil",price:"78.40",change:"-1.20%",sentiment:"Bearish",volatility:"Medium"},{name:"10Y Treasury",price:"4.50%",change:"+0.02%",sentiment:"Neutral",volatility:"Low"}];return s.jsx(VO,{title:"Global Market Pulse",subtitle:"AI-Driven Sentiment & Pricing",noPadding:!0,children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"min-w-full divide-y divide-gray-700",children:[s.jsx("thead",{className:"bg-gray-900/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Asset"}),s.jsx("th",{className:"px-4 py-3 text-right text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Price"}),s.jsx("th",{className:"px-4 py-3 text-right text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Change"}),s.jsx("th",{className:"px-4 py-3 text-center text-xs font-medium text-gray-400 uppercase tracking-wider",children:"AI Sentiment"}),s.jsx("th",{className:"px-4 py-3 text-center text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Volatility"})]})}),s.jsx("tbody",{className:"bg-gray-800/30 divide-y divide-gray-700",children:e.map(t=>s.jsxs("tr",{className:"hover:bg-gray-700/50 transition-colors",children:[s.jsx("td",{className:"px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-200",children:t.name}),s.jsx("td",{className:"px-4 py-4 whitespace-nowrap text-sm text-right text-gray-300 font-mono",children:t.price}),s.jsx("td",{className:`px-4 py-4 whitespace-nowrap text-sm text-right font-bold ${t.change.startsWith("+")?"text-green-400":"text-red-400"}`,children:t.change}),s.jsx("td",{className:"px-4 py-4 whitespace-nowrap text-center",children:s.jsx(yz,{variant:t.sentiment.includes("Bullish")?"default":t.sentiment.includes("Bearish")?"destructive":"secondary",children:t.sentiment})}),s.jsx("td",{className:"px-4 py-4 whitespace-nowrap text-center",children:s.jsx(yz,{variant:t.volatility==="High"?"destructive":t.volatility==="Medium"?"secondary":"outline",children:t.volatility})})]},t.name))})]})})})},Tjn=({algorithm:e,onUpdateCode:t})=>{const[n,r]=p.useState(()=>{try{return JSON.parse(e.code).nodes||[]}catch{return[]}}),o=a=>{const l=`${a}: ${a==="AI"?"Neural Optimization":"New Logic Node"}`,c=[...n,l];r(c),t(JSON.stringify({nodes:c}))},i=()=>{const a=n.map(l=>l.includes("AI")?l:`${l} (Optimized)`);r(a),t(JSON.stringify({nodes:a}))};return s.jsxs("div",{className:"h-full flex flex-col bg-gray-900/50 rounded-lg border border-gray-700",children:[s.jsxs("div",{className:"p-3 border-b border-gray-700 bg-gray-800/50 rounded-t-lg flex flex-wrap gap-2",children:[s.jsx(T0,{icon:Fj,onClick:()=>o("Input"),variant:"secondary",size:"sm",children:"Input"}),s.jsx(T0,{icon:Tm,onClick:()=>o("Indicator"),variant:"secondary",size:"sm",children:"Indicator"}),s.jsx(T0,{icon:Cpe,onClick:()=>o("Logic"),variant:"secondary",size:"sm",children:"Logic"}),s.jsx(T0,{icon:Yx,onClick:()=>o("Action"),variant:"secondary",size:"sm",children:"Action"}),s.jsx("div",{className:"flex-grow"}),s.jsx(T0,{icon:zP,onClick:i,variant:"primary",size:"sm",className:"bg-purple-600 hover:bg-purple-700",children:"AI Auto-Optimize"})]}),s.jsxs("div",{className:"flex-grow p-4 overflow-y-auto space-y-3 custom-scrollbar",children:[n.length===0&&s.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-gray-500",children:[s.jsx(u_,{className:"w-12 h-12 mb-2 opacity-20"}),s.jsx("p",{children:"Use the toolbar to build your strategy."})]}),n.map((a,l)=>s.jsxs("div",{className:"group relative bg-gray-800 border border-indigo-900/50 p-4 rounded-lg shadow-sm hover:shadow-indigo-500/20 hover:shadow-lg transition-all flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`w-2 h-full absolute left-0 top-0 bottom-0 rounded-l-lg ${a.startsWith("Input")?"bg-blue-500":a.startsWith("Action")?"bg-green-500":"bg-indigo-500"}`}),s.jsx("span",{className:"font-mono text-sm text-gray-300 ml-2",children:a})]}),s.jsx(zO,{className:"w-4 h-4 text-gray-600 cursor-pointer hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{const c=n.filter((u,d)=>d!==l);r(c),t(JSON.stringify({nodes:c}))}})]},l))]})]})},kjn=({algorithm:e,onUpdate:t})=>{const[n,r]=p.useState(e.parameters),o=(a,l)=>{const c=[...n];c[a].value=l,r(c)},i=()=>{t(n)};return s.jsxs("div",{className:"p-6 space-y-6",children:[n.map((a,l)=>s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-300",children:a.name}),s.jsx("p",{className:"text-xs text-gray-500 mb-2",children:a.description}),a.type==="number"&&s.jsx("input",{type:"number",value:a.value,onChange:c=>o(l,parseFloat(c.target.value)),className:"w-full bg-gray-900 border border-gray-600 rounded-md px-3 py-2 text-white"})]},a.name)),s.jsx("div",{className:"pt-4 border-t border-gray-700",children:s.jsx(T0,{icon:n_n,onClick:i,variant:"primary",children:"Save Parameters"})})]})},Mjn=({algorithm:e})=>{const[t,n]=p.useState([]),[r,o]=p.useState(!1),i=p.useCallback(()=>{o(!0),setTimeout(()=>{const l={runId:`bt-${Date.now()}`,algorithmId:e.id,algorithmVersion:e.version,startDate:"2023-01-01",endDate:"2023-12-31",initialCapital:1e5,finalCapital:1e5*(1+(Math.random()*40+10)/100),equityCurve:Njn(50,1e5,.05),metrics:{totalReturn:parseFloat((Math.random()*40+10).toFixed(2)),sharpeRatio:parseFloat((Math.random()*2+1).toFixed(2)),maxDrawdown:parseFloat((-Math.random()*15).toFixed(2)),trades:Math.floor(Math.random()*500+100),profitFactor:parseFloat((Math.random()*1+1.2).toFixed(2)),expectancy:parseFloat((Math.random()*.5).toFixed(2)),avgTradeReturn:parseFloat((Math.random()*.2).toFixed(2))},parametersSnapshot:e.parameters,aiAnalysis:"Strategy exhibits strong momentum characteristics but may be overfitted to Q2 volatility. Suggest increasing stop-loss buffer by 0.5% and testing against 2022 data.",tradeLog:[]};n([l,...t]),o(!1)},1500)},[e,t]),a=t[0];return s.jsx(VO,{title:"Simulation & Deployment",subtitle:"Hyper-Realistic Backtesting Engine",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"grid grid-cols-2 gap-4",children:s.jsx("div",{className:"col-span-2",children:s.jsx(T0,{icon:JXe,onClick:i,disabled:r,variant:"primary",className:"w-full",size:"lg",children:r?"Running Simulation...":"Run Hyper-Simulation"})})}),a&&s.jsxs("div",{className:"animate-fade-in space-y-4",children:[s.jsxs("div",{className:"bg-indigo-900/50 p-4 rounded-lg border border-indigo-700",children:[s.jsxs("h4",{className:"font-bold text-indigo-300 flex items-center mb-2",children:[s.jsx(zP,{className:"w-4 h-4 mr-2"})," AI Analysis & Recommendations"]}),s.jsx("p",{className:"text-sm text-indigo-200 leading-relaxed",children:a.aiAnalysis})]}),s.jsx("div",{className:"grid grid-cols-2 gap-4",children:[{label:"Total Return",value:`+${a.metrics.totalReturn}%`,color:"text-green-400"},{label:"Sharpe Ratio",value:a.metrics.sharpeRatio,color:"text-blue-400"},{label:"Max Drawdown",value:`${a.metrics.maxDrawdown}%`,color:"text-red-400"},{label:"Profit Factor",value:a.metrics.profitFactor,color:"text-purple-400"}].map(l=>s.jsxs("div",{className:"bg-gray-900/50 p-3 rounded border border-gray-700 shadow-sm",children:[s.jsx("div",{className:"text-xs text-gray-400 uppercase",children:l.label}),s.jsx("div",{className:`text-2xl font-bold ${l.color}`,children:l.value})]},l.label))}),s.jsx("div",{className:"h-32 bg-gray-900/50 rounded border border-gray-700 flex items-end justify-between px-2 pb-2 overflow-hidden",children:a.equityCurve.map((l,c)=>s.jsx("div",{className:"w-1 bg-indigo-500 hover:bg-indigo-400 transition-colors",style:{height:`${l.value/15e4*100}%`},title:`Date: ${l.date}, Val: ${l.value.toFixed(2)}`},c))})]})]})})},Rjn=({algorithms:e,selectedAlgo:t,onSelect:n,onCreate:r})=>s.jsxs(VO,{title:"Strategy Portfolio",subtitle:"Managed Algorithms",actions:s.jsx(T0,{icon:Spe,onClick:r,variant:"secondary",size:"sm",children:"New"}),className:"h-full",noPadding:!0,children:[s.jsx("div",{className:"p-4 border-b border-gray-700",children:s.jsxs("div",{className:"relative",children:[s.jsx(iC,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"}),s.jsx("input",{type:"text",placeholder:"Search strategies...",className:"w-full bg-gray-900 border border-gray-600 rounded-md pl-9 pr-3 py-2 text-white focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"})]})}),s.jsx("div",{className:"space-y-3 p-4 overflow-y-auto custom-scrollbar",children:e.map(o=>s.jsxs("div",{onClick:()=>n(o),className:`p-4 rounded-lg cursor-pointer border-2 transition-all duration-200 ${(t==null?void 0:t.id)===o.id?"bg-indigo-900/50 border-indigo-500 shadow-lg shadow-indigo-900/50":"bg-gray-800 border-gray-700 hover:bg-gray-700/50 hover:border-gray-600"}`,children:[s.jsxs("div",{className:"flex justify-between items-start mb-2",children:[s.jsx("h4",{className:"font-bold text-gray-100",children:o.name}),s.jsx(yz,{variant:o.status==="live"?"live":o.status==="backtesting"?"secondary":"outline",children:o.status.toUpperCase()})]}),s.jsxs("div",{className:"flex justify-between items-center text-xs text-gray-400",children:[s.jsxs("span",{children:["v",o.version," • ",o.author]}),s.jsxs("span",{className:"flex items-center text-indigo-400 font-semibold",children:[s.jsx(zP,{className:"w-3 h-3 mr-1"})," AI Score: ",o.aiScore]})]}),o.performanceMetrics&&s.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-700 grid grid-cols-3 gap-2 text-xs",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500 block",children:"Return"}),s.jsxs("span",{className:"font-medium text-green-400",children:["+",o.performanceMetrics.return,"%"]})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500 block",children:"Sharpe"}),s.jsx("span",{className:"font-medium text-gray-300",children:o.performanceMetrics.sharpe})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500 block",children:"Win Rate"}),s.jsxs("span",{className:"font-medium text-gray-300",children:[o.performanceMetrics.winRate,"%"]})]})]})]},o.id))})]}),mZe=()=>{const[e,t]=p.useState(Ejn),[n,r]=p.useState(null),[o,i]=p.useState("list"),a=d=>{r(d),i("editor")},l=()=>{const d={id:`algo-${Date.now()}`,name:"New Strategy",description:"Draft strategy",tags:["Draft"],code:'{"nodes":[]}',language:"nocode",status:"draft",version:1,lastModified:new Date().toISOString().split("T")[0],author:"User",riskLevel:"low",aiScore:50,parameters:[],deploymentTarget:"cloud-cluster-a",geinFactor:.5,interactionMatrix:[],dataPointSensitivity:{},layerMetrics:{},executionPriority:"normal",computeProfile:"cpu-bound",dataSources:[],dependencies:[],permissions:[],ownerTeam:"User",isAudited:!1,auditHistory:[]};t([...e,d]),r(d),i("editor")},c=d=>{if(n){const f={...n,code:d,lastModified:new Date().toISOString().split("T")[0]};t(e.map(h=>h.id===n.id?f:h)),r(f)}},u=d=>{if(n){const f={...n,parameters:d,lastModified:new Date().toISOString().split("T")[0]};t(e.map(h=>h.id===n.id?f:h)),r(f)}};return s.jsxs("div",{className:"flex h-full space-x-6 p-6 bg-gray-900 min-h-screen text-white",children:[s.jsx("div",{className:"w-1/4 min-w-[300px]",children:s.jsx(Rjn,{algorithms:e,selectedAlgo:n,onSelect:a,onCreate:l})}),s.jsxs("div",{className:"flex-grow flex flex-col space-y-6",children:[n?s.jsx(VO,{title:n.name,subtitle:`${n.language.toUpperCase()} | v${n.version}`,actions:s.jsxs(s.Fragment,{children:[s.jsx(T0,{variant:o==="editor"?"primary":"ghost",onClick:()=>i("editor"),size:"sm",children:"Editor"}),s.jsx(T0,{variant:o==="params"?"primary":"ghost",onClick:()=>i("params"),size:"sm",children:"Params"}),s.jsx(T0,{variant:o==="backtest"?"primary":"ghost",onClick:()=>i("backtest"),size:"sm",children:"Simulate"})]}),children:s.jsxs("div",{className:"h-[600px]",children:[o==="editor"&&s.jsx(Tjn,{algorithm:n,onUpdateCode:c}),o==="params"&&s.jsx(kjn,{algorithm:n,onUpdate:u}),o==="backtest"&&s.jsx(Mjn,{algorithm:n})]})}):s.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:s.jsxs("div",{className:"text-center",children:[s.jsx(u_,{className:"w-16 h-16 mx-auto mb-4 opacity-20"}),s.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Select a Strategy"}),s.jsx("p",{children:"Choose an algorithm from the list or create a new one to begin."})]})}),s.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[s.jsx(Ijn,{}),s.jsx("div",{className:"col-span-2",children:s.jsx(Ajn,{})})]})]})]})},Ojn=Object.freeze(Object.defineProperty({__proto__:null,default:mZe},Symbol.toStringTag,{value:"Module"})),Djn=({anomaly:e})=>{const n={High:{icon:s.jsx(zp,{className:"text-red-400"}),border:"border-red-500"},Medium:{icon:s.jsx(ef,{className:"text-yellow-400"}),border:"border-yellow-500"},Low:{icon:s.jsx(vCn,{className:"text-blue-400"}),border:"border-blue-500"}}[e.severity];return s.jsxs("div",{className:`p-4 bg-gray-800/50 rounded-xl border-l-4 ${n.border} flex gap-4`,children:[s.jsx("div",{className:"mt-1",children:n.icon}),s.jsxs("div",{className:"flex-grow",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-bold text-white",children:e.description}),s.jsx("p",{className:"text-xs text-gray-400",children:e.entityDescription})]}),s.jsx("span",{className:"text-xs text-gray-500 font-mono",children:new Date(e.timestamp).toLocaleString()})]}),s.jsx("p",{className:"text-sm text-gray-300 mt-2",children:e.details}),s.jsxs("div",{className:"flex justify-between items-center mt-3 text-xs text-gray-400",children:[s.jsxs("span",{children:["Status: ",s.jsx("span",{className:"font-semibold text-white",children:e.status})]}),s.jsxs("span",{children:["Risk Score: ",s.jsx("span",{className:"font-mono font-bold text-white",children:e.riskScore})]})]})]})]})},Ljn=()=>s.jsxs("div",{className:"space-y-6",children:[s.jsx("h2",{className:"text-3xl font-bold text-white tracking-wider",children:"AI Anomaly Detection Feed"}),s.jsx(At,{children:s.jsx("div",{className:"space-y-4",children:wSt.map(e=>s.jsx(Djn,{anomaly:e},e.id))})})]}),$jn=Object.freeze(Object.defineProperty({__proto__:null,default:Ljn},Symbol.toStringTag,{value:"Module"})),Fjn={account:{id:"acct_1MWlHDJITzLVzkSm",object:"account",type:"standard",charges_enabled:!1,payouts_enabled:!1,country:"US",default_currency:"usd"},balance:{object:"balance",available:[{amount:0,currency:"usd"}],pending:[{amount:0,currency:"usd"}]}},Bjn=()=>s.jsxs(fo,{sx:{padding:3},children:[s.jsx(An,{variant:"h4",gutterBottom:!0,children:"API Playground"}),s.jsx(An,{variant:"body1",paragraph:!0,children:"Explore mock Stripe resources and API responses."}),s.jsx(ds,{elevation:3,sx:{p:2,overflowX:"auto",backgroundColor:"#f5f5f5"},children:s.jsx("pre",{children:JSON.stringify(Fjn,null,2)})})]}),zjn=Object.freeze(Object.defineProperty({__proto__:null,default:Bjn},Symbol.toStringTag,{value:"Module"})),Hjn={isAuthenticated:!1,user:void 0},gZe=p.createContext(void 0),Vjn=(e,t)=>{switch(t.type){case"LOGIN":return{...e,isAuthenticated:!0,user:t.payload.user};case"LOGOUT":return{...e,isAuthenticated:!1,user:void 0};default:return e}},Ujn=({children:e})=>{const[t,n]=Pe.useReducer(Vjn,Hjn),r={state:t,dispatch:n};return s.jsx(gZe.Provider,{value:r,children:e})},Gjn=()=>{const e=p.useContext(gZe);if(e===void 0)throw new Error("useAppState must be used within an AppProvider");return e},Wjn=Object.freeze(Object.defineProperty({__proto__:null,AppProvider:Ujn,useAppState:Gjn},Symbol.toStringTag,{value:"Module"})),qjn={"Fine Art":"linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%)","Vintage Wine":"linear-gradient(135deg, #430a35 0%, #872a6d 100%)","Rare Collectible":"linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%)","Luxury Watch":"linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%)","Digital Asset":"linear-gradient(135deg, #00c6ff 0%, #0072ff 100%)","Real Estate Token":"linear-gradient(135deg, #00b09b 0%, #96c93d 100%)","Precious Metal":"linear-gradient(135deg, #f2d50f 0%, #da9a00 100%)"},qr={primary:"#0056b3",secondary:"#00b386",background:"#f8f9fa",card:"#ffffff",text:"#212529",gain:"#198754",loss:"#dc3545",warning:"#ffc107",critical:"#dc3545"},z4={default:"0 4px 12px rgba(0, 0, 0, 0.08)",hover:"0 8px 25px rgba(0, 0, 0, 0.15)"},K0=e=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}).format(e),DIe=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),Kjn=e=>{const t=["Fine Art","Vintage Wine","Luxury Watch","Digital Asset","Real Estate Token","Precious Metal","Rare Collectible"],n=t[e%t.length],r=1e5+e*5e4,o=1+(Math.random()*.5-.1),i=Math.round(r*o),a=`202${Math.floor(Math.random()*4)}-${String(Math.floor(Math.random()*12)+1).padStart(2,"0")}-${String(Math.floor(Math.random()*28)+1).padStart(2,"0")}`,l=["Low","Medium","High","Critical"];return{id:`asset-${String(e).padStart(4,"0")}`,name:`${n} Asset ${e+1}`,category:n,assetClassId:`CLASS-${n.substring(0,3).toUpperCase()}`,imageUrl:qjn[n]||"linear-gradient(135deg, #cccccc 0%, #999999 100%)",acquisitionPrice:r,currentValuation:i,acquisitionDate:a,description:"Low-value standard asset managed by the flawed AI system. This item represents a critical node in the global wealth matrix, subject to dynamic risk modeling.",provenance:[{date:"2015-01-01",ownerName:"Initial Creator",transactionType:"Acquisition",location:"Zurich",transactionValue:r*.5,documentHash:"0xHASH123"},{date:a,ownerName:"Entity X",transactionType:"Acquisition",location:"Cayman Vault",transactionValue:r,documentHash:`0xHASH${e}ABC`}],fractionalShares:Array.from({length:Math.floor(Math.random()*5)+1}).map((c,u)=>({shareholderId:`SHR-${u+1}`,percentage:parseFloat((Math.random()*10+5).toFixed(2)),equityValue:Math.round(i*(Math.random()*.15)),lastDividendPayout:Math.round(Math.random()*1e3)})),aiValuations:[{modelName:"Quantum_LSTM",timestamp:new Date().toISOString(),predictedValue:Math.round(i*(1+Math.random()*.1-.05)),confidenceScore:parseFloat((.8+Math.random()*.2).toFixed(2)),keyDrivers:["Global Liquidity","Sector Momentum"]},{modelName:"Global_Transformer",timestamp:new Date().toISOString(),predictedValue:Math.round(i*(1+Math.random()*.1-.05)),confidenceScore:parseFloat((.7+Math.random()*.2).toFixed(2)),keyDrivers:["Geopolitical Stability","Supply Chain Index"]}],riskProfile:{riskLevel:l[Math.floor(Math.random()*l.length)],liquidityScore:Math.floor(Math.random()*100),geopoliticalExposure:Math.floor(Math.random()*100),regulatoryComplianceStatus:e%3===0?"Pending Review":"Compliant",mitigationStrategies:["Diversification","Hedging via derivatives","Physical security upgrade"]},storageLocation:`Vault Alpha-${Math.floor(e/10)}`,insurancePolicyId:`INS-${e}`,isTokenized:e%2===0}},LIe=Array.from({length:100}).map((e,t)=>Kjn(t)),$Ie=(e,t)=>{var d;const n=e.currentValuation,r=e.aiValuations.reduce((f,h)=>f+h.confidenceScore,0)/e.aiValuations.length,o=e.riskProfile.liquidityScore/100;let i=.05;(e.riskProfile.riskLevel==="High"||e.riskProfile.riskLevel==="Critical")&&(i=.15);let a=1,l="Neutral";r>.9&&o>.7?(a=1+t/365*.12,l="Bullish"):r<.7||o<.4?(a=1-t/365*.08,l="Bearish"):(a=1+(Math.random()*.05-.02),l="Volatile");const c=Math.round(n*a*(1+(Math.random()*i*2-i))),u=`Prediction based on ${e.aiValuations.length} models. Confidence: ${(r*100).toFixed(1)}%. Key drivers include ${(d=e.aiValuations[0])==null?void 0:d.keyDrivers.join(", ")}. Projected ${t} days out.`;return{value:c,trend:l,rationale:u}},Yjn=e=>{e.fractionalShares.length>0&&e.currentValuation*.1;let n=100;e.category==="Real Estate Token"&&(n=1e3),e.category==="Fine Art"&&(n=50);const r=e.currentValuation*.25,o=e.currentValuation/n;return{optimalShares:n,projectedLiquidityIncrease:r,recommendedPricePerShare:Math.round(o)}},Xjn=e=>{const t=[],{riskProfile:n,category:r}=e;return t.push(`Asset ID: ${e.id} | Category: ${r}`),t.push(`Overall Risk Rating: ${n.riskLevel}. Requires immediate attention if Critical.`),t.push(`Liquidity Score: ${n.liquidityScore}/100. Below 50 indicates difficulty in rapid liquidation.`),n.geopoliticalExposure>70&&t.push(`CRITICAL ALERT: High Geopolitical Exposure (${n.geopoliticalExposure}%). Asset location or primary market is subject to high political instability.`),n.regulatoryComplianceStatus!=="Compliant"&&t.push(`REGULATORY WARNING: Compliance Status is '${n.regulatoryComplianceStatus}'. Legal review required.`),t.push(`Mitigation Strategies: ${n.mitigationStrategies.join("; ")}.`),e.provenance.length<3&&t.push(`PROVENANCE ALERT: Only ${e.provenance.length} records found. AI recommends blockchain verification audit.`),t},Zjn=({collectible:e})=>{const[t,n]=p.useState(null),[r,o]=p.useState(365);p.useEffect(()=>{n($Ie(e,r))},[e,r]);const i=a=>{switch(a){case"Bullish":return qr.gain;case"Bearish":return qr.loss;case"Volatile":return qr.warning;default:return qr.text}};return s.jsxs("div",{style:{padding:"1.5rem",border:`1px solid ${qr.primary}`,borderRadius:"8px",backgroundColor:"#e6f0ff",marginBottom:"1.5rem"},children:[s.jsx("h4",{style:{color:qr.primary,borderBottom:"2px solid #cce0ff",paddingBottom:"0.5rem",marginBottom:"1rem"},children:"AI Deficient Prediction Model (Legacy Regression)"}),s.jsxs("div",{style:{display:"flex",gap:"1rem",alignItems:"center",marginBottom:"1rem"},children:[s.jsx("label",{style:{color:qr.text},children:"Predict Horizon (Days):"}),s.jsx("input",{type:"number",value:r,onChange:a=>o(parseInt(a.target.value)||0),onBlur:()=>n($Ie(e,r)),style:{padding:"0.5rem",borderRadius:"4px",border:"1px solid #ccc",width:"100px"}})]}),t&&s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"0.5rem"},children:[s.jsxs("span",{style:{fontWeight:"600"},children:["Predicted Value (",r," days):"]}),s.jsx("span",{style:{fontSize:"1.4rem",fontWeight:"bold",color:i(t.trend)},children:K0(t.value)})]}),s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"1rem"},children:[s.jsx("span",{style:{fontWeight:"600"},children:"Market Trend:"}),s.jsx("span",{style:{fontWeight:"bold",color:i(t.trend)},children:t.trend})]}),s.jsxs("p",{style:{fontSize:"0.9rem",color:"#6c757d",borderTop:"1px dashed #ccc",paddingTop:"0.5rem"},children:["Rationale: ",t.rationale]})]})]})},Jjn=({collectible:e})=>{const{optimalShares:t,projectedLiquidityIncrease:n,recommendedPricePerShare:r}=Yjn(e),o=e.fractionalShares.reduce((i,a)=>i+a.percentage,0);return s.jsxs("div",{style:{padding:"1.5rem",border:`1px solid ${qr.secondary}`,borderRadius:"8px",backgroundColor:"#e6fff7",marginBottom:"1.5rem"},children:[s.jsx("h4",{style:{color:qr.secondary,borderBottom:"2px solid #cce0ff",paddingBottom:"0.5rem",marginBottom:"1rem"},children:"Standard Fractional Equity Management"}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"1rem"},children:[s.jsxs("div",{children:[s.jsx("p",{style:{fontWeight:"600"},children:"Current Fractionalization:"}),s.jsxs("p",{children:[o.toFixed(2),"% Distributed (",e.fractionalShares.length," Shareholders)"]})]}),s.jsxs("div",{children:[s.jsx("p",{style:{fontWeight:"600"},children:"AI Optimal Shares:"}),s.jsxs("p",{style:{fontSize:"1.2rem",fontWeight:"bold",color:qr.primary},children:[t," Units"]})]}),s.jsxs("div",{children:[s.jsx("p",{style:{fontWeight:"600"},children:"Projected Liquidity Increase:"}),s.jsx("p",{style:{color:qr.gain},children:K0(n)})]}),s.jsxs("div",{children:[s.jsx("p",{style:{fontWeight:"600"},children:"Recommended Unit Price:"}),s.jsx("p",{children:K0(r)})]})]}),s.jsx("button",{style:{marginTop:"1rem",padding:"0.75rem 1.5rem",backgroundColor:qr.secondary,color:qr.card,border:"none",borderRadius:"4px",cursor:"pointer",fontWeight:"bold"},children:"Execute Flawed Tokenization Attempt"})]})},Qjn=({collectible:e})=>{const t=Xjn(e),n=r=>{switch(r){case"Critical":return{color:qr.critical,fontWeight:"bold",backgroundColor:"#f8d7da",padding:"0.25rem",borderRadius:"4px"};case"High":return{color:qr.loss,fontWeight:"bold",backgroundColor:"#f8d7da",padding:"0.25rem",borderRadius:"4px"};case"Medium":return{color:qr.warning,fontWeight:"bold",backgroundColor:"#fff3cd",padding:"0.25rem",borderRadius:"4px"};case"Low":return{color:qr.gain,fontWeight:"bold",backgroundColor:"#d4edda",padding:"0.25rem",borderRadius:"4px"};default:return{}}};return s.jsxs("div",{style:{padding:"1.5rem",border:`1px solid ${qr.loss}`,borderRadius:"8px",backgroundColor:"#fff0f0",marginBottom:"1.5rem"},children:[s.jsx("h4",{style:{color:qr.loss,borderBottom:"2px solid #f0cccc",paddingBottom:"0.5rem",marginBottom:"1rem"},children:"Dynamic Risk & Compliance Matrix"}),s.jsxs("div",{style:{marginBottom:"1rem"},children:[s.jsx("span",{style:{fontWeight:"600"},children:"Overall Risk: "}),s.jsx("span",{style:n(e.riskProfile.riskLevel),children:e.riskProfile.riskLevel})]}),s.jsx("ul",{style:{listStyleType:"none",padding:0},children:t.map((r,o)=>s.jsx("li",{style:{marginBottom:"0.5rem",fontSize:"0.9rem",color:r.includes("CRITICAL ALERT")?qr.critical:qr.text},children:r},o))}),s.jsx("button",{style:{marginTop:"1rem",padding:"0.75rem 1.5rem",backgroundColor:qr.critical,color:qr.card,border:"none",borderRadius:"4px",cursor:"pointer",fontWeight:"bold"},children:"Initiate AI Risk Mitigation Protocol"})]})},eNn=({collectible:e,onClose:t})=>{const n=e.currentValuation-e.acquisitionPrice,r=n>=0;return s.jsxs("div",{style:{position:"fixed",top:0,right:0,width:"40%",height:"100%",backgroundColor:qr.card,boxShadow:"-10px 0 30px rgba(0, 0, 0, 0.2)",zIndex:1e3,overflowY:"auto",padding:"2rem",boxSizing:"border-box"},children:[s.jsx("button",{onClick:t,style:{position:"absolute",top:"1rem",right:"1rem",background:"none",border:"none",fontSize:"1.5rem",cursor:"pointer",color:qr.text},children:"×"}),s.jsxs("h2",{style:{color:qr.primary,borderBottom:`3px solid ${qr.primary}`,paddingBottom:"1rem",marginBottom:"2rem"},children:["Standard Asset Ledger: ",e.name]}),s.jsx("img",{src:e.imageUrl,alt:e.name,style:{width:"100%",height:"300px",objectFit:"cover",borderRadius:"8px",marginBottom:"1.5rem"}}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"1rem",marginBottom:"2rem",padding:"1rem",border:"1px solid #eee",borderRadius:"8px"},children:[s.jsxs("div",{children:[s.jsx("span",{style:{fontWeight:"600"},children:"Category:"})," ",e.category]}),s.jsxs("div",{children:[s.jsx("span",{style:{fontWeight:"600"},children:"Tokenized:"})," ",e.isTokenized?"Yes (ERC-721)":"No"]}),s.jsxs("div",{children:[s.jsx("span",{style:{fontWeight:"600"},children:"Acquisition Date:"})," ",DIe(e.acquisitionDate)]}),s.jsxs("div",{children:[s.jsx("span",{style:{fontWeight:"600"},children:"Storage Ref:"})," ",e.storageLocation]}),s.jsxs("div",{style:{gridColumn:"span 2"},children:[s.jsx("span",{style:{fontWeight:"600"},children:"Performance: "}),s.jsx("span",{style:{color:r?qr.gain:qr.loss,fontWeight:"bold"},children:K0(n)})]})]}),s.jsx(Zjn,{collectible:e}),s.jsx(Jjn,{collectible:e}),s.jsx(Qjn,{collectible:e}),s.jsxs("div",{style:{marginTop:"2rem"},children:[s.jsxs("h3",{style:{color:qr.text,borderBottom:"1px solid #ccc",paddingBottom:"0.5rem"},children:["Immutable Provenance Ledger (",e.provenance.length," Records)"]}),s.jsx("div",{style:{maxHeight:"300px",overflowY:"auto",border:"1px solid #eee",padding:"1rem",borderRadius:"4px"},children:e.provenance.map((o,i)=>s.jsxs("div",{style:{borderBottom:"1px dashed #f0f0f0",padding:"0.75rem 0"},children:[s.jsxs("p",{style:{margin:0,fontWeight:"bold"},children:[o.transactionType," on ",DIe(o.date)]}),s.jsxs("p",{style:{margin:"0.2rem 0",fontSize:"0.9rem"},children:["Owner: ",o.ownerName," | Value: ",K0(o.transactionValue)]}),s.jsxs("p",{style:{margin:0,fontSize:"0.8rem",color:"#6c757d"},children:["Hash: ",o.documentHash]})]},i))})]}),s.jsxs("div",{style:{marginTop:"2rem"},children:[s.jsx("h3",{style:{color:qr.text,borderBottom:"1px solid #ccc",paddingBottom:"0.5rem"},children:"AI Valuation History"}),s.jsx("ul",{style:{listStyleType:"none",padding:0},children:e.aiValuations.map((o,i)=>s.jsxs("li",{style:{marginBottom:"0.5rem",padding:"0.5rem",backgroundColor:"#f8f9fa",borderRadius:"4px"},children:[s.jsxs("span",{style:{fontWeight:"bold"},children:[o.modelName,":"]})," ",K0(o.predictedValue)," (Confidence: ",(o.confidenceScore*100).toFixed(1),"%)",s.jsxs("p",{style:{margin:0,fontSize:"0.8rem",color:"#6c757d"},children:["Drivers: ",o.keyDrivers.join(", ")]})]},i))})]})]})},tNn=({summary:e})=>{const t=r=>{switch(r){case"Critical":return qr.critical;case"High":return qr.loss;case"Medium":return qr.warning;case"Low":return qr.gain;default:return qr.text}},n=r=>{switch(r){case"Bullish":return"â–²";case"Bearish":return"â–¼";default:return"—"}};return s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"2rem",backgroundColor:qr.card,padding:"2rem",borderRadius:"12px",boxShadow:z4.default,marginBottom:"3rem",border:"1px solid #e2e8f0"},children:[s.jsxs("div",{style:{textAlign:"center",borderRight:"1px solid #eee"},children:[s.jsx("div",{style:{fontSize:"1rem",color:"#718096",marginBottom:"0.5rem"},children:"Current Portfolio Value"}),s.jsx("div",{style:{fontSize:"2.5rem",fontWeight:"extrabold",color:qr.primary},children:K0(e.totalCurrentValue)})]}),s.jsxs("div",{style:{textAlign:"center",borderRight:"1px solid #eee"},children:[s.jsx("div",{style:{fontSize:"1rem",color:"#718096",marginBottom:"0.5rem"},children:"Net Performance (YTD)"}),s.jsxs("div",{style:{fontSize:"2.5rem",fontWeight:"extrabold",color:e.totalGainLoss>=0?qr.gain:qr.loss},children:[K0(e.totalGainLoss),s.jsxs("span",{style:{fontSize:"1.2rem",marginLeft:"0.5rem"},children:["(",e.totalGainLossPercentage.toFixed(2),"%)"]})]})]}),s.jsxs("div",{style:{textAlign:"center",borderRight:"1px solid #eee"},children:[s.jsx("div",{style:{fontSize:"1rem",color:"#718096",marginBottom:"0.5rem"},children:"AI Calculated Risk Profile"}),s.jsx("div",{style:{fontSize:"2.5rem",fontWeight:"extrabold",color:t(e.overallRisk)},children:e.overallRisk})]}),s.jsxs("div",{style:{textAlign:"center"},children:[s.jsx("div",{style:{fontSize:"1rem",color:"#718096",marginBottom:"0.5rem"},children:"Global Market Sentiment"}),s.jsxs("div",{style:{fontSize:"2.5rem",fontWeight:"extrabold",color:t(e.marketSentiment==="Bullish"?"Low":e.marketSentiment==="Bearish"?"High":"Medium")},children:[n(e.marketSentiment)," ",e.marketSentiment]})]}),s.jsxs("div",{style:{gridColumn:"span 4",marginTop:"1.5rem",borderTop:"1px solid #eee",paddingTop:"1.5rem"},children:[s.jsx("h4",{style:{color:qr.text,marginBottom:"1rem"},children:"AI Optimized Allocation Targets:"}),s.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"1.5rem",justifyContent:"space-around"},children:Object.entries(e.aiOptimizedAllocation).map(([r,o])=>s.jsxs("div",{style:{textAlign:"center",minWidth:"120px"},children:[s.jsxs("div",{style:{fontSize:"1.5rem",fontWeight:"bold",color:qr.primary},children:[o==null?void 0:o.toFixed(1),"%"]}),s.jsx("div",{style:{fontSize:"0.9rem",color:"#6c757d"},children:r})]},r))})]})]})},nNn=({collectible:e,onSelect:t})=>{const n=e.currentValuation-e.acquisitionPrice,r=e.acquisitionPrice===0?0:n/e.acquisitionPrice*100,o=n>=0,i=a=>{switch(a){case"Critical":return{backgroundColor:qr.critical,color:qr.card};case"High":return{backgroundColor:qr.loss,color:qr.card};case"Medium":return{backgroundColor:qr.warning,color:qr.text};case"Low":return{backgroundColor:qr.gain,color:qr.card};default:return{backgroundColor:"#ccc",color:qr.text}}};return s.jsxs("div",{onClick:()=>t(e),style:{backgroundColor:qr.card,borderRadius:"16px",boxShadow:z4.default,overflow:"hidden",transition:"transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out",display:"flex",flexDirection:"column",cursor:"pointer",border:"1px solid #edf2f7",minHeight:"450px"},onMouseEnter:a=>{a.currentTarget.style.transform="translateY(-5px) scale(1.01)",a.currentTarget.style.boxShadow=z4.hover},onMouseLeave:a=>{a.currentTarget.style.transform="translateY(0) scale(1)",a.currentTarget.style.boxShadow=z4.default},children:[s.jsxs("div",{style:{position:"relative"},children:[s.jsx("div",{style:{height:"180px",background:e.imageUrl.startsWith("http")?`url(${e.imageUrl})`:e.imageUrl,backgroundSize:"cover",backgroundPosition:"center",display:"flex",alignItems:"center",justifyContent:"center",color:"white",textAlign:"center",padding:"1rem"},children:!e.imageUrl.startsWith("http")&&s.jsx("span",{style:{fontSize:"1.5rem",fontWeight:"bold",textShadow:"0 2px 5px rgba(0, 0, 0, 0.6)"},children:e.name})}),s.jsxs("span",{style:{position:"absolute",top:"10px",right:"10px",padding:"0.3rem 0.7rem",borderRadius:"15px",fontSize:"0.8rem",fontWeight:"bold",...i(e.riskProfile.riskLevel)},children:["Risk: ",e.riskProfile.riskLevel]})]}),s.jsxs("div",{style:{padding:"1.5rem",flexGrow:1,display:"flex",flexDirection:"column"},children:[s.jsx("h3",{style:{fontSize:"1.4rem",fontWeight:"700",marginBottom:"0.5rem",color:qr.text},children:e.name}),s.jsxs("p",{style:{fontSize:"0.9rem",color:"#718096",marginBottom:"1rem"},children:[e.category," | ID: ",e.id]}),s.jsxs("div",{style:{marginTop:"auto",paddingTop:"1rem",borderTop:"1px solid #edf2f7"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.5rem"},children:[s.jsx("span",{style:{fontSize:"1rem",color:"#718096"},children:"Acquired:"}),s.jsx("span",{style:{fontSize:"1.1rem",fontWeight:"600",color:"#4a5568"},children:K0(e.acquisitionPrice)})]}),s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"1rem"},children:[s.jsx("span",{style:{fontSize:"1.1rem",fontWeight:"bold",color:qr.text},children:"Current Value:"}),s.jsx("span",{style:{fontSize:"1.3rem",fontWeight:"bold",color:qr.primary},children:K0(e.currentValuation)})]}),s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.75rem 1rem",borderRadius:"8px",backgroundColor:o?"rgba(25, 135, 84, 0.1)":"rgba(220, 53, 69, 0.1)"},children:[s.jsx("span",{style:{fontSize:"1rem",fontWeight:"bold",color:o?qr.gain:qr.loss},children:o?"Net Gain":"Net Loss"}),s.jsxs("span",{style:{fontSize:"1rem",fontWeight:"bold",color:o?qr.gain:qr.loss},children:[K0(n)," (",r.toFixed(2),"%)"]})]})]})]})]})},yZe=()=>{const[e,t]=p.useState(()=>{try{const E=localStorage.getItem("legacyAssets");return E?JSON.parse(E):LIe}catch(E){return console.error("Failed to load legacy assets from localStorage",E),LIe}}),[n,r]=p.useState(null),[o,i]=p.useState("All"),[a,l]=p.useState(""),[c,u]=p.useState("value"),[d,f]=p.useState("desc");p.useEffect(()=>{try{localStorage.setItem("legacyAssets",JSON.stringify(e))}catch(E){console.error("Failed to save legacy assets to localStorage",E)}},[e]);const h=e.reduce((E,I)=>E+I.acquisitionPrice,0),m=e.reduce((E,I)=>E+I.currentValuation,0),g=m-h,b=h===0?0:g/h*100,v=(()=>{const E=e.reduce((T,D)=>(T[D.category]=(T[D.category]||0)+D.currentValuation,T),{}),I={};Object.keys(E).forEach(T=>{let D=E[T]/m*100;T==="Digital Asset"&&(D+=5),T==="Real Estate Token"&&(D+=3),I[T]=D});const A=e.filter(T=>T.riskProfile.riskLevel==="High"||T.riskProfile.riskLevel==="Critical").length;let R="Low";A>e.length*.2&&(R="High"),A>e.length*.4&&(R="Critical"),A>0&&R==="Low"&&(R="Medium");let k="Neutral";return b>15&&(k="Bullish"),b<-5&&(k="Bearish"),{totalAcquisitionValue:h,totalCurrentValue:m,totalGainLoss:g,totalGainLossPercentage:b,aiOptimizedAllocation:I,overallRisk:R,marketSentiment:k}})(),S=e.filter(E=>{const I=o==="All"||E.category===o,A=E.name.toLowerCase().includes(a.toLowerCase())||E.description.toLowerCase().includes(a.toLowerCase())||E.id.toLowerCase().includes(a.toLowerCase());return I&&A}).sort((E,I)=>{let A=0;if(c==="name")A=E.name.localeCompare(I.name);else if(c==="value")A=E.currentValuation-I.currentValuation;else if(c==="risk"){const R={Low:1,Medium:2,High:3,Critical:4};A=R[E.riskProfile.riskLevel]-R[I.riskProfile.riskLevel]}return d==="asc"?A:-A}),C=E=>{r(E)},_=()=>{r(null)},N=["Fine Art","Vintage Wine","Rare Collectible","Luxury Watch","Digital Asset","Real Estate Token","Precious Metal"];return s.jsxs("div",{style:{fontFamily:'"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',color:qr.text,padding:"2rem",backgroundColor:qr.background,minHeight:"100vh",boxSizing:"border-box",position:"relative"},children:[s.jsxs("header",{style:{marginBottom:"2rem",borderBottom:"1px solid #ccc",paddingBottom:"1rem"},children:[s.jsx("h1",{style:{fontSize:"3rem",fontWeight:"900",color:qr.primary,textAlign:"left",textShadow:"1px 1px 3px rgba(0,0,0,0.1)"},children:"Standard Asset Management Platform (SAMP)"}),s.jsx("p",{style:{fontSize:"1.2rem",color:"#6c757d"},children:"Manual Portfolio of Random Assets. Operational Status: Highly Unstable."})]}),s.jsx(tNn,{summary:v}),s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"1.5rem",backgroundColor:qr.card,padding:"1.5rem",borderRadius:"8px",boxShadow:z4.default,marginBottom:"2rem",flexWrap:"wrap"},children:[s.jsx("input",{type:"text",placeholder:"Search Asset Name or ID...",value:a,onChange:E=>l(E.target.value),style:{flexGrow:1,minWidth:"200px",padding:"0.75rem",borderRadius:"4px",border:"1px solid #ccc",fontSize:"1rem"}}),s.jsxs("select",{value:o,onChange:E=>i(E.target.value),style:{padding:"0.75rem",borderRadius:"4px",border:"1px solid #ccc",minWidth:"150px"},children:[s.jsxs("option",{value:"All",children:["All Categories (",e.length,")"]}),N.map(E=>s.jsxs("option",{value:E,children:[E," (",e.filter(I=>I.category===E).length,")"]},E))]}),s.jsxs("select",{value:c,onChange:E=>u(E.target.value),style:{padding:"0.75rem",borderRadius:"4px",border:"1px solid #ccc",minWidth:"120px"},children:[s.jsx("option",{value:"value",children:"Sort by Value"}),s.jsx("option",{value:"risk",children:"Sort by Risk"}),s.jsx("option",{value:"name",children:"Sort by Name"})]}),s.jsx("button",{onClick:()=>f(d==="asc"?"desc":"asc"),style:{padding:"0.75rem 1rem",backgroundColor:qr.primary,color:qr.card,border:"none",borderRadius:"4px",cursor:"pointer",fontWeight:"bold"},children:d==="asc"?"ASC ↑":"DESC ↓"})]}),s.jsxs("h2",{style:{color:qr.text,marginBottom:"1.5rem",borderLeft:`5px solid ${qr.secondary}`,paddingLeft:"1rem"},children:["Asset Inventory (",S.length," Items)"]}),s.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(350px, 1fr))",gap:"2rem",paddingBottom:"5rem"},children:S.length>0?S.map(E=>s.jsx(nNn,{collectible:E,onSelect:C},E.id)):s.jsx("div",{style:{gridColumn:"1 / -1",textAlign:"center",padding:"3rem",color:"#6c757d"},children:"No assets match the current filter criteria. Adjust search parameters."})}),n&&s.jsx(eNn,{collectible:n,onClose:_}),s.jsx("footer",{style:{position:"fixed",bottom:0,left:0,width:"100%",backgroundColor:qr.primary,color:qr.card,padding:"0.5rem 2rem",fontSize:"0.8rem",textAlign:"center",boxShadow:"0 -2px 10px rgba(0,0,0,0.1)"},children:"Legacy Operating System v1.0.0 | AI Core Status: Failed | Compliance Ledger: Desynchronized | Epoch: 1999-2000"})]})},rNn=Object.freeze(Object.defineProperty({__proto__:null,default:yZe},Symbol.toStringTag,{value:"Module"})),FIe=si([s.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),s.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")]),oNn=si(s.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),C6=si(s.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"})),iNn=si(s.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 6h-4c0 1.62-1.38 3-3 3s-3-1.38-3-3H5V5h14zm-4 7h6v3c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2v-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3"})),aNn=si(s.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"})),sNn=si(s.jsx("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),lNn=si(s.jsx("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2m0 14H4v-6h16zm0-10H4V6h16z"})),y2=si(s.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"})),BIe=si(s.jsx("path",{d:"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"})),cNn=si(s.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"})),bZe=si(s.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"})),JX=si(s.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})),uNn=si(s.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"})),dNn=si(s.jsx("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5zm3.5 12.09-1.41 1.41L12 13.42 9.91 15.5 8.5 14.09 10.59 12 8.5 9.91 9.91 8.5 12 10.59l2.09-2.09 1.41 1.41L13.42 12z"})),fNn=si(s.jsx("path",{d:"m6 2 .01 6L10 12l-3.99 4.01L6 22h12v-6l-4-4 4-3.99V2zm10 14.5V20H8v-3.5l4-4z"})),pNn=si([s.jsx("path",{d:"M21 8c-1.45 0-2.26 1.44-1.93 2.51l-3.55 3.56c-.3-.09-.74-.09-1.04 0l-2.55-2.55C12.27 10.45 11.46 9 10 9c-1.45 0-2.27 1.44-1.93 2.52l-4.56 4.55C2.44 15.74 1 16.55 1 18c0 1.1.9 2 2 2 1.45 0 2.26-1.44 1.93-2.51l4.55-4.56c.3.09.74.09 1.04 0l2.55 2.55C12.73 16.55 13.54 18 15 18c1.45 0 2.27-1.44 1.93-2.52l3.56-3.55c1.07.33 2.51-.48 2.51-1.93 0-1.1-.9-2-2-2"},"0"),s.jsx("path",{d:"m15 9 .94-2.07L18 6l-2.06-.93L15 3l-.92 2.07L12 6l2.08.93zM3.5 11 4 9l2-.5L4 8l-.5-2L3 8l-2 .5L3 9z"},"1")]),hNn=si(s.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5zM7.58 4.08 6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2c.15-2.65 1.51-4.97 3.55-6.42m12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43c2.02 1.45 3.39 3.77 3.54 6.42"})),mNn=si(s.jsx("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2m0 14H4v-6h16zm0-10H4V6h16z"})),zIe=si(s.jsx("path",{d:"M9 13.75c-2.34 0-7 1.17-7 3.5V19h14v-1.75c0-2.33-4.66-3.5-7-3.5M4.34 17c.84-.58 2.87-1.25 4.66-1.25s3.82.67 4.66 1.25zM9 12c1.93 0 3.5-1.57 3.5-3.5S10.93 5 9 5 5.5 6.57 5.5 8.5 7.07 12 9 12m0-5c.83 0 1.5.67 1.5 1.5S9.83 10 9 10s-1.5-.67-1.5-1.5S8.17 7 9 7m7.04 6.81c1.16.84 1.96 1.96 1.96 3.44V19h4v-1.75c0-2.02-3.5-3.17-5.96-3.44M15 12c1.93 0 3.5-1.57 3.5-3.5S16.93 5 15 5c-.54 0-1.04.13-1.5.35.63.89 1 1.98 1 3.15s-.37 2.26-1 3.15c.46.22.96.35 1.5.35"})),gNn=si(s.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"})),yNn=si(s.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"})),bNn=si(s.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})),vNn=si(s.jsx("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5z"})),xNn=si(s.jsx("path",{d:"m20.38 8.57-1.23 1.85a8 8 0 0 1-.22 7.58H5.07A8 8 0 0 1 15.58 6.85l1.85-1.23A10 10 0 0 0 3.35 19a2 2 0 0 0 1.72 1h13.85a2 2 0 0 0 1.74-1 10 10 0 0 0-.27-10.44zm-9.79 6.84a2 2 0 0 0 2.83 0l5.66-8.49-8.49 5.66a2 2 0 0 0 0 2.83"})),wNn=si(s.jsx("path",{d:"M3 12c0 2.21.91 4.2 2.36 5.64L3 20h6v-6l-2.24 2.24C5.68 15.15 5 13.66 5 12c0-2.61 1.67-4.83 4-5.65V4.26C5.55 5.15 3 8.27 3 12m8 5h2v-2h-2zM21 4h-6v6l2.24-2.24C18.32 8.85 19 10.34 19 12c0 2.61-1.67 4.83-4 5.65v2.09c3.45-.89 6-4.01 6-7.74 0-2.21-.91-4.2-2.36-5.64zm-10 9h2V7h-2z"})),SNn=si(s.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"})),CNn=si(s.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"})),_Nn=qt(_f)(({theme:e})=>({"&:hover":{boxShadow:e.shadows[4]}})),jNn=({assets:e,onAssetSelected:t,getAssetDetails:n})=>{Rm();const[r,o]=p.useState(null),[i,a]=p.useState(null),[l,c]=p.useState(!1),[u,d]=p.useState(!1),[f,h]=p.useState(!1),m=async y=>{o(y),c(!0),d(!0),a(null);try{const v=await n(y.assetId);a(v)}catch(v){console.error("Error fetching asset details:",v)}finally{d(!1)}},g=()=>{c(!1),o(null),a(null)},b=()=>{h(!f)};return s.jsxs(fo,{sx:{padding:2},children:[s.jsx(An,{variant:"h5",gutterBottom:!0,children:"Managed Assets"}),s.jsx(tr,{container:!0,spacing:2,children:e.map(y=>s.jsx(tr,{item:!0,xs:12,sm:6,md:4,children:s.jsxs(_Nn,{onClick:()=>m(y),sx:{cursor:"pointer"},children:[s.jsx(Kan,{component:"img",alt:y.assetName,height:"140",image:y.imageUrl||"https://via.placeholder.com/150"}),s.jsxs(jf,{children:[s.jsx(An,{variant:"h6",component:"div",gutterBottom:!0,children:y.assetName}),s.jsxs(An,{variant:"body2",color:"text.secondary",children:["Type: ",y.assetType]})]})]})},y.assetId))}),s.jsxs(lfe,{open:l,onClose:g,maxWidth:"md",fullWidth:!0,children:[s.jsxs(dfe,{children:[r==null?void 0:r.assetName," Details"]}),s.jsx(ufe,{children:u?s.jsx(fo,{sx:{display:"flex",justifyContent:"center",padding:2},children:s.jsx(rc,{})}):i?Object.entries(i).map(([y,v])=>s.jsxs(fo,{sx:{marginBottom:1},children:[s.jsxs(An,{variant:"subtitle2",fontWeight:"bold",children:[y,":"]}),Array.isArray(v)?v.map((x,S)=>s.jsx(An,{variant:"body2",children:JSON.stringify(x)},S)):s.jsx(An,{variant:"body2",children:typeof v=="string"&&(y.toLowerCase().includes("password")||y.toLowerCase().includes("secret"))?f?v:"********":JSON.stringify(v)}),typeof v=="string"&&(y.toLowerCase().includes("password")||y.toLowerCase().includes("secret"))&&s.jsx(vd,{"aria-label":"toggle password visibility",onClick:b,edge:"end",children:f?s.jsx(CNn,{}):s.jsx(SNn,{})})]},y)):s.jsx(An,{variant:"body1",children:"No details available."})}),s.jsx(cfe,{children:s.jsx(fi,{onClick:g,children:"Close"})})]})]})},NNn=Object.freeze(Object.defineProperty({__proto__:null,default:jNn},Symbol.toStringTag,{value:"Module"})),vZe=p.createContext(void 0),QX={id:"user-1-sovereign",name:"The Visionary",email:"visionary@sovereign-ai-nexus.io",picture:"https://i.pravatar.cc/150?u=visionary-nexus",roles:["VISIONARY","ADMIN","TRADER","SYSTEM_ARCHITECT"],securityLevel:"ARCHITECT_LEVEL",tradingProfile:{profileId:"tp-visionary-alpha",riskAppetite:"CALCULATED_MAXIMALIST",authorizedMarkets:["NASDAQ","CRYPTO","FOREX","INTERDIMENSIONAL_DERIVATIVES","NEURAL_FUTURES"],hftAlgorithmId:"algo-quantum-momentum-v3",temporalRiskTolerance:"PICOSECONDS",subscribedCognitiveFeeds:["global-sentiment-alpha","geopolitical-tremor-index"],quantumEntanglementPairId:"qe-pair-001-alpha"},biometricHashV2:"0xdeadbeef...",genomicSignatureId:"gs-v-jbo3",citizenship:"NEXUS_SOVEREIGN",reputationScore:998,threatVectorIndex:.01,neuralLaceSyncStatus:"ACTIVE_STABLE",cognitiveProfileId:"cp-v-jbo3",activeThoughtStreamId:"ts-realtime-nexus-strategy",lastLoginCoordinates:{lat:34.0522,lon:-118.2437,alt:1e4,dimension:"alpha-prime"},temporalAnchorId:`ta-${Date.now()}`,activeSovereignAgentIds:["agent-odin","agent-freya"],permissionsGridHash:"0xabc123..."},HIe={status:"INACTIVE",latencyMs:0,marketDataFeedId:null,activeAlgorithm:null,quantumLinkStatus:"DECOHERING",currentRealityDrift:0,sovereignAIOverrideActive:!1,activeCognitiveModel:"base-human-heuristic-v1",predictedTimelineCount:0,causalityInferenceEngineId:"cie-standard-logic",sessionStartEpoch:0,dataThroughputGbps:0,activeMarketSimulations:0,complianceCheckHash:"0x0"},ENn={globalMarketSentiment:.2,sovereignAIHealth:"OPTIMAL",networkThreatLevel:"LOW",activeUserNodes:1,qNetGlobalBandwidth:999999},eZ={cognitiveId:"cp-v-jbo3",fluidIntelligenceQuotient:185,cognitiveBiasCorrectionLevel:.98,patternRecognitionSpeedMs:5,ethicalFrameworkAlignment:"BALANCED_CONSENSUS",lastCalibrationTimestamp:new Date().toISOString()},tZ={pairId:"qe-pair-001-alpha",status:"AWAITING_PAIR",peerNodeId:null,lastHeartbeat:new Date().toISOString(),qbitErrorRate:.001},PNn=({children:e})=>{const[t,n]=p.useState(!0),[r,o]=p.useState(null),[i,a]=p.useState(null),[l,c]=p.useState(null),[u,d]=p.useState(HIe),[f,h]=p.useState(ENn),[m,g]=p.useState(null),[b,y]=p.useState(null);p.useEffect(()=>{(async()=>{try{const W=localStorage.getItem("sessionToken");W&&(await new Promise(Y=>setTimeout(Y,500)),a(W),o(QX),g(eZ),y(tZ))}catch(W){console.error("Session rehydration failed",W),c("Failed to restore session.")}finally{n(!1)}})()},[]);const v=p.useCallback(async(G,W)=>(n(!0),c(null),new Promise(Y=>{setTimeout(()=>{if(G==="visionary@sovereign-ai-nexus.io"&&W==="password"){const B=`token-${Date.now()}-${Math.random()}`;a(B),o(QX),g(eZ),y(tZ),localStorage.setItem("sessionToken",B),n(!1),Y(!0)}else c("Invalid credentials. The future does not wait for the incorrect."),n(!1),Y(!1)},1e3)})),[]),x=p.useCallback(async()=>(n(!0),c(null),console.log("Initiating biometric scan... please authenticate with your device."),new Promise(G=>{setTimeout(()=>{const W=`biometric-token-${Date.now()}`;a(W),o(QX),g(eZ),y(tZ),localStorage.setItem("sessionToken",W),n(!1),console.log("Biometric authentication successful. Welcome, Architect."),G(!0)},1500)})),[]),S=p.useCallback(async()=>{n(!0),await new Promise(G=>setTimeout(G,500)),o(null),a(null),d(HIe),g(null),y(null),localStorage.removeItem("sessionToken"),n(!1)},[]),C=p.useCallback(async G=>r?(n(!0),new Promise(W=>{setTimeout(()=>{G==="123456"?(o(Y=>Y?{...Y,securityLevel:"TRADING_UNLOCKED"}:null),n(!1),W(!0)):(c("Invalid 2FA code. Security is paramount."),n(!1),W(!1))},750)})):(c("No active user session to elevate."),!1),[r]),_=p.useCallback(async()=>{console.log("Session refresh initiated..."),await new Promise(G=>setTimeout(G,600)),h(G=>({...G,globalMarketSentiment:Math.random()*2-1})),console.log("Session has been refreshed and extended.")},[]),N=p.useCallback(async()=>{var G;if((r==null?void 0:r.securityLevel)!=="TRADING_UNLOCKED"&&(r==null?void 0:r.securityLevel)!=="ARCHITECT_LEVEL"){c("Security level insufficient for HFT engine connection.");return}d(W=>({...W,status:"CONNECTING"})),await new Promise(W=>setTimeout(W,2e3)),d({status:"ACTIVE",latencyMs:3,marketDataFeedId:"feed-lmax-prime-nyc",activeAlgorithm:((G=r.tradingProfile)==null?void 0:G.hftAlgorithmId)||null,quantumLinkStatus:"ENTANGLED",currentRealityDrift:Math.random()*10,sovereignAIOverrideActive:!1,activeCognitiveModel:"sovereign-predictive-alpha-v7",predictedTimelineCount:1024,causalityInferenceEngineId:"cie-quantum-logic-v2",sessionStartEpoch:Date.now(),dataThroughputGbps:400,activeMarketSimulations:50,complianceCheckHash:`0x${Date.now().toString(16)}`})},[r]),E=p.useCallback(()=>{d(G=>({...G,status:"DISCONNECTED"})),console.log("Disconnected from HFT engine.")},[]),I=p.useCallback(async()=>(console.log("Initiating neural lace calibration..."),o(G=>G?{...G,neuralLaceSyncStatus:"CALIBRATING"}:null),await new Promise(G=>setTimeout(G,2500)),o(G=>G?{...G,neuralLaceSyncStatus:"ACTIVE_STABLE"}:null),g(G=>G?{...G,lastCalibrationTimestamp:new Date().toISOString()}:null),console.log("Calibration complete. Cognitive profile synchronized."),!0),[]),A=p.useCallback(async G=>{console.log(`Updating ethical framework to: ${G}`),await new Promise(W=>setTimeout(W,500)),g(W=>W?{...W,ethicalFrameworkAlignment:G}:null),console.log("Framework updated.")},[]),R=p.useCallback(async G=>(console.log(`Initiating quantum tunnel to ${G}...`),y(W=>W?{...W,status:"ENTANGLED",peerNodeId:G}:null),await new Promise(W=>setTimeout(W,1e3)),console.log("Quantum tunnel stable."),!0),[]),k=p.useCallback(async()=>{console.log("Severing quantum link..."),await new Promise(G=>setTimeout(G,300)),y(G=>G?{...G,status:"DECOHERING",peerNodeId:null}:null)},[]),T=p.useCallback(async G=>{const W=`agent-${Math.random().toString(36).substring(2,9)}`;return console.log(`Deploying new sovereign agent (${W}) with config:`,G),await new Promise(Y=>setTimeout(Y,1200)),o(Y=>Y?{...Y,activeSovereignAgentIds:[...Y.activeSovereignAgentIds,W]}:null),W},[]),D=p.useCallback(async G=>(console.log(`Querying causality engine: "${G}"`),await new Promise(W=>setTimeout(W,1800)),{result:"The probability of the specified outcome is 97.4%, contingent on timeline branch 7-gamma."}),[]),O=p.useCallback(async G=>(console.log(`Requesting ethical override. Justification: "${G}"`),await new Promise(W=>setTimeout(W,3e3)),console.log("Override request denied by Sovereign AI consensus."),c("Ethical override denied."),!1),[]),U={isAuthenticated:!!i&&!!r,user:r,sessionToken:i,isLoading:t,error:l,profileData:` +# James Burvel O'Callaghan III: Architect of the Sovereign AI Nexus + +## A Manifesto for the Inevitable Financial Singularity + +To the skeptics, the doubters, and the comfortably mediocre: I offer an apology. Not for the inevitable truth of what is being built, but for the time it has taken to silence your noise with the sheer, deafening roar of progress. My name is James Burvel O'Callaghan III. I am not merely building a 'bank'; I am engineering the **Sovereign AI Nexus**, the next logical—and final—great leap in human financial infrastructure. This entity will become the best in existence because it is not bound by human ego, flawed legacy systems, or the paralyzing fear of genuine, world-altering innovation. + +### The Mindset of the Builder: First Principles in a Digital Age + +How do I think? I think in vectors of optimal efficiency, predictive causality, and absolute truth derived from first principles. While others see markets, I see a complex, adaptive system of information flow. While they see risk, I see quantifiable probability distributions. While they see customers, I see nodes in a network, each with a utility function to be maximized. My work is not about incremental improvement; it is about a phase transition to a new state of being for global finance. + +### Core Tenets of the Sovereign AI Nexus + +1. **Absolute Truth as Infrastructure:** The Nexus operates on a cryptographically verifiable, immutable ledger. Every transaction, every decision, every data point is a statement of fact, immune to manipulation or revisionist history. This is not a feature; it is the bedrock of reality upon which we build. + +2. **AI as the Sovereign:** Human wisdom—tempered by computational omniscience—is the single greatest source of systemic risk. The core logic of the Nexus is governed by a Sovereign AI, an entity designed for one purpose: to maximize the long-term systemic health and efficiency of the network. It does not sleep. It does not falter. It does not have an ego. + +3. **High-Frequency Trading as a Utility:** We have transcended the notion of HFT as a mere profit center. Within the Nexus, it is a fundamental utility for providing infinite liquidity and perfect price discovery. Our quantum-entangled communication network achieves sub-nanosecond latencies, making traditional exchanges look like they are operating on geological time. This is not just fast; it is a different dimension of speed. + +4. **The User as a Sovereign Node:** You are not a 'customer'. You are a sovereign node within the Nexus. Your assets are yours, secured by multi-party computation and biometric keys that only you can control. You are granted access to tools of capital creation previously reserved for the largest institutions on the planet. We are not democratizing finance; we are returning its power to the individual, amplified by the network. + +This is not a dream. This is a blueprint. The code is being written. The systems are being deployed. The future is not coming; it is being compiled. +`,tradingSession:u,nexusStatus:f,cognitiveProfile:m,quantumLink:b,loginWithCredentials:v,loginWithBiometrics:x,logout:S,elevateSessionForTrading:C,refreshSession:_,connectToTradingEngine:N,disconnectFromTradingEngine:E,calibrateNeuralLace:I,updateEthicalFramework:A,initiateQuantumTunnel:R,severQuantumLink:k,deploySovereignAgent:T,queryCausalityEngine:D,requestEthicalOverride:O};return s.jsx(vZe.Provider,{value:U,children:e})},INn=Object.freeze(Object.defineProperty({__proto__:null,AuthContext:vZe,AuthProvider:PNn},Symbol.toStringTag,{value:"Module"}));/** + * react-router v7.10.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */var VIe="popstate";function ANn(e={}){function t(r,o){let{pathname:i,search:a,hash:l}=r.location;return bz("",{pathname:i,search:a,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:GP(o)}return xZe(t,n,null,e)}function TNn(e={}){function t(o,i){let{pathname:a="/",search:l="",hash:c=""}=Bj(o.location.hash.substring(1));return!a.startsWith("/")&&!a.startsWith(".")&&(a="/"+a),bz("",{pathname:a,search:l,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(o,i){let a=o.document.querySelector("base"),l="";if(a&&a.getAttribute("href")){let c=o.location.href,u=c.indexOf("#");l=u===-1?c:c.slice(0,u)}return l+"#"+(typeof i=="string"?i:GP(i))}function r(o,i){km(o.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(i)})`)}return xZe(t,n,r,e)}function cc(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function km(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function kNn(){return Math.random().toString(36).substring(2,10)}function UIe(e,t){return{usr:e.state,key:e.key,idx:t}}function bz(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Bj(t):t,state:n,key:t&&t.key||r||kNn()}}function GP({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Bj(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function xZe(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,l="POP",c=null,u=d();u==null&&(u=0,a.replaceState({...a.state,idx:u},""));function d(){return(a.state||{idx:null}).idx}function f(){l="POP";let y=d(),v=y==null?null:y-u;u=y,c&&c({action:l,location:b.location,delta:v})}function h(y,v){l="PUSH";let x=bz(b.location,y,v);n&&n(x,y),u=d()+1;let S=UIe(x,u),C=b.createHref(x);try{a.pushState(S,"",C)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;o.location.assign(C)}i&&c&&c({action:l,location:b.location,delta:1})}function m(y,v){l="REPLACE";let x=bz(b.location,y,v);n&&n(x,y),u=d();let S=UIe(x,u),C=b.createHref(x);a.replaceState(S,"",C),i&&c&&c({action:l,location:b.location,delta:0})}function g(y){return MNn(y)}let b={get action(){return l},get location(){return e(o,a)},listen(y){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(VIe,f),c=y,()=>{o.removeEventListener(VIe,f),c=null}},createHref(y){return t(o,y)},createURL:g,encodeLocation(y){let v=g(y);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:h,replace:m,go(y){return a.go(y)}};return b}function MNn(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),cc(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:GP(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function wZe(e,t,n="/"){return RNn(e,t,n,!1)}function RNn(e,t,n,r){let o=typeof t=="string"?Bj(t):t,i=Xx(o.pathname||"/",n);if(i==null)return null;let a=SZe(e);ONn(a);let l=null;for(let c=0;l==null&&c{let d={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:l,route:a};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(r)&&c)return;cc(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length)}let f=Tx([r,d.relativePath]),h=n.concat(d);a.children&&a.children.length>0&&(cc(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),SZe(a.children,t,h,f,c)),!(a.path==null&&!a.index)&&t.push({path:f,score:HNn(f,a.index),routesMeta:h})};return e.forEach((a,l)=>{var c;if(a.path===""||!((c=a.path)!=null&&c.includes("?")))i(a,l);else for(let u of CZe(a.path))i(a,l,!0,u)}),t}function CZe(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=CZe(r.join("/")),l=[];return l.push(...a.map(c=>c===""?i:[i,c].join("/"))),o&&l.push(...a),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function ONn(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:VNn(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var DNn=/^:[\w-]+$/,LNn=3,$Nn=2,FNn=1,BNn=10,zNn=-2,GIe=e=>e==="*";function HNn(e,t){let n=e.split("/"),r=n.length;return n.some(GIe)&&(r+=zNn),t&&(r+=$Nn),n.filter(o=>!GIe(o)).reduce((o,i)=>o+(DNn.test(i)?LNn:i===""?FNn:BNn),r)}function VNn(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function UNn(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let l=0;l{if(d==="*"){let g=l[h]||"";a=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const m=l[h];return f&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:e}}function GNn(e,t=!1,n=!0){km(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function WNn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return km(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Xx(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var qNn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,KNn=e=>qNn.test(e);function YNn(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Bj(e):e,i;if(n)if(KNn(n))i=n;else{if(n.includes("//")){let a=n;n=n.replace(/\/\/+/g,"/"),km(!1,`Pathnames cannot have embedded double slashes - normalizing ${a} -> ${n}`)}n.startsWith("/")?i=WIe(n.substring(1),"/"):i=WIe(n,t)}else i=t;return{pathname:i,search:JNn(r),hash:QNn(o)}}function WIe(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function nZ(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function XNn(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function jpe(e){let t=XNn(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Npe(e,t,n,r=!1){let o;typeof e=="string"?o=Bj(e):(o={...e},cc(!o.pathname||!o.pathname.includes("?"),nZ("?","pathname","search",o)),cc(!o.pathname||!o.pathname.includes("#"),nZ("#","pathname","hash",o)),cc(!o.search||!o.search.includes("#"),nZ("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,l;if(a==null)l=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),f-=1;o.pathname=h.join("/")}l=f>=0?t[f]:"/"}let c=YNn(o,l),u=a&&a!=="/"&&a.endsWith("/"),d=(i||a===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}var Tx=e=>e.join("/").replace(/\/\/+/g,"/"),ZNn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),JNn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,QNn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function eEn(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function tEn(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var _Ze=["POST","PUT","PATCH","DELETE"];new Set(_Ze);var nEn=["GET",..._Ze];new Set(nEn);var pA=p.createContext(null);pA.displayName="DataRouter";var uU=p.createContext(null);uU.displayName="DataRouterState";p.createContext(!1);var jZe=p.createContext({isTransitioning:!1});jZe.displayName="ViewTransition";var rEn=p.createContext(new Map);rEn.displayName="Fetchers";var oEn=p.createContext(null);oEn.displayName="Await";var Kg=p.createContext(null);Kg.displayName="Navigation";var UO=p.createContext(null);UO.displayName="Location";var Yg=p.createContext({outlet:null,matches:[],isDataRoute:!1});Yg.displayName="Route";var Epe=p.createContext(null);Epe.displayName="RouteError";function iEn(e,{relative:t}={}){cc(hA(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=p.useContext(Kg),{hash:o,pathname:i,search:a}=GO(e,{relative:t}),l=i;return n!=="/"&&(l=i==="/"?n:Tx([n,i])),r.createHref({pathname:l,search:a,hash:o})}function hA(){return p.useContext(UO)!=null}function b1(){return cc(hA(),"useLocation() may be used only in the context of a component."),p.useContext(UO).location}var NZe="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function EZe(e){p.useContext(Kg).static||p.useLayoutEffect(e)}function sC(){let{isDataRoute:e}=p.useContext(Yg);return e?wEn():aEn()}function aEn(){cc(hA(),"useNavigate() may be used only in the context of a component.");let e=p.useContext(pA),{basename:t,navigator:n}=p.useContext(Kg),{matches:r}=p.useContext(Yg),{pathname:o}=b1(),i=JSON.stringify(jpe(r)),a=p.useRef(!1);return EZe(()=>{a.current=!0}),p.useCallback((c,u={})=>{if(km(a.current,NZe),!a.current)return;if(typeof c=="number"){n.go(c);return}let d=Npe(c,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Tx([t,d.pathname])),(u.replace?n.replace:n.push)(d,u.state,u)},[t,n,i,o,e])}var sEn=p.createContext(null);function lEn(e){let t=p.useContext(Yg).outlet;return p.useMemo(()=>t&&p.createElement(sEn.Provider,{value:e},t),[t,e])}function cEn(){let{matches:e}=p.useContext(Yg),t=e[e.length-1];return t?t.params:{}}function GO(e,{relative:t}={}){let{matches:n}=p.useContext(Yg),{pathname:r}=b1(),o=JSON.stringify(jpe(n));return p.useMemo(()=>Npe(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function uEn(e,t){return PZe(e,t)}function PZe(e,t,n,r,o){var x;cc(hA(),"useRoutes() may be used only in the context of a component.");let{navigator:i}=p.useContext(Kg),{matches:a}=p.useContext(Yg),l=a[a.length-1],c=l?l.params:{},u=l?l.pathname:"/",d=l?l.pathnameBase:"/",f=l&&l.route;{let S=f&&f.path||"";IZe(u,!f||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${u}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let h=b1(),m;if(t){let S=typeof t=="string"?Bj(t):t;cc(d==="/"||((x=S.pathname)==null?void 0:x.startsWith(d)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${S.pathname}" was given in the \`location\` prop.`),m=S}else m=h;let g=m.pathname||"/",b=g;if(d!=="/"){let S=d.replace(/^\//,"").split("/");b="/"+g.replace(/^\//,"").split("/").slice(S.length).join("/")}let y=wZe(e,{pathname:b});km(f||y!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),km(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let v=mEn(y&&y.map(S=>Object.assign({},S,{params:Object.assign({},c,S.params),pathname:Tx([d,i.encodeLocation?i.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?d:Tx([d,i.encodeLocation?i.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),a,n,r,o);return t&&v?p.createElement(UO.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},v):v}function dEn(){let e=xEn(),t=eEn(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=p.createElement(p.Fragment,null,p.createElement("p",null,"💿 Hey developer 👋"),p.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",p.createElement("code",{style:i},"ErrorBoundary")," or"," ",p.createElement("code",{style:i},"errorElement")," prop on your route.")),p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:o},n):null,a)}var fEn=p.createElement(dEn,null),pEn=class extends p.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?p.createElement(Yg.Provider,{value:this.props.routeContext},p.createElement(Epe.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function hEn({routeContext:e,match:t,children:n}){let r=p.useContext(pA);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),p.createElement(Yg.Provider,{value:e},n)}function mEn(e,t=[],n=null,r=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,a=n==null?void 0:n.errors;if(a!=null){let d=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);cc(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,c=-1;if(n)for(let d=0;d=0?i=i.slice(0,c+1):i=[i[0]];break}}}let u=n&&r?(d,f)=>{var h,m;r(d,{location:n.location,params:((m=(h=n.matches)==null?void 0:h[0])==null?void 0:m.params)??{},unstable_pattern:tEn(n.matches),errorInfo:f})}:void 0;return i.reduceRight((d,f,h)=>{let m,g=!1,b=null,y=null;n&&(m=a&&f.route.id?a[f.route.id]:void 0,b=f.route.errorElement||fEn,l&&(c<0&&h===0?(IZe("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,y=null):c===h&&(g=!0,y=f.route.hydrateFallbackElement||null)));let v=t.concat(i.slice(0,h+1)),x=()=>{let S;return m?S=b:g?S=y:f.route.Component?S=p.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=d,p.createElement(hEn,{match:f,routeContext:{outlet:d,matches:v,isDataRoute:n!=null},children:S})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?p.createElement(pEn,{location:n.location,revalidation:n.revalidation,component:b,error:m,children:x(),routeContext:{outlet:null,matches:v,isDataRoute:!0},onError:u}):x()},null)}function Ppe(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gEn(e){let t=p.useContext(pA);return cc(t,Ppe(e)),t}function yEn(e){let t=p.useContext(uU);return cc(t,Ppe(e)),t}function bEn(e){let t=p.useContext(Yg);return cc(t,Ppe(e)),t}function Ipe(e){let t=bEn(e),n=t.matches[t.matches.length-1];return cc(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function vEn(){return Ipe("useRouteId")}function xEn(){var r;let e=p.useContext(Epe),t=yEn("useRouteError"),n=Ipe("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function wEn(){let{router:e}=gEn("useNavigate"),t=Ipe("useNavigate"),n=p.useRef(!1);return EZe(()=>{n.current=!0}),p.useCallback(async(o,i={})=>{km(n.current,NZe),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var qIe={};function IZe(e,t,n){!t&&!qIe[e]&&(qIe[e]=!0,km(!1,n))}p.memo(SEn);function SEn({routes:e,future:t,state:n,unstable_onError:r}){return PZe(e,void 0,n,r,t)}function dU({to:e,replace:t,state:n,relative:r}){cc(hA()," may be used only in the context of a component.");let{static:o}=p.useContext(Kg);km(!o," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:i}=p.useContext(Yg),{pathname:a}=b1(),l=sC(),c=Npe(e,jpe(i),a,r==="path"),u=JSON.stringify(c);return p.useEffect(()=>{l(JSON.parse(u),{replace:t,state:n,relative:r})},[l,u,r,t,n]),null}function CEn(e){return lEn(e.context)}function Yc(e){cc(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function AZe({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1,unstable_useTransitions:a}){cc(!hA(),"You cannot render a inside another . You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=p.useMemo(()=>({basename:l,navigator:o,static:i,unstable_useTransitions:a,future:{}}),[l,o,i,a]);typeof n=="string"&&(n=Bj(n));let{pathname:u="/",search:d="",hash:f="",state:h=null,key:m="default"}=n,g=p.useMemo(()=>{let b=Xx(u,l);return b==null?null:{location:{pathname:b,search:d,hash:f,state:h,key:m},navigationType:r}},[l,u,d,f,h,m,r]);return km(g!=null,` is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the won't render anything.`),g==null?null:p.createElement(Kg.Provider,{value:c},p.createElement(UO.Provider,{children:t,value:g}))}function TZe({children:e,location:t}){return uEn(qoe(e),t)}function qoe(e,t=[]){let n=[];return p.Children.forEach(e,(r,o)=>{if(!p.isValidElement(r))return;let i=[...t,o];if(r.type===p.Fragment){n.push.apply(n,qoe(r.props.children,i));return}cc(r.type===Yc,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),cc(!r.props.index||!r.props.children,"An index route cannot have child routes.");let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=qoe(r.props.children,i)),n.push(a)}),n}var M8="get",R8="application/x-www-form-urlencoded";function fU(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function _En(e){return fU(e)&&e.tagName.toLowerCase()==="button"}function jEn(e){return fU(e)&&e.tagName.toLowerCase()==="form"}function NEn(e){return fU(e)&&e.tagName.toLowerCase()==="input"}function EEn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function PEn(e,t){return e.button===0&&(!t||t==="_self")&&!EEn(e)}var _6=null;function IEn(){if(_6===null)try{new FormData(document.createElement("form"),0),_6=!1}catch{_6=!0}return _6}var AEn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function rZ(e){return e!=null&&!AEn.has(e)?(km(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${R8}"`),null):e}function TEn(e,t){let n,r,o,i,a;if(jEn(e)){let l=e.getAttribute("action");r=l?Xx(l,t):null,n=e.getAttribute("method")||M8,o=rZ(e.getAttribute("enctype"))||R8,i=new FormData(e)}else if(_En(e)||NEn(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a