import{r as C,g as Fv,R as k}from"./vendor-ui-E37q2bOV.js";var cg={exports:{}},ft={},ug={exports:{}},dg={};/**
 * @license React
 * scheduler.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.
 */(function(e){function t(T,G){var H=T.length;T.push(G);e:for(;0<H;){var _=H-1>>>1,W=T[_];if(0<r(W,G))T[_]=G,T[H]=W,H=_;else break e}}function i(T){return T.length===0?null:T[0]}function s(T){if(T.length===0)return null;var G=T[0],H=T.pop();if(H!==G){T[0]=H;e:for(var _=0,W=T.length,Ee=W>>>1;_<Ee;){var U=2*(_+1)-1,ie=T[U],ee=U+1,Ue=T[ee];if(0>r(ie,H))ee<W&&0>r(Ue,ie)?(T[_]=Ue,T[ee]=H,_=ee):(T[_]=ie,T[U]=H,_=U);else if(ee<W&&0>r(Ue,H))T[_]=Ue,T[ee]=H,_=ee;else break e}}return G}function r(T,G){var H=T.sortIndex-G.sortIndex;return H!==0?H:T.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var n=Date,l=n.now();e.unstable_now=function(){return n.now()-l}}var a=[],c=[],u=1,d=null,h=3,g=!1,v=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(T){for(var G=i(c);G!==null;){if(G.callback===null)s(c);else if(G.startTime<=T)s(c),G.sortIndex=G.expirationTime,t(a,G);else break;G=i(c)}}function y(T){if(w=!1,m(T),!v)if(i(a)!==null)v=!0,Y(b);else{var G=i(c);G!==null&&q(y,G.startTime-T)}}function b(T,G){v=!1,w&&(w=!1,f(E),E=-1),g=!0;var H=h;try{for(m(G),d=i(a);d!==null&&(!(d.expirationTime>G)||T&&!O());){var _=d.callback;if(typeof _=="function"){d.callback=null,h=d.priorityLevel;var W=_(d.expirationTime<=G);G=e.unstable_now(),typeof W=="function"?d.callback=W:d===i(a)&&s(a),m(G)}else s(a);d=i(a)}if(d!==null)var Ee=!0;else{var U=i(c);U!==null&&q(y,U.startTime-G),Ee=!1}return Ee}finally{d=null,h=H,g=!1}}var F=!1,R=null,E=-1,L=5,A=-1;function O(){return!(e.unstable_now()-A<L)}function V(){if(R!==null){var T=e.unstable_now();A=T;var G=!0;try{G=R(!0,T)}finally{G?Q():(F=!1,R=null)}}else F=!1}var Q;if(typeof p=="function")Q=function(){p(V)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,ue=Z.port2;Z.port1.onmessage=V,Q=function(){ue.postMessage(null)}}else Q=function(){S(V,0)};function Y(T){R=T,F||(F=!0,Q())}function q(T,G){E=S(function(){T(e.unstable_now())},G)}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(T){T.callback=null},e.unstable_continueExecution=function(){v||g||(v=!0,Y(b))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return i(a)},e.unstable_next=function(T){switch(h){case 1:case 2:case 3:var G=3;break;default:G=h}var H=h;h=G;try{return T()}finally{h=H}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,G){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var H=h;h=T;try{return G()}finally{h=H}},e.unstable_scheduleCallback=function(T,G,H){var _=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?_+H:_):H=_,T){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=H+W,T={id:u++,callback:G,priorityLevel:T,startTime:H,expirationTime:W,sortIndex:-1},H>_?(T.sortIndex=H,t(c,T),i(a)===null&&T===i(c)&&(w?(f(E),E=-1):w=!0,q(y,H-_))):(T.sortIndex=W,t(a,T),v||g||(v=!0,Y(b))),T},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(T){var G=h;return function(){var H=h;h=G;try{return T.apply(this,arguments)}finally{h=H}}}})(dg);ug.exports=dg;var xv=ug.exports;/**
 * @license React
 * react-dom.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 Pv=C,gt=xv;function I(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var hg=new Set,to={};function bs(e,t){er(e,t),er(e+"Capture",t)}function er(e,t){for(to[e]=t,e=0;e<t.length;e++)hg.add(t[e])}var ci=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ba=Object.prototype.hasOwnProperty,Ev=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vd={},Cd={};function Dv(e){return ba.call(Cd,e)?!0:ba.call(vd,e)?!1:Ev.test(e)?Cd[e]=!0:(vd[e]=!0,!1)}function Mv(e,t,i,s){if(i!==null&&i.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:i!==null?!i.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Tv(e,t,i,s){if(t===null||typeof t>"u"||Mv(e,t,i,s))return!0;if(s)return!1;if(i!==null)switch(i.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Je(e,t,i,s,r,o,n){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=r,this.mustUseProperty=i,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=n}var Oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oe[e]=new Je(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oe[t]=new Je(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oe[e]=new Je(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oe[e]=new Je(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oe[e]=new Je(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oe[e]=new Je(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oe[e]=new Je(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oe[e]=new Je(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oe[e]=new Je(e,5,!1,e.toLowerCase(),null,!1,!1)});var Vc=/[\-:]([a-z])/g;function zc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Vc,zc);Oe[t]=new Je(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Vc,zc);Oe[t]=new Je(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Vc,zc);Oe[t]=new Je(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oe[e]=new Je(e,1,!1,e.toLowerCase(),null,!1,!1)});Oe.xlinkHref=new Je("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oe[e]=new Je(e,1,!1,e.toLowerCase(),null,!0,!0)});function Wc(e,t,i,s){var r=Oe.hasOwnProperty(t)?Oe[t]:null;(r!==null?r.type!==0:s||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Tv(t,i,r,s)&&(i=null),s||r===null?Dv(t)&&(i===null?e.removeAttribute(t):e.setAttribute(t,""+i)):r.mustUseProperty?e[r.propertyName]=i===null?r.type===3?!1:"":i:(t=r.attributeName,s=r.attributeNamespace,i===null?e.removeAttribute(t):(r=r.type,i=r===3||r===4&&i===!0?"":""+i,s?e.setAttributeNS(s,t,i):e.setAttribute(t,i))))}var mi=Pv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ho=Symbol.for("react.element"),ks=Symbol.for("react.portal"),As=Symbol.for("react.fragment"),_c=Symbol.for("react.strict_mode"),Ra=Symbol.for("react.profiler"),gg=Symbol.for("react.provider"),pg=Symbol.for("react.context"),Uc=Symbol.for("react.forward_ref"),Fa=Symbol.for("react.suspense"),xa=Symbol.for("react.suspense_list"),jc=Symbol.for("react.memo"),Ri=Symbol.for("react.lazy"),fg=Symbol.for("react.offscreen"),wd=Symbol.iterator;function Rr(e){return e===null||typeof e!="object"?null:(e=wd&&e[wd]||e["@@iterator"],typeof e=="function"?e:null)}var ve=Object.assign,Ll;function Or(e){if(Ll===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Ll=t&&t[1]||""}return`
`+Ll+e}var Ol=!1;function Gl(e,t){if(!e||Ol)return"";Ol=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var s=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){s=c}e.call(t.prototype)}else{try{throw Error()}catch(c){s=c}e()}}catch(c){if(c&&s&&typeof c.stack=="string"){for(var r=c.stack.split(`
`),o=s.stack.split(`
`),n=r.length-1,l=o.length-1;1<=n&&0<=l&&r[n]!==o[l];)l--;for(;1<=n&&0<=l;n--,l--)if(r[n]!==o[l]){if(n!==1||l!==1)do if(n--,l--,0>l||r[n]!==o[l]){var a=`
`+r[n].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=n&&0<=l);break}}}finally{Ol=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?Or(e):""}function kv(e){switch(e.tag){case 5:return Or(e.type);case 16:return Or("Lazy");case 13:return Or("Suspense");case 19:return Or("SuspenseList");case 0:case 2:case 15:return e=Gl(e.type,!1),e;case 11:return e=Gl(e.type.render,!1),e;case 1:return e=Gl(e.type,!0),e;default:return""}}function Pa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case As:return"Fragment";case ks:return"Portal";case Ra:return"Profiler";case _c:return"StrictMode";case Fa:return"Suspense";case xa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case pg:return(e.displayName||"Context")+".Consumer";case gg:return(e._context.displayName||"Context")+".Provider";case Uc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jc:return t=e.displayName||null,t!==null?t:Pa(e.type)||"Memo";case Ri:t=e._payload,e=e._init;try{return Pa(e(t))}catch{}}return null}function Av(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Pa(t);case 8:return t===_c?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Bi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function mg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Iv(e){var t=mg(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var r=i.get,o=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(n){s=""+n,o.call(this,n)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return s},setValue:function(n){s=""+n},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bo(e){e._valueTracker||(e._valueTracker=Iv(e))}function vg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=mg(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Fn(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ea(e,t){var i=t.checked;return ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function Sd(e,t){var i=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;i=Bi(t.value!=null?t.value:i),e._wrapperState={initialChecked:s,initialValue:i,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Cg(e,t){t=t.checked,t!=null&&Wc(e,"checked",t,!1)}function Da(e,t){Cg(e,t);var i=Bi(t.value),s=t.type;if(i!=null)s==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ma(e,t.type,i):t.hasOwnProperty("defaultValue")&&Ma(e,t.type,Bi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yd(e,t,i){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,i||t===e.value||(e.value=t),e.defaultValue=t}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function Ma(e,t,i){(t!=="number"||Fn(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var Gr=Array.isArray;function js(e,t,i,s){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Bi(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Ta(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return ve({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function bd(e,t){var i=t.value;if(i==null){if(i=t.children,t=t.defaultValue,i!=null){if(t!=null)throw Error(I(92));if(Gr(i)){if(1<i.length)throw Error(I(93));i=i[0]}t=i}t==null&&(t=""),i=t}e._wrapperState={initialValue:Bi(i)}}function wg(e,t){var i=Bi(t.value),s=Bi(t.defaultValue);i!=null&&(i=""+i,i!==e.value&&(e.value=i),t.defaultValue==null&&e.defaultValue!==i&&(e.defaultValue=i)),s!=null&&(e.defaultValue=""+s)}function Rd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Sg(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ka(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Sg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Vo,yg=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,i,s,r){MSApp.execUnsafeLocalFunction(function(){return e(t,i,s,r)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Vo=Vo||document.createElement("div"),Vo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Vo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function io(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var zr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Lv=["Webkit","ms","Moz","O"];Object.keys(zr).forEach(function(e){Lv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zr[t]=zr[e]})});function bg(e,t,i){return t==null||typeof t=="boolean"||t===""?"":i||typeof t!="number"||t===0||zr.hasOwnProperty(e)&&zr[e]?(""+t).trim():t+"px"}function Rg(e,t){e=e.style;for(var i in t)if(t.hasOwnProperty(i)){var s=i.indexOf("--")===0,r=bg(i,t[i],s);i==="float"&&(i="cssFloat"),s?e.setProperty(i,r):e[i]=r}}var Ov=ve({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Aa(e,t){if(t){if(Ov[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function Ia(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var La=null;function Kc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Oa=null,Ks=null,$s=null;function Fd(e){if(e=Mo(e)){if(typeof Oa!="function")throw Error(I(280));var t=e.stateNode;t&&(t=dl(t),Oa(e.stateNode,e.type,t))}}function Fg(e){Ks?$s?$s.push(e):$s=[e]:Ks=e}function xg(){if(Ks){var e=Ks,t=$s;if($s=Ks=null,Fd(e),t)for(e=0;e<t.length;e++)Fd(t[e])}}function Pg(e,t){return e(t)}function Eg(){}var Nl=!1;function Dg(e,t,i){if(Nl)return e(t,i);Nl=!0;try{return Pg(e,t,i)}finally{Nl=!1,(Ks!==null||$s!==null)&&(Eg(),xg())}}function so(e,t){var i=e.stateNode;if(i===null)return null;var s=dl(i);if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(I(231,t,typeof i));return i}var Ga=!1;if(ci)try{var Fr={};Object.defineProperty(Fr,"passive",{get:function(){Ga=!0}}),window.addEventListener("test",Fr,Fr),window.removeEventListener("test",Fr,Fr)}catch{Ga=!1}function Gv(e,t,i,s,r,o,n,l,a){var c=Array.prototype.slice.call(arguments,3);try{t.apply(i,c)}catch(u){this.onError(u)}}var Wr=!1,xn=null,Pn=!1,Na=null,Nv={onError:function(e){Wr=!0,xn=e}};function Hv(e,t,i,s,r,o,n,l,a){Wr=!1,xn=null,Gv.apply(Nv,arguments)}function Bv(e,t,i,s,r,o,n,l,a){if(Hv.apply(this,arguments),Wr){if(Wr){var c=xn;Wr=!1,xn=null}else throw Error(I(198));Pn||(Pn=!0,Na=c)}}function Rs(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function Mg(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function xd(e){if(Rs(e)!==e)throw Error(I(188))}function Vv(e){var t=e.alternate;if(!t){if(t=Rs(e),t===null)throw Error(I(188));return t!==e?null:e}for(var i=e,s=t;;){var r=i.return;if(r===null)break;var o=r.alternate;if(o===null){if(s=r.return,s!==null){i=s;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===i)return xd(r),e;if(o===s)return xd(r),t;o=o.sibling}throw Error(I(188))}if(i.return!==s.return)i=r,s=o;else{for(var n=!1,l=r.child;l;){if(l===i){n=!0,i=r,s=o;break}if(l===s){n=!0,s=r,i=o;break}l=l.sibling}if(!n){for(l=o.child;l;){if(l===i){n=!0,i=o,s=r;break}if(l===s){n=!0,s=o,i=r;break}l=l.sibling}if(!n)throw Error(I(189))}}if(i.alternate!==s)throw Error(I(190))}if(i.tag!==3)throw Error(I(188));return i.stateNode.current===i?e:t}function Tg(e){return e=Vv(e),e!==null?kg(e):null}function kg(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=kg(e);if(t!==null)return t;e=e.sibling}return null}var Ag=gt.unstable_scheduleCallback,Pd=gt.unstable_cancelCallback,zv=gt.unstable_shouldYield,Wv=gt.unstable_requestPaint,Re=gt.unstable_now,_v=gt.unstable_getCurrentPriorityLevel,$c=gt.unstable_ImmediatePriority,Ig=gt.unstable_UserBlockingPriority,En=gt.unstable_NormalPriority,Uv=gt.unstable_LowPriority,Lg=gt.unstable_IdlePriority,ll=null,$t=null;function jv(e){if($t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(ll,e,void 0,(e.current.flags&128)===128)}catch{}}var Ot=Math.clz32?Math.clz32:Yv,Kv=Math.log,$v=Math.LN2;function Yv(e){return e>>>=0,e===0?32:31-(Kv(e)/$v|0)|0}var zo=64,Wo=4194304;function Nr(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Dn(e,t){var i=e.pendingLanes;if(i===0)return 0;var s=0,r=e.suspendedLanes,o=e.pingedLanes,n=i&268435455;if(n!==0){var l=n&~r;l!==0?s=Nr(l):(o&=n,o!==0&&(s=Nr(o)))}else n=i&~r,n!==0?s=Nr(n):o!==0&&(s=Nr(o));if(s===0)return 0;if(t!==0&&t!==s&&!(t&r)&&(r=s&-s,o=t&-t,r>=o||r===16&&(o&4194240)!==0))return t;if(s&4&&(s|=i&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0<t;)i=31-Ot(t),r=1<<i,s|=e[i],t&=~r;return s}function Qv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qv(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes;0<o;){var n=31-Ot(o),l=1<<n,a=r[n];a===-1?(!(l&i)||l&s)&&(r[n]=Qv(l,t)):a<=t&&(e.expiredLanes|=l),o&=~l}}function Ha(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Og(){var e=zo;return zo<<=1,!(zo&4194240)&&(zo=64),e}function Hl(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Eo(e,t,i){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ot(t),e[t]=i}function Xv(e,t){var i=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0<i;){var r=31-Ot(i),o=1<<r;t[r]=0,s[r]=-1,e[r]=-1,i&=~o}}function Yc(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Ot(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}var te=0;function Gg(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ng,Qc,Hg,Bg,Vg,Ba=!1,_o=[],Ti=null,ki=null,Ai=null,ro=new Map,oo=new Map,Pi=[],Zv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ed(e,t){switch(e){case"focusin":case"focusout":Ti=null;break;case"dragenter":case"dragleave":ki=null;break;case"mouseover":case"mouseout":Ai=null;break;case"pointerover":case"pointerout":ro.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":oo.delete(t.pointerId)}}function xr(e,t,i,s,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:o,targetContainers:[r]},t!==null&&(t=Mo(t),t!==null&&Qc(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Jv(e,t,i,s,r){switch(t){case"focusin":return Ti=xr(Ti,e,t,i,s,r),!0;case"dragenter":return ki=xr(ki,e,t,i,s,r),!0;case"mouseover":return Ai=xr(Ai,e,t,i,s,r),!0;case"pointerover":var o=r.pointerId;return ro.set(o,xr(ro.get(o)||null,e,t,i,s,r)),!0;case"gotpointercapture":return o=r.pointerId,oo.set(o,xr(oo.get(o)||null,e,t,i,s,r)),!0}return!1}function zg(e){var t=ss(e.target);if(t!==null){var i=Rs(t);if(i!==null){if(t=i.tag,t===13){if(t=Mg(i),t!==null){e.blockedOn=t,Vg(e.priority,function(){Hg(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function an(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Va(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);La=s,i.target.dispatchEvent(s),La=null}else return t=Mo(i),t!==null&&Qc(t),e.blockedOn=i,!1;t.shift()}return!0}function Dd(e,t,i){an(e)&&i.delete(t)}function eC(){Ba=!1,Ti!==null&&an(Ti)&&(Ti=null),ki!==null&&an(ki)&&(ki=null),Ai!==null&&an(Ai)&&(Ai=null),ro.forEach(Dd),oo.forEach(Dd)}function Pr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ba||(Ba=!0,gt.unstable_scheduleCallback(gt.unstable_NormalPriority,eC)))}function no(e){function t(r){return Pr(r,e)}if(0<_o.length){Pr(_o[0],e);for(var i=1;i<_o.length;i++){var s=_o[i];s.blockedOn===e&&(s.blockedOn=null)}}for(Ti!==null&&Pr(Ti,e),ki!==null&&Pr(ki,e),Ai!==null&&Pr(Ai,e),ro.forEach(t),oo.forEach(t),i=0;i<Pi.length;i++)s=Pi[i],s.blockedOn===e&&(s.blockedOn=null);for(;0<Pi.length&&(i=Pi[0],i.blockedOn===null);)zg(i),i.blockedOn===null&&Pi.shift()}var Ys=mi.ReactCurrentBatchConfig,Mn=!0;function tC(e,t,i,s){var r=te,o=Ys.transition;Ys.transition=null;try{te=1,qc(e,t,i,s)}finally{te=r,Ys.transition=o}}function iC(e,t,i,s){var r=te,o=Ys.transition;Ys.transition=null;try{te=4,qc(e,t,i,s)}finally{te=r,Ys.transition=o}}function qc(e,t,i,s){if(Mn){var r=Va(e,t,i,s);if(r===null)Yl(e,t,s,Tn,i),Ed(e,s);else if(Jv(r,e,t,i,s))s.stopPropagation();else if(Ed(e,s),t&4&&-1<Zv.indexOf(e)){for(;r!==null;){var o=Mo(r);if(o!==null&&Ng(o),o=Va(e,t,i,s),o===null&&Yl(e,t,s,Tn,i),o===r)break;r=o}r!==null&&s.stopPropagation()}else Yl(e,t,s,null,i)}}var Tn=null;function Va(e,t,i,s){if(Tn=null,e=Kc(s),e=ss(e),e!==null)if(t=Rs(e),t===null)e=null;else if(i=t.tag,i===13){if(e=Mg(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Tn=e,null}function Wg(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(_v()){case $c:return 1;case Ig:return 4;case En:case Uv:return 16;case Lg:return 536870912;default:return 16}default:return 16}}var Di=null,Xc=null,cn=null;function _g(){if(cn)return cn;var e,t=Xc,i=t.length,s,r="value"in Di?Di.value:Di.textContent,o=r.length;for(e=0;e<i&&t[e]===r[e];e++);var n=i-e;for(s=1;s<=n&&t[i-s]===r[o-s];s++);return cn=r.slice(e,1<s?1-s:void 0)}function un(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Uo(){return!0}function Md(){return!1}function mt(e){function t(i,s,r,o,n){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=o,this.target=n,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(i=e[l],this[l]=i?i(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Uo:Md,this.isPropagationStopped=Md,this}return ve(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Uo)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Uo)},persist:function(){},isPersistent:Uo}),t}var hr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zc=mt(hr),Do=ve({},hr,{view:0,detail:0}),sC=mt(Do),Bl,Vl,Er,al=ve({},Do,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Er&&(Er&&e.type==="mousemove"?(Bl=e.screenX-Er.screenX,Vl=e.screenY-Er.screenY):Vl=Bl=0,Er=e),Bl)},movementY:function(e){return"movementY"in e?e.movementY:Vl}}),Td=mt(al),rC=ve({},al,{dataTransfer:0}),oC=mt(rC),nC=ve({},Do,{relatedTarget:0}),zl=mt(nC),lC=ve({},hr,{animationName:0,elapsedTime:0,pseudoElement:0}),aC=mt(lC),cC=ve({},hr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),uC=mt(cC),dC=ve({},hr,{data:0}),kd=mt(dC),hC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gC={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},pC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pC[e])?!!t[e]:!1}function Jc(){return fC}var mC=ve({},Do,{key:function(e){if(e.key){var t=hC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=un(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?gC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jc,charCode:function(e){return e.type==="keypress"?un(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?un(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),vC=mt(mC),CC=ve({},al,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ad=mt(CC),wC=ve({},Do,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jc}),SC=mt(wC),yC=ve({},hr,{propertyName:0,elapsedTime:0,pseudoElement:0}),bC=mt(yC),RC=ve({},al,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),FC=mt(RC),xC=[9,13,27,32],eu=ci&&"CompositionEvent"in window,_r=null;ci&&"documentMode"in document&&(_r=document.documentMode);var PC=ci&&"TextEvent"in window&&!_r,Ug=ci&&(!eu||_r&&8<_r&&11>=_r),Id=" ",Ld=!1;function jg(e,t){switch(e){case"keyup":return xC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Is=!1;function EC(e,t){switch(e){case"compositionend":return Kg(t);case"keypress":return t.which!==32?null:(Ld=!0,Id);case"textInput":return e=t.data,e===Id&&Ld?null:e;default:return null}}function DC(e,t){if(Is)return e==="compositionend"||!eu&&jg(e,t)?(e=_g(),cn=Xc=Di=null,Is=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ug&&t.locale!=="ko"?null:t.data;default:return null}}var MC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Od(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!MC[e.type]:t==="textarea"}function $g(e,t,i,s){Fg(s),t=kn(t,"onChange"),0<t.length&&(i=new Zc("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var Ur=null,lo=null;function TC(e){rp(e,0)}function cl(e){var t=Gs(e);if(vg(t))return e}function kC(e,t){if(e==="change")return t}var Yg=!1;if(ci){var Wl;if(ci){var _l="oninput"in document;if(!_l){var Gd=document.createElement("div");Gd.setAttribute("oninput","return;"),_l=typeof Gd.oninput=="function"}Wl=_l}else Wl=!1;Yg=Wl&&(!document.documentMode||9<document.documentMode)}function Nd(){Ur&&(Ur.detachEvent("onpropertychange",Qg),lo=Ur=null)}function Qg(e){if(e.propertyName==="value"&&cl(lo)){var t=[];$g(t,lo,e,Kc(e)),Dg(TC,t)}}function AC(e,t,i){e==="focusin"?(Nd(),Ur=t,lo=i,Ur.attachEvent("onpropertychange",Qg)):e==="focusout"&&Nd()}function IC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return cl(lo)}function LC(e,t){if(e==="click")return cl(t)}function OC(e,t){if(e==="input"||e==="change")return cl(t)}function GC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ht=typeof Object.is=="function"?Object.is:GC;function ao(e,t){if(Ht(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!ba.call(t,r)||!Ht(e[r],t[r]))return!1}return!0}function Hd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Bd(e,t){var i=Hd(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Hd(i)}}function qg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xg(){for(var e=window,t=Fn();t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Fn(e.document)}return t}function tu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function NC(e){var t=Xg(),i=e.focusedElem,s=e.selectionRange;if(t!==i&&i&&i.ownerDocument&&qg(i.ownerDocument.documentElement,i)){if(s!==null&&tu(i)){if(t=s.start,e=s.end,e===void 0&&(e=t),"selectionStart"in i)i.selectionStart=t,i.selectionEnd=Math.min(e,i.value.length);else if(e=(t=i.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var r=i.textContent.length,o=Math.min(s.start,r);s=s.end===void 0?o:Math.min(s.end,r),!e.extend&&o>s&&(r=s,s=o,o=r),r=Bd(i,o);var n=Bd(i,s);r&&n&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==n.node||e.focusOffset!==n.offset)&&(t=t.createRange(),t.setStart(r.node,r.offset),e.removeAllRanges(),o>s?(e.addRange(t),e.extend(n.node,n.offset)):(t.setEnd(n.node,n.offset),e.addRange(t)))}}for(t=[],e=i;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<t.length;i++)e=t[i],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var HC=ci&&"documentMode"in document&&11>=document.documentMode,Ls=null,za=null,jr=null,Wa=!1;function Vd(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Wa||Ls==null||Ls!==Fn(s)||(s=Ls,"selectionStart"in s&&tu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),jr&&ao(jr,s)||(jr=s,s=kn(za,"onSelect"),0<s.length&&(t=new Zc("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Ls)))}function jo(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Os={animationend:jo("Animation","AnimationEnd"),animationiteration:jo("Animation","AnimationIteration"),animationstart:jo("Animation","AnimationStart"),transitionend:jo("Transition","TransitionEnd")},Ul={},Zg={};ci&&(Zg=document.createElement("div").style,"AnimationEvent"in window||(delete Os.animationend.animation,delete Os.animationiteration.animation,delete Os.animationstart.animation),"TransitionEvent"in window||delete Os.transitionend.transition);function ul(e){if(Ul[e])return Ul[e];if(!Os[e])return e;var t=Os[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Zg)return Ul[e]=t[i];return e}var Jg=ul("animationend"),ep=ul("animationiteration"),tp=ul("animationstart"),ip=ul("transitionend"),sp=new Map,zd="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ui(e,t){sp.set(e,t),bs(t,[e])}for(var jl=0;jl<zd.length;jl++){var Kl=zd[jl],BC=Kl.toLowerCase(),VC=Kl[0].toUpperCase()+Kl.slice(1);Ui(BC,"on"+VC)}Ui(Jg,"onAnimationEnd");Ui(ep,"onAnimationIteration");Ui(tp,"onAnimationStart");Ui("dblclick","onDoubleClick");Ui("focusin","onFocus");Ui("focusout","onBlur");Ui(ip,"onTransitionEnd");er("onMouseEnter",["mouseout","mouseover"]);er("onMouseLeave",["mouseout","mouseover"]);er("onPointerEnter",["pointerout","pointerover"]);er("onPointerLeave",["pointerout","pointerover"]);bs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));bs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));bs("onBeforeInput",["compositionend","keypress","textInput","paste"]);bs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));bs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));bs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),zC=new Set("cancel close invalid load scroll toggle".split(" ").concat(Hr));function Wd(e,t,i){var s=e.type||"unknown-event";e.currentTarget=i,Bv(s,t,void 0,e),e.currentTarget=null}function rp(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],r=s.event;s=s.listeners;e:{var o=void 0;if(t)for(var n=s.length-1;0<=n;n--){var l=s[n],a=l.instance,c=l.currentTarget;if(l=l.listener,a!==o&&r.isPropagationStopped())break e;Wd(r,l,c),o=a}else for(n=0;n<s.length;n++){if(l=s[n],a=l.instance,c=l.currentTarget,l=l.listener,a!==o&&r.isPropagationStopped())break e;Wd(r,l,c),o=a}}}if(Pn)throw e=Na,Pn=!1,Na=null,e}function le(e,t){var i=t[$a];i===void 0&&(i=t[$a]=new Set);var s=e+"__bubble";i.has(s)||(op(t,e,2,!1),i.add(s))}function $l(e,t,i){var s=0;t&&(s|=4),op(i,e,s,t)}var Ko="_reactListening"+Math.random().toString(36).slice(2);function co(e){if(!e[Ko]){e[Ko]=!0,hg.forEach(function(i){i!=="selectionchange"&&(zC.has(i)||$l(i,!1,e),$l(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ko]||(t[Ko]=!0,$l("selectionchange",!1,t))}}function op(e,t,i,s){switch(Wg(t)){case 1:var r=tC;break;case 4:r=iC;break;default:r=qc}i=r.bind(null,t,i,e),r=void 0,!Ga||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,i,{capture:!0,passive:r}):e.addEventListener(t,i,!0):r!==void 0?e.addEventListener(t,i,{passive:r}):e.addEventListener(t,i,!1)}function Yl(e,t,i,s,r){var o=s;if(!(t&1)&&!(t&2)&&s!==null)e:for(;;){if(s===null)return;var n=s.tag;if(n===3||n===4){var l=s.stateNode.containerInfo;if(l===r||l.nodeType===8&&l.parentNode===r)break;if(n===4)for(n=s.return;n!==null;){var a=n.tag;if((a===3||a===4)&&(a=n.stateNode.containerInfo,a===r||a.nodeType===8&&a.parentNode===r))return;n=n.return}for(;l!==null;){if(n=ss(l),n===null)return;if(a=n.tag,a===5||a===6){s=o=n;continue e}l=l.parentNode}}s=s.return}Dg(function(){var c=o,u=Kc(i),d=[];e:{var h=sp.get(e);if(h!==void 0){var g=Zc,v=e;switch(e){case"keypress":if(un(i)===0)break e;case"keydown":case"keyup":g=vC;break;case"focusin":v="focus",g=zl;break;case"focusout":v="blur",g=zl;break;case"beforeblur":case"afterblur":g=zl;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=Td;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=oC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=SC;break;case Jg:case ep:case tp:g=aC;break;case ip:g=bC;break;case"scroll":g=sC;break;case"wheel":g=FC;break;case"copy":case"cut":case"paste":g=uC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=Ad}var w=(t&4)!==0,S=!w&&e==="scroll",f=w?h!==null?h+"Capture":null:h;w=[];for(var p=c,m;p!==null;){m=p;var y=m.stateNode;if(m.tag===5&&y!==null&&(m=y,f!==null&&(y=so(p,f),y!=null&&w.push(uo(p,y,m)))),S)break;p=p.return}0<w.length&&(h=new g(h,v,null,i,u),d.push({event:h,listeners:w}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",h&&i!==La&&(v=i.relatedTarget||i.fromElement)&&(ss(v)||v[ui]))break e;if((g||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,g?(v=i.relatedTarget||i.toElement,g=c,v=v?ss(v):null,v!==null&&(S=Rs(v),v!==S||v.tag!==5&&v.tag!==6)&&(v=null)):(g=null,v=c),g!==v)){if(w=Td,y="onMouseLeave",f="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(w=Ad,y="onPointerLeave",f="onPointerEnter",p="pointer"),S=g==null?h:Gs(g),m=v==null?h:Gs(v),h=new w(y,p+"leave",g,i,u),h.target=S,h.relatedTarget=m,y=null,ss(u)===c&&(w=new w(f,p+"enter",v,i,u),w.target=m,w.relatedTarget=S,y=w),S=y,g&&v)t:{for(w=g,f=v,p=0,m=w;m;m=Ds(m))p++;for(m=0,y=f;y;y=Ds(y))m++;for(;0<p-m;)w=Ds(w),p--;for(;0<m-p;)f=Ds(f),m--;for(;p--;){if(w===f||f!==null&&w===f.alternate)break t;w=Ds(w),f=Ds(f)}w=null}else w=null;g!==null&&_d(d,h,g,w,!1),v!==null&&S!==null&&_d(d,S,v,w,!0)}}e:{if(h=c?Gs(c):window,g=h.nodeName&&h.nodeName.toLowerCase(),g==="select"||g==="input"&&h.type==="file")var b=kC;else if(Od(h))if(Yg)b=OC;else{b=IC;var F=AC}else(g=h.nodeName)&&g.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(b=LC);if(b&&(b=b(e,c))){$g(d,b,i,u);break e}F&&F(e,h,c),e==="focusout"&&(F=h._wrapperState)&&F.controlled&&h.type==="number"&&Ma(h,"number",h.value)}switch(F=c?Gs(c):window,e){case"focusin":(Od(F)||F.contentEditable==="true")&&(Ls=F,za=c,jr=null);break;case"focusout":jr=za=Ls=null;break;case"mousedown":Wa=!0;break;case"contextmenu":case"mouseup":case"dragend":Wa=!1,Vd(d,i,u);break;case"selectionchange":if(HC)break;case"keydown":case"keyup":Vd(d,i,u)}var R;if(eu)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Is?jg(e,i)&&(E="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(E="onCompositionStart");E&&(Ug&&i.locale!=="ko"&&(Is||E!=="onCompositionStart"?E==="onCompositionEnd"&&Is&&(R=_g()):(Di=u,Xc="value"in Di?Di.value:Di.textContent,Is=!0)),F=kn(c,E),0<F.length&&(E=new kd(E,e,null,i,u),d.push({event:E,listeners:F}),R?E.data=R:(R=Kg(i),R!==null&&(E.data=R)))),(R=PC?EC(e,i):DC(e,i))&&(c=kn(c,"onBeforeInput"),0<c.length&&(u=new kd("onBeforeInput","beforeinput",null,i,u),d.push({event:u,listeners:c}),u.data=R))}rp(d,t)})}function uo(e,t,i){return{instance:e,listener:t,currentTarget:i}}function kn(e,t){for(var i=t+"Capture",s=[];e!==null;){var r=e,o=r.stateNode;r.tag===5&&o!==null&&(r=o,o=so(e,i),o!=null&&s.unshift(uo(e,o,r)),o=so(e,t),o!=null&&s.push(uo(e,o,r))),e=e.return}return s}function Ds(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function _d(e,t,i,s,r){for(var o=t._reactName,n=[];i!==null&&i!==s;){var l=i,a=l.alternate,c=l.stateNode;if(a!==null&&a===s)break;l.tag===5&&c!==null&&(l=c,r?(a=so(i,o),a!=null&&n.unshift(uo(i,a,l))):r||(a=so(i,o),a!=null&&n.push(uo(i,a,l)))),i=i.return}n.length!==0&&e.push({event:t,listeners:n})}var WC=/\r\n?/g,_C=/\u0000|\uFFFD/g;function Ud(e){return(typeof e=="string"?e:""+e).replace(WC,`
`).replace(_C,"")}function $o(e,t,i){if(t=Ud(t),Ud(e)!==t&&i)throw Error(I(425))}function An(){}var _a=null,Ua=null;function ja(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ka=typeof setTimeout=="function"?setTimeout:void 0,UC=typeof clearTimeout=="function"?clearTimeout:void 0,jd=typeof Promise=="function"?Promise:void 0,jC=typeof queueMicrotask=="function"?queueMicrotask:typeof jd<"u"?function(e){return jd.resolve(null).then(e).catch(KC)}:Ka;function KC(e){setTimeout(function(){throw e})}function Ql(e,t){var i=t,s=0;do{var r=i.nextSibling;if(e.removeChild(i),r&&r.nodeType===8)if(i=r.data,i==="/$"){if(s===0){e.removeChild(r),no(t);return}s--}else i!=="$"&&i!=="$?"&&i!=="$!"||s++;i=r}while(i);no(t)}function Ii(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Kd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"){if(t===0)return e;t--}else i==="/$"&&t++}e=e.previousSibling}return null}var gr=Math.random().toString(36).slice(2),Ut="__reactFiber$"+gr,ho="__reactProps$"+gr,ui="__reactContainer$"+gr,$a="__reactEvents$"+gr,$C="__reactListeners$"+gr,YC="__reactHandles$"+gr;function ss(e){var t=e[Ut];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ui]||i[Ut]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Kd(e);e!==null;){if(i=e[Ut])return i;e=Kd(e)}return t}e=i,i=e.parentNode}return null}function Mo(e){return e=e[Ut]||e[ui],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Gs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(I(33))}function dl(e){return e[ho]||null}var Ya=[],Ns=-1;function ji(e){return{current:e}}function ce(e){0>Ns||(e.current=Ya[Ns],Ya[Ns]=null,Ns--)}function ne(e,t){Ns++,Ya[Ns]=e.current,e.current=t}var Vi={},We=ji(Vi),rt=ji(!1),ps=Vi;function tr(e,t){var i=e.type.contextTypes;if(!i)return Vi;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var r={},o;for(o in i)r[o]=t[o];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function ot(e){return e=e.childContextTypes,e!=null}function In(){ce(rt),ce(We)}function $d(e,t,i){if(We.current!==Vi)throw Error(I(168));ne(We,t),ne(rt,i)}function np(e,t,i){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return i;s=s.getChildContext();for(var r in s)if(!(r in t))throw Error(I(108,Av(e)||"Unknown",r));return ve({},i,s)}function Ln(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vi,ps=We.current,ne(We,e),ne(rt,rt.current),!0}function Yd(e,t,i){var s=e.stateNode;if(!s)throw Error(I(169));i?(e=np(e,t,ps),s.__reactInternalMemoizedMergedChildContext=e,ce(rt),ce(We),ne(We,e)):ce(rt),ne(rt,i)}var ti=null,hl=!1,ql=!1;function lp(e){ti===null?ti=[e]:ti.push(e)}function QC(e){hl=!0,lp(e)}function Ki(){if(!ql&&ti!==null){ql=!0;var e=0,t=te;try{var i=ti;for(te=1;e<i.length;e++){var s=i[e];do s=s(!0);while(s!==null)}ti=null,hl=!1}catch(r){throw ti!==null&&(ti=ti.slice(e+1)),Ag($c,Ki),r}finally{te=t,ql=!1}}return null}var Hs=[],Bs=0,On=null,Gn=0,Ct=[],wt=0,fs=null,si=1,ri="";function qi(e,t){Hs[Bs++]=Gn,Hs[Bs++]=On,On=e,Gn=t}function ap(e,t,i){Ct[wt++]=si,Ct[wt++]=ri,Ct[wt++]=fs,fs=e;var s=si;e=ri;var r=32-Ot(s)-1;s&=~(1<<r),i+=1;var o=32-Ot(t)+r;if(30<o){var n=r-r%5;o=(s&(1<<n)-1).toString(32),s>>=n,r-=n,si=1<<32-Ot(t)+r|i<<r|s,ri=o+e}else si=1<<o|i<<r|s,ri=e}function iu(e){e.return!==null&&(qi(e,1),ap(e,1,0))}function su(e){for(;e===On;)On=Hs[--Bs],Hs[Bs]=null,Gn=Hs[--Bs],Hs[Bs]=null;for(;e===fs;)fs=Ct[--wt],Ct[wt]=null,ri=Ct[--wt],Ct[wt]=null,si=Ct[--wt],Ct[wt]=null}var dt=null,ct=null,de=!1,At=null;function cp(e,t){var i=St(5,null,null,0);i.elementType="DELETED",i.stateNode=t,i.return=e,t=e.deletions,t===null?(e.deletions=[i],e.flags|=16):t.push(i)}function Qd(e,t){switch(e.tag){case 5:var i=e.type;return t=t.nodeType!==1||i.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,dt=e,ct=Ii(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,dt=e,ct=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(i=fs!==null?{id:si,overflow:ri}:null,e.memoizedState={dehydrated:t,treeContext:i,retryLane:1073741824},i=St(18,null,null,0),i.stateNode=t,i.return=e,e.child=i,dt=e,ct=null,!0):!1;default:return!1}}function Qa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function qa(e){if(de){var t=ct;if(t){var i=t;if(!Qd(e,t)){if(Qa(e))throw Error(I(418));t=Ii(i.nextSibling);var s=dt;t&&Qd(e,t)?cp(s,i):(e.flags=e.flags&-4097|2,de=!1,dt=e)}}else{if(Qa(e))throw Error(I(418));e.flags=e.flags&-4097|2,de=!1,dt=e}}}function qd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;dt=e}function Yo(e){if(e!==dt)return!1;if(!de)return qd(e),de=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ja(e.type,e.memoizedProps)),t&&(t=ct)){if(Qa(e))throw up(),Error(I(418));for(;t;)cp(e,t),t=Ii(t.nextSibling)}if(qd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"){if(t===0){ct=Ii(e.nextSibling);break e}t--}else i!=="$"&&i!=="$!"&&i!=="$?"||t++}e=e.nextSibling}ct=null}}else ct=dt?Ii(e.stateNode.nextSibling):null;return!0}function up(){for(var e=ct;e;)e=Ii(e.nextSibling)}function ir(){ct=dt=null,de=!1}function ru(e){At===null?At=[e]:At.push(e)}var qC=mi.ReactCurrentBatchConfig;function Dr(e,t,i){if(e=i.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(i._owner){if(i=i._owner,i){if(i.tag!==1)throw Error(I(309));var s=i.stateNode}if(!s)throw Error(I(147,e));var r=s,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(n){var l=r.refs;n===null?delete l[o]:l[o]=n},t._stringRef=o,t)}if(typeof e!="string")throw Error(I(284));if(!i._owner)throw Error(I(290,e))}return e}function Qo(e,t){throw e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Xd(e){var t=e._init;return t(e._payload)}function dp(e){function t(f,p){if(e){var m=f.deletions;m===null?(f.deletions=[p],f.flags|=16):m.push(p)}}function i(f,p){if(!e)return null;for(;p!==null;)t(f,p),p=p.sibling;return null}function s(f,p){for(f=new Map;p!==null;)p.key!==null?f.set(p.key,p):f.set(p.index,p),p=p.sibling;return f}function r(f,p){return f=Ni(f,p),f.index=0,f.sibling=null,f}function o(f,p,m){return f.index=m,e?(m=f.alternate,m!==null?(m=m.index,m<p?(f.flags|=2,p):m):(f.flags|=2,p)):(f.flags|=1048576,p)}function n(f){return e&&f.alternate===null&&(f.flags|=2),f}function l(f,p,m,y){return p===null||p.tag!==6?(p=sa(m,f.mode,y),p.return=f,p):(p=r(p,m),p.return=f,p)}function a(f,p,m,y){var b=m.type;return b===As?u(f,p,m.props.children,y,m.key):p!==null&&(p.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Ri&&Xd(b)===p.type)?(y=r(p,m.props),y.ref=Dr(f,p,m),y.return=f,y):(y=vn(m.type,m.key,m.props,null,f.mode,y),y.ref=Dr(f,p,m),y.return=f,y)}function c(f,p,m,y){return p===null||p.tag!==4||p.stateNode.containerInfo!==m.containerInfo||p.stateNode.implementation!==m.implementation?(p=ra(m,f.mode,y),p.return=f,p):(p=r(p,m.children||[]),p.return=f,p)}function u(f,p,m,y,b){return p===null||p.tag!==7?(p=as(m,f.mode,y,b),p.return=f,p):(p=r(p,m),p.return=f,p)}function d(f,p,m){if(typeof p=="string"&&p!==""||typeof p=="number")return p=sa(""+p,f.mode,m),p.return=f,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Ho:return m=vn(p.type,p.key,p.props,null,f.mode,m),m.ref=Dr(f,null,p),m.return=f,m;case ks:return p=ra(p,f.mode,m),p.return=f,p;case Ri:var y=p._init;return d(f,y(p._payload),m)}if(Gr(p)||Rr(p))return p=as(p,f.mode,m,null),p.return=f,p;Qo(f,p)}return null}function h(f,p,m,y){var b=p!==null?p.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return b!==null?null:l(f,p,""+m,y);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ho:return m.key===b?a(f,p,m,y):null;case ks:return m.key===b?c(f,p,m,y):null;case Ri:return b=m._init,h(f,p,b(m._payload),y)}if(Gr(m)||Rr(m))return b!==null?null:u(f,p,m,y,null);Qo(f,m)}return null}function g(f,p,m,y,b){if(typeof y=="string"&&y!==""||typeof y=="number")return f=f.get(m)||null,l(p,f,""+y,b);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ho:return f=f.get(y.key===null?m:y.key)||null,a(p,f,y,b);case ks:return f=f.get(y.key===null?m:y.key)||null,c(p,f,y,b);case Ri:var F=y._init;return g(f,p,m,F(y._payload),b)}if(Gr(y)||Rr(y))return f=f.get(m)||null,u(p,f,y,b,null);Qo(p,y)}return null}function v(f,p,m,y){for(var b=null,F=null,R=p,E=p=0,L=null;R!==null&&E<m.length;E++){R.index>E?(L=R,R=null):L=R.sibling;var A=h(f,R,m[E],y);if(A===null){R===null&&(R=L);break}e&&R&&A.alternate===null&&t(f,R),p=o(A,p,E),F===null?b=A:F.sibling=A,F=A,R=L}if(E===m.length)return i(f,R),de&&qi(f,E),b;if(R===null){for(;E<m.length;E++)R=d(f,m[E],y),R!==null&&(p=o(R,p,E),F===null?b=R:F.sibling=R,F=R);return de&&qi(f,E),b}for(R=s(f,R);E<m.length;E++)L=g(R,f,E,m[E],y),L!==null&&(e&&L.alternate!==null&&R.delete(L.key===null?E:L.key),p=o(L,p,E),F===null?b=L:F.sibling=L,F=L);return e&&R.forEach(function(O){return t(f,O)}),de&&qi(f,E),b}function w(f,p,m,y){var b=Rr(m);if(typeof b!="function")throw Error(I(150));if(m=b.call(m),m==null)throw Error(I(151));for(var F=b=null,R=p,E=p=0,L=null,A=m.next();R!==null&&!A.done;E++,A=m.next()){R.index>E?(L=R,R=null):L=R.sibling;var O=h(f,R,A.value,y);if(O===null){R===null&&(R=L);break}e&&R&&O.alternate===null&&t(f,R),p=o(O,p,E),F===null?b=O:F.sibling=O,F=O,R=L}if(A.done)return i(f,R),de&&qi(f,E),b;if(R===null){for(;!A.done;E++,A=m.next())A=d(f,A.value,y),A!==null&&(p=o(A,p,E),F===null?b=A:F.sibling=A,F=A);return de&&qi(f,E),b}for(R=s(f,R);!A.done;E++,A=m.next())A=g(R,f,E,A.value,y),A!==null&&(e&&A.alternate!==null&&R.delete(A.key===null?E:A.key),p=o(A,p,E),F===null?b=A:F.sibling=A,F=A);return e&&R.forEach(function(V){return t(f,V)}),de&&qi(f,E),b}function S(f,p,m,y){if(typeof m=="object"&&m!==null&&m.type===As&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Ho:e:{for(var b=m.key,F=p;F!==null;){if(F.key===b){if(b=m.type,b===As){if(F.tag===7){i(f,F.sibling),p=r(F,m.props.children),p.return=f,f=p;break e}}else if(F.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Ri&&Xd(b)===F.type){i(f,F.sibling),p=r(F,m.props),p.ref=Dr(f,F,m),p.return=f,f=p;break e}i(f,F);break}else t(f,F);F=F.sibling}m.type===As?(p=as(m.props.children,f.mode,y,m.key),p.return=f,f=p):(y=vn(m.type,m.key,m.props,null,f.mode,y),y.ref=Dr(f,p,m),y.return=f,f=y)}return n(f);case ks:e:{for(F=m.key;p!==null;){if(p.key===F)if(p.tag===4&&p.stateNode.containerInfo===m.containerInfo&&p.stateNode.implementation===m.implementation){i(f,p.sibling),p=r(p,m.children||[]),p.return=f,f=p;break e}else{i(f,p);break}else t(f,p);p=p.sibling}p=ra(m,f.mode,y),p.return=f,f=p}return n(f);case Ri:return F=m._init,S(f,p,F(m._payload),y)}if(Gr(m))return v(f,p,m,y);if(Rr(m))return w(f,p,m,y);Qo(f,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,p!==null&&p.tag===6?(i(f,p.sibling),p=r(p,m),p.return=f,f=p):(i(f,p),p=sa(m,f.mode,y),p.return=f,f=p),n(f)):i(f,p)}return S}var sr=dp(!0),hp=dp(!1),Nn=ji(null),Hn=null,Vs=null,ou=null;function nu(){ou=Vs=Hn=null}function lu(e){var t=Nn.current;ce(Nn),e._currentValue=t}function Xa(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Qs(e,t){Hn=e,ou=Vs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(it=!0),e.firstContext=null)}function Pt(e){var t=e._currentValue;if(ou!==e)if(e={context:e,memoizedValue:t,next:null},Vs===null){if(Hn===null)throw Error(I(308));Vs=e,Hn.dependencies={lanes:0,firstContext:e}}else Vs=Vs.next=e;return t}var rs=null;function au(e){rs===null?rs=[e]:rs.push(e)}function gp(e,t,i,s){var r=t.interleaved;return r===null?(i.next=i,au(t)):(i.next=r.next,r.next=i),t.interleaved=i,di(e,s)}function di(e,t){e.lanes|=t;var i=e.alternate;for(i!==null&&(i.lanes|=t),i=e,e=e.return;e!==null;)e.childLanes|=t,i=e.alternate,i!==null&&(i.childLanes|=t),i=e,e=e.return;return i.tag===3?i.stateNode:null}var Fi=!1;function cu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function oi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Li(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,X&2){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,di(e,i)}return r=s.interleaved,r===null?(t.next=t,au(s)):(t.next=r.next,r.next=t),s.interleaved=t,di(e,i)}function dn(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Yc(e,i)}}function Zd(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var r=null,o=null;if(i=i.firstBaseUpdate,i!==null){do{var n={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};o===null?r=o=n:o=o.next=n,i=i.next}while(i!==null);o===null?r=o=t:o=o.next=t}else r=o=t;i={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:s.shared,effects:s.effects},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}function Bn(e,t,i,s){var r=e.updateQueue;Fi=!1;var o=r.firstBaseUpdate,n=r.lastBaseUpdate,l=r.shared.pending;if(l!==null){r.shared.pending=null;var a=l,c=a.next;a.next=null,n===null?o=c:n.next=c,n=a;var u=e.alternate;u!==null&&(u=u.updateQueue,l=u.lastBaseUpdate,l!==n&&(l===null?u.firstBaseUpdate=c:l.next=c,u.lastBaseUpdate=a))}if(o!==null){var d=r.baseState;n=0,u=c=a=null,l=o;do{var h=l.lane,g=l.eventTime;if((s&h)===h){u!==null&&(u=u.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,w=l;switch(h=t,g=i,w.tag){case 1:if(v=w.payload,typeof v=="function"){d=v.call(g,d,h);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,h=typeof v=="function"?v.call(g,d,h):v,h==null)break e;d=ve({},d,h);break e;case 2:Fi=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=r.effects,h===null?r.effects=[l]:h.push(l))}else g={eventTime:g,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},u===null?(c=u=g,a=d):u=u.next=g,n|=h;if(l=l.next,l===null){if(l=r.shared.pending,l===null)break;h=l,l=h.next,h.next=null,r.lastBaseUpdate=h,r.shared.pending=null}}while(!0);if(u===null&&(a=d),r.baseState=a,r.firstBaseUpdate=c,r.lastBaseUpdate=u,t=r.shared.interleaved,t!==null){r=t;do n|=r.lane,r=r.next;while(r!==t)}else o===null&&(r.shared.lanes=0);vs|=n,e.lanes=n,e.memoizedState=d}}function Jd(e,t,i){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var s=e[t],r=s.callback;if(r!==null){if(s.callback=null,s=i,typeof r!="function")throw Error(I(191,r));r.call(s)}}}var To={},Yt=ji(To),go=ji(To),po=ji(To);function os(e){if(e===To)throw Error(I(174));return e}function uu(e,t){switch(ne(po,t),ne(go,e),ne(Yt,To),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ka(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ka(t,e)}ce(Yt),ne(Yt,t)}function rr(){ce(Yt),ce(go),ce(po)}function fp(e){os(po.current);var t=os(Yt.current),i=ka(t,e.type);t!==i&&(ne(go,e),ne(Yt,i))}function du(e){go.current===e&&(ce(Yt),ce(go))}var ge=ji(0);function Vn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Xl=[];function hu(){for(var e=0;e<Xl.length;e++)Xl[e]._workInProgressVersionPrimary=null;Xl.length=0}var hn=mi.ReactCurrentDispatcher,Zl=mi.ReactCurrentBatchConfig,ms=0,me=null,De=null,Te=null,zn=!1,Kr=!1,fo=0,XC=0;function He(){throw Error(I(321))}function gu(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Ht(e[i],t[i]))return!1;return!0}function pu(e,t,i,s,r,o){if(ms=o,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,hn.current=e===null||e.memoizedState===null?tw:iw,e=i(s,r),Kr){o=0;do{if(Kr=!1,fo=0,25<=o)throw Error(I(301));o+=1,Te=De=null,t.updateQueue=null,hn.current=sw,e=i(s,r)}while(Kr)}if(hn.current=Wn,t=De!==null&&De.next!==null,ms=0,Te=De=me=null,zn=!1,t)throw Error(I(300));return e}function fu(){var e=fo!==0;return fo=0,e}function _t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Te===null?me.memoizedState=Te=e:Te=Te.next=e,Te}function Et(){if(De===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var t=Te===null?me.memoizedState:Te.next;if(t!==null)Te=t,De=e;else{if(e===null)throw Error(I(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},Te===null?me.memoizedState=Te=e:Te=Te.next=e}return Te}function mo(e,t){return typeof t=="function"?t(e):t}function Jl(e){var t=Et(),i=t.queue;if(i===null)throw Error(I(311));i.lastRenderedReducer=e;var s=De,r=s.baseQueue,o=i.pending;if(o!==null){if(r!==null){var n=r.next;r.next=o.next,o.next=n}s.baseQueue=r=o,i.pending=null}if(r!==null){o=r.next,s=s.baseState;var l=n=null,a=null,c=o;do{var u=c.lane;if((ms&u)===u)a!==null&&(a=a.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),s=c.hasEagerState?c.eagerState:e(s,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};a===null?(l=a=d,n=s):a=a.next=d,me.lanes|=u,vs|=u}c=c.next}while(c!==null&&c!==o);a===null?n=s:a.next=l,Ht(s,t.memoizedState)||(it=!0),t.memoizedState=s,t.baseState=n,t.baseQueue=a,i.lastRenderedState=s}if(e=i.interleaved,e!==null){r=e;do o=r.lane,me.lanes|=o,vs|=o,r=r.next;while(r!==e)}else r===null&&(i.lanes=0);return[t.memoizedState,i.dispatch]}function ea(e){var t=Et(),i=t.queue;if(i===null)throw Error(I(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,o=t.memoizedState;if(r!==null){i.pending=null;var n=r=r.next;do o=e(o,n.action),n=n.next;while(n!==r);Ht(o,t.memoizedState)||(it=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),i.lastRenderedState=o}return[o,s]}function mp(){}function vp(e,t){var i=me,s=Et(),r=t(),o=!Ht(s.memoizedState,r);if(o&&(s.memoizedState=r,it=!0),s=s.queue,mu(Sp.bind(null,i,s,e),[e]),s.getSnapshot!==t||o||Te!==null&&Te.memoizedState.tag&1){if(i.flags|=2048,vo(9,wp.bind(null,i,s,r,t),void 0,null),ke===null)throw Error(I(349));ms&30||Cp(i,t,r)}return r}function Cp(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function wp(e,t,i,s){t.value=i,t.getSnapshot=s,yp(t)&&bp(e)}function Sp(e,t,i){return i(function(){yp(t)&&bp(e)})}function yp(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Ht(e,i)}catch{return!0}}function bp(e){var t=di(e,1);t!==null&&Gt(t,e,1,-1)}function eh(e){var t=_t();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:e},t.queue=e,e=e.dispatch=ew.bind(null,me,e),[t.memoizedState,e]}function vo(e,t,i,s){return e={tag:e,create:t,destroy:i,deps:s,next:null},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.lastEffect=e.next=e):(i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e)),e}function Rp(){return Et().memoizedState}function gn(e,t,i,s){var r=_t();me.flags|=e,r.memoizedState=vo(1|t,i,void 0,s===void 0?null:s)}function gl(e,t,i,s){var r=Et();s=s===void 0?null:s;var o=void 0;if(De!==null){var n=De.memoizedState;if(o=n.destroy,s!==null&&gu(s,n.deps)){r.memoizedState=vo(t,i,o,s);return}}me.flags|=e,r.memoizedState=vo(1|t,i,o,s)}function th(e,t){return gn(8390656,8,e,t)}function mu(e,t){return gl(2048,8,e,t)}function Fp(e,t){return gl(4,2,e,t)}function xp(e,t){return gl(4,4,e,t)}function Pp(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ep(e,t,i){return i=i!=null?i.concat([e]):null,gl(4,4,Pp.bind(null,t,e),i)}function vu(){}function Dp(e,t){var i=Et();t=t===void 0?null:t;var s=i.memoizedState;return s!==null&&t!==null&&gu(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Mp(e,t){var i=Et();t=t===void 0?null:t;var s=i.memoizedState;return s!==null&&t!==null&&gu(t,s[1])?s[0]:(e=e(),i.memoizedState=[e,t],e)}function Tp(e,t,i){return ms&21?(Ht(i,t)||(i=Og(),me.lanes|=i,vs|=i,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,it=!0),e.memoizedState=i)}function ZC(e,t){var i=te;te=i!==0&&4>i?i:4,e(!0);var s=Zl.transition;Zl.transition={};try{e(!1),t()}finally{te=i,Zl.transition=s}}function kp(){return Et().memoizedState}function JC(e,t,i){var s=Gi(e);if(i={lane:s,action:i,hasEagerState:!1,eagerState:null,next:null},Ap(e))Ip(t,i);else if(i=gp(e,t,i,s),i!==null){var r=Ze();Gt(i,e,s,r),Lp(i,t,s)}}function ew(e,t,i){var s=Gi(e),r={lane:s,action:i,hasEagerState:!1,eagerState:null,next:null};if(Ap(e))Ip(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var n=t.lastRenderedState,l=o(n,i);if(r.hasEagerState=!0,r.eagerState=l,Ht(l,n)){var a=t.interleaved;a===null?(r.next=r,au(t)):(r.next=a.next,a.next=r),t.interleaved=r;return}}catch{}finally{}i=gp(e,t,r,s),i!==null&&(r=Ze(),Gt(i,e,s,r),Lp(i,t,s))}}function Ap(e){var t=e.alternate;return e===me||t!==null&&t===me}function Ip(e,t){Kr=zn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Lp(e,t,i){if(i&4194240){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Yc(e,i)}}var Wn={readContext:Pt,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},tw={readContext:Pt,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:Pt,useEffect:th,useImperativeHandle:function(e,t,i){return i=i!=null?i.concat([e]):null,gn(4194308,4,Pp.bind(null,t,e),i)},useLayoutEffect:function(e,t){return gn(4194308,4,e,t)},useInsertionEffect:function(e,t){return gn(4,2,e,t)},useMemo:function(e,t){var i=_t();return t=t===void 0?null:t,e=e(),i.memoizedState=[e,t],e},useReducer:function(e,t,i){var s=_t();return t=i!==void 0?i(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=JC.bind(null,me,e),[s.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:eh,useDebugValue:vu,useDeferredValue:function(e){return _t().memoizedState=e},useTransition:function(){var e=eh(!1),t=e[0];return e=ZC.bind(null,e[1]),_t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,i){var s=me,r=_t();if(de){if(i===void 0)throw Error(I(407));i=i()}else{if(i=t(),ke===null)throw Error(I(349));ms&30||Cp(s,t,i)}r.memoizedState=i;var o={value:i,getSnapshot:t};return r.queue=o,th(Sp.bind(null,s,o,e),[e]),s.flags|=2048,vo(9,wp.bind(null,s,o,i,t),void 0,null),i},useId:function(){var e=_t(),t=ke.identifierPrefix;if(de){var i=ri,s=si;i=(s&~(1<<32-Ot(s)-1)).toString(32)+i,t=":"+t+"R"+i,i=fo++,0<i&&(t+="H"+i.toString(32)),t+=":"}else i=XC++,t=":"+t+"r"+i.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},iw={readContext:Pt,useCallback:Dp,useContext:Pt,useEffect:mu,useImperativeHandle:Ep,useInsertionEffect:Fp,useLayoutEffect:xp,useMemo:Mp,useReducer:Jl,useRef:Rp,useState:function(){return Jl(mo)},useDebugValue:vu,useDeferredValue:function(e){var t=Et();return Tp(t,De.memoizedState,e)},useTransition:function(){var e=Jl(mo)[0],t=Et().memoizedState;return[e,t]},useMutableSource:mp,useSyncExternalStore:vp,useId:kp,unstable_isNewReconciler:!1},sw={readContext:Pt,useCallback:Dp,useContext:Pt,useEffect:mu,useImperativeHandle:Ep,useInsertionEffect:Fp,useLayoutEffect:xp,useMemo:Mp,useReducer:ea,useRef:Rp,useState:function(){return ea(mo)},useDebugValue:vu,useDeferredValue:function(e){var t=Et();return De===null?t.memoizedState=e:Tp(t,De.memoizedState,e)},useTransition:function(){var e=ea(mo)[0],t=Et().memoizedState;return[e,t]},useMutableSource:mp,useSyncExternalStore:vp,useId:kp,unstable_isNewReconciler:!1};function Mt(e,t){if(e&&e.defaultProps){t=ve({},t),e=e.defaultProps;for(var i in e)t[i]===void 0&&(t[i]=e[i]);return t}return t}function Za(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:ve({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var pl={isMounted:function(e){return(e=e._reactInternals)?Rs(e)===e:!1},enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Ze(),r=Gi(e),o=oi(s,r);o.payload=t,i!=null&&(o.callback=i),t=Li(e,o,r),t!==null&&(Gt(t,e,r,s),dn(t,e,r))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Ze(),r=Gi(e),o=oi(s,r);o.tag=1,o.payload=t,i!=null&&(o.callback=i),t=Li(e,o,r),t!==null&&(Gt(t,e,r,s),dn(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Ze(),s=Gi(e),r=oi(i,s);r.tag=2,t!=null&&(r.callback=t),t=Li(e,r,s),t!==null&&(Gt(t,e,s,i),dn(t,e,s))}};function ih(e,t,i,s,r,o,n){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,o,n):t.prototype&&t.prototype.isPureReactComponent?!ao(i,s)||!ao(r,o):!0}function Op(e,t,i){var s=!1,r=Vi,o=t.contextType;return typeof o=="object"&&o!==null?o=Pt(o):(r=ot(t)?ps:We.current,s=t.contextTypes,o=(s=s!=null)?tr(e,r):Vi),t=new t(i,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=pl,e.stateNode=t,t._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=o),t}function sh(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&pl.enqueueReplaceState(t,t.state,null)}function Ja(e,t,i,s){var r=e.stateNode;r.props=i,r.state=e.memoizedState,r.refs={},cu(e);var o=t.contextType;typeof o=="object"&&o!==null?r.context=Pt(o):(o=ot(t)?ps:We.current,r.context=tr(e,o)),r.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Za(e,t,o,i),r.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(t=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),t!==r.state&&pl.enqueueReplaceState(r,r.state,null),Bn(e,i,r,s),r.state=e.memoizedState),typeof r.componentDidMount=="function"&&(e.flags|=4194308)}function or(e,t){try{var i="",s=t;do i+=kv(s),s=s.return;while(s);var r=i}catch(o){r=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:r,digest:null}}function ta(e,t,i){return{value:e,source:null,stack:i??null,digest:t??null}}function ec(e,t){try{console.error(t.value)}catch(i){setTimeout(function(){throw i})}}var rw=typeof WeakMap=="function"?WeakMap:Map;function Gp(e,t,i){i=oi(-1,i),i.tag=3,i.payload={element:null};var s=t.value;return i.callback=function(){Un||(Un=!0,uc=s),ec(e,t)},i}function Np(e,t,i){i=oi(-1,i),i.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var r=t.value;i.payload=function(){return s(r)},i.callback=function(){ec(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(i.callback=function(){ec(e,t),typeof s!="function"&&(Oi===null?Oi=new Set([this]):Oi.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n!==null?n:""})}),i}function rh(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new rw;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(i)||(r.add(i),e=Cw.bind(null,e,t,i),t.then(e,e))}function oh(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function nh(e,t,i,s,r){return e.mode&1?(e.flags|=65536,e.lanes=r,e):(e===t?e.flags|=65536:(e.flags|=128,i.flags|=131072,i.flags&=-52805,i.tag===1&&(i.alternate===null?i.tag=17:(t=oi(-1,1),t.tag=2,Li(i,t,1))),i.lanes|=1),e)}var ow=mi.ReactCurrentOwner,it=!1;function $e(e,t,i,s){t.child=e===null?hp(t,null,i,s):sr(t,e.child,i,s)}function lh(e,t,i,s,r){i=i.render;var o=t.ref;return Qs(t,r),s=pu(e,t,i,s,o,r),i=fu(),e!==null&&!it?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,hi(e,t,r)):(de&&i&&iu(t),t.flags|=1,$e(e,t,s,r),t.child)}function ah(e,t,i,s,r){if(e===null){var o=i.type;return typeof o=="function"&&!xu(o)&&o.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(t.tag=15,t.type=o,Hp(e,t,o,s,r)):(e=vn(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&r)){var n=o.memoizedProps;if(i=i.compare,i=i!==null?i:ao,i(n,s)&&e.ref===t.ref)return hi(e,t,r)}return t.flags|=1,e=Ni(o,s),e.ref=t.ref,e.return=t,t.child=e}function Hp(e,t,i,s,r){if(e!==null){var o=e.memoizedProps;if(ao(o,s)&&e.ref===t.ref)if(it=!1,t.pendingProps=s=o,(e.lanes&r)!==0)e.flags&131072&&(it=!0);else return t.lanes=e.lanes,hi(e,t,r)}return tc(e,t,i,s,r)}function Bp(e,t,i){var s=t.pendingProps,r=s.children,o=e!==null?e.memoizedState:null;if(s.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ne(Ws,at),at|=i;else{if(!(i&1073741824))return e=o!==null?o.baseLanes|i:i,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ne(Ws,at),at|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=o!==null?o.baseLanes:i,ne(Ws,at),at|=s}else o!==null?(s=o.baseLanes|i,t.memoizedState=null):s=i,ne(Ws,at),at|=s;return $e(e,t,r,i),t.child}function Vp(e,t){var i=t.ref;(e===null&&i!==null||e!==null&&e.ref!==i)&&(t.flags|=512,t.flags|=2097152)}function tc(e,t,i,s,r){var o=ot(i)?ps:We.current;return o=tr(t,o),Qs(t,r),i=pu(e,t,i,s,o,r),s=fu(),e!==null&&!it?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,hi(e,t,r)):(de&&s&&iu(t),t.flags|=1,$e(e,t,i,r),t.child)}function ch(e,t,i,s,r){if(ot(i)){var o=!0;Ln(t)}else o=!1;if(Qs(t,r),t.stateNode===null)pn(e,t),Op(t,i,s),Ja(t,i,s,r),s=!0;else if(e===null){var n=t.stateNode,l=t.memoizedProps;n.props=l;var a=n.context,c=i.contextType;typeof c=="object"&&c!==null?c=Pt(c):(c=ot(i)?ps:We.current,c=tr(t,c));var u=i.getDerivedStateFromProps,d=typeof u=="function"||typeof n.getSnapshotBeforeUpdate=="function";d||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(l!==s||a!==c)&&sh(t,n,s,c),Fi=!1;var h=t.memoizedState;n.state=h,Bn(t,s,n,r),a=t.memoizedState,l!==s||h!==a||rt.current||Fi?(typeof u=="function"&&(Za(t,i,u,s),a=t.memoizedState),(l=Fi||ih(t,i,l,s,h,a,c))?(d||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount()),typeof n.componentDidMount=="function"&&(t.flags|=4194308)):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=a),n.props=s,n.state=a,n.context=c,s=l):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,pp(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:Mt(t.type,l),n.props=c,d=t.pendingProps,h=n.context,a=i.contextType,typeof a=="object"&&a!==null?a=Pt(a):(a=ot(i)?ps:We.current,a=tr(t,a));var g=i.getDerivedStateFromProps;(u=typeof g=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(l!==d||h!==a)&&sh(t,n,s,a),Fi=!1,h=t.memoizedState,n.state=h,Bn(t,s,n,r);var v=t.memoizedState;l!==d||h!==v||rt.current||Fi?(typeof g=="function"&&(Za(t,i,g,s),v=t.memoizedState),(c=Fi||ih(t,i,c,s,h,v,a)||!1)?(u||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,v,a),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,v,a)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=v),n.props=s,n.state=v,n.context=a,s=c):(typeof n.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),s=!1)}return ic(e,t,i,s,o,r)}function ic(e,t,i,s,r,o){Vp(e,t);var n=(t.flags&128)!==0;if(!s&&!n)return r&&Yd(t,i,!1),hi(e,t,o);s=t.stateNode,ow.current=t;var l=n&&typeof i.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&n?(t.child=sr(t,e.child,null,o),t.child=sr(t,null,l,o)):$e(e,t,l,o),t.memoizedState=s.state,r&&Yd(t,i,!0),t.child}function zp(e){var t=e.stateNode;t.pendingContext?$d(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$d(e,t.context,!1),uu(e,t.containerInfo)}function uh(e,t,i,s,r){return ir(),ru(r),t.flags|=256,$e(e,t,i,s),t.child}var sc={dehydrated:null,treeContext:null,retryLane:0};function rc(e){return{baseLanes:e,cachePool:null,transitions:null}}function Wp(e,t,i){var s=t.pendingProps,r=ge.current,o=!1,n=(t.flags&128)!==0,l;if((l=n)||(l=e!==null&&e.memoizedState===null?!1:(r&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(r|=1),ne(ge,r&1),e===null)return qa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(n=s.children,e=s.fallback,o?(s=t.mode,o=t.child,n={mode:"hidden",children:n},!(s&1)&&o!==null?(o.childLanes=0,o.pendingProps=n):o=vl(n,s,0,null),e=as(e,s,i,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=rc(i),t.memoizedState=sc,e):Cu(t,n));if(r=e.memoizedState,r!==null&&(l=r.dehydrated,l!==null))return nw(e,t,n,s,l,r,i);if(o){o=s.fallback,n=t.mode,r=e.child,l=r.sibling;var a={mode:"hidden",children:s.children};return!(n&1)&&t.child!==r?(s=t.child,s.childLanes=0,s.pendingProps=a,t.deletions=null):(s=Ni(r,a),s.subtreeFlags=r.subtreeFlags&14680064),l!==null?o=Ni(l,o):(o=as(o,n,i,null),o.flags|=2),o.return=t,s.return=t,s.sibling=o,t.child=s,s=o,o=t.child,n=e.child.memoizedState,n=n===null?rc(i):{baseLanes:n.baseLanes|i,cachePool:null,transitions:n.transitions},o.memoizedState=n,o.childLanes=e.childLanes&~i,t.memoizedState=sc,s}return o=e.child,e=o.sibling,s=Ni(o,{mode:"visible",children:s.children}),!(t.mode&1)&&(s.lanes=i),s.return=t,s.sibling=null,e!==null&&(i=t.deletions,i===null?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=s,t.memoizedState=null,s}function Cu(e,t){return t=vl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function qo(e,t,i,s){return s!==null&&ru(s),sr(t,e.child,null,i),e=Cu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nw(e,t,i,s,r,o,n){if(i)return t.flags&256?(t.flags&=-257,s=ta(Error(I(422))),qo(e,t,n,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=s.fallback,r=t.mode,s=vl({mode:"visible",children:s.children},r,0,null),o=as(o,r,n,null),o.flags|=2,s.return=t,o.return=t,s.sibling=o,t.child=s,t.mode&1&&sr(t,e.child,null,n),t.child.memoizedState=rc(n),t.memoizedState=sc,o);if(!(t.mode&1))return qo(e,t,n,null);if(r.data==="$!"){if(s=r.nextSibling&&r.nextSibling.dataset,s)var l=s.dgst;return s=l,o=Error(I(419)),s=ta(o,s,void 0),qo(e,t,n,s)}if(l=(n&e.childLanes)!==0,it||l){if(s=ke,s!==null){switch(n&-n){case 4:r=2;break;case 16:r=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(s.suspendedLanes|n)?0:r,r!==0&&r!==o.retryLane&&(o.retryLane=r,di(e,r),Gt(s,e,r,-1))}return Fu(),s=ta(Error(I(421))),qo(e,t,n,s)}return r.data==="$?"?(t.flags|=128,t.child=e.child,t=ww.bind(null,e),r._reactRetry=t,null):(e=o.treeContext,ct=Ii(r.nextSibling),dt=t,de=!0,At=null,e!==null&&(Ct[wt++]=si,Ct[wt++]=ri,Ct[wt++]=fs,si=e.id,ri=e.overflow,fs=t),t=Cu(t,s.children),t.flags|=4096,t)}function dh(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Xa(e.return,t,i)}function ia(e,t,i,s,r){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=s,o.tail=i,o.tailMode=r)}function _p(e,t,i){var s=t.pendingProps,r=s.revealOrder,o=s.tail;if($e(e,t,s.children,i),s=ge.current,s&2)s=s&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dh(e,i,t);else if(e.tag===19)dh(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}if(ne(ge,s),!(t.mode&1))t.memoizedState=null;else switch(r){case"forwards":for(i=t.child,r=null;i!==null;)e=i.alternate,e!==null&&Vn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),ia(t,!1,r,i,o);break;case"backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Vn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}ia(t,!0,i,null,o);break;case"together":ia(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function pn(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function hi(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),vs|=t.lanes,!(i&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,i=Ni(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Ni(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function lw(e,t,i){switch(t.tag){case 3:zp(t),ir();break;case 5:fp(t);break;case 1:ot(t.type)&&Ln(t);break;case 4:uu(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,r=t.memoizedProps.value;ne(Nn,s._currentValue),s._currentValue=r;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(ne(ge,ge.current&1),t.flags|=128,null):i&t.child.childLanes?Wp(e,t,i):(ne(ge,ge.current&1),e=hi(e,t,i),e!==null?e.sibling:null);ne(ge,ge.current&1);break;case 19:if(s=(i&t.childLanes)!==0,e.flags&128){if(s)return _p(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),ne(ge,ge.current),s)break;return null;case 22:case 23:return t.lanes=0,Bp(e,t,i)}return hi(e,t,i)}var Up,oc,jp,Kp;Up=function(e,t){for(var i=t.child;i!==null;){if(i.tag===5||i.tag===6)e.appendChild(i.stateNode);else if(i.tag!==4&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};oc=function(){};jp=function(e,t,i,s){var r=e.memoizedProps;if(r!==s){e=t.stateNode,os(Yt.current);var o=null;switch(i){case"input":r=Ea(e,r),s=Ea(e,s),o=[];break;case"select":r=ve({},r,{value:void 0}),s=ve({},s,{value:void 0}),o=[];break;case"textarea":r=Ta(e,r),s=Ta(e,s),o=[];break;default:typeof r.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=An)}Aa(i,s);var n;i=null;for(c in r)if(!s.hasOwnProperty(c)&&r.hasOwnProperty(c)&&r[c]!=null)if(c==="style"){var l=r[c];for(n in l)l.hasOwnProperty(n)&&(i||(i={}),i[n]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(to.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in s){var a=s[c];if(l=r!=null?r[c]:void 0,s.hasOwnProperty(c)&&a!==l&&(a!=null||l!=null))if(c==="style")if(l){for(n in l)!l.hasOwnProperty(n)||a&&a.hasOwnProperty(n)||(i||(i={}),i[n]="");for(n in a)a.hasOwnProperty(n)&&l[n]!==a[n]&&(i||(i={}),i[n]=a[n])}else i||(o||(o=[]),o.push(c,i)),i=a;else c==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(c,a)):c==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(c,""+a):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(to.hasOwnProperty(c)?(a!=null&&c==="onScroll"&&le("scroll",e),o||l===a||(o=[])):(o=o||[]).push(c,a))}i&&(o=o||[]).push("style",i);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};Kp=function(e,t,i,s){i!==s&&(t.flags|=4)};function Mr(e,t){if(!de)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Be(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags&14680064,s|=r.flags&14680064,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function aw(e,t,i){var s=t.pendingProps;switch(su(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(t),null;case 1:return ot(t.type)&&In(),Be(t),null;case 3:return s=t.stateNode,rr(),ce(rt),ce(We),hu(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Yo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,At!==null&&(gc(At),At=null))),oc(e,t),Be(t),null;case 5:du(t);var r=os(po.current);if(i=t.type,e!==null&&t.stateNode!=null)jp(e,t,i,s,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(t.stateNode===null)throw Error(I(166));return Be(t),null}if(e=os(Yt.current),Yo(t)){s=t.stateNode,i=t.type;var o=t.memoizedProps;switch(s[Ut]=t,s[ho]=o,e=(t.mode&1)!==0,i){case"dialog":le("cancel",s),le("close",s);break;case"iframe":case"object":case"embed":le("load",s);break;case"video":case"audio":for(r=0;r<Hr.length;r++)le(Hr[r],s);break;case"source":le("error",s);break;case"img":case"image":case"link":le("error",s),le("load",s);break;case"details":le("toggle",s);break;case"input":Sd(s,o),le("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!o.multiple},le("invalid",s);break;case"textarea":bd(s,o),le("invalid",s)}Aa(i,o),r=null;for(var n in o)if(o.hasOwnProperty(n)){var l=o[n];n==="children"?typeof l=="string"?s.textContent!==l&&(o.suppressHydrationWarning!==!0&&$o(s.textContent,l,e),r=["children",l]):typeof l=="number"&&s.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&$o(s.textContent,l,e),r=["children",""+l]):to.hasOwnProperty(n)&&l!=null&&n==="onScroll"&&le("scroll",s)}switch(i){case"input":Bo(s),yd(s,o,!0);break;case"textarea":Bo(s),Rd(s);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(s.onclick=An)}s=r,t.updateQueue=s,s!==null&&(t.flags|=4)}else{n=r.nodeType===9?r:r.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Sg(i)),e==="http://www.w3.org/1999/xhtml"?i==="script"?(e=n.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=n.createElement(i,{is:s.is}):(e=n.createElement(i),i==="select"&&(n=e,s.multiple?n.multiple=!0:s.size&&(n.size=s.size))):e=n.createElementNS(e,i),e[Ut]=t,e[ho]=s,Up(e,t,!1,!1),t.stateNode=e;e:{switch(n=Ia(i,s),i){case"dialog":le("cancel",e),le("close",e),r=s;break;case"iframe":case"object":case"embed":le("load",e),r=s;break;case"video":case"audio":for(r=0;r<Hr.length;r++)le(Hr[r],e);r=s;break;case"source":le("error",e),r=s;break;case"img":case"image":case"link":le("error",e),le("load",e),r=s;break;case"details":le("toggle",e),r=s;break;case"input":Sd(e,s),r=Ea(e,s),le("invalid",e);break;case"option":r=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},r=ve({},s,{value:void 0}),le("invalid",e);break;case"textarea":bd(e,s),r=Ta(e,s),le("invalid",e);break;default:r=s}Aa(i,r),l=r;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?Rg(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&yg(e,a)):o==="children"?typeof a=="string"?(i!=="textarea"||a!=="")&&io(e,a):typeof a=="number"&&io(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(to.hasOwnProperty(o)?a!=null&&o==="onScroll"&&le("scroll",e):a!=null&&Wc(e,o,a,n))}switch(i){case"input":Bo(e),yd(e,s,!1);break;case"textarea":Bo(e),Rd(e);break;case"option":s.value!=null&&e.setAttribute("value",""+Bi(s.value));break;case"select":e.multiple=!!s.multiple,o=s.value,o!=null?js(e,!!s.multiple,o,!1):s.defaultValue!=null&&js(e,!!s.multiple,s.defaultValue,!0);break;default:typeof r.onClick=="function"&&(e.onclick=An)}switch(i){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Be(t),null;case 6:if(e&&t.stateNode!=null)Kp(e,t,e.memoizedProps,s);else{if(typeof s!="string"&&t.stateNode===null)throw Error(I(166));if(i=os(po.current),os(Yt.current),Yo(t)){if(s=t.stateNode,i=t.memoizedProps,s[Ut]=t,(o=s.nodeValue!==i)&&(e=dt,e!==null))switch(e.tag){case 3:$o(s.nodeValue,i,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&$o(s.nodeValue,i,(e.mode&1)!==0)}o&&(t.flags|=4)}else s=(i.nodeType===9?i:i.ownerDocument).createTextNode(s),s[Ut]=t,t.stateNode=s}return Be(t),null;case 13:if(ce(ge),s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(de&&ct!==null&&t.mode&1&&!(t.flags&128))up(),ir(),t.flags|=98560,o=!1;else if(o=Yo(t),s!==null&&s.dehydrated!==null){if(e===null){if(!o)throw Error(I(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(I(317));o[Ut]=t}else ir(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Be(t),o=!1}else At!==null&&(gc(At),At=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=i,t):(s=s!==null,s!==(e!==null&&e.memoizedState!==null)&&s&&(t.child.flags|=8192,t.mode&1&&(e===null||ge.current&1?Me===0&&(Me=3):Fu())),t.updateQueue!==null&&(t.flags|=4),Be(t),null);case 4:return rr(),oc(e,t),e===null&&co(t.stateNode.containerInfo),Be(t),null;case 10:return lu(t.type._context),Be(t),null;case 17:return ot(t.type)&&In(),Be(t),null;case 19:if(ce(ge),o=t.memoizedState,o===null)return Be(t),null;if(s=(t.flags&128)!==0,n=o.rendering,n===null)if(s)Mr(o,!1);else{if(Me!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(n=Vn(e),n!==null){for(t.flags|=128,Mr(o,!1),s=n.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),t.subtreeFlags=0,s=i,i=t.child;i!==null;)o=i,e=s,o.flags&=14680066,n=o.alternate,n===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,o.type=n.type,e=n.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),i=i.sibling;return ne(ge,ge.current&1|2),t.child}e=e.sibling}o.tail!==null&&Re()>nr&&(t.flags|=128,s=!0,Mr(o,!1),t.lanes=4194304)}else{if(!s)if(e=Vn(n),e!==null){if(t.flags|=128,s=!0,i=e.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),Mr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!n.alternate&&!de)return Be(t),null}else 2*Re()-o.renderingStartTime>nr&&i!==1073741824&&(t.flags|=128,s=!0,Mr(o,!1),t.lanes=4194304);o.isBackwards?(n.sibling=t.child,t.child=n):(i=o.last,i!==null?i.sibling=n:t.child=n,o.last=n)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Re(),t.sibling=null,i=ge.current,ne(ge,s?i&1|2:i&1),t):(Be(t),null);case 22:case 23:return Ru(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?at&1073741824&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function cw(e,t){switch(su(t),t.tag){case 1:return ot(t.type)&&In(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rr(),ce(rt),ce(We),hu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return du(t),null;case 13:if(ce(ge),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));ir()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(ge),null;case 4:return rr(),null;case 10:return lu(t.type._context),null;case 22:case 23:return Ru(),null;case 24:return null;default:return null}}var Xo=!1,ze=!1,uw=typeof WeakSet=="function"?WeakSet:Set,N=null;function zs(e,t){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(s){Ce(e,t,s)}else i.current=null}function nc(e,t,i){try{i()}catch(s){Ce(e,t,s)}}var hh=!1;function dw(e,t){if(_a=Mn,e=Xg(),tu(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var r=s.anchorOffset,o=s.focusNode;s=s.focusOffset;try{i.nodeType,o.nodeType}catch{i=null;break e}var n=0,l=-1,a=-1,c=0,u=0,d=e,h=null;t:for(;;){for(var g;d!==i||r!==0&&d.nodeType!==3||(l=n+r),d!==o||s!==0&&d.nodeType!==3||(a=n+s),d.nodeType===3&&(n+=d.nodeValue.length),(g=d.firstChild)!==null;)h=d,d=g;for(;;){if(d===e)break t;if(h===i&&++c===r&&(l=n),h===o&&++u===s&&(a=n),(g=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=g}i=l===-1||a===-1?null:{start:l,end:a}}else i=null}i=i||{start:0,end:0}}else i=null;for(Ua={focusedElem:e,selectionRange:i},Mn=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,S=v.memoizedState,f=t.stateNode,p=f.getSnapshotBeforeUpdate(t.elementType===t.type?w:Mt(t.type,w),S);f.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(y){Ce(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return v=hh,hh=!1,v}function $r(e,t,i){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var r=s=s.next;do{if((r.tag&e)===e){var o=r.destroy;r.destroy=void 0,o!==void 0&&nc(t,i,o)}r=r.next}while(r!==s)}}function fl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var i=t=t.next;do{if((i.tag&e)===e){var s=i.create;i.destroy=s()}i=i.next}while(i!==t)}}function lc(e){var t=e.ref;if(t!==null){var i=e.stateNode;switch(e.tag){case 5:e=i;break;default:e=i}typeof t=="function"?t(e):t.current=e}}function $p(e){var t=e.alternate;t!==null&&(e.alternate=null,$p(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ut],delete t[ho],delete t[$a],delete t[$C],delete t[YC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Yp(e){return e.tag===5||e.tag===3||e.tag===4}function gh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ac(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.nodeType===8?i.parentNode.insertBefore(e,t):i.insertBefore(e,t):(i.nodeType===8?(t=i.parentNode,t.insertBefore(e,i)):(t=i,t.appendChild(e)),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=An));else if(s!==4&&(e=e.child,e!==null))for(ac(e,t,i),e=e.sibling;e!==null;)ac(e,t,i),e=e.sibling}function cc(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(cc(e,t,i),e=e.sibling;e!==null;)cc(e,t,i),e=e.sibling}var Ae=null,Tt=!1;function wi(e,t,i){for(i=i.child;i!==null;)Qp(e,t,i),i=i.sibling}function Qp(e,t,i){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(ll,i)}catch{}switch(i.tag){case 5:ze||zs(i,t);case 6:var s=Ae,r=Tt;Ae=null,wi(e,t,i),Ae=s,Tt=r,Ae!==null&&(Tt?(e=Ae,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):Ae.removeChild(i.stateNode));break;case 18:Ae!==null&&(Tt?(e=Ae,i=i.stateNode,e.nodeType===8?Ql(e.parentNode,i):e.nodeType===1&&Ql(e,i),no(e)):Ql(Ae,i.stateNode));break;case 4:s=Ae,r=Tt,Ae=i.stateNode.containerInfo,Tt=!0,wi(e,t,i),Ae=s,Tt=r;break;case 0:case 11:case 14:case 15:if(!ze&&(s=i.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){r=s=s.next;do{var o=r,n=o.destroy;o=o.tag,n!==void 0&&(o&2||o&4)&&nc(i,t,n),r=r.next}while(r!==s)}wi(e,t,i);break;case 1:if(!ze&&(zs(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=i.memoizedProps,s.state=i.memoizedState,s.componentWillUnmount()}catch(l){Ce(i,t,l)}wi(e,t,i);break;case 21:wi(e,t,i);break;case 22:i.mode&1?(ze=(s=ze)||i.memoizedState!==null,wi(e,t,i),ze=s):wi(e,t,i);break;default:wi(e,t,i)}}function ph(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new uw),t.forEach(function(s){var r=Sw.bind(null,e,s);i.has(s)||(i.add(s),s.then(r,r))})}}function Dt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s];try{var o=e,n=t,l=n;e:for(;l!==null;){switch(l.tag){case 5:Ae=l.stateNode,Tt=!1;break e;case 3:Ae=l.stateNode.containerInfo,Tt=!0;break e;case 4:Ae=l.stateNode.containerInfo,Tt=!0;break e}l=l.return}if(Ae===null)throw Error(I(160));Qp(o,n,r),Ae=null,Tt=!1;var a=r.alternate;a!==null&&(a.return=null),r.return=null}catch(c){Ce(r,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)qp(t,e),t=t.sibling}function qp(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Dt(t,e),zt(e),s&4){try{$r(3,e,e.return),fl(3,e)}catch(w){Ce(e,e.return,w)}try{$r(5,e,e.return)}catch(w){Ce(e,e.return,w)}}break;case 1:Dt(t,e),zt(e),s&512&&i!==null&&zs(i,i.return);break;case 5:if(Dt(t,e),zt(e),s&512&&i!==null&&zs(i,i.return),e.flags&32){var r=e.stateNode;try{io(r,"")}catch(w){Ce(e,e.return,w)}}if(s&4&&(r=e.stateNode,r!=null)){var o=e.memoizedProps,n=i!==null?i.memoizedProps:o,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&Cg(r,o),Ia(l,n);var c=Ia(l,o);for(n=0;n<a.length;n+=2){var u=a[n],d=a[n+1];u==="style"?Rg(r,d):u==="dangerouslySetInnerHTML"?yg(r,d):u==="children"?io(r,d):Wc(r,u,d,c)}switch(l){case"input":Da(r,o);break;case"textarea":wg(r,o);break;case"select":var h=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!o.multiple;var g=o.value;g!=null?js(r,!!o.multiple,g,!1):h!==!!o.multiple&&(o.defaultValue!=null?js(r,!!o.multiple,o.defaultValue,!0):js(r,!!o.multiple,o.multiple?[]:"",!1))}r[ho]=o}catch(w){Ce(e,e.return,w)}}break;case 6:if(Dt(t,e),zt(e),s&4){if(e.stateNode===null)throw Error(I(162));r=e.stateNode,o=e.memoizedProps;try{r.nodeValue=o}catch(w){Ce(e,e.return,w)}}break;case 3:if(Dt(t,e),zt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{no(t.containerInfo)}catch(w){Ce(e,e.return,w)}break;case 4:Dt(t,e),zt(e);break;case 13:Dt(t,e),zt(e),r=e.child,r.flags&8192&&(o=r.memoizedState!==null,r.stateNode.isHidden=o,!o||r.alternate!==null&&r.alternate.memoizedState!==null||(yu=Re())),s&4&&ph(e);break;case 22:if(u=i!==null&&i.memoizedState!==null,e.mode&1?(ze=(c=ze)||u,Dt(t,e),ze=c):Dt(t,e),zt(e),s&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(N=e,u=e.child;u!==null;){for(d=N=u;N!==null;){switch(h=N,g=h.child,h.tag){case 0:case 11:case 14:case 15:$r(4,h,h.return);break;case 1:zs(h,h.return);var v=h.stateNode;if(typeof v.componentWillUnmount=="function"){s=h,i=h.return;try{t=s,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(w){Ce(s,i,w)}}break;case 5:zs(h,h.return);break;case 22:if(h.memoizedState!==null){mh(d);continue}}g!==null?(g.return=h,N=g):mh(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{r=d.stateNode,c?(o=r.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=d.stateNode,a=d.memoizedProps.style,n=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=bg("display",n))}catch(w){Ce(e,e.return,w)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(w){Ce(e,e.return,w)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Dt(t,e),zt(e),s&4&&ph(e);break;case 21:break;default:Dt(t,e),zt(e)}}function zt(e){var t=e.flags;if(t&2){try{e:{for(var i=e.return;i!==null;){if(Yp(i)){var s=i;break e}i=i.return}throw Error(I(160))}switch(s.tag){case 5:var r=s.stateNode;s.flags&32&&(io(r,""),s.flags&=-33);var o=gh(e);cc(e,o,r);break;case 3:case 4:var n=s.stateNode.containerInfo,l=gh(e);ac(e,l,n);break;default:throw Error(I(161))}}catch(a){Ce(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function hw(e,t,i){N=e,Xp(e)}function Xp(e,t,i){for(var s=(e.mode&1)!==0;N!==null;){var r=N,o=r.child;if(r.tag===22&&s){var n=r.memoizedState!==null||Xo;if(!n){var l=r.alternate,a=l!==null&&l.memoizedState!==null||ze;l=Xo;var c=ze;if(Xo=n,(ze=a)&&!c)for(N=r;N!==null;)n=N,a=n.child,n.tag===22&&n.memoizedState!==null?vh(r):a!==null?(a.return=n,N=a):vh(r);for(;o!==null;)N=o,Xp(o),o=o.sibling;N=r,Xo=l,ze=c}fh(e)}else r.subtreeFlags&8772&&o!==null?(o.return=r,N=o):fh(e)}}function fh(e){for(;N!==null;){var t=N;if(t.flags&8772){var i=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ze||fl(5,t);break;case 1:var s=t.stateNode;if(t.flags&4&&!ze)if(i===null)s.componentDidMount();else{var r=t.elementType===t.type?i.memoizedProps:Mt(t.type,i.memoizedProps);s.componentDidUpdate(r,i.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Jd(t,o,s);break;case 3:var n=t.updateQueue;if(n!==null){if(i=null,t.child!==null)switch(t.child.tag){case 5:i=t.child.stateNode;break;case 1:i=t.child.stateNode}Jd(t,n,i)}break;case 5:var l=t.stateNode;if(i===null&&t.flags&4){i=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break;case"img":a.src&&(i.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&no(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}ze||t.flags&512&&lc(t)}catch(h){Ce(t,t.return,h)}}if(t===e){N=null;break}if(i=t.sibling,i!==null){i.return=t.return,N=i;break}N=t.return}}function mh(e){for(;N!==null;){var t=N;if(t===e){N=null;break}var i=t.sibling;if(i!==null){i.return=t.return,N=i;break}N=t.return}}function vh(e){for(;N!==null;){var t=N;try{switch(t.tag){case 0:case 11:case 15:var i=t.return;try{fl(4,t)}catch(a){Ce(t,i,a)}break;case 1:var s=t.stateNode;if(typeof s.componentDidMount=="function"){var r=t.return;try{s.componentDidMount()}catch(a){Ce(t,r,a)}}var o=t.return;try{lc(t)}catch(a){Ce(t,o,a)}break;case 5:var n=t.return;try{lc(t)}catch(a){Ce(t,n,a)}}}catch(a){Ce(t,t.return,a)}if(t===e){N=null;break}var l=t.sibling;if(l!==null){l.return=t.return,N=l;break}N=t.return}}var gw=Math.ceil,_n=mi.ReactCurrentDispatcher,wu=mi.ReactCurrentOwner,bt=mi.ReactCurrentBatchConfig,X=0,ke=null,Pe=null,Ie=0,at=0,Ws=ji(0),Me=0,Co=null,vs=0,ml=0,Su=0,Yr=null,tt=null,yu=0,nr=1/0,ei=null,Un=!1,uc=null,Oi=null,Zo=!1,Mi=null,jn=0,Qr=0,dc=null,fn=-1,mn=0;function Ze(){return X&6?Re():fn!==-1?fn:fn=Re()}function Gi(e){return e.mode&1?X&2&&Ie!==0?Ie&-Ie:qC.transition!==null?(mn===0&&(mn=Og()),mn):(e=te,e!==0||(e=window.event,e=e===void 0?16:Wg(e.type)),e):1}function Gt(e,t,i,s){if(50<Qr)throw Qr=0,dc=null,Error(I(185));Eo(e,i,s),(!(X&2)||e!==ke)&&(e===ke&&(!(X&2)&&(ml|=i),Me===4&&Ei(e,Ie)),nt(e,s),i===1&&X===0&&!(t.mode&1)&&(nr=Re()+500,hl&&Ki()))}function nt(e,t){var i=e.callbackNode;qv(e,t);var s=Dn(e,e===ke?Ie:0);if(s===0)i!==null&&Pd(i),e.callbackNode=null,e.callbackPriority=0;else if(t=s&-s,e.callbackPriority!==t){if(i!=null&&Pd(i),t===1)e.tag===0?QC(Ch.bind(null,e)):lp(Ch.bind(null,e)),jC(function(){!(X&6)&&Ki()}),i=null;else{switch(Gg(s)){case 1:i=$c;break;case 4:i=Ig;break;case 16:i=En;break;case 536870912:i=Lg;break;default:i=En}i=nf(i,Zp.bind(null,e))}e.callbackPriority=t,e.callbackNode=i}}function Zp(e,t){if(fn=-1,mn=0,X&6)throw Error(I(327));var i=e.callbackNode;if(qs()&&e.callbackNode!==i)return null;var s=Dn(e,e===ke?Ie:0);if(s===0)return null;if(s&30||s&e.expiredLanes||t)t=Kn(e,s);else{t=s;var r=X;X|=2;var o=ef();(ke!==e||Ie!==t)&&(ei=null,nr=Re()+500,ls(e,t));do try{mw();break}catch(l){Jp(e,l)}while(!0);nu(),_n.current=o,X=r,Pe!==null?t=0:(ke=null,Ie=0,t=Me)}if(t!==0){if(t===2&&(r=Ha(e),r!==0&&(s=r,t=hc(e,r))),t===1)throw i=Co,ls(e,0),Ei(e,s),nt(e,Re()),i;if(t===6)Ei(e,s);else{if(r=e.current.alternate,!(s&30)&&!pw(r)&&(t=Kn(e,s),t===2&&(o=Ha(e),o!==0&&(s=o,t=hc(e,o))),t===1))throw i=Co,ls(e,0),Ei(e,s),nt(e,Re()),i;switch(e.finishedWork=r,e.finishedLanes=s,t){case 0:case 1:throw Error(I(345));case 2:Xi(e,tt,ei);break;case 3:if(Ei(e,s),(s&130023424)===s&&(t=yu+500-Re(),10<t)){if(Dn(e,0)!==0)break;if(r=e.suspendedLanes,(r&s)!==s){Ze(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=Ka(Xi.bind(null,e,tt,ei),t);break}Xi(e,tt,ei);break;case 4:if(Ei(e,s),(s&4194240)===s)break;for(t=e.eventTimes,r=-1;0<s;){var n=31-Ot(s);o=1<<n,n=t[n],n>r&&(r=n),s&=~o}if(s=r,s=Re()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*gw(s/1960))-s,10<s){e.timeoutHandle=Ka(Xi.bind(null,e,tt,ei),s);break}Xi(e,tt,ei);break;case 5:Xi(e,tt,ei);break;default:throw Error(I(329))}}}return nt(e,Re()),e.callbackNode===i?Zp.bind(null,e):null}function hc(e,t){var i=Yr;return e.current.memoizedState.isDehydrated&&(ls(e,t).flags|=256),e=Kn(e,t),e!==2&&(t=tt,tt=i,t!==null&&gc(t)),e}function gc(e){tt===null?tt=e:tt.push.apply(tt,e)}function pw(e){for(var t=e;;){if(t.flags&16384){var i=t.updateQueue;if(i!==null&&(i=i.stores,i!==null))for(var s=0;s<i.length;s++){var r=i[s],o=r.getSnapshot;r=r.value;try{if(!Ht(o(),r))return!1}catch{return!1}}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ei(e,t){for(t&=~Su,t&=~ml,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var i=31-Ot(t),s=1<<i;e[i]=-1,t&=~s}}function Ch(e){if(X&6)throw Error(I(327));qs();var t=Dn(e,0);if(!(t&1))return nt(e,Re()),null;var i=Kn(e,t);if(e.tag!==0&&i===2){var s=Ha(e);s!==0&&(t=s,i=hc(e,s))}if(i===1)throw i=Co,ls(e,0),Ei(e,t),nt(e,Re()),i;if(i===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xi(e,tt,ei),nt(e,Re()),null}function bu(e,t){var i=X;X|=1;try{return e(t)}finally{X=i,X===0&&(nr=Re()+500,hl&&Ki())}}function Cs(e){Mi!==null&&Mi.tag===0&&!(X&6)&&qs();var t=X;X|=1;var i=bt.transition,s=te;try{if(bt.transition=null,te=1,e)return e()}finally{te=s,bt.transition=i,X=t,!(X&6)&&Ki()}}function Ru(){at=Ws.current,ce(Ws)}function ls(e,t){e.finishedWork=null,e.finishedLanes=0;var i=e.timeoutHandle;if(i!==-1&&(e.timeoutHandle=-1,UC(i)),Pe!==null)for(i=Pe.return;i!==null;){var s=i;switch(su(s),s.tag){case 1:s=s.type.childContextTypes,s!=null&&In();break;case 3:rr(),ce(rt),ce(We),hu();break;case 5:du(s);break;case 4:rr();break;case 13:ce(ge);break;case 19:ce(ge);break;case 10:lu(s.type._context);break;case 22:case 23:Ru()}i=i.return}if(ke=e,Pe=e=Ni(e.current,null),Ie=at=t,Me=0,Co=null,Su=ml=vs=0,tt=Yr=null,rs!==null){for(t=0;t<rs.length;t++)if(i=rs[t],s=i.interleaved,s!==null){i.interleaved=null;var r=s.next,o=i.pending;if(o!==null){var n=o.next;o.next=r,s.next=n}i.pending=s}rs=null}return e}function Jp(e,t){do{var i=Pe;try{if(nu(),hn.current=Wn,zn){for(var s=me.memoizedState;s!==null;){var r=s.queue;r!==null&&(r.pending=null),s=s.next}zn=!1}if(ms=0,Te=De=me=null,Kr=!1,fo=0,wu.current=null,i===null||i.return===null){Me=1,Co=t,Pe=null;break}e:{var o=e,n=i.return,l=i,a=t;if(t=Ie,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var c=a,u=l,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var g=oh(n);if(g!==null){g.flags&=-257,nh(g,n,l,o,t),g.mode&1&&rh(o,c,t),t=g,a=c;var v=t.updateQueue;if(v===null){var w=new Set;w.add(a),t.updateQueue=w}else v.add(a);break e}else{if(!(t&1)){rh(o,c,t),Fu();break e}a=Error(I(426))}}else if(de&&l.mode&1){var S=oh(n);if(S!==null){!(S.flags&65536)&&(S.flags|=256),nh(S,n,l,o,t),ru(or(a,l));break e}}o=a=or(a,l),Me!==4&&(Me=2),Yr===null?Yr=[o]:Yr.push(o),o=n;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var f=Gp(o,a,t);Zd(o,f);break e;case 1:l=a;var p=o.type,m=o.stateNode;if(!(o.flags&128)&&(typeof p.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Oi===null||!Oi.has(m)))){o.flags|=65536,t&=-t,o.lanes|=t;var y=Np(o,l,t);Zd(o,y);break e}}o=o.return}while(o!==null)}sf(i)}catch(b){t=b,Pe===i&&i!==null&&(Pe=i=i.return);continue}break}while(!0)}function ef(){var e=_n.current;return _n.current=Wn,e===null?Wn:e}function Fu(){(Me===0||Me===3||Me===2)&&(Me=4),ke===null||!(vs&268435455)&&!(ml&268435455)||Ei(ke,Ie)}function Kn(e,t){var i=X;X|=2;var s=ef();(ke!==e||Ie!==t)&&(ei=null,ls(e,t));do try{fw();break}catch(r){Jp(e,r)}while(!0);if(nu(),X=i,_n.current=s,Pe!==null)throw Error(I(261));return ke=null,Ie=0,Me}function fw(){for(;Pe!==null;)tf(Pe)}function mw(){for(;Pe!==null&&!zv();)tf(Pe)}function tf(e){var t=of(e.alternate,e,at);e.memoizedProps=e.pendingProps,t===null?sf(e):Pe=t,wu.current=null}function sf(e){var t=e;do{var i=t.alternate;if(e=t.return,t.flags&32768){if(i=cw(i,t),i!==null){i.flags&=32767,Pe=i;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Me=6,Pe=null;return}}else if(i=aw(i,t,at),i!==null){Pe=i;return}if(t=t.sibling,t!==null){Pe=t;return}Pe=t=e}while(t!==null);Me===0&&(Me=5)}function Xi(e,t,i){var s=te,r=bt.transition;try{bt.transition=null,te=1,vw(e,t,i,s)}finally{bt.transition=r,te=s}return null}function vw(e,t,i,s){do qs();while(Mi!==null);if(X&6)throw Error(I(327));i=e.finishedWork;var r=e.finishedLanes;if(i===null)return null;if(e.finishedWork=null,e.finishedLanes=0,i===e.current)throw Error(I(177));e.callbackNode=null,e.callbackPriority=0;var o=i.lanes|i.childLanes;if(Xv(e,o),e===ke&&(Pe=ke=null,Ie=0),!(i.subtreeFlags&2064)&&!(i.flags&2064)||Zo||(Zo=!0,nf(En,function(){return qs(),null})),o=(i.flags&15990)!==0,i.subtreeFlags&15990||o){o=bt.transition,bt.transition=null;var n=te;te=1;var l=X;X|=4,wu.current=null,dw(e,i),qp(i,e),NC(Ua),Mn=!!_a,Ua=_a=null,e.current=i,hw(i),Wv(),X=l,te=n,bt.transition=o}else e.current=i;if(Zo&&(Zo=!1,Mi=e,jn=r),o=e.pendingLanes,o===0&&(Oi=null),jv(i.stateNode),nt(e,Re()),t!==null)for(s=e.onRecoverableError,i=0;i<t.length;i++)r=t[i],s(r.value,{componentStack:r.stack,digest:r.digest});if(Un)throw Un=!1,e=uc,uc=null,e;return jn&1&&e.tag!==0&&qs(),o=e.pendingLanes,o&1?e===dc?Qr++:(Qr=0,dc=e):Qr=0,Ki(),null}function qs(){if(Mi!==null){var e=Gg(jn),t=bt.transition,i=te;try{if(bt.transition=null,te=16>e?16:e,Mi===null)var s=!1;else{if(e=Mi,Mi=null,jn=0,X&6)throw Error(I(331));var r=X;for(X|=4,N=e.current;N!==null;){var o=N,n=o.child;if(N.flags&16){var l=o.deletions;if(l!==null){for(var a=0;a<l.length;a++){var c=l[a];for(N=c;N!==null;){var u=N;switch(u.tag){case 0:case 11:case 15:$r(8,u,o)}var d=u.child;if(d!==null)d.return=u,N=d;else for(;N!==null;){u=N;var h=u.sibling,g=u.return;if($p(u),u===c){N=null;break}if(h!==null){h.return=g,N=h;break}N=g}}}var v=o.alternate;if(v!==null){var w=v.child;if(w!==null){v.child=null;do{var S=w.sibling;w.sibling=null,w=S}while(w!==null)}}N=o}}if(o.subtreeFlags&2064&&n!==null)n.return=o,N=n;else e:for(;N!==null;){if(o=N,o.flags&2048)switch(o.tag){case 0:case 11:case 15:$r(9,o,o.return)}var f=o.sibling;if(f!==null){f.return=o.return,N=f;break e}N=o.return}}var p=e.current;for(N=p;N!==null;){n=N;var m=n.child;if(n.subtreeFlags&2064&&m!==null)m.return=n,N=m;else e:for(n=p;N!==null;){if(l=N,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:fl(9,l)}}catch(b){Ce(l,l.return,b)}if(l===n){N=null;break e}var y=l.sibling;if(y!==null){y.return=l.return,N=y;break e}N=l.return}}if(X=r,Ki(),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(ll,e)}catch{}s=!0}return s}finally{te=i,bt.transition=t}}return!1}function wh(e,t,i){t=or(i,t),t=Gp(e,t,1),e=Li(e,t,1),t=Ze(),e!==null&&(Eo(e,1,t),nt(e,t))}function Ce(e,t,i){if(e.tag===3)wh(e,e,i);else for(;t!==null;){if(t.tag===3){wh(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Oi===null||!Oi.has(s))){e=or(i,e),e=Np(t,e,1),t=Li(t,e,1),e=Ze(),t!==null&&(Eo(t,1,e),nt(t,e));break}}t=t.return}}function Cw(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),t=Ze(),e.pingedLanes|=e.suspendedLanes&i,ke===e&&(Ie&i)===i&&(Me===4||Me===3&&(Ie&130023424)===Ie&&500>Re()-yu?ls(e,0):Su|=i),nt(e,t)}function rf(e,t){t===0&&(e.mode&1?(t=Wo,Wo<<=1,!(Wo&130023424)&&(Wo=4194304)):t=1);var i=Ze();e=di(e,t),e!==null&&(Eo(e,t,i),nt(e,i))}function ww(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),rf(e,i)}function Sw(e,t){var i=0;switch(e.tag){case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(i=r.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(I(314))}s!==null&&s.delete(t),rf(e,i)}var of;of=function(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps||rt.current)it=!0;else{if(!(e.lanes&i)&&!(t.flags&128))return it=!1,lw(e,t,i);it=!!(e.flags&131072)}else it=!1,de&&t.flags&1048576&&ap(t,Gn,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;pn(e,t),e=t.pendingProps;var r=tr(t,We.current);Qs(t,i),r=pu(null,t,s,e,r,i);var o=fu();return t.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ot(s)?(o=!0,Ln(t)):o=!1,t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,cu(t),r.updater=pl,t.stateNode=r,r._reactInternals=t,Ja(t,s,e,i),t=ic(null,t,s,!0,o,i)):(t.tag=0,de&&o&&iu(t),$e(null,t,r,i),t=t.child),t;case 16:s=t.elementType;e:{switch(pn(e,t),e=t.pendingProps,r=s._init,s=r(s._payload),t.type=s,r=t.tag=bw(s),e=Mt(s,e),r){case 0:t=tc(null,t,s,e,i);break e;case 1:t=ch(null,t,s,e,i);break e;case 11:t=lh(null,t,s,e,i);break e;case 14:t=ah(null,t,s,Mt(s.type,e),i);break e}throw Error(I(306,s,""))}return t;case 0:return s=t.type,r=t.pendingProps,r=t.elementType===s?r:Mt(s,r),tc(e,t,s,r,i);case 1:return s=t.type,r=t.pendingProps,r=t.elementType===s?r:Mt(s,r),ch(e,t,s,r,i);case 3:e:{if(zp(t),e===null)throw Error(I(387));s=t.pendingProps,o=t.memoizedState,r=o.element,pp(e,t),Bn(t,s,null,i);var n=t.memoizedState;if(s=n.element,o.isDehydrated)if(o={element:s,isDehydrated:!1,cache:n.cache,pendingSuspenseBoundaries:n.pendingSuspenseBoundaries,transitions:n.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){r=or(Error(I(423)),t),t=uh(e,t,s,i,r);break e}else if(s!==r){r=or(Error(I(424)),t),t=uh(e,t,s,i,r);break e}else for(ct=Ii(t.stateNode.containerInfo.firstChild),dt=t,de=!0,At=null,i=hp(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ir(),s===r){t=hi(e,t,i);break e}$e(e,t,s,i)}t=t.child}return t;case 5:return fp(t),e===null&&qa(t),s=t.type,r=t.pendingProps,o=e!==null?e.memoizedProps:null,n=r.children,ja(s,r)?n=null:o!==null&&ja(s,o)&&(t.flags|=32),Vp(e,t),$e(e,t,n,i),t.child;case 6:return e===null&&qa(t),null;case 13:return Wp(e,t,i);case 4:return uu(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=sr(t,null,s,i):$e(e,t,s,i),t.child;case 11:return s=t.type,r=t.pendingProps,r=t.elementType===s?r:Mt(s,r),lh(e,t,s,r,i);case 7:return $e(e,t,t.pendingProps,i),t.child;case 8:return $e(e,t,t.pendingProps.children,i),t.child;case 12:return $e(e,t,t.pendingProps.children,i),t.child;case 10:e:{if(s=t.type._context,r=t.pendingProps,o=t.memoizedProps,n=r.value,ne(Nn,s._currentValue),s._currentValue=n,o!==null)if(Ht(o.value,n)){if(o.children===r.children&&!rt.current){t=hi(e,t,i);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){n=o.child;for(var a=l.firstContext;a!==null;){if(a.context===s){if(o.tag===1){a=oi(-1,i&-i),a.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?a.next=a:(a.next=u.next,u.next=a),c.pending=a}}o.lanes|=i,a=o.alternate,a!==null&&(a.lanes|=i),Xa(o.return,i,t),l.lanes|=i;break}a=a.next}}else if(o.tag===10)n=o.type===t.type?null:o.child;else if(o.tag===18){if(n=o.return,n===null)throw Error(I(341));n.lanes|=i,l=n.alternate,l!==null&&(l.lanes|=i),Xa(n,i,t),n=o.sibling}else n=o.child;if(n!==null)n.return=o;else for(n=o;n!==null;){if(n===t){n=null;break}if(o=n.sibling,o!==null){o.return=n.return,n=o;break}n=n.return}o=n}$e(e,t,r.children,i),t=t.child}return t;case 9:return r=t.type,s=t.pendingProps.children,Qs(t,i),r=Pt(r),s=s(r),t.flags|=1,$e(e,t,s,i),t.child;case 14:return s=t.type,r=Mt(s,t.pendingProps),r=Mt(s.type,r),ah(e,t,s,r,i);case 15:return Hp(e,t,t.type,t.pendingProps,i);case 17:return s=t.type,r=t.pendingProps,r=t.elementType===s?r:Mt(s,r),pn(e,t),t.tag=1,ot(s)?(e=!0,Ln(t)):e=!1,Qs(t,i),Op(t,s,r),Ja(t,s,r,i),ic(null,t,s,!0,e,i);case 19:return _p(e,t,i);case 22:return Bp(e,t,i)}throw Error(I(156,t.tag))};function nf(e,t){return Ag(e,t)}function yw(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function St(e,t,i,s){return new yw(e,t,i,s)}function xu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bw(e){if(typeof e=="function")return xu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Uc)return 11;if(e===jc)return 14}return 2}function Ni(e,t){var i=e.alternate;return i===null?(i=St(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&14680064,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function vn(e,t,i,s,r,o){var n=2;if(s=e,typeof e=="function")xu(e)&&(n=1);else if(typeof e=="string")n=5;else e:switch(e){case As:return as(i.children,r,o,t);case _c:n=8,r|=8;break;case Ra:return e=St(12,i,t,r|2),e.elementType=Ra,e.lanes=o,e;case Fa:return e=St(13,i,t,r),e.elementType=Fa,e.lanes=o,e;case xa:return e=St(19,i,t,r),e.elementType=xa,e.lanes=o,e;case fg:return vl(i,r,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gg:n=10;break e;case pg:n=9;break e;case Uc:n=11;break e;case jc:n=14;break e;case Ri:n=16,s=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=St(n,i,t,r),t.elementType=e,t.type=s,t.lanes=o,t}function as(e,t,i,s){return e=St(7,e,s,t),e.lanes=i,e}function vl(e,t,i,s){return e=St(22,e,s,t),e.elementType=fg,e.lanes=i,e.stateNode={isHidden:!1},e}function sa(e,t,i){return e=St(6,e,null,t),e.lanes=i,e}function ra(e,t,i){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Rw(e,t,i,s,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hl(0),this.expirationTimes=Hl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hl(0),this.identifierPrefix=s,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Pu(e,t,i,s,r,o,n,l,a){return e=new Rw(e,t,i,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=St(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:s,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},cu(o),e}function Fw(e,t,i){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ks,key:s==null?null:""+s,children:e,containerInfo:t,implementation:i}}function lf(e){if(!e)return Vi;e=e._reactInternals;e:{if(Rs(e)!==e||e.tag!==1)throw Error(I(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ot(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(I(171))}if(e.tag===1){var i=e.type;if(ot(i))return np(e,i,t)}return t}function af(e,t,i,s,r,o,n,l,a){return e=Pu(i,s,!0,e,r,o,n,l,a),e.context=lf(null),i=e.current,s=Ze(),r=Gi(i),o=oi(s,r),o.callback=t??null,Li(i,o,r),e.current.lanes=r,Eo(e,r,s),nt(e,s),e}function Cl(e,t,i,s){var r=t.current,o=Ze(),n=Gi(r);return i=lf(i),t.context===null?t.context=i:t.pendingContext=i,t=oi(o,n),t.payload={element:e},s=s===void 0?null:s,s!==null&&(t.callback=s),e=Li(r,t,n),e!==null&&(Gt(e,r,n,o),dn(e,r,n)),n}function $n(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Sh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Eu(e,t){Sh(e,t),(e=e.alternate)&&Sh(e,t)}function xw(){return null}var cf=typeof reportError=="function"?reportError:function(e){console.error(e)};function Du(e){this._internalRoot=e}wl.prototype.render=Du.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));Cl(e,t,null,null)};wl.prototype.unmount=Du.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cs(function(){Cl(null,e,null,null)}),t[ui]=null}};function wl(e){this._internalRoot=e}wl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bg();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Pi.length&&t!==0&&t<Pi[i].priority;i++);Pi.splice(i,0,e),i===0&&zg(e)}};function Mu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Sl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function yh(){}function Pw(e,t,i,s,r){if(r){if(typeof s=="function"){var o=s;s=function(){var c=$n(n);o.call(c)}}var n=af(t,s,e,0,null,!1,!1,"",yh);return e._reactRootContainer=n,e[ui]=n.current,co(e.nodeType===8?e.parentNode:e),Cs(),n}for(;r=e.lastChild;)e.removeChild(r);if(typeof s=="function"){var l=s;s=function(){var c=$n(a);l.call(c)}}var a=Pu(e,0,!1,null,null,!1,!1,"",yh);return e._reactRootContainer=a,e[ui]=a.current,co(e.nodeType===8?e.parentNode:e),Cs(function(){Cl(t,a,i,s)}),a}function yl(e,t,i,s,r){var o=i._reactRootContainer;if(o){var n=o;if(typeof r=="function"){var l=r;r=function(){var a=$n(n);l.call(a)}}Cl(t,n,e,r)}else n=Pw(i,t,e,r,s);return $n(n)}Ng=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var i=Nr(t.pendingLanes);i!==0&&(Yc(t,i|1),nt(t,Re()),!(X&6)&&(nr=Re()+500,Ki()))}break;case 13:Cs(function(){var s=di(e,1);if(s!==null){var r=Ze();Gt(s,e,1,r)}}),Eu(e,1)}};Qc=function(e){if(e.tag===13){var t=di(e,134217728);if(t!==null){var i=Ze();Gt(t,e,134217728,i)}Eu(e,134217728)}};Hg=function(e){if(e.tag===13){var t=Gi(e),i=di(e,t);if(i!==null){var s=Ze();Gt(i,e,t,s)}Eu(e,t)}};Bg=function(){return te};Vg=function(e,t){var i=te;try{return te=e,t()}finally{te=i}};Oa=function(e,t,i){switch(t){case"input":if(Da(e,i),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=dl(s);if(!r)throw Error(I(90));vg(s),Da(s,r)}}}break;case"textarea":wg(e,i);break;case"select":t=i.value,t!=null&&js(e,!!i.multiple,t,!1)}};Pg=bu;Eg=Cs;var Ew={usingClientEntryPoint:!1,Events:[Mo,Gs,dl,Fg,xg,bu]},Tr={findFiberByHostInstance:ss,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Dw={bundleType:Tr.bundleType,version:Tr.version,rendererPackageName:Tr.rendererPackageName,rendererConfig:Tr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:mi.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Tg(e),e===null?null:e.stateNode},findFiberByHostInstance:Tr.findFiberByHostInstance||xw,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jo.isDisabled&&Jo.supportsFiber)try{ll=Jo.inject(Dw),$t=Jo}catch{}}ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ew;ft.createPortal=function(e,t){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Mu(t))throw Error(I(200));return Fw(e,t,null,i)};ft.createRoot=function(e,t){if(!Mu(e))throw Error(I(299));var i=!1,s="",r=cf;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=Pu(e,1,!1,null,null,i,!1,s,r),e[ui]=t.current,co(e.nodeType===8?e.parentNode:e),new Du(t)};ft.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=Tg(t),e=e===null?null:e.stateNode,e};ft.flushSync=function(e){return Cs(e)};ft.hydrate=function(e,t,i){if(!Sl(t))throw Error(I(200));return yl(null,e,t,!0,i)};ft.hydrateRoot=function(e,t,i){if(!Mu(e))throw Error(I(405));var s=i!=null&&i.hydratedSources||null,r=!1,o="",n=cf;if(i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(o=i.identifierPrefix),i.onRecoverableError!==void 0&&(n=i.onRecoverableError)),t=af(t,null,e,1,i??null,r,!1,o,n),e[ui]=t.current,co(e),s)for(e=0;e<s.length;e++)i=s[e],r=i._getVersion,r=r(i._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[i,r]:t.mutableSourceEagerHydrationData.push(i,r);return new wl(t)};ft.render=function(e,t,i){if(!Sl(t))throw Error(I(200));return yl(null,e,t,!1,i)};ft.unmountComponentAtNode=function(e){if(!Sl(e))throw Error(I(40));return e._reactRootContainer?(Cs(function(){yl(null,null,e,!1,function(){e._reactRootContainer=null,e[ui]=null})}),!0):!1};ft.unstable_batchedUpdates=bu;ft.unstable_renderSubtreeIntoContainer=function(e,t,i,s){if(!Sl(i))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return yl(e,t,i,!1,s)};ft.version="18.3.1-next-f1338f8080-20240426";function uf(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uf)}catch(e){console.error(e)}}uf(),cg.exports=ft;var Tu=cg.exports;const Mw=Fv(Tu);var pr=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let r=s.get(e);return!r&&i&&(r=new Set,s.set(e,r)),r}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const s=this.getListeners(e,i,!1);s&&(s.delete(t),s.size===0&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const i=e.type;if(t&&"event"in e){const l=e.event;l instanceof Event&&(e.eventPath=l.composedPath())}const s=(l,a)=>l.forEach(c=>{if(!a.has(c))return;const u=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>c(e)):()=>c(e);t?this.dispatchAsync(u):u()}),r=this.getListeners(i,t,!1)??new Set,o=new Set(r);o.size>0&&s(o,r),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(l=>{const a=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>l(i,e)):()=>l(i,e);t?this.dispatchAsync(a):a()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}},df=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(df||{}),bh={};function ku(e,t){bh[t]||(e(),bh[t]=!0)}function Lt(e,...t){console.log("AG Grid: "+e,...t)}function D(e,...t){ku(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function $(e,...t){ku(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Au(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Tw(e){kw(e,400)}var oa=[],na=!1;function Rh(e){oa.push(e),!na&&(na=!0,window.setTimeout(()=>{const t=oa.slice();oa.length=0,na=!1,t.forEach(i=>i())},0))}function kw(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(i=>i()),t)}function qe(e,t){let i;return function(...s){const r=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(r,s)},t)}}function Fh(e,t){let i=0;return function(...s){const r=this,o=new Date().getTime();o-i<t||(i=o,e.apply(r,s))}}function Aw(e,t,i=100,s){const r=new Date().getTime();let o=null,n=!1;const l=()=>{const a=new Date().getTime()-r>i;(e()||a)&&(t(),n=!0,o!=null&&(window.clearInterval(o),o=null))};l(),n||(o=window.setInterval(l,10))}function Iw(...e){return t=>e.reduce((i,s)=>s(i),t)}function ni(e){return e==null||e===""?null:e}function M(e,t=!1){return e!=null&&(e!==""||t)}function K(e){return!M(e)}function ht(e){return e==null||e.length===0}function pc(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function cs(e){if(e===void 0)return;if(e===null||e==="")return null;if(typeof e=="number")return isNaN(e)?void 0:e;const t=parseInt(e,10);return isNaN(t)?void 0:t}function fc(e){if(e!==void 0)return e===null||e===""?!1:mc(e)}function mc(e){return typeof e=="boolean"?e:typeof e=="string"?e.toUpperCase()==="TRUE"||e=="":!1}function wo(e,t){const i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function Lw(e,t,i=!1){const s=e==null,r=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&r)return 0;if(s)return-1;if(r)return 1;function o(n,l){return n>l?1:n<l?-1:0}if(typeof e!="string"||!i)return o(e,t);try{return e.localeCompare(t)}catch{return o(e,t)}}function Cn(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach(i=>t.push(i)),t}return Object.values(e)}function hf(e,t){return e.get("rowModelType")===t}function ae(e){return hf(e,"clientSide")}function Xt(e){return hf(e,"serverSide")}function Le(e,t){return e.get("domLayout")===t}function Yn(e){return Xn(e)!==void 0}function Qn(e){return!e.get("suppressAsyncEvents")}function gf(e){return typeof e.get("getRowHeight")=="function"}function Ow(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function zi(e,t,i=!1,s){if(s==null&&(s=e.environment.getDefaultRowHeight()),gf(e)){if(i)return{height:s,estimated:!0};const n={node:t,data:t.data},l=e.getCallback("getRowHeight")(n);if(vc(l))return l===0&&D("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,l),estimated:!1}}if(t.detail&&e.get("masterDetail"))return Gw(e);const r=e.get("rowHeight");return{height:r&&vc(r)?r:s,estimated:!1}}function Gw(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return vc(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function us(e){const{environment:t}=e,i=e.get("rowHeight");if(!i||K(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(D("row height must be a number if not using standard row model"),t.getDefaultRowHeight())}function vc(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function So(e,t,i){const s=t[e.getDomDataKey()];return s?s[i]:void 0}function ws(e,t,i,s){const r=e.getDomDataKey();let o=t[r];K(o)&&(o={},t[r]=o),o[i]=s}function Se(e){let t=null;const i=e.get("getDocument");return i&&M(i)?t=i():e.eGridDiv&&(t=e.eGridDiv.ownerDocument),t&&M(t)?t:document}function pf(e){return Se(e).defaultView||window}function yo(e){return e.eGridDiv.getRootNode()}function fe(e){return yo(e).activeElement}function ff(e){const t=Se(e),i=fe(e);return i===null||i===t.body}function Xs(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function bl(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Le(e,"print"))}function jt(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function Cc(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function mf(e){const t=e.get("grandTotalRow");if(t)return t;if(e.get("groupIncludeTotalFooter"))return"bottom"}function vf(e){const t=e.get("groupTotalRow");if(typeof t=="function")return e.getCallback("groupTotalRow");if(t)return()=>t;const i=e.get("groupIncludeFooter");if(typeof i=="function"){const s=e.getCallback("groupIncludeFooter");return r=>s(r)?"bottom":void 0}return()=>i?"bottom":void 0}function Cf(e){return e.exists("groupDisplayType")?e.get("groupDisplayType")==="multipleColumns":e.get("groupHideOpenParents")}function Rl(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function fr(e){const t=e.getCallback("getRowId");return t===void 0?t:i=>{let s=t(i);return typeof s!="string"&&(D("The getRowId callback must return a string. The ID ",s," is being cast to a string."),s=String(s)),s}}function lr(e){return(e==null?void 0:e.checkboxes)??!0}function qn(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Nw(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function Hw(e){return typeof e.get("rowSelection")!="string"}function Bw(e){return e.get("cellSelection")!==void 0}function Vw(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?(t==null?void 0:t.suppressMultiRanges)??!1:!1:e.get("suppressMultiRangeSelection")}function gi(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function zw(e){var s;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?((s=t.handle)==null?void 0:s.mode)==="range":!1:e.get("enableRangeHandle")}function xh(e){var s;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?((s=t.handle)==null?void 0:s.mode)==="fill":!1:e.get("enableFillHandle")}function wf(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const i=e.get("suppressRowClickSelection"),s=e.get("suppressRowDeselection");return i&&s?!1:i?"enableDeselection":s?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Ww(e){const t=wf(e);return t===!0||t==="enableSelection"}function Ph(e){const t=wf(e);return t===!0||t==="enableDeselection"}function Iu(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Xn(e){const t=e.get("rowSelection");if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}return t==null?void 0:t.mode}function Sf(e){return Xn(e)==="multiRow"}function _w(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function Lu(e){const t=e.get("rowSelection");if(typeof t=="string"){const i=e.get("groupSelectsChildren"),s=e.get("groupSelectsFiltered");return i&&s?"filteredDescendants":i?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function Ss(e){const t=Lu(e);return t==="descendants"||t==="filteredDescendants"}function la(e){return e.isModuleRegistered("@ag-grid-enterprise/set-filter")&&!e.get("suppressSetFilterByDefault")}function j(e){if(!(!e||!e.length))return e[e.length-1]}function $i(e,t,i){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((s,r)=>i?i(s,t[r]):t[r]===s)}function Uw(e){return e.sort((t,i)=>t-i)}function yf(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function Xe(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function jw(e,t){for(let i=0;i<t.length;i++)yf(e,t[i])}function Kw(e,t){for(let i=0;i<t.length;i++)Xe(e,t[i])}function Zn(e,t,i){e.splice(i,0,t)}function bf(e,t,i){Kw(e,t),t.slice().reverse().forEach(s=>Zn(e,s,i))}function ds(e,t){return e.indexOf(t)>-1}function $w(e){return(e==null?void 0:e.flatMap(t=>t))??[]}function Eh(e,t){t==null||e==null||t.forEach(i=>e.push(i))}var Rf="__ag_Grid_Stop_Propagation",Yw=["touchstart","touchend","touchmove","touchcancel","scroll"],aa={};function ar(e){e[Rf]=!0}function li(e){return e[Rf]===!0}var Ff=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof aa[i]=="boolean")return aa[i];const s=document.createElement(e[i]||"div");return i="on"+i,aa[i]=i in s}})();function wc(e,t,i){let s=t;for(;s;){const r=So(e,s,i);if(r)return r;s=s.parentElement}return null}function Qw(e,t){return!t||!e?!1:Xw(t).indexOf(e)>=0}function qw(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function Xw(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():qw(t)}function Zw(e,t,i,s){const o=ds(Yw,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,s,o)}var P=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.frameworkOverrides=e.frameworkOverrides,this.stubContext=e.context,this.eventService=e.eventService,this.gos=e.gos,this.localeService=e.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,i){this.localEventService||(this.localEventService=new pr),this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService&&this.localEventService.removeEventListener(e,t,i)}dispatchLocalEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventService,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const i=[];for(const s in t){const r=t[s];r&&i.push(this._setupListener(e,s,r))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;e instanceof HTMLElement?Zw(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);const s=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(r=>r!==s),null)}setupGridOptionListener(e,t){this.gos.addPropertyEventListener(e,t);const i=()=>(this.gos.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,s=r=>{if(r.changeSet){if(r.changeSet&&r.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=r.changeSet.id}const o={type:"gridPropertyChanged",changeSet:r.changeSet,source:r.source};t(o)};e.forEach(r=>this.setupGridOptionListener(r,s))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function Ye(e){return e instanceof wn}var wn=class extends P{constructor(e,t,i,s){super(),this.isColumn=!1,this.expandable=!1,this.instanceId=Ef(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=s}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{Wi(t)?e.push(t):Ye(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1;const s=this.findChildrenRemovingPadding();for(let o=0,n=s.length;o<n;o++){const l=s[o];if(!l.isVisible())continue;const a=l.getColumnGroupShow();a==="open"?(e=!0,i=!0):a==="closed"?(t=!0,i=!0):(e=!0,t=!0)}const r=e&&t&&i;this.expandable!==r&&(this.expandable=r,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=i=>{i.forEach(s=>{Ye(s)&&s.isPadding()?t(s.children):e.push(s)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},xf="ag-Grid-ControlsColumn",Jw=class extends P{constructor(){super(...arguments),this.beanName="controlsColService"}isControlsColEnabled(){const{gos:e}=this,t=e.get("rowSelection");if(!t||typeof t!="object")return!1;const i=lr(t),s=qn(t);return!!(i||s)}createControlsCols(){if(!this.isControlsColEnabled())return[];const{gos:e}=this,t=e.get("selectionColumnDef"),s={maxWidth:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:e.get("enableRtl")?"right":"left",comparator(o,n,l,a){const c=l.isSelected(),u=a.isSelected();return c&&u?0:c?1:-1},editable:!1,suppressFillHandle:!0,...t,colId:`${xf}`},r=new Nu(s,null,s.colId,!1);return this.createBean(r),[r]}},Fl="ag-Grid-AutoColumn";function Ou(e){const t=[],i=s=>{for(let r=0;r<s.length;r++){const o=s[r];Wi(o)?t.push(o):Ye(o)&&i(o.getChildren())}};return i(e),t}function ii(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}function xi(e,t,i){const s={};if(!t)return;pi(null,t,o=>{s[o.getInstanceId()]=o}),i&&pi(null,i,o=>{s[o.getInstanceId()]=null});const r=Object.values(s).filter(o=>o!=null);e.destroyBeans(r)}function Sc(e){return e.getId().startsWith(Fl)}function cr(e){return e.getColId().startsWith(xf)}function Sn(e){let t=[];return e instanceof Array?e.some(s=>typeof s!="string")?D("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:typeof e=="string"?t=e.split(","):D("colDef.type should be of type 'string' | 'string[]'"),t}var Gu=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e,t){const{frameworkOverrides:i,wrappedListeners:s}=this;let r=t;if(i.shouldWrapOutgoing){r=n=>{i.wrapOutgoing(()=>t(n))};let o=s.get(e);o||(o=new Map,s.set(e,o)),o.set(t,r)}return r}wrapGlobal(e){const{frameworkOverrides:t,wrappedGlobalListeners:i}=this;let s=e;return t.shouldWrapOutgoing&&(s=(r,o)=>{t.wrapOutgoing(()=>e(r,o))},i.set(e,s)),s}unwrap(e,t){const{wrappedListeners:i}=this,s=i.get(e);if(s){const r=s.get(t);if(r)return s.delete(t),s.size===0&&i.delete(e),r}return t}unwrapGlobal(e){const{wrappedGlobalListeners:t}=this,i=t.get(e);return i?(t.delete(e),i):e}},xl=new Set(["__proto__","constructor","prototype"]);function It(e,t){if(e!=null){if(Array.isArray(e)){for(let i=0;i<e.length;i++)t(i.toString(),e[i]);return}for(const[i,s]of Object.entries(e))xl.has(i)||t(i,s)}}function Pf(e){const t={},i=Object.keys(e);for(let s=0;s<i.length;s++){if(xl.has(i[s]))continue;const r=i[s],o=e[r];t[r]=o}return t}function yc(e,t){if(!e)return;const i=e,s={};return Object.keys(i).forEach(r=>{if(t&&t.indexOf(r)>=0||xl.has(r))return;const o=i[r];Rc(o)&&o.constructor===Object?s[r]=yc(o):s[r]=o}),s}function bc(e){if(!e)return[];const t=Object;if(typeof t.values=="function")return t.values(e);const i=[];for(const s in e)e.hasOwnProperty(s)&&e.propertyIsEnumerable(s)&&i.push(e[s]);return i}function Qe(e,t,i=!0,s=!1){M(t)&&It(t,(r,o)=>{if(xl.has(r))return;let n=e[r];n!==o&&(s&&n==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(n={},e[r]=n),Rc(o)&&Rc(n)&&!Array.isArray(n)?Qe(n,o,i,s):(i||o!==void 0)&&(e[r]=o))})}function qr(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let r=e;for(let o=0;o<s.length;o++){if(r==null)return;r=r[s[o]]}return r}function Rc(e){return typeof e=="object"&&e!==null}var eS={resizable:!0,sortable:!0},tS=0;function Ef(){return tS++}function Wi(e){return e instanceof Nu}var Nu=class extends P{constructor(e,t,i,s){super(),this.isColumn=!0,this.instanceId=Ef(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.columnEventService=new pr,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=s,this.setState(e)}wireBeans(e){this.columnHoverService=e.columnHoverService}getInstanceId(){return this.instanceId}setState(e){e.sort!==void 0?(e.sort==="asc"||e.sort==="desc")&&(this.sort=e.sort):(e.initialSort==="asc"||e.initialSort==="desc")&&(this.sort=e.initialSort);const t=e.sortIndex,i=e.initialSortIndex;t!==void 0?t!==null&&(this.sortIndex=t):i!==null&&(this.sortIndex=i);const s=e.hide,r=e.initialHide;s!==void 0?this.visible=!s:this.visible=!r,e.pinned!==void 0?this.setPinned(e.pinned):this.setPinned(e.initialPinned);const o=e.flex,n=e.initialFlex;o!==void 0?this.flex=o:n!==void 0&&(this.flex=n)}setColDef(e,t,i){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.columnEventService.dispatchEvent(this.createColumnEvent("colDefChanged",i))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(e){this.parent=e}getParent(){return this.parent}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}postConstruct(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){const e=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=M(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=M(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.gos.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=M(this.colDef.tooltipField)||M(this.colDef.tooltipValueGetter)||M(this.colDef.tooltipComponent)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const i=cs(e.width),s=cs(e.initialWidth);return i!=null?t=i:s!=null?t=s:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(K(this.colDef)||K(this.colDef.showRowGroup))return!1;const t=this.colDef.showRowGroup===!0,i=this.colDef.showRowGroup===e;return t||i}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}addEventListener(e,t){var s;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.columnEventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new Gu(this.frameworkOverrides));const i=((s=this.frameworkEventListenerService)==null?void 0:s.wrap(e,t))??t;this.columnEventService.addEventListener(e,i)}removeEventListener(e,t){var s;const i=((s=this.frameworkEventListenerService)==null?void 0:s.unwrap(e,t))??t;this.columnEventService.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){const t=this.createColumnFunctionCallbackParams(e),i=this.colDef.suppressNavigable;return i(t)}return!1}isCellEditable(e){if(e.group){if(this.gos.get("treeData")){if(!e.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){const t=this.gos.get("rowSelection");if(t&&typeof t!="string"){const i=cr(this)&&lr(t);return this.isColumnFunc(e,i)}else return this.isColumnFunc(e,this.colDef.checkboxSelection)}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??eS[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const i=this.createColumnFunctionCallbackParams(e);return t(i)}return!1}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.columnEventService.dispatchEvent(this.createColumnEvent("headerHighlightChanged","uiColumnMoved")))}setMoving(e,t){this.moving=e,this.columnEventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.columnEventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return K(this.sort)}isSorting(){return M(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.columnEventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.columnEventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));const s=this.createColumnEvent("filterChanged",t);i&&Qe(s,i),this.columnEventService.dispatchEvent(s)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){e===!0||e==="left"?this.pinned="left":e==="right"?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const i=e===!0;this.visible!==i&&(this.visible=i,this.columnEventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(K(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(K(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.columnEventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchStateUpdatedEvent(e){this.columnEventService.dispatchEvent({type:"columnStateUpdated",key:e})}},iS={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},sS=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=pc(e);let i=0;for(;;){let s;if(e?(s=e,i!==0&&(s+="_"+i)):t?(s=t,i!==0&&(s+="_"+i)):s=i,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);i++}}},rS=class extends P{constructor(){super(...arguments),this.beanName="columnFactory"}wireBeans(e){this.dataTypeService=e.dataTypeService}createColumnTree(e,t,i,s){const r=new sS,{existingCols:o,existingGroups:n,existingColKeys:l}=this.extractExistingTreeData(i);r.addExistingKeys(l);const a=this.recursivelyCreateColumns(e,0,t,o,r,n,s),c=this.findMaxDept(a,0),u=this.balanceColumnTree(a,0,c,r);return pi(null,u,(h,g)=>{Ye(h)&&h.setupExpandable(),h.setOriginalParent(g)}),{columnTree:u,treeDept:c}}extractExistingTreeData(e){const t=[],i=[],s=[];return e&&pi(null,e,r=>{if(Ye(r)){const o=r;i.push(o)}else{const o=r;s.push(o.getId()),t.push(o)}}),{existingCols:t,existingGroups:i,existingColKeys:s}}balanceTreeForAutoCols(e,t){const i=[],s=this.findDepth(t);return e.forEach(r=>{let o=r;for(let n=s-1;n>=0;n--){const l=new wn(null,`FAKE_PATH_${r.getId()}}_${n}`,!0,n);this.createBean(l),l.setChildren([o]),o.setOriginalParent(l),o=l}s===0&&r.setOriginalParent(null),i.push(o)}),[i,s]}findDepth(e){let t=0,i=e;for(;i&&i[0]&&Ye(i[0]);)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,s){const r=[];for(let o=0;o<e.length;o++){const n=e[o];if(Ye(n)){const l=n,a=this.balanceColumnTree(l.getChildren(),t+1,i,s);l.setChildren(a),r.push(l)}else{let l,a;for(let c=i-1;c>=t;c--){const u=s.getUniqueKey(null,null),d=this.createMergedColGroupDef(null),h=new wn(d,u,!0,t);this.createBean(h),a&&a.setChildren([h]),a=h,l||(l=a)}if(l&&a)if(r.push(l),e.some(u=>Ye(u))){a.setChildren([n]);continue}else{a.setChildren(e);break}r.push(n)}}return r}findMaxDept(e,t){let i=t;for(let s=0;s<e.length;s++){const r=e[s];if(Ye(r)){const o=r,n=this.findMaxDept(o.getChildren(),t+1);i<n&&(i=n)}}return i}recursivelyCreateColumns(e,t,i,s,r,o,n){if(!e)return[];const l=new Array(e.length);for(let a=0;a<l.length;a++){const c=e[a];this.isColumnGroup(c)?l[a]=this.createColumnGroup(i,c,t,s,r,o,n):l[a]=this.createColumn(i,c,s,r,n)}return l}createColumnGroup(e,t,i,s,r,o,n){const l=this.createMergedColGroupDef(t),a=r.getUniqueKey(l.groupId||null,null),c=new wn(l,a,!1,i);this.createBean(c);const u=this.findExistingGroup(t,o);u&&o.splice(u.idx,1);const d=u==null?void 0:u.group;d&&c.setExpanded(d.isExpanded());const h=this.recursivelyCreateColumns(l.children,i+1,e,s,r,o,n);return c.setChildren(h),c}createMergedColGroupDef(e){const t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,s,r){var l;const o=this.findExistingColumn(t,i);o&&(i==null||i.splice(o.idx,1));let n=o==null?void 0:o.column;if(n){const a=this.addColumnDefaultAndTypes(t,n.getColId());n.setColDef(a,t,r),this.applyColumnState(n,a,r)}else{const a=s.getUniqueKey(t.colId,t.field),c=this.addColumnDefaultAndTypes(t,a);n=new Nu(c,t,a,e),this.createBean(n)}return(l=this.dataTypeService)==null||l.addColumnListeners(n),n}applyColumnState(e,t,i){const s=cs(t.flex);if(s!==void 0&&e.setFlex(s),e.getFlex()<=0){const l=cs(t.width);if(l!=null)e.setActualWidth(l,i);else{const a=e.getActualWidth();e.setActualWidth(a,i)}}t.sort!==void 0&&(t.sort=="asc"||t.sort=="desc"?e.setSort(t.sort,i):e.setSort(void 0,i));const o=cs(t.sortIndex);o!==void 0&&e.setSortIndex(o);const n=fc(t.hide);n!==void 0&&e.setVisible(!n,i),t.pinned!==void 0&&e.setPinned(t.pinned)}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){const s=t[i].getUserProvidedColDef();if(!s)continue;if(e.colId!=null){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(e.field!=null){if(s.field===e.field)return{idx:i,column:t[i]};continue}if(s===e)return{idx:i,column:t[i]}}}findExistingGroup(e,t){if(e.groupId!=null)for(let s=0;s<t.length;s++){const r=t[s];if(r.getColGroupDef()&&r.getId()===e.groupId)return{idx:s,group:r}}}addColumnDefaultAndTypes(e,t){var l;const i={},s=this.gos.get("defaultColDef");Qe(i,s,!1,!0);const r=this.updateColDefAndGetColumnType(i,e,t);r&&this.assignColumnTypes(r,i),Qe(i,e,!1,!0);const o=this.gos.get("autoGroupColumnDef"),n=jt(this.gos);return e.rowGroup&&o&&n&&Qe(i,{sort:o.sort,initialSort:o.initialSort},!1,!0),(l=this.dataTypeService)==null||l.validateColDef(i),i}updateColDefAndGetColumnType(e,t,i){var o;const s=(o=this.dataTypeService)==null?void 0:o.updateColDefAndGetColumnType(e,t,i),r=t.type??s??e.type;return e.type=r,r?Sn(r):void 0}assignColumnTypes(e,t){if(!e.length)return;const i=Object.assign({},iS),s=this.gos.get("columnTypes")||{};It(s,(r,o)=>{r in i?D(`the column type '${r}' is a default column type and cannot be overridden.`):(o.type&&D("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),i[r]=o)}),e.forEach(r=>{const o=i[r.trim()];o?Qe(t,o,!1,!0):D("colDef.type '"+r+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return e.children!==void 0}};function pi(e,t,i){if(t)for(let s=0;s<t.length;s++){const r=t[s];Ye(r)&&pi(r,r.getChildren(),i),i(r,e)}}var oS=class extends P{constructor(){super(...arguments),this.beanName="columnModel",this.pivotMode=!1,this.autoHeightActiveAtLeastOnce=!1,this.ready=!1,this.changeEventsDispatching=!1,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}wireBeans(e){this.context=e.context,this.ctrlsService=e.ctrlsService,this.columnFactory=e.columnFactory,this.columnSizeService=e.columnSizeService,this.visibleColsService=e.visibleColsService,this.columnViewportService=e.columnViewportService,this.pivotResultColsService=e.pivotResultColsService,this.columnAnimationService=e.columnAnimationService,this.autoColService=e.autoColService,this.controlsColService=e.controlsColService,this.valueCache=e.valueCache,this.columnDefFactory=e.columnDefFactory,this.columnApplyStateService=e.columnApplyStateService,this.columnGroupStateService=e.columnGroupStateService,this.eventDispatcher=e.columnEventDispatcher,this.columnMoveService=e.columnMoveService,this.columnAutosizeService=e.columnAutosizeService,this.funcColsService=e.funcColsService,this.quickFilterService=e.quickFilterService,this.showRowGroupColsService=e.showRowGroupColsService,this.environment=e.environment}postConstruct(){const e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],t=>this.refreshAll(es(t.source))),this.addManagedPropertyListener("rowSelection",t=>{this.onSelectionOptionsChanged(t.currentValue,t.previousValue,es(t.source))}),this.addManagedPropertyListener("autoGroupColumnDef",t=>this.onAutoGroupColumnDefChanged(es(t.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],t=>this.recreateColumnDefs(es(t.source))),this.addManagedPropertyListener("pivotMode",t=>this.setPivotMode(this.gos.get("pivotMode"),es(t.source))),this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}createColsFromColDefs(e){var c,u,d;const t=this.colDefs?this.columnApplyStateService.compareColumnStatesAndDispatchEvents(e):void 0;this.valueCache.expire();const i=(c=this.colDefCols)==null?void 0:c.list,s=(u=this.colDefCols)==null?void 0:u.tree,r=this.columnFactory.createColumnTree(this.colDefs,!0,s,e);xi(this.context,(d=this.colDefCols)==null?void 0:d.tree,r.columnTree);const o=r.columnTree,n=r.treeDept,l=Ou(o),a={};l.forEach(h=>a[h.getId()]=h),this.colDefCols={tree:o,treeDepth:n,list:l,map:a},this.funcColsService.extractCols(e,i),this.ready=!0,this.refreshCols(!0),this.visibleColsService.refresh(e),this.columnViewportService.checkViewportColumns(),this.eventDispatcher.everythingChanged(e),t&&(this.changeEventsDispatching=!0,t(),this.changeEventsDispatching=!1),this.eventDispatcher.newColumnsLoaded(e),e==="gridInitializing"&&this.columnSizeService.applyAutosizeStrategy()}refreshCols(e){var r,o,n;if(!this.colDefCols)return;const t=(r=this.cols)==null?void 0:r.tree;this.saveColOrder(),this.selectCols(),this.createAutoCols(),this.addAutoCols(),this.createControlsCols(),this.addControlsCols();const i=Ow(this.gos,this.showingPivotResult);(!e||i)&&this.restoreColOrder(),this.positionLockedCols(),(o=this.showRowGroupColsService)==null||o.refresh(),(n=this.quickFilterService)==null||n.refreshQuickFilterCols(),this.setColSpanActive(),this.setAutoHeightActive(),this.visibleColsService.clear(),this.columnViewportService.clear(),!$i(t,this.cols.tree)&&this.eventDispatcher.gridColumns()}selectCols(){const e=this.pivotResultColsService.getPivotResultCols();if(this.showingPivotResult=e!=null,e){const{map:t,list:i,tree:s,treeDepth:r}=e;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:r},e.list.some(n=>{var l;return((l=this.cols)==null?void 0:l.map[n.getColId()])!==void 0})||(this.lastPivotOrder=null)}else{const{map:t,list:i,tree:s,treeDepth:r}=this.colDefCols;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:r}}}getColsToShow(){var r;const e=this.isPivotMode()&&!this.isShowingPivotResult(),t=this.funcColsService.getValueColumns(),i=(r=this.controlsColService)==null?void 0:r.isControlsColEnabled();return this.cols.list.filter(o=>{const n=Sc(o);if(e){const l=t&&ds(t,o);return n||l||i&&cr(o)}else return n||o.isVisible()})}addAutoCols(){this.autoCols!=null&&(this.cols.list=this.autoCols.list.concat(this.cols.list),this.cols.tree=this.autoCols.tree.concat(this.cols.tree),Dh(this.cols))}createAutoCols(){var v;const e=Rl(this.gos,this.pivotMode),t=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),i=this.funcColsService.getRowGroupColumns(),r=!(i.length>0||this.gos.get("treeData"))||t||e,o=()=>{this.autoCols&&(xi(this.context,this.autoCols.tree),this.autoCols=null)};if(r||!this.autoColService){o();return}const n=this.autoColService.createAutoCols(i)??[],l=Th(n,((v=this.autoCols)==null?void 0:v.list)||null),a=this.cols.treeDepth,u=(this.autoCols?this.autoCols.treeDepth:-1)==a;if(l&&u)return;o();const[d,h]=this.columnFactory.balanceTreeForAutoCols(n,this.cols.tree);this.autoCols={list:n,tree:d,treeDepth:h,map:{}};const g=w=>{if(!w)return null;const S=w.filter(f=>!Sc(f));return[...n,...S]};this.lastOrder=g(this.lastOrder),this.lastPivotOrder=g(this.lastPivotOrder)}createControlsCols(){var c,u,d;const e=()=>{var h;xi(this.context,(h=this.controlsCols)==null?void 0:h.tree),this.controlsCols=null};this.controlsColService||e();const t=this.cols.treeDepth,s=(((c=this.controlsCols)==null?void 0:c.treeDepth)??-1)==t,r=((u=this.controlsColService)==null?void 0:u.createControlsCols())??[];if(Th(r,((d=this.controlsCols)==null?void 0:d.list)??[])&&s)return;e();const[n,l]=this.columnFactory.balanceTreeForAutoCols(r,this.cols.tree);this.controlsCols={list:r,tree:n,treeDepth:l,map:{}};const a=h=>{if(!h)return null;const g=h.filter(v=>!cr(v));return[...r,...g]};this.lastOrder=a(this.lastOrder),this.lastPivotOrder=a(this.lastPivotOrder)}addControlsCols(){this.controlsCols!=null&&(this.cols.list=this.controlsCols.list.concat(this.cols.list),this.cols.tree=this.controlsCols.tree.concat(this.cols.tree),Dh(this.cols))}refreshAll(e){this.isReady()&&(this.refreshCols(!1),this.visibleColsService.refresh(e))}setColsVisible(e,t=!1,i){this.columnApplyStateService.applyColumnState({state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},i)}setColsPinned(e,t,i){if(!this.cols||ht(e))return;if(Le(this.gos,"print")){D("Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();let s;t===!0||t==="left"?s="left":t==="right"?s="right":s=null;const r=[];e.forEach(o=>{if(!o)return;const n=this.getCol(o);n&&n.getPinned()!==s&&(n.setPinned(s),r.push(n))}),r.length&&(this.visibleColsService.refresh(i),this.eventDispatcher.columnPinned(r,i)),this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let s;Ye(e)?s=e.getId():s=e||"",this.columnGroupStateService.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColGroup(e){var i;let t=null;return pi(null,(i=this.cols)==null?void 0:i.tree,s=>{Ye(s)&&s.getId()===e&&(t=s)}),t}isColGroupLocked(e){const t=this.gos.get("groupLockGroupColumns");if(!e.isRowGroupActive()||t===0)return!1;if(t===-1)return!0;const s=this.funcColsService.getRowGroupColumns().findIndex(r=>r.getColId()===e.getColId());return t>s}isSuppressAutoCol(){return this.gos.get("groupDisplayType")==="custom"?!0:this.gos.get("treeDataDisplayType")==="custom"}setAutoHeightActive(){this.autoHeightActive=this.cols.list.some(e=>e.isVisible()&&e.isAutoHeight()),this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,ae(this.gos)||Xt(this.gos)||D("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}restoreColOrder(){const e=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!e)return;const t=new Map(e.map((a,c)=>[a,c]));if(!this.cols.list.some(a=>t.has(a)))return;const s=new Map(this.cols.list.map(a=>[a,!0])),r=e.filter(a=>s.has(a)),o=new Map(r.map(a=>[a,!0])),n=this.cols.list.filter(a=>!o.has(a)),l=r.slice();n.forEach(a=>{let c=a.getOriginalParent();if(!c){l.push(a);return}const u=[];for(;!u.length&&c;)c.getLeafColumns().forEach(v=>{const w=l.indexOf(v)>=0,S=u.indexOf(v)<0;w&&S&&u.push(v)}),c=c.getOriginalParent();if(!u.length){l.push(a);return}const d=u.map(g=>l.indexOf(g)),h=Math.max(...d);Zn(l,a,h+1)}),this.cols.list=l}sortColsLikeKeys(e){if(this.cols==null)return;let t=[];const i={};e.forEach(r=>{if(i[r])return;const o=this.cols.map[r];o&&(t.push(o),i[r]=!0)});let s=0;if(this.cols.list.forEach(r=>{const o=r.getColId();if(i[o]!=null)return;o.startsWith(Fl)?Zn(t,r,s++):t.push(r)}),t=this.columnMoveService.placeLockedColumns(t),!this.columnMoveService.doesMovePassMarryChildren(t)){D("Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.cols.list=t}sortColsLikeCols(e){!e||e.length<=1||e.filter(i=>this.cols.list.indexOf(i)<0).length>0||e.sort((i,s)=>{const r=this.cols.list.indexOf(i),o=this.cols.list.indexOf(s);return r-o})}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const s=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(s,i,t),!0}queueResizeOperations(){this.shouldQueueResizeOperations=!0}isShouldQueueResizeOperations(){return this.shouldQueueResizeOperations}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}moveInCols(e,t,i){var s;bf((s=this.cols)==null?void 0:s.list,e,t),this.visibleColsService.refresh(i)}positionLockedCols(){this.cols.list=this.columnMoveService.placeLockedColumns(this.cols.list)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=(e=this.cols)==null?void 0:e.list:this.lastOrder=(t=this.cols)==null?void 0:t.list}getColumnDefs(){if(!this.colDefCols)return;const e=this.colDefCols.list.slice();this.showingPivotResult?e.sort((s,r)=>this.lastOrder.indexOf(s)-this.lastOrder.indexOf(r)):this.lastOrder&&e.sort((s,r)=>this.cols.list.indexOf(s)-this.cols.list.indexOf(r));const t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns();return this.columnDefFactory.buildColumnDefs(e,t,i)}isShowingPivotResult(){return this.showingPivotResult}isChangeEventsDispatching(){return this.changeEventsDispatching}isColSpanActive(){return this.colSpanActive}isProvidedColGroupsPresent(){var e;return((e=this.colDefCols)==null?void 0:e.treeDepth)>0}setColSpanActive(){this.colSpanActive=this.cols.list.some(e=>e.getColDef().colSpan!=null)}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}getHeaderRowCount(){return this.cols?this.cols.treeDepth+1:-1}isReady(){return this.ready}isPivotMode(){return this.pivotMode}setPivotMode(e,t){e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode)||(this.pivotMode=e,this.ready&&(this.refreshCols(!1),this.visibleColsService.refresh(t),this.eventDispatcher.pivotModeChanged()))}isPivotSettingAllowed(e){return e&&this.gos.get("treeData")?(D("Pivot mode not available with treeData."),!1):!0}isPivotActive(){const e=this.funcColsService.getPivotColumns();return this.pivotMode&&!ht(e)}recreateColumnDefs(e){this.cols&&(this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e),this.createColsFromColDefs(e))}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e,t,i;xi(this.context,(e=this.colDefCols)==null?void 0:e.tree),xi(this.context,(t=this.autoCols)==null?void 0:t.tree),xi(this.context,(i=this.controlsCols)==null?void 0:i.tree),super.destroy()}getColTree(){return this.cols.tree}getColDefColTree(){return this.colDefCols.tree}getColDefCols(){var e;return(e=this.colDefCols)!=null&&e.list?this.colDefCols.list:null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}getAllCols(){var i,s,r;const e=this.pivotResultColsService.getPivotResultCols(),t=e==null?void 0:e.list;return[((i=this.colDefCols)==null?void 0:i.list)??[],((s=this.autoCols)==null?void 0:s.list)??[],((r=this.controlsCols)==null?void 0:r.list)??[],t??[]].flat()}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(t==null)return null;const{map:i,list:s}=t;if(typeof e=="string"&&i[e])return i[e];for(let r=0;r<s.length;r++)if(Mh(s[r],e))return s[r];return this.getAutoCol(e)}getAutoCol(e){var t;return((t=this.autoCols)==null?void 0:t.list.find(i=>Mh(i,e)))??null}getAutoCols(){var e;return((e=this.autoCols)==null?void 0:e.list)??null}setColHeaderHeight(e,t){e.setAutoHeaderHeight(t)&&(e.isColumn?this.eventDispatcher.headerHeight(e):this.eventDispatcher.groupHeaderHeight(e))}getGroupRowsHeight(){const e=[],t=this.ctrlsService.getHeaderRowContainerCtrls();for(const i of t){if(!i)continue;const s=i.getGroupRowCount()||0;for(let r=0;r<s;r++){const o=i.getGroupRowCtrlAtIndex(r),n=e[r];if(o){const l=this.getColumnGroupHeaderRowHeight(o);(n==null||l>n)&&(e[r]=l)}}}return e}getColumnGroupHeaderRowHeight(e){const t=this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight();let i=0;const s=e.getHeaderCtrls();for(const r of s){const o=r.getColumn();if(o.isAutoHeaderHeight()){const n=o.getAutoHeaderHeight();n!=null&&n>i&&(i=n)}}return Math.max(t,i)}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),i=this.visibleColsService.getAllCols().filter(s=>s.isAutoHeaderHeight()).map(s=>s.getAutoHeaderHeight()||0);return Math.max(e,...i)}getHeaderHeight(){return this.gos.get("headerHeight")??this.environment.getDefaultHeaderHeight()}getFloatingFiltersHeight(){return this.gos.get("floatingFiltersHeight")??this.getHeaderHeight()}getGroupHeaderHeight(){return this.gos.get("groupHeaderHeight")??this.getHeaderHeight()}getPivotHeaderHeight(){return this.gos.get("pivotHeaderHeight")??this.getHeaderHeight()}getPivotGroupHeaderHeight(){return this.gos.get("pivotGroupHeaderHeight")??this.getGroupHeaderHeight()}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"autosizeColumns"}):this.columnAutosizeService.autoSizeAllColumns("autosizeColumns",i)})}onAutoGroupColumnDefChanged(e){this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e)}onSelectionOptionsChanged(e,t,i){const s=t&&typeof t!="string"?lr(t):void 0,r=e&&typeof e!="string"?lr(e):void 0,o=s!==r,n=t&&typeof t!="string"?qn(t):void 0,l=e&&typeof e!="string"?qn(e):void 0;(o||n!==l)&&this.refreshAll(i)}};function es(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function Dh(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function Mh(e,t){const i=e===t,s=e.getColDef()===t,r=e.getColId()==t;return i||s||r}function Th(e,t){return $i(e,t,(i,s)=>i.getColId()===s.getColId())}var nS=class extends P{constructor(){super(...arguments),this.beanName="columnAutosizeService",this.timesDelayed=0}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.animationFrameService=e.animationFrameService,this.autoWidthCalculator=e.autoWidthCalculator,this.eventDispatcher=e.columnEventDispatcher,this.ctrlsService=e.ctrlsService,this.renderStatusService=e.renderStatusService}autoSizeCols(e){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeCols(e));return}const{colKeys:t,skipHeader:i,skipHeaderGroups:s,stopAtGroup:r,source:o="api"}=e;if(this.animationFrameService.flushAllFrames(),this.timesDelayed<5&&this.renderStatusService&&!this.renderStatusService.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>this.autoSizeCols(e));return}this.timesDelayed=0;const n=[];let l=-1;const a=i??this.gos.get("skipHeaderOnAutoSize"),c=s??a;for(;l!==0;){l=0;const u=[];t.forEach(d=>{if(!d)return;const h=this.columnModel.getCol(d);if(!h||n.indexOf(h)>=0)return;const g=this.autoWidthCalculator.getPreferredWidthForColumn(h,a);if(g>0){const v=this.normaliseColumnWidth(h,g);h.setActualWidth(v,o),n.push(h),l++}u.push(h)}),u.length&&this.visibleColsService.refresh(o)}c||this.autoSizeColumnGroupsByColumns(t,o,r),this.eventDispatcher.columnResized(n,!0,"autosizeColumns")}autoSizeColumn(e,t,i){e&&this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const s=new Set;this.columnModel.getColsForKeys(e).forEach(l=>{let a=l.getParent();for(;a&&a!=i;)a.isPadding()||s.add(a),a=a.getParent()});let o;const n=[];for(const l of s){for(const a of this.ctrlsService.getHeaderRowContainerCtrls())if(o=a.getHeaderCtrlForColumn(l),o)break;o&&o.resizeLeafColumnsToFit(t)}return n}autoSizeAllColumns(e,t){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeAllColumns(e,t));return}const i=this.visibleColsService.getAllCols();this.autoSizeCols({colKeys:i,skipHeader:t,source:e})}normaliseColumnWidth(e,t){const i=e.getMinWidth();t<i&&(t=i);const s=e.getMaxWidth();return e.isGreaterThanMax(t)&&(t=s),t}},lS=class extends P{constructor(){super(...arguments),this.beanName="funcColsService",this.rowGroupCols=[],this.valueCols=[],this.pivotCols=[]}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.aggFuncService=e.aggFuncService,this.visibleColsService=e.visibleColsService}getModifyColumnsNoEventsCallbacks(){return{addGroupCol:e=>this.rowGroupCols.push(e),removeGroupCol:e=>Xe(this.rowGroupCols,e),addPivotCol:e=>this.pivotCols.push(e),removePivotCol:e=>Xe(this.pivotCols,e),addValueCol:e=>this.valueCols.push(e),removeValueCol:e=>Xe(this.valueCols,e)}}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;if(t===!0)return this.rowGroupCols.slice(0);const i=this.columnModel.getColDefCol(t);return i?[i]:null}sortRowGroupColumns(e){this.rowGroupCols.sort(e)}sortPivotColumns(e){this.pivotCols.sort(e)}getValueColumns(){return this.valueCols?this.valueCols:[]}getPivotColumns(){return this.pivotCols?this.pivotCols:[]}getRowGroupColumns(){return this.rowGroupCols?this.rowGroupCols:[]}isRowGroupEmpty(){return ht(this.rowGroupCols)}setColumnAggFunc(e,t,i){if(!e)return;const s=this.columnModel.getColDefCol(e);s&&(s.setAggFunc(t),this.eventDispatcher.columnChanged("columnValueChanged",[s],i))}setRowGroupColumns(e,t){this.setColList(e,this.rowGroupCols,"columnRowGroupChanged",!0,!0,(i,s)=>this.setRowGroupActive(i,s,t),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.columnModel.setColsVisible([t],!1,i),!e&&!this.gos.get("suppressMakeColumnVisibleAfterUnGroup")&&this.columnModel.setColsVisible([t],!0,i))}addRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!0,!0,i=>this.setRowGroupActive(!0,i,t),"columnRowGroupChanged",t)}removeRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!1,!0,i=>this.setRowGroupActive(!1,i,t),"columnRowGroupChanged",t)}addPivotColumns(e,t){this.updateColList(e,this.pivotCols,!0,!1,i=>i.setPivotActive(!0,t),"columnPivotChanged",t)}setPivotColumns(e,t){this.setColList(e,this.pivotCols,"columnPivotChanged",!0,!1,(i,s)=>{s.setPivotActive(i,t)},t)}removePivotColumns(e,t){this.updateColList(e,this.pivotCols,!1,!1,i=>i.setPivotActive(!1,t),"columnPivotChanged",t)}setValueColumns(e,t){this.setColList(e,this.valueCols,"columnValueChanged",!1,!1,(i,s)=>this.setValueActive(i,s,t),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){const s=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(s)}}addValueColumns(e,t){this.updateColList(e,this.valueCols,!0,!1,i=>this.setValueActive(!0,i,t),"columnValueChanged",t)}removeValueColumns(e,t){this.updateColList(e,this.valueCols,!1,!1,i=>this.setValueActive(!1,i,t),"columnValueChanged",t)}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;const s=this.rowGroupCols[e],r=this.rowGroupCols.slice(e,t);this.rowGroupCols.splice(e,1),this.rowGroupCols.splice(t,0,s),this.eventDispatcher.rowGroupChanged(r,i)}setColList(e,t,i,s,r,o,n){if(!this.columnModel.getCols())return;const l=new Map;t.forEach((c,u)=>l.set(c,u)),t.length=0,M(e)&&e.forEach(c=>{const u=this.columnModel.getColDefCol(c);u&&t.push(u)}),t.forEach((c,u)=>{const d=l.get(c);if(d===void 0){l.set(c,0);return}s&&d!==u||l.delete(c)}),(this.columnModel.getColDefCols()||[]).forEach(c=>{const u=t.indexOf(c)>=0;o(u,c)}),r&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(n),this.eventDispatcher.columnChanged(i,[...l.keys()],n)}updateColList(e,t,i,s,r,o,n){if(!e||ht(e))return;let l=!1;const a=new Set;e.forEach(c=>{if(!c)return;const u=this.columnModel.getColDefCol(c);if(u){if(a.add(u),i){if(t.indexOf(u)>=0)return;t.push(u)}else{const d=t.indexOf(u);if(d<0)return;for(let h=d+1;h<t.length;h++)a.add(t[h]);Xe(t,u)}r(u),l=!0}}),l&&(s&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(n),this.eventDispatcher.genericColumnEvent(o,Array.from(a),n))}extractCols(e,t){this.extractRowGroupCols(e,t),this.extractPivotCols(e,t),this.extractValueCols(e,t)}extractValueCols(e,t){this.valueCols=this.extractColsCommon(t,this.valueCols,(i,s)=>i.setValueActive(s,e),()=>{},()=>{},i=>{const s=i.aggFunc;if(s===null||s==="")return null;if(s!==void 0)return!!s},i=>i.initialAggFunc!=null&&i.initialAggFunc!=""),this.valueCols.forEach(i=>{const s=i.getColDef();s.aggFunc!=null&&s.aggFunc!=""?i.setAggFunc(s.aggFunc):i.getAggFunc()||i.setAggFunc(s.initialAggFunc)})}extractRowGroupCols(e,t){this.rowGroupCols=this.extractColsCommon(t,this.rowGroupCols,(i,s)=>i.setRowGroupActive(s,e),i=>i.rowGroupIndex,i=>i.initialRowGroupIndex,i=>i.rowGroup,i=>i.initialRowGroup)}extractPivotCols(e,t){this.pivotCols=this.extractColsCommon(t,this.pivotCols,(i,s)=>i.setPivotActive(s,e),i=>i.pivotIndex,i=>i.initialPivotIndex,i=>i.pivot,i=>i.initialPivot)}extractColsCommon(e=[],t=[],i,s,r,o,n){const l=[],a=[];(this.columnModel.getColDefCols()||[]).forEach(h=>{const g=e.indexOf(h)<0,v=h.getColDef(),w=fc(o(v)),S=fc(n(v)),f=cs(s(v)),p=cs(r(v));let m;w!==void 0?m=w:f!==void 0?f===null?m=!1:m=f>=0:g?S!==void 0?m=S:p!==void 0?m=p!=null&&p>=0:m=!1:m=t.indexOf(h)>=0,m&&((g?f!=null||p!=null:f!=null)?l.push(h):a.push(h))});const u=h=>{const g=s(h.getColDef()),v=r(h.getColDef());return g??v};l.sort((h,g)=>{const v=u(h),w=u(g);return v===w?0:v<w?-1:1});const d=[].concat(l);return t.forEach(h=>{a.indexOf(h)>=0&&d.push(h)}),a.forEach(h=>{d.indexOf(h)<0&&d.push(h)}),t.forEach(h=>{d.indexOf(h)<0&&i(h,!1)}),d.forEach(h=>{t.indexOf(h)<0&&i(h,!0)}),d}generateColumnStateForRowGroupAndPivotIndexes(e,t){const i={},s=(r,o,n,l,a,c)=>{const u=this.columnModel.getColDefCols();if(!o.length||!u)return[];const d=Object.keys(r),h=new Set(d),g=new Set(d),v=new Set(o.map(F=>{const R=F.getColId();return g.delete(R),R}).concat(d)),w=[],S={};let f=0;for(let F=0;F<u.length;F++){const R=u[F].getColId();v.has(R)&&(w.push(R),S[R]=f++)}let p=1e3,m=!1,y=0;const b=F=>{const R=S[F];for(let E=y;E<R;E++){const L=w[E];g.has(L)&&(r[L][a]=p++,g.delete(L))}y=R};o.forEach(F=>{const R=F.getColId();if(h.has(R))b(R),r[R][a]=p++;else{const E=F.getColDef();(E[a]===null||E[a]===void 0&&E[c]==null)&&(m||(E[n]||E[n]===void 0&&E[l]?b(R):(g.forEach(O=>{r[O][a]=p+S[O]}),p+=w.length,m=!0)),i[R]||(i[R]={colId:R}),i[R][a]=p++)}})};return s(e,this.rowGroupCols,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(t,this.pivotCols,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}},aS=class extends P{constructor(){super(...arguments),this.beanName="columnApplyStateService"}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.sortController=e.sortController,this.columnGetStateService=e.columnGetStateService,this.funcColsService=e.funcColsService,this.visibleColsService=e.visibleColsService,this.columnAnimationService=e.columnAnimationService,this.pivotResultColsService=e.pivotResultColsService}applyColumnState(e,t){const i=this.columnModel.getColDefCols()||[];if(ht(i))return!1;if(e&&e.state&&!e.state.forEach)return D("applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;const s=this.funcColsService.getModifyColumnsNoEventsCallbacks(),r=(l,a,c)=>{const u=this.compareColumnStatesAndDispatchEvents(t),d=a.slice(),h={},g={},v=[],w=[];let S=0;const f=this.funcColsService.getRowGroupColumns().slice(),p=this.funcColsService.getPivotColumns().slice();l.forEach(F=>{const R=F.colId||"";if(R.startsWith(Fl)){v.push(F),w.push(F);return}const L=c(R);L?(this.syncColumnWithStateItem(L,F,e.defaultState,h,g,!1,t,s),Xe(d,L)):(w.push(F),S+=1)});const m=F=>this.syncColumnWithStateItem(F,null,e.defaultState,h,g,!1,t,s);d.forEach(m),this.funcColsService.sortRowGroupColumns(kh.bind(this,h,f)),this.funcColsService.sortPivotColumns(kh.bind(this,g,p)),this.columnModel.refreshCols(!1);const b=(this.columnModel.getAutoCols()||[]).slice();return v.forEach(F=>{const R=this.columnModel.getAutoCol(F.colId);Xe(b,R),this.syncColumnWithStateItem(R,F,e.defaultState,null,null,!0,t,s)}),b.forEach(m),this.orderLiveColsLikeState(e),this.visibleColsService.refresh(t),this.eventDispatcher.everythingChanged(t),u(),{unmatchedAndAutoStates:w,unmatchedCount:S}};this.columnAnimationService.start();let{unmatchedAndAutoStates:o,unmatchedCount:n}=r(e.state||[],i,l=>this.columnModel.getColDefCol(l));if(o.length>0||M(e.defaultState)){const l=this.pivotResultColsService.getPivotResultCols(),a=l==null?void 0:l.list;n=r(o,a||[],c=>this.pivotResultColsService.getPivotResultCol(c)).unmatchedCount}return this.columnAnimationService.finish(),n===0}resetColumnState(e){const t=this.columnModel.getColDefCols();if(ht(t))return;const i=this.columnModel.getColDefColTree(),s=Ou(i),r=[];let o=1e3,n=1e3,l=[];const a=this.columnModel.getAutoCols();a&&(l=l.concat(a)),s&&(l=l.concat(s)),l.forEach(c=>{const u=this.getColumnStateFromColDef(c);K(u.rowGroupIndex)&&u.rowGroup&&(u.rowGroupIndex=o++),K(u.pivotIndex)&&u.pivot&&(u.pivotIndex=n++),r.push(u)}),this.applyColumnState({state:r,applyOrder:!0},e)}getColumnStateFromColDef(e){const t=(v,w)=>v??w??null,i=e.getColDef(),s=t(i.sort,i.initialSort),r=t(i.sortIndex,i.initialSortIndex),o=t(i.hide,i.initialHide),n=t(i.pinned,i.initialPinned),l=t(i.width,i.initialWidth),a=t(i.flex,i.initialFlex);let c=t(i.rowGroupIndex,i.initialRowGroupIndex),u=t(i.rowGroup,i.initialRowGroup);c==null&&(u==null||u==!1)&&(c=null,u=null);let d=t(i.pivotIndex,i.initialPivotIndex),h=t(i.pivot,i.initialPivot);d==null&&(h==null||h==!1)&&(d=null,h=null);const g=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:r,hide:o,pinned:n,width:l,flex:a,rowGroup:u,rowGroupIndex:c,pivot:h,pivotIndex:d,aggFunc:g}}syncColumnWithStateItem(e,t,i,s,r,o,n,l){if(!e)return;const a=(y,b)=>{const F={value1:void 0,value2:void 0};let R=!1;return t&&(t[y]!==void 0&&(F.value1=t[y],R=!0),M(b)&&t[b]!==void 0&&(F.value2=t[b],R=!0)),!R&&i&&(i[y]!==void 0&&(F.value1=i[y]),M(b)&&i[b]!==void 0&&(F.value2=i[b])),F},c=a("hide").value1;c!==void 0&&e.setVisible(!c,n);const u=a("pinned").value1;u!==void 0&&e.setPinned(u);const d=e.getColDef().minWidth??this.gos.environment.getDefaultColumnMinWidth(),h=a("flex").value1;if(h!==void 0&&e.setFlex(h),h==null){const y=a("width").value1;y!=null&&d!=null&&y>=d&&e.setActualWidth(y,n)}const g=a("sort").value1;g!==void 0&&(g==="desc"||g==="asc"?e.setSort(g,n):e.setSort(void 0,n));const v=a("sortIndex").value1;if(v!==void 0&&e.setSortIndex(v),o||!e.isPrimary())return;const w=a("aggFunc").value1;w!==void 0&&(typeof w=="string"?(e.setAggFunc(w),e.isValueActive()||(e.setValueActive(!0,n),l.addValueCol(e))):(M(w)&&D("stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,n),l.removeValueCol(e))));const{value1:S,value2:f}=a("rowGroup","rowGroupIndex");(S!==void 0||f!==void 0)&&(typeof f=="number"||S?(e.isRowGroupActive()||(e.setRowGroupActive(!0,n),l.addGroupCol(e)),s&&typeof f=="number"&&(s[e.getId()]=f)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,n),l.removeGroupCol(e)));const{value1:p,value2:m}=a("pivot","pivotIndex");(p!==void 0||m!==void 0)&&(typeof m=="number"||p?(e.isPivotActive()||(e.setPivotActive(!0,n),l.addPivotCol(e)),r&&typeof m=="number"&&(r[e.getId()]=m)):e.isPivotActive()&&(e.setPivotActive(!1,n),l.removePivotCol(e)))}orderLiveColsLikeState(e){if(!e.applyOrder||!e.state)return;const t=[];e.state.forEach(i=>{i.colId!=null&&t.push(i.colId)}),this.columnModel.sortColsLikeKeys(t)}compareColumnStatesAndDispatchEvents(e){const t={rowGroupColumns:this.funcColsService.getRowGroupColumns().slice(),pivotColumns:this.funcColsService.getPivotColumns().slice(),valueColumns:this.funcColsService.getValueColumns().slice()},i=this.columnGetStateService.getColumnState(),s={};return i.forEach(r=>{s[r.colId]=r}),()=>{const r=this.columnModel.getAllCols(),o=(w,S,f,p)=>{const m=S.map(p),y=f.map(p);if($i(m,y))return;const F=new Set(S);f.forEach(E=>{F.delete(E)||F.add(E)});const R=[...F];this.eventService.dispatchEvent({type:w,columns:R,column:R.length===1?R[0]:null,source:e})},n=w=>{const S=[];return r.forEach(f=>{const p=s[f.getColId()];p&&w(p,f)&&S.push(f)}),S},l=w=>w.getColId();o("columnRowGroupChanged",t.rowGroupColumns,this.funcColsService.getRowGroupColumns(),l),o("columnPivotChanged",t.pivotColumns,this.funcColsService.getPivotColumns(),l);const c=n((w,S)=>{const f=w.aggFunc!=null,p=f!=S.isValueActive(),m=f&&w.aggFunc!=S.getAggFunc();return p||m});c.length>0&&this.eventDispatcher.columnChanged("columnValueChanged",c,e);const u=(w,S)=>w.width!=S.getActualWidth();this.eventDispatcher.columnResized(n(u),!0,e);const d=(w,S)=>w.pinned!=S.getPinned();this.eventDispatcher.columnPinned(n(d),e);const h=(w,S)=>w.hide==S.isVisible();this.eventDispatcher.columnVisible(n(h),e);const v=n((w,S)=>w.sort!=S.getSort()||w.sortIndex!=S.getSortIndex());v.length>0&&this.sortController.dispatchSortChangedEvents(e,v),this.normaliseColumnMovedEventForColumnState(i,e)}}normaliseColumnMovedEventForColumnState(e,t){const i=this.columnGetStateService.getColumnState(),s={};i.forEach(a=>s[a.colId]=a);const r={};e.forEach(a=>{s[a.colId]&&(r[a.colId]=!0)});const o=e.filter(a=>r[a.colId]),n=i.filter(a=>r[a.colId]),l=[];n.forEach((a,c)=>{const u=o&&o[c];if(u&&u.colId!==a.colId){const d=this.columnModel.getCol(u.colId);d&&l.push(d)}}),l.length&&this.eventDispatcher.columnMoved({movedColumns:l,source:t,finished:!0})}},kh=(e,t,i,s)=>{const r=e[i.getId()],o=e[s.getId()],n=r!=null,l=o!=null;if(n&&l)return r-o;if(n)return-1;if(l)return 1;const a=t.indexOf(i),c=t.indexOf(s),u=a>=0,d=c>=0;return u&&d?a-c:u?-1:1},cS=class extends P{constructor(){super(...arguments),this.beanName="columnMoveService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher}moveColumnByIndex(e,t,i){const s=this.columnModel.getCols();if(!s)return;const r=s[e];this.moveColumns([r],t,i)}moveColumns(e,t,i,s=!0){const r=this.columnModel.getCols();if(!r)return;if(t>r.length-e.length){D("tried to insert columns in invalid location, toIndex = ",t),D("remember that you should not count the moving columns when calculating the new index");return}this.columnAnimationService.start();const o=this.columnModel.getColsForKeys(e);this.doesMovePassRules(o,t)&&(this.columnModel.moveInCols(o,t,i),this.eventDispatcher.columnMoved({movedColumns:o,source:i,toIndex:t,finished:s})),this.columnAnimationService.finish()}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e))}getProposedColumnOrder(e,t){const s=this.columnModel.getCols().slice();return bf(s,e,t),s}doesMovePassLockedPositions(e){const t=o=>o?o==="left"||o===!0?-1:1:0,i=this.gos.get("enableRtl");let s=i?1:-1,r=!0;return e.forEach(o=>{const n=t(o.getColDef().lockPosition);i?n>s&&(r=!1):n<s&&(r=!1),s=n}),r}doesMovePassMarryChildren(e){let t=!0;const i=this.columnModel.getColTree();return pi(null,i,s=>{if(!Ye(s))return;const r=s,o=r.getColGroupDef();if(!(o&&o.marryChildren))return;const l=[];r.getLeafColumns().forEach(h=>{const g=e.indexOf(h);l.push(g)});const a=Math.max.apply(Math,l),c=Math.min.apply(Math,l),u=a-c,d=r.getLeafColumns().length-1;u>d&&(t=!1)}),t}placeLockedColumns(e){const t=[],i=[],s=[];return e.forEach(o=>{const n=o.getColDef().lockPosition;n==="right"?s.push(o):n==="left"||n===!0?t.push(o):i.push(o)}),this.gos.get("enableRtl")?[...s,...i,...t]:[...t,...i,...s]}},uS=/[&<>"']/g,dS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Qt(e,t){if(e==null)return null;const i=e.toString().toString();return t?i:i.replace(uS,s=>dS[s])}function hS(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,i=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(i,"$1 $2$3").replace(/\./g," ").split(" ").map(r=>r.substring(0,1).toUpperCase()+(r.length>1?r.substring(1,r.length):"")).join(" ")}var gS=class extends P{constructor(){super(...arguments),this.beanName="columnNameService"}wireBeans(e){this.expressionService=e.expressionService,this.funcColsService=e.funcColsService,this.columnModel=e.columnModel}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,i){const s=t?t.getColGroupDef():null;return s?this.getHeaderName(s,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,s,r){const o=e.headerValueGetter;if(o){const n=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:r});return typeof o=="function"?o(n):typeof o=="string"?this.expressionService.evaluate(o,n):(D("headerValueGetter must be a function or a string"),"")}else{if(e.headerName!=null)return e.headerName;if(e.field)return hS(e.field)}return""}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const i=e.getColDef().pivotValueColumn,s=M(i);let r=null,o;if(s){const n=this.funcColsService.getValueColumns(),l=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&n.length===1,a=e.getColDef().pivotTotalColumnIds!==void 0;if(l&&!a)return t;r=i?i.getAggFunc():null,o=!0}else{const n=e.isValueActive(),l=this.columnModel.isPivotMode()||!this.funcColsService.isRowGroupEmpty();n&&l?(r=e.getAggFunc(),o=!0):o=!1}if(o){const n=typeof r=="string"?r:"func";return`${this.localeService.getLocaleTextFunc()(n,n)}(${t})`}return t}},pS=class extends P{constructor(){super(...arguments),this.beanName="pivotResultColsService"}wireBeans(e){this.context=e.context,this.columnModel=e.columnModel,this.columnFactory=e.columnFactory,this.visibleColsService=e.visibleColsService}destroy(){var e;xi(this.context,(e=this.pivotResultCols)==null?void 0:e.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(e,t){if(this.pivotResultCols==null)return null;const i=this.columnModel.getColDefCol(t);let s=null;return this.pivotResultCols.list.forEach(r=>{const o=r.getColDef().pivotKeys,n=r.getColDef().pivotValueColumn;$i(o,e)&&n===i&&(s=r)}),s}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.columnModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){var i,s;if(this.columnModel.isReady()&&!(e==null&&this.pivotResultCols==null)){if(e){this.processPivotResultColDef(e);const r=this.columnFactory.createColumnTree(e,!1,((i=this.pivotResultCols)==null?void 0:i.tree)||this.previousPivotResultCols||void 0,t);xi(this.context,(s=this.pivotResultCols)==null?void 0:s.tree,r.columnTree);const o=r.columnTree,n=r.treeDept,l=Ou(o),a={};this.pivotResultCols={tree:o,treeDepth:n,list:l,map:a},this.pivotResultCols.list.forEach(u=>this.pivotResultCols.map[u.getId()]=u);const c=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.columnModel.refreshCols(!c)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.columnModel.refreshCols(!1);this.visibleColsService.refresh(t)}}processPivotResultColDef(e){const t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;const s=r=>{r.forEach(o=>{if(M(o.children)){const l=o;i&&i(l),s(l.children)}else t&&t(o)})};e&&s(e)}},fS=class extends P{constructor(){super(...arguments),this.beanName="columnSizeService"}wireBeans(e){this.columnModel=e.columnModel,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}setColumnWidths(e,t,i,s){const r=[];e.forEach(o=>{const n=this.columnModel.getColDefCol(o.key)||this.columnModel.getCol(o.key);if(!n)return;if(r.push({width:o.newWidth,ratios:[1],columns:[n]}),this.gos.get("colResizeDefault")==="shift"&&(t=!t),t){const a=this.visibleColsService.getColAfter(n);if(!a)return;const c=n.getActualWidth()-o.newWidth,u=a.getActualWidth()+c;r.push({width:u,ratios:[1],columns:[a]})}}),r.length!==0&&this.resizeColumnSets({resizeSets:r,finished:i,source:s})}resizeColumnSets(e){const{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every(u=>this.checkMinAndMaxWidthsForSet(u)))){if(i){const u=t&&t.length>0?t[0].columns:null;this.eventDispatcher.columnResized(u,i,s)}return}const o=[],n=[];t.forEach(u=>{const{width:d,columns:h,ratios:g}=u,v={},w={};h.forEach(p=>n.push(p));let S=!0,f=0;for(;S;){if(f++,f>1e3){$("infinite loop in resizeColumnSets");break}S=!1;const p=[];let m=0,y=d;h.forEach((F,R)=>{if(w[F.getId()])y-=v[F.getId()];else{p.push(F);const L=g[R];m+=L}});const b=1/m;p.forEach((F,R)=>{const E=R===p.length-1;let L;E?L=y:(L=Math.round(g[R]*d*b),y-=L);const A=F.getMinWidth(),O=F.getMaxWidth();L<A?(L=A,w[F.getId()]=!0,S=!0):O>0&&L>O&&(L=O,w[F.getId()]=!0,S=!0),v[F.getId()]=L})}h.forEach(p=>{const m=v[p.getId()];p.getActualWidth()!==m&&(p.setActualWidth(m,s),o.push(p))})});const l=o.length>0;let a=[];l&&(a=this.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0}),this.visibleColsService.setLeftValues(s),this.visibleColsService.updateBodyWidths(),this.columnViewportService.checkViewportColumns());const c=n.concat(a);(l||i)&&this.eventDispatcher.columnResized(c,i,s,a)}checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let s=0,r=0,o=!0;t.forEach(a=>{const c=a.getMinWidth();s+=c||0;const u=a.getMaxWidth();u>0?r+=u:o=!1});const n=i>=s,l=!o||i<=r;return n&&l}refreshFlexedColumns(e={}){const t=e.source?e.source:"flex";if(e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];const i=this.visibleColsService.getCenterCols();let s=-1;if(e.resizingCols){const h=new Set(e.resizingCols);for(let g=i.length-1;g>=0;g--)if(h.has(i[g])){s=g;break}}let r=0,o=[],n=0,l=0;for(let h=0;h<i.length;h++)i[h].getFlex()&&h>s?(o.push(i[h]),l+=i[h].getFlex(),n+=i[h].getMinWidth()):r+=i[h].getActualWidth();if(!o.length)return[];let a=[];r+n>this.flexViewportWidth&&(o.forEach(h=>h.setActualWidth(h.getMinWidth(),t)),a=o,o=[]);const c=[];let u;e:for(;;){u=this.flexViewportWidth-r;const h=u/l;for(let g=0;g<o.length;g++){const v=o[g],w=h*v.getFlex();let S=0;const f=v.getMinWidth(),p=v.getMaxWidth();if(w<f?S=f:w>p&&(S=p),S){v.setActualWidth(S,t),yf(o,v),l-=v.getFlex(),a.push(v),r+=v.getActualWidth();continue e}c[g]=Math.floor(w)}break}let d=u;return o.forEach((h,g)=>{const v=g<o.length-1?Math.min(c[g],d):Math.max(c[g],d);h.setActualWidth(v,t),a.push(h),d-=c[g]}),e.skipSetLeft||this.visibleColsService.setLeftValues(t),e.updateBodyWidths&&this.visibleColsService.updateBodyWidths(),e.fireResizedEvent&&this.eventDispatcher.columnResized(a,!0,t,o),o}sizeColumnsToFit(e,t="sizeColumnsToFit",i,s){var h;if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,s));return}const r={};s&&((h=s==null?void 0:s.columnLimits)==null||h.forEach(({key:g,...v})=>{r[typeof g=="string"?g:g.getColId()]=v}));const o=this.visibleColsService.getAllCols(),n=e===ii(o);if(e<=0||!o.length||n)return;const l=[],a=[];o.forEach(g=>{g.getColDef().suppressSizeToFit===!0?a.push(g):l.push(g)});const c=l.slice(0);let u=!1;const d=g=>{Xe(l,g),a.push(g)};for(l.forEach(g=>{g.resetActualWidth(t);const v=r==null?void 0:r[g.getId()],w=(v==null?void 0:v.minWidth)??(s==null?void 0:s.defaultMinWidth),S=(v==null?void 0:v.maxWidth)??(s==null?void 0:s.defaultMaxWidth),f=g.getActualWidth();typeof w=="number"&&f<w?g.setActualWidth(w,t,!0):typeof S=="number"&&f>S&&g.setActualWidth(S,t,!0)});!u;){u=!0;const g=e-ii(a);if(g<=0)l.forEach(v=>{var S;const w=((S=r==null?void 0:r[v.getId()])==null?void 0:S.minWidth)??(s==null?void 0:s.defaultMinWidth);if(typeof w=="number"){v.setActualWidth(w,t,!0);return}v.setMinimum(t)});else{const v=g/ii(l);let w=g;for(let S=l.length-1;S>=0;S--){const f=l[S],p=r==null?void 0:r[f.getId()],m=(p==null?void 0:p.minWidth)??(s==null?void 0:s.defaultMinWidth),y=(p==null?void 0:p.maxWidth)??(s==null?void 0:s.defaultMaxWidth),b=f.getMinWidth(),F=f.getMaxWidth(),R=typeof m=="number"&&m>b?m:b,E=typeof y=="number"&&y<F?y:F;let L=Math.round(f.getActualWidth()*v);L<R?(L=R,d(f),u=!1):L>E?(L=E,d(f),u=!1):S===0&&(L=w),f.setActualWidth(L,t,!0),w-=L}}}c.forEach(g=>{g.fireColumnWidthChangedEvent(t)}),this.visibleColsService.setLeftValues(t),this.visibleColsService.updateBodyWidths(),!i&&this.eventDispatcher.columnResized(c,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:s,defaultMaxWidth:r}=e,o=i==null?void 0:i.map(({colId:n,minWidth:l,maxWidth:a})=>({key:n,minWidth:l,maxWidth:a}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:s,defaultMaxWidth:r,columnLimits:o})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}};function Df(e,t){return e+"_"+t}function be(e){return e instanceof Mf}var Mf=class extends P{constructor(e,t,i,s){super(),this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=s}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return Df(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{be(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=j(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{Wi(t)?e.push(t):be(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{Wi(t)?e.push(t):be(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(i=>{if(be(i)&&(!i.displayedChildren||!i.displayedChildren.length))return;switch(i.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(i);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},Tf=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return typeof t!="number"?i=0:i=t+1,this.existingIds[e]=i,i}},mS=class extends P{constructor(){super(...arguments),this.beanName="visibleColsService",this.colsAndGroupsMap={},this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher}refresh(e,t=!1){t||this.buildTrees(),this.updateOpenClosedVisibilityInColumnGroups(),this.columnsLeft=ca(this.treeLeft),this.columnsCenter=ca(this.treeCenter),this.columnsRight=ca(this.treeRight),this.joinColsAriaOrder(),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.columns.filter(i=>i.isAutoHeight()),this.columnSizeService.refreshFlexedColumns(),this.updateBodyWidths(),this.columnViewportService.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(e),this.eventDispatcher.visibleCols(e)}updateBodyWidths(){const e=ii(this.columnsCenter),t=ii(this.columnsLeft),i=ii(this.columnsRight);this.bodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventService.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventService.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.columnsLeft?this.columnsLeft[0]:null,i=this.columnsRight?j(this.columnsRight):null):(t=this.columnsLeft?j(this.columnsLeft):null,i=this.columnsRight?this.columnsRight[0]:null),this.columnModel.getCols().forEach(s=>{s.setLastLeftPinned(s===t,e),s.setFirstRightPinned(s===i,e)})}buildTrees(){const e=this.columnModel.getColsToShow(),t=e.filter(o=>o.getPinned()=="left"),i=e.filter(o=>o.getPinned()=="right"),s=e.filter(o=>o.getPinned()!="left"&&o.getPinned()!="right"),r=new Tf;this.treeLeft=this.createGroups({columns:t,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=this.createGroups({columns:i,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=this.createGroups({columns:s,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.ariaOrderColumns=[]}joinColsAriaOrder(){const e=this.columnModel.getCols(),t=[],i=[],s=[];for(const r of e){const o=r.getPinned();o?o===!0||o==="left"?t.push(r):s.push(r):i.push(r)}this.ariaOrderColumns=t.concat(i).concat(s)}getAriaColIndex(e){let t;return be(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}getAllAutoHeightCols(){return this.autoHeightCols}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{be(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){if(!this.columnModel.getColDefCols())return;const i=this.columnModel.getCols().slice(0),s=this.gos.get("enableRtl");[this.columnsLeft,this.columnsRight,this.columnsCenter].forEach(r=>{if(s){let o=ii(r);r.forEach(n=>{o-=n.getActualWidth(),n.setLeft(o,e)})}else{let o=0;r.forEach(n=>{n.setLeft(o,e),o+=n.getActualWidth()})}jw(i,r)}),i.forEach(r=>{r.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.columns=this.columnsRight.concat(this.columnsCenter).concat(this.columnsLeft):this.columns=this.columnsLeft.concat(this.columnsCenter).concat(this.columnsRight)}getColsCenter(){return this.columnsCenter}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}getTreeLeft(){return this.treeLeft}getTreeRight(){return this.treeRight}getTreeCenter(){return this.treeCenter}getAllCols(){return this.columns}isColDisplayed(e){return this.getAllCols().indexOf(e)>=0}getLeftColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsLeft):this.columnsLeft}getRightColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsRight):this.columnsRight}getColsForRow(e,t,i,s){const r=[];let o=null;for(let n=0;n<t.length;n++){const l=t[n],a=t.length-n,c=Math.min(l.getColSpan(e),a),u=[l];if(c>1){const h=c-1;for(let g=1;g<=h;g++)u.push(t[n+g]);n+=h}let d;i?(d=!1,u.forEach(h=>{i(h)&&(d=!0)})):d=!0,d&&(r.length===0&&o&&(s&&s(l))&&r.push(o),r.push(l)),o=l}return r}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getCenterCols(){return this.columnsCenter}getLeftCols(){return this.columnsLeft}getRightCols(){return this.columnsRight}getColBefore(e){const t=this.getAllCols(),i=t.indexOf(e);return i>0?t[i-1]:null}getGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),r=t==="After"?j(s):s[0],o=`getCol${t}`;for(;;){const n=this[o](r);if(!n)return null;const l=this.getColGroupAtLevel(n,i);if(l!==e)return l}}getColGroupAtLevel(e,t){let i=e.getParent(),s,r;for(;s=i.getProvidedColumnGroup().getLevel(),r=i.getPaddingLevel(),!(s+r<=t);)i=i.getParent();return i}isPinningLeft(){return this.columnsLeft.length>0}isPinningRight(){return this.columnsRight.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};ts(this.treeCenter,!1,e),ts(this.treeLeft,!1,e),ts(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){const e=this.getAllTrees();ts(e,!1,t=>{be(t)&&t.calculateDisplayedColumns()})}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["getLeftCols","getCenterCols","getRightCols"];e&&t.reverse();for(let i=0;i<t.length;i++){const s=this[t[i]]();if(s.length)return e?j(s):s[0]}return null}getColumnGroup(e,t){if(!e)return null;if(be(e))return e;const i=this.getAllTrees(),s=typeof t=="number";let r=null;return ts(i,!1,o=>{if(be(o)){const n=o;let l;s?l=e===n.getGroupId()&&t===n.getPartId():l=e===n.getGroupId(),l&&(r=n)}}),r}getColAfter(e){const t=this.getAllCols(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}isBodyWidthDirty(){return this.bodyWidthDirty}setBodyWidthDirty(){this.bodyWidthDirty=!0}getColsLeftWidth(){return ii(this.columnsLeft)}getDisplayedColumnsRightWidth(){return ii(this.columnsRight)}isColAtEdge(e,t){const i=this.getAllCols();if(!i.length)return!1;const s=t==="first";let r;if(be(e)){const o=e.getDisplayedLeafColumns();if(!o.length)return!1;r=s?o[0]:j(o)}else r=e;return(s?i[0]:j(i))===r}createGroups(e){const{columns:t,idCreator:i,pinned:s,oldDisplayedGroups:r,isStandaloneStructure:o}=e,n=this.mapOldGroupsById(r),l=[];let a=t;for(;a.length;){const c=a;a=[];let u=0;const d=h=>{const g=u;u=h;const v=c[g],S=(be(v)?v.getProvidedColumnGroup():v).getOriginalParent();if(S==null){for(let p=g;p<h;p++)l.push(c[p]);return}const f=this.createColGroup(S,i,n,s,o);for(let p=g;p<h;p++)f.addChild(c[p]);a.push(f)};for(let h=1;h<c.length;h++){const g=c[h],w=(be(g)?g.getProvidedColumnGroup():g).getOriginalParent(),S=c[u],p=(be(S)?S.getProvidedColumnGroup():S).getOriginalParent();w!==p&&d(h)}u<c.length&&d(c.length)}return o||this.setupParentsIntoCols(l,null),l}createColGroup(e,t,i,s,r){const o=e.getGroupId(),n=t.getInstanceIdForKey(o),l=Df(o,n);let a=i[l];return a&&a.getProvidedColumnGroup()!==e&&(a=null),M(a)?a.reset():(a=new Mf(e,o,n,s),r||this.createBean(a)),a}mapOldGroupsById(e){const t={},i=s=>{s.forEach(r=>{if(be(r)){const o=r;t[r.getUniqueId()]=o,i(o.getChildren())}})};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach(i=>{if(i.setParent(t),be(i)){const s=i;this.setupParentsIntoCols(s.getChildren(),s)}})}};function ts(e,t,i){if(e)for(let s=0;s<e.length;s++){const r=e[s];if(be(r)){const o=t?r.getDisplayedChildren():r.getChildren();ts(o,t,i)}i(r)}}function ca(e){const t=[];return ts(e,!0,i=>{Wi(i)&&t.push(i)}),t}var kf=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel"],vS=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged"],CS=[...kf,...vS],wS={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0},Ve=class{};Ve.STRING_PROPERTIES=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"];Ve.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","theme","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","cellSelection","selectionColumnDef"];Ve.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"];Ve.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"];Ve.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"];Ve.OTHER_PROPERTIES=["suppressStickyTotalRow","loadThemeGoogleFonts","rowSelection"];Ve.FUNCTION_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"];Ve.ALL_PROPERTIES=[...Ve.ARRAY_PROPERTIES,...Ve.OBJECT_PROPERTIES,...Ve.STRING_PROPERTIES,...Ve.NUMBER_PROPERTIES,...Ve.FUNCTION_PROPERTIES,...Ve.BOOLEAN_PROPERTIES,...Ve.OTHER_PROPERTIES];var bo=Ve,Rt=class{static getCallbackForEvent(t){return!t||t.length<2?t:"on"+t[0].toUpperCase()+t.substring(1)}};Rt.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY";Rt.PUBLIC_EVENTS=kf;Rt.EVENT_CALLBACKS=CS.map(e=>Rt.getCallbackForEvent(e));Rt.BOOLEAN_PROPERTIES=bo.BOOLEAN_PROPERTIES;Rt.ALL_PROPERTIES=bo.ALL_PROPERTIES;Rt.ALL_PROPERTIES_AND_CALLBACKS=[...Rt.ALL_PROPERTIES,...Rt.EVENT_CALLBACKS];Rt.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(Rt.ALL_PROPERTIES_AND_CALLBACKS);var Ro=Rt;function SS(e,t){typeof e!="object"&&(e={});const i={...e};return Ro.ALL_PROPERTIES_AND_CALLBACKS.forEach(r=>{const o=t[r];typeof o<"u"&&o!==Ro.VUE_OMITTED_PROPERTY&&(i[r]=o)}),i}function yS(e,t){if(!e)return;const i={};let s=!1;if(Object.keys(e).filter(n=>Ro.ALL_PROPERTIES_AND_CALLBACKS_SET.has(n)).forEach(n=>{i[n]=e[n],s=!0}),!s)return;const r={type:"gridOptionsChanged",options:i};t.dispatchEvent(r);const o={type:"componentStateChanged"};It(i,(n,l)=>{o[n]=l}),t.dispatchEvent(o)}var mr=class extends P{};function ko(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var Ao=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){const t=(e||"").split(" ");if(t.length>1){t.forEach(s=>this.addCssClass(s));return}if(this.cssClassStates[e]!==!0&&e.length){const s=this.getGui();s&&s.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){const t=(e||"").split(" ");if(t.length>1){t.forEach(s=>this.removeCssClass(s));return}if(this.cssClassStates[e]!==!1&&e.length){const s=this.getGui();s&&s.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){s.forEach(r=>this.addOrRemoveCssClass(r,t));return}}if(this.cssClassStates[e]!==t&&e.length){const s=this.getGui();s&&s.classList.toggle(e,t),this.cssClassStates[e]=t}}};function vi(e,t,i){i==null||typeof i=="string"&&i==""?Af(e,t):Zt(e,t,i)}function Zt(e,t,i){e.setAttribute(If(t),i.toString())}function Af(e,t){e.removeAttribute(If(t))}function If(e){return`aria-${e}`}function Bt(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function bS(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function RS(e){return e.getAttribute("aria-label")}function ur(e,t){vi(e,"label",t)}function Fo(e,t){vi(e,"labelledby",t)}function Lf(e,t){vi(e,"live",t)}function FS(e,t){vi(e,"atomic",t)}function xS(e,t){vi(e,"relevant",t)}function PS(e,t){vi(e,"disabled",t)}function Of(e,t){vi(e,"hidden",t)}function Jn(e,t){Zt(e,"expanded",t)}function ES(e,t){Zt(e,"setsize",t)}function DS(e,t){Zt(e,"posinset",t)}function MS(e,t){Zt(e,"rowcount",t)}function TS(e,t){Zt(e,"rowindex",t)}function kS(e,t){Zt(e,"colcount",t)}function Gf(e,t){Zt(e,"colindex",t)}function AS(e,t){Zt(e,"colspan",t)}function IS(e,t){Zt(e,"sort",t)}function LS(e){Af(e,"sort")}function el(e,t){vi(e,"selected",t)}function OS(e,t){vi(e,"controls",t.id),Fo(t,e.id)}function Hu(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var GS="[tabindex], input, select, button, textarea, [href]",Nf="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Bu(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=t.call(e,"input, select, button, textarea"),r=t.call(e,Nf),o=qt(e);return s&&!r&&o}function pe(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||Of(e,!t)}function NS(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||Of(e,!t)}function xo(e,t){const i="disabled",s=t?r=>r.setAttribute(i,""):r=>r.removeAttribute(i);s(e),zf(e.querySelectorAll("input"),r=>s(r))}function Zs(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++s>i)break}else if(e===i)break}return!1}function Fs(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:r,borderBottomWidth:o,borderLeftWidth:n,paddingTop:l,paddingRight:a,paddingBottom:c,paddingLeft:u,marginTop:d,marginRight:h,marginBottom:g,marginLeft:v,boxSizing:w}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(r||"0"),borderBottomWidth:parseFloat(o||"0"),borderLeftWidth:parseFloat(n||"0"),paddingTop:parseFloat(l||"0"),paddingRight:parseFloat(a||"0"),paddingBottom:parseFloat(c||"0"),paddingLeft:parseFloat(u||"0"),marginTop:parseFloat(d||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(v||"0"),boxSizing:w}}function Vu(e){const t=Fs(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Io(e){const t=Fs(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function Hf(e){const{height:t,marginBottom:i,marginTop:s}=Fs(e);return Math.floor(t+i+s)}function tl(e){const{width:t,marginLeft:i,marginRight:s}=Fs(e);return Math.floor(t+i+s)}function Bf(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:r,borderBottomWidth:o}=Fs(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(r||0),bottom:t.bottom+(o||0)}}function il(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i)),i}function sl(e,t,i){i&&(t*=-1),e.scrollLeft=t}function pt(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function ys(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Vf(e){return!!e.offsetParent}function qt(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!Vf(e)||window.getComputedStyle(e).visibility!=="visible")}function Po(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function HS(e){return e.clientWidth<e.scrollWidth}function BS(e){return e.clientHeight<e.scrollHeight}function rl(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Nt(e,t)}function Nt(e,t){t=zu(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function Xr(e,t){t=zu(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function zu(e){return typeof e=="number"?`${e}px`:e}function Wu(e){return e instanceof Node||e instanceof HTMLElement}function VS(e){if(e==null)return[];const t=[];return zf(e,i=>t.push(i)),t}function zS(e,t){if(e)for(let i=0;i<e.length;i++){const s=e[i];t(s.name,s.value)}}function Ft(e,t,i){i==null||i===""?e.removeAttribute(t):e.setAttribute(t,i.toString())}function zf(e,t){if(e!=null)for(let i=0;i<e.length;i++)t(e[i])}var dr=class{constructor(e=0,t=1){this.nextValue=e,this.step=t}next(){const e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}},ua,en,da,ha,ga,pa,Fc,xc,fa;function fi(){return ua===void 0&&(ua=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),ua}function Wf(){if(en===void 0)if(fi()){const e=navigator.userAgent.match(/version\/(\d+)/i);e&&(en=e[1]!=null?parseFloat(e[1]):0)}else en=0;return en}function WS(){if(da===void 0){const e=window;da=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return da}function _u(){return ha===void 0&&(ha=/(firefox)/i.test(navigator.userAgent)),ha}function _f(){return ga===void 0&&(ga=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),ga}function Yi(){return pa===void 0&&(pa=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),pa}function Ah(){return!fi()||Wf()>=15}function Pc(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!_u())?null:t.toString()}function _S(){if(fa!==void 0)return fa;if(!document.body)return-1;let e=1e6;const t=_u()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const s=e*2;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s}return document.body.removeChild(i),fa=e,e}function US(){var e,t;return((e=document.body)==null?void 0:e.clientWidth)??(window.innerHeight||((t=document.documentElement)==null?void 0:t.clientWidth)||-1)}function jS(){var e,t;return((e=document.body)==null?void 0:e.clientHeight)??(window.innerHeight||((t=document.documentElement)==null?void 0:t.clientHeight)||-1)}function KS(){return xc==null&&Uf(),xc}function Uf(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.parentNode.removeChild(t),i!=null&&(xc=i,Fc=i===0)}function jf(){return Fc==null&&Uf(),Fc}var $S=1e3,YS=1e3,Ih=100,Kf=class Zi extends P{constructor(t,i,s,r){super(),this.parentComp=t,this.tooltipShowDelayOverride=i,this.tooltipHideDelayOverride=s,this.shouldDisplayTooltip=r,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(t){this.popupService=t.popupService,this.userComponentFactory=t.userComponentFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const t=this.parentComp.getGui();this.tooltipTrigger===0&&this.addManagedListeners(t,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(t,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(t,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(t,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(t){const i=this.gos.get(t);return i<0&&D(`${t} should not be lower than 0`),Math.max(200,i)}getTooltipDelay(t){return t==="show"?this.tooltipShowDelayOverride??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipHideDelayOverride??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const t=this.gos.get("tooltipTrigger");return!t||t==="hover"?0:1}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Yi()&&(Zi.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},Ih):this.prepareToShowTooltip(t))}onMouseMove(t){this.lastMouseEvent&&(this.lastMouseEvent=t),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(t){var o;const i=t.relatedTarget,s=this.parentComp.getGui(),r=(o=this.tooltipComp)==null?void 0:o.getGui();this.isInteractingWithTooltip||s.contains(i)||this.interactionEnabled&&(r!=null&&r.contains(i))||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(t){if(this.state!=0||Zi.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){const t=new Date().getTime(),i=Zi.lastTooltipHideTime;return t-i<$S}setToDoNothing(t){!t&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const t={...this.parentComp.getTooltipParams()};if(!M(t.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip()){this.setToDoNothing();return}this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(t).newAgStackInstance().then(i)}hideTooltip(t){!t&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Zi.lastTooltipHideTime=new Date().getTime()),this.eventService.dispatchEvent({type:"tooltipHide",parentGui:this.parentComp.getGui()}),t&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(t,i){if(this.state!==2||this.tooltipInstanceCount!==t){this.destroyBean(i);return}const r=i.getGui();this.tooltipComp=i,r.classList.contains("ag-tooltip")||r.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&r.classList.add("ag-tooltip-animate"),this.interactionEnabled&&r.classList.add("ag-tooltip-interactive");const o=this.localeService.getLocaleTextFunc(),n=this.popupService.addPopup({eChild:r,ariaLabel:o("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const l=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:l,columnMoved:l})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(r,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(Se(this.gos),{keydown:l=>{r.contains(l==null?void 0:l.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(r,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventService.dispatchEvent({type:"tooltipShow",tooltipGui:r,parentGui:this.parentComp.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var s;const t=(s=this.tooltipComp)==null?void 0:s.getGui(),i=fe(this.gos);return!!t&&t.contains(i)}onTooltipFocusOut(t){const i=this.parentComp.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,i.contains(t.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const t={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent({...t,mouseEvent:this.lastMouseEvent}):this.popupService.positionPopupByComponent({...t,eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const t=this.tooltipPopupDestroyFunc,i=this.tooltipComp,s=this.tooltipTrigger===0?YS:0;window.setTimeout(()=>{t(),this.destroyBean(i)},s),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(t=>{t&&t()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Zi.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},Ih)}unlockService(){Zi.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};Kf.isLocked=!1;var QS=Kf,vr=class extends P{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}wireBeans(e){this.beans=e}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){const t="title",i=this.ctrl.getGui();i&&(e!=null&&e!=""?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){var t,i,s,r;if(this.tooltipManager!=null)return;const e={getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()};this.tooltipManager=this.createBean(new QS(e,(i=(t=this.ctrl).getTooltipShowDelayOverride)==null?void 0:i.call(t),(r=(s=this.ctrl).getTooltipHideDelayOverride)==null?void 0:r.call(s),this.ctrl.shouldDisplayTooltip),this.beans.context)}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){var r,o,n,l,a;const e=this.ctrl,t=(r=e.getColumn)==null?void 0:r.call(e),i=(o=e.getColDef)==null?void 0:o.call(e),s=(n=e.getRowNode)==null?void 0:n.call(e);return{location:e.getLocation(),colDef:i,column:t,rowIndex:(l=e.getRowIndex)==null?void 0:l.call(e),node:s,data:s==null?void 0:s.data,value:this.getTooltipText(),valueFormatted:(a=e.getValueFormatted)==null?void 0:a.call(e),hideTooltipCallback:()=>{var c;return(c=this.tooltipManager)==null?void 0:c.hideTooltip(!0)}}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}},qS=new dr,B=null,re=class $f extends P{constructor(t,i){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=qS.next(),this.cssClassManager=new Ao(()=>this.eGui),this.componentSelectors=new Map((i??[]).map(s=>[s.selector,s])),t&&this.setTemplate(t)}preWireBeans(t){super.preWireBeans(t)}preConstruct(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips"),this.wireTemplate(this.getGui())}wireTemplate(t,i){t&&this.gos&&(this.applyElementsToComponent(t),this.createChildComponentsFromTags(t,i))}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(t){const{newTooltipText:i,showDelayOverride:s,hideDelayOverride:r,location:o,shouldDisplayTooltip:n}=t||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==i&&(this.tooltipText=i);const l=()=>this.tooltipText;i!=null&&(this.tooltipFeature=this.createBean(new vr({getTooltipValue:l,getGui:()=>this.getGui(),getLocation:()=>o??"UNKNOWN",getColDef:t==null?void 0:t.getColDef,getColumn:t==null?void 0:t.getColumn,getTooltipShowDelayOverride:s!=null?()=>s:void 0,getTooltipHideDelayOverride:r!=null?()=>r:void 0,shouldDisplayTooltip:n})))}getDataRefAttribute(t){return t.getAttribute?t.getAttribute("data-ref"):null}applyElementsToComponent(t,i,s,r=null){if(i===void 0&&(i=this.getDataRefAttribute(t)),i){const o=this[i];if(o===B)this[i]=r??t;else{const n=s&&s[i];!this.suppressDataRefValidation&&!n&&D(`Issue with data-ref: ${i} on ${this.constructor.name} with ${o}`)}}}createChildComponentsFromTags(t,i){VS(t.childNodes).forEach(r=>{if(!(r instanceof HTMLElement))return;const o=this.createComponentFromElement(r,n=>{n.getGui()&&this.copyAttributesFromNode(r,n.getGui())},i);if(o){if(o.addItems&&r.children.length){this.createChildComponentsFromTags(r,i);const n=Array.prototype.slice.call(r.children);o.addItems(n)}this.swapComponentForNode(o,t,r)}else r.childNodes&&this.createChildComponentsFromTags(r,i)})}createComponentFromElement(t,i,s){const r=t.nodeName,o=this.getDataRefAttribute(t),n=r.indexOf("AG-")===0,l=n?this.componentSelectors.get(r):null;let a=null;if(l){$f.elementGettingCreated=t;const c=s&&o?s[o]:void 0;a=new l.component(c),a.setParentComponent(this),this.createBean(a,null,i)}else n&&D(`Missing selector: ${r}`);return this.applyElementsToComponent(t,o,s,a),a}copyAttributesFromNode(t,i){zS(t.attributes,(s,r)=>i.setAttribute(s,r))}swapComponentForNode(t,i,s){const r=t.getGui();i.replaceChild(r,s),i.insertBefore(document.createComment(s.nodeName),r),this.addDestroyFunc(this.destroyBean.bind(this,t))}activateTabIndex(t){const i=this.gos.get("tabIndex");t||(t=[]),t.length||t.push(this.getGui()),t.forEach(s=>s.setAttribute("tabindex",i.toString()))}setTemplate(t,i,s){const r=Po(t);this.setTemplateFromElement(r,i,s)}setTemplateFromElement(t,i,s,r=!1){if(this.eGui=t,this.suppressDataRefValidation=r,i)for(let o=0;o<i.length;o++){const n=i[o];this.componentSelectors.set(n.selector,n)}this.wireTemplate(t,s)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(t){this.parentComponent=t}getParentComponent(){return this.parentComponent}setGui(t){this.eGui=t}queryForHtmlElement(t){return this.eGui.querySelector(t)}getContainerAndElement(t,i){let s=i;return t==null?null:(s||(s=this.eGui),Wu(t)?{element:t,parent:s}:{element:t.getGui(),parent:s})}prependChild(t,i){const{element:s,parent:r}=this.getContainerAndElement(t,i)||{};!s||!r||r.insertAdjacentElement("afterbegin",s)}appendChild(t,i){const{element:s,parent:r}=this.getContainerAndElement(t,i)||{};!s||!r||r.appendChild(s)}isDisplayed(){return this.displayed}setVisible(t,i={}){if(t!==this.visible){this.visible=t;const{skipAriaHidden:s}=i;NS(this.eGui,t,{skipAriaHidden:s})}}setDisplayed(t,i={}){if(t!==this.displayed){this.displayed=t;const{skipAriaHidden:s}=i;pe(this.eGui,t,{skipAriaHidden:s});const r={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(r)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}addGuiEventListener(t,i,s){this.eGui.addEventListener(t,i,s),this.addDestroyFunc(()=>this.eGui.removeEventListener(t,i))}addCssClass(t){this.cssClassManager.addCssClass(t)}removeCssClass(t){this.cssClassManager.removeCssClass(t)}containsCssClass(t){return this.cssClassManager.containsCssClass(t)}addOrRemoveCssClass(t,i){this.cssClassManager.addOrRemoveCssClass(t,i)}},Yf={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus",checkboxChecked:"checkbox-checked",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off"},XS=(()=>{const e=new Set(Object.values(Yf));return e.add("eye"),e})();function ZS(e,t,i){const s=ut(e,t,i);if(s){const{className:o}=s;if(typeof o=="string"&&o.indexOf("ag-icon")>-1||typeof o=="object"&&o["ag-icon"])return s}const r=document.createElement("span");return r.appendChild(s),r}function ut(e,t,i,s){let r=null;const o=i&&i.getColDef().icons;if(o&&(r=o[e]),t&&!r){const n=t.get("icons");n&&(r=n[e])}if(r){let n;if(typeof r=="function")n=r();else if(typeof r=="string")n=r;else throw new Error("icon from grid options needs to be a string or a function");if(typeof n=="string")return Po(n);if(Wu(n))return n;D("iconRenderer should return back a string or a dom object")}else{const n=document.createElement("span");let l=Yf[e]??(XS.has(e)?e:void 0);return l||(D(`Did not find icon ${e}`),l=""),n.setAttribute("class",`ag-icon ag-icon-${l}`),n.setAttribute("unselectable","on"),Bt(n,"presentation"),n}}var JS=class extends re{constructor(){super(...arguments),this.dragSource=null,this.eIcon=B,this.eLabel=B}postConstruct(){const e=t=>ZS(t,this.gos,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(`<div class="ag-dnd-ghost ag-unselectable">
                <span data-ref="eIcon" class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>
                <div data-ref="eLabel" class="ag-dnd-ghost-label"></div>
            </div>`)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t=!1){var s,r;pt(this.eIcon);let i=null;e||(e=(s=this.dragSource)!=null&&s.getDefaultIconName?(r=this.dragSource)==null?void 0:r.getDefaultIconName():"notAllowed"),i=this.dropIconMap[e],this.eIcon.classList.toggle("ag-shake-left-to-right",t),!(i===this.dropIconMap.hide&&this.gos.get("suppressDragLeaveHidesColumns"))&&i&&this.eIcon.appendChild(i)}setLabel(e){this.eLabel.textContent=Qt(e)}};function Qf(e,t,i){if(i===0)return!1;const s=Math.abs(e.clientX-t.clientX),r=Math.abs(e.clientY-t.clientY);return Math.max(s,r)<=i}var Hi=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new pr,this.eElement=e,this.preventMouseClick=t;const i=this.onTouchStart.bind(this),s=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",i,{passive:!0}),this.eElement.addEventListener("touchmove",s,{passive:!0}),this.eElement.addEventListener("touchend",r,{passive:!1}),this.destroyFuncs.push(()=>{this.eElement.removeEventListener("touchstart",i,{passive:!0}),this.eElement.removeEventListener("touchmove",s,{passive:!0}),this.eElement.removeEventListener("touchend",r,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;const t=this.touchStart;window.setTimeout(()=>{const i=this.touchStart===t;if(this.touching&&i&&!this.moved){this.moved=!0;const s={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(s)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);if(!t)return;!Qf(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=new Date().getTime();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){const i={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(i),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}};function kr(e,t){return`<span data-ref="eSort${e}" class="ag-sort-indicator-icon ag-sort-${t} ag-hidden" aria-hidden="true"></span>`}var ey=`<span class="ag-sort-indicator-container">
        ${kr("Order","order")}
        ${kr("Asc","ascending-icon")}
        ${kr("Desc","descending-icon")}
        ${kr("Mixed","mixed-icon")}
        ${kr("None","none-icon")}
    </span>`,Uu=class extends re{constructor(e){super(),this.eSortOrder=B,this.eSortAsc=B,this.eSortDesc=B,this.eSortMixed=B,this.eSortNone=B,e||this.setTemplate(ey)}wireBeans(e){this.sortController=e.sortController}attachCustomElements(e,t,i,s,r){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=s,this.eSortNone=r}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!this.column.isSortable()&&!this.column.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);const i=this.updateIcons.bind(this),s=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:s,columnRowGroupChanged:s}),this.onSortChanged()}addInIcon(e,t,i){if(t==null)return;const s=ut(e,this.gos,i);s&&t.appendChild(s)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){const t=e==="asc";pe(this.eSortAsc,t,{skipAriaHidden:!0})}if(this.eSortDesc){const t=e==="desc";pe(this.eSortDesc,t,{skipAriaHidden:!0})}if(this.eSortNone){const t=!this.column.getColDef().unSortIcon&&!this.gos.get("unSortIcon"),i=e==null;pe(this.eSortNone,!t&&i,{skipAriaHidden:!0})}}setupMultiSortIndicator(){this.addInIcon("sortUnSort",this.eSortMixed,this.column);const e=this.column.getColDef().showRowGroup;jt(this.gos)&&e&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){if(this.eSortMixed){const e=this.sortController.getDisplaySortForColumn(this.column)==="mixed";pe(this.eSortMixed,e,{skipAriaHidden:!0})}}updateSortOrder(){if(!this.eSortOrder)return;const e=this.sortController.getColumnsWithSortingOrdered(),t=this.sortController.getDisplaySortIndexForColumn(this.column)??-1,i=e.some(r=>this.sortController.getDisplaySortIndexForColumn(r)??!1),s=t>=0&&i;pe(this.eSortOrder,s,{skipAriaHidden:!0}),t>=0?this.eSortOrder.textContent=(t+1).toString():pt(this.eSortOrder)}},ty={selector:"AG-SORT-INDICATOR",component:Uu},iy=`<div class="ag-cell-label-container" role="presentation">
        <span data-ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>
        <span data-ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>
        <div data-ref="eLabel" class="ag-header-cell-label" role="presentation">
            <span data-ref="eText" class="ag-header-cell-text"></span>
            <span data-ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>
            <ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator>
        </div>
    </div>`,Ec=class extends re{constructor(){super(...arguments),this.eFilter=B,this.eFilterButton=B,this.eSortIndicator=B,this.eMenu=B,this.eLabel=B,this.eText=B,this.eSortOrder=B,this.eSortAsc=B,this.eSortDesc=B,this.eSortMixed=B,this.eSortNone=B,this.lastMovingChanged=0}wireBeans(e){this.sortController=e.sortController,this.menuService=e.menuService,this.funcColsService=e.funcColsService}destroy(){super.destroy()}refresh(e){const t=this.params;return this.params=e,this.workOutTemplate()!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||this.workOutSort()!=this.currentSort||this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon?!1:(this.setDisplayName(e),!0)}workOutTemplate(){let e=this.params.template??iy;return e=e&&e.trim?e.trim():e,e}init(e){this.params=e,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate,[ty]),this.setupTap(),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setupFilterButton(),this.setDisplayName(e)}setDisplayName(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;const t=Qt(this.currentDisplayName,!0);this.eText&&(this.eText.textContent=t)}}addInIcon(e,t,i){if(t==null)return;const s=ut(e,this.gos,i);s&&t.appendChild(s)}setupTap(){const{gos:e}=this;if(e.get("suppressTouch"))return;const t=new Hi(this.getGui(),!0),i=this.shouldSuppressMenuHide(),s=i&&M(this.eMenu),r=s?new Hi(this.eMenu,!0):t;if(this.params.enableMenu){const o=s?"tap":"longTap",n=l=>this.params.showColumnMenuAfterMouseClick(l.touchStart);this.addManagedListeners(r,{[o]:n})}if(this.params.enableSorting){const o=n=>{var a,c;const l=n.touchStart.target;i&&((a=this.eMenu)!=null&&a.contains(l)||(c=this.eFilterButton)!=null&&c.contains(l))||this.sortController.progressSort(this.params.column,!1,"uiColumnSorted")};this.addManagedListeners(t,{tap:o})}if(this.params.enableFilterButton){const o=new Hi(this.eFilterButton,!0);this.addManagedListeners(o,{tap:()=>this.params.showFilter(this.eFilterButton)}),this.addDestroyFunc(()=>o.destroy())}this.addDestroyFunc(()=>t.destroy()),s&&this.addDestroyFunc(()=>r.destroy())}workOutShowMenu(){return this.params.enableMenu&&this.menuService.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return this.menuService.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){ys(this.eMenu),this.eMenu=void 0;return}const e=this.menuService.isLegacyMenuEnabled();this.addInIcon(e?"menu":"menuAlt",this.eMenu,this.params.column),this.eMenu.classList.toggle("ag-header-menu-icon",!e),this.currentSuppressMenuHide=this.shouldSuppressMenuHide(),this.addManagedElementListeners(this.eMenu,{click:()=>this.params.showColumnMenu(this.eMenu)}),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide)}onMenuKeyboardShortcut(e){const t=this.params.column,i=this.menuService.isLegacyMenuEnabled();if(e&&!i){if(this.menuService.isFilterMenuInHeaderEnabled(t))return this.params.showFilter(this.eFilterButton??this.eMenu??this.getGui()),!0}else if(this.params.enableMenu)return this.params.showColumnMenu(this.eMenu??this.eFilterButton??this.getGui()),!0;return!1}workOutSort(){return this.params.enableSorting}setupSort(){if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.createBean(new Uu(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!this.currentSort)return;this.addManagedListeners(this.params.column,{movingChanged:()=>{this.lastMovingChanged=new Date().getTime()}}),this.eLabel&&this.addManagedElementListeners(this.eLabel,{click:t=>{const i=this.params.column.isMoving(),r=new Date().getTime()-this.lastMovingChanged<50;if(!(i||r)){const l=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.params.progressSort(l)}}});const e=()=>{const t=this.params.column.getSort();if(this.addOrRemoveCssClass("ag-header-cell-sorted-asc",t==="asc"),this.addOrRemoveCssClass("ag-header-cell-sorted-desc",t==="desc"),this.addOrRemoveCssClass("ag-header-cell-sorted-none",!t),this.params.column.getColDef().showRowGroup){const i=this.funcColsService.getSourceColumnsForGroupColumn(this.params.column),r=!(i==null?void 0:i.every(o=>this.params.column.getSort()==o.getSort()));this.addOrRemoveCssClass("ag-header-cell-sorted-mixed",r)}};this.addManagedEventListeners({sortChanged:e,columnRowGroupChanged:e})}setupFilterIcon(){this.eFilter&&this.configureFilter(this.params.enableFilterIcon,this.eFilter,this.onFilterChangedIcon.bind(this))}setupFilterButton(){if(!this.eFilterButton)return;this.configureFilter(this.params.enableFilterButton,this.eFilterButton,this.onFilterChangedButton.bind(this))?this.addManagedElementListeners(this.eFilterButton,{click:()=>this.params.showFilter(this.eFilterButton)}):this.eFilterButton=void 0}configureFilter(e,t,i){if(!e)return ys(t),!1;const s=this.params.column;return this.addInIcon("filter",t,s),this.addManagedListeners(s,{filterChanged:i}),i(),!0}onFilterChangedIcon(){const e=this.params.column.isFilterActive();pe(this.eFilter,e,{skipAriaHidden:!0})}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){return e?this.eFilterButton??this.eMenu??this.getGui():this.eMenu??this.eFilterButton??this.getGui()}},sy=class extends re{constructor(){super(`<div class="ag-header-group-cell-label" role="presentation">
            <span data-ref="agLabel" class="ag-header-group-text" role="presentation"></span>
            <span data-ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>
            <span data-ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>
        </div>`),this.agOpened=B,this.agClosed=B,this.agLabel=B}wireBeans(e){this.columnModel=e.columnModel}destroy(){super.destroy()}init(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()}checkWarnings(){this.params.template&&D("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")}setupExpandIcons(){this.addInIcon("columnGroupOpened",this.agOpened),this.addInIcon("columnGroupClosed",this.agClosed);const e=r=>{if(li(r))return;const o=!this.params.columnGroup.isExpanded();this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(),o,"uiColumnExpanded")};this.addTouchAndClickListeners(this.agClosed,e),this.addTouchAndClickListeners(this.agOpened,e);const t=r=>{ar(r)};this.addManagedElementListeners(this.agClosed,{dblclick:t}),this.addManagedElementListeners(this.agOpened,{dblclick:t}),this.addManagedElementListeners(this.getGui(),{dblclick:e}),this.updateIconVisibility();const i=this.params.columnGroup.getProvidedColumnGroup(),s=this.updateIconVisibility.bind(this);this.addManagedListeners(i,{expandedChanged:s,expandableChanged:s})}addTouchAndClickListeners(e,t){const i=new Hi(e,!0);this.addManagedListeners(i,{tap:t}),this.addDestroyFunc(()=>i.destroy()),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){if(this.params.columnGroup.isExpandable()){const t=this.params.columnGroup.isExpanded();pe(this.agOpened,t),pe(this.agClosed,!t)}else pe(this.agOpened,!1),pe(this.agClosed,!1)}addInIcon(e,t){const i=ut(e,this.gos,null);i&&t.appendChild(i)}addGroupExpandIcon(){if(!this.params.columnGroup.isExpandable()){pe(this.agOpened,!1),pe(this.agClosed,!1);return}}setupLabel(){var i;const{displayName:e,columnGroup:t}=this.params;if(M(e)){const s=Qt(e,!0);this.agLabel.textContent=s}this.addOrRemoveCssClass("ag-sticky-label",!((i=t.getColGroupDef())!=null&&i.suppressStickyLabel))}},ry="↑",oy="↓",ny=class extends re{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-change-delta");const i=document.createElement("span");i.setAttribute("class","ag-value-change-value"),e.appendChild(t),e.appendChild(i),this.setTemplateFromElement(e)}wireBeans(e){this.filterManager=e.filterManager}init(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e,!0)}showDelta(e,t){const i=Math.abs(t),s=e.formatValue(i),r=M(s)?s:i,o=t>=0;o?this.eDelta.textContent=ry+r:this.eDelta.textContent=oy+r,this.eDelta.classList.toggle("ag-value-change-delta-up",o),this.eDelta.classList.toggle("ag-value-change-delta-down",!o)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),pt(this.eDelta)}refresh(e,t=!1){var s;const i=e.value;if(i===this.lastValue||(M(e.valueFormatted)?this.eValue.textContent=e.valueFormatted:M(e.value)?this.eValue.textContent=i:pt(this.eValue),(s=this.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering()))return!1;if(typeof i=="number"&&typeof this.lastValue=="number"){const r=i-this.lastValue;this.showDelta(e,r)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0}},ly=class extends re{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-slide-current"),e.appendChild(t),this.setTemplateFromElement(e),this.eCurrent=this.queryForHtmlElement(".ag-value-slide-current")}wireBeans(e){this.filterManager=e.filterManager}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);const t=document.createElement("span");t.setAttribute("class","ag-value-slide-previous ag-value-slide-out"),this.ePrevious=t,this.ePrevious.textContent=this.eCurrent.textContent,this.getGui().insertBefore(this.ePrevious,this.eCurrent),this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var s;let i=e.value;return K(i)&&(i=""),i===this.lastValue||(s=this.filterManager)!=null&&s.isSuppressFlashingCellsBecauseFiltering()?!1:(t||this.addSlideAnimation(),this.lastValue=i,M(e.valueFormatted)?this.eCurrent.textContent=e.valueFormatted:M(e.value)?this.eCurrent.textContent=i:pt(this.eCurrent),!0)}},x=class{};x.BACKSPACE="Backspace";x.TAB="Tab";x.ENTER="Enter";x.ESCAPE="Escape";x.SPACE=" ";x.LEFT="ArrowLeft";x.UP="ArrowUp";x.RIGHT="ArrowRight";x.DOWN="ArrowDown";x.DELETE="Delete";x.F2="F2";x.PAGE_UP="PageUp";x.PAGE_DOWN="PageDown";x.PAGE_HOME="Home";x.PAGE_END="End";x.A="KeyA";x.C="KeyC";x.D="KeyD";x.V="KeyV";x.X="KeyX";x.Y="KeyY";x.Z="KeyZ";var ay=class extends re{constructor(e,t,i){super(t,i),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{}}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:i,labelAlignment:s,disabled:r}=this.config;r!=null&&this.setDisabled(r),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),i!=null&&this.setLabelWidth(i),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()}refreshLabel(){pt(this.eLabel),typeof this.label=="string"?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),this.label===""?(pe(this.eLabel,!1),Bt(this.eLabel,"presentation")):(pe(this.eLabel,!0),Bt(this.eLabel,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){return this.eLabel.id=this.eLabel.id||`ag-${this.getCompId()}-label`,this.eLabel.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const i=this.getGui().classList;return i.toggle("ag-label-align-left",e==="left"),i.toggle("ag-label-align-right",e==="right"),i.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(rl(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return xo(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},qf=class extends ay{constructor(e,t,i,s){super(e,t,i),this.className=s}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:i}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),i!=null&&this.onValueChange(i),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),i=this.getLabel();i==null||i==""||RS(e)!==null?Fo(e,""):Fo(e,t??"")}setAriaLabel(e){return ur(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Nt(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}},ns=class extends qf{constructor(e,t,i="text",s="input"){super(e,(e==null?void 0:e.template)??`
            <div role="presentation">
                <div data-ref="eLabel" class="ag-input-field-label"></div>
                <div data-ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
                    <${s} data-ref="eInput" class="ag-input-field-input"></${s}>
                </div>
            </div>`,[],t),this.inputType=i,this.displayFieldTag=s,this.eLabel=B,this.eWrapper=B,this.eInput=B}postConstruct(){super.postConstruct(),this.setInputType(),this.eLabel.classList.add(`${this.className}-label`),this.eWrapper.classList.add(`${this.className}-input-wrapper`),this.eInput.classList.add(`${this.className}-input`),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||`ag-${this.getCompId()}-input`;const{inputName:e,inputWidth:t}=this.config;e!=null&&this.setInputName(e),t!=null&&this.setInputWidth(t),this.addInputListeners(),this.activateTabIndex([this.eInput])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return rl(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return Ft(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return ur(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return xo(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Ft(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Ft(this.eInput,"autocomplete",t)}return this}},ju=class extends ns{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue))}dispatchChange(e,t,i){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:i});const s=this.getInputElement();this.eventService.dispatchEvent({type:"checkboxChanged",id:s.id,name:s.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}refreshSelectedClass(e){this.eWrapper.classList.toggle("ag-checked",e===!0),this.eWrapper.classList.toggle("ag-indeterminate",e==null)}},Ku={selector:"AG-CHECKBOX",component:ju},cy=class extends re{constructor(){super(`
            <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">
                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
            </div>`,[Ku]),this.eCheckbox=B}init(e){this.refresh(e);const t=this.eCheckbox.getInputElement();t.setAttribute("tabindex","-1"),Lf(t,"polite"),this.addManagedListeners(t,{click:i=>{if(ar(i),this.eCheckbox.isDisabled())return;const s=this.eCheckbox.getValue();this.onCheckboxChanged(s)},dblclick:i=>{ar(i)}}),this.addManagedElementListeners(this.params.eGridCell,{keydown:i=>{if(i.key===x.SPACE&&!this.eCheckbox.isDisabled()){this.params.eGridCell===fe(this.gos)&&this.eCheckbox.toggle();const s=this.eCheckbox.getValue();this.onCheckboxChanged(s),i.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){var l;let t,i=!0;if(e.node.group&&e.column)if(typeof e.value=="boolean")t=e.value;else{const a=e.column.getColId();a.startsWith(Fl)?t=e.value==null||e.value===""?void 0:e.value==="true":e.node.aggData&&e.node.aggData[a]!==void 0?t=e.value??void 0:i=!1}else t=e.value??void 0;if(!i){this.eCheckbox.setDisplayed(!1);return}this.eCheckbox.setValue(t);const s=e.disabled!=null?e.disabled:!((l=e.column)!=null&&l.isCellEditable(e.node));this.eCheckbox.setDisabled(s);const r=this.localeService.getLocaleTextFunc(),o=Hu(r,t),n=s?o:`${r("ariaToggleCellValue","Press SPACE to toggle cell value")} (${o})`;this.eCheckbox.setInputAriaLabel(n)}onCheckboxChanged(e){const{column:t,node:i,value:s}=this.params;this.eventService.dispatchEvent({type:"cellEditingStarted",column:t,colDef:t==null?void 0:t.getColDef(),data:i.data,node:i,rowIndex:i.rowIndex,rowPinned:i.rowPinned,value:s});const r=this.params.node.setDataValue(this.params.column,e,"edit");this.eventService.dispatchEvent({type:"cellEditingStopped",column:t,colDef:t==null?void 0:t.getColDef(),data:i.data,node:i,rowIndex:i.rowIndex,rowPinned:i.rowPinned,value:s,oldValue:s,newValue:e,valueChanged:r}),r||this.updateCheckbox(this.params)}},uy=class extends re{constructor(){super(`<div class="ag-loading">
            <span class="ag-loading-icon" data-ref="eLoadingIcon"></span>
            <span class="ag-loading-text" data-ref="eLoadingText"></span>
        </div>`),this.eLoadingIcon=B,this.eLoadingText=B}init(e){e.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const e=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")}setupLoading(){const e=ut("groupLoading",this.gos,null);e&&this.eLoadingIcon.appendChild(e);const t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")}refresh(e){return!1}destroy(){super.destroy()}},dy=class extends re{constructor(){super('<div class="ag-skeleton-container"></div>')}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>Fo(e.eParentOfValue)),Fo(e.eParentOfValue,t),e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.localeService.getLocaleTextFunc();this.getGui().innerText=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");ur(this.getGui(),t)}setupLoading(e){const i=Se(this.gos).createElement("div");i.classList.add("ag-skeleton-effect");const s=e.node.rowIndex;if(s!=null){const n=75+25*(s%2===0?Math.sin(s):Math.cos(s));i.style.width=`${n}%`}this.getGui().appendChild(i);const o=this.localeService.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");ur(this.getGui(),o)}refresh(e){return!1}destroy(){super.destroy()}},Xf=class extends re{constructor(){super()}destroy(){super.destroy()}},hy=class extends Xf{init(){var t;const e=ni((t=this.gos.get("overlayLoadingTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??'<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>'),!e){const i=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=i("loadingOoo","Loading...")})}}},gy=class extends Xf{init(){var t;const e=ni((t=this.gos.get("overlayNoRowsTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??'<span class="ag-overlay-no-rows-center"></span>'),!e){const i=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=i("noRowsToShow","No Rows To Show")})}}},Cr=class extends re{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},py=class extends Cr{constructor(){super('<div class="ag-tooltip"></div>')}init(e){const{value:t}=e;this.getGui().textContent=Qt(t,!0)}};function Zf(e){const{inputValue:t,allSuggestions:i,hideIrrelevant:s,filterByPercentageOfBestMatch:r,addSequentialWeight:o}=e;let n=i.map((c,u)=>({value:c,relevance:my(t.toLowerCase(),c.toLocaleLowerCase(),o),idx:u}));if(n.sort((c,u)=>u.relevance-c.relevance),s&&(n=n.filter(c=>c.relevance!==0)),n.length>0&&r&&r>0){const u=n[0].relevance*r;n=n.filter(d=>u-d.relevance<0)}const l=[],a=[];for(const c of n)l.push(c.value),a.push(c.idx);return{values:l,indices:a}}function fy(e){const t=[],i=e.length;for(let s=1;s<=i;s++)for(let r=0;r<=i-s;r++){const o=r+s-1;t.push(e.slice(r,o+1))}return t}function my(e,t,i=!1){const s=e.replace(/\s/g,""),r=t.replace(/\s/g,""),o=s.length,n=r.length,l=new Array(o+1).fill(null).map(()=>new Array(n+1).fill(0));for(let d=0;d<=o;d+=1)l[d][0]=d;for(let d=0;d<=n;d+=1)l[0][d]=d;for(let d=1;d<=o;d++)for(let h=1;h<=n;h++)s[d-1]===r[h-1]?l[d][h]=l[d-1][h-1]:l[d][h]=1+Math.min(l[d][h-1],Math.min(l[d-1][h],l[d-1][h-1]));const a=l[o][n];let u=Math.max(o,n)-a;if(i){const d=fy(s);for(let h=0;h<d.length;h++){const g=d[h];r.indexOf(g)!==-1&&(u+=1,u*=g.length)}}return u}var vy=class extends P{constructor(){super(...arguments),this.beanName="userComponentRegistry",this.agGridDefaults={agDragAndDropImage:JS,agColumnHeader:Ec,agColumnGroupHeader:sy,agSortIndicator:Uu,agAnimateShowChangeCellRenderer:ny,agAnimateSlideCellRenderer:ly,agLoadingCellRenderer:uy,agSkeletonCellRenderer:dy,agCheckboxCellRenderer:cy,agLoadingOverlay:hy,agNoRowsOverlay:gy,agTooltipComponent:py},this.agGridDefaultParams={},this.enterpriseAgDefaultCompsModule={agSetColumnFilter:"@ag-grid-enterprise/set-filter",agSetColumnFloatingFilter:"@ag-grid-enterprise/set-filter",agMultiColumnFilter:"@ag-grid-enterprise/multi-filter",agMultiColumnFloatingFilter:"@ag-grid-enterprise/multi-filter",agGroupColumnFilter:"@ag-grid-enterprise/row-grouping",agGroupColumnFloatingFilter:"@ag-grid-enterprise/row-grouping",agGroupCellRenderer:"@ag-grid-enterprise/row-grouping",agGroupRowRenderer:"@ag-grid-enterprise/row-grouping",agRichSelect:"@ag-grid-enterprise/rich-select",agRichSelectCellEditor:"@ag-grid-enterprise/rich-select",agDetailCellRenderer:"@ag-grid-enterprise/master-detail",agSparklineCellRenderer:"@ag-grid-enterprise/sparklines"},this.jsComps={}}postConstruct(){const e=this.gos.get("components");e!=null&&It(e,(t,i)=>this.registerJsComponent(t,i))}registerDefaultComponent(e,t,i){this.agGridDefaults[e]=t,i&&(this.agGridDefaultParams[e]=i)}registerJsComponent(e,t){this.jsComps[e]=t}retrieve(e,t){const i=(l,a,c)=>({componentFromFramework:a,component:l,params:c}),s=this.getFrameworkOverrides().frameworkComponent(t,this.gos.get("components"));if(s!=null)return i(s,!0);const r=this.jsComps[t];if(r){const l=this.getFrameworkOverrides().isFrameworkComponent(r);return i(r,l)}const o=this.agGridDefaults[t];if(o)return i(o,!1,this.agGridDefaultParams[t]);const n=this.enterpriseAgDefaultCompsModule[t];return n?this.gos.assertModuleRegistered(n,`AG Grid '${e}' component: ${t}`):ku(()=>{this.warnAboutMissingComponent(e,t)},"MissingComp"+t),null}warnAboutMissingComponent(e,t){const i=[...Object.keys(this.agGridDefaults).filter(r=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(r)),...Object.keys(this.jsComps)],s=Zf({inputValue:t,allSuggestions:i,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;D(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.`),s.length>0&&D(`         Did you mean: [${s.slice(0,3)}]?`),D(`If using a custom component check it has been registered as described in: ${this.getFrameworkOverrides().getDocLink("components/")}`)}},we=class Br{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(i=>this.onDone(i),i=>this.onReject(i))}static all(t){return t.length?new Br(i=>{let s=t.length;const r=new Array(s);t.forEach((o,n)=>{o.then(l=>{r[n]=l,s--,s===0&&i(r)})})}):Br.resolve()}static resolve(t=null){return new Br(i=>i(t))}then(t){return new Br(i=>{this.status===1?i(t(this.resolution)):this.waiters.push(s=>i(t(s)))})}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(i=>i(t))}onReject(t){}},Cy={propertyName:"dateComponent",cellRenderer:!1},wy={propertyName:"dragAndDropImageComponent",cellRenderer:!1},Sy={propertyName:"headerComponent",cellRenderer:!1},yy={propertyName:"headerGroupComponent",cellRenderer:!1},Lh={propertyName:"cellRenderer",cellRenderer:!0},by={propertyName:"cellRenderer",cellRenderer:!1},Ry={propertyName:"loadingCellRenderer",cellRenderer:!0},Fy={propertyName:"cellEditor",cellRenderer:!1},Oh={propertyName:"innerRenderer",cellRenderer:!0},xy={propertyName:"loadingOverlayComponent",cellRenderer:!1},Py={propertyName:"noRowsOverlayComponent",cellRenderer:!1},Ey={propertyName:"tooltipComponent",cellRenderer:!1},$u={propertyName:"filter",cellRenderer:!1},Dy={propertyName:"floatingFilterComponent",cellRenderer:!1},My={propertyName:"toolPanel",cellRenderer:!1},Ty={propertyName:"statusPanel",cellRenderer:!1},ky={propertyName:"fullWidthCellRenderer",cellRenderer:!0},Ay={propertyName:"loadingCellRenderer",cellRenderer:!0},Iy={propertyName:"groupRowRenderer",cellRenderer:!0},Ly={propertyName:"detailCellRenderer",cellRenderer:!0},Oy={propertyName:"menuItem",cellRenderer:!1},Jf=class em extends P{constructor(){super(...arguments),this.beanName="userComponentFactory"}wireBeans(t){this.agComponentUtils=t.agComponentUtils,this.componentMetadataProvider=t.componentMetadataProvider,this.userComponentRegistry=t.userComponentRegistry,this.frameworkComponentWrapper=t.frameworkComponentWrapper,this.gridOptions=t.gridOptions}getDragAndDropImageCompDetails(t){return this.getCompDetails(this.gridOptions,wy,"agDragAndDropImage",t,!0)}getHeaderCompDetails(t,i){return this.getCompDetails(t,Sy,"agColumnHeader",i)}getHeaderGroupCompDetails(t){const i=t.columnGroup.getColGroupDef();return this.getCompDetails(i,yy,"agColumnGroupHeader",t)}getFullWidthCellRendererDetails(t){return this.getCompDetails(this.gridOptions,ky,null,t,!0)}getFullWidthLoadingCellRendererDetails(t){return this.getCompDetails(this.gridOptions,Ay,"agLoadingCellRenderer",t,!0)}getFullWidthGroupCellRendererDetails(t){return this.getCompDetails(this.gridOptions,Iy,"agGroupRowRenderer",t,!0)}getFullWidthDetailCellRendererDetails(t){return this.getCompDetails(this.gridOptions,Ly,"agDetailCellRenderer",t,!0)}getInnerRendererDetails(t,i){return this.getCompDetails(t,Oh,null,i)}getFullWidthGroupRowInnerCellRenderer(t,i){return this.getCompDetails(t,Oh,null,i)}getCellRendererDetails(t,i){return this.getCompDetails(t,Lh,null,i)}getEditorRendererDetails(t,i){return this.getCompDetails(t,by,null,i)}getLoadingCellRendererDetails(t,i){return this.getCompDetails(t,Ry,"agSkeletonCellRenderer",i,!0)}getCellEditorDetails(t,i){return this.getCompDetails(t,Fy,"agCellEditor",i,!0)}getFilterDetails(t,i,s){return this.getCompDetails(t,$u,s,i,!0)}getDateCompDetails(t){return this.getCompDetails(this.gridOptions,Cy,"agDateInput",t,!0)}getLoadingOverlayCompDetails(t){return this.getCompDetails(this.gridOptions,xy,"agLoadingOverlay",t,!0)}getNoRowsOverlayCompDetails(t){return this.getCompDetails(this.gridOptions,Py,"agNoRowsOverlay",t,!0)}getTooltipCompDetails(t){return this.getCompDetails(t.colDef,Ey,"agTooltipComponent",t,!0)}getSetFilterCellRendererDetails(t,i){return this.getCompDetails(t,Lh,null,i)}getFloatingFilterCompDetails(t,i,s){return this.getCompDetails(t,Dy,s,i)}getToolPanelCompDetails(t,i){return this.getCompDetails(t,My,null,i,!0)}getStatusPanelCompDetails(t,i){return this.getCompDetails(t,Ty,null,i,!0)}getMenuItemCompDetails(t,i){return this.getCompDetails(t,Oy,"agMenuItem",i,!0)}getCompDetails(t,i,s,r,o=!1){const{propertyName:n,cellRenderer:l}=i;let{compName:a,jsComp:c,fwComp:u,paramsFromSelector:d,popupFromSelector:h,popupPositionFromSelector:g}=em.getCompKeys(this.frameworkOverrides,t,i,r),v;const w=m=>{const y=this.userComponentRegistry.retrieve(n,m);y&&(c=y.componentFromFramework?void 0:y.component,u=y.componentFromFramework?y.component:void 0,v=y.params)};if(a!=null&&w(a),c==null&&u==null&&s!=null&&w(s),c&&l&&!this.agComponentUtils.doesImplementIComponent(c)&&(c=this.agComponentUtils.adaptFunction(n,c)),!c&&!u){o&&$(`Could not find component ${a}, did you forget to configure this component?`);return}const S=this.mergeParamsWithApplicationProvidedParams(t,i,r,d,v),f=c==null,p=c||u;return{componentFromFramework:f,componentClass:p,params:S,type:i,popupFromSelector:h,popupPositionFromSelector:g,newAgStackInstance:()=>this.newAgStackInstance(p,f,S,i)}}static getCompKeys(t,i,s,r){const{propertyName:o}=s;let n,l,a,c,u,d;if(i){const h=i,g=h[o+"Selector"],v=g?g(r):null,w=S=>{typeof S=="string"?n=S:S!=null&&S!==!0&&(t.isFrameworkComponent(S)?a=S:l=S)};v?(w(v.component),c=v.params,u=v.popup,d=v.popupPosition):w(h[o])}return{compName:n,jsComp:l,fwComp:a,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:d}}newAgStackInstance(t,i,s,r){const o=r.propertyName,n=!i;let l;if(n)l=new t;else{const c=this.componentMetadataProvider.retrieve(o);l=this.frameworkComponentWrapper.wrap(t,c.mandatoryMethodList,c.optionalMethodList,r)}const a=this.initComponent(l,s);return a==null?we.resolve(l):a.then(()=>l)}mergeParamsWithApplicationProvidedParams(t,i,s,r=null,o){const n=this.gos.getGridCommonParams();Qe(n,s),o&&Qe(n,o);const l=t,a=l&&l[i.propertyName+"Params"];if(typeof a=="function"){const c=a(s);Qe(n,c)}else typeof a=="object"&&Qe(n,a);return Qe(n,r),n}initComponent(t,i){if(this.createBean(t),t.init!=null)return t.init(i)}};function Zr(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var Pl=class J{static register(t){J.__register(t,!0,void 0)}static registerModules(t){J.__registerModules(t,!0,void 0)}static __register(t,i,s){J.runVersionChecks(t),s!==void 0?(J.areGridScopedModules=!0,J.gridModulesMap[s]===void 0&&(J.gridModulesMap[s]={}),J.gridModulesMap[s][t.moduleName]=t):J.globalModulesMap[t.moduleName]=t,J.setModuleBased(i)}static __unRegisterGridModules(t){delete J.gridModulesMap[t]}static __registerModules(t,i,s){J.setModuleBased(i),t&&t.forEach(r=>J.__register(r,i,s))}static isValidModuleVersion(t){const[i,s]=t.version.split(".")||[],[r,o]=J.currentModuleVersion.split(".")||[];return i===r&&s===o}static runVersionChecks(t){J.currentModuleVersion||(J.currentModuleVersion=t.version);const i=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;if(t.version?J.isValidModuleVersion(t)||$(i(`'${t.moduleName}' is version ${t.version} but the other modules are version ${J.currentModuleVersion}.`)):$(i(`'${t.moduleName}' is incompatible.`)),t.validate){const s=t.validate();s.isValid||$(`${s.message}`)}}static setModuleBased(t){J.moduleBased===void 0?J.moduleBased=t:J.moduleBased!==t&&($("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms."),$("Please see https://www.ag-grid.com/javascript-grid/modules/ for more information."))}static __setIsBundled(){J.isBundled=!0}static __assertRegistered(t,i,s){var o;if(this.__isRegistered(t,s))return!0;let r;if(J.isBundled)r=`AG Grid: unable to use ${i} as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:
        
        <script src="https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js"><\/script>
        
For more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`;else if(J.moduleBased||J.moduleBased===void 0){const n=(o=Object.entries(df).find(([l,a])=>a===t))==null?void 0:o[0];r=`AG Grid: unable to use ${i} as the ${n} is not registered${J.areGridScopedModules?` for gridId: ${s}`:""}. Check if you have registered the module:
           
    import { ModuleRegistry } from '@ag-grid-community/core';
    import { ${n} } from '${t}';
    
    ModuleRegistry.registerModules([ ${n} ]);

For more info see: https://www.ag-grid.com/javascript-grid/modules/`}else r=`AG Grid: unable to use ${i} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:
            
    import 'ag-grid-enterprise';`;return $(r),!1}static __isRegistered(t,i){var s;return!!J.globalModulesMap[t]||!!((s=J.gridModulesMap[i])!=null&&s[t])}static __getRegisteredModules(t){return[...Cn(J.globalModulesMap),...Cn(J.gridModulesMap[t]||{})]}static __getGridRegisteredModules(t){return Cn(J.gridModulesMap[t]??{})||[]}static __isPackageBased(){return!J.moduleBased}};Pl.globalModulesMap={};Pl.gridModulesMap={};Pl.areGridScopedModules=!1;var Kt=Pl,Gy=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){var t;Object.entries(e.providedBeanInstances).forEach(([i,s])=>{this.beans[i]=s}),e.beanClasses.forEach(i=>{const s=new i;s.beanName?this.beans[s.beanName]=s:console.error(`Bean ${i.name} is missing beanName`),this.createdBeans.push(s)}),(t=e.derivedBeans)==null||t.forEach(i=>{const{beanName:s,bean:r}=i(this);this.beans[s]=r,this.createdBeans.push(r)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.initBeans([e],t),e}initBeans(e,t){e.forEach(i=>{var s,r;(s=i.preWireBeans)==null||s.call(i,this.beans),(r=i.wireBeans)==null||r.call(i,this.beans)}),e.forEach(i=>{var s;return(s=i.preConstruct)==null?void 0:s.call(i)}),t&&e.forEach(t),e.forEach(i=>{var s;return(s=i.postConstruct)==null?void 0:s.call(i)})}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}destroyBean(e){var t;(t=e==null?void 0:e.destroy)==null||t.call(e)}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}},Ny=class extends Gy{init(e){this.gridId=e.gridId,this.beans.context=this,super.init(e)}destroy(){super.destroy(),Kt.__unRegisterGridModules(this.gridId)}getGridId(){return this.gridId}},tm=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e))(tm||{}),Hy=class extends P{constructor(){super(...arguments),this.beanName="dragAndDropService",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsService=e.ctrlsService,this.dragService=e.dragService,this.mouseEventService=e.mouseEventService,this.environment=e.environment,this.userComponentFactory=e.userComponentFactory}addDragSource(e,t=!1){const i={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragService.addDragSource(i)}getDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;return!e||!e.comp?null:e.comp}removeDragSource(e){const t=this.dragSourceAndParamsList.find(i=>i.dragSource===e);t&&(this.dragService.removeDragSource(t.params),Xe(this.dragSourceAndParamsList,t))}destroy(){this.dragSourceAndParamsList.forEach(e=>this.dragService.removeDragSource(e.params)),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){var i,s;this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),(s=(i=this.dragSource).onDragStarted)==null||s.call(i),this.createDragAndDropImageComponent()}onDragStop(e){var t,i,s;if((i=(t=this.dragSource)==null?void 0:t.onDragStopped)==null||i.call(t),(s=this.lastDropTarget)!=null&&s.onDragStop){const r=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(r)}this.clearDragAndDropProperties()}onDragCancel(){var e,t,i;(t=(e=this.dragSource)==null?void 0:e.onDragCancelled)==null||t.call(e),(i=this.lastDropTarget)!=null&&i.onDragCancel&&this.lastDropTarget.onDragCancel(this.createDropTargetEvent(this.lastDropTarget,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){var n,l,a,c;const i=this.getHorizontalDirection(e),s=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const r=this.dropTargets.filter(u=>this.isMouseOnDropTarget(e,u)),o=this.findCurrentDropTarget(e,r);if(o!==this.lastDropTarget){if(this.leaveLastTargetIfExists(e,i,s,t),this.lastDropTarget!==null&&o===null&&((l=(n=this.dragSource)==null?void 0:n.onGridExit)==null||l.call(n,this.dragItem)),this.lastDropTarget===null&&o!==null&&((c=(a=this.dragSource)==null?void 0:a.onGridEnter)==null||c.call(a,this.dragItem)),this.enterDragTargetIfExists(o,e,i,s,t),o&&this.dragAndDropImageComp){const{comp:u,promise:d}=this.dragAndDropImageComp;u?u.setIcon(o.getIconName?o.getIconName():null):d.then(h=>{h&&h.setIcon(o.getIconName?o.getIconName():null)})}this.lastDropTarget=o}else if(o&&o.onDragging){const u=this.createDropTargetEvent(o,e,i,s,t);o.onDragging(u)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,i=[[e.getContainer()]];return t?i.concat(t):i}allContainersIntersect(e,t){for(const i of t){const{width:s,height:r,left:o,right:n,top:l,bottom:a}=i.getBoundingClientRect();if(s===0||r===0)return!1;const c=e.clientX>=o&&e.clientX<n,u=e.clientY>=l&&e.clientY<a;if(!c||!u)return!1}return!0}isMouseOnDropTarget(e,t){const i=this.getAllContainersFromDropTarget(t);let s=!1;for(const n of i)if(this.allContainersIntersect(e,n)){s=!0;break}const{eElement:r,type:o}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(r)?!1:s&&t.isInterestedIn(o,r)}findCurrentDropTarget(e,t){const i=t.length;if(i===0)return null;if(i===1)return t[0];const r=yo(this.gos).elementsFromPoint(e.clientX,e.clientY);for(const o of r)for(const n of t)if($w(this.getAllContainersFromDropTarget(n)).indexOf(o)!==-1)return n;return null}enterDragTargetIfExists(e,t,i,s,r){if(e&&e.onDragEnter){const o=this.createDropTargetEvent(e,t,i,s,r);e.onDragEnter(o)}}leaveLastTargetIfExists(e,t,i,s){if(!this.lastDropTarget)return;if(this.lastDropTarget.onDragLeave){const o=this.createDropTargetEvent(this.lastDropTarget,e,t,i,s);this.lastDropTarget.onDragLeave(o)}const r=this.getDragAndDropImageComponent();r&&r.setIcon(null)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(i=>i.external).find(i=>i.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){const i=this.ctrlsService.getGridBodyCtrl().getGui(),{dropZoneTarget:s}=e;return i.contains(s)}getHorizontalDirection(e){const t=this.eventLastTime&&this.eventLastTime.clientX,i=e.clientX;return t===i?null:t>i?0:1}getVerticalDirection(e){const t=this.eventLastTime&&this.eventLastTime.clientY,i=e.clientY;return t===i?null:t>i?0:1}createDropTargetEvent(e,t,i,s,r){const o=e.getContainer(),n=o.getBoundingClientRect(),{dragItem:l,dragSource:a}=this,c=t.clientX-n.left,u=t.clientY-n.top;return this.gos.addGridCommonParams({event:t,x:c,y:u,vDirection:s,hDirection:i,dragSource:a,fromNudge:r,dragItem:l,dropZoneTarget:o})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();if(!t)return;const i=t.getGui(),r=i.getBoundingClientRect().height,o=US()-2,n=jS()-2;if(!i.offsetParent)return;const a=Bf(i.offsetParent),{clientY:c,clientX:u}=e;let d=c-a.top-r/2,h=u-a.left-10;const g=Se(this.gos),v=g.defaultView||window,w=v.pageYOffset||g.documentElement.scrollTop,S=v.pageXOffset||g.documentElement.scrollLeft;o>0&&h+i.clientWidth>o+S&&(h=o+S-i.clientWidth),h<0&&(h=0),n>0&&d+i.clientHeight>n+w&&(d=n+w-i.clientHeight),d<0&&(d=0),i.style.left=`${h}px`,i.style.top=`${d}px`}removeDragAndDropImageComponent(){if(this.dragAndDropImageComp){const{comp:e}=this.dragAndDropImageComp;if(e){const t=e.getGui();this.dragAndDropImageParent&&this.dragAndDropImageParent.removeChild(t),this.destroyBean(e)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e}=this;if(!e)return;const i=this.userComponentFactory.getDragAndDropImageCompDetails({dragSource:e}).newAgStackInstance();this.dragAndDropImageComp={promise:i},i.then(s=>{!s||!this.isAlive()||(this.processDragAndDropImageComponent(s),this.dragAndDropImageComp.comp=s)})}processDragAndDropImageComponent(e){const{dragSource:t,mouseEventService:i,environment:s}=this;if(!t)return;const r=e.getGui();r.style.setProperty("position","absolute"),r.style.setProperty("z-index","9999"),i.stampTopLevelGridCompWithGridInstance(r),s.applyThemeClasses(r),e.setIcon(null);let{dragItemName:o}=t;Au(o)&&(o=o()),e.setLabel(o||""),r.style.top="20px",r.style.left="20px";const n=Se(this.gos);let l=null,a=null;try{l=n.fullscreenElement}catch{}finally{l||(l=yo(this.gos));const c=l.querySelector("body");c?a=c:l instanceof ShadowRoot?a=l:l instanceof Document?a=l==null?void 0:l.documentElement:a=l}this.dragAndDropImageParent=a,a?a.appendChild(r):D("Could not find document body, it is needed for drag and drop.")}},By=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.indexOf("x")!==-1,this.scrollVertically=e.scrollAxis.indexOf("y")!==-1,this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){const i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;const s=this.scrollContainer.getBoundingClientRect(),r=this.scrollByTick;this.tickLeft=e.clientX<s.left+r,this.tickRight=e.clientX>s.right-r,this.tickUp=e.clientY<s.top+r&&!i,this.tickDown=e.clientY>s.bottom-r&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},Vy=class extends P{wireBeans(e){this.dragAndDropService=e.dragAndDropService,this.rowModel=e.rowModel,this.pageBoundsService=e.pageBoundsService,this.focusService=e.focusService,this.sortController=e.sortController,this.filterManager=e.filterManager,this.selectionService=e.selectionService,this.mouseEventService=e.mouseEventService,this.ctrlsService=e.ctrlsService,this.funcColsService=e.funcColsService,this.rangeService=e.rangeService}constructor(e){super(),this.eContainer=e}postConstruct(){ae(this.gos)&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(this,e=>{const t=e.gridBodyCtrl;this.autoScrollService=new By({scrollContainer:t.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:()=>t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:i=>t.getScrollFeature().setVerticalScrollPosition(i),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){var s;return!!(this.funcColsService.getRowGroupColumns().length||((s=this.filterManager)==null?void 0:s.isAnyFilterPresent())||this.sortController.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const s=[...this.selectionService.getSelectedNodes()].sort((r,o)=>r.rowIndex==null||o.rowIndex==null?0:this.getRowIndexNumber(r)-this.getRowIndexNumber(o));if(s.indexOf(t)!==-1)return s}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent("rowDragEnter",e),this.getRowNodes(e).forEach(t=>{t.setDragging(!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){const{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey()}onEnterOrDragging(e){this.dispatchGridEvent("rowDragMove",e),this.lastDraggingEvent=e;const t=this.mouseEventService.getNormalisedPosition(e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){const i=this.isFromThisGrid(e),s=this.gos.get("rowDragManaged"),r=e.dragItem.rowNodes;s&&this.shouldPreventRowMove()||(this.gos.get("suppressMoveWhenRowDragging")||!i?this.dragAndDropService.isDropZoneWithinThisGrid(e)&&this.clientSideRowModel.highlightRowAtPixel(r[0],t):this.moveRows(r,t))}getRowIndexNumber(e){const t=e.getRowIndexString();return parseInt(j(t.split("-")),10)}moveRowAndClearHighlight(e){const t=this.clientSideRowModel.getLastHighlightedRowNode(),i=t&&t.highlighted===1,s=this.mouseEventService.getNormalisedPosition(e).y,r=e.dragItem.rowNodes;let o=i?1:0;if(this.isFromThisGrid(e))r.forEach(n=>{n.rowTop<s&&(o-=1)}),this.moveRows(r,s,o);else{const n=fr(this.gos);let l=this.clientSideRowModel.getRowIndexAtPixel(s)+1;this.clientSideRowModel.getHighlightPosition(s)===0&&l--,this.clientSideRowModel.updateRowData({add:r.filter(a=>!this.clientSideRowModel.getRowNode((n==null?void 0:n({data:a.data,level:0,rowPinned:a.rowPinned}))??a.data.id)).map(a=>a.data),addIndex:l})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t,i=0){var r;this.clientSideRowModel.ensureRowsAtPixel(e,t,i)&&(this.focusService.clearFocusedCell(),(r=this.rangeService)==null||r.removeAllCellRanges())}addRowDropZone(e){if(!e.getContainer()){D("addRowDropZone - A container target needs to be provided");return}if(this.dragAndDropService.findExternalZone(e)){D("addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");return}let t={getContainer:e.getContainer};e.fromGrid?t=e:(e.onDragEnter&&(t.onDragEnter=s=>{e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",s))}),e.onDragLeave&&(t.onDragLeave=s=>{e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",s))}),e.onDragging&&(t.onDragging=s=>{e.onDragging(this.draggingToRowDragEvent("rowDragMove",s))}),e.onDragStop&&(t.onDragStop=s=>{e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",s))}),e.onDragCancel&&(t.onDragCancel=s=>{e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",s))}));const i={isInterestedIn:s=>s===2,getIconName:()=>"move",external:!0,...t};this.dragAndDropService.addDropTarget(i),this.addDestroyFunc(()=>this.dragAndDropService.removeDropTarget(i))}getRowDropZone(e){const t=this.getContainer.bind(this),i=this.onDragEnter.bind(this),s=this.onDragLeave.bind(this),r=this.onDragging.bind(this),o=this.onDragStop.bind(this),n=this.onDragCancel.bind(this);let l;return e?l={getContainer:t,onDragEnter:e.onDragEnter?a=>{i(a),e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",a))}:i,onDragLeave:e.onDragLeave?a=>{s(a),e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",a))}:s,onDragging:e.onDragging?a=>{r(a),e.onDragging(this.draggingToRowDragEvent("rowDragMove",a))}:r,onDragStop:e.onDragStop?a=>{o(a),e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",a))}:o,onDragCancel:e.onDragCancel?a=>{n(a),e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",a))}:n,fromGrid:!0}:l={getContainer:t,onDragEnter:i,onDragLeave:s,onDragging:r,onDragStop:o,onDragCancel:n,fromGrid:!0},l}draggingToRowDragEvent(e,t){const i=this.mouseEventService.getNormalisedPosition(t).y,s=i>this.pageBoundsService.getCurrentPageHeight();let r=-1,o;s||(r=this.rowModel.getRowIndexAtPixel(i),o=this.rowModel.getRow(r));let n;switch(t.vDirection){case 1:n="down";break;case 0:n="up";break;default:n=null;break}return this.gos.addGridCommonParams({type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:r,overNode:o,y:i,vDirection:n})}dispatchGridEvent(e,t){const i=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent("rowDragEnd",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&(this.gos.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&this.dragAndDropService.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&(this.gos.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&this.dragAndDropService.isDropZoneWithinThisGrid(e)&&this.clearRowHighlight()}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(t=>{t.setDragging(!1)})}},zy=class extends P{constructor(){super(...arguments),this.beanName="dragService",this.dragEndFunctions=[],this.dragSources=[]}wireBeans(e){this.mouseEventService=e.mouseEventService}destroy(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0,super.destroy()}removeListener(e){const t=e.dragSource.eElement,i=e.mouseDownListener;if(t.removeEventListener("mousedown",i),e.touchEnabled){const s=e.touchStartListener;t.removeEventListener("touchstart",s,{passive:!0})}}removeDragSource(e){const t=this.dragSources.find(i=>i.dragSource===e);t&&(this.removeListener(t),Xe(this.dragSources,t))}isDragging(){return this.dragging}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:i,includeTouch:s,stopPropagationForTouch:r}=e;i.addEventListener("mousedown",t);let o=null;const n=this.gos.get("suppressTouch");s&&!n&&(o=l=>{Bu(l.target)||(r&&l.stopPropagation(),this.onTouchStart(e,l))},i.addEventListener("touchstart",o,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:o,touchEnabled:!!s})}getStartTarget(){return this.startTarget}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const i=t.touches[0];this.touchLastTime=i,this.touchStart=i;const s=a=>this.onTouchMove(a,e.eElement),r=a=>this.onTouchUp(a,e.eElement),o=a=>{a.cancelable&&a.preventDefault()},n=t.target,l=[{target:yo(this.gos),type:"touchmove",listener:o,options:{passive:!1}},{target:n,type:"touchmove",listener:s,options:{passive:!0}},{target:n,type:"touchend",listener:r,options:{passive:!0}},{target:n,type:"touchcancel",listener:r,options:{passive:!0}}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onCommonMove(i,this.touchStart,e.eElement)}onMouseDown(e,t){const i=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||i._alreadyProcessedByDragService||(i._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const s=c=>this.onMouseMove(c,e.eElement),r=c=>this.onMouseUp(c,e.eElement),o=c=>c.preventDefault(),n=c=>{c.key===x.ESCAPE&&this.cancelDrag(e.eElement)},l=yo(this.gos),a=[{target:l,type:"mousemove",listener:s},{target:l,type:"mouseup",listener:r},{target:l,type:"contextmenu",listener:o},{target:l,type:"keydown",listener:n}];this.addTemporaryEvents(a),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:i,type:s,listener:r,options:o}=t;i.addEventListener(s,r,o)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:i,type:s,listener:r,options:o}=t;i.removeEventListener(s,r,o)})})}isEventNearStartEvent(e,t){const{dragStartPixels:i}=this.currentDragParams,s=M(i)?i:4;return Qf(e,t,s)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,i){var s;if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;if(this.dragging=!0,this.eventService.dispatchEvent({type:"dragStarted",target:i}),this.currentDragParams.onDragStart(t),!this.currentDragParams){this.dragging=!1;return}this.currentDragParams.onDragging(t)}(s=this.currentDragParams)==null||s.onDragging(e)}onTouchMove(e,t){const i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t)}onMouseMove(e,t){var i;fi()&&((i=Se(this.gos).getSelection())==null||i.removeAllRanges()),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const t=this.gos.get("enableCellTextSelection"),i=e.type==="mousemove";return t&&i&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e)}isOverFormFieldElement(e){const t=e.target,i=t==null?void 0:t.tagName.toLocaleLowerCase();return!!(i!=null&&i.match("^a$|textarea|input|select|button"))}onTouchUp(e,t){let i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventService.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){var t,i;this.eventService.dispatchEvent({type:"dragCancelled",target:e}),(i=(t=this.currentDragParams)==null?void 0:t.onDragCancel)==null||i.call(t),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach(e=>e()),this.dragEndFunctions.length=0}},Dc=class extends re{constructor(e,t,i,s,r,o){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=s,this.dragStartPixels=r,this.suppressVisibilityChange=o,this.dragSource=null}wireBeans(e){this.beans=e}isCustomGui(){return this.customGui!=null}postConstruct(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate('<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>'),this.getGui().appendChild(ut("rowDrag",this.gos,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){const e=this.gos.get("rowDragManaged")?new _y(this,this.beans,this.rowNode,this.column):new Wy(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}getSelectedNodes(){if(!this.gos.get("rowDragMultiRow"))return[this.rowNode];const t=this.beans.selectionService.getSelectedNodes();return t.indexOf(this.rowNode)!==-1?t:[this.rowNode]}checkCompatibility(){const e=this.gos.get("rowDragManaged");this.gos.get("treeData")&&e&&D("If using row drag with tree data, you cannot have rowDragManaged=true")}getDragItem(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){const t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gos.get("rowDragText")}addDragSource(e=4){this.dragSource&&this.removeDragSource();const t=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(t,{mousedown:s=>{s==null||s.preventDefault()}})[0]);const i=this.localeService.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:()=>{var n;const s=this.getDragItem(),r=((n=s.rowNodes)==null?void 0:n.length)||1,o=this.getRowDragText(this.column);return o?o(s,r):r===1?this.cellValueFn():`${r} ${i("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},im=class extends P{constructor(e,t,i){super(),this.parent=e,this.rowNode=t,this.column=i}setDisplayedOrVisible(e){const t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{let i=!0,s=!1;this.column&&(i=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),s=Au(this.column.getColDef().rowDrag)),s?(this.parent.setDisplayed(!0,t),this.parent.setVisible(i,t)):(this.parent.setDisplayed(i,t),this.parent.setVisible(!0,t))}}},Wy=class extends im{constructor(e,t,i,s){super(e,i,s),this.beans=t}postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this));const e=this.workOutVisibility.bind(this);this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedListeners(this.beans.eventService,{newColumnsLoaded:e}),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e)}},_y=class extends im{constructor(e,t,i,s){super(e,i,s),this.beans=t}postConstruct(){const e=this.workOutVisibility.bind(this);this.addManagedListeners(this.beans.eventService,{sortChanged:e,filterChanged:e,columnRowGroupChanged:e,newColumnsLoaded:e}),this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const t=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature(),i=t&&t.shouldPreventRowMove(),s=this.gos.get("suppressRowDrag"),r=this.beans.dragAndDropService.hasExternalDropZones(),o=i&&!r||s;this.setDisplayedOrVisible(o)}},Uy=new Set(["localEventService","__objectId","sticky","__autoHeights","checkAutoHeightsDebounced"]),Lo=class bi{constructor(t){this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped={},this.treeNode=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=bi.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.selected=!1,this.beans=t}setData(t){this.setDataCommon(t,!1)}updateData(t){this.setDataCommon(t,!0)}setDataCommon(t,i){var o;const s=this.data;this.data=t,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();const r=this.createDataChangedEvent(t,s,i);(o=this.localEventService)==null||o.dispatchEvent(r)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(t,i,s){return{type:"dataChanged",node:this,oldData:i,newData:t,update:s}}getRowIndexString(){return this.rowIndex==null?($("Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid."),null):this.rowPinned==="top"?bi.ID_PREFIX_TOP_PINNED+this.rowIndex:this.rowPinned==="bottom"?bi.ID_PREFIX_BOTTOM_PINNED+this.rowIndex:this.rowIndex.toString()}createDaemonNode(){const t=new bi(this.beans);return t.id=this.id,t.data=this.data,t.__daemon=!0,t.selected=this.selected,t.level=this.level,t}setDataAndId(t,i){var n;const s=M(this.id)?this.createDaemonNode():null,r=this.data;this.data=t,this.updateDataOnDetailNode(),this.setId(i),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,s);const o=this.createDataChangedEvent(t,r,!1);(n=this.localEventService)==null||n.dispatchEvent(o)}checkRowSelectable(){const t=Iu(this.beans.gos);this.setRowSelectable(t?t(this):!0)}setRowSelectable(t,i){if(this.selectable!==t){if(this.selectable=t,this.dispatchRowEvent("selectableChanged"),i)return;if(Ss(this.beans.gos)){const r=this.calculateSelectedFromChildren();this.setSelectedParams({newValue:r??!1,source:"selectableChanged"});return}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"})}}setId(t){var s;const i=fr(this.beans.gos);if(i)if(this.data){const r=((s=this.parent)==null?void 0:s.getRoute())??[];this.id=i({data:this.data,parentKeys:r.length>0?r:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(bi.ID_PREFIX_ROW_GROUP)&&$(`Row IDs cannot start with ${bi.ID_PREFIX_ROW_GROUP}, this is a reserved prefix for AG Grid's row grouping feature.`)}else this.id=void 0;else this.id=t}setRowTop(t){this.oldRowTop=this.rowTop,this.rowTop!==t&&(this.rowTop=t,this.dispatchRowEvent("topChanged"),this.setDisplayed(t!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(t){this.hovered=t}isHovered(){return this.hovered}setMaster(t){this.master!==t&&(this.master&&!t&&(this.expanded=!1),this.master=t,this.dispatchRowEvent("masterChanged"))}setGroup(t){this.group!==t&&(this.group&&!t&&(this.expanded=!1),this.group=t,this.updateHasChildren(),this.checkRowSelectable(),this.dispatchRowEvent("groupChanged"))}setRowHeight(t,i=!1){this.rowHeight=t,this.rowHeightEstimated=i,this.dispatchRowEvent("heightChanged")}setRowAutoHeight(t,i){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[i.getId()]=t,t!=null&&(this.checkAutoHeightsDebounced==null&&(this.checkAutoHeightsDebounced=qe(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())}checkAutoHeights(){var l;let t=!1,i=!0,s=0;const r=this.__autoHeights;if(r==null||(this.beans.visibleColsService.getAllAutoHeightCols().forEach(a=>{let c=r[a.getId()];if(c==null)if(this.beans.columnModel.isColSpanActive()){let u=[];switch(a.getPinned()){case"left":u=this.beans.visibleColsService.getLeftColsForRow(this);break;case"right":u=this.beans.visibleColsService.getRightColsForRow(this);break;case null:u=this.beans.columnViewportService.getColsWithinViewport(this);break}if(u.includes(a)){t=!0;return}c=-1}else{t=!0;return}else i=!1;c>s&&(s=c)}),t)||((i||s<10)&&(s=zi(this.beans.gos,this).height),s==this.rowHeight))return;this.setRowHeight(s);const n=this.beans.rowModel;(l=n.onRowHeightChangedDebounced)==null||l.call(n)}setExpanded(t,i,s){if(this.expanded===t)return;this.expanded=t,this.dispatchRowEvent("expandedChanged");const r={...this.createGlobalRowEvent("rowGroupOpened"),expanded:t,event:i||null};this.beans.rowNodeEventThrottle.dispatchExpanded(r,s),this.beans.rowRenderer.refreshCells({rowNodes:[this]})}createGlobalRowEvent(t){return this.beans.gos.addGridCommonParams({type:t,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned})}setDataValue(t,i,s){const o=typeof t!="string"?t:this.beans.columnModel.getCol(t)??this.beans.columnModel.getColDefCol(t),n=this.beans.valueService.getValueForDisplay(o,this);if(this.beans.gos.get("readOnlyEdit"))return this.beans.eventService.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:o,colDef:o.getColDef(),data:this.data,node:this,oldValue:n,newValue:i,value:i,source:s}),!1;const l=this.beans.valueService.setValue(this,o,i,s);return this.dispatchCellChangedEvent(o,i,n),this.checkRowSelectable(),l}setGroupValue(t,i){const s=this.beans.columnModel.getCol(t);K(this.groupData)&&(this.groupData={});const r=s.getColId(),o=this.groupData[r];o!==i&&(this.groupData[r]=i,this.dispatchCellChangedEvent(s,i,o))}setAggData(t){const i=this.aggData;if(this.aggData=t,this.localEventService){const s=r=>{const o=this.aggData?this.aggData[r]:void 0,n=i?i[r]:void 0;if(o===n)return;const l=this.beans.columnModel.getCol(r);l&&this.dispatchCellChangedEvent(l,o,n)};for(const r in i)s(r);for(const r in t)(!i||!(r in i))&&s(r)}}updateHasChildren(){let t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(Xt(this.beans.gos)){const s=this.beans.gos.get("treeData"),r=this.beans.gos.get("isServerSideGroup");t=!this.stub&&!this.footer&&(s?!!r&&r(this.data):!!this.group)}t!==this.__hasChildren&&(this.__hasChildren=!!t,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(t,i,s){var o;const r={type:"cellChanged",node:this,column:t,newValue:i,oldValue:s};(o=this.localEventService)==null||o.dispatchEvent(r)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.footer?!1:this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||!!this.master}isSelected(){return this.footer?this.sibling.isSelected():this.selected}depthFirstSearch(t){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(i=>i.depthFirstSearch(t)),t(this)}calculateSelectedFromChildren(){var s;let t=!1,i=!1;if(!((s=this.childrenAfterGroup)!=null&&s.length))return this.selectable?this.selected:null;for(let r=0;r<this.childrenAfterGroup.length;r++){const o=this.childrenAfterGroup[r];let n=o.isSelected();if(!o.selectable){const l=o.calculateSelectedFromChildren();if(l===null)continue;n=l}switch(n){case!0:t=!0;break;case!1:i=!0;break;default:return}}if(!(t&&i))return t?!0:i?!1:this.selectable?this.selected:null}setSelectedInitialValue(t){this.selected=t}dispatchRowEvent(t){var i;(i=this.localEventService)==null||i.dispatchEvent({type:t,node:this})}selectThisNode(t,i,s="api"){const r=!this.selectable&&t,o=this.selected===t;if(r||o)return!1;this.selected=t,this.dispatchRowEvent("rowSelected");const n=this.sibling;return n&&n.footer&&n.localEventService&&n.dispatchRowEvent("rowSelected"),this.beans.eventService.dispatchEvent({...this.createGlobalRowEvent("rowSelected"),event:i||null,source:s}),!0}setSelected(t,i=!1,s="api"){if(typeof s=="boolean"){D("since version v30, rowNode.setSelected() property `suppressFinishActions` has been removed, please use `gridApi.setNodesSelected()` for bulk actions, and the event `source` property for ignoring events instead.");return}this.setSelectedParams({newValue:t,clearSelection:i,rangeSelect:!1,source:s})}setSelectedParams(t){return this.rowPinned?(D("cannot select pinned rows"),0):this.id===void 0?(D("cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected({...t,nodes:[this.footer?this.sibling:this]})}isRowPinned(){return!!this.rowPinned}addEventListener(t,i){var r;this.localEventService||(this.localEventService=new pr),this.beans.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.localEventService.setFrameworkOverrides(this.beans.frameworkOverrides),this.frameworkEventListenerService=new Gu(this.beans.frameworkOverrides));const s=((r=this.frameworkEventListenerService)==null?void 0:r.wrap(t,i))??i;this.localEventService.addEventListener(t,s)}removeEventListener(t,i){var r;if(!this.localEventService)return;const s=((r=this.frameworkEventListenerService)==null?void 0:r.unwrap(t,i))??i;this.localEventService.removeEventListener(t,s),this.localEventService.noRegisteredListenersExist()&&(this.localEventService=null)}onMouseEnter(){this.dispatchRowEvent("mouseEnter")}onMouseLeave(){this.dispatchRowEvent("mouseLeave")}isFullWidthCell(){if(D("since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option."),this.detail)return!0;const t=this.beans.gos.getCallback("isFullWidthRow");return t?t({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const t=[];let i=this;for(;i&&i.key!=null;)t.push(i.key),i=i.parent;return t.reverse()}createFooter(){if(this.sibling)return;const t=new bi(this.beans);Object.keys(this).forEach(i=>{Uy.has(i)||(t[i]=this[i])}),t.footer=!0,t.setRowTop(null),t.setRowIndex(null),t.oldRowTop=null,t.id="rowGroupFooter_"+this.id,t.sibling=this,this.sibling=t}destroyFooter(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0)}setFirstChild(t){this.firstChild!==t&&(this.firstChild=t,this.dispatchRowEvent("firstChildChanged"))}setLastChild(t){this.lastChild!==t&&(this.lastChild=t,this.dispatchRowEvent("lastChildChanged"))}setChildIndex(t){this.childIndex!==t&&(this.childIndex=t,this.dispatchRowEvent("childIndexChanged"))}setDisplayed(t){this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}setDragging(t){this.dragging!==t&&(this.dragging=t,this.dispatchRowEvent("draggingChanged"))}setHighlighted(t){this.highlighted!==t&&(this.highlighted=t,this.dispatchRowEvent("rowHighlightChanged"))}setAllChildrenCount(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.dispatchRowEvent("allChildrenCountChanged"))}setRowIndex(t){this.rowIndex!==t&&(this.rowIndex=t,this.dispatchRowEvent("rowIndexChanged"))}setUiLevel(t){this.uiLevel!==t&&(this.uiLevel=t,this.dispatchRowEvent("uiLevelChanged"))}};Lo.ID_PREFIX_ROW_GROUP="row-group-";Lo.ID_PREFIX_TOP_PINNED="t-";Lo.ID_PREFIX_BOTTOM_PINNED="b-";Lo.OBJECT_ID_SEQUENCE=0;var ai=Lo,jy=class extends P{constructor(){super(...arguments),this.beanName="filterManager",this.advancedFilterModelUpdateQueue=[]}wireBeans(e){this.columnModel=e.columnModel,this.dataTypeService=e.dataTypeService,this.quickFilterService=e.quickFilterService,this.advancedFilterService=e.advancedFilterService,this.columnFilterService=e.columnFilterService}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvancedFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvancedFilterEnabledChanged(i),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.addManagedPropertyListener("advancedFilterModel",i=>this.setAdvancedFilterModel(i.currentValue)),this.quickFilterService&&this.addManagedListeners(this.quickFilterService,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"?e({}):!1}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"?t(e):!1}setFilterModel(e,t="api"){var i;if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}(i=this.columnFilterService)==null||i.setFilterModel(e,t)}getFilterModel(){var e;return((e=this.columnFilterService)==null?void 0:e.getFilterModel())??{}}isColumnFilterPresent(){var e;return!!((e=this.columnFilterService)!=null&&e.isColumnFilterPresent())}isAggregateFilterPresent(){var e;return!!((e=this.columnFilterService)!=null&&e.isAggregateFilterPresent())}isExternalFilterPresent(){return this.externalFilterPresent}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}isAdvancedFilterPresent(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()}onAdvancedFilterEnabledChanged(e){var t,i;e?(t=this.columnFilterService)!=null&&t.disableColumnFilters()&&this.onFilterChanged({source:"advancedFilter"}):(i=this.advancedFilterService)!=null&&i.isFilterPresent()&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvancedFilterEnabled(){var e;return!!((e=this.advancedFilterService)!=null&&e.isEnabled())}isAdvancedFilterHeaderActive(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()}isAnyFilterPresent(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}resetQuickFilterCache(){var e;(e=this.quickFilterService)==null||e.resetQuickFilterCache()}refreshFiltersForAggregations(){Cc(this.gos)&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:i,columns:s=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.columnFilterService?this.columnFilterService.updateBeforeFilterChanged(e):we.resolve()).then(()=>{var o;const r={source:t,type:"filterChanged",columns:s};i&&Qe(r,i),this.eventService.dispatchEvent(r),(o=this.columnFilterService)==null||o.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){var e;return!!((e=this.columnFilterService)!=null&&e.isSuppressFlashingCellsBecauseFiltering())}isQuickFilterPresent(){var e;return!!((e=this.quickFilterService)!=null&&e.isQuickFilterPresent())}updateAggFiltering(){this.aggFiltering=!!Cc(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.columnModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){return!(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isAggregateFilterPresent()&&!this.columnFilterService.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))}doesRowPassFilter(e){return!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isExternalFilterPresent()&&!this.doesExternalFilterPass(e.rowNode)||this.isColumnFilterPresent()&&!this.columnFilterService.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip)||this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(e.rowNode))}isFilterActive(e){var t;return!!((t=this.columnFilterService)!=null&&t.isFilterActive(e))}getOrCreateFilterWrapper(e){var t;return((t=this.columnFilterService)==null?void 0:t.getOrCreateFilterWrapper(e))??null}getDefaultFloatingFilter(e){return this.columnFilterService.getDefaultFloatingFilter(e)}createFilterParams(e,t){return this.columnFilterService.createFilterParams(e,t)}isFilterAllowed(e){var t;return this.isAdvancedFilterEnabled()?!1:!!((t=this.columnFilterService)!=null&&t.isFilterAllowed(e))}getFloatingFilterCompDetails(e,t){var i;return(i=this.columnFilterService)==null?void 0:i.getFloatingFilterCompDetails(e,t)}getCurrentFloatingFilterParentModel(e){var t;return(t=this.columnFilterService)==null?void 0:t.getCurrentFloatingFilterParentModel(e)}destroyFilter(e,t="api"){var i;(i=this.columnFilterService)==null||i.destroyFilter(e,t)}areFilterCompsDifferent(e,t){var i;return!!((i=this.columnFilterService)!=null&&i.areFilterCompsDifferent(e,t))}getAdvancedFilterModel(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null}setAdvancedFilterModel(e){var t;if(this.isAdvancedFilterEnabled()){if((t=this.dataTypeService)!=null&&t.isPendingInference()){this.advancedFilterModelUpdateQueue.push(e);return}this.advancedFilterService.setModel(e??null),this.onFilterChanged({source:"advancedFilter"})}}toggleAdvancedFilterBuilder(e,t){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvancedFilterColumns(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){var e;return this.isAdvancedFilterEnabled()?!1:!!((e=this.columnFilterService)!=null&&e.hasFloatingFilters())}getFilterInstance(e,t){var i;if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}return(i=this.columnFilterService)==null?void 0:i.getFilterInstance(e,t)}getColumnFilterInstance(e){var t;return this.isAdvancedFilterEnabled()?(this.warnAdvancedFilters(),Promise.resolve(void 0)):((t=this.columnFilterService)==null?void 0:t.getColumnFilterInstance(e))??Promise.resolve(void 0)}warnAdvancedFilters(){D("Column Filter API methods have been disabled as Advanced Filters are enabled.")}setupAdvancedFilterHeaderComp(e){var t;(t=this.advancedFilterService)==null||t.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvancedFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.advancedFilterModelUpdateQueue.forEach(e=>this.setAdvancedFilterModel(e)),this.advancedFilterModelUpdateQueue=[]}getColumnFilterModel(e){var t;return(t=this.columnFilterService)==null?void 0:t.getColumnFilterModel(e)}setColumnFilterModel(e,t){var i;return this.isAdvancedFilterEnabled()?(this.warnAdvancedFilters(),Promise.resolve()):((i=this.columnFilterService)==null?void 0:i.setColumnFilterModel(e,t))??Promise.resolve()}setColDefPropertiesForDataType(e,t,i){var s;(s=this.columnFilterService)==null||s.setColDefPropertiesForDataType(e,t,i)}},Ky=class extends re{constructor(e,t){super('<div class="ag-filter"></div>'),this.column=e,this.source=t,this.filterWrapper=null}wireBeans(e){this.filterManager=e.filterManager,this.columnModel=e.columnModel}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){var e;return((e=this.filterWrapper)==null?void 0:e.filterPromise)??null}afterInit(){var e,t;return((t=(e=this.filterWrapper)==null?void 0:e.filterPromise)==null?void 0:t.then(()=>{}))??we.resolve()}afterGuiAttached(e){var t,i;(i=(t=this.filterWrapper)==null?void 0:t.filterPromise)==null||i.then(s=>{var r;(r=s==null?void 0:s.afterGuiAttached)==null||r.call(s,e)})}afterGuiDetached(){var e,t;(t=(e=this.filterWrapper)==null?void 0:e.filterPromise)==null||t.then(i=>{var s;(s=i==null?void 0:i.afterGuiDetached)==null||s.call(i)})}createFilter(e){var s,r;const{column:t,source:i}=this;this.filterWrapper=((s=this.filterManager)==null?void 0:s.getOrCreateFilterWrapper(t))??null,(r=this.filterWrapper)!=null&&r.filterPromise&&this.filterWrapper.filterPromise.then(o=>{const n=o.getGui();M(n)||D(`getGui method from filter returned ${n}; it should be a DOM element.`),this.appendChild(n),e&&this.eventService.dispatchEvent({type:"filterOpened",column:t,source:i,eGui:this.getGui()})})}onFilterDestroyed(e){(e.source==="api"||e.source==="paramsUpdated")&&e.column.getId()===this.column.getId()&&this.columnModel.getColDefCol(this.column)&&(pt(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},sm="ag-resizer-wrapper",Si=(e,t)=>`<div data-ref="${e}Resizer" class="ag-resizer ag-resizer-${t}"></div>`,$y=`<div class="${sm}">
        ${Si("eTopLeft","topLeft")}
        ${Si("eTop","top")}
        ${Si("eTopRight","topRight")}
        ${Si("eRight","right")}
        ${Si("eBottomRight","bottomRight")}
        ${Si("eBottom","bottom")}
        ${Si("eBottomLeft","bottomLeft")}
        ${Si("eLeft","left")}
    </div>`,Yy=class extends P{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupService=e.popupService,this.resizeObserverService=e.resizeObserverService,this.dragService=e.dragService}center(){const{clientHeight:e,clientWidth:t}=this.offsetParent,i=t/2-this.getWidth()/2,s=e/2-this.getHeight()/2;this.offsetElement(i,s)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:i,width:s,minHeight:r,height:o,x:n,y:l}=this.config;this.offsetParent||this.setOffsetParent();let a=0,c=0;const u=qt(this.element);if(u){const d=this.findBoundaryElement(),h=window.getComputedStyle(d);if(h.minWidth!=null){const g=d.offsetWidth-this.element.offsetWidth;c=parseInt(h.minWidth,10)-g}if(h.minHeight!=null){const g=d.offsetHeight-this.element.offsetHeight;a=parseInt(h.minHeight,10)-g}}if(this.minHeight=r||a,this.minWidth=i||c,s&&this.setWidth(s),o&&this.setHeight(o),(!s||!o)&&this.refreshSize(),e)this.center();else if(n||l)this.offsetElement(n,l);else if(u&&t){let d=this.boundaryEl,h=!0;if(d||(d=this.findBoundaryElement(),h=!1),d){const g=parseFloat(d.style.top),v=parseFloat(d.style.left);h?this.offsetElement(isNaN(v)?0:v,isNaN(g)?0:g):this.setPosition(v,g)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const i=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(i),this.moveElementDragListener=i):(this.dragService.removeDragSource(i),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{const s=!!e[t],r=this.getResizerElement(t),o={dragStartPixels:0,eElement:r,onDragStart:n=>this.onResizeStart(n,t),onDragging:this.onResize.bind(this),onDragStop:n=>this.onResizeEnd(n,t)};(s||!this.isAlive()&&!s)&&(s?(this.dragService.addDragSource(o),this.resizeListeners.push(o),r.style.pointerEvents="all"):r.style.pointerEvents="none",this.resizable[t]=s)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,i=this.element;let s=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Xr(i,e),e=Hf(i),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const r=this.getAvailableHeight();r&&e>r&&(e=r)}this.getHeight()!==e&&(s?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?Xr(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:i}=this.offsetParent;if(!i)return null;const s=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),o=e?this.position.y:s.top,n=e?0:r.top;let l=0;if(t){const c=this.element.parentElement;if(c){const{bottom:u}=c.getBoundingClientRect();l=u-s.bottom}}return i+n-o-l}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:i}=this.config;let s=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Nt(t,e),e=tl(t),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:r}=this.offsetParent,o=i?this.position.x:this.element.getBoundingClientRect().left;r&&e+o>r&&(e=r-o)}this.getWidth()!==e&&(s?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Nt(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))}offsetElement(e=0,t=0){const{forcePopupParentAsOffsetParent:i}=this.config,s=i?this.boundaryEl:this.element;s&&(this.popupService.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(s.style.left),parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const i=this.getAvailableHeight();this.element.style.setProperty("max-height",`${i}px`)};e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),t):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:i,isTop:s,anywhereWithin:r,topBuffer:o}=e,n=t.clientX-this.dragStartPosition.x,l=t.clientY-this.dragStartPosition.y,a=this.shouldSkipX(t,!!i,!!r,n)?0:n,c=this.shouldSkipY(t,!!s,o,l)?0:l;return{movementX:a,movementY:c}}shouldSkipX(e,t,i,s){const r=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.x:r.left;let a=l<=0&&o.left>=e.clientX||o.right<=e.clientX&&o.right<=n.right;return a?!0:(t?a=s<0&&e.clientX>l+o.left||s>0&&e.clientX<l+o.left:i?a=s<0&&e.clientX>n.right||s>0&&e.clientX<l+o.left:a=s<0&&e.clientX>n.right||s>0&&e.clientX<n.right,a)}shouldSkipY(e,t,i=0,s){const r=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.y:r.top;let a=l<=0&&o.top>=e.clientY||o.bottom<=e.clientY&&o.bottom<=n.bottom;return a?!0:(t?a=s<0&&e.clientY>l+o.top+i||s>0&&e.clientY<l+o.top:a=s<0&&e.clientY>n.bottom||s>0&&e.clientY<n.bottom,a)}createResizeMap(){const e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[data-ref=eTopLeftResizer]")},top:{element:e.querySelector("[data-ref=eTopResizer]")},topRight:{element:e.querySelector("[data-ref=eTopRightResizer]")},right:{element:e.querySelector("[data-ref=eRightResizer]")},bottomRight:{element:e.querySelector("[data-ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[data-ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[data-ref=eBottomLeftResizer]")},left:{element:e.querySelector("[data-ref=eLeftResizer]")}}}addResizers(){if(this.resizersAdded)return;const e=this.element;if(!e)return;const i=new DOMParser().parseFromString($y,"text/html").body;e.appendChild(i.firstChild),this.createResizeMap(),this.resizersAdded=!0}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${sm}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:i,forcePopupParentAsOffsetParent:s}=this.config;!i&&!s&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(i=>!i.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,i=0;for(let s=0;s<e.length;s++){const r=e[s],o=!!r.style.flex&&r.style.flex!=="0 0 auto";if(r===this.element)continue;let n=this.minHeight||0,l=this.minWidth||0;if(o){const a=window.getComputedStyle(r);a.minHeight&&(n=parseInt(a.minHeight,10)),a.minWidth&&(l=parseInt(a.minWidth,10))}else n=r.offsetHeight,l=r.offsetWidth;t+=n,i+=l}return{height:t,width:i}}applySizeToSiblings(e){let t=null;const i=this.getSiblings();if(i){for(let s=0;s<i.length;s++){const r=i[s];r!==t&&(e?r.style.height=`${r.offsetHeight}px`:r.style.width=`${r.offsetWidth}px`,r.style.flex="0 0 auto",r===this.element&&(t=i[s+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:i}=this.config,{isTop:s,isRight:r,isBottom:o,isLeft:n}=this.currentResizer,l=r||n,a=o||s,{movementX:c,movementY:u}=this.calculateMouseMovement({e,isLeft:n,isTop:s}),d=this.position.x,h=this.position.y;let g=0,v=0;if(l&&c){const w=n?-1:1,S=this.getWidth(),f=S+c*w;let p=!1;n&&(g=S-f,(d+g<=0||f<=this.minWidth)&&(p=!0,g=0)),p||this.setWidth(f)}if(a&&u){const w=s?-1:1,S=this.getHeight(),f=S+u*w;let p=!1;s?(v=S-f,(h+v<=0||f<=this.minHeight)&&(p=!0,v=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&S<f&&this.getMinSizeOfSiblings().height+f>this.element.parentElement.offsetHeight&&(p=!0),p||this.setHeight(f)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&g||v)&&this.offsetElement(d+g,h+v)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:i}=this.position;let s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());const{movementX:r,movementY:o}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:s});this.offsetElement(t+r,i+o),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},rm=class om extends P{constructor(t,i={}){super(),this.eFocusableElement=t,this.callbacks=i,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:s=>{if(s.defaultPrevented)return;const r=this.focusService.findNextFocusableElement(this.eFocusableElement,!1,s.shiftKey);r&&(r.focus(),s.preventDefault())},...i}}wireBeans(t){this.focusService=t.focusService}postConstruct(){this.eFocusableElement.classList.add(om.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedElementListeners(this.eFocusableElement,{focusin:this.callbacks.onFocusIn}),this.callbacks.onFocusOut&&this.addManagedElementListeners(this.eFocusableElement,{focusout:this.callbacks.onFocusOut})}addKeyDownListeners(t){this.addManagedElementListeners(t,{keydown:i=>{if(!(i.defaultPrevented||li(i))){if(this.callbacks.shouldStopEventPropagation(i)){ar(i);return}i.key===x.TAB?this.callbacks.onTabKeyDown(i):this.callbacks.handleKeyDown&&this.callbacks.handleKeyDown(i)}}})}};rm.FOCUS_MANAGED_CLASS="ag-focus-managed";var xs=rm,nm={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"};function Yu(e,t){return ol(e)?(e.debounceMs!=null&&D("debounceMs is ignored when apply button is present"),0):e.debounceMs!=null?e.debounceMs:t}function ol(e){return!!e.buttons&&e.buttons.indexOf("apply")>=0}var Qy=class extends re{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=B,this.buttonListeners=[]}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.resetTemplate(),this.createManagedBean(new xs(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new Yy(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);const i=`
            <form class="ag-filter-wrapper">
                <div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" data-ref="eFilterBody">
                    ${this.createBodyTemplate()}
                </div>
            </form>`;this.setTemplate(i,this.getAgComponents(),e),t=this.getGui(),t&&t.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.providedFilterParams.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.providedFilterParams=e,this.applyActive=ol(e),this.resetButtonsPanel(e)}updateParams(e){this.providedFilterParams=e,this.applyActive=ol(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(e,t){const{buttons:i,readOnly:s}=t??{},{buttons:r,readOnly:o}=e;if(s===o&&wo(i,r))return;const n=r&&r.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(pt(this.eButtonsPanel),this.buttonListeners.forEach(c=>c()),this.buttonListeners=[]):n&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!n){this.eButtonsPanel&&ys(this.eButtonsPanel);return}const l=document.createDocumentFragment(),a=c=>{let u,d;switch(c){case"apply":u=this.translate("applyFilter"),d=v=>this.onBtApply(!1,!1,v);break;case"clear":u=this.translate("clearFilter"),d=()=>this.onBtClear();break;case"reset":u=this.translate("resetFilter"),d=()=>this.onBtReset();break;case"cancel":u=this.translate("cancelFilter"),d=v=>{this.onBtCancel(v)};break;default:D("Unknown button type specified");return}const g=Po(`<button
                    type="${c==="apply"?"submit":"button"}"
                    data-ref="${c}FilterButton"
                    class="ag-button ag-standard-button ag-filter-apply-panel-button"
                >${u}
                </button>`);this.buttonListeners.push(...this.addManagedElementListeners(g,{click:d})),l.append(g)};r.forEach(c=>a(c)),this.eButtonsPanel.append(l),this.getGui().appendChild(this.eButtonsPanel)}getDefaultDebounceMs(){return 0}setupOnBtApplyDebounce(){const e=Yu(this.providedFilterParams,this.getDefaultDebounceMs()),t=qe(this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel?this.appliedModel:null}setModel(e){return(e!=null?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.providedFilterParams.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){const i=()=>{this.onUiChanged(!1,"prevent"),t==null||t()};e!=null?this.setModelIntoUi(e).then(i):this.resetUiToDefaults().then(i)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){const t=this.getModelFromUi();if(!this.isModelValid(t))return!1;const i=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(i,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,i){i&&i.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"});const{closeOnApply:s}=this.providedFilterParams;s&&this.applyActive&&!e&&!t&&this.close(i)}onNewRowsLoaded(){}close(e){if(!this.hidePopup)return;const t=e,i=t&&t.key;let s;(i==="Enter"||i==="Space")&&(s={keyboardEvent:t}),this.hidePopup(s),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const i=this.isModelValid(this.getModelFromUi()),s=this.queryForHtmlElement('[data-ref="applyFilterButton"]');s&&xo(s,!i)}e&&!t||t==="immediately"?this.onBtApply(e):(!this.applyActive&&!t||t==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e==null?void 0:e.container)}refreshFilterResizer(e){if(!this.positionableFeature||e==="toolPanel")return;const t=e==="floatingFilter"||e==="columnFilter",{positionableFeature:i,gos:s}=this;t?(i.restoreLastSize(),i.setResizable(s.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(this.positionableFeature.removeSizeFromEl(),this.positionableFeature.setResizable(!1)),this.positionableFeature.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)}refresh(e){const t=this.providedFilterParams;return this.providedFilterParams=e,this.resetButtonsPanel(e,t),!0}destroy(){const e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.localeService.getLocaleTextFunc()(e,nm[e])}getCellValue(e){return this.providedFilterParams.getValue(e)}getPositionableElement(){return this.eFilterBody}},qy=class extends ju{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)}},Xy=class extends re{constructor(e="default",t=!1){super(`<div class="ag-list ag-${e}-list" role="listbox"></div>`),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),!this.unFocusable&&this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){const t=e.key;switch(t){case x.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const i=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(i)}break;case x.DOWN:case x.UP:e.preventDefault(),this.navigate(t);break;case x.PAGE_DOWN:case x.PAGE_UP:case x.PAGE_HOME:case x.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}navigate(e){const t=e===x.DOWN;let i;if(!this.highlightedEl)i=this.itemEls[t?0:this.itemEls.length-1];else{let r=this.itemEls.indexOf(this.highlightedEl)+(t?1:-1);r=Math.min(Math.max(r,0),this.itemEls.length-1),i=this.itemEls[r]}this.highlightItem(i)}navigateToPage(e){if(!this.highlightedEl||this.itemEls.length===0)return;const t=this.itemEls.indexOf(this.highlightedEl),i=this.options.length-1,s=this.itemEls[0].clientHeight,r=Math.floor(this.getGui().clientHeight/s);let o=-1;e===x.PAGE_HOME?o=0:e===x.PAGE_END?o=i:e===x.PAGE_DOWN?o=Math.min(t+r,i):e===x.PAGE_UP&&(o=Math.max(t-r,0)),o!==-1&&this.highlightItem(this.itemEls[o])}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){const{value:t,text:i}=e,s=i||t;return this.options.push({value:t,text:s}),this.renderOption(t,s),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{ys(e)}),this.itemEls=[]}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((t,i)=>{DS(t,i+1),ES(t,e.length)})}renderOption(e,t){const i=Se(this.gos),s=i.createElement("div");Bt(s,"option"),s.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const r=i.createElement("span");s.appendChild(r),r.textContent=t,this.unFocusable||(s.tabIndex=-1),this.itemEls.push(s),this.addManagedListeners(s,{mouseover:()=>this.highlightItem(s),mousedown:o=>{o.preventDefault(),o.stopPropagation(),this.setValue(e)}}),this.createManagedBean(new vr({getTooltipValue:()=>t,getGui:()=>s,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>r.scrollWidth>r.clientWidth})),this.getGui().appendChild(s)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const i=this.options.findIndex(s=>s.value===e);if(i!==-1){const s=this.options[i];this.value=s.value,this.displayValue=s.text,this.highlightItem(this.itemEls[i]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!qt(e))return;this.clearHighlighted(),this.highlightedEl=e,this.highlightedEl.classList.add(this.activeClass),el(this.highlightedEl,!0);const t=this.getGui(),{scrollTop:i,clientHeight:s}=t,{offsetTop:r,offsetHeight:o}=e;(r+o>i+s||r<i)&&this.highlightedEl.scrollIntoView({block:"nearest"}),this.unFocusable||this.highlightedEl.focus()}clearHighlighted(){!this.highlightedEl||!qt(this.highlightedEl)||(this.highlightedEl.classList.remove(this.activeClass),el(this.highlightedEl,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},Zy=class extends qf{constructor(e){if(super(e,(e==null?void 0:e.template)||`
            <div class="ag-picker-field" role="presentation">
                <div data-ref="eLabel"></div>
                <div data-ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">
                    <div data-ref="eDisplayField" class="ag-picker-field-display"></div>
                    <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
                </div>
            </div>`,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=B,this.eWrapper=B,this.eDisplayField=B,this.eIcon=B,this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:i,variableWidth:s,minPickerWidth:r,maxPickerWidth:o}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!s,i!=null&&this.setPickerMaxHeight(i),r!=null&&this.setPickerMinWidth(r),o!=null&&this.setPickerMaxWidth(o)}wireBeans(e){this.popupService=e.popupService}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:i,inputWidth:s}=this.config;if(i){const r=ut(i,this.gos);r&&this.eIcon.appendChild(r)}s!=null&&this.setInputWidth(s)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Jn(e,!1),this.ariaRole&&Bt(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case x.UP:case x.DOWN:case x.ENTER:case x.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case x.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.localeService.getLocaleTextFunc(),{pickerAriaLabelKey:i,pickerAriaLabelValue:s,modalPicker:r=!0}=this.config,o={modal:r,eChild:e,closeOnEsc:!0,closedCallback:()=>{const h=ff(this.gos);this.beforeHidePicker(),h&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(i,s),anchorToElement:this.eWrapper};e.style.position="absolute";const n=this.popupService.addPopup(o),{maxPickerHeight:l,minPickerWidth:a,maxPickerWidth:c,variableWidth:u}=this;u?(a&&(e.style.minWidth=a),e.style.width=zu(tl(this.eWrapper)),c&&(e.style.maxWidth=c)):rl(e,c??tl(this.eWrapper));const d=l??`${Vu(this.popupService.getPopupParent())}px`;return e.style.setProperty("max-height",d),this.alignPickerToComponent(),n.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerType:e}=this.config,{pickerGap:t}=this,i=this.gos.get("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:e,eventSource:this.eWrapper,ePopup:this.pickerComponent.getGui(),position:"under",alignSide:i,keepWithinBounds:!0,nudgeY:t})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();Jn(t,e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&this.hideCurrentPicker()}setInputWidth(e){return rl(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},Qu=class extends Zy{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox",...e})}postConstruct(){super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:i}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),i&&t==null&&(this.eDisplayField.textContent=i),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){this.listComponent=this.createBean(new Xy("select",!0)),this.listComponent.setParentComponent(this);const e=this.listComponent.getAriaElement(),t=`ag-select-list-${this.listComponent.getCompId()}`;e.setAttribute("id",t),OS(this.getAriaElement(),e),this.listComponent.addManagedListeners(this.listComponent,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})}}),this.listComponent.addManagedListeners(this.listComponent,{fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){var i;const{key:t}=e;switch(t===x.TAB&&this.hidePicker(),t){case x.ENTER:case x.UP:case x.DOWN:case x.PAGE_UP:case x.PAGE_DOWN:case x.PAGE_HOME:case x.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(i=this.listComponent)==null||i.handleKeyDown(e):super.onKeyDown(e);break;case x.ESCAPE:super.onKeyDown(e);break;case x.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){this.listComponent&&(super.showPicker(),this.listComponent.refreshHighlighted())}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this}setValue(e,t,i){if(this.value===e||!this.listComponent)return this;if(i||this.listComponent.setValue(e,!0),this.listComponent.getValue()===this.getValue())return this;let r=this.listComponent.getDisplayValue();return r==null&&this.config.placeholder&&(r=this.config.placeholder),this.eDisplayField.textContent=r,this.setTooltip({newTooltipText:r??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth}),super.setValue(e,t)}destroy(){this.listComponent&&(this.listComponent=this.destroyBean(this.listComponent)),super.destroy()}},Jy={selector:"AG-SELECT",component:Qu},lm=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e)}getFilterOptions(){return this.filterOptions}mapCustomOptions(){this.filterOptions&&this.filterOptions.forEach(e=>{if(typeof e=="string")return;const t=[["displayKey"],["displayName"],["predicate","test"]],i=s=>s.some(r=>e[r]!=null)?!0:(D(`ignoring FilterOptionDef as it doesn't contain one of '${s}'`),!1);if(!t.every(i)){this.filterOptions=this.filterOptions.filter(s=>s===e)||[];return}this.customFilterOptions[e.displayKey]=e})}selectDefaultItem(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){const t=this.filterOptions[0];typeof t=="string"?this.defaultOption=t:t.displayKey?this.defaultOption=t.displayKey:D("invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else D("no filter options for filter")}getDefaultOption(){return this.defaultOption}getCustomOption(e){return this.customFilterOptions[e]}},am=class extends Qy{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(e){const t=this.optionsFactory.getCustomOption(e);if(t){const{numberOfInputs:s}=t;return s??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:e==="inRange"?2:1}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,i)=>{i===0?t.setValue(e,!0):t.setValue(this.optionsFactory.getDefaultOption(),!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){return this.eJoinOperatorsOr.length===0?this.defaultJoinOperator:this.eJoinOperatorsOr[0].getValue()===!0?"OR":"AND"}areModelsEqual(e,t){if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;const i=!e.operator,s=!t.operator;if(!i&&s||i&&!s)return!1;let o;if(i){const n=e,l=t;o=this.areSimpleModelsEqual(n,l)}else{const n=e,l=t;o=n.operator===l.operator&&$i(n.conditions,l.conditions,(a,c)=>this.areSimpleModelsEqual(a,c))}return o}shouldRefresh(e){var o;const t=this.getModel(),i=t?t.conditions??[t]:null,s=((o=e.filterOptions)==null?void 0:o.map(n=>typeof n=="string"?n:n.displayKey))??this.getDefaultFilterOptions();return!(!(!i||i.every(n=>s.find(l=>l===n.type)!==void 0))||typeof e.maxNumConditions=="number"&&i&&i.length>e.maxNumConditions)}refresh(e){return!this.shouldRefresh(e)||!super.refresh(e)?!1:(this.setParams(e),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0)}setModelIntoUi(e){if(e.operator){const i=e;let s=i.conditions;s==null&&(s=[],D("Filter model is missing 'conditions'"));const r=this.validateAndUpdateConditions(s),o=this.getNumConditions();if(r<o)this.removeConditionsAndOperators(r);else if(r>o)for(let l=o;l<r;l++)this.createJoinOperatorPanel(),this.createOption();const n=i.operator==="OR";this.eJoinOperatorsAnd.forEach(l=>l.setValue(!n,!0)),this.eJoinOperatorsOr.forEach(l=>l.setValue(n,!0)),s.forEach((l,a)=>{this.eTypes[a].setValue(l.type,!0),this.setConditionIntoUi(l,a)})}else{const i=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(i.type,!0),this.setConditionIntoUi(i,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),we.resolve()}validateAndUpdateConditions(e){let t=e.length;return t>this.maxNumConditions&&(e.splice(this.maxNumConditions),D('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),t=this.maxNumConditions),t}doesFilterPass(e){const t=this.getModel();if(t==null)return!0;const{operator:i}=t,s=[];if(i){const o=t;s.push(...o.conditions??[])}else s.push(t);return s[i&&i==="OR"?"some":"every"](o=>this.individualConditionPasses(e,o))}setParams(e){super.setParams(e),this.setNumConditions(e),this.defaultJoinOperator=this.getDefaultJoinOperator(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new lm,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}setNumConditions(e){this.maxNumConditions=e.maxNumConditions??2,this.maxNumConditions<1&&(D('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=e.numAlwaysVisibleConditions??1,this.numAlwaysVisibleConditions<1&&(D('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(D('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)}createOption(){const e=this.createManagedBean(new Qu);this.eTypes.push(e),e.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(e.getGui());const t=this.createValueElement();this.eConditionBodies.push(t),this.eFilterBody.appendChild(t),this.putOptionsIntoDropdown(e),this.resetType(e);const i=this.getNumConditions()-1;this.forEachPositionInput(i,s=>this.resetInput(s)),this.addChangedListeners(e,i)}createJoinOperatorPanel(){const e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");const t=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),i=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);const s=this.eJoinOperatorPanels.length-1,r=this.joinOperatorId++;this.resetJoinOperatorAnd(t,s,r),this.resetJoinOperatorOr(i,s,r),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(e,t,i){const s=this.createManagedBean(new qy);return e.push(s),s.addCssClass("ag-filter-condition-operator"),s.addCssClass(`ag-filter-condition-operator-${i}`),t.appendChild(s.getGui()),s}getDefaultJoinOperator(e){return e==="AND"||e==="OR"?e:"AND"}createFilterListOptions(){const e=this.optionsFactory.getFilterOptions();this.filterListOptions=e.map(t=>typeof t=="string"?this.createBoilerplateListOption(t):this.createCustomListOption(t))}putOptionsIntoDropdown(e){this.filterListOptions.forEach(t=>{e.addOption(t)}),e.setDisabled(this.filterListOptions.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,i=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:i?this.localeService.getLocaleTextFunc()(i.displayKey,i.displayName):this.translate(t)}}createBodyTemplate(){return""}getAgComponents(){return[]}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let i=0;i<this.getNumConditions();i++)this.isConditionUiComplete(i)?e=i:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const i=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<i){this.removeConditionsAndOperators(i+1);const s=e+1,r=i-s;r>0&&this.removeConditionsAndOperators(s,r),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((s,r)=>{const o=this.isConditionDisabled(r,e);s.setDisabled(o||this.filterListOptions.length<=1),r===1&&(xo(this.eJoinOperatorPanels[0],o),this.eJoinOperatorsAnd[0].setDisabled(o),this.eJoinOperatorsOr[0].setDisabled(o))}),this.eConditionBodies.forEach((s,r)=>{pe(s,this.isConditionBodyVisible(r))});const i=(t??this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach(s=>{s.setValue(!i,!0)}),this.eJoinOperatorsOr.forEach(s=>{s.setValue(i,!0)}),this.forEachInput((s,r,o,n)=>{this.setElementDisplayed(s,r<n),this.setElementDisabled(s,this.isConditionDisabled(o,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;this.removeComponents(this.eTypes,e,t),this.removeElements(this.eConditionBodies,e,t),this.removeValueElements(e,t);const i=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,i,t),this.removeComponents(this.eJoinOperatorsAnd,i,t),this.removeComponents(this.eJoinOperatorsOr,i,t)}removeElements(e,t,i){this.removeItems(e,t,i).forEach(r=>ys(r))}removeComponents(e,t,i){this.removeItems(e,t,i).forEach(r=>{ys(r.getGui()),this.destroyBean(r)})}removeItems(e,t,i){return i==null?e.splice(t):e.splice(t,i)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!(e!=null&&e.suppressFocus))if(this.isReadOnly())this.eFilterBody.focus();else{const t=this.getInputs(0)[0];if(!t)return;t instanceof ns&&t.getInputElement().focus()}}afterGuiDetached(){super.afterGuiDetached();const e=this.getModel();this.resetUiToActiveModel(e);let t=-1,i=-1,s=!1;const r=this.getJoinOperator();for(let n=this.getNumConditions()-1;n>=0;n--)if(this.isConditionUiComplete(n))t===-1&&(t=n,i=n);else{const l=n>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(n-1),a=n<t;(l||a)&&(this.removeConditionsAndOperators(n,1),s=!0,a&&i--)}let o=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),o=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),o=!0),o&&this.updateConditionStatusesAndValues(i,r),s&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}getPlaceholderText(e,t){let i=this.translate(e);if(Au(this.filterPlaceholder)){const s=this.filterPlaceholder,r=this.eTypes[t].getValue(),o=this.translate(r);i=s({filterOptionKey:r,filterOption:o,placeholder:i})}else typeof this.filterPlaceholder=="string"&&(i=this.filterPlaceholder);return i}resetPlaceholder(){const e=this.localeService.getLocaleTextFunc();this.forEachInput((t,i,s,r)=>{if(!(t instanceof ns))return;const o=i===0&&r>1?"inRangeStart":i===0?"filterOoo":"inRangeEnd",n=i===0&&r>1?e("ariaFilterFromValue","Filter from value"):i===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(o,s)),t.setInputAriaLabel(n)})}setElementValue(e,t,i){e instanceof ns&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){e instanceof re&&pe(e.getGui(),t)}setElementDisabled(e,t){e instanceof re&&xo(e.getGui(),t)}attachElementOnChange(e,t){e instanceof ns&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,i)=>{this.forEachPositionTypeInput(i,t,e)})}forEachPositionInput(e,t){const i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,t)}forEachPositionTypeInput(e,t,i){const s=this.getNumberOfInputs(t),r=this.getInputs(e);for(let o=0;o<r.length;o++){const n=r[o];n!=null&&i(n,o,e,s)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return this.getNumberOfInputs(t)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(i=>i==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinOperatorsAnd.forEach((t,i)=>this.resetJoinOperatorAnd(t,i,this.joinOperatorId+i)),this.eJoinOperatorsOr.forEach((t,i)=>this.resetJoinOperatorOr(t,i,this.joinOperatorId+i)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,e||this.onUiChanged(),we.resolve()}resetType(e){const i=this.localeService.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(i).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("AND"),this.translate("andCondition"),i)}resetJoinOperatorOr(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("OR"),this.translate("orCondition"),i)}resetJoinOperator(e,t,i,s,r){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${r}`).setLabel(s),t)}updateJoinOperatorsDisabled(){this.eJoinOperatorsAnd.forEach((e,t)=>this.updateJoinOperatorDisabled(e,t)),this.eJoinOperatorsOr.forEach((e,t)=>this.updateJoinOperatorDisabled(e,t))}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const i=this.mapValuesFromModel(e);this.forEachInput((s,r,o)=>{o===t&&this.setElementValue(s,i[r]!=null?i[r]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,i,s)=>{this.setElementValue(t,i===0&&s===0?e:null,!0)})}isDefaultOperator(e){return e===this.defaultJoinOperator}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,i=>{this.attachElementOnChange(i,this.listener)}))}individualConditionPasses(e,t){const i=this.getCellValue(e.node),s=this.mapValuesFromModel(t),r=this.optionsFactory.getCustomOption(t.type),o=this.evaluateCustomFilter(r,s,i);return o??(i==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,i,t,e))}evaluateCustomFilter(e,t,i){if(e==null)return;const{predicate:s}=e;if(s!=null&&!t.some(r=>r==null))return s(t,i)}isBlank(e){return e==null||typeof e=="string"&&e.trim().length===0}hasInvalidInputs(){return!1}},cm=class extends am{setParams(e){super.setParams(e),this.scalarFilterParams=e}evaluateNullValue(e){switch(e){case"equals":if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case"notEqual":if(this.scalarFilterParams.includeBlanksInNotEqual)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case"lessThan":case"lessThanOrEqual":if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case"inRange":if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,i){const s=this.comparator(),r=e[0]!=null?s(e[0],t):0;switch(i.type){case"equals":return r===0;case"notEqual":return r!==0;case"greaterThan":return r>0;case"greaterThanOrEqual":return r>=0;case"lessThan":return r<0;case"lessThanOrEqual":return r<=0;case"inRange":{const o=s(e[1],t);return this.scalarFilterParams.inRangeInclusive?r>=0&&o<=0:r>0&&o<0}case"blank":return this.isBlank(t);case"notBlank":return!this.isBlank(t);default:return D('Unexpected type of filter "'+i.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}}},eb=65,tb=67,ib=86,sb=68,rb=90,ob=89;function um(e){var i;return e.altKey||e.ctrlKey||e.metaKey?!1:((i=e.key)==null?void 0:i.length)===1}function Mc(e,t,i,s,r){const o=s?s.getColDef().suppressKeyboardEvent:void 0;if(!o)return!1;const n=e.addGridCommonParams({event:t,editing:r,column:s,node:i,data:i.data,colDef:s.getColDef()});return!!(o&&o(n))}function nb(e,t,i,s){const r=s.getDefinition(),o=r&&r.suppressHeaderKeyboardEvent;if(!M(o))return!1;const n=e.addGridCommonParams({colDef:r,column:s,headerRowIndex:i,event:t});return!!o(n)}function lb(e){const{keyCode:t}=e;let i;switch(t){case eb:i=x.A;break;case tb:i=x.C;break;case ib:i=x.V;break;case sb:i=x.D;break;case rb:i=x.Z;break;case ob:i=x.Y;break;default:i=e.code}return i}function ab(e,t=!1){return e===x.DELETE?!0:!t&&e===x.BACKSPACE?_f():!1}var Ps=class extends ns{constructor(e,t="ag-text-field",i="text"){super(e,t,i)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){return this.eInput.value!==e&&(this.eInput.value=M(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=i=>{um(i)&&i.key&&!e.test(i.key)&&i.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:i=>{var r;const s=(r=i.clipboardData)==null?void 0:r.getData("text");s&&s.split("").some(o=>!e.test(o))&&i.preventDefault()}})}},El={selector:"AG-INPUT-TEXT-FIELD",component:Ps},qu=class extends Ps{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct(),this.addManagedListeners(this.eInput,{blur:()=>{const r=parseFloat(this.eInput.value),o=isNaN(r)?"":this.normalizeValue(r.toString());this.value!==o&&this.setValue(o)},wheel:this.onWheel.bind(this)}),this.eInput.step="any";const{precision:e,min:t,max:i,step:s}=this.config;typeof e=="number"&&this.setPrecision(e),typeof t=="number"&&this.setMin(t),typeof i=="number"&&this.setMax(i),typeof s=="number"&&this.setStep(s)}onWheel(e){fe(this.gos)===this.eInput&&e.preventDefault()}normalizeValue(e){if(e==="")return"";this.precision!=null&&(e=this.adjustPrecision(e));const t=parseFloat(e);return this.min!=null&&t<this.min?e=this.min.toString():this.max!=null&&t>this.max&&(e=this.max.toString()),e}adjustPrecision(e,t){if(this.precision==null)return e;if(t){const s=parseFloat(e).toFixed(this.precision);return parseFloat(s).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=this.precision)return e;if(this.precision>0)return`${i[0]}.${i[1].slice(0,this.precision)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,Ft(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Ft(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Ft(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(i=>super.setValue(i,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,i){if(M(i)){let s=this.isScientificNotation(i);if(s&&this.eInput.validity.valid)return e(i);if(!s){i=this.adjustPrecision(i);const r=this.normalizeValue(i);s=i!=r}if(s)return t(i)}return e(i)}getValue(){if(!this.eInput.validity.valid)return;const e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},cb={selector:"AG-INPUT-NUMBER-FIELD",component:qu},dm=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"],Xu=class{constructor(e,t,i){this.localeService=e,this.optionsFactory=t,this.valueFormatter=i}getModelAsString(e){if(!e)return null;const t=e.operator!=null,i=this.localeService.getLocaleTextFunc();if(t){const s=e,o=(s.conditions??[]).map(l=>this.getModelAsString(l)),n=s.operator==="AND"?"andCondition":"orCondition";return o.join(` ${i(n,nm[n])} `)}else{if(e.type==="blank"||e.type==="notBlank")return i(e.type,e.type);{const s=e,r=this.optionsFactory.getCustomOption(s.type),{displayKey:o,displayName:n,numberOfInputs:l}=r||{};return o&&n&&l===0?(i(o,n),n):this.conditionToString(s,r)}}}updateParams(e){this.optionsFactory=e.optionsFactory}formatValue(e){return this.valueFormatter?this.valueFormatter(e??null)??"":String(e)}},hm=class extends Xu{conditionToString(e,t){const{numberOfInputs:i}=t||{};return e.type=="inRange"||i===2?`${this.formatValue(e.filter)}-${this.formatValue(e.filterTo)}`:e.filter!=null?this.formatValue(e.filter):`${e.type}`}};function Tc(e){const{allowedCharPattern:t}=e??{};return t??null}var ub=class extends cm{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[]}refresh(e){return this.numberFilterParams.allowedCharPattern!==e.allowedCharPattern?!1:super.refresh(e)}mapValuesFromModel(e){const{filter:t,filterTo:i,type:s}=e||{};return[this.processValue(t),this.processValue(i)].slice(0,this.getNumberOfInputs(s))}getDefaultDebounceMs(){return 500}comparator(){return(e,t)=>e===t?0:e<t?1:-1}setParams(e){this.numberFilterParams=e,super.setParams(e),this.filterModelFormatter=new hm(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)}getDefaultFilterOptions(){return dm}setElementValue(e,t,i){const s=!i&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(t??null):t;super.setElementValue(e,s)}createValueElement(){const e=Tc(this.numberFilterParams),t=document.createElement("div");return t.classList.add("ag-filter-body"),Bt(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,i,s){const r=this.createManagedBean(s?new Ps({allowedCharPattern:s}):new qu);r.addCssClass(`ag-filter-${i}`),r.addCssClass("ag-filter-filter"),t.push(r),e.appendChild(r.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}getValues(e){const t=[];return this.forEachPositionInput(e,(i,s,r,o)=>{s<o&&t.push(this.processValue(this.stringToFloat(i.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getFilterType(){return"number"}processValue(e){return e==null||isNaN(e)?null:e}stringToFloat(e){if(typeof e=="number")return e;let t=ni(e);return t!=null&&t.trim()===""&&(t=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(t):t==null||t.trim()==="-"?null:parseFloat(t)}createCondition(e){const t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},s=this.getValues(e);return s.length>0&&(i.filter=s[0]),s.length>1&&(i.filterTo=s[1]),i}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{if(!t.getInputElement().validity.valid){e=!0;return}}),e}},gm=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],pm=class extends Xu{conditionToString(e,t){const{numberOfInputs:i}=t||{};return e.type=="inRange"||i===2?`${e.filter}-${e.filterTo}`:e.filter!=null?`${e.filter}`:`${e.type}`}};function fm(e){const t=e&&e.trim();return t===""?e:t}var db=class extends am{constructor(){super("textFilter"),this.defaultFormatter=e=>e,this.defaultLowercaseFormatter=e=>e==null?null:e.toString().toLowerCase(),this.defaultMatcher=({filterOption:e,value:t,filterText:i})=>{if(i==null)return!1;switch(e){case"contains":return t.indexOf(i)>=0;case"notContains":return t.indexOf(i)<0;case"equals":return t===i;case"notEqual":return t!=i;case"startsWith":return t.indexOf(i)===0;case"endsWith":{const s=t.lastIndexOf(i);return s>=0&&s===t.length-i.length}default:return!1}},this.eValuesFrom=[],this.eValuesTo=[]}getDefaultDebounceMs(){return 500}setParams(e){this.textFilterParams=e,super.setParams(e),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?this.defaultFormatter:this.defaultLowercaseFormatter),this.filterModelFormatter=new pm(this.localeService,this.optionsFactory)}getTextMatcher(){const e=this.textFilterParams.textCustomComparator;return e?(D("textCustomComparator is deprecated, use textMatcher instead."),({filterOption:t,value:i,filterText:s})=>e(t,i,s)):this.textFilterParams.textMatcher||this.defaultMatcher}createCondition(e){const t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},s=this.getValuesWithSideEffects(e,!0);return s.length>0&&(i.filter=s[0]),s.length>1&&(i.filterTo=s[1]),i}getFilterType(){return"text"}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getValues(e){return this.getValuesWithSideEffects(e,!1)}getValuesWithSideEffects(e,t){const i=[];return this.forEachPositionInput(e,(s,r,o,n)=>{if(r<n){let l=ni(s.getValue());t&&this.textFilterParams.trimInput&&(l=fm(l)??null,s.setValue(l,!0)),i.push(l)}}),i}getDefaultFilterOptions(){return gm}createValueElement(){const e=document.createElement("div");return e.classList.add("ag-filter-body"),Bt(e,"presentation"),this.createFromToElement(e,this.eValuesFrom,"from"),this.createFromToElement(e,this.eValuesTo,"to"),e}createFromToElement(e,t,i){const s=this.createManagedBean(new Ps);s.addCssClass(`ag-filter-${i}`),s.addCssClass("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}mapValuesFromModel(e){const{filter:t,filterTo:i,type:s}=e||{};return[t||null,i||null].slice(0,this.getNumberOfInputs(s))}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,i,s){const r=e.map(h=>this.formatter(h))||[],o=this.formatter(t),{api:n,colDef:l,column:a,context:c,textFormatter:u}=this.textFilterParams;if(i.type==="blank")return this.isBlank(t);if(i.type==="notBlank")return!this.isBlank(t);const d={api:n,colDef:l,column:a,context:c,node:s.node,data:s.data,filterOption:i.type,value:o,textFormatter:u};return r.some(h=>this.matcher({...d,filterText:h}))}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}};function mm(e){if(typeof e=="number")return e;if(typeof e=="string"){const t=parseInt(e);return isNaN(t)?void 0:t}}function Wt(e,t=Number.MAX_VALUE){return i=>{const s=mm(i);if(!(s==null||s<e||s>t))return s}}function Jr(e,t){return e.toString().padStart(t,"0")}function hb(e,t){const i=[];for(let s=e;s<=t;s++)i.push(s);return i}function gb(e,t,i){return typeof e!="number"?"":e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${t}`)}function xt(e,t=!0,i="-"){if(!e)return null;let s=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(r=>Jr(r,2)).join(i);return t&&(s+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(r=>Jr(r,2)).join(":")),s}var ma=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function eo(e,t="YYYY-MM-DD"){const i=Jr(e.getFullYear(),4),s=["January","February","March","April","May","June","July","August","September","October","November","December"],r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>s[e.getMonth()],MMM:()=>s[e.getMonth()].slice(0,3),MM:()=>Jr(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${ma(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${ma(e.getDate())}`,DD:()=>Jr(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>r[e.getDay()],ddd:()=>r[e.getDay()].slice(0,3),dd:()=>r[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${ma(e.getDay())}`,d:()=>`${e.getDay()}`},n=new RegExp(Object.keys(o).join("|"),"g");return t.replace(n,l=>l in o?o[l]():l)}function st(e){if(!e)return null;const[t,i]=e.split(" ");if(!t)return null;const s=t.split("-").map(d=>parseInt(d,10));if(s.filter(d=>!isNaN(d)).length!==3)return null;const[r,o,n]=s,l=new Date(r,o-1,n);if(l.getFullYear()!==r||l.getMonth()!==o-1||l.getDate()!==n)return null;if(!i||i==="00:00:00")return l;const[a,c,u]=i.split(":").map(d=>parseInt(d,10));return a>=0&&a<24&&l.setHours(a),c>=0&&c<60&&l.setMinutes(c),u>=0&&u<60&&l.setSeconds(u),l}var vm=class{constructor(e,t,i,s,r){this.alive=!0,this.context=e,this.eParent=s,t.getDateCompDetails(i).newAgStackInstance().then(l=>{if(!this.alive){e.destroyBean(l);return}this.dateComp=l,l&&(s.appendChild(l.getGui()),l.afterGuiAttached&&l.afterGuiAttached(),this.tempValue&&l.setDate(this.tempValue),this.disabled!=null&&this.setDateCompDisabled(this.disabled),r==null||r(this))})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e}setDisabled(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e}setDisplayed(e){pe(this.eParent,e)}setInputPlaceholder(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e)}setInputAriaLabel(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e)}afterGuiAttached(e){this.dateComp&&typeof this.dateComp.afterGuiAttached=="function"&&this.dateComp.afterGuiAttached(e)}updateParams(e){var i,s;let t=!1;(i=this.dateComp)!=null&&i.refresh&&typeof this.dateComp.refresh=="function"&&this.dateComp.refresh(e)!==null&&(t=!0),!t&&((s=this.dateComp)!=null&&s.onParamsUpdated)&&typeof this.dateComp.onParamsUpdated=="function"&&this.dateComp.onParamsUpdated(e)!==null&&D("Custom date component method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")}setDateCompDisabled(e){this.dateComp!=null&&this.dateComp.setDisabled!=null&&this.dateComp.setDisabled(e)}},Cm=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"],wm=class extends Xu{constructor(e,t,i){super(t,i),this.dateFilterParams=e}conditionToString(e,t){const{type:i}=e,{numberOfInputs:s}=t||{},r=i=="inRange"||s===2,o=st(e.dateFrom),n=st(e.dateTo),l=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(r){const a=o!==null?eo(o,l):"null",c=n!==null?eo(n,l):"null";return`${a}-${c}`}return o!=null?eo(o,l):`${i}`}updateParams(e){super.updateParams(e),this.dateFilterParams=e.dateFilterParams}},Gh=1e3,Nh=1/0,pb=class extends cm{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=Gh,this.maxValidYear=Nh,this.minValidDate=null,this.maxValidDate=null}wireBeans(e){super.wireBeans(e),this.context=e.context,this.userComponentFactory=e.userComponentFactory}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}mapValuesFromModel(e){const{dateFrom:t,dateTo:i,type:s}=e||{};return[t&&st(t)||null,i&&st(i)||null].slice(0,this.getNumberOfInputs(s))}comparator(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)}defaultComparator(e,t){const i=t;return t==null||i<e?-1:i>e?1:0}setParams(e){this.dateFilterParams=e,super.setParams(e);const t=(i,s)=>{if(e[i]!=null)if(isNaN(e[i]))D(`DateFilter ${i} is not a number`);else return e[i]==null?s:Number(e[i]);return s};this.minValidYear=t("minValidYear",Gh),this.maxValidYear=t("maxValidYear",Nh),this.minValidYear>this.maxValidYear&&D("DateFilter minValidYear should be <= maxValidYear"),e.minValidDate?this.minValidDate=e.minValidDate instanceof Date?e.minValidDate:st(e.minValidDate):this.minValidDate=null,e.maxValidDate?this.maxValidDate=e.maxValidDate instanceof Date?e.maxValidDate:st(e.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&D("DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new wm(this.dateFilterParams,this.localeService,this.optionsFactory)}createDateCompWrapper(e){const t=new vm(this.context,this.userComponentFactory,{onDateChanged:()=>this.onUiChanged(),filterParams:this.dateFilterParams},e);return this.addDestroyFunc(()=>t.destroy()),t}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}getDefaultFilterOptions(){return Cm}createValueElement(){const t=Se(this.gos).createElement("div");return t.classList.add("ag-filter-body"),this.createFromToElement(t,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(t,this.eConditionPanelsTo,this.dateConditionToComps,"to"),t}createFromToElement(e,t,i,s){const o=Se(this.gos).createElement("div");o.classList.add(`ag-filter-${s}`),o.classList.add(`ag-filter-date-${s}`),t.push(o),e.appendChild(o),i.push(this.createDateCompWrapper(o))}removeValueElements(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),this.removeItems(this.eConditionPanelsFrom,e,t),this.removeItems(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,i){this.removeItems(e,t,i).forEach(r=>r.destroy())}isValidDateValue(e){if(e===null)return!1;if(this.minValidDate){if(e<this.minValidDate)return!1}else if(e.getUTCFullYear()<this.minValidYear)return!1;if(this.maxValidDate){if(e>this.maxValidDate)return!1}else if(e.getUTCFullYear()>this.maxValidYear)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((i,s,r,o)=>{r!==e||!t||s>=o||(t=t&&this.isValidDateValue(i.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}getFilterType(){return"date"}createCondition(e){const t=this.getConditionType(e),i={},s=this.getValues(e);return s.length>0&&(i.dateFrom=xt(s[0])),s.length>1&&(i.dateTo=xt(s[1])),{dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:t,...i}}resetPlaceholder(){const e=this.localeService.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput(s=>{s.setInputPlaceholder(t),s.setInputAriaLabel(i)})}getInputs(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(i,s,r,o)=>{s<o&&t.push(i.getDate())}),t}translate(e){return e==="lessThan"?super.translate("before"):e==="greaterThan"?super.translate("after"):super.translate(e)}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}},Zu=class extends P{constructor(e,t,i,s){super(),this.columnOrGroup=e,this.columnOrGroup=e,this.eCell=t,this.ariaEl=this.eCell.querySelector("[role=columnheader]")||this.eCell,this.colsSpanning=s,this.beans=i}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){return this.beans.gos.get("enableRtl")&&this.colsSpanning?j(this.colsSpanning):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const e=this.beans.gos.get("suppressColumnMoveAnimation"),t=M(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=e.getLeft(),i=e.getOldLeft(),s=this.modifyLeftForPrintLayout(e,i),r=this.modifyLeftForPrintLayout(e,t);this.setLeft(s),this.actualLeft=r,this.beans.columnAnimationService.executeNextVMTurn(()=>{this.actualLeft===r&&this.setLeft(r)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){if(!Le(this.beans.gos,"print")||e.getPinned()==="left")return t;const s=this.beans.visibleColsService.getColsLeftWidth();if(e.getPinned()==="right"){const r=this.beans.visibleColsService.getBodyContainerWidth();return s+r+t}return s+t}setLeft(e){if(M(e)&&(this.eCell.style.left=`${e}px`),be(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&AS(this.ariaEl,t.length)}}},fb="ag-column-first",mb="ag-column-last";function Sm(e,t,i,s){return K(e)?[]:Cb(e.headerClass,e,t,i,s)}function ym(e,t,i){e.addOrRemoveCssClass(fb,i.isColAtEdge(t,"first")),e.addOrRemoveCssClass(mb,i.isColAtEdge(t,"last"))}function vb(e,t,i,s){return t.addGridCommonParams({colDef:e,column:i,columnGroup:s})}function Cb(e,t,i,s,r){if(K(e))return[];let o;if(typeof e=="function"){const n=vb(t,i,s,r);o=e(n)}else o=e;return typeof o=="string"?[o]:Array.isArray(o)?[...o]:[]}var wb=0,bm=class Rm extends P{constructor(t,i,s){super(),this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.columnGroupChild=t,this.parentRowCtrl=s,this.beans=i,this.instanceId=t.getUniqueId()+"-"+wb++}wireBeans(t){this.pinnedWidthService=t.pinnedWidthService,this.focusService=t.focusService,this.userComponentFactory=t.userComponentFactory,this.ctrlsService=t.ctrlsService,this.dragAndDropService=t.dragAndDropService,this.menuService=t.menuService}postConstruct(){const t=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],t),this.addManagedEventListeners({overlayExclusiveChanged:t})}shouldStopEventPropagation(t){const{headerRowIndex:i,column:s}=this.focusService.getFocusedHeader();return nb(this.gos,t,i,s)}getWrapperHasFocus(){return fe(this.gos)===this.eGui}setGui(t,i){this.eGui=t,this.addDomData(i),i.addManagedListeners(this.beans.eventService,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),i.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}onGuiFocus(){this.eventService.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(t){const{wrapperElement:i,checkMeasuringCallback:s,compBean:r}=t,{animationFrameService:o,resizeObserverService:n,columnModel:l,gos:a}=this.beans,c=w=>{if(!this.isAlive()||!r.isAlive())return;const{paddingTop:S,paddingBottom:f,borderBottomWidth:p,borderTopWidth:m}=Fs(this.getGui()),y=S+f+p+m,F=i.offsetHeight+y;if(w<5){const R=Se(a),E=!R||!R.contains(i),L=F==0;if(E||L){o.requestAnimationFrame(()=>c(w+1));return}}l.setColHeaderHeight(this.column,F)};let u=!1,d;const h=()=>{const w=this.column.isAutoHeaderHeight();w&&!u&&g(),!w&&u&&v()},g=()=>{u=!0,c(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),d=n.observeResize(i,()=>c(0))},v=()=>{u=!1,d&&d(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),d=void 0};h(),r.addDestroyFunc(()=>v()),r.addManagedListeners(this.column,{widthChanged:()=>u&&c(0)}),r.addManagedEventListeners({sortChanged:()=>{u&&window.setTimeout(()=>c(0))}}),s&&s(h)}onDisplayedColumnsChanged(){const{comp:t,column:i,beans:s,eGui:r}=this;!t||!i||!r||(ym(t,i,s.visibleColsService),Gf(r,s.visibleColsService.getAriaColIndex(i)))}addResizeAndMoveKeyboardListeners(t){this.resizeFeature&&t.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const t=this.focusService.isHeaderFocusSuppressed();this.eGui&&Ft(this.eGui,"tabindex",t?null:"-1")}onGuiKeyDown(t){var n;const i=fe(this.gos),s=t.key===x.LEFT||t.key===x.RIGHT;if(this.isResizing&&(t.preventDefault(),t.stopImmediatePropagation()),i!==this.eGui||!t.shiftKey&&!t.altKey||((this.isResizing||s)&&(t.preventDefault(),t.stopImmediatePropagation()),!s))return;const r=t.key===x.LEFT!==this.gos.get("enableRtl"),o=tm[r?"Left":"Right"];if(t.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const l=this.getViewportAdjustedResizeDiff(t);this.resizeHeader(l,t.shiftKey),(n=this.resizeFeature)==null||n.toggleColumnResizing(!0)}else this.moveHeader(o)}getViewportAdjustedResizeDiff(t){let i=this.getResizeDiff(t);if(this.column.getPinned()){const r=this.pinnedWidthService.getPinnedLeftWidth(),o=this.pinnedWidthService.getPinnedRightWidth(),n=Io(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(r+o+i>n)if(n>r+o)i=n-r-o;else return 0}return i}getResizeDiff(t){let i=t.key===x.LEFT!==this.gos.get("enableRtl");const s=this.column.getPinned(),r=this.gos.get("enableRtl");return s&&r!==(s==="right")&&(i=!i),(i?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{var t;(t=this.resizeFeature)==null||t.toggleColumnResizing(!1)},150))}handleKeyDown(t){const i=this.getWrapperHasFocus();switch(t.key){case x.PAGE_DOWN:case x.PAGE_UP:case x.PAGE_HOME:case x.PAGE_END:i&&t.preventDefault()}}addDomData(t){const i=Rm.DOM_DATA_KEY_HEADER_CTRL;ws(this.gos,this.eGui,i,this),t.addDestroyFunc(()=>ws(this.gos,this.eGui,i,null))}getGui(){return this.eGui}focus(t){return this.eGui?(this.lastFocusEvent=t||null,this.eGui.focus(),!0):!1}getRowIndex(){return this.parentRowCtrl.getRowIndex()}getParentRowCtrl(){return this.parentRowCtrl}getPinned(){return this.parentRowCtrl.getPinned()}getColumnGroupChild(){return this.columnGroupChild}removeDragSource(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(t,i,s){const r=t??i;this.gos.get("preventDefaultOnContextMenu")&&r.preventDefault(),this.menuService.isHeaderContextMenuEnabled(s)&&this.menuService.showHeaderContextMenu(s,t,i),this.dispatchColumnMouseEvent("columnHeaderContextMenu",s)}dispatchColumnMouseEvent(t,i){this.eventService.dispatchEvent({type:t,column:i})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null}};bm.DOM_DATA_KEY_HEADER_CTRL="headerCtrl";var Dl=bm,Ju=class extends P{wireBeans(e){this.columnHoverService=e.columnHoverService}constructor(e,t){super(),this.columns=e,this.element=t}postConstruct(){this.gos.get("columnHoverHighlight")&&this.addMouseHoverListeners()}addMouseHoverListeners(){this.addManagedListeners(this.element,{mouseout:this.onMouseOut.bind(this),mouseover:this.onMouseOver.bind(this)})}onMouseOut(){this.columnHoverService.clearMouseOver()}onMouseOver(){this.columnHoverService.setMouseOver(this.columns)}},Sb=class extends Dl{constructor(e,t,i){super(e,t,i),this.iconCreated=!1,this.column=e}setComp(e,t,i,s,r){this.comp=e,r=ko(this,this.beans.context,r),this.eButtonShowMainFilter=i,this.eFloatingFilterBody=s,this.setGui(t,r),this.setupActive(),this.setupWidth(r),this.setupLeft(r),this.setupHover(r),this.setupFocus(r),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(r),this.setupUi(),r.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(r),r.addManagedListeners(this.column,{colDefChanged:()=>this.onColDefChanged(r)}),r.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}setupActive(){const e=this.column.getColDef(),t=!!e.filter,i=!!e.floatingFilter;this.active=t&&i}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=ut("filter",this.gos,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new xs(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.localeService.getLocaleTextFunc();ur(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){if(fe(this.gos)===this.eGui)return;const s=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(s){this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),s.focus();return}const r=this.findNextColumnWithFloatingFilter(e.shiftKey);r&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:r},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleColsService;let i=this.column;do if(i=e?t.getColBefore(i):t.getColAfter(i),!i)break;while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case x.UP:case x.DOWN:t||e.preventDefault();case x.LEFT:case x.RIGHT:if(t)return;e.stopPropagation();case x.ENTER:t&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case x.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const i=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),s=!!e.relatedTarget&&Zs(e.relatedTarget,"ag-floating-filter");if(i&&s&&e.target===this.eGui){const o=this.lastFocusEvent,n=!!(o&&o.key===x.TAB);if(o&&n){const l=o.shiftKey;this.focusService.focusInto(this.eGui,l)}}const r=this.getRowIndex();this.beans.focusService.setFocusedHeader(r,this.column)}setupHover(e){e.createManagedBean(new Ju([this.column],this.eGui));const t=()=>{if(!this.gos.get("columnHoverHighlight"))return;const i=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",i)};e.addManagedEventListeners({columnHoverChanged:t}),t()}setupLeft(e){const t=new Zu(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.menuService.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!this.menuService.isLegacyMenuEnabled()}setupUserComp(){var t;if(!this.active)return;const e=(t=this.beans.filterManager)==null?void 0:t.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{filterManager:t}=this.beans,i=s=>{if((s==null?void 0:s.source)==="filterDestroyed"&&!this.isAlive())return;const r=this.comp.getFloatingFilterComp();r&&r.then(o=>{if(o){const n=t==null?void 0:t.getCurrentFloatingFilterParentModel(this.column),l=s?{...s,columns:s.columns??[],source:s.source==="api"?"api":"columnFilter"}:null;o.onParentModelChanged(n,l)}})};[this.destroySyncListener]=e.addManagedListeners(this.column,{filterChanged:i}),t!=null&&t.isFilterActive(this.column)&&i(null)}setupWidth(e){const t=()=>{const i=`${this.column.getActualWidth()}px`;this.comp.setWidth(i)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){var e;if(!this.suppressFilterButton&&this.comp){const t=!!((e=this.beans.filterManager)!=null&&e.isFilterAllowed(this.column));this.comp.setButtonWrapperDisplayed(t),this.highlightFilterButtonWhenActive&&t&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){var o;const t=this.active;this.setupActive();const i=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const s=this.active?(o=this.beans.filterManager)==null?void 0:o.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();!r||!s?this.updateCompDetails(e,s,i):r.then(n=>{var l;!n||(l=this.beans.filterManager)!=null&&l.areFilterCompsDifferent(this.userCompDetails??null,s)?this.updateCompDetails(e,s,i):this.updateFloatingFilterParams(s)})}updateCompDetails(e,t,i){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),i&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e){var i;if(!e)return;const t=e.params;(i=this.comp.getFloatingFilterComp())==null||i.then(s=>{let r=!1;s!=null&&s.refresh&&typeof s.refresh=="function"&&s.refresh(t)!==null&&(r=!0),!r&&(s!=null&&s.onParamsUpdated)&&typeof s.onParamsUpdated=="function"&&s.onParamsUpdated(t)!==null&&D("Custom floating filter method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")})}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};var z="32.3.9";function yb(e){var t,i;return!!((t=e.filterManager)!=null&&t.isColumnFilterPresent())||!!((i=e.filterManager)!=null&&i.isAggregateFilterPresent())}function bb(e,t,i){var s;return(s=e.filterManager)==null?void 0:s.getFilterInstance(t,i)}function Rb(e,t){var i;return((i=e.filterManager)==null?void 0:i.getColumnFilterInstance(t))??Promise.resolve(void 0)}function Fb(e,t){var s;const i=e.columnModel.getColDefCol(t);if(i)return(s=e.filterManager)==null?void 0:s.destroyFilter(i,"api")}function xb(e,t){e.frameworkOverrides.wrapIncoming(()=>{var i;return(i=e.filterManager)==null?void 0:i.setFilterModel(t)})}function Pb(e){var t;return((t=e.filterManager)==null?void 0:t.getFilterModel())??{}}function Eb(e,t){var i;return((i=e.filterManager)==null?void 0:i.getColumnFilterModel(t))??null}function Db(e,t,i){var s;return((s=e.filterManager)==null?void 0:s.setColumnFilterModel(t,i))??Promise.resolve()}function Mb(e,t){const i=e.columnModel.getCol(t);if(!i){$(`column '${t}' not found`);return}e.menuService.showFilterMenu({column:i,containerType:"columnFilter",positionBy:"auto"})}function Tb(e,t,i){if(t==null)return null;let s=null;const{compName:r,jsComp:o,fwComp:n}=Jf.getCompKeys(e,t,$u);return r?s={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[r]:o==null&&n==null&&t.filter===!0&&(s=i()),s}var Hh={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Bh=["january","february","march","april","may","june","july","august","september","october","november","december"],kb=class extends P{constructor(){super(...arguments),this.beanName="columnFilterService",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[]}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.rowModel=e.rowModel,this.userComponentFactory=e.userComponentFactory,this.rowRenderer=e.rowRenderer,this.dataTypeService=e.dataTypeService,this.filterManager=e.filterManager}postConstruct(){var e,t;this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),rowDataUpdated:()=>this.onNewRowsLoaded("rowDataUpdated"),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.initialFilterModel={...((t=(e=this.gos.get("initialState"))==null?void 0:e.filter)==null?void 0:t.filterModel)??{}}}setFilterModel(e,t="api"){var r;if((r=this.dataTypeService)!=null&&r.isPendingInference()){this.filterModelUpdateQueue.push({model:e,source:t});return}const i=[],s=this.getFilterModel(!0);if(e){const o=new Set(Object.keys(e));this.allColumnFilters.forEach((n,l)=>{const a=e[l];i.push(this.setModelOnFilterWrapper(n.filterPromise,a)),o.delete(l)}),o.forEach(n=>{const l=this.columnModel.getColDefCol(n)||this.columnModel.getCol(n);if(!l){D("setFilterModel() - no column found for colId: "+n);return}if(!l.isFilterAllowed()){D("setFilterModel() - unable to fully apply model, filtering disabled for colId: "+n);return}const a=this.getOrCreateFilterWrapper(l);if(!a){D("setFilterModel() - unable to fully apply model, unable to create filter for colId: "+n);return}i.push(this.setModelOnFilterWrapper(a.filterPromise,e[n]))})}else this.allColumnFilters.forEach(o=>{i.push(this.setModelOnFilterWrapper(o.filterPromise,null))});we.all(i).then(()=>{var l;const o=this.getFilterModel(!0),n=[];this.allColumnFilters.forEach((a,c)=>{const u=s?s[c]:null,d=o?o[c]:null;wo(u,d)||n.push(a.column)}),n.length>0&&((l=this.filterManager)==null||l.onFilterChanged({columns:n,source:t}))})}setModelOnFilterWrapper(e,t){return new we(i=>{e.then(s=>{typeof s.setModel!="function"&&(D("filter missing setModel method, which is needed for setFilterModel"),i()),(s.setModel(t)||we.resolve()).then(()=>i())})})}getFilterModel(e){const t={},{allColumnFilters:i,initialFilterModel:s}=this;return i.forEach((r,o)=>{const n=this.getModelFromFilterWrapper(r);M(n)&&(t[o]=n)}),e||Object.entries(s).forEach(([r,o])=>{var n;M(o)&&!i.has(r)&&((n=this.columnModel.getCol(r))!=null&&n.isFilterAllowed())&&(t[r]=o)}),t}getModelFromFilterWrapper(e){const{filter:t}=e;return t?typeof t.getModel!="function"?(D("filter API missing getModel method, which is needed for getFilterModel"),null):t.getModel():this.getModelFromInitialState(e.column)}getModelFromInitialState(e){return this.initialFilterModel[e.getColId()]??null}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}disableColumnFilters(){return this.allColumnFilters.size?(this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"advancedFilterEnabled")),!0):!1}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){const e=o=>o?o.isFilterActive?o.isFilterActive():(D("Filter is missing isFilterActive() method"),!1):!1,t=!!Cc(this.gos),i=o=>{if(!o.isPrimary())return!0;const l=!this.columnModel.isPivotActive();return!o.isValueActive()||!l?!1:this.columnModel.isPivotMode()?!0:t},s=[],r=[];return this.forEachColumnFilter((o,n)=>{e(o)&&(i(n.column)?s.push(o):r.push(o))}).then(()=>{this.activeAggregateFilters=s,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){return this.forEachColumnFilter((i,s)=>s.column.setFilterActive(i.isFilterActive(),e,t))}forEachColumnFilter(e){return we.all(Array.from(this.allColumnFilters.values()).map(t=>t.filterPromise.then(i=>e(i,t))))}doColumnFiltersPass(e,t,i){const{data:s,aggData:r}=e,o=i?this.activeAggregateFilters:this.activeColumnFilters,n=i?r:s;for(let l=0;l<o.length;l++){const a=o[l];if(!(a==null||a===t)){if(typeof a.doesFilterPass!="function")throw new Error("Filter is missing method doesFilterPass");if(!a.doesFilterPass({node:e,data:n}))return!1}}return!0}callOnFilterChangedOutsideRenderCycle(e){const t=()=>{var i;return(i=this.filterManager)==null?void 0:i.onFilterChanged(e)};this.rowRenderer.isRefreshInProgress()?setTimeout(t,0):t()}updateBeforeFilterChanged(e={}){const{filterInstance:t,additionalEventAttributes:i}=e;return this.updateDependentFilters(),this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",i).then(()=>{this.allColumnFilters.forEach(s=>{s.filterPromise&&s.filterPromise.then(r=>{r&&r!==t&&r.onAnyFilterChanged&&r.onAnyFilterChanged()})}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){this.forEachColumnFilter(t=>{t.onNewRowsLoaded&&t.onNewRowsLoaded()}).then(()=>this.updateFilterFlagInColumns(e,{afterDataChange:!0})).then(()=>this.updateActiveFilters())}createValueGetter(e){return({node:t})=>this.valueService.getValue(e,t,!0)}createGetValue(e){return(t,i)=>{const s=i?this.columnModel.getCol(i):e;return s?this.valueService.getValue(s,t,!0):void 0}}isFilterActive(e){const{filter:t}=this.cachedFilter(e)??{};return t?t.isFilterActive():this.getModelFromInitialState(e)!=null}getOrCreateFilterWrapper(e){if(!e.isFilterAllowed())return null;let t=this.cachedFilter(e);return t||(t=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,t)),t}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){var i;let t;if(la(this.gos))t="agSetColumnFilter";else{const s=(i=this.dataTypeService)==null?void 0:i.getBaseDataType(e);s==="number"?t="agNumberColumnFilter":s==="date"||s==="dateString"?t="agDateColumnFilter":t="agTextColumnFilter"}return t}getDefaultFloatingFilter(e){var i;let t;if(la(this.gos))t="agSetColumnFloatingFilter";else{const s=(i=this.dataTypeService)==null?void 0:i.getBaseDataType(e);s==="number"?t="agNumberColumnFloatingFilter":s==="date"||s==="dateString"?t="agDateColumnFloatingFilter":t="agTextColumnFloatingFilter"}return t}createFilterInstance(e,t){const i=this.getDefaultFilter(e),s=e.getColDef();let r;const o={...this.createFilterParams(e,s),filterModifiedCallback:()=>this.filterModifiedCallbackFactory(r,e)(),filterChangedCallback:l=>this.filterChangedCallbackFactory(r,e)(l),doesRowPassOtherFilter:l=>this.filterManager?this.filterManager.doesRowPassOtherFilters(r,l):!0},n=this.userComponentFactory.getFilterDetails(s,o,i);return n?{filterPromise:()=>{const l=n.newAgStackInstance();return l!=null&&l.then(a=>{r=a,t&&(t.filter=a)}),l},compDetails:n}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return this.gos.addGridCommonParams({column:e,colDef:Pf(t),rowModel:this.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},valueGetter:this.createValueGetter(e),getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e){const t={column:e,filterPromise:null,compiledElement:null,compDetails:null},{filterPromise:i,compDetails:s}=this.createFilterInstance(e,t);return t.filterPromise=(i==null?void 0:i())??null,t.compDetails=s,t}onColumnsChanged(){var i;const e=[];this.allColumnFilters.forEach((s,r)=>{let o;s.column.isPrimary()?o=this.columnModel.getColDefCol(r):o=this.columnModel.getCol(r),!(o&&o===s.column)&&(e.push(s.column),this.disposeFilterWrapper(s,"columnChanged"),this.disposeColumnListener(r))});const t=e.every(s=>s.getColDef().filter==="agGroupColumnFilter");e.length>0&&!t?(i=this.filterManager)==null||i.onFilterChanged({columns:e,source:"api"}):this.updateDependentFilters()}updateDependentFilters(){const e=this.columnModel.getAutoCols();e==null||e.forEach(t=>{t.getColDef().filter==="agGroupColumnFilter"&&this.getOrCreateFilterWrapper(t)})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const{filter:i}=this.allColumnFilters.get(e.getColId())??{};return i&&typeof(i==null?void 0:i.isFilterAllowed)=="function"?i.isFilterAllowed():!0}getFloatingFilterCompDetails(e,t){const i=a=>{var u;const c=(u=this.getOrCreateFilterWrapper(e))==null?void 0:u.filterPromise;c!=null&&c.then(d=>{a(Zr(d))})},s=e.getColDef(),r={...this.createFilterParams(e,s),filterChangedCallback:()=>i(a=>this.filterChangedCallbackFactory(a,e)())},o=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(s,$u,r);let n=Tb(this.frameworkOverrides,s,()=>this.getDefaultFloatingFilter(e));n==null&&(n="agReadOnlyFloatingFilter");const l={column:e,filterParams:o,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:i,showParentFilter:t,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(s,l,n)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilter(e,t="api"){var r;const i=e.getColId(),s=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialFilterModel[i],s&&(this.disposeFilterWrapper(s,t),(r=this.filterManager)==null||r.onFilterChanged({columns:[e],source:"api"}))}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){e.filterPromise.then(i=>{this.destroyBean(i),e.column.setFilterActive(!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId()),this.eventService.dispatchEvent({type:"filterDestroyed",source:t,column:e.column})})}filterModifiedCallbackFactory(e,t){return()=>{this.eventService.dispatchEvent({type:"filterModified",column:t,filterInstance:e})}}filterChangedCallbackFactory(e,t){return i=>{const s=(i==null?void 0:i.source)??"columnFilter",r={filter:e,additionalEventAttributes:i,columns:[t],source:s};this.callOnFilterChangedOutsideRenderCycle(r)}}checkDestroyFilter(e){const t=this.allColumnFilters.get(e);if(!t)return;const i=t.column,{compDetails:s}=i.isFilterAllowed()?this.createFilterInstance(i):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,s)){this.destroyFilter(i,"paramsUpdated");return}const r=i.getColDef().filterParams;if(!t.filterPromise){this.destroyFilter(i,"paramsUpdated");return}t.filterPromise.then(o=>{(o!=null&&o.refresh?o.refresh({...this.createFilterParams(i,i.getColDef()),filterModifiedCallback:this.filterModifiedCallbackFactory(o,i),filterChangedCallback:this.filterChangedCallbackFactory(o,i),doesRowPassOtherFilter:l=>this.filterManager?this.filterManager.doesRowPassOtherFilters(o,l):!0,...r}):!0)===!1&&this.destroyFilter(i,"paramsUpdated")})}setColumnFilterWrapper(e,t){const i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListeners(e,{colDefChanged:()=>this.checkDestroyFilter(i)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:i}=e,{componentClass:s}=t;return!(i===s||(i==null?void 0:i.render)&&(s==null?void 0:s.render)&&i.render===s.render)}hasFloatingFilters(){return this.columnModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e,t){t&&this.getFilterInstanceImpl(e).then(i=>{const s=Zr(i);t(s)})}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstanceImpl(e).then(i=>{t(Zr(i))})})}getFilterInstanceImpl(e){var s;const t=this.columnModel.getColDefCol(e);return t?((s=this.getOrCreateFilterWrapper(t))==null?void 0:s.filterPromise)??we.resolve(null):we.resolve(void 0)}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:t})=>this.setFilterModel(e,t)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:t,resolve:i})=>{this.setColumnFilterModel(e,t).then(()=>i())}),this.columnFilterModelUpdateQueue=[]}getColumnFilterModel(e){const t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){var o;if((o=this.dataTypeService)!=null&&o.isPendingInference()){let n=()=>{};const l=new Promise(a=>{n=a});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:n}),l}const i=this.columnModel.getColDefCol(e),s=i?this.getOrCreateFilterWrapper(i):null;return s?(n=>new Promise(l=>{n.then(a=>l(a))}))(this.setModelOnFilterWrapper(s.filterPromise,t)):Promise.resolve()}getFilterWrapper(e){const t=this.columnModel.getColDefCol(e);return t?this.cachedFilter(t)??null:null}setColDefPropertiesForDataType(e,t,i){const s=la(this.gos),r=this.localeService.getLocaleTextFunc(),o=n=>{const{filterParams:l}=e;e.filterParams=typeof l=="object"?{...l,...n}:n};switch(t.baseDataType){case"number":{s&&o({comparator:(n,l)=>{const a=n==null?0:parseInt(n),c=l==null?0:parseInt(l);return a===c?0:a>c?1:-1}});break}case"boolean":{o(s?{valueFormatter:n=>M(n.value)?r(String(n.value),n.value?"True":"False"):r("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(n,l)=>l,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(n,l)=>l===!1,numberOfInputs:0}]});break}case"date":{s&&o({valueFormatter:n=>{const l=i(n);return M(l)?l:r("blanks","(Blanks)")},treeList:!0,treeListFormatter:(n,l)=>{if(l===1&&n!=null){const a=Bh[Number(n)-1];return r(a,Hh[a])}return n??r("blanks","(Blanks)")}});break}case"dateString":{const n=t.dateParser;o(s?{valueFormatter:l=>{const a=i(l);return M(a)?a:r("blanks","(Blanks)")},treeList:!0,treeListPathGetter:l=>{const a=n(l??void 0);return a?[String(a.getFullYear()),String(a.getMonth()+1),String(a.getDate())]:null},treeListFormatter:(l,a)=>{if(a===1&&l!=null){const c=Bh[Number(l)-1];return r(c,Hh[c])}return l??r("blanks","(Blanks)")}}:{comparator:(l,a)=>{const c=n(a);return a==null||c<l?-1:c>l?1:0}});break}case"object":{s?o({valueFormatter:n=>{const l=i(n);return M(l)?l:r("blanks","(Blanks)")}}):e.filterValueGetter=n=>i({column:n.column,node:n.node,value:this.valueService.getValue(n.column,n.node)});break}}}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}};function Ab(e){var t;return!!((t=e.filterManager)!=null&&t.isAnyFilterPresent())}function Ib(e,t="api"){var i;(i=e.filterManager)==null||i.onFilterChanged({source:t})}var Lb=class extends re{constructor(){super(`
            <div class="ag-floating-filter-input" role="presentation">
                <ag-input-text-field data-ref="eFloatingFilterText"></ag-input-text-field>
            </div>`,[El]),this.eFloatingFilterText=B}wireBeans(e){this.columnNameService=e.columnNameService}destroy(){super.destroy()}init(e){this.params=e;const t=this.columnNameService.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.init(e)}},Fm=class extends re{wireBeans(e){this.columnNameService=e.columnNameService}getDefaultDebounceMs(){return 0}destroy(){super.destroy()}isEventFromFloatingFilter(e){return e&&e.afterFloatingFilter}isEventFromDataChange(e){return e==null?void 0:e.afterDataChange}getLastType(){return this.lastType}isReadOnly(){return this.readOnly}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.getDefaultOption();return}const t=e.operator;let i;t?i=e.conditions[0]:i=e,this.lastType=i.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const i=e;return this.isTypeEditable(i.type)}init(e){this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){this.optionsFactory=new lm,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),t||(this.lastType=this.optionsFactory.getDefaultOption()),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(this.optionsFactory.getDefaultOption());this.setEditable(i)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.setSimpleParams(e)}doesFilterHaveSingleInput(e){const t=this.optionsFactory.getCustomOption(e),{numberOfInputs:i}=t||{};return i==null||i==1}isTypeEditable(e){const t=["inRange","empty","blank","notBlank"];return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){const t=this.columnNameService.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();return`${t} ${i("ariaFilterInput","Filter Input")}`}},Ob=class extends Fm{constructor(){super(`
            <div class="ag-floating-filter-input" role="presentation">
                <ag-input-text-field data-ref="eReadOnlyText"></ag-input-text-field>
                <div data-ref="eDateWrapper" style="display: flex;"></div>
            </div>`,[El]),this.eReadOnlyText=B,this.eDateWrapper=B}wireBeans(e){super.wireBeans(e),this.context=e.context,this.userComponentFactory=e.userComponentFactory}getDefaultFilterOptions(){return Cm}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new wm(this.filterParams,this.localeService,this.optionsFactory);const t=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.params=e,this.filterParams=e.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){if(e){const i=e;this.dateComp.setDate(st(i.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){pe(this.eDateWrapper,e),pe(this.eReadOnlyText.getGui(),!e)}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(super.setLastTypeFromModel(e),this.updateCompOnModelChange(e))}onDateChanged(){const e=this.dateComp.getDate(),t=xt(e);this.params.parentFilterInstance(i=>{if(i){const s=st(t);i.onFloatingFilterChanged(this.getLastType()||null,s)}})}getDateComponentParams(){const e=Yu(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:qe(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}}createDateComponent(){this.dateComp=new vm(this.context,this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper,e=>{e.setInputAriaLabel(this.getAriaLabel(this.params))}),this.addDestroyFunc(()=>this.dateComp.destroy())}updateDateComponent(){const e=this.gos.addGridCommonParams(this.getDateComponentParams());this.dateComp.updateParams(e)}getFilterModelFormatter(){return this.filterModelFormatter}},Gb=class extends re{constructor(){super(`
            <div class="ag-filter-filter">
                <ag-input-text-field class="ag-date-filter" data-ref="eDateInput"></ag-input-text-field>
            </div>`,[El]),this.eDateInput=B}destroy(){super.destroy()}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus()},input:i=>{i.target===fe(this.gos)&&(this.eDateInput.isDisabled()||this.params.onDateChanged())}})}setParams(e){const t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&fi(),t.type=i?"date":"text";const{minValidYear:s,maxValidYear:r,minValidDate:o,maxValidDate:n}=e.filterParams||{};if(o&&s&&D("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),n&&r&&D("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),o&&n){const[l,a]=[o,n].map(c=>c instanceof Date?c:st(c));l&&a&&l.getTime()>a.getTime()&&D("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}o?o instanceof Date?t.min=eo(o):t.min=o:s&&(t.min=`${s}-01-01`),n?n instanceof Date?t.max=eo(n):t.max=n:r&&(t.max=`${r}-12-31`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}getDate(){return st(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(xt(e,!1))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){(!e||!e.suppressFocus)&&this.eDateInput.getInputElement().focus()}shouldUseBrowserDatePicker(e){return e.filterParams&&e.filterParams.browserDatePicker!=null?e.filterParams.browserDatePicker:WS()||_u()||fi()&&Wf()>=14.1}},xm=class extends P{constructor(e){super(),this.params=e,this.eFloatingFilterTextInput=B,this.valueChangedListener=()=>{}}setupGui(e){var s;this.eFloatingFilterTextInput=this.createManagedBean(new Ps((s=this.params)==null?void 0:s.config));const t=this.eFloatingFilterTextInput.getGui();e.appendChild(t);const i=r=>this.valueChangedListener(r);this.addManagedListeners(t,{input:i,keydown:i})}setEditable(e){this.eFloatingFilterTextInput.setDisabled(!e)}setAutoComplete(e){this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.eFloatingFilterTextInput.getValue()}setValue(e,t){this.eFloatingFilterTextInput.setValue(e,t)}setValueChangedListener(e){this.valueChangedListener=e}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)}},Pm=class extends Fm{constructor(){super(...arguments),this.eFloatingFilterInputContainer=B}postConstruct(){this.setTemplate(`
            <div class="ag-floating-filter-input" role="presentation" data-ref="eFloatingFilterInputContainer"></div>
        `)}getDefaultDebounceMs(){return 500}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))}init(e){this.setupFloatingFilterInputService(e),super.init(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){this.params=e;const t=e.browserAutoComplete??!1;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=ol(this.params.filterParams),!this.isReadOnly()){const i=Yu(this.params.filterParams,this.getDefaultDebounceMs()),s=qe(this.syncUpWithParentFilter.bind(this),i);this.floatingFilterInputService.setValueChangedListener(s)}}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const t=this.floatingFilterInputService.getValue();pt(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(t,!0)}syncUpWithParentFilter(e){const t=e.key===x.ENTER;if(this.applyActive&&!t)return;let i=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(i=fm(i),this.floatingFilterInputService.setValue(i,!0)),this.params.parentFilterInstance(s=>{s&&s.onFloatingFilterChanged(this.getLastType()||null,i||null)})}setEditable(e){this.floatingFilterInputService.setEditable(e)}},Nb=class extends P{constructor(){super(...arguments),this.valueChangedListener=()=>{},this.numberInputActive=!0}setupGui(e){this.eFloatingFilterNumberInput=this.createManagedBean(new qu),this.eFloatingFilterTextInput=this.createManagedBean(new Ps),this.eFloatingFilterTextInput.setDisabled(!0);const t=this.eFloatingFilterNumberInput.getGui(),i=this.eFloatingFilterTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,s=>this.valueChangedListener(s)),this.setupListeners(i,s=>this.valueChangedListener(s))}setEditable(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput}setValueChangedListener(e){this.valueChangedListener=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)}},Hb=class extends Pm{init(e){var t;super.init(e),this.filterModelFormatter=new hm(this.localeService,this.optionsFactory,(t=e.filterParams)==null?void 0:t.numberFormatter)}onParamsUpdated(e){this.refresh(e)}refresh(e){Tc(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return dm}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(e){return this.allowedCharPattern=Tc(e.filterParams),this.allowedCharPattern?this.createManagedBean(new xm({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new Nb)}},Bb=class extends Pm{init(e){super.init(e),this.filterModelFormatter=new pm(this.localeService,this.optionsFactory)}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return gm}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(){return this.createManagedBean(new xm)}};function Vb(e){var t;return!!((t=e.filterManager)!=null&&t.isQuickFilterPresent())}function zb(e){return e.gos.get("quickFilterText")}function Wb(e){var t;(t=e.filterManager)==null||t.resetQuickFilterCache()}var _b=class extends P{constructor(){super(...arguments),this.beanName="quickFilterService",this.quickFilter=null,this.quickFilterParts=null}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.rowModel=e.rowModel,this.pivotResultColsService=e.pivotResultColsService}postConstruct(){const e=this.resetQuickFilterCache.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{this.gos.get("includeHiddenColumnsInQuickFilter")||this.resetQuickFilterCache()}}),this.addManagedPropertyListener("quickFilterText",t=>this.setQuickFilter(t.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onQuickFilterColumnConfigChanged()),this.quickFilter=this.parseQuickFilter(this.gos.get("quickFilterText")),this.parser=this.gos.get("quickFilterParser"),this.matcher=this.gos.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setQuickFilterParserAndMatcher())}refreshQuickFilterCols(){var r;const e=this.columnModel.isPivotMode(),t=this.columnModel.getAutoCols(),i=this.columnModel.getColDefCols();let s=(e&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")?(r=this.pivotResultColsService.getPivotResultCols())==null?void 0:r.list:i)??[];t&&(s=s.concat(t)),this.colsForQuickFilter=this.gos.get("includeHiddenColumnsInQuickFilter")?s:s.filter(o=>o.isVisible()||o.isRowGroupActive())}isQuickFilterPresent(){return this.quickFilter!==null}doesRowPassQuickFilter(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(t,e):this.quickFilterParts.every(i=>t?this.doesRowPassQuickFilterCache(e,i):this.doesRowPassQuickFilterNoCache(e,i))}resetQuickFilterCache(){this.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}setQuickFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseQuickFilter(e){return M(e)?ae(this.gos)?e.toUpperCase():(D("Quick filtering only works with the Client-Side Row Model"),null):null}setQuickFilter(e){if(e!=null&&typeof e!="string"){D(`Grid option quickFilterText only supports string inputs, received: ${typeof e}`);return}const t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setQuickFilterParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),i=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,i&&(this.setQuickFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onQuickFilterColumnConfigChanged(){this.refreshQuickFilterCols(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassQuickFilterNoCache(e,t){return this.colsForQuickFilter.some(i=>{const s=this.getQuickFilterTextForColumn(i,e);return M(s)&&s.indexOf(t)>=0})}doesRowPassQuickFilterCache(e,t){return this.checkGenerateQuickFilterAggregateText(e),e.quickFilterAggregateText.indexOf(t)>=0}doesRowPassQuickFilterMatcher(e,t){let i;e?(this.checkGenerateQuickFilterAggregateText(t),i=t.quickFilterAggregateText):i=this.getQuickFilterAggregateText(t);const{quickFilterParts:s,matcher:r}=this;return r(s,i)}checkGenerateQuickFilterAggregateText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getQuickFilterAggregateText(e))}getQuickFilterTextForColumn(e,t){let i=this.valueService.getValue(e,t,!0);const s=e.getColDef();if(s.getQuickFilterText){const r=this.gos.addGridCommonParams({value:i,node:t,data:t.data,column:e,colDef:s});i=s.getQuickFilterText(r)}return M(i)?i.toString().toUpperCase():null}getQuickFilterAggregateText(e){const t=[];return this.colsForQuickFilter.forEach(i=>{const s=this.getQuickFilterTextForColumn(i,e);M(s)&&t.push(s)}),t.join(`
`)}},ed={version:z,moduleName:"@ag-grid-community/filter-core",beans:[jy]},Ub={version:z,moduleName:"@ag-grid-community/filter-api",apiFunctions:{isAnyFilterPresent:Ab,onFilterChanged:Ib},dependantModules:[ed]},td={version:z,moduleName:"@ag-grid-community/column-filter",beans:[kb],dependantModules:[ed]},jb={version:z,moduleName:"@ag-grid-community/column-filter-api",apiFunctions:{isColumnFilterPresent:yb,getFilterInstance:bb,getColumnFilterInstance:Rb,destroyFilter:Fb,setFilterModel:xb,getFilterModel:Pb,getColumnFilterModel:Eb,setColumnFilterModel:Db,showColumnFilter:Mb},dependantModules:[td,Ub]},Em={version:z,moduleName:"@ag-grid-community/floating-filter-core",controllers:[{name:"headerFilterCell",classImp:Sb}],dependantModules:[td]},Kb={version:z,moduleName:"@ag-grid-community/read-only-floating-filter",userComponents:[{name:"agReadOnlyFloatingFilter",classImp:Lb}],dependantModules:[Em]},$b={version:z,moduleName:"@ag-grid-community/simple-filter",dependantModules:[td],userComponents:[{name:"agTextColumnFilter",classImp:db},{name:"agNumberColumnFilter",classImp:ub},{name:"agDateColumnFilter",classImp:pb},{name:"agDateInput",classImp:Gb}]},Yb={version:z,moduleName:"@ag-grid-community/simple-floating-filter",dependantModules:[$b,Em],userComponents:[{name:"agTextColumnFloatingFilter",classImp:Bb},{name:"agNumberColumnFloatingFilter",classImp:Hb},{name:"agDateColumnFloatingFilter",classImp:Ob}]},Dm={version:z,moduleName:"@ag-grid-community/quick-filter-core",beans:[_b],dependantModules:[ed]},Qb={version:z,moduleName:"@ag-grid-community/quick-filter-api",apiFunctions:{isQuickFilterPresent:Vb,getQuickFilter:zb,resetQuickFilter:Wb},dependantModules:[Dm]},qb={version:z,moduleName:"@ag-grid-community/quick-filter",dependantModules:[Dm,Qb]},Xb={version:z,moduleName:"@ag-grid-community/filter",dependantModules:[Yb,Kb,qb,jb]},kc=(e=>(e.COLUMN_GROUP="group",e.COLUMN="column",e.FLOATING_FILTER="filter",e))(kc||{}),Zb=class extends P{constructor(){super(...arguments),this.beanName="headerNavigationService",this.currentHeaderRowWithoutSpan=-1}wireBeans(e){this.focusService=e.focusService,this.headerPositionUtils=e.headerPositionUtils,this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.visibleColService=e.visibleColsService}postConstruct(){this.ctrlsService.whenReady(this,t=>{this.gridBodyCon=t.gridBodyCtrl});const e=Se(this.gos);this.addManagedElementListeners(e,{mousedown:()=>this.setCurrentHeaderRowWithoutSpan(-1)})}getHeaderRowCount(){var e;return((e=this.ctrlsService.getHeaderRowContainerCtrl())==null?void 0:e.getRowCount())??0}getHeaderPositionForColumn(e,t){let i;if(typeof e=="string"?(i=this.columnModel.getCol(e),i||(i=this.visibleColService.getColumnGroup(e))):i=e,!i)return null;const s=this.ctrlsService.getHeaderRowContainerCtrl(),r=s==null?void 0:s.getAllCtrls(),o=j(r||[]).getType()==="filter",n=this.getHeaderRowCount()-1;let l=-1,a=i;for(;a;)l++,a=a.getParent();let c=l;return t&&o&&c===n-1&&c++,c===-1?null:{headerRowIndex:c,column:i}}navigateVertically(e,t,i){if(t||(t=this.focusService.getFocusedHeader()),!t)return!1;const{headerRowIndex:s}=t,r=t.column,o=this.getHeaderRowCount(),n=e===0;let{headerRowIndex:l,column:a,headerRowIndexWithoutSpan:c}=n?this.headerPositionUtils.getColumnVisibleParent(r,s):this.headerPositionUtils.getColumnVisibleChild(r,s),u=!1;return l<0&&(l=0,a=r,u=!0),l>=o?(l=-1,this.setCurrentHeaderRowWithoutSpan(-1)):c!==void 0&&(this.currentHeaderRowWithoutSpan=c),!u&&!a?!1:this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l,column:a},allowUserOverride:!0,event:i})}setCurrentHeaderRowWithoutSpan(e){this.currentHeaderRowWithoutSpan=e}navigateHorizontally(e,t=!1,i){const s=this.focusService.getFocusedHeader(),r=e===2,o=this.gos.get("enableRtl");let n,l;if(this.currentHeaderRowWithoutSpan!==-1?s.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=s.headerRowIndex,r!==o?(l="Before",n=this.headerPositionUtils.findHeader(s,l)):(l="After",n=this.headerPositionUtils.findHeader(s,l)),n||!t)return this.focusService.focusHeaderPosition({headerPosition:n,direction:l,fromTab:t,allowUserOverride:!0,event:i});if(t){const a=this.gos.getCallback("tabToNextHeader");if(a)return this.focusService.focusHeaderPositionFromUserFunc({userFunc:a,headerPosition:n,direction:l})}return this.focusNextHeaderRow(s,l,i)}focusNextHeaderRow(e,t,i){const s=e.headerRowIndex;let r=null,o;if(t==="Before"?s>0&&(o=s-1,this.currentHeaderRowWithoutSpan-=1,r=this.headerPositionUtils.findColAtEdgeForHeaderRow(o,"end")):(o=s+1,this.currentHeaderRowWithoutSpan<this.getHeaderRowCount()?this.currentHeaderRowWithoutSpan+=1:this.setCurrentHeaderRowWithoutSpan(-1),r=this.headerPositionUtils.findColAtEdgeForHeaderRow(o,"start")),!r)return!1;const{column:n,headerRowIndex:l}=this.headerPositionUtils.getHeaderIndexToFocus(r.column,r==null?void 0:r.headerRowIndex);return this.focusService.focusHeaderPosition({headerPosition:{column:n,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){if(e.getPinned())return;let i;if(be(e)){const s=e.getDisplayedLeafColumns();i=t==="Before"?j(s):s[0]}else i=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(i)}},Jb=class extends P{wireBeans(e){this.animationFrameService=e.animationFrameService,this.headerNavigationService=e.headerNavigationService,this.focusService=e.focusService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService,this.filterManager=e.filterManager,this.menuService=e.menuService}setComp(e,t,i){this.comp=e,this.eGui=t,this.createManagedBean(new xs(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),this.onPivotModeChanged(),this.setupHeaderHeight();const s=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:s}),this.mockContextMenuForIPad(s),this.ctrlsService.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>this.animationFrameService.requestAnimationFrame(()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}getHeaderHeight(){return this.headerHeight}setHeaderHeight(){var o;const{columnModel:e}=this;let t=0;const i=this.columnModel.getGroupRowsHeight().reduce((n,l)=>n+l,0),s=this.columnModel.getColumnHeaderRowHeight();if((o=this.filterManager)!=null&&o.hasFloatingFilters()&&(t+=e.getFloatingFiltersHeight()),t+=i,t+=s,this.headerHeight===t)return;this.headerHeight=t;const r=`${t+1}px`;this.comp.setHeightAndMinHeight(r),this.eventService.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(){const e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)}onDisplayedColumnsChanged(){const t=this.visibleColsService.getAllCols().some(i=>i.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",t)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),i=e.shiftKey,s=i!==t?2:3;(this.headerNavigationService.navigateHorizontally(s,!0,e)||!i&&this.focusService.focusOverlay(!1)||this.focusService.focusNextGridCoreContainer(i,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;switch(e.key){case x.LEFT:t=2;case x.RIGHT:{M(t)||(t=3),this.headerNavigationService.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case x.UP:t=0;case x.DOWN:{M(t)||(t=1),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e;!t&&this.eGui.contains(fe(this.gos))||this.eGui.contains(t)||this.focusService.clearFocusedHeader()}onHeaderContextMenu(e,t,i){var r;if(!e&&!i||!this.menuService.isHeaderContextMenuEnabled())return;const{target:s}=e??t;(s===this.eGui||s===((r=this.ctrlsService.getHeaderRowContainerCtrl())==null?void 0:r.getViewportElement()))&&this.menuService.showHeaderContextMenu(void 0,e,i)}mockContextMenuForIPad(e){if(!Yi())return;const t=new Hi(this.eGui),i=s=>{e(void 0,s.touchStart,s.touchEvent)};this.addManagedListeners(t,{longTap:i}),this.addDestroyFunc(()=>t.destroy())}},id=class extends P{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}wireBeans(e){this.visibleColsService=e.visibleColsService,this.scrollVisibleService=e.scrollVisibleService}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=Le(this.gos,"print"),t=this.visibleColsService.getBodyContainerWidth(),i=this.visibleColsService.getColsLeftWidth(),s=this.visibleColsService.getDisplayedColumnsRightWidth();let r;e?r=t+i+s:(r=t,this.addSpacer&&(this.gos.get("enableRtl")?i:s)===0&&this.scrollVisibleService.isVerticalScrollShowing()&&(r+=this.scrollVisibleService.getScrollbarWidth())),this.callback(r)}},eR=class extends P{constructor(e){super(),this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}wireBeans(e){this.funcColsService=e.funcColsService}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(i=>{i.isPrimary()&&(i.isAnyFunctionActive()||(i.isAllowValue()?this.columnsToAggregate.push(i):i.isAllowRowGroup()?this.columnsToGroup.push(i):i.isAllowPivot()&&this.columnsToPivot.push(i)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){this.columnsToAggregate.length>0&&this.funcColsService.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.funcColsService.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.funcColsService.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function Mm(e){const{isFromHeader:t,fromLeft:i,xPosition:s,fromEnter:r,fakeEvent:o,pinned:n,gos:l,columnModel:a,columnMoveService:c,visibleColsService:u}=e;let{allMovingColumns:d}=e;if(t){const b=[];d.forEach(F=>{var L;let R=null,E=F.getParent();for(;E!=null&&E.getDisplayedLeafColumns().length===1;)R=E,E=E.getParent();R!=null?(!!((L=R.getColGroupDef())!=null&&L.marryChildren)?R.getProvidedColumnGroup().getLeafColumns():R.getLeafColumns()).forEach(V=>{b.includes(V)||b.push(V)}):b.includes(F)||b.push(F)}),d=b}const h=d.slice();a.sortColsLikeCols(h);const g=rR({movingCols:h,draggingRight:i,xPosition:s,pinned:n,gos:l,columnModel:a,visibleColsService:u}),v=tR(h,a);if(g.length===0)return;const w=g[0];let S=v!==null&&!r;if(t&&(S=v!==null),S&&!o&&(!i&&w>=v||i&&w<=v))return;const f=u.getAllCols(),p=[];let m=null;for(let b=0;b<g.length;b++){const F=g[b],R=c.getProposedColumnOrder(h,F);if(!c.doesOrderPassRules(R))continue;const E=R.filter(A=>f.includes(A));if(m===null)m=E;else if(!$i(E,m))break;const L=iR(R);p.push({move:F,fragCount:L})}if(p.length===0)return;p.sort((b,F)=>b.fragCount-F.fragCount);const y=p[0].move;if(!(y>a.getCols().length-d.length))return{columns:d,toIndex:y}}function sd(e){const{columns:t,toIndex:i}=Mm(e)||{},{finished:s,columnMoveService:r}=e;return!t||i==null?null:(r.moveColumns(t,i,"uiColumnMoved",s),s?null:{columns:t,toIndex:i})}function tR(e,t){const i=t.getCols(),s=Uw(e.map(a=>i.indexOf(a))),r=s[0];return j(s)-r!==s.length-1?null:r}function iR(e){function t(s){const r=[];let o=s.getOriginalParent();for(;o!=null;)r.push(o),o=o.getOriginalParent();return r}let i=0;for(let s=0;s<e.length-1;s++){let r=t(e[s]),o=t(e[s+1]);[r,o]=r.length>o.length?[r,o]:[o,r],r.forEach(n=>{o.indexOf(n)===-1&&i++})}return i}function sR(e,t){switch(t){case"left":return e.getLeftCols();case"right":return e.getRightCols();default:return e.getCenterCols()}}function rR(e){const{movingCols:t,draggingRight:i,xPosition:s,pinned:r,gos:o,columnModel:n,visibleColsService:l}=e;if(o.get("suppressMovableColumns")||t.some(m=>m.getColDef().suppressMovable))return[];const c=sR(l,r),u=n.getCols(),d=c.filter(m=>ds(t,m)),h=c.filter(m=>!ds(t,m)),g=u.filter(m=>!ds(t,m));let v=0,w=s;if(i){let m=0;d.forEach(y=>m+=y.getActualWidth()),w-=m}if(w>0){for(let m=0;m<h.length;m++){const y=h[m];if(w-=y.getActualWidth(),w<0)break;v++}i&&v++}let S;if(v>0){const m=h[v-1];S=g.indexOf(m)+1}else S=g.indexOf(h[0]),S===-1&&(S=0);const f=[S],p=(m,y)=>m-y;if(i){let m=S+1;const y=u.length-1;for(;m<=y;)f.push(m),m++;f.sort(p)}else{let m=S;const y=u.length-1;let b=u[m];for(;m<=y&&c.indexOf(b)<0;)m++,f.push(m),b=u[m];m=S-1;const F=0;for(;m>=F;)f.push(m),m--;f.sort(p).reverse()}return f}function nl(e){var c;const{pinned:t,fromKeyboard:i,gos:s,ctrlsService:r,useHeaderRow:o,skipScrollPadding:n}=e;let l=(c=r.getHeaderRowContainerCtrl(t))==null?void 0:c.getViewportElement(),{x:a}=e;return l?(i&&(a-=l.getBoundingClientRect().left),s.get("enableRtl")&&(o&&(l=l.querySelector(".ag-header-row")),a=l.clientWidth-a),t==null&&!n&&(a+=r.get("center").getCenterViewportScrollLeft()),a):0}function Js(e,t){for(const i of e)i.setMoving(t,"uiColumnMoved")}var Vh=7,Ac=100,tn=Ac/2,oR=5,nR=100,lR=class extends P{constructor(e){super(),this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.isCenterContainer=!M(e)}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.columnMoveService=e.columnMoveService,this.dragAndDropService=e.dragAndDropService,this.ctrlsService=e.ctrlsService}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){var t;const e=((t=this.lastDraggingEvent)==null?void 0:t.dragItem.columns)??[];for(const i of e){const s=i.getPinned();if(i.getColDef().lockPinned){if(s==this.pinned)return"move";continue}if(s===this.pinned||!this.pinned)return"move";if(!s&&this.pinned)return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem.columns;if(e.dragSource.type===0)this.setColumnsVisible(t,!0,"uiColumnDragged");else{const s=e.dragItem.visibleState,r=(t||[]).filter(o=>s[o.getId()]);this.setColumnsVisible(r,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(t,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,s=!1){const r=this.gos.get("suppressMoveWhenColumnDragging");if(s&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!s&&K(e.hDirection))return;const{pinned:o,gos:n,ctrlsService:l}=this,a=nl({x:e.x,pinned:o,gos:n,ctrlsService:l});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,i,a,s):this.handleColumnDragWhileAllowingMovement(e,t,i,a,s)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){if(!e)return;const s=e.filter(r=>!r.getColDef().lockVisible);this.columnModel.setColsVisible(s,t,i)}finishColumnMoving(){if(this.clearHighlighted(),!this.lastMovedInfo)return;const{columns:e,toIndex:t}=this.lastMovedInfo;this.columnMoveService.moveColumns(e,t,"uiColumnMoved",!0)}handleColumnDragWhileSuppressingMovement(e,t,i,s,r){const o=this.getAllMovingColumns(e,!0);if(r){const n=this.isAttemptingToPin(o);n&&this.attemptToPinColumns(o,void 0,!0);const{fromLeft:l,xPosition:a}=this.getNormalisedXPositionInfo(o,n)||{};if(l==null||a==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:o,xPosition:a,fromEnter:t,fakeEvent:i,fromLeft:l})}else{if(!this.dragAndDropService.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(o,s)}}handleColumnDragWhileAllowingMovement(e,t,i,s,r){const o=this.getAllMovingColumns(e),n=this.normaliseDirection(e.hDirection)===1,l=e.dragSource.type===1,a=this.getMoveColumnParams({allMovingColumns:o,isFromHeader:l,xPosition:s,fromLeft:n,fromEnter:t,fakeEvent:i}),c=sd({...a,finished:r});c&&(this.lastMovedInfo=c)}getAllMovingColumns(e,t=!1){const i=e.dragSource.getDragItem();let s=null;t?(s=i.columnsInSplit,s||(s=i.columns)):s=i.columns;const r=o=>o.getColDef().lockPinned?o.getPinned()==this.pinned:!0;return s?s.filter(r):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:i,xPosition:s,fromLeft:r,fromEnter:o,fakeEvent:n}=e,{pinned:l,gos:a,columnModel:c,columnMoveService:u,visibleColsService:d}=this;return{allMovingColumns:t,isFromHeader:i,fromLeft:r,xPosition:s,pinned:l,fromEnter:o,fakeEvent:n,gos:a,columnModel:c,columnMoveService:u,visibleColsService:d}}findFirstAndLastMovingColumns(e){const t=e.length;let i,s;for(let r=0;r<=t;r++){if(!i){const o=e[r];o.getLeft()!=null&&(i=o)}if(!s){const o=e[t-1-r];o.getLeft()!=null&&(s=o)}if(i&&s)break}return{firstMovingCol:i,lastMovingCol:s}}highlightHoveredColumn(e,t){var u;const{gos:i,columnModel:s}=this,r=i.get("enableRtl"),o=s.getCols().filter(d=>d.isVisible()&&d.getPinned()===this.pinned);let n=null,l=null,a=null;for(const d of o){if(l=d.getActualWidth(),n=this.getNormalisedColumnLeft(d,0,r),n!=null){const h=n+l;if(n<=t&&h>=t){a=d;break}}n=null,l=null}if(a)e.indexOf(a)!==-1&&(a=null);else{for(let d=o.length-1;d>=0;d--){const h=o[d],g=o[d].getParent();if(!g){a=h;break}const v=g==null?void 0:g.getDisplayedLeafColumns();if(v.length){a=j(v);break}}if(!a)return;n=this.getNormalisedColumnLeft(a,0,r),l=a.getActualWidth()}if(((u=this.lastHighlightedColumn)==null?void 0:u.column)!==a&&this.clearHighlighted(),a==null||n==null||l==null)return;let c;t-n<l/2!==r?c=0:c=1,a.setHighlighted(c),this.lastHighlightedColumn={column:a,position:c}}getNormalisedXPositionInfo(e,t){const{gos:i,visibleColsService:s}=this,r=i.get("enableRtl"),{firstMovingCol:o,column:n,position:l}=this.getColumnMoveAndTargetInfo(e,t,r);if(!o||!n||l==null)return;const a=s.getAllCols(),c=a.indexOf(o),u=a.indexOf(n),d=l===0!==r,h=c<u||c===u&&!d;let g=0;if(d?h&&(g-=1):h||(g+=1),u+g===c)return;const v=a[u+g];if(!v)return;const w=this.getNormalisedColumnLeft(v,20,r);return{fromLeft:h,xPosition:w}}getColumnMoveAndTargetInfo(e,t,i){const s=this.lastHighlightedColumn||{},{firstMovingCol:r,lastMovingCol:o}=this.findFirstAndLastMovingColumns(e);if(!r||!o||s.column||!t)return{firstMovingCol:r,...s};const l=this.getPinDirection()==="left";return{firstMovingCol:r,position:l?1:0,column:l!==i?r:o}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case 0:return 1;case 1:return 0}return e}getNormalisedColumnLeft(e,t,i){const{gos:s,ctrlsService:r}=this,o=e.getLeft();if(o==null)return null;const n=e.getActualWidth();return nl({x:i?o+n-t:o+t,pinned:e.getPinned(),useHeaderRow:i,skipScrollPadding:!0,gos:s,ctrlsService:r})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,i=this.failedMoveAttempts>Vh;return t&&i||e.some(s=>s.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:i,fromEnter:s,fakeEvent:r,fromLeft:o}=e,n=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:i,fromLeft:o,fromEnter:s,fakeEvent:r}),{columns:l,toIndex:a}=Mm(n)||{};l&&a!=null&&(this.lastMovedInfo={columns:l,toIndex:a}),this.finishColumnMoving()}clearHighlighted(){this.lastHighlightedColumn&&(this.lastHighlightedColumn.column.setHighlighted(null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.ctrlsService.get("center"),i=t.getCenterViewportScrollLeft(),s=i+t.getCenterWidth();this.gos.get("enableRtl")?(this.needToMoveRight=e<i+tn,this.needToMoveLeft=e>s-tn):(this.needToMoveLeft=e<i+tn,this.needToMoveRight=e>s-tn),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){var e;this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),nR),(e=this.dragAndDropService.getDragAndDropImageComponent())==null||e.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){var e;this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,(e=this.dragAndDropService.getDragAndDropImageComponent())==null||e.setIcon(this.getIconName()))}moveInterval(){var s,r;let e;this.intervalCount++,e=10+this.intervalCount*oR,e>Ac&&(e=Ac);let t=null;const i=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{if(this.failedMoveAttempts++,this.failedMoveAttempts<=Vh+1)return;if((s=this.dragAndDropService.getDragAndDropImageComponent())==null||s.setIcon("pinned"),!this.gos.get("suppressMoveWhenColumnDragging")){const o=(r=this.lastDraggingEvent)==null?void 0:r.dragItem.columns;this.attemptToPinColumns(o,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,i=!1){const s=(e||[]).filter(r=>!r.getColDef().lockPinned);return s.length?(i&&(t=this.getPinDirection()),this.columnModel.setColsPinned(s,t,"uiColumnDragged"),i&&this.dragAndDropService.nudge(),s.length):0}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}},aR=class extends P{wireBeans(e){this.dragAndDropService=e.dragAndDropService,this.columnModel=e.columnModel,this.ctrlsService=e.ctrlsService}constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){this.ctrlsService.whenReady(this,e=>{switch(this.pinned){case"left":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.left.getContainerElement()],[e.bottomLeft.getContainerElement()],[e.topLeft.getContainerElement()]];break;case"right":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.right.getContainerElement()],[e.bottomRight.getContainerElement()],[e.topRight.getContainerElement()]];break;default:this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.center.getViewportElement()],[e.bottomCenter.getViewportElement()],[e.topCenter.getViewportElement()]];break}}),this.moveColumnFeature=this.createManagedBean(new lR(this.pinned)),this.bodyDropPivotTarget=this.createManagedBean(new eR(this.pinned)),this.dragAndDropService.addDropTarget(this),this.addDestroyFunc(()=>this.dragAndDropService.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.columnModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},cR=class extends P{wireBeans(e){this.horizontalResizeService=e.horizontalResizeService,this.pinnedWidthService=e.pinnedWidthService,this.ctrlsService=e.ctrlsService,this.columnSizeService=e.columnSizeService,this.columnAutosizeService=e.columnAutosizeService}constructor(e,t,i,s,r){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=s,this.ctrl=r}postConstruct(){const e=[];let t,i;const s=()=>{if(pe(this.eResize,t),!t)return;const n=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(e.push(n),i){const l=this.gos.get("skipHeaderOnAutoSize"),a=()=>{this.columnAutosizeService.autoSizeColumn(this.column,"uiColumnResized",l)};this.eResize.addEventListener("dblclick",a);const c=new Hi(this.eResize);c.addEventListener("doubleTap",a),e.push(()=>{this.eResize.removeEventListener("dblclick",a),c.removeEventListener("doubleTap",a),c.destroy()})}},r=()=>{e.forEach(n=>n()),e.length=0},o=()=>{const n=this.column.isResizable(),l=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(n!==t||l!==i)&&(t=n,i=l,r(),s())};o(),this.addDestroyFunc(r),this.ctrl.setRefreshFunction("resize",o)}onResizing(e,t){const{column:i,lastResizeAmount:s,resizeStartWidth:r}=this,o=this.normaliseResizeAmount(t),n=r+o,l=[{key:i,newWidth:n}];if(this.column.getPinned()){const a=this.pinnedWidthService.getPinnedLeftWidth(),c=this.pinnedWidthService.getPinnedRightWidth(),u=Io(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(a+c+(o-s)>u)return}this.lastResizeAmount=o,this.columnSizeService.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const i=this.pinned!=="left",s=this.pinned==="right";return this.gos.get("enableRtl")?i&&(t*=-1):s&&(t*=-1),t}},uR=class extends P{constructor(e){super(),this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1,this.column=e}wireBeans(e){this.rowModel=e.rowModel,this.selectionService=e.selectionService}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(fe(this.gos))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new ju),this.cbSelectAll.addCssClass("ag-header-select-all"),Bt(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedEventListeners({newColumnsLoaded:this.onNewColumnsLoaded.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:this.onSelectionChanged.bind(this),paginationChanged:this.onSelectionChanged.bind(this),modelUpdated:this.onModelChanged.bind(this)}),this.addManagedListeners(this.cbSelectAll,{fieldValueChanged:this.onCbSelectAll.bind(this)}),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onNewColumnsLoaded(){this.showOrHideSelectAll()}onDisplayedColumnsChanged(){this.isAlive()&&this.showOrHideSelectAll()}showOrHideSelectAll(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.selectionService.getSelectAllState(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(e);const t=this.selectionService.hasNodesToSelect(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setDisabled(!t),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(){const e=this.localeService.getLocaleTextFunc(),i=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),s=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll",`${s} (${i})`):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel(e("ariaHeaderSelection","Column with Header Selection")),this.headerCellCtrl.announceAriaDescription()}checkSelectionType(e){return Sf(this.gos)?!0:(D(`${e} is only available if using 'multiRow' selection mode.`),!1)}checkRightRowModelType(e){return ae(this.gos)||Xt(this.gos)?!0:(D(`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${this.rowModel.getType()}.`),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.isFilteredOnly(),i=this.isCurrentPageOnly();let s="uiSelectAll";i?s="uiSelectAllCurrentPage":t&&(s="uiSelectAllFiltered");const r={source:s,justFiltered:t,justCurrentPage:i};e?this.selectionService.selectAllRowNodes(r):this.selectionService.deselectAllRowNodes(r)}isCheckboxSelection(){const e=this.gos.get("rowSelection"),t=typeof e=="object"&&qn(e)&&cr(this.column),i=this.column.getColDef().headerCheckboxSelection;let s=!1;return t?s=!0:typeof i=="function"?s=i(this.gos.addGridCommonParams({column:this.column,colDef:this.column.getColDef()})):s=!!i,s&&this.checkRightRowModelType(t?"headerCheckbox":"headerCheckboxSelection")&&this.checkSelectionType(t?"headerCheckbox":"headerCheckboxSelection")}isFilteredOnly(){const e=this.gos.get("rowSelection");return typeof e=="object"?e.mode==="multiRow"&&e.selectAll==="filtered":!!this.column.getColDef().headerCheckboxSelectionFilteredOnly}isCurrentPageOnly(){const e=this.gos.get("rowSelection");return typeof e=="object"?e.mode==="multiRow"&&e.selectAll==="currentPage":!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly}},dR=class extends Dl{constructor(e,t,i){super(e,t,i),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map,this.column=e}setComp(e,t,i,s,r){this.comp=e,r=ko(this,this.beans.context,r),this.setGui(t,r),this.updateState(),this.setupWidth(r),this.setupMovingCss(r),this.setupMenuClass(r),this.setupSortableClass(r),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:s,checkMeasuringCallback:n=>this.setRefreshFunction("measuring",n),compBean:r}),this.addColumnHoverListener(r),this.setupFilterClass(r),this.setupClassesFromColDef(),this.setupTooltip(r),this.addActiveHeaderMouseListeners(r),this.setupSelectAll(r),this.setupUserComp(r),this.refreshAria(),this.resizeFeature=r.createManagedBean(new cR(this.getPinned(),this.column,i,e,this)),r.createManagedBean(new Ju([this.column],t)),r.createManagedBean(new Zu(this.column,t,this.beans)),r.createManagedBean(new xs(t,{shouldStopEventPropagation:n=>this.shouldStopEventPropagation(n),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(r),r.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],()=>this.refresh(r)),r.addManagedListeners(this.column,{colDefChanged:()=>this.refresh(r)}),r.addManagedListeners(this.column,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const o=()=>this.checkDisplayName(r);r.addManagedEventListeners({columnValueChanged:o,columnRowGroupChanged:o,columnPivotChanged:o,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),r.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){if(!this.column.isResizable())return;const i=this.column.getActualWidth(),s=this.column.getMinWidth(),r=this.column.getMaxWidth(),o=Math.min(Math.max(i+e,s),r);this.beans.columnSizeService.setColumnWidths([{key:this.column,newWidth:o}],t,!0,"uiColumnResized")}moveHeader(e){const{eGui:t,beans:i,column:s,ctrlsService:r}=this,{gos:o,columnModel:n,columnMoveService:l,visibleColsService:a}=i,c=this.getPinned(),u=t.getBoundingClientRect().left,d=s.getActualWidth(),h=o.get("enableRtl"),v=nl({x:e===0!==h?u-20:u+d+20,pinned:c,fromKeyboard:!0,gos:o,ctrlsService:r}),w=this.focusService.getFocusedHeader();sd({allMovingColumns:[s],isFromHeader:!0,fromLeft:e===1,xPosition:v,pinned:c,fromEnter:!1,fakeEvent:!1,gos:o,columnModel:n,columnMoveService:l,visibleColsService:a,finished:!0}),r.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(s,"auto"),(!this.isAlive()||this.beans.gos.get("ensureDomOrder"))&&w&&this.restoreFocus(w)}restoreFocus(e){this.focusService.focusHeaderPosition({headerPosition:{...e,column:this.column}})}setupUserComp(e){const t=this.lookupUserCompDetails(e);this.setCompDetails(t)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(e){const t=this.createParams(e),i=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(i,t)}createParams(e){return this.gos.addGridCommonParams({column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&this.menuService.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!this.openFilterEnabled||this.menuService.isLegacyMenuEnabled(),showColumnMenu:i=>{this.menuService.showColumnMenu({column:this.column,buttonElement:i,positionBy:"button"})},showColumnMenuAfterMouseClick:i=>{this.menuService.showColumnMenu({column:this.column,mouseEvent:i,positionBy:"mouse"})},showFilter:i=>{this.menuService.showFilterMenu({column:this.column,buttonElement:i,containerType:"columnFilter",positionBy:"button"})},progressSort:i=>{this.beans.sortController.progressSort(this.column,!!i,"uiColumnSorted")},setSort:(i,s)=>{this.beans.sortController.setSortForColumn(this.column,i,!!s,"uiColumnSorted")},eGridHeader:this.getGui(),setTooltip:(i,s)=>{this.setupTooltip(e,i,s)}})}setupSelectAll(e){this.selectAllFeature=e.createManagedBean(new uR(this.column)),this.selectAllFeature.setComp(this)}getSelectAllGui(){return this.selectAllFeature.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===x.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===x.ENTER&&this.onEnterKeyDown(e),e.key===x.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){if(e.ctrlKey||e.metaKey)this.showMenuOnKeyPress(e,!0);else if(this.sortable){const t=e.shiftKey;this.beans.sortController.progressSort(this.column,t,"uiColumnSorted")}}showMenuOnKeyPress(e,t){const i=this.comp.getUserCompInstance();!i||!(i instanceof Ec)||i.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){if(!this.getGui().contains(e.relatedTarget)){const t=this.getRowIndex();this.focusService.setFocusedHeader(t,this.column),this.announceAriaDescription()}this.focusService.isKeyboardMode()&&this.setActiveHeader(!0)}onFocusOut(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t,i){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const s=this.gos.get("tooltipShowMode")==="whenTruncated",r=this.eGui,o=this.column.getColDef();!i&&s&&!o.headerComponent&&(i=()=>{const a=r.querySelector(".ag-header-cell-text");return a?a.scrollWidth>a.clientWidth:!0});const n={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>t??this.column.getColDef().headerTooltip,shouldDisplayTooltip:i},l=e.createManagedBean(new vr(n));this.setRefreshFunction("tooltip",()=>l.refreshToolTip())}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),i=Sm(t,this.gos,this.column,null),s=this.userHeaderClasses;this.userHeaderClasses=new Set(i),i.forEach(r=>{s.has(r)?s.delete(r):this.comp.addOrRemoveCssClass(r,!0)}),s.forEach(r=>this.comp.addOrRemoveCssClass(r,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){if(this.dragSourceElement=e,this.removeDragSource(),!e||!this.draggable)return;const{column:t,beans:i,displayName:s,dragAndDropService:r,gos:o}=this,{columnModel:n}=i;let l=!this.gos.get("suppressDragLeaveHidesColumns");const a=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>l?"hide":"notAllowed",getDragItem:()=>this.createDragItem(t),dragItemName:s,onDragStarted:()=>{l=!o.get("suppressDragLeaveHidesColumns"),Js([t],!0)},onDragStopped:()=>Js([t],!1),onDragCancelled:()=>Js([t],!1),onGridEnter:c=>{var u;if(l){const d=((u=c==null?void 0:c.columns)==null?void 0:u.filter(h=>!h.getColDef().lockVisible))||[];n.setColsVisible(d,!0,"uiColumnMoved")}},onGridExit:c=>{var u;if(l){const d=((u=c==null?void 0:c.columns)==null?void 0:u.filter(h=>!h.getColDef().lockVisible))||[];n.setColsVisible(d,!1,"uiColumnMoved")}}};r.addDragSource(a,!0)}createDragItem(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}updateState(){this.menuEnabled=this.menuService.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=this.menuService.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(e){this.updateState(),this.refreshHeaderComp(e),this.refreshAria(),Object.values(this.refreshFunctions).forEach(t=>t())}refreshHeaderComp(e){const t=this.lookupUserCompDetails(e);(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==t.componentClass?this.attemptHeaderCompRefresh(t.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(t)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.columnNameService.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(e){this.displayName!==this.calculateDisplayName()&&this.refresh(e)}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const i=this.column.getActualWidth();this.comp.setWidth(`${i}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const i=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",i),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,i=e===1;this.comp.addOrRemoveCssClass("ag-header-highlight-before",t),this.comp.addOrRemoveCssClass("ag-header-highlight-after",i)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:i,beans:s}=this,r=this.beans.columnModel.getGroupRowsHeight(),o=r.reduce((d,h)=>d+=h,0)===0;if(i.addOrRemoveCssClass("ag-header-parent-hidden",o),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),i.addOrRemoveCssClass("ag-header-span-height",!1),i.addOrRemoveCssClass("ag-header-span-total",!1);return}const{numberOfParents:n,isSpanningTotal:l}=this.column.getColumnGroupPaddingInfo();i.addOrRemoveCssClass("ag-header-span-height",n>0);const{columnModel:a}=s,c=a.getColumnHeaderRowHeight();if(n===0){i.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${c}px`);return}i.addOrRemoveCssClass("ag-header-span-total",l);let u=0;for(let d=0;d<n;d++)u+=r[r.length-1-d];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${c+u}px`)}refreshAriaSort(){if(this.sortable){const e=this.localeService.getLocaleTextFunc(),t=this.beans.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(bS(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!this.menuService.isLegacyMenuEnabled()){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.localeService.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){t!=null?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(fe(this.beans.gos)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,i)=>t==="filter"?-1:i.charCodeAt(0)-t.charCodeAt(0)).map(t=>this.ariaDescriptionProperties.get(t)).join(". ");this.beans.ariaAnnouncementService.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){const t=()=>{if(!this.gos.get("columnHoverHighlight"))return;const i=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",i)};e.addManagedEventListeners({columnHoverChanged:t}),t()}getColId(){return this.column.getColId()}addActiveHeaderMouseListeners(e){const t=r=>this.handleMouseOverChange(r.type==="mouseenter"),i=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column),s=r=>this.handleContextMenuMouseEvent(r,void 0,this.column);e.addManagedListeners(this.getGui(),{mouseenter:t,mouseleave:t,click:i,contextmenu:s})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventService.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return t instanceof Ec?t.getAnchorElementForMenu(e):this.getGui()}destroy(){super.destroy()}},hR=class extends P{wireBeans(e){this.horizontalResizeService=e.horizontalResizeService,this.autoWidthCalculator=e.autoWidthCalculator,this.visibleColsService=e.visibleColsService,this.columnSizeService=e.columnSizeService,this.columnAutosizeService=e.columnAutosizeService}constructor(e,t,i,s){super(),this.eResize=t,this.comp=e,this.pinned=i,this.columnGroup=s}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const e=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(e),!this.gos.get("suppressAutoSize")){const t=this.gos.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",()=>{const i=[];this.columnGroup.getDisplayedLeafColumns().forEach(r=>{r.getColDef().suppressAutoSize||i.push(r.getColId())}),i.length>0&&this.columnAutosizeService.autoSizeCols({colKeys:i,skipHeader:t,stopAtGroup:this.columnGroup,source:"uiColumnResized"}),this.resizeLeafColumnsToFit("uiColumnResized")})}}onResizeStart(e){const t=this.getInitialValues(e);this.storeLocalValues(t),this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){const s=this.normaliseDragChange(t),r=this.resizeStartWidth+s;this.resizeColumnsFromLocalValues(r,i,e)}getInitialValues(e){const t=this.getColumnsToResize(),i=this.getInitialSizeOfColumns(t),s=this.getSizeRatiosOfColumns(t,i),r={columnsToResize:t,resizeStartWidth:i,resizeRatios:s};let o=null;if(e&&(o=this.visibleColsService.getGroupAtDirection(this.columnGroup,"After")),o){const n=o.getDisplayedLeafColumns(),l=r.groupAfterColumns=n.filter(c=>c.isResizable()),a=r.groupAfterStartWidth=this.getInitialSizeOfColumns(l);r.groupAfterRatios=this.getSizeRatiosOfColumns(l,a)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}storeLocalValues(e){const{columnsToResize:t,resizeStartWidth:i,resizeRatios:s,groupAfterColumns:r,groupAfterStartWidth:o,groupAfterRatios:n}=e;this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=s,this.resizeTakeFromCols=r,this.resizeTakeFromStartWidth=o,this.resizeTakeFromRatios=n}clearLocalValues(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}resizeLeafColumnsToFit(e){const t=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)}resizeColumnsFromLocalValues(e,t,i=!0){if(!this.resizeCols||!this.resizeRatios)return;const s={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols??void 0,groupAfterStartWidth:this.resizeTakeFromStartWidth??void 0,groupAfterRatios:this.resizeTakeFromRatios??void 0};this.resizeColumns(s,e,t,i)}resizeColumns(e,t,i,s=!0){const{columnsToResize:r,resizeStartWidth:o,resizeRatios:n,groupAfterColumns:l,groupAfterStartWidth:a,groupAfterRatios:c}=e,u=[];if(u.push({columns:r,ratios:n,width:t}),l){const d=t-o;u.push({columns:l,ratios:c,width:a-d})}this.columnSizeService.resizeColumnSets({resizeSets:u,finished:s,source:i}),s&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}getInitialSizeOfColumns(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}getSizeRatiosOfColumns(e,t){return e.map(i=>i.getActualWidth()/t)}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.clearLocalValues()}},gR=class extends P{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.addEventListener("widthChanged",e),t.addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.removeEventListener("widthChanged",e),t.removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",e===0)}},pR=class extends Dl{constructor(e,t,i){super(e,t,i),this.onSuppressColMoveChange=()=>{if(!this.isAlive()||this.isSuppressMoving())this.removeDragSource();else if(!this.dragSource){const s=this.getGui();this.setDragSource(s)}},this.column=e}setComp(e,t,i,s,r){this.comp=e,r=ko(this,this.beans.context,r),this.setGui(t,r),this.displayName=this.beans.columnNameService.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(r),this.setupExpandable(r),this.setupTooltip(r),this.setupAutoHeight({wrapperElement:s,compBean:r}),this.setupUserComp(r),this.addHeaderMouseListeners(r),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const o=this.getParentRowCtrl().getPinned(),n=this.column.getProvidedColumnGroup().getLeafColumns();r.createManagedBean(new Ju(n,t)),r.createManagedBean(new Zu(this.column,t,this.beans)),r.createManagedBean(new gR(e,this.column)),this.resizeFeature=r.createManagedBean(new hR(e,i,o,this.column)),r.createManagedBean(new xs(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(r,n),r.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(r),r.addDestroyFunc(()=>this.clearComponent())}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,i=e.get("groupHeaderHeight");i!=null?i===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(i):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const i of t)e.addManagedListeners(i,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,i)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),i=t[0]===e,s=j(t)===e;if(!i&&!s)return;const r=e.getHighlighted(),o=!!this.getParentRowCtrl().findHeaderCellCtrl(a=>a.getColumnGroupChild().isMoving());let n=!1,l=!1;if(o){const a=this.beans.gos.get("enableRtl"),c=r===1,u=r===0;i&&(a?l=c:n=u),s&&(a?n=u:l=c)}this.comp.addOrRemoveCssClass("ag-header-highlight-before",n),this.comp.addOrRemoveCssClass("ag-header-highlight-after",l)}getColumn(){return this.column}resizeHeader(e,t){if(!this.resizeFeature)return;const i=this.resizeFeature.getInitialValues(t);this.resizeFeature.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}moveHeader(e){const{beans:t,eGui:i,column:s,ctrlsService:r}=this,{gos:o,columnModel:n,columnMoveService:l,visibleColsService:a}=t,c=o.get("enableRtl"),u=e===0,d=this.getPinned(),h=i.getBoundingClientRect(),g=h.left,v=h.width,w=nl({x:u!==c?g-20:g+v+20,pinned:d,fromKeyboard:!0,gos:o,ctrlsService:r}),S=s.getGroupId(),f=this.focusService.getFocusedHeader();sd({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,fromLeft:e===1,xPosition:w,pinned:d,fromEnter:!1,fakeEvent:!1,gos:o,columnModel:n,columnMoveService:l,visibleColsService:a,finished:!0});const p=s.getDisplayedLeafColumns(),m=u?p[0]:j(p);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(m,"auto"),(!this.isAlive()||this.beans.gos.get("ensureDomOrder"))&&f&&this.restoreFocus(S,s,f)}restoreFocus(e,t,i){const s=t.getLeafColumns();if(!s.length)return;const r=s[0].getParent();if(!r)return;const o=this.findGroupWidthId(r,e);o&&this.focusService.focusHeaderPosition({headerPosition:{...i,column:o}})}findGroupWidthId(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}return null}resizeLeafColumnsToFit(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e)}setupUserComp(e){const t=this.gos.addGridCommonParams({displayName:this.displayName,columnGroup:this.column,setExpanded:s=>{this.beans.columnModel.setColumnGroupOpened(this.column.getProvidedColumnGroup(),s,"gridInitializing")},setTooltip:(s,r)=>{this.setupTooltip(e,s,r)}}),i=this.userComponentFactory.getHeaderGroupCompDetails(t);this.comp.setUserCompDetails(i)}addHeaderMouseListeners(e){const t=r=>this.handleMouseOverChange(r.type==="mouseenter"),i=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),s=r=>this.handleContextMenuMouseEvent(r,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.getGui(),{mouseenter:t,mouseleave:t,click:i,contextmenu:s})}handleMouseOverChange(e){this.eventService.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t,i){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const s=this.column.getColGroupDef(),r=this.gos.get("tooltipShowMode")==="whenTruncated",o=this.eGui;!i&&r&&!(s!=null&&s.headerGroupComponent)&&(i=()=>{const l=o.querySelector(".ag-header-group-text");return l?l.scrollWidth>l.clientWidth:!0});const n={getColumn:()=>this.column,getGui:()=>o,getLocation:()=>"headerGroup",getTooltipValue:()=>t??(s&&s.headerTooltip),shouldDisplayTooltip:i};s&&(n.getColDef=()=>s),e.createManagedBean(new vr(n))}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const i=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:i,expandableChanged:i})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0)}getColId(){return this.column.getUniqueId()}addClasses(){const e=this.column.getColGroupDef(),t=Sm(e,this.gos,null,this.column);this.column.isPadding()?(t.push("ag-header-group-cell-no-group"),this.column.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&t.push("ag-header-span-height")):(t.push("ag-header-group-cell-with-group"),e!=null&&e.wrapHeaderText&&t.push("ag-header-cell-wrap-text")),t.forEach(i=>this.comp.addOrRemoveCssClass(i,!0))}setupMovingCss(e){const i=this.column.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving());i.forEach(r=>{e.addManagedListeners(r,{movingChanged:s})}),s()}onFocusIn(e){if(!this.eGui.contains(e.relatedTarget)){const t=this.getRowIndex();this.beans.focusService.setFocusedHeader(t,this.column)}}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===x.ENTER){const i=this.column,s=!i.isExpanded();this.beans.columnModel.setColumnGroupOpened(i.getProvidedColumnGroup(),s,"uiColumnExpanded")}}setDragSource(e){if(!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),!e))return;const{beans:t,column:i,displayName:s,gos:r,dragAndDropService:o}=this,{columnModel:n}=t,l=i.getProvidedColumnGroup().getLeafColumns();let a=!r.get("suppressDragLeaveHidesColumns");const c=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",dragItemName:s,getDragItem:()=>this.getDragItemForGroup(i),onDragStarted:()=>{a=!r.get("suppressDragLeaveHidesColumns"),Js(l,!0)},onDragStopped:()=>Js(l,!1),onDragCancelled:()=>Js(l,!1),onGridEnter:u=>{if(a){const{columns:d=[],visibleState:h}=u??{},g=d.filter(v=>!v.getColDef().lockVisible&&(!h||h[v.getColId()]));n.setColsVisible(g,!0,"uiColumnMoved")}},onGridExit:u=>{var d;if(a){const h=((d=u==null?void 0:u.columns)==null?void 0:d.filter(g=>!g.getColDef().lockVisible))||[];n.setColsVisible(h,!1,"uiColumnMoved")}}};o.addDragSource(c,!0)}getDragItemForGroup(e){const t=e.getProvidedColumnGroup().getLeafColumns(),i={};t.forEach(n=>i[n.getId()]=n.isVisible());const s=[];this.beans.visibleColsService.getAllCols().forEach(n=>{t.indexOf(n)>=0&&(s.push(n),Xe(t,n))}),t.forEach(n=>s.push(n));const r=[],o=e.getLeafColumns();for(const n of s)o.indexOf(n)!==-1&&r.push(n);return{columns:s,columnsInSplit:r,visibleState:i}}isSuppressMoving(){let e=!1;return this.column.getLeafColumns().forEach(i=>{(i.getColDef().suppressMovable||i.getColDef().lockPosition)&&(e=!0)}),e||this.gos.get("suppressMovableColumns")}destroy(){super.destroy()}},fR=0,va=class extends P{constructor(e,t,i){super(),this.instanceId=fR++,this.rowIndex=e,this.pinned=t,this.type=i;const s=i=="group"?"ag-header-row-column-group":i=="filter"?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${s}`}wireBeans(e){this.beans=e}postConstruct(){this.isPrintLayout=Le(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.getHeaderCellCtrls().every(e=>e.getGui()!=null):!1}setComp(e,t,i=!0){this.comp=e,t=ko(this,this.beans.context,t),i&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getHeaderRowClass(){return this.headerRowClass}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this);e.addManagedEventListeners({columnResized:this.onColumnResized.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}getHeaderCellCtrl(e){if(this.headerCellCtrls)return Cn(this.headerCellCtrls).find(t=>t.getColumnGroupChild()===e)}onDisplayedColumnsChanged(){this.isPrintLayout=Le(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}getType(){return this.type}onColumnResized(){this.setWidth()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleColsService:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{columnModel:e,filterManager:t}=this.beans,i=[],s=e.getGroupRowsHeight(),r=e.getColumnHeaderRowHeight();i.push(...s),i.push(r),t!=null&&t.hasFloatingFilters()&&i.push(e.getFloatingFiltersHeight());let o=0;for(let l=0;l<this.rowIndex;l++)o+=i[l];const n=i[this.rowIndex];return{topOffset:o,rowHeight:n}}getPinned(){return this.pinned}getRowIndex(){return this.rowIndex}onVirtualColumnsChanged(e=!1){const t=this.getHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)}getHeaderCtrls(){const e=this.headerCellCtrls;this.headerCellCtrls=new Map;const t=this.getColumnsInViewport();for(const s of t)this.recycleAndCreateHeaderCtrls(s,e);const i=s=>{const{focusService:r,visibleColsService:o}=this.beans;return r.isHeaderWrapperFocused(s)?o.isVisible(s.getColumnGroupChild()):!1};if(e)for(const[s,r]of e)i(r)?this.headerCellCtrls.set(s,r):this.destroyBean(r);return this.getHeaderCellCtrls()}getHeaderCellCtrls(){var e;return Array.from(((e=this.headerCellCtrls)==null?void 0:e.values())??[])}recycleAndCreateHeaderCtrls(e,t){if(!this.headerCellCtrls||e.isEmptyGroup())return;const i=e.getUniqueId();let s;if(t&&(s=t.get(i),t.delete(i)),s&&s.getColumnGroupChild()!=e&&(this.destroyBean(s),s=void 0),s==null)switch(this.type){case"filter":{s=this.createBean(this.beans.ctrlsFactory.getInstance("headerFilterCell",e,this.beans,this));break}case"group":s=this.createBean(new pR(e,this.beans,this));break;default:s=this.createBean(new dR(e,this.beans,this));break}this.headerCellCtrls.set(i,s)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(this.pinned!=null)return[];let e=[];const t=this.getActualDepth(),{columnViewportService:i}=this.beans;return["left",null,"right"].forEach(s=>{const r=i.getHeadersToRender(s,t);e=e.concat(r)}),e}getActualDepth(){return this.type=="filter"?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.columnViewportService.getHeadersToRender(this.pinned,this.getActualDepth())}findHeaderCellCtrl(e){if(!this.headerCellCtrls)return;const t=this.getHeaderCellCtrls();let i;return typeof e=="function"?i=t.find(e):i=t.find(s=>s.getColumnGroupChild()==e),i}focusHeader(e,t){const i=this.findHeaderCellCtrl(e);return i?i.focus(t):!1}destroy(){var e;(e=this.headerCellCtrls)==null||e.forEach(t=>{this.destroyBean(t)}),this.headerCellCtrls=void 0,super.destroy()}},mR=class extends P{constructor(e){super(),this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[],this.pinned=e}wireBeans(e){this.ctrlsService=e.ctrlsService,this.scrollVisibleService=e.scrollVisibleService,this.pinnedWidthService=e.pinnedWidthService,this.columnModel=e.columnModel,this.focusService=e.focusService,this.filterManager=e.filterManager}setComp(e,t){this.comp=e,this.eViewport=t,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport);const i=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:i,advancedFilterEnabledChanged:i});const s=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;this.ctrlsService.register(s,this),this.columnModel.isReady()&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const t=new dr,i=this.focusService.getFocusHeaderToUseAfterRefresh(),s=()=>{const l=this.columnModel.getHeaderRowCount()-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let a=0;a<l;a++){const c=this.createBean(new va(t.next(),this.pinned,"group"));this.groupsRowCtrls.push(c)}},r=()=>{const l=t.next(),a=!this.hidden&&(this.columnsRowCtrl==null||!e||this.columnsRowCtrl.getRowIndex()!==l);(a||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),a&&(this.columnsRowCtrl=this.createBean(new va(l,this.pinned,"column")))},o=()=>{var c;this.includeFloatingFilter=!!((c=this.filterManager)!=null&&c.hasFloatingFilters())&&!this.hidden;const l=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){l();return}const a=t.next();if(this.filtersRowCtrl){const u=this.filtersRowCtrl.getRowIndex()!==a;(!e||u)&&l()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new va(a,this.pinned,"filter")))};s(),r(),o();const n=this.getAllCtrls();this.comp.setCtrls(n),this.restoreFocusOnHeader(i)}getHeaderCtrlForColumn(e){var t;if(Wi(e))return(t=this.columnsRowCtrl)==null?void 0:t.getHeaderCellCtrl(e);if(this.groupsRowCtrls.length!==0)for(let i=0;i<this.groupsRowCtrls.length;i++){const s=this.groupsRowCtrls[i].getHeaderCellCtrl(e);if(s)return s}}getHtmlElementForColumnHeader(e){const t=this.getHeaderCtrlForColumn(e);return t?t.getGui():null}getRowType(e){const i=this.getAllCtrls()[e];return i?i.getType():void 0}focusHeader(e,t,i){const r=this.getAllCtrls()[e];return r?r.focusHeader(t,i):!1}getViewportElement(){return this.eViewport}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.getViewportElement(),{scroll:e})}destroy(){this.filtersRowCtrl&&(this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)),this.columnsRowCtrl&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),this.groupsRowCtrls&&this.groupsRowCtrls.length&&(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls)),super.destroy()}setupDragAndDrop(e){const t=new aR(this.pinned,e);this.createManagedBean(t)}restoreFocusOnHeader(e){if(!e)return;const{column:t}=e;t.getPinned()==this.pinned&&this.focusService.focusHeaderPosition({headerPosition:e})}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(){var t;const e=((t=this.filterManager)==null?void 0:t.hasFloatingFilters())&&!this.hidden;this.includeFloatingFilter!==e&&this.refresh(!0)}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new id(e=>this.comp.setCenterWidth(`${e}px`),!0))}setupPinnedWidth(){if(this.pinned==null)return;const e=this.pinned==="left",t=this.pinned==="right";this.hidden=!0;const i=()=>{const s=e?this.pinnedWidthService.getPinnedLeftWidth():this.pinnedWidthService.getPinnedRightWidth();if(s==null)return;const r=s==0,o=this.hidden!==r,n=this.gos.get("enableRtl"),l=this.scrollVisibleService.getScrollbarWidth(),c=this.scrollVisibleService.isVerticalScrollShowing()&&(n&&e||!n&&t)?s+l:s;this.comp.setPinnedContainerWidth(`${c}px`),this.comp.setDisplayed(!r),o&&(this.hidden=r,this.refresh())};this.addManagedEventListeners({leftPinnedWidthChanged:i,rightPinnedWidthChanged:i,scrollVisibilityChanged:i,scrollbarWidthChanged:i})}},rd=class extends P{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.getDomLayout(),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},i=t.autoHeight?"ag-layout-auto-height":t.print?"ag-layout-print":"ag-layout-normal";this.view.updateLayoutClasses(i,t)}getDomLayout(){const e=this.gos.get("domLayout")??"normal";return["normal","print","autoHeight"].indexOf(e)===-1?(D(`${e} is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.`),"normal"):e}},vR=class extends re{constructor(){super(`
            <div class="ag-overlay" role="presentation">
                <div class="ag-overlay-panel" role="presentation">
                    <div class="ag-overlay-wrapper" data-ref="eOverlayWrapper" role="presentation"></div>
                </div>
            </div>`),this.eOverlayWrapper=B,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeOverlayWrapperCssClass=null,this.elToFocusAfter=null}wireBeans(e){this.overlayService=e.overlayService,this.focusService=e.focusService,this.visibleColsService=e.visibleColsService}handleKeyDown(e){if(e.key!==x.TAB||e.defaultPrevented||li(e)||this.focusService.findNextFocusableElement(this.eOverlayWrapper,!1,e.shiftKey))return;let i=!1;e.shiftKey?i=this.focusService.focusGridView(j(this.visibleColsService.getAllCols()),!0,!1):i=this.focusService.focusNextGridCoreContainer(!1),i&&e.preventDefault()}updateLayoutClasses(e,t){const i=this.eOverlayWrapper.classList;i.toggle("ag-layout-auto-height",t.autoHeight),i.toggle("ag-layout-normal",t.normal),i.toggle("ag-layout-print",t.print)}postConstruct(){this.createManagedBean(new rd(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&t.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i,s){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,!!e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),i&&this.focusService.isGridFocused()){const r=fe(this.gos);r&&!ff(this.gos)&&(this.elToFocusAfter=r)}e.then(r=>{if(this.activePromise!==e){this.activeOverlay!==r&&(this.destroyBean(r),r=null);return}if(this.activePromise=null,!r)return;if(this.activeOverlay!==r&&(this.eOverlayWrapper.appendChild(r.getGui()),this.activeOverlay=r,s)){const n=r;this.updateListenerDestroyFunc=this.addManagedPropertyListener(s,({currentValue:l})=>{var a;(a=n.refresh)==null||a.call(n,this.gos.addGridCommonParams({...l??{}}))})}const o=this.focusService;i&&o.isGridFocused()&&o.focusInto(this.eOverlayWrapper)})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){var s;this.activePromise=null;const e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.focusService.isGridFocused()&&(t=null);const i=this.updateListenerDestroyFunc;i&&(i(),this.updateListenerDestroyFunc=null),this.destroyBean(e),pt(this.eOverlayWrapper),(s=t==null?void 0:t.focus)==null||s.call(t,{preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.overlayService.setOverlayWrapperComp(void 0),super.destroy()}},Tm=class extends re{constructor(e,t){super(),this.direction=t,this.eViewport=B,this.eContainer=B,this.hideTimeout=null,this.setTemplate(e)}wireBeans(e){this.animationFrameService=e.animationFrameService}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",_f()||Yi())}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=jf(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0),i=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:i,touchend:i})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame(()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout!==null&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=null),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=null},400)}})}attemptSettingScrollPosition(e){const t=this.getViewportElement();Aw(()=>qt(t),()=>this.setScrollPosition(e),100)}getViewportElement(){return this.eViewport}getContainer(){return this.eContainer}onScrollCallback(e){this.addManagedElementListeners(this.getViewportElement(),{scroll:e})}},CR=class extends Tm{constructor(){super(`<div class="ag-body-horizontal-scroll" aria-hidden="true">
            <div class="ag-horizontal-left-spacer" data-ref="eLeftSpacer"></div>
            <div class="ag-body-horizontal-scroll-viewport" data-ref="eViewport">
                <div class="ag-body-horizontal-scroll-container" data-ref="eContainer"></div>
            </div>
            <div class="ag-horizontal-right-spacer" data-ref="eRightSpacer"></div>
        </div>`,"horizontal"),this.eLeftSpacer=B,this.eRightSpacer=B}wireBeans(e){super.wireBeans(e),this.visibleColsService=e.visibleColsService,this.pinnedRowModel=e.pinnedRowModel,this.ctrlsService=e.ctrlsService,this.scrollVisibleService=e.scrollVisibleService}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.ctrlsService.register("fakeHScrollComp",this),this.createManagedBean(new id(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}onPinnedRowDataChanged(){this.refreshCompBottom()}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleService.isVerticalScrollShowing();let t=this.visibleColsService.getDisplayedColumnsRightWidth();const i=!this.enableRtl&&e,s=this.scrollVisibleService.getScrollbarWidth();i&&(t+=s),Nt(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=s);let r=this.visibleColsService.getColsLeftWidth();this.enableRtl&&e&&(r+=s),Nt(this.eLeftSpacer,r),this.eLeftSpacer.classList.toggle("ag-scroller-corner",r<=s)}setScrollVisible(){const e=this.scrollVisibleService.isHorizontalScrollShowing(),t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),s=e&&this.scrollVisibleService.getScrollbarWidth()||0,o=i?0:s===0&&t?16:s;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),Xr(this.getGui(),o),Xr(this.eViewport,o),Xr(this.eContainer,o),this.setDisplayed(e,{skipAriaHidden:!0})}getScrollPosition(){return il(this.getViewportElement(),this.enableRtl)}setScrollPosition(e){qt(this.getViewportElement())||this.attemptSettingScrollPosition(e),sl(this.getViewportElement(),e,this.enableRtl)}},km=class extends P{wireBeans(e){this.maxDivHeightScaler=e.rowContainerHeightService}constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this)})}onHeightChanged(){const e=this.maxDivHeightScaler.getUiContainerHeight(),t=e!=null?`${e}px`:"";this.eContainer.style.height=t,this.eViewport&&(this.eViewport.style.height=t)}},wR=class extends Tm{wireBeans(e){super.wireBeans(e),this.ctrlsService=e.ctrlsService,this.scrollVisibleService=e.scrollVisibleService}constructor(){super(`<div class="ag-body-vertical-scroll" aria-hidden="true">
            <div class="ag-body-vertical-scroll-viewport" data-ref="eViewport">
                <div class="ag-body-vertical-scroll-container" data-ref="eContainer"></div>
            </div>
        </div>`,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new km(this.eContainer)),this.ctrlsService.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this)})}setScrollVisible(){const e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.invisibleScrollbar,i=e&&this.scrollVisibleService.getScrollbarWidth()||0,s=i===0&&t?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),Nt(this.getGui(),s),Nt(this.eViewport,s),Nt(this.eContainer,s),this.setDisplayed(e,{skipAriaHidden:!0})}onRowContainerHeightChanged(){const{ctrlsService:e}=this,i=e.getGridBodyCtrl().getBodyViewportElement(),s=this.getScrollPosition(),r=i.scrollTop;s!=r&&this.setScrollPosition(r,!0)}getScrollPosition(){return this.getViewportElement().scrollTop}setScrollPosition(e,t){!t&&!qt(this.getViewportElement())&&this.attemptSettingScrollPosition(e),this.getViewportElement().scrollTop=e}},Ic=(e=>(e.FakeHScrollbar="fakeHScrollComp",e.Header="centerHeader",e.PinnedTop="topCenter",e.PinnedBottom="bottomCenter",e.StickyTop="stickyTopCenter",e.StickyBottom="stickyBottomCenter",e))(Ic||{}),SR=class extends P{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.eBodyViewport=e,this.resetLastHScrollDebounced=qe(()=>this.lastScrollSource[1]=null,500),this.resetLastVScrollDebounced=qe(()=>this.lastScrollSource[0]=null,500)}wireBeans(e){this.ctrlsService=e.ctrlsService,this.animationFrameService=e.animationFrameService,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService,this.rowModel=e.rowModel,this.heightScaler=e.rowContainerHeightService,this.rowRenderer=e.rowRenderer,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this)}),this.ctrlsService.whenReady(this,e=>{this.centerRowsCtrl=e.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.getViewportElement(),{scroll:this.onHScroll.bind(this,"Viewport")});for(const e of Object.values(Ic)){const t=this.ctrlsService.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsService.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),i=t?qe(this.onVScroll.bind(this,"Viewport"),100):this.onVScroll.bind(this,"Viewport"),s=t?qe(this.onVScroll.bind(this,"fakeVScrollComp"),100):this.onVScroll.bind(this,"fakeVScrollComp");this.addManagedElementListeners(this.eBodyViewport,{scroll:i}),this.registerScrollPartner(e,s)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...Object.values(Ic),"Viewport"]){if(this.lastScrollSource[1]===t)continue;const i=this.getViewportForSource(t);sl(i,e,this.enableRtl)}}getViewportForSource(e){return e==="Viewport"?this.centerRowsCtrl.getViewportElement():this.ctrlsService.get(e).getViewportElement()}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.getViewportElement(),{scrollLeft:i}=t;if(this.shouldBlockScrollUpdate(1,i,!0))return;const s=il(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(s),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;e==="Viewport"?t=this.eBodyViewport.scrollTop:t=this.ctrlsService.get("fakeVScrollComp").getScrollPosition(),!this.shouldBlockScrollUpdate(0,t,!0)&&(this.animationFrameService.setScrollTop(t),this.nextScrollTop=t,e==="Viewport"?this.ctrlsService.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,this.gos.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())}doHorizontalScroll(e){const t=this.ctrlsService.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(()=>{this.eventService.dispatchEvent({...t,type:"bodyScrollEnd"})},100)}shouldBlockScrollUpdate(e,t,i=!1){return i&&!Yi()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Vu(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return e<0||e+t>i}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.getViewportElement();if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>i}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll("Viewport")}scrollGridIfNeeded(){const e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e}setHorizontalScrollPosition(e,t=!1){const s=this.centerRowsCtrl.getViewportElement().scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:s:e=Math.min(Math.max(e,0),s)),sl(this.centerRowsCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.eBodyViewport.scrollTop=e}getVScrollPosition(){return this.lastScrollTop=this.eBodyViewport.scrollTop,this.lastOffsetHeight=this.eBodyViewport.offsetHeight,{top:this.lastScrollTop,bottom:this.lastScrollTop+this.lastOffsetHeight}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.centerRowsCtrl.isHorizontalScrollShowing()}scrollHorizontally(e){const t=this.centerRowsCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.getViewportElement().scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const i=this.rowModel.getRowCount();let s=-1;for(let r=0;r<i;r++){const o=this.rowModel.getRow(r);if(typeof e=="function"){if(o&&e(o)){s=r;break}}else if(e===o||e===o.data){s=r;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t){if(Le(this.gos,"print"))return;const i=this.rowModel.getRowCount();if(typeof e!="number"||e<0||e>=i){D("Invalid row index for ensureIndexVisible: "+e);return}const r=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.getFrameworkOverrides().wrapIncoming(()=>{var u;r||(u=this.paginationService)==null||u.goToPageWithIndex(e);const o=this.ctrlsService.getGridBodyCtrl(),n=o.getStickyTopHeight(),l=o.getStickyBottomHeight(),a=this.rowModel.getRow(e);let c;do{const d=a.rowTop,h=a.rowHeight,g=this.pageBoundsService.getPixelOffset(),v=a.rowTop-g,w=v+a.rowHeight,S=this.getVScrollPosition(),f=this.heightScaler.getDivStretchOffset(),p=S.top+f,m=S.bottom+f,y=m-p,b=this.heightScaler.getScrollPositionForPixel(v),F=this.heightScaler.getScrollPositionForPixel(w-y),R=Math.min((b+F)/2,v),E=p+n>v,L=m-l<w;let A=null;t==="top"?A=b:t==="bottom"?A=F:t==="middle"?A=R:E?A=b-n:L&&(A=F+l),A!==null&&(this.setVerticalScrollPosition(A),this.rowRenderer.redraw({afterScroll:!0})),c=d!==a.rowTop||h!==a.rowHeight}while(c);this.animationFrameService.flushAllFrames()})}ensureColumnVisible(e,t="auto"){const i=this.columnModel.getCol(e);if(!i||i.isPinned()||!this.visibleColsService.isColDisplayed(i))return;const s=this.getPositionedHorizontalScroll(i,t);this.getFrameworkOverrides().wrapIncoming(()=>{s!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(s),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()})}setScrollPosition(e,t){this.getFrameworkOverrides().wrapIncoming(()=>{this.centerRowsCtrl.setCenterViewportScrollLeft(t),this.setVerticalScrollPosition(e),this.rowRenderer.redraw({afterScroll:!0}),this.animationFrameService.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:i,columnAfterEnd:s}=this.isColumnOutsideViewport(e),r=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),o=this.centerRowsCtrl.getCenterWidth(),n=this.enableRtl;let l=(n?i:s)||r,a=n?s:i;t!=="auto"&&(l=t==="start",a=t==="end");const c=t==="middle";if(l||a||c){const{colLeft:u,colMiddle:d,colRight:h}=this.getColumnBounds(e);return c?d-o/2:l?n?h:u:n?u-o:h-o}return null}isColumnOutsideViewport(e){const{start:t,end:i}=this.getViewportBounds(),{colLeft:s,colRight:r}=this.getColumnBounds(e),o=this.enableRtl,n=o?t>r:i<r,l=o?i<s:t>s;return{columnBeforeStart:n,columnAfterEnd:l}}getColumnBounds(e){const t=this.enableRtl,i=this.visibleColsService.getBodyContainerWidth(),s=e.getActualWidth(),r=e.getLeft(),o=t?-1:1,n=t?i-r:r,l=n+s*o,a=n+s/2*o;return{colLeft:n,colMiddle:a,colRight:l}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),i=t,s=e+t;return{start:i,end:s,width:e}}},yR=class extends P{wireBeans(e){this.animationFrameService=e.animationFrameService,this.ctrlsService=e.ctrlsService,this.pinnedWidthService=e.pinnedWidthService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.columnSizeService=e.columnSizeService,this.scrollVisibleService=e.scrollVisibleService,this.columnViewportService=e.columnViewportService}constructor(e){super(),this.centerContainerCtrl=e}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const e=()=>{this.animationFrameService.requestAnimationFrame(()=>{this.onCenterViewportResized()})};this.centerContainerCtrl.registerViewportResizeListener(e),this.gridBodyCtrl.registerBodyViewportResizeListener(e)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleService.onCentreViewportResized(),this.centerContainerCtrl.isViewportInTheDOMTree()){this.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnSizeService.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.getBodyViewportElement(),t=Io(e);if(t<=50)return;let i=this.getPinnedColumnsOverflowingViewport(t-50);const s=this.gos.getCallback("processUnpinnedColumns");i.length&&(s&&(i=s({columns:i,viewportWidth:t})),this.columnModel.setColsPinned(i,null,"viewportSizeFeature"))}getPinnedColumnsOverflowingViewport(e){const t=this.pinnedWidthService.getPinnedRightWidth(),i=this.pinnedWidthService.getPinnedLeftWidth(),s=t+i;if(s<e)return[];const r=[...this.visibleColsService.getLeftCols()],o=[...this.visibleColsService.getRightCols()];let n=0,l=0;const a=0,c=[];let u=s-a-e;for(;(l<r.length||n<o.length)&&u>0;){if(n<o.length){const d=o[n++];u-=d.getActualWidth(),c.push(d)}if(l<r.length&&u>0){const d=r[l++];u-=d.getActualWidth(),c.push(d)}}return c}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.getBodyViewportElement(),t=Vu(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventService.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)}isHorizontalScrollShowing(){return this.centerContainerCtrl.isHorizontalScrollShowing()}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.columnViewportService.setScrollPosition(e,t)}},bR=class extends P{wireBeans(e){this.dragService=e.dragService,this.rangeService=e.rangeService}constructor(e){super(),this.eContainer=e}postConstruct(){if(!this.rangeService)return;this.params={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)},this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{gi(this.gos)?this.enableFeature():this.disableFeature()}),this.addDestroyFunc(()=>this.disableFeature()),gi(this.gos)&&this.enableFeature()}enableFeature(){this.dragService.addDragSource(this.params)}disableFeature(){this.dragService.removeDragSource(this.params)}},RR=class extends re{constructor(){super(`
            <div class="ag-selection-checkbox" role="presentation">
                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
            </div>`,[Ku]),this.eCheckbox=B}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.localeService.getLocaleTextFunc(),t=this.rowNode.isSelected(),i=Hu(e,t),[s,r]=this.rowNode.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],o=e(s,r);this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel(`${o} (${i})`)}onClicked(e,t,i){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:i.shiftKey,groupSelectsFiltered:t,event:i,source:"checkboxSelected"})}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:s=>ar(s),click:s=>{ar(s);const r=Lu(this.gos)==="filteredDescendants",o=this.eCheckbox.getValue();this.shouldHandleIndeterminateState(o,r)?this.onClicked(!0,r,s||{})===0&&this.onClicked(!1,r,s):o?this.onClicked(!1,r,s):this.onClicked(!0,r,s||{})}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),Iu(this.gos)||typeof this.getIsVisible()=="function"){const s=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:s}),this.addManagedListeners(this.rowNode,{dataChanged:s,cellChanged:s}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}shouldHandleIndeterminateState(e,t){return t&&(this.eCheckbox.getPreviousValue()===void 0||e===void 0)&&ae(this.gos)}showOrHideSelect(){var r,o,n;let e=this.rowNode.selectable;const t=this.getIsVisible();if(e)if(typeof t=="function"){const l=(r=this.overrides)==null?void 0:r.callbackParams;if(!this.column)e=t({...l,node:this.rowNode,data:this.rowNode.data});else{const a=this.column.createColumnFunctionCallbackParams(this.rowNode);e=t({...l,...a})}}else e=t??!1;const i=this.gos.get("rowSelection");if(i&&typeof i!="string"?!Nw(i):(o=this.column)==null?void 0:o.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!e),this.setVisible(!0),this.setDisplayed(!0);return}if((n=this.overrides)!=null&&n.removeHidden){this.setDisplayed(e);return}this.setVisible(e)}getIsVisible(){var t,i;if(this.overrides)return this.overrides.isVisible;const e=this.gos.get("rowSelection");return e&&typeof e!="string"?lr(e):(i=(t=this.column)==null?void 0:t.getColDef())==null?void 0:i.checkboxSelection}},FR=class extends re{constructor(e,t,i){super('<div class="ag-drag-handle ag-row-drag" draggable="true"></div>'),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(ut("rowDrag",this.gos,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const t=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0);const i=()=>{try{const s=JSON.stringify(this.rowNode.data);e.dataTransfer.setData("application/json",s),e.dataTransfer.setData("text/plain",s)}catch{}};if(t){const s=this.gos.addGridCommonParams({rowNode:this.rowNode,dragEvent:e});t(s)}else i()}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},xR=class extends P{constructor(e,t){super(),this.staticClasses=[],this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const e=this.column.getColDef(),{cellClassRules:t}=e,i=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:e,column:this.column,rowIndex:this.rowNode.rowIndex});this.beans.stylingService.processClassRules(t===this.cellClassRules?void 0:this.cellClassRules,t,i,s=>this.cellComp.addOrRemoveCssClass(s,!0),s=>this.cellComp.addOrRemoveCssClass(s,!1)),this.cellClassRules=t}applyUserStyles(){const e=this.column.getColDef();if(!e.cellStyle)return;let t;if(typeof e.cellStyle=="function"){const i=this.beans.gos.addGridCommonParams({column:this.column,value:this.cellCtrl.getValue(),colDef:e,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex}),s=e.cellStyle;t=s(i)}else t=e.cellStyle;t&&this.cellComp.setUserStyles(t)}applyClassesFromColDef(){const e=this.column.getColDef(),t=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:e,rowIndex:this.rowNode.rowIndex});this.staticClasses.length&&this.staticClasses.forEach(i=>this.cellComp.addOrRemoveCssClass(i,!1)),this.staticClasses=this.beans.stylingService.getStaticCellClasses(e,t),this.staticClasses.length&&this.staticClasses.forEach(i=>this.cellComp.addOrRemoveCssClass(i,!0))}destroy(){super.destroy()}},PR=class extends P{constructor(e,t,i,s,r){super(),this.cellCtrl=e,this.beans=t,this.rowNode=s,this.rowCtrl=r}setComp(e){this.eGui=e}onKeyDown(e){const t=e.key;switch(t){case x.ENTER:this.onEnterKeyDown(e);break;case x.F2:this.onF2KeyDown(e);break;case x.ESCAPE:this.onEscapeKeyDown(e);break;case x.TAB:this.onTabKeyDown(e);break;case x.BACKSPACE:case x.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case x.DOWN:case x.UP:case x.RIGHT:case x.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,t,this.cellCtrl.getCellPosition(),!0),e.preventDefault())}onShiftRangeSelect(e){if(!this.beans.rangeService)return;const t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t)}onTabKeyDown(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:i,beans:s,rowNode:r}=this,{gos:o,rangeService:n,eventService:l}=s;if(!i.isEditing()){if(l.dispatchEvent({type:"keyShortcutChangedCellStart"}),ab(e,o.get("enableCellEditingOnBackspace"))){if(n&&gi(o))n.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(i.isCellEditable()){const a=i.getColumn(),c=this.beans.valueService.getDeleteValue(a,r);r.setDataValue(a,c,"cellClear")}}else i.startRowOrCellEdit(e,t);l.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gos.get("enterNavigatesVertically")){const t=e.shiftKey?x.UP:x.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(x.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()}onF2KeyDown(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(x.F2,e)}onEscapeKeyDown(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.isEditing())return;const s=e.key;s===" "?this.onSpaceKeyDown(e):this.cellCtrl.startRowOrCellEdit(s,e)&&e.preventDefault()}onSpaceKeyDown(e){const{gos:t}=this.beans;if(!this.cellCtrl.isEditing()&&Yn(t)){const i=this.rowNode.isSelected(),s=!i,r=Lu(t)==="filteredDescendants",o=this.rowNode.setSelectedParams({newValue:s,rangeSelect:e.shiftKey,groupSelectsFiltered:r,event:e,source:"spaceKey"});i===void 0&&o===0&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:r,event:e,source:"spaceKey"})}e.preventDefault()}destroy(){super.destroy()}},ER=class extends P{constructor(e,t,i){super(),this.cellCtrl=e,this.beans=t,this.column=i}onMouseEvent(e,t){if(!li(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.isDoubleClickOnIPad()){this.onCellDoubleClicked(e),e.preventDefault();return}const{eventService:t,rangeService:i,gos:s}=this.beans,r=e.ctrlKey||e.metaKey;i&&r&&i.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&i.intersectLastRange(!0);const o=this.cellCtrl.createEvent(e,"cellClicked");t.dispatchEvent(o);const n=this.column.getColDef();n.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{n.onCellClicked(o)})},0),(s.get("singleClickEdit")||n.singleClickEdit)&&!s.get("suppressClickEdit")&&!(e.shiftKey&&(i==null?void 0:i.getCellRanges().length)!=0)&&this.cellCtrl.startRowOrCellEdit()}isDoubleClickOnIPad(){if(!Yi()||Ff("dblclick"))return!1;const e=new Date().getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t}onCellDoubleClicked(e){const{column:t,beans:i,cellCtrl:s}=this,{eventService:r,frameworkOverrides:o,gos:n}=i,l=t.getColDef(),a=s.createEvent(e,"cellDoubleClicked");r.dispatchEvent(a),typeof l.onCellDoubleClicked=="function"&&window.setTimeout(()=>{o.wrapOutgoing(()=>{l.onCellDoubleClicked(a)})},0),!n.get("singleClickEdit")&&!n.get("suppressClickEdit")&&s.startRowOrCellEdit(null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:i,shiftKey:s}=e,r=e.target,{cellCtrl:o,beans:n}=this,{eventService:l,rangeService:a,focusService:c,gos:u}=n;if(this.isRightClickInExistingRange(e))return;const d=a&&a.getCellRanges().length!=0;if(!s||!d){const g=u.get("enableCellTextSelection")&&e.defaultPrevented,v=(fi()||g)&&!o.isEditing()&&!Bu(r);o.focusCell(v)}if(s&&d&&!c.isCellFocused(o.getCellPosition())){e.preventDefault();const h=c.getFocusedCell();if(h){const{column:g,rowIndex:v,rowPinned:w}=h,S=n.rowRenderer.getRowByPosition({rowIndex:v,rowPinned:w}),f=S==null?void 0:S.getCellCtrl(g);f!=null&&f.isEditing()&&f.stopEditing(),c.setFocusedCell({column:g,rowIndex:v,rowPinned:w,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(r)){if(a){const h=this.cellCtrl.getCellPosition();if(s)a.extendLatestRangeToCell(h);else{const g=t||i;a.setRangeToCell(h,g)}}l.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeService:t}=this.beans;if(t){const i=t.isCellInAnyRange(this.cellCtrl.getCellPosition()),s=e.button===2||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(i&&s)return!0}return!1}containsWidget(e){return Zs(e,"ag-selection-checkbox",3)}onMouseOut(e){this.mouseStayingInsideCell(e)||(this.beans.eventService.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),this.beans.columnHoverService.clearMouseOver())}onMouseOver(e){this.mouseStayingInsideCell(e)||(this.beans.eventService.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),this.beans.columnHoverService.setMouseOver([this.column]))}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.getGui(),i=t.contains(e.target),s=t.contains(e.relatedTarget);return i&&s}destroy(){super.destroy()}},DR=class extends P{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventService,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}setComp(e){this.eGui=e,this.setupColSpan(),this.setupRowSpan(),this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();$i(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventService,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eGui)return;const e=this.getCellWidth();this.eGui.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const e=this.column.getColSpan(this.rowNode),t=[];if(e===1)t.push(this.column);else{let i=this.column;const s=this.column.getPinned();for(let r=0;i&&r<e&&(t.push(i),i=this.beans.visibleColsService.getColAfter(i),!(!i||K(i)||s!==i.getPinned()));r++);}return t}onLeftChanged(){if(!this.eGui)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=j(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.isPrintLayout()||this.column.getPinned()==="left")return e;const t=this.beans.visibleColsService.getColsLeftWidth();if(this.column.getPinned()==="right"){const i=this.beans.visibleColsService.getBodyContainerWidth();return t+i+(e||0)}return t+(e||0)}applyRowSpan(e){if(this.rowSpan===1&&!e)return;const i=us(this.beans.gos)*this.rowSpan;this.eGui.style.height=`${i}px`,this.eGui.style.zIndex="1"}destroy(){super.destroy()}},Ar="ag-cell-range-selected",MR="ag-cell-range-chart",TR="ag-cell-range-single-cell",kR="ag-cell-range-chart-category",AR="ag-cell-range-handle",IR="ag-cell-range-top",LR="ag-cell-range-right",OR="ag-cell-range-bottom",GR="ag-cell-range-left",NR=class{constructor(e,t){this.beans=e,this.rangeService=e.rangeService,this.selectionHandleFactory=e.selectionHandleFactory,this.cellCtrl=t}setComp(e,t){this.cellComp=e,this.eGui=t,this.onCellSelectionChanged()}onCellSelectionChanged(){this.cellComp&&(this.rangeCount=this.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(Ar,this.rangeCount!==0),this.cellComp.addOrRemoveCssClass(`${Ar}-1`,this.rangeCount===1),this.cellComp.addOrRemoveCssClass(`${Ar}-2`,this.rangeCount===2),this.cellComp.addOrRemoveCssClass(`${Ar}-3`,this.rangeCount===3),this.cellComp.addOrRemoveCssClass(`${Ar}-4`,this.rangeCount>=4),this.cellComp.addOrRemoveCssClass(MR,this.hasChartRange),el(this.eGui,this.rangeCount>0?!0:void 0),this.cellComp.addOrRemoveCssClass(TR,this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())}updateRangeBorders(){const e=this.getRangeBorders(),t=this.isSingleCell(),i=!t&&e.top,s=!t&&e.right,r=!t&&e.bottom,o=!t&&e.left;this.cellComp.addOrRemoveCssClass(IR,i),this.cellComp.addOrRemoveCssClass(LR,s),this.cellComp.addOrRemoveCssClass(OR,r),this.cellComp.addOrRemoveCssClass(GR,o)}isSingleCell(){const{rangeService:e}=this.beans;return this.rangeCount===1&&!!e&&!e.isMoreThanOneCell()}getHasChartRange(){const{rangeService:e}=this.beans;if(!this.rangeCount||!e)return!1;const t=e.getCellRanges();return t.length>0&&t.every(i=>ds([1,0],i.type))}updateRangeBordersIfRangeCount(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())}getRangeBorders(){const e=this.beans.gos.get("enableRtl");let t=!1,i=!1,s=!1,r=!1;const o=this.cellCtrl.getCellPosition().column,n=this.beans.visibleColsService;let l,a;e?(l=n.getColAfter(o),a=n.getColBefore(o)):(l=n.getColBefore(o),a=n.getColAfter(o));const c=this.rangeService.getCellRanges().filter(u=>this.rangeService.isCellInSpecificRange(this.cellCtrl.getCellPosition(),u));l||(r=!0),a||(i=!0);for(let u=0;u<c.length&&!(t&&i&&s&&r);u++){const d=c[u],h=this.rangeService.getRangeStartRow(d),g=this.rangeService.getRangeEndRow(d);!t&&this.beans.rowPositionUtils.sameRow(h,this.cellCtrl.getCellPosition())&&(t=!0),!s&&this.beans.rowPositionUtils.sameRow(g,this.cellCtrl.getCellPosition())&&(s=!0),!r&&l&&d.columns.indexOf(l)<0&&(r=!0),!i&&a&&d.columns.indexOf(a)<0&&(i=!0)}return{top:t,right:i,bottom:s,left:r}}refreshHandle(){if(this.beans.context.isDestroyed())return;const e=this.shouldHaveSelectionHandle();this.selectionHandle&&!e&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),e&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass(AR,!!this.selectionHandle)}shouldHaveSelectionHandle(){const e=this.beans.gos,t=this.rangeService.getCellRanges(),i=t.length;if(this.rangeCount<1||i<1)return!1;const s=j(t),r=this.cellCtrl.getCellPosition(),o=xh(e)&&!this.cellCtrl.isSuppressFillHandle(),n=zw(e);let l=i===1&&!this.cellCtrl.isEditing()&&(o||n);if(this.hasChartRange){const c=t[0].type===1&&this.rangeService.isCellInSpecificRange(r,t[0]);this.cellComp.addOrRemoveCssClass(kR,c),l=s.type===0}return l&&s.endRow!=null&&this.rangeService.isContiguousRange(s)&&this.rangeService.isBottomRightCell(s,r)}addSelectionHandle(){const e=j(this.rangeService.getCellRanges()).type,i=xh(this.beans.gos)&&K(e)?0:1;this.selectionHandle&&this.selectionHandle.getType()!==i&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.selectionHandleFactory.createSelectionHandle(i)),this.selectionHandle.refresh(this.cellCtrl)}destroy(){this.beans.context.destroyBean(this.selectionHandle)}},HR="ag-cell",BR="ag-cell-auto-height",VR="ag-cell-normal-height",zR="ag-cell-focus",WR="ag-cell-first-right-pinned",_R="ag-cell-last-left-pinned",UR="ag-cell-not-inline-editing",jR="ag-column-hover",KR="ag-cell-wrap-text",$R=0,Am=class Lc extends P{constructor(t,i,s,r){super(),this.column=t,this.rowNode=i,this.beans=s,this.rowCtrl=r,this.cellRangeFeature=void 0,this.cellPositionFeature=void 0,this.cellCustomStyleFeature=void 0,this.tooltipFeature=void 0,this.cellMouseListenerFeature=void 0,this.cellKeyboardListenerFeature=void 0,this.suppressRefreshCell=!1,this.onCellCompAttachedFuncs=[],this.onCellEditorAttachedFuncs=[],this.instanceId=t.getId()+"-"+$R++,this.colIdSanitised=Qt(this.column.getId()),this.createCellPosition(),this.updateAndFormatValue(!1)}shouldRestoreFocus(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)}onFocusOut(){this.beans.focusService.clearRestoreFocus()}addFeatures(){this.cellPositionFeature=new DR(this,this.beans),this.cellCustomStyleFeature=new xR(this,this.beans),this.cellMouseListenerFeature=new ER(this,this.beans,this.column),this.cellKeyboardListenerFeature=new PR(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.column.isTooltipEnabled()&&this.enableTooltipFeature(),this.beans.rangeService&&gi(this.beans.gos)&&(this.cellRangeFeature=new NR(this.beans,this))}removeFeatures(){const t=this.beans.context;this.cellPositionFeature=t.destroyBean(this.cellPositionFeature),this.cellCustomStyleFeature=t.destroyBean(this.cellCustomStyleFeature),this.cellMouseListenerFeature=t.destroyBean(this.cellMouseListenerFeature),this.cellKeyboardListenerFeature=t.destroyBean(this.cellKeyboardListenerFeature),this.cellRangeFeature=t.destroyBean(this.cellRangeFeature),this.disableTooltipFeature()}enableTooltipFeature(t,i){const s=()=>{const n=this.column.getColDef(),l=this.rowNode.data;if(n.tooltipField&&M(l))return qr(l,n.tooltipField,this.column.isTooltipFieldContainsDots());const a=n.tooltipValueGetter;return a?a(this.beans.gos.addGridCommonParams({location:"cell",colDef:this.column.getColDef(),column:this.column,rowIndex:this.cellPosition.rowIndex,node:this.rowNode,data:this.rowNode.data,value:this.value,valueFormatted:this.valueFormatted})):null},r=this.beans.gos.get("tooltipShowMode")==="whenTruncated";!i&&r&&!this.isCellRenderer()&&(i=()=>{const n=this.getGui(),l=n.children.length===0?n:n.querySelector(".ag-cell-value");return l?l.scrollWidth>l.clientWidth:!0});const o={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getRowIndex:()=>this.cellPosition.rowIndex,getRowNode:()=>this.rowNode,getGui:()=>this.getGui(),getLocation:()=>"cell",getTooltipValue:t!=null?()=>t:s,getValueFormatted:()=>this.valueFormatted,shouldDisplayTooltip:i};this.tooltipFeature=new vr(o,this.beans)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}setComp(t,i,s,r,o,n){var l,a,c,u;this.cellComp=t,this.eGui=i,this.printLayout=r,n??(n=this),this.addDomData(n),this.addFeatures(),n.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(s,n),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),(l=this.cellPositionFeature)==null||l.setComp(i),(a=this.cellCustomStyleFeature)==null||a.setComp(t),(c=this.tooltipFeature)==null||c.refreshToolTip(),(u=this.cellKeyboardListenerFeature)==null||u.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(t,i),o&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach(d=>d()),this.onCellCompAttachedFuncs=[])}setupAutoHeight(t,i){if(this.isAutoHeight=this.column.isAutoHeight(),!this.isAutoHeight||!t)return;const s=t.parentElement,r=zi(this.beans.gos,this.rowNode).height,o=a=>{if(this.editing||!this.isAlive()||!i.isAlive())return;const{paddingTop:c,paddingBottom:u,borderBottomWidth:d,borderTopWidth:h}=Fs(s),g=c+u+d+h,w=t.offsetHeight+g;if(a<5){const f=Se(this.beans.gos),p=!f||!f.contains(t),m=w==0;if(p||m){window.setTimeout(()=>o(a+1),0);return}}const S=Math.max(w,r);this.rowNode.setRowAutoHeight(S,this.column)},n=()=>o(0);n();const l=this.beans.resizeObserverService.observeResize(t,n);i.addDestroyFunc(()=>{l(),this.rowNode.setRowAutoHeight(void 0,this.column)})}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const t=this.column.getColDef();return t.cellRenderer!=null||t.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}showValue(t=!1){var h;const{beans:i,column:s,rowNode:r,cellRangeFeature:o,cellComp:n}=this,{userComponentFactory:l,animationFrameService:a}=i,c=this.getValueToDisplay();let u;if(r.stub&&((h=r.groupData)==null?void 0:h[this.column.getId()])==null){const g=this.createCellRendererParams();u=l.getLoadingCellRendererDetails(s.getColDef(),g)}else if(this.isCellRenderer()){const g=this.createCellRendererParams();u=l.getCellRendererDetails(s.getColDef(),g)}n.setRenderDetails(u,c,t),a.requestAnimationFrame(()=>o==null?void 0:o.refreshHandle())}setupControlComps(){const t=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(t)),this.includeRowDrag=this.isIncludeControl(t.rowDrag),this.includeDndSource=this.isIncludeControl(t.dndSource),this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(t){return this.rowNode.rowPinned!=null?!1:typeof t=="function"||t===!0}isCheckboxSelection(t){const{rowSelection:i}=this.beans.gridOptions;return t.checkboxSelection||cr(this.column)&&i&&typeof i!="string"&&lr(i)}refreshShouldDestroy(){const t=this.column.getColDef(),i=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(t)),s=this.includeRowDrag!=this.isIncludeControl(t.rowDrag),r=this.includeDndSource!=this.isIncludeControl(t.dndSource),o=this.isAutoHeight!=this.column.isAutoHeight();return i||s||r||o}startEditing(t=null,i=!1,s=null){const{editService:r}=this.beans;return!this.isCellEditable()||this.editing||!r?!0:this.cellComp?r.startEditing(this,t,i,s):(this.onCellCompAttachedFuncs.push(()=>{this.startEditing(t,i,s)}),!0)}setEditing(t,i){this.editCompDetails=i,this.editing!==t&&(this.editing=t)}stopRowOrCellEdit(t=!1){this.beans.gos.get("editType")==="fullRow"?this.rowCtrl.stopEditing(t):this.stopEditing(t)}onPopupEditorClosed(){this.editing&&this.stopEditingAndFocus()}stopEditing(t=!1){this.onCellEditorAttachedFuncs=[];const{editService:i}=this.beans;return!this.editing||!i?!1:i.stopEditing(this,t)}createCellRendererParams(){return this.beans.gos.addGridCommonParams({value:this.value,valueFormatted:this.valueFormatted,getValue:()=>this.beans.valueService.getValueForDisplay(this.column,this.rowNode),setValue:i=>this.beans.valueService.setValue(this.rowNode,this.column,i),formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:(i,s,r,o)=>this.registerRowDragger(i,s,o),setTooltip:(i,s)=>{var r;this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(i,s),(r=this.tooltipFeature)==null||r.refreshToolTip()}})}setFocusOutOnEditor(){var t;this.editing&&((t=this.beans.editService)==null||t.setFocusOutOnEditor(this))}setFocusInOnEditor(){var t;this.editing&&((t=this.beans.editService)==null||t.setFocusInOnEditor(this))}onCellChanged(t){t.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(t){var i;this.refreshShouldDestroy()?(i=this.rowCtrl)==null||i.recreateCell(this):this.refreshCell(t)}refreshCell(t){var u,d,h,g,v;if(this.suppressRefreshCell||this.editing)return;const i=this.column.getColDef(),s=t!=null&&!!t.newData,r=t!=null&&!!t.suppressFlash||!!i.suppressCellFlash,o=i.field==null&&i.valueGetter==null&&i.showRowGroup==null,n=t&&t.forceRefresh||o||s,l=!!this.cellComp,a=this.updateAndFormatValue(l),c=n||a;if(l){if(c){this.showValue(s);const w=(u=this.beans.filterManager)==null?void 0:u.isSuppressFlashingCellsBecauseFiltering();!r&&!w&&(this.beans.gos.get("enableCellChangeFlash")||i.enableCellChangeFlash)&&this.flashCell(),(d=this.cellCustomStyleFeature)==null||d.applyUserStyles(),(h=this.cellCustomStyleFeature)==null||h.applyClassesFromColDef()}(g=this.tooltipFeature)==null||g.refreshToolTip(),(v=this.cellCustomStyleFeature)==null||v.applyCellClassRules()}}stopEditingAndFocus(t=!1,i=!1){var s;(s=this.beans.editService)==null||s.stopEditingAndFocus(this,t,i)}flashCell(t){const i=(t==null?void 0:t.flashDuration)??(t==null?void 0:t.flashDelay),s=(t==null?void 0:t.fadeDuration)??(t==null?void 0:t.fadeDelay);this.animateCell("data-changed",i,s)}animateCell(t,i,s){if(!this.cellComp)return;const{gos:r}=this.beans;if(i||(i=r.get("cellFlashDuration")),i===0)return;M(s)||(s=r.get("cellFadeDuration"));const o=`ag-cell-${t}`,n=`ag-cell-${t}-animation`;this.cellComp.addOrRemoveCssClass(o,!0),this.cellComp.addOrRemoveCssClass(n,!1),this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(o,!1),this.cellComp.addOrRemoveCssClass(n,!0),this.eGui.style.transition=`background-color ${s}ms`,window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(n,!1),this.eGui.style.transition="")},s))},i)})}onFlashCells(t){if(!this.cellComp)return;const i=this.beans.cellPositionUtils.createId(this.getCellPosition());t.cells[i]&&this.animateCell("highlight")}isCellEditable(){return this.column.isCellEditable(this.rowNode)}isSuppressFillHandle(){return this.column.isSuppressFillHandle()}formatValue(t){return this.callValueFormatter(t)??t}callValueFormatter(t){return this.beans.valueService.formatValue(this.column,this.rowNode,t)}updateAndFormatValue(t){const i=this.value,s=this.valueFormatted;return this.value=this.beans.valueService.getValueForDisplay(this.column,this.rowNode),this.valueFormatted=this.callValueFormatter(this.value),t?!this.valuesAreEqual(i,this.value)||this.valueFormatted!=s:!0}valuesAreEqual(t,i){const s=this.column.getColDef();return s.equals?s.equals(t,i):t===i}getComp(){return this.cellComp}getValue(){return this.value}addDomData(t){const i=this.getGui();ws(this.beans.gos,i,Lc.DOM_DATA_KEY_CELL_CTRL,this),t.addDestroyFunc(()=>ws(this.beans.gos,i,Lc.DOM_DATA_KEY_CELL_CTRL,null))}createEvent(t,i){return this.beans.gos.addGridCommonParams({type:i,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),rowPinned:this.rowNode.rowPinned,event:t,rowIndex:this.rowNode.rowIndex})}processCharacter(t){var i;(i=this.cellKeyboardListenerFeature)==null||i.processCharacter(t)}onKeyDown(t){var i;(i=this.cellKeyboardListenerFeature)==null||i.onKeyDown(t)}onMouseEvent(t,i){var s;(s=this.cellMouseListenerFeature)==null||s.onMouseEvent(t,i)}getGui(){return this.eGui}getColSpanningList(){return this.cellPositionFeature.getColSpanningList()}onLeftChanged(){var t;this.cellComp&&((t=this.cellPositionFeature)==null||t.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{cellComp:t,column:i,beans:s}=this;ym(t,i,s.visibleColsService)}refreshAriaColIndex(){const t=this.beans.visibleColsService.getAriaColIndex(this.column);Gf(this.getGui(),t)}isSuppressNavigable(){return this.column.isSuppressNavigable(this.rowNode)}onWidthChanged(){var t;return(t=this.cellPositionFeature)==null?void 0:t.onWidthChanged()}getColumn(){return this.column}getRowNode(){return this.rowNode}isPrintLayout(){return this.printLayout}getCellPosition(){return this.cellPosition}isEditing(){return this.editing}startRowOrCellEdit(t,i=null){return this.cellComp?this.beans.gos.get("editType")==="fullRow"?this.rowCtrl.startRowEditing(t,this):this.startEditing(t,!0,i):(this.onCellCompAttachedFuncs.push(()=>{this.startRowOrCellEdit(t,i)}),!0)}getRowCtrl(){return this.rowCtrl}getRowPosition(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}}updateRangeBordersIfRangeCount(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.cellRangeFeature!=null}focusCell(t=!1){this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:t})}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onCellSelectionChanged()}onSuppressCellFocusChanged(t){this.eGui&&Ft(this.eGui,"tabindex",t?void 0:-1)}onFirstRightPinnedChanged(){if(!this.cellComp)return;const t=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass(WR,t)}onLastLeftPinnedChanged(){if(!this.cellComp)return;const t=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass(_R,t)}onCellFocused(t){if(this.beans.focusService.isCellFocusSuppressed())return;const i=this.beans.focusService.isCellFocused(this.cellPosition);if(!this.cellComp){i&&(t!=null&&t.forceBrowserFocus)&&(this.focusEventToRestore=t);return}if(this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass(zR,i),i&&t&&t.forceBrowserFocus){let r=this.cellComp.getFocusableElement();if(this.editing){const o=this.beans.focusService.findFocusableElements(r,null,!0);o.length&&(r=o[0])}r.focus({preventScroll:!!t.preventScrollOnBrowserFocus})}const s=this.beans.gos.get("editType")==="fullRow";!i&&!s&&this.editing&&this.stopRowOrCellEdit(),i&&this.rowCtrl.announceDescription()}createCellPosition(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:ni(this.rowNode.rowPinned),column:this.column}}applyStaticCssClasses(){this.cellComp.addOrRemoveCssClass(HR,!0),this.cellComp.addOrRemoveCssClass(UR,!0);const t=this.column.isAutoHeight()==!0;this.cellComp.addOrRemoveCssClass(BR,t),this.cellComp.addOrRemoveCssClass(VR,!t)}onColumnHover(){if(!this.cellComp||!this.beans.gos.get("columnHoverHighlight"))return;const t=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass(jR,t)}onColDefChanged(){var i;if(!this.cellComp)return;this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing?(i=this.beans.editService)==null||i.handleColDefChanged(this):this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0})}setWrapText(){const t=this.column.getColDef().wrapText==!0;this.cellComp.addOrRemoveCssClass(KR,t)}dispatchCellContextMenuEvent(t){const i=this.column.getColDef(),s=this.createEvent(t,"cellContextMenu");this.beans.eventService.dispatchEvent(s),i.onCellContextMenu&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{i.onCellContextMenu(s)})},0)}getCellRenderer(){return this.cellComp?this.cellComp.getCellRenderer():null}getCellEditor(){return this.cellComp?this.cellComp.getCellEditor():null}destroy(){this.onCellCompAttachedFuncs=[],this.onCellEditorAttachedFuncs=[],super.destroy()}createSelectionCheckbox(){const t=new RR;return this.beans.context.createBean(t),t.init({rowNode:this.rowNode,column:this.column}),t}createDndSource(){const t=new FR(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(t),t}registerRowDragger(t,i,s){if(this.customRowDragComp){this.customRowDragComp.setDragElement(t,i);return}const r=this.createRowDragComp(t,i,s);r&&(this.customRowDragComp=r,this.addDestroyFunc(()=>{this.beans.context.destroyBean(r),this.customRowDragComp=null}))}createRowDragComp(t,i,s){const r=this.beans.gos.get("pagination"),o=this.beans.gos.get("rowDragManaged"),n=ae(this.beans.gos);if(o){if(!n){D("managed row dragging is only allowed in the Client Side Row Model");return}if(r){D("managed row dragging is not possible when doing pagination");return}}const l=new Dc(()=>this.value,this.rowNode,this.column,t,i,s);return this.beans.context.createBean(l),l}setSuppressRefreshCell(t){this.suppressRefreshCell=t}getEditCompDetails(){return this.editCompDetails}onCellEditorAttached(t){this.onCellEditorAttachedFuncs.push(t)}cellEditorAttached(){this.onCellEditorAttachedFuncs.forEach(t=>t()),this.onCellEditorAttachedFuncs=[]}};Am.DOM_DATA_KEY_CELL_CTRL="cellCtrl";var hs=Am,YR=0,Im=class Oc extends P{constructor(t,i,s,r,o){var n;super(),this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKeySanitised=null,this.beans=i,this.gos=i.gos,this.rowNode=t,this.paginationPage=((n=i.paginationService)==null?void 0:n.getCurrentPage())??0,this.useAnimationFrameForCreate=r,this.printLayout=o,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=t.id+"-"+YR++,this.rowId=Qt(t.id),this.initRowBusinessKey(),this.rowFocused=i.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=i.rowCssClassCalculator.calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(s),this.rowStyles=this.processStylesFromGridOptions(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const t=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=Qt(t)}getRowId(){return this.rowId}getRowStyles(){return this.rowStyles}isSticky(){return this.rowNode.sticky}updateGui(t,i){t==="left"?this.leftGui=i:t==="right"?this.rightGui=i:t==="fullWidth"?this.fullWidthGui=i:this.centerGui=i}setComp(t,i,s,r){r=ko(this,this.beans.context,r);const o={rowComp:t,element:i,containerType:s,compBean:r};this.allRowGuis.push(o),this.updateGui(s,o),this.initialiseRowComp(o),this.rowType!=="FullWidthLoading"&&!this.rowNode.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(t){this.allRowGuis=this.allRowGuis.filter(i=>i.containerType!==t),this.updateGui(t,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(t){const i=t?"none":"";this.allRowGuis.forEach(s=>s.element.style.display=i)}initialiseRowComp(t){const i=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(t),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(t),this.updateRowIndexes(t),this.setFocusedClasses(t),this.setStylesFromGridOptions(!1,t),Yn(i)&&this.rowNode.selectable&&this.onRowSelected(t),this.updateColumnLists(!this.useAnimationFrameForCreate);const s=t.rowComp;this.getInitialRowClasses(t.containerType).forEach(o=>s.addOrRemoveCssClass(o,!0)),this.executeSlideAndFadeAnimations(t),this.rowNode.group&&Jn(t.element,this.rowNode.expanded==!0),this.setRowCompRowId(s),this.setRowCompRowBusinessKey(s),ws(i,t.element,Oc.DOM_DATA_KEY_ROW_CTRL,this),t.compBean.addDestroyFunc(()=>ws(i,t.element,Oc.DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,t),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(t),this.isFullWidth()&&this.setupFullWidth(t),i.get("rowDragEntireRow")&&this.addRowDraggerToRow(t),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask(()=>{this.isAlive()&&t.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(t){this.businessKeySanitised!=null&&t.setRowBusinessKey(this.businessKeySanitised)}getBusinessKey(){return this.businessKeySanitised}setRowCompRowId(t){this.rowId=Qt(this.rowNode.id),this.rowId!=null&&t.setRowId(this.rowId)}executeSlideAndFadeAnimations(t){const{containerType:i}=t;this.slideInAnimation[i]&&(Rh(()=>{this.onTopChanged()}),this.slideInAnimation[i]=!1),this.fadeInAnimation[i]&&(Rh(()=>{t.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[i]=!1)}addRowDraggerToRow(t){if(gi(this.gos)){D("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `cellSelection: true`");return}const i=this.beans.localeService.getLocaleTextFunc(),s=new Dc(()=>`1 ${i("rowDragRow","row")}`,this.rowNode,void 0,t.element,void 0,!0),r=this.createBean(s,this.beans.context);this.rowDragComps.push(r),t.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(o=>o!==r),this.destroyBean(r,this.beans.context)})}setupFullWidth(t){const i=this.getPinnedForContainer(t.containerType);if(this.rowType=="FullWidthDetail"&&!this.gos.assertModuleRegistered("@ag-grid-enterprise/master-detail","cell renderer 'agDetailCellRenderer' (for master detail)"))return;const s=this.createFullWidthCompDetails(t.element,i);t.rowComp.showFullWidth(s)}isPrintLayout(){return this.printLayout}getFullWidthCellRenderers(){var t,i;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(s=>{var r;return(r=s==null?void 0:s.rowComp)==null?void 0:r.getFullWidthCellRenderer()}):[(i=(t=this.fullWidthGui)==null?void 0:t.rowComp)==null?void 0:i.getFullWidthCellRenderer()]}getCellElement(t){const i=this.getCellCtrl(t);return i?i.getGui():null}executeProcessRowPostCreateFunc(){const t=this.gos.getCallback("processRowPostCreate");if(!t||!this.areAllContainersReady())return;const i={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};t(i)}areAllContainersReady(){const t=!!this.leftGui||!this.beans.visibleColsService.isPinningLeft(),i=!!this.centerGui,s=!!this.rightGui||!this.beans.visibleColsService.isPinningRight();return t&&i&&s}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const t=this.beans.gos.getCallback("isFullWidthRow");return t?t({rowNode:this.rowNode}):!1}setRowType(){const t=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),i=this.isNodeFullWidthCell(),s=this.gos.get("masterDetail")&&this.rowNode.detail,r=this.beans.columnModel.isPivotMode(),n=!!this.rowNode.group&&!this.rowNode.footer&&Rl(this.gos,r);t?this.rowType="FullWidthLoading":s?this.rowType="FullWidthDetail":i?this.rowType="FullWidth":n?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(t=!1,i=!1){if(this.isFullWidth())return;if(t||this.gos.get("suppressAnimationFrame")||this.printLayout){this.updateColumnListsImpl(i);return}this.updateColumnListsPending||(this.beans.animationFrameService.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0)}createCellCtrls(t,i,s=null){const r={list:[],map:{}},o=(l,a,c)=>{c!=null?r.list.splice(c,0,a):r.list.push(a),r.map[l]=a},n=[];for(const l of i){const a=l.getInstanceId();let c=t.map[a];c||(c=new hs(l,this.rowNode,this.beans,this)),o(a,c)}for(const l of t.list){const a=l.getColumn().getInstanceId();if(r.map[a]!=null)continue;!this.isCellEligibleToBeRemoved(l,s)?n.push([a,l]):l.destroy()}if(n.length)for(const[l,a]of n){const c=r.list.findIndex(d=>d.getColumn().getLeft()>a.getColumn().getLeft()),u=c===-1?void 0:Math.max(c-1,0);o(l,a,u)}return r}updateColumnListsImpl(t){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(t)}setCellCtrls(t){this.allRowGuis.forEach(i=>{const s=this.getCellCtrlsForContainer(i.containerType);i.rowComp.setCellCtrls(s,t)})}getCellCtrlsForContainer(t){switch(t){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const t=this.beans.columnViewportService,i=this.beans.visibleColsService;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i.getAllCols()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const s=t.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,s);const r=i.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,r,"left");const o=i.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,o,"right")}}isCellEligibleToBeRemoved(t,i){if(t.getColumn().getPinned()!=i)return!0;const n=t.isEditing(),l=this.beans.focusService.isCellFocused(t.getCellPosition());if(n||l){const c=t.getColumn();return!(this.beans.visibleColsService.getAllCols().indexOf(c)>=0)}return!0}getDomOrder(){return this.gos.get("ensureDomOrder")||Le(this.gos,"print")}listenOnDomOrder(t){const i=()=>{t.rowComp.setDomOrder(this.getDomOrder())};t.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],i)}setAnimateFlags(t){if(this.isSticky()||!t)return;const i=M(this.rowNode.oldRowTop),s=this.beans.visibleColsService.isPinningLeft(),r=this.beans.visibleColsService.isPinningRight();if(i){if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){this.slideInAnimation.fullWidth=!0;return}this.slideInAnimation.center=!0,this.slideInAnimation.left=s,this.slideInAnimation.right=r}else{if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){this.fadeInAnimation.fullWidth=!0;return}this.fadeInAnimation.center=!0,this.fadeInAnimation.left=s,this.fadeInAnimation.right=r}}isEditing(){return this.editingRow}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const t=(l,a)=>l?l.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(l.element,a).params):!0,i=t(this.fullWidthGui,null),s=t(this.centerGui,null),r=t(this.leftGui,"left"),o=t(this.rightGui,"right");return i&&s&&r&&o}addListeners(){this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),expandedChanged:this.updateExpandedCss.bind(this),hasChildrenChanged:this.updateExpandedCss.bind(this)}),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this)}),this.addManagedListeners(this.beans.eventService,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context))}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(i=>{this.addRowDraggerToRow(i)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach(t=>t.onRowIndexChanged())},cellChanged:t=>{this.getAllCellCtrls().forEach(i=>i.onCellChanged(t))}})}onRowNodeDataChanged(t){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(s=>s.refreshCell({suppressFlash:!t.update,newData:!t.update})),this.allRowGuis.forEach(s=>{this.setRowCompRowId(s.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(s.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const t=this.rowNode.highlighted;this.allRowGuis.forEach(i=>{const s=t===0,r=t===1;i.rowComp.addOrRemoveCssClass("ag-row-highlight-above",s),i.rowComp.addOrRemoveCssClass("ag-row-highlight-below",r)})}postProcessRowDragging(){const t=this.rowNode.dragging;this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass("ag-row-dragging",t))}updateExpandedCss(){const t=this.rowNode.isExpandable(),i=this.rowNode.expanded==!0;this.allRowGuis.forEach(s=>{s.rowComp.addOrRemoveCssClass("ag-row-group",t),s.rowComp.addOrRemoveCssClass("ag-row-group-expanded",t&&i),s.rowComp.addOrRemoveCssClass("ag-row-group-contracted",t&&!i),Jn(s.element,t&&i)})}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:ni(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}findFullWidthRowGui(t){return this.allRowGuis.find(i=>i.element.contains(t))}onKeyboardNavigate(t){const i=this.findFullWidthRowGui(t.target);if(!((i?i.element:null)===t.target))return;const o=this.rowNode,n=this.beans.focusService.getFocusedCell(),l={rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:(n==null?void 0:n.column)??this.getColumnForFullWidth(i)};this.beans.navigationService.navigateToNextCell(t,t.key,l,!0),t.preventDefault()}onTabKeyDown(t){if(t.defaultPrevented||li(t))return;const i=this.allRowGuis.find(a=>a.element.contains(t.target)),s=i?i.element:null,r=s===t.target,o=fe(this.gos);let n=!1;s&&o&&(n=s.contains(o)&&o.classList.contains("ag-cell"));let l=null;!r&&!n&&(l=this.beans.focusService.findNextFocusableElement(s,!1,t.shiftKey)),(this.isFullWidth()&&r||!l)&&this.beans.navigationService.onTabKeyDown(this,t)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var i;const t=(i=this.allRowGuis.find(s=>qt(s.element)))==null?void 0:i.element;return t?t.getBoundingClientRect().top:0}onSuppressCellFocusChanged(t){const i=this.isFullWidth()&&t?void 0:-1;this.allRowGuis.forEach(s=>{Ft(s.element,"tabindex",i)})}onFullWidthRowFocused(t){var o;const i=this.rowNode,s=t?this.isFullWidth()&&t.rowIndex===i.rowIndex&&t.rowPinned==i.rowPinned:!1,r=this.fullWidthGui?this.fullWidthGui.element:(o=this.centerGui)==null?void 0:o.element;r&&(r.classList.toggle("ag-full-width-focus",s),s&&(t!=null&&t.forceBrowserFocus)&&r.focus({preventScroll:!0}))}recreateCell(t){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,t),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,t),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,t),t.destroy(),this.updateColumnLists()}removeCellCtrl(t,i){const s={list:[],map:{}};return t.list.forEach(r=>{r!==i&&(s.list.push(r),s.map[r.getColumn().getInstanceId()]=r)}),s}onMouseEvent(t,i){switch(t){case"dblclick":this.onRowDblClick(i);break;case"click":this.onRowClick(i);break;case"touchstart":case"mousedown":this.onRowMouseDown(i);break}}createRowEvent(t,i){return this.gos.addGridCommonParams({type:t,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,event:i})}createRowEventWithSource(t,i){const s=this.createRowEvent(t,i);return s.source=this,s}onRowDblClick(t){li(t)||this.beans.eventService.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",t))}getColumnForFullWidth(t){const{visibleColsService:i}=this.beans;switch(t==null?void 0:t.containerType){case"center":return i.getCenterCols()[0];case"left":return i.getLeftCols()[0];case"right":return i.getRightCols()[0];default:return i.getAllCols()[0]}}onRowMouseDown(t){if(this.lastMouseDownOnDragger=Zs(t.target,"ag-row-drag",3),!this.isFullWidth())return;const i=this.rowNode;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges();const s=this.findFullWidthRowGui(t.target),r=s==null?void 0:s.element,o=t.target;let n=!0;r&&r.contains(o)&&Bu(o)&&(n=!1),this.beans.focusService.setFocusedCell({rowIndex:i.rowIndex,column:this.getColumnForFullWidth(s),rowPinned:i.rowPinned,forceBrowserFocus:n})}onRowClick(t){if(li(t)||this.lastMouseDownOnDragger)return;const{gos:s}=this;this.beans.eventService.dispatchEvent(this.createRowEventWithSource("rowClicked",t));const r=t.ctrlKey||t.metaKey,o=t.shiftKey,n=this.rowNode.isSelected(),l=Ss(s),a=Ph(s),c=Ww(s);if(l&&this.rowNode.group||this.isRowSelectionBlocked()||!c&&!n||!a&&n)return;const u=_w(s),d="rowClicked";if(n)u?this.rowNode.setSelectedParams({newValue:!1,event:t,source:d}):r?a&&this.rowNode.setSelectedParams({newValue:!1,event:t,source:d}):c&&this.rowNode.setSelectedParams({newValue:!0,clearSelection:!o,rangeSelect:o,event:t,source:d});else{const h=u?!1:!r;this.rowNode.setSelectedParams({newValue:!0,clearSelection:h,rangeSelect:o,event:t,source:d})}}isRowSelectionBlocked(){return!this.rowNode.selectable||!!this.rowNode.rowPinned||!Yn(this.gos)}setupDetailRowAutoHeight(t){if(this.rowType!=="FullWidthDetail"||!this.gos.get("detailRowAutoHeight"))return;const i=()=>{const r=t.clientHeight;if(r!=null&&r>0){const o=()=>{this.rowNode.setRowHeight(r),(ae(this.gos)||Xt(this.gos))&&this.beans.rowModel.onRowHeightChanged()};window.setTimeout(o,0)}},s=this.beans.resizeObserverService.observeResize(t,i);this.addDestroyFunc(s),i()}createFullWidthCompDetails(t,i){const{gos:s,rowNode:r}=this,o=s.addGridCommonParams({fullWidth:!0,data:r.data,node:r,value:r.key,valueFormatted:r.key,eGridCell:t,eParentOfValue:t,pinned:i,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(l,a,c,u)=>this.addFullWidthRowDragging(l,a,c,u),setTooltip:(l,a)=>this.refreshRowTooltip(l,a)}),n=this.beans.userComponentFactory;switch(this.rowType){case"FullWidthDetail":return n.getFullWidthDetailCellRendererDetails(o);case"FullWidthGroup":return n.getFullWidthGroupCellRendererDetails(o);case"FullWidthLoading":return n.getFullWidthLoadingCellRendererDetails(o);default:return n.getFullWidthCellRendererDetails(o)}}refreshRowTooltip(t,i){if(!this.fullWidthGui)return;const s={getGui:()=>this.fullWidthGui.element,getTooltipValue:()=>t,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i};this.tooltipFeature&&this.destroyBean(this.tooltipFeature,this.beans.context),this.tooltipFeature=this.createBean(new vr(s,this.beans))}addFullWidthRowDragging(t,i,s="",r){if(!this.isFullWidth())return;const o=new Dc(()=>s,this.rowNode,void 0,t,i,r);this.createBean(o,this.beans.context),this.addDestroyFunc(()=>{this.destroyBean(o,this.beans.context)})}onUiLevelChanged(){const t=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=t){const i="ag-row-level-"+t,s="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(r=>{r.rowComp.addOrRemoveCssClass(i,!0),r.rowComp.addOrRemoveCssClass(s,!1)})}this.rowLevel=t}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBoundsService.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBoundsService.getLastRow()}refreshFirstAndLastRowStyles(){const t=this.isFirstRowOnPage(),i=this.isLastRowOnPage();this.firstRowOnPage!==t&&(this.firstRowOnPage=t,this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-row-first",t))),this.lastRowOnPage!==i&&(this.lastRowOnPage=i,this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-row-last",i)))}stopEditing(t=!1){var i;this.stoppingRowEdit||(i=this.beans.rowEditService)==null||i.stopEditing(this,t)}setInlineEditingCss(){const t=this.editingRow||this.getAllCellCtrls().some(i=>i.isEditing());this.allRowGuis.forEach(i=>{i.rowComp.addOrRemoveCssClass("ag-row-inline-editing",t),i.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!t)})}setEditingRow(t){this.editingRow=t}startRowEditing(t=null,i=null,s=null){var r;return this.editingRow?!0:((r=this.beans.rowEditService)==null?void 0:r.startEditing(this,t,i,s))??!0}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const t=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);!t||!t.length||t.forEach(i=>{this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass(i,!0))})}postProcessRowClassRules(){this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,t=>{this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass(t,!0))},t=>{this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass(t,!1))})}setStylesFromGridOptions(t,i){t&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(i,s=>s.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(t){return t==="left"||t==="right"?t:null}getInitialRowClasses(t){const i=this.getPinnedForContainer(t),s={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[t],rowIsEven:this.rowNode.rowIndex%2===0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:i};return this.beans.rowCssClassCalculator.getInitialRowClasses(s)}processStylesFromGridOptions(){const t=this.gos.get("rowStyle");if(t&&typeof t=="function"){D("rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead");return}const i=this.gos.getCallback("getRowStyle");let s;if(i){const r={data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex};s=i(r)}return s||t?Object.assign({},t,s):this.emptyStyle}onRowSelected(t){const i=!!this.rowNode.isSelected();this.forEachGui(t,s=>{s.rowComp.addOrRemoveCssClass("ag-row-selected",i),el(s.element,i),s.element.contains(fe(this.gos))&&(s===this.centerGui||s===this.fullWidthGui)&&this.announceDescription()})}announceDescription(){if(this.isRowSelectionBlocked())return;const t=this.rowNode.isSelected();if(t&&!Ph(this.gos))return;const s=this.beans.localeService.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row.`);this.beans.ariaAnnouncementService.announceValue(s,"rowSelection")}addHoverFunctionality(t){if(!this.active)return;const{element:i,compBean:s}=t,{rowNode:r,beans:o,gos:n}=this;s.addManagedListeners(i,{mouseenter:()=>r.onMouseEnter(),mouseleave:()=>r.onMouseLeave()}),s.addManagedListeners(r,{mouseEnter:()=>{!o.dragService.isDragging()&&!n.get("suppressRowHoverHighlight")&&(i.classList.add("ag-row-hover"),r.setHovered(!0))},mouseLeave:()=>{i.classList.remove("ag-row-hover"),r.setHovered(!1)}})}roundRowTopToBounds(t){const i=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().getApproximateVScollPosition(),s=this.applyPaginationOffset(i.top,!0)-100,r=this.applyPaginationOffset(i.bottom,!0)+100;return Math.min(Math.max(s,t),r)}getFrameworkOverrides(){return this.beans.frameworkOverrides}forEachGui(t,i){t?i(t):this.allRowGuis.forEach(i)}onRowHeightChanged(t){if(this.rowNode.rowHeight==null)return;const i=this.rowNode.rowHeight,s=this.beans.environment.getDefaultRowHeight(),o=gf(this.gos)?zi(this.gos,this.rowNode).height:void 0,n=o?`${Math.min(s,o)-2}px`:void 0;this.forEachGui(t,l=>{l.element.style.height=`${i}px`,n&&l.element.style.setProperty("--ag-line-height",n)})}addEventListener(t,i){super.addEventListener(t,i)}removeEventListener(t,i){super.removeEventListener(t,i)}destroyFirstPass(t=!1){if(this.active=!1,!t&&Xs(this.gos)&&!this.isSticky())if(this.rowNode.rowTop!=null){const r=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(r)}else this.allRowGuis.forEach(r=>r.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.rowNode.setHovered(!1);const i=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(i),this.beans.eventService.dispatchEvent(i),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.stopEditing();const t=i=>(i.list.forEach(s=>s.destroy()),{list:[],map:{}});this.centerCellCtrls=t(this.centerCellCtrls),this.leftCellCtrls=t(this.leftCellCtrls),this.rightCellCtrls=t(this.rightCellCtrls)}setFocusedClasses(t){this.forEachGui(t,i=>{i.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),i.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const t=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses()),!t&&this.editingRow&&this.stopEditing(!1)}onPaginationChanged(){var i;const t=((i=this.beans.paginationService)==null?void 0:i.getCurrentPage())??0;this.paginationPage!==t&&(this.paginationPage=t,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(t,i=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return t;const s=this.beans.pageBoundsService.getPixelOffset();return t+s*(i?1:-1)}setRowTop(t){if(!this.printLayout&&M(t)){const i=this.applyPaginationOffset(t),o=`${this.rowNode.isRowPinned()||this.rowNode.sticky?i:this.beans.rowContainerHeightService.getRealPixelPosition(i)}px`;this.setRowTopStyle(o)}}getInitialRowTop(t){return this.suppressRowTransform?this.getInitialRowTopShared(t):void 0}getInitialTransform(t){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(t)})`}getInitialRowTopShared(t){if(this.printLayout)return"";const i=this.rowNode;let s;if(this.isSticky())s=i.stickyRowTop;else{const r=this.slideInAnimation[t]?this.roundRowTopToBounds(i.oldRowTop):i.rowTop,o=this.applyPaginationOffset(r);s=i.isRowPinned()?o:this.beans.rowContainerHeightService.getRealPixelPosition(o)}return s+"px"}setRowTopStyle(t){this.allRowGuis.forEach(i=>this.suppressRowTransform?i.rowComp.setTop(t):i.rowComp.setTransform(`translateY(${t})`))}getRowNode(){return this.rowNode}getCellCtrl(t){let i=null;return this.getAllCellCtrls().forEach(s=>{s.getColumn()==t&&(i=s)}),i!=null||this.getAllCellCtrls().forEach(s=>{s.getColSpanningList().indexOf(t)>=0&&(i=s)}),i}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}getRowIndex(){return this.rowNode.getRowIndexString()}updateRowIndexes(t){var n;const i=this.rowNode.getRowIndexString();if(i===null)return;const s=this.beans.headerNavigationService.getHeaderRowCount()+(((n=this.beans.filterManager)==null?void 0:n.getHeaderRowCount())??0),r=this.rowNode.rowIndex%2===0,o=s+this.rowNode.rowIndex+1;this.forEachGui(t,l=>{l.rowComp.setRowIndex(i),l.rowComp.addOrRemoveCssClass("ag-row-even",r),l.rowComp.addOrRemoveCssClass("ag-row-odd",!r),TS(l.element,o)})}setStoppingRowEdit(t){this.stoppingRowEdit=t}};Im.DOM_DATA_KEY_ROW_CTRL="renderedRow";var gs=Im,QR=class extends P{wireBeans(e){this.mouseEventService=e.mouseEventService,this.valueService=e.valueService,this.menuService=e.menuService,this.ctrlsService=e.ctrlsService,this.navigationService=e.navigationService,this.focusService=e.focusService,this.undoRedoService=e.undoRedoService,this.visibleColsService=e.visibleColsService,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel,this.rangeService=e.rangeService,this.clipboardService=e.clipboardService}constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",Ff("touchstart")?"touchstart":"mousedown"].forEach(i=>{const s=this.processMouseEvent.bind(this,i);this.addManagedElementListeners(this.element,{[i]:s})})}processMouseEvent(e,t){if(!this.mouseEventService.isEventFromThisGrid(t)||li(t))return;const i=this.getRowForEvent(t),s=this.mouseEventService.getRenderedCellForEvent(t);e==="contextmenu"?this.handleContextMenuMouseEvent(t,void 0,i,s):(s&&s.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}mockContextMenuForIPad(){if(!Yi())return;const e=new Hi(this.element),t=i=>{const s=this.getRowForEvent(i.touchEvent),r=this.mouseEventService.getRenderedCellForEvent(i.touchEvent);this.handleContextMenuMouseEvent(void 0,i.touchEvent,s,r)};this.addManagedListeners(e,{longTap:t}),this.addDestroyFunc(()=>e.destroy())}getRowForEvent(e){let t=e.target;for(;t;){const i=So(this.gos,t,gs.DOM_DATA_KEY_ROW_CTRL);if(i)return i;t=t.parentElement}return null}handleContextMenuMouseEvent(e,t,i,s){const r=i?i.getRowNode():null,o=s?s.getColumn():null;let n=null;if(o){const c=e||t;s.dispatchCellContextMenuEvent(c??null),n=this.valueService.getValue(o,r)}const l=this.ctrlsService.getGridBodyCtrl(),a=s?s.getGui():l.getGridBodyElement();this.menuService.showContextMenu({mouseEvent:e,touchEvent:t,rowNode:r,column:o,value:n,anchorToElement:a})}getControlsForEventTarget(e){return{cellCtrl:wc(this.gos,e,hs.DOM_DATA_KEY_CELL_CTRL),rowCtrl:wc(this.gos,e,gs.DOM_DATA_KEY_ROW_CTRL)}}processKeyboardEvent(e,t){const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,t))}processCellKeyboardEvent(e,t,i){const s=e.getRowNode(),r=e.getColumn(),o=e.isEditing();!Mc(this.gos,i,s,r,o)&&t==="keydown"&&(!o&&this.navigationService.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,e.isEditing()),um(i)&&e.processCharacter(i)),t==="keydown"&&this.eventService.dispatchEvent(e.createEvent(i,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,i){const s=e.getRowNode(),r=this.focusService.getFocusedCell(),o=r&&r.column;if(!Mc(this.gos,i,s,o,!1)){const l=i.key;if(t==="keydown")switch(l){case x.PAGE_HOME:case x.PAGE_END:case x.PAGE_UP:case x.PAGE_DOWN:this.navigationService.handlePageScrollingKey(i,!0);break;case x.UP:case x.DOWN:e.onKeyboardNavigate(i);break;case x.TAB:e.onTabKeyDown(i);break}}t==="keydown"&&this.eventService.dispatchEvent(e.createRowEvent("cellKeyDown",i))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!this.mouseEventService.isEventFromThisGrid(e))return;const i=lb(e);if(i===x.A)return this.onCtrlAndA(e);if(i===x.C)return this.onCtrlAndC(e);if(i===x.D)return this.onCtrlAndD(e);if(i===x.V)return this.onCtrlAndV(e);if(i===x.X)return this.onCtrlAndX(e);if(i===x.Y)return this.onCtrlAndY();if(i===x.Z)return this.onCtrlAndZ(e)}onCtrlAndA(e){const{pinnedRowModel:t,rowModel:i,rangeService:s}=this;if(s&&i.isRowsToRender()){const[r,o]=[t.isEmpty("top"),t.isEmpty("bottom")],n=r?null:"top";let l,a;o?(l=null,a=i.getRowCount()-1):(l="bottom",a=t.getPinnedBottomRowCount()-1);const c=this.visibleColsService.getAllCols();if(ht(c))return;s.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:a,rowEndPinned:l,columnStart:c[0],columnEnd:j(c)})}e.preventDefault()}onCtrlAndC(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t!=null&&t.isEditing()||i!=null&&i.isEditing()||(e.preventDefault(),this.clipboardService.copyToClipboard())}onCtrlAndX(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t!=null&&t.isEditing()||i!=null&&i.isEditing()||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}onCtrlAndV(e){const{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);t!=null&&t.isEditing()||i!=null&&i.isEditing()||this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()}onCtrlAndD(e){this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()}onCtrlAndZ(e){!this.gos.get("undoRedoCellEditing")||!this.undoRedoService||(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))}onCtrlAndY(){var e;(e=this.undoRedoService)==null||e.redo("ui")}},qR=class extends P{wireBeans(e){this.pinnedWidthService=e.pinnedWidthService}constructor(e){super(),this.element=e}postConstruct(){this.addManagedEventListeners({leftPinnedWidthChanged:this.onPinnedLeftWidthChanged.bind(this)})}onPinnedLeftWidthChanged(){const e=this.pinnedWidthService.getPinnedLeftWidth(),t=e>0;pe(this.element,t),Nt(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedLeftWidth()}},XR=class extends P{wireBeans(e){this.pinnedWidthService=e.pinnedWidthService}constructor(e){super(),this.element=e}postConstruct(){this.addManagedEventListeners({rightPinnedWidthChanged:this.onPinnedRightWidthChanged.bind(this)})}onPinnedRightWidthChanged(){const e=this.pinnedWidthService.getPinnedRightWidth(),t=e>0;pe(this.element,t),Nt(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedRightWidth()}},sn=e=>e.getTopRowCtrls(),rn=e=>e.getStickyTopRowCtrls(),on=e=>e.getStickyBottomRowCtrls(),nn=e=>e.getBottomRowCtrls(),ln=e=>e.getCentreRowCtrls(),ZR={center:{type:"center",container:"ag-center-cols-container",viewport:"ag-center-cols-viewport",getRowCtrls:ln},left:{type:"left",container:"ag-pinned-left-cols-container",pinnedType:"left",getRowCtrls:ln},right:{type:"right",container:"ag-pinned-right-cols-container",pinnedType:"right",getRowCtrls:ln},fullWidth:{type:"fullWidth",container:"ag-full-width-container",fullWidth:!0,getRowCtrls:ln},topCenter:{type:"center",container:"ag-floating-top-container",viewport:"ag-floating-top-viewport",getRowCtrls:sn},topLeft:{type:"left",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:sn},topRight:{type:"right",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:sn},topFullWidth:{type:"fullWidth",container:"ag-floating-top-full-width-container",fullWidth:!0,getRowCtrls:sn},stickyTopCenter:{type:"center",container:"ag-sticky-top-container",viewport:"ag-sticky-top-viewport",getRowCtrls:rn},stickyTopLeft:{type:"left",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:rn},stickyTopRight:{type:"right",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:rn},stickyTopFullWidth:{type:"fullWidth",container:"ag-sticky-top-full-width-container",fullWidth:!0,getRowCtrls:rn},stickyBottomCenter:{type:"center",container:"ag-sticky-bottom-container",viewport:"ag-sticky-bottom-viewport",getRowCtrls:on},stickyBottomLeft:{type:"left",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:on},stickyBottomRight:{type:"right",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:on},stickyBottomFullWidth:{type:"fullWidth",container:"ag-sticky-bottom-full-width-container",fullWidth:!0,getRowCtrls:on},bottomCenter:{type:"center",container:"ag-floating-bottom-container",viewport:"ag-floating-bottom-viewport",getRowCtrls:nn},bottomLeft:{type:"left",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:nn},bottomRight:{type:"right",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:nn},bottomFullWidth:{type:"fullWidth",container:"ag-floating-bottom-full-width-container",fullWidth:!0,getRowCtrls:nn}};function _s(e){return ZR[e]}var JR=["topCenter","topLeft","topRight"],eF=["bottomCenter","bottomLeft","bottomRight"],tF=["center","left","right"],iF=["center","left","right","fullWidth"],sF=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],rF=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],oF=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],Lm=["stickyTopCenter","stickyTopLeft","stickyTopRight"],Om=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],nF=[...Lm,"stickyTopFullWidth",...Om,"stickyBottomFullWidth"],lF=[...JR,...eF,...tF,...Lm,...Om],aF=class extends P{constructor(e){super(),this.visible=!0,this.EMPTY_CTRLS=[],this.name=e,this.options=_s(e)}wireBeans(e){this.dragService=e.dragService,this.ctrlsService=e.ctrlsService,this.columnViewportService=e.columnViewportService,this.resizeObserverService=e.resizeObserverService,this.rowRenderer=e.rowRenderer}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new yR(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.ctrlsService.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}getContainerElement(){return this.eContainer}getViewportSizeFeature(){return this.viewportSizeFeature}setComp(e,t,i){this.comp=e,this.eContainer=t,this.eViewport=i,this.createManagedBean(new QR(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const s=()=>this.onPinnedWidthChanged();this.forContainers(rF,()=>{this.pinnedWidthFeature=this.createManagedBean(new qR(this.eContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:s})}),this.forContainers(oF,()=>{this.pinnedWidthFeature=this.createManagedBean(new XR(this.eContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:s})}),this.forContainers(iF,()=>this.createManagedBean(new km(this.eContainer,this.name==="center"?i:void 0))),this.forContainers(lF,()=>this.createManagedBean(new bR(this.eContainer))),this.forContainers(sF,()=>this.createManagedBean(new id(r=>this.comp.setContainerWidth(`${r}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.getViewportElement(),{scroll:e})}addListeners(){this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),displayedRowsChanged:e=>this.onDisplayedRowsChanged(e.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()}listenOnDomOrder(){if(nF.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const i=this.gos.get("ensureDomOrder"),s=Le(this.gos,"print");this.comp.setDomOrder(i||s)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}onDisplayedColumnsWidthChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const e=t=>{this.dragService.isDragging()&&t.cancelable&&t.preventDefault()};this.eContainer.addEventListener("touchmove",e,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",e))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.columnViewportService.setScrollPosition(t,i,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return Io(this.eViewport)}getCenterViewportScrollLeft(){return il(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return Vf(this.eViewport)}getViewportScrollLeft(){return il(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||HS(this.eViewport)}getViewportElement(){return this.eViewport}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){sl(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const i=Le(this.gos,"print"),r=this.gos.get("embedFullWidthRows")||i,o=t.filter(n=>{const l=n.isFullWidth();return this.options.fullWidth?!r&&l:r||!l});this.comp.setRowCtrls({rowCtrls:o,useFlushSync:e})}},cF="ag-force-vertical-scroll",uF="ag-selectable",dF="ag-column-moving",hF=class extends P{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.animationFrameService=e.animationFrameService,this.rowContainerHeightService=e.rowContainerHeightService,this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.scrollVisibleService=e.scrollVisibleService,this.menuService=e.menuService,this.headerNavigationService=e.headerNavigationService,this.dragAndDropService=e.dragAndDropService,this.pinnedRowModel=e.pinnedRowModel,this.rowRenderer=e.rowRenderer,this.popupService=e.popupService,this.mouseEventService=e.mouseEventService,this.rowModel=e.rowModel,this.filterManager=e.filterManager,this.environment=e.environment}getScrollFeature(){return this.bodyScrollFeature}getBodyViewportElement(){return this.eBodyViewport}setComp(e,t,i,s,r,o,n){var l;this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=s,this.eBottom=r,this.eStickyTop=o,this.eStickyBottom=n,this.eCenterColsViewport=i.querySelector(`.${_s("center").viewport}`),this.eFullWidthContainer=i.querySelector(`.${_s("fullWidth").container}`),this.eStickyTopFullWidthContainer=o.querySelector(`.${_s("stickyTopFullWidth").container}`),this.eStickyBottomFullWidthContainer=n.querySelector(`.${_s("stickyBottomFullWidth").container}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new rd(this.comp)),this.bodyScrollFeature=this.createManagedBean(new SR(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,i,r,o,n]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),(l=this.filterManager)==null||l.setupAdvancedFilterHeaderComp(s),this.ctrlsService.register("gridBodyCtrl",this)}getComp(){return this.comp}addEventListeners(){const e=this.setFloatingHeights.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.onScrollGapChanged.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,headerHeightChanged:this.onHeaderHeightChanged.bind(this)})}addFocusListeners(e){e.forEach(t=>{this.addManagedElementListeners(t,{focusin:i=>{const{target:s}=i,r=Zs(s,"ag-root",t);t.classList.toggle("ag-has-focus",!r)},focusout:i=>{const{target:s,relatedTarget:r}=i,o=t.contains(r),n=Zs(r,"ag-root",t);Zs(s,"ag-root",t)||(!o||n)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(dF,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(uF,e)}onScrollVisibilityChanged(){const e=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(e),this.setStickyWidth(e),this.setStickyBottomOffsetBottom();const t=e&&this.scrollVisibleService.getScrollbarWidth()||0,i=jf()?16:0,s=`calc(100% + ${t+i}px)`;this.animationFrameService.requestAnimationFrame(()=>this.comp.setBodyViewportWidth(s)),this.updateScrollingClasses()}onScrollGapChanged(){this.updateScrollingClasses()}updateScrollingClasses(){this.eGridBody.classList.toggle("ag-body-vertical-content-no-gap",!this.scrollVisibleService.hasVerticalScrollGap()),this.eGridBody.classList.toggle("ag-body-horizontal-content-no-gap",!this.scrollVisibleService.hasHorizontalScrollGap())}onGridColumnsChanged(){const e=this.columnModel.getCols();this.comp.setColumnCount(e.length)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){if(!this.gos.get("stopEditingWhenCellsLoseFocus"))return;const e=i=>{const s=i.relatedTarget;if(Pc(s)===null){this.rowRenderer.stopEditing();return}let r=t.some(o=>o.contains(s))&&this.mouseEventService.isElementInThisGrid(s);if(!r){const o=this.popupService;r=o.getActivePopups().some(n=>n.contains(s))||o.isElementWithinCustomPopup(s)}r||this.rowRenderer.stopEditing()},t=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom];t.forEach(i=>this.addManagedElementListeners(i,{focusout:e}))}updateRowCount(){var s;const e=this.headerNavigationService.getHeaderRowCount()+(((s=this.filterManager)==null?void 0:s.getHeaderRowCount())??0),t=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,i=t===-1?-1:e+t;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?cF:null,i=Le(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||i&&BS(this.eBodyViewport)}setupRowAnimationCssClass(){let e=this.environment.hasMeasuredSizes();const t=()=>{const i=e&&Xs(this.gos)&&!this.rowContainerHeightService.isStretching(),s=i?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(s,i)};t(),this.addManagedEventListeners({heightScaleChanged:t}),this.addManagedPropertyListener("animateRows",t),this.addManagedEventListeners({gridStylesChanged:()=>{!e&&this.environment.hasMeasuredSizes()&&(e=!0,t())}})}getGridBodyElement(){return this.eGridBody}addBodyViewportListener(){const e=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(this.eBodyViewport,{contextmenu:e}),this.mockContextMenuForIPad(e),this.addManagedElementListeners(this.eBodyViewport,{wheel:this.onBodyViewportWheel.bind(this)}),this.addManagedElementListeners(this.eStickyTop,{wheel:this.onStickyWheel.bind(this)}),this.addManagedElementListeners(this.eStickyBottom,{wheel:this.onStickyWheel.bind(this)}),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:i,shiftKey:s}=e;(s||Math.abs(t)>Math.abs(i))&&this.mouseEventService.isEventFromThisGrid(e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaX:t,deltaY:i,shiftKey:s}=e,r=s||Math.abs(t)>Math.abs(i),o=e.target;r?(this.eStickyTopFullWidthContainer.contains(o)||this.eStickyBottomFullWidthContainer.contains(o))&&this.scrollGridBodyToMatchEvent(e):(e.preventDefault(),this.scrollVertically(i))}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:i}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||i})}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e||i).preventDefault();const{target:s}=e||t;(s===this.eBodyViewport||s===this.ctrlsService.get("center").getViewportElement())&&this.menuService.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody})}mockContextMenuForIPad(e){if(!Yi())return;const t=new Hi(this.eBodyViewport),i=s=>{e(void 0,s.touchStart,s.touchEvent)};this.addManagedListeners(t,{longTap:i}),this.addDestroyFunc(()=>t.destroy())}onBodyViewportWheel(e){this.gos.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()}getGui(){return this.eGridBody}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}addRowDragListener(){this.rowDragFeature=this.createManagedBean(new Vy(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature),this.addDestroyFunc(()=>this.dragAndDropService.removeDropTarget(this.rowDragFeature))}getRowDragFeature(){return this.rowDragFeature}setFloatingHeights(){const{pinnedRowModel:e}=this,t=e.getPinnedTopTotalHeight(),i=e.getPinnedBottomTotalHeight();this.comp.setTopHeight(t),this.comp.setBottomHeight(i),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(i?"inherit":"none"),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}getStickyTopHeight(){return this.stickyTopHeight}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}getStickyBottomHeight(){return this.stickyBottomHeight}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleService.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}onHeaderHeightChanged(){this.setStickyTopOffsetTop()}setStickyTopOffsetTop(){var r;const t=this.ctrlsService.get("gridHeaderCtrl").getHeaderHeight()+(((r=this.filterManager)==null?void 0:r.getHeaderHeight())??0),i=this.pinnedRowModel.getPinnedTopTotalHeight();let s=0;t>0&&(s+=t),i>0&&(s+=i),s>0&&(s+=1),this.comp.setStickyTopTop(`${s}px`)}setStickyBottomOffsetBottom(){const e=this.pinnedRowModel.getPinnedBottomTotalHeight(),i=this.scrollVisibleService.isHorizontalScrollShowing()&&this.scrollVisibleService.getScrollbarWidth()||0,s=e+i;this.comp.setStickyBottomBottom(`${s}px`)}sizeColumnsToFit(e,t){const s=this.isVerticalScrollShowing()?this.scrollVisibleService.getScrollbarWidth():0,o=Io(this.eGridBody)-s;if(o>0){this.columnSizeService.sizeColumnsToFit(o,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFit(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFit(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFit(e,-1)},500):D("tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")}addScrollEventListener(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})}removeScrollEventListener(e){this.eBodyViewport.removeEventListener("scroll",e)}};function Ir(e){return e.map(t=>`<ag-row-container name="${t}"></ag-row-container>`).join("")}`${Ir(["topLeft","topCenter","topRight","topFullWidth"])}${Ir(["left","center","right","fullWidth"])}${Ir(["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])}${Ir(["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])}${Ir(["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])}`;var gF=class extends P{constructor(){super(...arguments),this.beanName="scrollVisibleService"}wireBeans(e){this.ctrlsService=e.ctrlsService,this.columnAnimationService=e.columnAnimationService}postConstruct(){this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this)})}onDisplayedColumnsChanged(){this.updateScrollVisible()}onDisplayedColumnsWidthChanged(){this.updateScrollVisible()}onCentreViewportResized(){this.updateScrollGap()}updateScrollVisible(){this.columnAnimationService.isActive()?this.columnAnimationService.executeLaterVMTurn(()=>{this.columnAnimationService.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsService.get("center");if(!e||this.columnAnimationService.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsService.get("center"),t=e.hasHorizontalScrollGap(),i=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==i)&&(this.horizontalScrollGap=t,this.verticalScrollGap=i,this.eventService.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventService.dispatchEvent({type:"scrollVisibilityChanged"}))}isHorizontalScrollShowing(){return this.horizontalScrollShowing}isVerticalScrollShowing(){return this.verticalScrollShowing}hasHorizontalScrollGap(){return this.horizontalScrollGap}hasVerticalScrollGap(){return this.verticalScrollGap}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),i=typeof e=="number"&&e>=0?e:KS();i!=null&&(this.scrollbarWidth=i,this.eventService.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},zh="__ag_grid_instance",Gm=class Nm extends P{constructor(){super(...arguments),this.beanName="mouseEventService",this.gridInstanceId=Nm.gridInstanceSequence.next()}wireBeans(t){this.ctrlsService=t.ctrlsService}stampTopLevelGridCompWithGridInstance(t){t[zh]=this.gridInstanceId}getRenderedCellForEvent(t){return wc(this.gos,t.target,hs.DOM_DATA_KEY_CELL_CTRL)}isEventFromThisGrid(t){return this.isElementInThisGrid(t.target)}isElementInThisGrid(t){let i=t;for(;i;){const s=i[zh];if(M(s))return s===this.gridInstanceId;i=i.parentElement}return!1}getCellPositionForEvent(t){const i=this.getRenderedCellForEvent(t);return i?i.getCellPosition():null}getNormalisedPosition(t){const i=Le(this.gos,"normal"),s=t;let r,o;if(s.clientX!=null||s.clientY!=null?(r=s.clientX,o=s.clientY):(r=s.x,o=s.y),i){const n=this.ctrlsService.getGridBodyCtrl(),l=n.getScrollFeature().getVScrollPosition(),a=n.getScrollFeature().getHScrollPosition();r+=a.left,o+=l.top}return{x:r,y:o}}};Gm.gridInstanceSequence=new dr;var pF=Gm,fF=class extends P{constructor(){super(),this.beanName="navigationService",this.onPageDown=Fh(this.onPageDown,100),this.onPageUp=Fh(this.onPageUp,100)}wireBeans(e){this.mouseEventService=e.mouseEventService,this.pageBoundsService=e.pageBoundsService,this.focusService=e.focusService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.rowModel=e.rowModel,this.ctrlsService=e.ctrlsService,this.rowRenderer=e.rowRenderer,this.headerNavigationService=e.headerNavigationService,this.rowPositionUtils=e.rowPositionUtils,this.cellNavigationService=e.cellNavigationService,this.pinnedRowModel=e.pinnedRowModel,this.scrollVisibleService=e.scrollVisibleService,this.rangeService=e.rangeService}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const i=e.key,s=e.altKey,r=e.ctrlKey||e.metaKey,o=!!this.rangeService&&e.shiftKey,n=this.mouseEventService.getCellPositionForEvent(e);let l=!1;switch(i){case x.PAGE_HOME:case x.PAGE_END:!r&&!s&&(this.onHomeOrEndKey(i),l=!0);break;case x.LEFT:case x.RIGHT:case x.UP:case x.DOWN:if(!n)return!1;r&&!s&&!o&&(this.onCtrlUpDownLeftRight(i,n),l=!0);break;case x.PAGE_DOWN:case x.PAGE_UP:!r&&!s&&(l=this.handlePageUpDown(i,n,t));break}return l&&e.preventDefault(),l}handlePageUpDown(e,t,i){return i&&(t=this.focusService.getFocusedCell()),t?(e===x.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo(e){var n;const{scrollIndex:t,scrollType:i,scrollColumn:s,focusIndex:r,focusColumn:o}=e;M(s)&&!s.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(s),M(t)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(t,i),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(r),this.focusService.setFocusedCell({rowIndex:r,column:o,rowPinned:null,forceBrowserFocus:!0}),(n=this.rangeService)==null||n.setRangeToCell({rowIndex:r,rowPinned:null,column:o})}onPageDown(e){const i=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),s=this.getViewportHeight(),r=this.pageBoundsService.getPixelOffset(),o=i.top+s,n=this.rowModel.getRowIndexAtPixel(o+r);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,n):this.navigateToNextPage(e,n)}onPageUp(e){const i=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),s=this.pageBoundsService.getPixelOffset(),r=i.top,o=this.rowModel.getRowIndexAtPixel(r+s);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,o,!0):this.navigateToNextPage(e,o,!0)}navigateToNextPage(e,t,i=!1){const s=this.getViewportHeight(),r=this.pageBoundsService.getFirstRow(),o=this.pageBoundsService.getLastRow(),n=this.pageBoundsService.getPixelOffset(),l=this.rowModel.getRow(e.rowIndex),a=i?(l==null?void 0:l.rowHeight)-s-n:s-n,c=(l==null?void 0:l.rowTop)+a;let u=this.rowModel.getRowIndexAtPixel(c+n);if(u===e.rowIndex){const h=i?-1:1;t=u=e.rowIndex+h}let d;i?(d="bottom",u<r&&(u=r),t<r&&(t=r)):(d="top",u>o&&(u=o),t>o&&(t=o)),this.isRowTallerThanView(u)&&(t=u,d="top"),this.navigateTo({scrollIndex:t,scrollType:d,scrollColumn:null,focusIndex:u,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const s=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const i=t?-1:1,s=this.getViewportHeight(),r=this.pageBoundsService.getLastRow();let o=0,n=e.rowIndex;for(;n>=0&&n<=r;){const l=this.rowModel.getRow(n);if(l){const a=l.rowHeight??0;if(o+a>s)break;o+=a}n+=i}return Math.max(0,Math.min(n,r))}getViewportHeight(){const e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),t=this.scrollVisibleService.getScrollbarWidth();let i=e.bottom-e.top;return this.ctrlsService.get("center").isHorizontalScrollShowing()&&(i-=t),i}isRowTallerThanView(e){const t=this.rowModel.getRow(e);if(!t)return!1;const i=t.rowHeight;return typeof i!="number"?!1:i>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const i=this.cellNavigationService.getNextCellToFocus(e,t,!0),{rowIndex:s}=i,r=i.column;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:r,focusIndex:s,focusColumn:r})}onHomeOrEndKey(e){const t=e===x.PAGE_HOME,i=this.visibleColsService.getAllCols(),s=t?i[0]:j(i),r=t?this.pageBoundsService.getFirstRow():this.pageBoundsService.getLastRow();this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:s,focusIndex:r,focusColumn:s})}onTabKeyDown(e,t){const i=t.shiftKey,s=this.tabToNextCellCommon(e,i,t);if(s!==!1){s?t.preventDefault():s===null&&this.focusService.allowFocusForNextGridCoreContainer(i);return}if(i){const{rowIndex:r,rowPinned:o}=e.getRowPosition();(o?r===0:r===this.pageBoundsService.getFirstRow())&&(this.gos.get("headerHeight")===0||this.focusService.isHeaderFocusSuppressed()?this.focusService.focusNextGridCoreContainer(!0,!0):(t.preventDefault(),this.focusService.focusPreviousFromFirstCell(t)))}else e instanceof hs&&e.focusCell(!0),(!i&&this.focusService.focusOverlay(!1)||this.focusService.focusNextGridCoreContainer(i))&&t.preventDefault()}tabToNextCell(e,t){const i=this.focusService.getFocusedCell();if(!i)return!1;let s=this.getCellByPosition(i);return!s&&(s=this.rowRenderer.getRowByPosition(i),!s||!s.isFullWidth())?!1:!!this.tabToNextCellCommon(s,e,t)}tabToNextCellCommon(e,t,i){let s=e.isEditing();if(!s&&e instanceof hs){const n=e.getRowCtrl();n&&(s=n.isEditing())}let r;return s?this.gos.get("editType")==="fullRow"?r=this.moveToNextEditingRow(e,t,i):r=this.moveToNextEditingCell(e,t,i):r=this.moveToNextCellNotEditing(e,t),r===null?r:r||!!this.focusService.getFocusedHeader()}moveToNextEditingCell(e,t,i=null){const s=e.getCellPosition();e.getGui().focus(),e.stopEditing();const r=this.findNextCellToFocusOn(s,t,!0);return r===!1?null:r==null?!1:(r.startEditing(null,!0,i),r.focusCell(!1),!0)}moveToNextEditingRow(e,t,i=null){const s=e.getCellPosition(),r=this.findNextCellToFocusOn(s,t,!0);if(r===!1)return null;if(r==null)return!1;const o=r.getCellPosition(),n=this.isCellEditable(s),l=this.isCellEditable(o),a=o&&s.rowIndex===o.rowIndex&&s.rowPinned===o.rowPinned;return n&&e.setFocusOutOnEditor(),a||(e.getRowCtrl().stopEditing(),r.getRowCtrl().startRowEditing(void 0,void 0,i)),l?(r.setFocusInOnEditor(),r.focusCell()):r.focusCell(!0),!0}moveToNextCellNotEditing(e,t){const i=this.visibleColsService.getAllCols();let s;e instanceof gs?s={...e.getRowPosition(),column:t?i[0]:j(i)}:s=e.getCellPosition();const r=this.findNextCellToFocusOn(s,t,!1);if(r===!1)return null;if(r instanceof hs)r.focusCell(!0);else if(r)return this.tryToFocusFullWidthRow(r.getRowPosition(),t);return M(r)}findNextCellToFocusOn(e,t,i){var r;let s=e;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=this.cellNavigationService.getNextTabbedCell(s,t);const o=this.gos.getCallback("tabToNextCell");if(M(o)){const c=o({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:s||null});if(c===!0||c===null)c===null&&D("Returning `null` from tabToNextCell is deprecated. Return `true` to stay on the current cell, or `false` to let the browser handle the tab behaviour."),s=e;else{if(c===!1)return!1;s={rowIndex:c.rowIndex,column:c.column,rowPinned:c.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const a=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a+s.rowIndex,column:s.column},fromCell:!0}),null}const n=this.gos.get("editType")==="fullRow";if(i&&!n&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const l=this.getCellByPosition(s);if(!l){const a=this.rowRenderer.getRowByPosition(s);if(!a||!a.isFullWidth()||i)continue;return a}if(!l.isSuppressNavigable())return(r=this.rangeService)==null||r.setRangeToCell(s),l}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}getCellByPosition(e){const t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null}lookupRowNodeForCell(e){return e.rowPinned==="top"?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):e.rowPinned==="bottom"?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.rowModel.getRow(e.rowIndex)}navigateToNextCell(e,t,i,s){let r=i,o=!1;for(;r&&(r===i||!this.isValidNavigateCell(r));)this.gos.get("enableRtl")?t===x.LEFT&&(r=this.getLastCellOfColSpan(r)):t===x.RIGHT&&(r=this.getLastCellOfColSpan(r)),r=this.cellNavigationService.getNextCellToFocus(t,r),o=K(r);if(o&&e&&e.key===x.UP&&(r={rowIndex:-1,rowPinned:null,column:i.column}),s){const l=this.gos.getCallback("navigateToNextCell");if(M(l)){const c=l({key:t,previousCellPosition:i,nextCellPosition:r||null,event:e});M(c)?r={rowPinned:c.rowPinned,rowIndex:c.rowIndex,column:c.column}:r=null}}if(!r)return;if(r.rowIndex<0){const l=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l+r.rowIndex,column:i.column},event:e||void 0,fromCell:!0});return}const n=this.getNormalisedPosition(r);n?this.focusPosition(n):this.tryToFocusFullWidthRow(r)}getNormalisedPosition(e){this.ensureCellVisible(e);const t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const i=this.visibleColsService.getAllCols(),s=this.rowRenderer.getRowByPosition(e);if(!s||!s.isFullWidth())return!1;const r=this.focusService.getFocusedCell(),o={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?j(i):i[0])};this.focusPosition(o);const n=t??(r!=null&&this.rowPositionUtils.before(o,r));return this.eventService.dispatchEvent({type:"fullWidthRowFocused",rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:o.column,isFullWidthCell:!0,fromBelow:n}),!0}focusPosition(e){var t;this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),(t=this.rangeService)==null||t.setRangeToCell(e)}isValidNavigateCell(e){return!!this.rowPositionUtils.getRowNode(e)}getLastCellOfColSpan(e){const t=this.getCellByPosition(e);if(!t)return e;const i=t.getColSpanningList();return i.length===1?e:{rowIndex:e.rowIndex,column:j(i),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=bl(this.gos),i=this.rowModel.getRow(e.rowIndex);!(t&&(i==null?void 0:i.sticky))&&K(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)}},mF=class extends P{constructor(){super(...arguments),this.beanName="horizontalResizeService"}wireBeans(e){this.dragService=e.dragService,this.ctrlsService=e.ctrlsService}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0};return this.dragService.addDragSource(t),()=>this.dragService.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const i=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(i)}setResizeIcons(){const e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},vF=class extends P{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupService=e.popupService,this.focusService=e.focusService,this.ctrlsService=e.ctrlsService,this.menuService=e.menuService}hideActiveMenu(){this.hidePopup&&this.hidePopup()}showMenuAfterMouseEvent(e,t,i){this.showPopup(e,s=>{this.popupService.positionPopupUnderMouseEvent({column:e,type:i,mouseEvent:t,ePopup:s})},i,t.target,this.menuService.isLegacyMenuEnabled())}showMenuAfterButtonClick(e,t,i){let s=-1,r="left";const o=this.menuService.isLegacyMenuEnabled();!o&&this.gos.get("enableRtl")&&(s=1,r="right");const n=o?void 0:4*s,l=o?void 0:4;this.showPopup(e,a=>{this.popupService.positionPopupByComponent({type:i,eventSource:t,ePopup:a,nudgeX:n,nudgeY:l,alignSide:r,keepWithinBounds:!0,position:"under",column:e})},i,t,o)}showPopup(e,t,i,s,r){const o=e?this.createBean(new Ky(e,"COLUMN_MENU")):void 0;if(this.activeMenu=o,!(o!=null&&o.hasFilter())||!e)throw new Error("AG Grid - unable to show popup filter, filter instantiation failed");const n=document.createElement("div");Bt(n,"presentation"),n.classList.add("ag-menu"),r||n.classList.add("ag-filter-menu"),[this.tabListener]=this.addManagedElementListeners(n,{keydown:v=>this.trapFocusWithin(v,n)}),n.appendChild(o==null?void 0:o.getGui());let l;const a=()=>o==null?void 0:o.afterGuiDetached(),c=this.menuService.isColumnMenuAnchoringEnabled()?s??this.ctrlsService.getGridBodyCtrl().getGui():void 0,u=v=>{e.setMenuVisible(!1,"contextMenu");const w=v instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),w&&s&&qt(s)){const S=this.focusService.findTabbableParent(s);S&&S.focus()}a(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e)},d=this.localeService.getLocaleTextFunc(),h=r&&i!=="columnFilter"?d("ariaLabelColumnMenu","Column Menu"):d("ariaLabelColumnFilter","Column Filter"),g=this.popupService.addPopup({modal:!0,eChild:n,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(n),anchorToElement:c,ariaLabel:h});g&&(this.hidePopup=l=g.hideFunc),o.afterInit().then(()=>{t(n),o.afterGuiAttached({container:i,hidePopup:l})}),e.setMenuVisible(!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e)}trapFocusWithin(e,t){e.key!==x.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,i){this.eventService.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:i??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},CF=class extends P{constructor(){super(...arguments),this.beanName="resizeObserverService"}observeResize(e,t){const s=pf(this.gos).ResizeObserver,r=s?new s(t):null;return r==null||r.observe(e),()=>r==null?void 0:r.disconnect()}},wF=class extends P{constructor(){super(...arguments),this.beanName="animationFrameService",this.createTasksP1={list:[],sorted:!1},this.createTasksP2={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastPage=0,this.lastScrollTop=0,this.taskCount=0,this.cancelledTasks=new Set}wireBeans(e){this.ctrlsService=e.ctrlsService,this.paginationService=e.paginationService}setScrollTop(e){var i;const t=this.gos.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,t&&e===0){const s=((i=this.paginationService)==null?void 0:i.getCurrentPage())??0;s!==this.lastPage&&(this.lastPage=s,this.scrollGoingDown=!0)}this.lastScrollTop=e}postConstruct(){this.useAnimationFrame=!this.gos.get("suppressAnimationFrame")}isOn(){return this.useAnimationFrame}verifyAnimationFrameOn(e){this.useAnimationFrame===!1&&D(`AnimationFrameService.${e} called but animation frames are off`)}createTask(e,t,i){this.verifyAnimationFrameOn(i);const s={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[i],s),this.schedule()}cancelTask(e){this.cancelledTasks.add(e)}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((i,s)=>i.index!==s.index?t*(s.index-i.index):s.createOrder-i.createOrder),e.sorted=!0}addDestroyTask(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()}executeFrame(e){this.verifyAnimationFrameOn("executeFrame");const t=this.createTasksP1,i=t.list,s=this.createTasksP2,r=s.list,o=this.destroyTasks,n=new Date().getTime();let l=new Date().getTime()-n;const a=e<=0,c=this.ctrlsService.getGridBodyCtrl();for(;a||l<e;){if(!c.getScrollFeature().scrollGridIfNeeded()){let d;if(i.length)this.sortTaskList(t),d=i.pop().task;else if(r.length)this.sortTaskList(s),d=r.pop().task;else if(o.length)d=o.pop();else{this.cancelledTasks.clear();break}this.cancelledTasks.has(d)||d()}l=new Date().getTime()-n}i.length||r.length||o.length?this.requestFrame():this.stopTicking()}stopTicking(){this.ticking=!1}flushAllFrames(){this.useAnimationFrame&&this.executeFrame(-1)}schedule(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);this.requestAnimationFrame(e)}requestAnimationFrame(e){const t=pf(this.gos);t.requestAnimationFrame?t.requestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.setTimeout(e,0)}isQueueEmpty(){return!this.ticking}debounce(e){let t=!1;return()=>{if(!this.isOn()){window.setTimeout(e,0);return}t||(t=!0,this.addDestroyTask(()=>{t=!1,e()}))}}},SF=class extends P{constructor(){super(...arguments),this.beanName="expansionService"}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.isClientSideRowModel=ae(this.gos)}expandRows(e){if(!this.isClientSideRowModel)return;const t=new Set(e);this.rowModel.forEachNode(i=>{i.id&&t.has(i.id)&&(i.expanded=!0)}),this.onGroupExpandedOrCollapsed()}getExpandedRows(){const e=[];return this.rowModel.forEachNode(({expanded:t,id:i})=>{t&&i&&e.push(i)}),e}expandAll(e){this.isClientSideRowModel&&this.rowModel.expandOrCollapseAll(e)}setRowNodeExpanded(e,t,i,s){e&&(i&&e.parent&&e.parent.level!==-1&&this.setRowNodeExpanded(e.parent,t,i,s),e.setExpanded(t,void 0,s))}onGroupExpandedOrCollapsed(){this.isClientSideRowModel&&this.rowModel.refreshModel({step:"map"})}},yF=class extends P{constructor(){super(...arguments),this.beanName="menuService"}wireBeans(e){this.valueService=e.valueService,this.filterMenuFactory=e.filterMenuFactory,this.ctrlsService=e.ctrlsService,this.animationFrameService=e.animationFrameService,this.filterManager=e.filterManager,this.rowRenderer=e.rowRenderer,this.columnChooserFactory=e.columnChooserFactory,this.contextMenuFactory=e.contextMenuFactory,this.enterpriseMenuFactory=e.enterpriseMenuFactory}postConstruct(){this.activeMenuFactory=this.enterpriseMenuFactory??this.filterMenuFactory}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){const t=this.enterpriseMenuFactory&&this.isLegacyMenuEnabled()?this.enterpriseMenuFactory:this.filterMenuFactory;this.showColumnMenuCommon(t,e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory.showMenuAfterContextMenuEvent(e,t,i)}getContextMenuPosition(e,t){const i=this.getRowCtrl(e),s=this.getCellGui(i,t);if(!s)return i?{x:0,y:i.getRowYPosition()}:{x:0,y:0};const r=s.getBoundingClientRect();return{x:r.x+r.width/2,y:r.y+r.height/2}}showContextMenu(e){var o;const t=e.rowNode,i=e.column;let{anchorToElement:s,value:r}=e;t&&i&&r==null&&(r=this.valueService.getValueForDisplay(i,t)),s==null&&(s=this.getContextMenuAnchorElement(t,i)),(o=this.contextMenuFactory)==null||o.onContextMenu(e.mouseEvent??null,e.touchEvent??null,t??null,i??null,r,s)}showColumnChooser(e){var t;(t=this.columnChooserFactory)==null||t.showColumnChooser(e)}hidePopupMenu(){var e;(e=this.contextMenuFactory)==null||e.hideActiveMenu(),this.activeMenuFactory.hideActiveMenu()}hideColumnChooser(){var e;(e=this.columnChooserFactory)==null||e.hideActiveColumnChooser()}isColumnMenuInHeaderEnabled(e){const{suppressMenu:t,suppressHeaderMenuButton:i}=e.getColDef();return!(i??t)&&this.activeMenuFactory.isMenuEnabled(e)&&(this.isLegacyMenuEnabled()||!!this.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){var t;return!e.getColDef().suppressHeaderFilterButton&&!!((t=this.filterManager)!=null&&t.isFilterAllowed(e))}isHeaderContextMenuEnabled(e){const t=e&&Wi(e)?e.getColDef():e==null?void 0:e.getColGroupDef();return!(t!=null&&t.suppressHeaderContextMenu)&&this.getColumnMenuType()==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Yi()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!this.isLegacyMenuEnabled()&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){var t;return!!((t=this.filterManager)!=null&&t.isFilterAllowed(e))&&!this.isLegacyMenuEnabled()&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isColumnMenuAnchoringEnabled(){return!this.isLegacyMenuEnabled()}areAdditionalColumnMenuItemsEnabled(){return this.getColumnMenuType()==="new"}isLegacyMenuEnabled(){return this.getColumnMenuType()==="legacy"}isFloatingFilterButtonEnabled(e){var s;const t=e.getColDef(),i=(s=t.floatingFilterComponentParams)==null?void 0:s.suppressFilterButton;return i!=null&&D("As of v31.1, 'colDef.floatingFilterComponentParams.suppressFilterButton' is deprecated. Use 'colDef.suppressFloatingFilterButton' instead."),t.suppressFloatingFilterButton==null?!i:!t.suppressFloatingFilterButton}getColumnMenuType(){return this.gos.get("columnMenu")}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos.get("suppressMenuHide");return this.isLegacyMenuEnabled()?this.gos.exists("suppressMenuHide")?e:!1:e}showColumnMenuCommon(e,t,i,s){const{positionBy:r}=t,o=t.column;if(r==="button"){const{buttonElement:n}=t;e.showMenuAfterButtonClick(o,n,i,s)}else if(r==="mouse"){const{mouseEvent:n}=t;e.showMenuAfterMouseEvent(o,n,i,s)}else o&&(this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(o,"auto"),this.animationFrameService.requestAnimationFrame(()=>{var l;const n=(l=this.ctrlsService.getHeaderRowContainerCtrl(o.getPinned()))==null?void 0:l.getHeaderCtrlForColumn(o);n&&e.showMenuAfterButtonClick(o,n.getAnchorElementForMenu(s),i,!0)}))}getRowCtrl(e){const{rowIndex:t,rowPinned:i}=e||{};if(t!=null)return this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i})||void 0}getCellGui(e,t){if(!e||!t)return;const i=e.getCellCtrl(t);return(i==null?void 0:i.getGui())||void 0}getContextMenuAnchorElement(e,t){const i=this.ctrlsService.getGridBodyCtrl().getGridBodyElement(),s=this.getRowCtrl(e);if(!s)return i;const r=this.getCellGui(s,t);return r||(s.isFullWidth()?s.getFullWidthElement():i)}},bF=class extends ns{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const i=super.setValue(e,t);return this.eInput.value=e,i}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},RF={selector:"AG-INPUT-TEXT-AREA",component:bF},FF=class extends Cr{constructor(){super(`<div class="ag-large-text">
        <ag-input-text-area data-ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>
        </div>`,[RF]),this.eTextArea=B}init(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),M(e.value,!0)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){const t=e.key;(t===x.LEFT||t===x.UP||t===x.RIGHT||t===x.DOWN||e.shiftKey&&t===x.ENTER)&&e.stopPropagation()}afterGuiAttached(){const e=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()}getValue(){const e=this.eTextArea.getValue();return!M(e)&&!M(this.params.value)?this.params.value:this.params.parseValue(e)}},xF=class extends Cr{constructor(e){super('<div class="ag-popup-editor" tabindex="-1"/>'),this.params=e}postConstruct(){ws(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,i=s=>{Mc(this.gos,s,t.node,t.column,!0)||t.onKeyDown(s)};this.addManagedElementListeners(e,{keydown:i})}},PF=class extends Cr{constructor(){super(`<div class="ag-cell-edit-wrapper">
                <ag-select class="ag-cell-editor" data-ref="eSelect"></ag-select>
            </div>`,[Jy]),this.eSelect=B,this.startedByEnter=!1}wireBeans(e){this.valueService=e.valueService}init(e){this.focusAfterAttached=e.cellStartedEdit;const{eSelect:t,valueService:i,gos:s}=this,{values:r,value:o,eventKey:n}=e;if(K(r)){D("no values found for select cellEditor");return}this.startedByEnter=n!=null?n===x.ENTER:!1;let l=!1;r.forEach(d=>{const h={value:d},g=i.formatValue(e.column,null,d),v=g!=null;h.text=v?g:d,t.addOption(h),l=l||o===d}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:a,valueListMaxWidth:c,valueListMaxHeight:u}=e;a!=null&&t.setPickerGap(a),u!=null&&t.setPickerMaxHeight(u),c!=null&&t.setPickerMaxWidth(c),s.get("editType")!=="fullRow"&&this.addManagedListeners(this.eSelect,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eSelect.showPicker()})}focusIn(){this.eSelect.getFocusableElement().focus()}getValue(){return this.eSelect.getValue()}isPopup(){return!1}},Ml=class extends Cr{constructor(e){super(`
            <div class="ag-cell-edit-wrapper">
                ${e.getTemplate()}
            </div>`,e.getAgComponents()),this.cellEditorInput=e,this.eInput=B}init(e){this.params=e;const{cellStartedEdit:t,eventKey:i,suppressPreventDefault:s}=e,r=this.eInput;this.cellEditorInput.init(r,e);let o,n=!0;t?(this.focusAfterAttached=!0,i===x.BACKSPACE||i===x.DELETE?o="":i&&i.length===1?s?n=!1:o=i:(o=this.cellEditorInput.getStartValue(),i!==x.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,o=this.cellEditorInput.getStartValue()),n&&o!=null&&r.setStartValue(o),this.addManagedElementListeners(r.getGui(),{keydown:l=>{const{key:a}=l;(a===x.PAGE_UP||a===x.PAGE_DOWN)&&l.preventDefault()}})}afterGuiAttached(){var s,r;const e=this.localeService.getLocaleTextFunc(),t=this.eInput;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;fi()||t.getFocusableElement().focus();const i=t.getInputElement();this.highlightAllOnFocus?i.select():(r=(s=this.cellEditorInput).setCaret)==null||r.call(s)}focusIn(){const e=this.eInput,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}},EF=class{getTemplate(){return'<ag-input-text-field class="ag-cell-editor" data-ref="eInput"></ag-input-text-field>'}getAgComponents(){return[El]}init(e,t){this.eInput=e,this.params=t,t.maxLength!=null&&e.setMaxLength(t.maxLength)}getValue(){const e=this.eInput.getValue();return!M(e)&&!M(this.params.value)?this.params.value:this.params.parseValue(e)}getStartValue(){return this.params.useFormatter||this.params.column.getColDef().refData?this.params.formatValue(this.params.value):this.params.value}setCaret(){const e=this.eInput.getValue(),t=M(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t)}},Hm=class extends Ml{constructor(){super(new EF)}},DF=class{getTemplate(){return'<ag-input-number-field class="ag-cell-editor" data-ref="eInput"></ag-input-number-field>'}getAgComponents(){return[cb]}init(e,t){this.eInput=e,this.params=t,t.max!=null&&e.setMax(t.max),t.min!=null&&e.setMin(t.min),t.precision!=null&&e.setPrecision(t.precision),t.step!=null&&e.setStep(t.step);const i=e.getInputElement();t.preventStepping?e.addManagedElementListeners(i,{keydown:this.preventStepping}):t.showStepperButtons&&i.classList.add("ag-number-field-input-stepper")}preventStepping(e){(e.key===x.UP||e.key===x.DOWN)&&e.preventDefault()}getValue(){const e=this.eInput.getValue();if(!M(e)&&!M(this.params.value))return this.params.value;let t=this.params.parseValue(e);if(t==null)return t;if(typeof t=="string"){if(t==="")return null;t=Number(t)}return isNaN(t)?null:t}getStartValue(){return this.params.value}setCaret(){fi()&&this.eInput.getInputElement().focus({preventScroll:!0})}},MF=class extends Ml{constructor(){super(new DF)}},TF=class extends Ps{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=fi();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){fe(this.gos)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?xt(e??null,!1)??void 0:e;return this.min===t?this:(this.min=t,Ft(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?xt(e??null,!1)??void 0:e;return this.max===t?this:(this.max=t,Ft(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Ft(this.eInput,"step",e),this)}getDate(){if(this.eInput.validity.valid)return st(this.getValue())??void 0}setDate(e,t){this.setValue(xt(e??null,!1),t)}},Bm={selector:"AG-INPUT-DATE-FIELD",component:TF},kF=class{getTemplate(){return'<ag-input-date-field class="ag-cell-editor" data-ref="eInput"></ag-input-date-field>'}getAgComponents(){return[Bm]}init(e,t){this.eInput=e,this.params=t,t.min!=null&&e.setMin(t.min),t.max!=null&&e.setMax(t.max),t.step!=null&&e.setStep(t.step)}getValue(){const e=this.eInput.getDate();return!M(e)&&!M(this.params.value)?this.params.value:e??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return xt(e,!1)}},AF=class extends Ml{constructor(){super(new kF)}},IF=class{constructor(e){this.getDataTypeService=e}getTemplate(){return'<ag-input-date-field class="ag-cell-editor" data-ref="eInput"></ag-input-date-field>'}getAgComponents(){return[Bm]}init(e,t){this.eInput=e,this.params=t,t.min!=null&&e.setMin(t.min),t.max!=null&&e.setMax(t.max),t.step!=null&&e.setStep(t.step)}getValue(){const e=this.formatDate(this.eInput.getDate());return!M(e)&&!M(this.params.value)?this.params.value:this.params.parseValue(e??"")}getStartValue(){return xt(this.parseDate(this.params.value??void 0)??null,!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):st(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):xt(e??null,!1)??void 0}},LF=class extends Ml{wireBeans(e){this.dataTypeService=e.dataTypeService}constructor(){super(new IF(()=>this.dataTypeService))}},OF=class extends Cr{constructor(){super(`
            <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">
                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
            </div>`,[Ku]),this.eCheckbox=B}init(e){this.params=e;const t=e.value??void 0;this.eCheckbox.setValue(t),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(this.eCheckbox,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}getValue(){return this.eCheckbox.getValue()}focusIn(){this.eCheckbox.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.localeService.getLocaleTextFunc(),i=Hu(t,e),s=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${s} (${i})`)}},Vr=class{constructor(e){this.cellValueChanges=e}},Ca=class extends Vr{constructor(e,t,i,s){super(e),this.initialRange=t,this.finalRange=i,this.ranges=s}},GF=10,Wh=class{constructor(e){this.actionStack=[],this.maxStackSize=e||GF,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},NF=class extends P{constructor(){super(...arguments),this.beanName="undoRedoService",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=this.activeCellEdit!==null&&this.cellPositionUtils.equals(this.activeCellEdit,t),s=this.activeRowEdit!==null&&this.rowPositionUtils.sameRow(this.activeRowEdit,t);if(!(i||s||this.isPasting||this.isRangeInAction))return;const{rowPinned:o,rowIndex:n,column:l,oldValue:a,value:c}=e,u={rowPinned:o,rowIndex:n,columnId:l.getColId(),newValue:c,oldValue:a};this.cellValueChanges.push(u)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}wireBeans(e){this.focusService=e.focusService,this.ctrlsService=e.ctrlsService,this.cellPositionUtils=e.cellPositionUtils,this.rowPositionUtils=e.rowPositionUtils,this.columnModel=e.columnModel,this.rangeService=e.rangeService}postConstruct(){if(!this.gos.get("undoRedoCellEditing"))return;const e=this.gos.get("undoRedoCellEditingLimit");if(e<=0)return;this.undoStack=new Wh(e),this.redoStack=new Wh(e),this.addListeners();const t=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:i=>{i.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:t,newColumnsLoaded:t,columnGroupOpened:t,columnRowGroupChanged:t,columnMoved:t,columnPinned:t,columnVisible:t,rowDragEnd:t}),this.ctrlsService.whenReady(this,i=>{this.gridBodyCtrl=i.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?this.undoStack.getCurrentStackSize():0}getCurrentRedoStackSize(){return this.redoStack?this.redoStack.getCurrentStackSize():0}undo(e){this.eventService.dispatchEvent({type:"undoStarted",source:e});const t=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo");this.eventService.dispatchEvent({type:"undoEnded",source:e,operationPerformed:t})}redo(e){this.eventService.dispatchEvent({type:"redoStarted",source:e});const t=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo");this.eventService.dispatchEvent({type:"redoEnded",source:e,operationPerformed:t})}undoRedo(e,t,i,s,r){if(!e)return!1;const o=e.pop();return!o||!o.cellValueChanges?!1:(this.processAction(o,n=>n[s],r),o instanceof Ca?this.processRange(this.rangeService,o.ranges||[o[i]]):this.processCell(o.cellValueChanges),t.push(o),!0)}processAction(e,t,i){e.cellValueChanges.forEach(s=>{const{rowIndex:r,rowPinned:o,columnId:n}=s,l={rowIndex:r,rowPinned:o},a=this.rowPositionUtils.getRowNode(l);a.displayed&&a.setDataValue(n,t(s),i)})}processRange(e,t){let i;e.removeAllCellRanges(!0),t.forEach((s,r)=>{if(!s)return;const o=s.startRow,n=s.endRow;r===t.length-1&&(i={rowPinned:o.rowPinned,rowIndex:o.rowIndex,columnId:s.startColumn.getColId()},this.setLastFocusedCell(i));const l={rowStartIndex:o.rowIndex,rowStartPinned:o.rowPinned,rowEndIndex:n.rowIndex,rowEndPinned:n.rowPinned,columnStart:s.startColumn,columns:s.columns};e.addCellRange(l)})}processCell(e){const t=e[0],{rowIndex:i,rowPinned:s}=t,r={rowIndex:i,rowPinned:s},o=this.rowPositionUtils.getRowNode(r),n={rowPinned:t.rowPinned,rowIndex:o.rowIndex,columnId:t.columnId};this.setLastFocusedCell(n,this.rangeService)}setLastFocusedCell(e,t){const{rowIndex:i,columnId:s,rowPinned:r}=e,o=this.gridBodyCtrl.getScrollFeature(),n=this.columnModel.getCol(s);if(!n)return;o.ensureIndexVisible(i),o.ensureColumnVisible(n);const l={rowIndex:i,column:n,rowPinned:r};this.focusService.setFocusedCell({...l,forceBrowserFocus:!0}),t==null||t.setRangeToCell(l)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new Vr(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const i=new Vr(this.cellValueChanges);this.pushActionsToUndoStack(i)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new Vr(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new Ca(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;this.rangeService&&gi(this.gos)?e=new Ca(this.cellValueChanges,void 0,void 0,[...this.rangeService.getCellRanges()]):e=new Vr(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1}})}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}};function HF(e){return e.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition()}function BF(e){return e.ctrlsService.getGridBodyCtrl().getScrollFeature().getHScrollPosition()}function Vm(e,t,i="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(t,i),"ensureVisible")}function zm(e,t,i){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureIndexVisible(t,i),"ensureVisible")}function VF(e,t,i=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureNodeVisible(t,i),"ensureVisible")}function zF(e){var t;(t=e.undoRedoService)==null||t.undo("api")}function WF(e){var t;(t=e.undoRedoService)==null||t.redo("api")}function _F(e,t={}){return e.rowRenderer.getCellEditorInstances(t).map(Zr)}function UF(e){return e.rowRenderer.getEditingCells()}function jF(e,t=!1){e.rowRenderer.stopEditing(t)}function KF(e,t){const i=e.columnModel.getCol(t.colKey);if(!i){D(`no column found for ${t.colKey}`);return}const s={rowIndex:t.rowIndex,rowPinned:t.rowPinned||null,column:i};t.rowPinned==null&&zm(e,t.rowIndex),Vm(e,t.colKey);const o=e.navigationService.getCellByPosition(s);if(!o)return;const{focusService:n,gos:l}=e,a=()=>{const u=fe(l),d=o.getGui();return u!==d&&!!(d!=null&&d.contains(u))},c=l.get("stopEditingWhenCellsLoseFocus")&&a();(c||!n.isCellFocused(s))&&n.setFocusedCell({...s,forceBrowserFocus:c,preventScrollOnBrowserFocus:!0}),o.startRowOrCellEdit(t.key)}function $F(e){var t;return((t=e.undoRedoService)==null?void 0:t.getCurrentUndoStackSize())??0}function YF(e){var t;return((t=e.undoRedoService)==null?void 0:t.getCurrentRedoStackSize())??0}var QF=class extends P{constructor(){super(...arguments),this.beanName="editService"}wireBeans(e){this.navigationService=e.navigationService,this.userComponentFactory=e.userComponentFactory,this.valueService=e.valueService}startEditing(e,t=null,i=!1,s=null){var c;const r=this.createCellEditorParams(e,t,i),o=e.getColumn().getColDef(),n=this.userComponentFactory.getCellEditorDetails(o,r),l=(n==null?void 0:n.popupFromSelector)!=null?n.popupFromSelector:!!o.cellEditorPopup,a=(n==null?void 0:n.popupPositionFromSelector)!=null?n.popupPositionFromSelector:o.cellEditorPopupPosition;return e.setEditing(!0,n),e.getComp().setEditDetails(n,l,a,this.gos.get("reactiveCustomComponents")),this.eventService.dispatchEvent(e.createEvent(s,"cellEditingStarted")),!((c=n==null?void 0:n.params)!=null&&c.suppressPreventDefault)}stopEditing(e,t){const i=e.getComp(),{newValue:s,newValueExists:r}=this.takeValueFromCellEditor(t,i),o=e.getRowNode(),n=e.getColumn(),l=this.valueService.getValueForDisplay(n,o);let a=!1;return r&&(a=this.saveNewValue(e,l,s,o,n)),e.setEditing(!1,void 0),i.setEditDetails(),e.updateAndFormatValue(!1),e.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.eventService.dispatchEvent({...e.createEvent(null,"cellEditingStopped"),oldValue:l,newValue:s,valueChanged:a}),a}handleColDefChanged(e){const t=e.getCellEditor();if(t!=null&&t.refresh){const{eventKey:i,cellStartedEdit:s}=e.getEditCompDetails().params,r=this.createCellEditorParams(e,i,s),o=e.getColumn().getColDef(),n=this.userComponentFactory.getCellEditorDetails(o,r);t.refresh(n.params)}}setFocusOutOnEditor(e){const t=e.getComp().getCellEditor();t&&t.focusOut&&t.focusOut()}setFocusInOnEditor(e){const t=e.getComp(),i=t.getCellEditor();i!=null&&i.focusIn?i.focusIn():(e.focusCell(!0),e.onCellEditorAttached(()=>{var s,r;return(r=(s=t.getCellEditor())==null?void 0:s.focusIn)==null?void 0:r.call(s)}))}stopEditingAndFocus(e,t=!1,i=!1){e.stopRowOrCellEdit(),e.focusCell(!0),t||this.navigateAfterEdit(i,e.getCellPosition())}createPopupEditorWrapper(e){return new xF(e)}takeValueFromCellEditor(e,t){const i={newValueExists:!1};if(e)return i;const s=t.getCellEditor();return!s||s.isCancelAfterEnd&&s.isCancelAfterEnd()?i:{newValue:s.getValue(),newValueExists:!0}}saveNewValue(e,t,i,s,r){if(i===t)return!1;e.setSuppressRefreshCell(!0);const o=s.setDataValue(r,i,"edit");return e.setSuppressRefreshCell(!1),o}createCellEditorParams(e,t,i){const s=e.getColumn(),r=e.getRowNode();return this.gos.addGridCommonParams({value:this.valueService.getValueForDisplay(s,r),eventKey:t,column:s,colDef:s.getColDef(),rowIndex:e.getCellPosition().rowIndex,node:r,data:r.data,cellStartedEdit:i,onKeyDown:e.onKeyDown.bind(e),stopEditing:e.stopEditingAndFocus.bind(e),eGridCell:e.getGui(),parseValue:o=>this.valueService.parseValue(s,r,o,e.getValue()),formatValue:e.formatValue.bind(e)})}navigateAfterEdit(e,t){if(this.gos.get("enterNavigatesVerticallyAfterEdit")){const s=e?x.UP:x.DOWN;this.navigationService.navigateToNextCell(null,s,t,!1)}}},qF=class extends P{constructor(){super(...arguments),this.beanName="rowEditService"}startEditing(e,t=null,i=null,s=null){let r=!0;return e.getAllCellCtrls().reduce((n,l)=>{const a=l===i;return a?r=l.startEditing(t,a,s):l.startEditing(null,a,s),n?!0:l.isEditing()},!1)&&this.setEditing(e,!0),r}stopEditing(e,t=!1){const i=e.getAllCellCtrls(),s=e.isEditing();e.setStoppingRowEdit(!0);let r=!1;for(const o of i){const n=o.stopEditing(t);s&&!t&&!r&&n&&(r=!0)}r&&this.eventService.dispatchEvent(e.createRowEvent("rowValueChanged")),s&&this.setEditing(e,!1),e.setStoppingRowEdit(!1)}setEditing(e,t){e.setEditingRow(t),e.forEachGui(void 0,s=>s.rowComp.addOrRemoveCssClass("ag-row-editing",t));const i=t?e.createRowEvent("rowEditingStarted"):e.createRowEvent("rowEditingStopped");this.eventService.dispatchEvent(i)}},Es={version:z,moduleName:"@ag-grid-community/edit-core",beans:[QF]},XF={version:z,moduleName:"@ag-grid-community/edit-api",apiFunctions:{undoCellEditing:zF,redoCellEditing:WF,getCellEditorInstances:_F,getEditingCells:UF,stopEditing:jF,startEditingCell:KF,getCurrentUndoSize:$F,getCurrentRedoSize:YF},dependantModules:[Es]},ZF={version:z,moduleName:"@ag-grid-community/undo-redo-edit",beans:[NF],dependantModules:[Es]},JF={version:z,moduleName:"@ag-grid-community/full-row-edit",beans:[qF],dependantModules:[Es]},Wm={version:z,moduleName:"@ag-grid-community/default-editor",userComponents:[{name:"agCellEditor",classImp:Hm}],dependantModules:[Es]},ex={version:z,moduleName:"@ag-grid-community/data-type-editors",userComponents:[{name:"agTextCellEditor",classImp:Hm},{name:"agNumberCellEditor",classImp:MF,params:{suppressPreventDefault:!0}},{name:"agDateCellEditor",classImp:AF},{name:"agDateStringCellEditor",classImp:LF},{name:"agCheckboxCellEditor",classImp:OF}],dependantModules:[Wm]},tx={version:z,moduleName:"@ag-grid-community/select-editor",userComponents:[{name:"agSelectCellEditor",classImp:PF}],dependantModules:[Es]},ix={version:z,moduleName:"@ag-grid-community/large-text-editor",userComponents:[{name:"agLargeTextCellEditor",classImp:FF}],dependantModules:[Es]},sx={version:z,moduleName:"@ag-grid-community/all-editors",dependantModules:[Wm,ex,tx,ix]},rx={version:z,moduleName:"@ag-grid-community/editing",dependantModules:[Es,ZF,JF,sx,XF]},ox=class extends P{constructor(){super(...arguments),this.beanName="autoWidthCalculator"}wireBeans(e){this.rowRenderer=e.rowRenderer,this.ctrlsService=e.ctrlsService}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const i=this.getHeaderCellForColumn(e);if(!i)return-1;const s=this.rowRenderer.getAllCellsForColumn(e);return t||s.push(i),this.addElementsToContainerAndGetWidth(s)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.addElementsToContainerAndGetWidth([t]):-1}addElementsToContainerAndGetWidth(e){const t=document.createElement("form");t.style.position="fixed";const i=this.centerRowContainerCtrl.getContainerElement();e.forEach(o=>this.cloneItemIntoDummy(o,t)),i.appendChild(t);const s=t.offsetWidth;i.removeChild(t);const r=this.getAutoSizePadding();return s+r}getAutoSizePadding(){return this.gos.get("autoSizePadding")}getHeaderCellForColumn(e){let t=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach(i=>{const s=i.getHtmlElementForColumnHeader(e);s!=null&&(t=s)}),t}cloneItemIntoDummy(e,t){const i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";const s=document.createElement("div"),r=s.classList;["ag-header-cell","ag-header-group-cell"].some(l=>i.classList.contains(l))?(r.add("ag-header","ag-header-row"),s.style.position="static"):r.add("ag-row");let n=e.parentElement;for(;n;){if(["ag-header-row","ag-row"].some(a=>n.classList.contains(a))){for(let a=0;a<n.classList.length;a++){const c=n.classList[a];c!="ag-row-position-absolute"&&r.add(c)}break}n=n.parentElement}s.appendChild(i),t.appendChild(s)}},nx=class extends P{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.extraTopHeight=0,this.extraBottomHeight=0}wireBeans(e){this.rowModel=e.rowModel,this.rowRenderer=e.rowRenderer,this.ctrlsService=e.ctrlsService,this.pageBoundsService=e.pageBoundsService}postConstruct(){this.isClientSide=ae(this.gos),this.ctrlsService.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl}),this.resetStickyContainers()}getStickyTopRowCtrls(){return this.stickyTopRowCtrls}getStickyBottomRowCtrls(){return this.stickyBottomRowCtrls}setOffsetTop(e){this.extraTopHeight!==e&&(this.extraTopHeight=e,this.eventService.dispatchEvent({type:"stickyTopOffsetChanged",offset:e}))}setOffsetBottom(e){this.extraBottomHeight!==e&&(this.extraBottomHeight=e)}resetOffsets(){this.setOffsetBottom(0),this.setOffsetTop(0)}getExtraTopHeight(){return this.extraTopHeight}getExtraBottomHeight(){return this.extraBottomHeight}getLastPixelOfGroup(e){return this.isClientSide?this.getClientSideLastPixelOfGroup(e):this.getServerSideLastPixelOfGroup(e)}getFirstPixelOfGroup(e){return e.footer?e.sibling.rowTop+e.sibling.rowHeight-1:e.hasChildren()?e.rowTop-1:0}getServerSideLastPixelOfGroup(e){var t,i;if(this.isClientSide)throw new Error("This func should only be called in server side row model.");if(e.isExpandable()||e.footer){if(e.master)return e.detailNode.rowTop+e.detailNode.rowHeight;if(!e.sibling||Math.abs(e.sibling.rowIndex-e.rowIndex)===1){let r=(t=e.childStore)==null?void 0:t.getStoreBounds();return e.footer&&(r=(i=e.sibling.childStore)==null?void 0:i.getStoreBounds()),((r==null?void 0:r.heightPx)??0)+((r==null?void 0:r.topPx)??0)}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}getClientSideLastPixelOfGroup(e){if(!this.isClientSide)throw new Error("This func should only be called in client side row model.");if(e.isExpandable()||e.footer){if(e.footer&&e.rowIndex===0)return Number.MAX_SAFE_INTEGER;if(!e.sibling||Math.abs(e.sibling.rowIndex-e.rowIndex)===1){let s=e.footer?e.sibling:e;for(;s.isExpandable()&&s.expanded;)if(s.master)s=s.detailNode;else if(s.childrenAfterSort){if(s.childrenAfterSort.length===0)break;s=j(s.childrenAfterSort)}return s.rowTop+s.rowHeight}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}updateStickyRows(e){const t=e==="top";let i=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(e,new Set,i);const s=t?this.rowRenderer.getFirstVisibleVerticalPixel()-this.extraTopHeight:this.rowRenderer.getLastVisibleVerticalPixel()-this.extraTopHeight,r=new Set,o=c=>{if(r.add(c),t){const u=this.getLastPixelOfGroup(c),d=s+i+c.rowHeight;u<d?c.stickyRowTop=i+(u-d):c.stickyRowTop=i}else{const u=this.getFirstPixelOfGroup(c),d=s-(i+c.rowHeight);u>d?c.stickyRowTop=i-(u-d):c.stickyRowTop=i}i=0,r.forEach(u=>{const d=u.stickyRowTop+u.rowHeight;i<d&&(i=d)})},n=this.areFooterRowsStickySuppressed(),l=this.gos.get("suppressGroupRowsSticky"),a=c=>{if(!c.displayed)return!1;if(c.footer){if(n===!0||n==="grand"&&c.level===-1||n==="group"&&c.level>-1)return!1;const u=c.sibling.rowIndex?c.sibling.rowIndex+1===c.rowIndex:!1;return e==="bottom"&&u?!1:!r.has(c)}return c.isExpandable()?l===!0||e==="bottom"?!1:!r.has(c)&&c.expanded:!1};for(let c=0;c<100;c++){let u=s+i;t||(u=s-i);const d=this.rowModel.getRowIndexAtPixel(u),h=this.rowModel.getRow(d);if(h==null)break;const v=this.getStickyAncestors(h).find(S=>(t?S.rowIndex<d:S.rowIndex>d)&&a(S));if(v){o(v);continue}if((t?h.rowTop<u:h.rowTop+h.rowHeight>u)&&a(h)){o(h);continue}break}return t||r.forEach(c=>{c.stickyRowTop=i-(c.stickyRowTop+c.rowHeight)}),this.refreshNodesAndContainerHeight(e,r,i)}areFooterRowsStickySuppressed(){const e=this.gos.get("suppressStickyTotalRow");if(e===!0)return!0;const t=!!this.gos.get("groupIncludeFooter")||e==="group",i=!!this.gos.get("groupIncludeTotalFooter")||e==="grand";return t&&i?!0:i?"grand":t?"group":!1}canRowsBeSticky(){const e=bl(this.gos),t=this.areFooterRowsStickySuppressed(),i=this.gos.get("suppressGroupRowsSticky");return e&&(!t||!i)}getStickyAncestors(e){const t=[];let i=e.footer?e.sibling:e.parent;for(;i;)i.sibling&&t.push(i.sibling),t.push(i),i=i.parent;return t.reverse()}checkStickyRows(){const e=this.updateStickyRows("top"),t=this.updateStickyRows("bottom");return e||t}destroyStickyCtrls(){this.resetStickyContainers()}resetStickyContainers(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(e){const t=new Set;if(this.stickyTopRowCtrls.some(i=>i.getRowNode()===e)){for(let i=0;i<this.stickyTopRowCtrls.length;i++){const s=this.stickyTopRowCtrls[i].getRowNode();s!==e&&t.add(s)}this.refreshNodesAndContainerHeight("top",t,this.topContainerHeight)&&this.checkStickyRows();return}for(let i=0;i<this.stickyBottomRowCtrls.length;i++){const s=this.stickyBottomRowCtrls[i].getRowNode();s!==e&&t.add(s)}this.refreshNodesAndContainerHeight("bottom",t,this.bottomContainerHeight)&&this.checkStickyRows()}refreshNodesAndContainerHeight(e,t,i){const s=e==="top",r=s?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,o={},n=[];for(let h=0;h<r.length;h++){const g=r[h].getRowNode();if(!t.has(g)){o[g.id]=r[h],g.sticky=!1;continue}n.push(r[h])}const l=new Set;for(let h=0;h<n.length;h++)l.add(n[h].getRowNode());const a=[];t.forEach(h=>{l.has(h)||(h.sticky=!0,a.push(this.createRowCon(h,!1,!1)))});let c=!!a.length||n.length!==r.length;s?this.topContainerHeight!==i&&(this.topContainerHeight=i,this.gridBodyCtrl.setStickyTopHeight(i),c=!0):this.bottomContainerHeight!==i&&(this.bottomContainerHeight=i,this.gridBodyCtrl.setStickyBottomHeight(i),c=!0),this.destroyRowCtrls(o,!1);const u=[...n,...a];u.sort((h,g)=>g.getRowNode().rowIndex-h.getRowNode().rowIndex),s||u.reverse(),u.forEach(h=>h.setRowTop(h.getRowNode().stickyRowTop));let d=0;return s?(t.forEach(h=>{h.rowIndex<this.pageBoundsService.getFirstRow()&&(d+=h.rowHeight)}),d>this.topContainerHeight&&(d=this.topContainerHeight),this.setOffsetTop(d)):(t.forEach(h=>{h.rowIndex>this.pageBoundsService.getLastRow()&&(d+=h.rowHeight)}),d>this.bottomContainerHeight&&(d=this.bottomContainerHeight),this.setOffsetBottom(d)),c?(s?this.stickyTopRowCtrls=u:this.stickyBottomRowCtrls=u,!0):!1}ensureRowHeightsValid(){let e=!1;const t=i=>{const s=i.getRowNode();if(s.rowHeightEstimated){const r=zi(this.gos,s);s.setRowHeight(r.height),e=!0}};return this.stickyTopRowCtrls.forEach(t),this.stickyBottomRowCtrls.forEach(t),e}},lx=class extends P{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{this.getAllCellCtrls().forEach(o=>o.onCellSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(o=>o.updateRangeBordersIfRangeCount())},i=()=>{this.eventService.addEventListener("cellSelectionChanged",e),this.eventService.addEventListener("columnMoved",t),this.eventService.addEventListener("columnPinned",t),this.eventService.addEventListener("columnVisible",t)},s=()=>{this.eventService.removeEventListener("cellSelectionChanged",e),this.eventService.removeEventListener("columnMoved",t),this.eventService.removeEventListener("columnPinned",t),this.eventService.removeEventListener("columnVisible",t)};this.addDestroyFunc(()=>s()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{gi(this.gos)?i():s()}),gi(this.gos)&&i()}}wireBeans(e){this.animationFrameService=e.animationFrameService,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusService=e.focusService,this.beans=e,this.rowContainerHeightService=e.rowContainerHeightService,this.ctrlsService=e.ctrlsService,this.environment=e.environment}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",e=>this.onSuppressCellFocusChanged(e.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection","rowSelection"],()=>this.redrawRows()),bl(this.gos)&&(ae(this.gos)||Xt(this.gos))&&(this.stickyRowFeature=this.createManagedBean(new nx(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this)))),this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=Le(this.gos,"print"),this.embedFullWidthRows=this.printLayout||this.gos.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new ax(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyTopRowCtrls():[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyBottomRowCtrls():[]}updateAllRowCtrls(){const e=bc(this.rowCtrlsByRowIndex),t=bc(this.zombieRowCtrls),i=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}onCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}onSuppressCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onSuppressCellFocusChanged(e)),this.getFullWidthRowCtrls().forEach(t=>t.onSuppressCellFocusChanged(e))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>{this.onCellFocusChanged(e)},cellFocusCleared:()=>this.onCellFocusChanged(),flashCells:e=>{this.getAllCellCtrls().forEach(t=>t.onFlashCells(e))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.columnModel.getCols().forEach(t=>{const i=a=>{this.getAllCellCtrls().forEach(c=>{c.getColumn()===t&&a(c)})},s=()=>{i(a=>a.onLeftChanged())},r=()=>{i(a=>a.onWidthChanged())},o=()=>{i(a=>a.onFirstRightPinnedChanged())},n=()=>{i(a=>a.onLastLeftPinnedChanged())},l=()=>{i(a=>a.onColDefChanged())};t.addEventListener("leftChanged",s),t.addEventListener("widthChanged",r),t.addEventListener("firstRightPinnedChanged",o),t.addEventListener("lastLeftPinnedChanged",n),t.addEventListener("colDefChanged",l),this.destroyFuncsForColumnListeners.push(()=>{t.removeEventListener("leftChanged",s),t.removeEventListener("widthChanged",r),t.removeEventListener("firstRightPinnedChanged",o),t.removeEventListener("lastLeftPinnedChanged",n),t.removeEventListener("colDefChanged",l)})})}onDomLayoutChanged(){const e=Le(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsForColumn(e){const t=[];return this.getAllRowCtrls().forEach(i=>{const s=i.getCellElement(e);s&&t.push(s)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,"top"),this.refreshFloatingRows(this.bottomRowCtrls,"bottom")}getTopRowCtrls(){return this.topRowCtrls}getCentreRowCtrls(){return this.allRowCtrls}getBottomRowCtrls(){return this.bottomRowCtrls}refreshFloatingRows(e,t){const{pinnedRowModel:i,beans:s,printLayout:r}=this,o=Object.fromEntries(e.map(l=>[l.getRowNode().id,l]));i.forEachPinnedRow(t,(l,a)=>{const c=e[a];c&&i.getPinnedRowById(c.getRowNode().id,t)===void 0&&(c.destroyFirstPass(),c.destroySecondPass()),l.id in o?(e[a]=o[l.id],delete o[l.id]):e[a]=new gs(l,s,!1,!1,r)});const n=t==="top"?i.getPinnedTopRowCount():i.getPinnedBottomRowCount();e.length=n}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}redrawRow(e,t=!1){var i;if(e.sticky)this.stickyRowFeature.refreshStickyNode(e);else if((i=this.cachedRowCtrls)!=null&&i.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const s=r=>{const o=r[e.rowIndex];o&&o.getRowNode()===e&&(o.destroyFirstPass(),o.destroySecondPass(),r[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":s(this.topRowCtrls);break;case"bottom":s(this.bottomRowCtrls);break;default:s(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(e!=null){e==null||e.forEach(i=>this.redrawRow(i,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}getCellToRestoreFocusToAfterRefresh(e){const t=e!=null&&e.suppressKeepFocus?null:this.focusService.getFocusCellToUseAfterRefresh();if(t==null)return null;const i=fe(this.gos),s=So(this.gos,i,hs.DOM_DATA_KEY_CELL_CTRL),r=So(this.gos,i,gs.DOM_DATA_KEY_ROW_CTRL);return s||r?t:null}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);const i=!e.domLayoutChanged&&!!e.recycleRows,s=e.animate&&Xs(this.gos),r=i?this.getRowsToRecycle():null;if(i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature){this.stickyRowFeature.checkStickyRows();const o=this.stickyRowFeature.getExtraTopHeight()+this.stickyRowFeature.getExtraBottomHeight();o&&this.updateContainerHeights(o)}this.recycleRows(r,s),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){var s;const t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&(this.gridBodyCtrl.getScrollFeature().scrollToTop(),(s=this.stickyRowFeature)==null||s.resetOffsets())}updateContainerHeights(e=0){if(this.printLayout){this.rowContainerHeightService.setModelHeight(null);return}let t=this.pageBoundsService.getCurrentPageHeight();t===0&&(t=1),this.rowContainerHeightService.setModelHeight(t+e)}getLockOnRefresh(){var e,t;if(this.refreshInProgress)throw new Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0,(t=(e=this.frameworkOverrides).getLockOnRefresh)==null||t.call(e)}releaseLockOnRefresh(){var e,t;this.refreshInProgress=!1,(t=(e=this.frameworkOverrides).releaseLockOnRefresh)==null||t.call(e)}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){e&&this.focusService.restoreFocusedCell(e,()=>{this.onCellFocusChanged(this.gos.addGridCommonParams({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))})}stopEditing(e=!1){this.getAllRowCtrls().forEach(t=>{t.stopEditing(e)})}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),i=t.length;for(let s=0;s<i;s++){const r=t[s].getAllCellCtrls(),o=r.length;for(let n=0;n<o;n++)e.push(r[n])}return e}getAllRowCtrls(){const e=this.stickyRowFeature&&this.stickyRowFeature.getStickyTopRowCtrls()||[],t=this.stickyRowFeature&&this.stickyRowFeature.getStickyBottomRowCtrls()||[],i=[...this.topRowCtrls,...this.bottomRowCtrls,...e,...t];for(const s in this.rowCtrlsByRowIndex)i.push(this.rowCtrlsByRowIndex[s]);return i}addRenderedRowListener(e,t,i){const s=this.rowCtrlsByRowIndex[t];s&&s.addEventListener(e,i)}flashCells(e={}){this.getCellCtrls(e.rowNodes,e.columns).forEach(t=>t.flashCell(e))}refreshCells(e={}){const t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};for(const i of this.getCellCtrls(e.rowNodes,e.columns))i.refreshOrDestroyCell(t);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=null;this.stickyRowFeature&&Ah()&&(t=this.getCellToRestoreFocusToAfterRefresh()||null);for(const i of this.getRowCtrls(e)){if(!i.isFullWidth())continue;i.refreshFullWidth()||this.redrawRow(i.getRowNode(),!0)}this.dispatchDisplayedRowsChanged(!1),t&&this.restoreFocusedCell(t)}getCellRendererInstances(e){var r;const t=this.getCellCtrls(e.rowNodes,e.columns).map(o=>o.getCellRenderer()).filter(o=>o!=null);if((r=e.columns)!=null&&r.length)return t;const i=[],s=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach(o=>{if(s&&!this.isRowInMap(o.getRowNode(),s)||!o.isFullWidth())return;const n=o.getFullWidthCellRenderers();for(let l=0;l<n.length;l++){const a=n[l];a!=null&&i.push(a)}}),[...i,...t]}getCellEditorInstances(e){const t=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach(i=>{const s=i.getCellEditor();s&&t.push(s)}),t}getEditingCells(){const e=[];return this.getAllCellCtrls().forEach(t=>{if(t.isEditing()){const i=t.getCellPosition();e.push(i)}}),e}mapRowNodes(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(i=>{const s=i.id;switch(i.rowPinned){case"top":t.top[s]=i;break;case"bottom":t.bottom[s]=i;break;default:t.normal[s]=i;break}}),t}isRowInMap(e,t){const i=e.id;switch(e.rowPinned){case"top":return t.top[i]!=null;case"bottom":return t.bottom[i]!=null;default:return t.normal[i]!=null}}getRowCtrls(e){const t=this.mapRowNodes(e),i=this.getAllRowCtrls();return!e||!t?i:i.filter(s=>{const r=s.getRowNode();return this.isRowInMap(r,t)})}getCellCtrls(e,t){let i;M(t)&&(i={},t.forEach(r=>{const o=this.columnModel.getCol(r);M(o)&&(i[o.getId()]=!0)}));const s=[];return this.getRowCtrls(e).forEach(r=>{r.getAllCellCtrls().forEach(o=>{const n=o.getColumn().getId();i&&!i[n]||s.push(o)})}),s}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature&&this.stickyRowFeature.destroyStickyCtrls()}getRowsToRecycle(){const e=[];It(this.rowCtrlsByRowIndex,(i,s)=>{s.getRowNode().id==null&&e.push(i)}),this.removeRowCtrls(e);const t={};return It(this.rowCtrlsByRowIndex,(i,s)=>{const r=s.getRowNode();t[r.id]=s}),this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(i=>{const s=this.rowCtrlsByRowIndex[i];s&&(s.destroyFirstPass(t),s.destroySecondPass()),delete this.rowCtrlsByRowIndex[i]})}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{afterScroll:t}=e;let i;this.stickyRowFeature&&Ah()&&(i=this.getCellToRestoreFocusToAfterRefresh()||void 0);const s=this.firstRenderedRow,r=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let o=!1;if(this.stickyRowFeature){o=this.stickyRowFeature.checkStickyRows();const l=this.stickyRowFeature.getExtraTopHeight()+this.stickyRowFeature.getExtraBottomHeight();l&&this.updateContainerHeights(l)}const n=this.firstRenderedRow!==s||this.lastRenderedRow!==r;if(!(t&&!o&&!n)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,t),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(t&&!o),i!=null)){const l=this.getCellToRestoreFocusToAfterRefresh();i!=null&&l==null&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(i))}}removeRowCompsNotToDraw(e,t){const i={};e.forEach(o=>i[o]=!0);const r=Object.keys(this.rowCtrlsByRowIndex).filter(o=>!i[o]);this.removeRowCtrls(r,t)}calculateIndexesToDraw(e){const t=hb(this.firstRenderedRow,this.lastRenderedRow),i=(r,o)=>{const n=o.getRowNode().rowIndex;n!=null&&(n<this.firstRenderedRow||n>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(o)&&t.push(n)};It(this.rowCtrlsByRowIndex,i),It(e,i),t.sort((r,o)=>r-o);const s=[];for(let r=0;r<t.length;r++){const o=t[r],n=this.rowModel.getRow(o);n&&!n.sticky&&s.push(o)}return s}recycleRows(e,t=!1,i=!1){const s=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(s,!t),s.forEach(r=>{this.createOrUpdateRowCtrl(r,e,t,i)}),e&&(i&&!this.gos.get("suppressAnimationFrame")&&!this.printLayout?this.beans.animationFrameService.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)),this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventService.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const e=this.visibleColsService.isPinningLeft(),t=this.visibleColsService.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const i=t.getRowNode().rowIndex;e.push(i.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=this.mapRowNodes(e);return this.getAllRowCtrls().filter(i=>{if(!i.isFullWidth())return!1;const s=i.getRowNode();return!(t!=null&&!this.isRowInMap(s,t))})}createOrUpdateRowCtrl(e,t,i,s){let r,o=this.rowCtrlsByRowIndex[e];if(o||(r=this.rowModel.getRow(e),M(r)&&M(t)&&t[r.id]&&r.alreadyRendered&&(o=t[r.id],t[r.id]=null)),!o)if(r||(r=this.rowModel.getRow(e)),M(r))o=this.createRowCon(r,i,s);else return;return r&&(r.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=o,o}destroyRowCtrls(e,t){const i=[];It(e,(s,r)=>{if(r){if(this.cachedRowCtrls&&r.isCacheable()){this.cachedRowCtrls.addRow(r);return}if(r.destroyFirstPass(!t),t){const o=r.instanceId;this.zombieRowCtrls[o]=r,i.push(()=>{r.destroySecondPass(),delete this.zombieRowCtrls[o]})}else r.destroySecondPass()}}),t&&(i.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),Tw(i))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=us(this.gos);return e*t}workOutFirstAndLastRowsToRender(){this.rowContainerHeightService.updateOffset();let e,t;if(!this.rowModel.isRowsToRender())e=0,t=-1;else if(this.printLayout)this.environment.refreshRowHeightVariable(),e=this.pageBoundsService.getFirstRow(),t=this.pageBoundsService.getLastRow();else{const l=this.getRowBufferInPixels(),a=this.ctrlsService.getGridBodyCtrl(),c=this.gos.get("suppressRowVirtualisation");let u=!1,d,h;do{const f=this.pageBoundsService.getPixelOffset(),{pageFirstPixel:p,pageLastPixel:m}=this.pageBoundsService.getCurrentPagePixelRange(),y=this.rowContainerHeightService.getDivStretchOffset(),b=a.getScrollFeature().getVScrollPosition(),F=b.top,R=b.bottom;c?(d=p+y,h=m+y):(d=Math.max(F+f-l,p)+y,h=Math.min(R+f+l,m)+y),this.firstVisibleVPixel=Math.max(F+f,p)+y,this.lastVisibleVPixel=Math.min(R+f,m)+y,u=this.ensureAllRowsInRangeHaveHeightsCalculated(d,h)}while(u);let g=this.rowModel.getRowIndexAtPixel(d),v=this.rowModel.getRowIndexAtPixel(h);const w=this.pageBoundsService.getFirstRow(),S=this.pageBoundsService.getLastRow();g<w&&(g=w),v>S&&(v=S),e=g,t=v}const i=Le(this.gos,"normal"),s=this.gos.get("suppressMaxRenderedRowRestriction"),r=Math.max(this.getRowBuffer(),500);i&&!s&&t-e>r&&(t=e+r);const o=e!==this.firstRenderedRow,n=t!==this.lastRenderedRow;(o||n)&&(this.firstRenderedRow=e,this.lastRenderedRow=t,this.eventService.dispatchEvent({type:"viewportChanged",firstRow:e,lastRow:t}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,window.requestAnimationFrame(()=>{this.beans.eventService.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){var o,n;const i=(o=this.pinnedRowModel)==null?void 0:o.ensureRowHeightsValid(),s=(n=this.stickyRowFeature)==null?void 0:n.ensureRowHeightsValid(),r=this.rowModel.ensureRowHeightsValid(e,t,this.pageBoundsService.getFirstRow(),this.pageBoundsService.getLastRow());return(r||s)&&this.eventService.dispatchEvent({type:"recalculateRowBounds"}),s||r||i?(this.updateContainerHeights(),!0):!1}getFirstVisibleVerticalPixel(){return this.firstVisibleVPixel}getLastVisibleVerticalPixel(){return this.lastVisibleVPixel}getFirstVirtualRenderedRow(){return this.firstRenderedRow}getLastVirtualRenderedRow(){return this.lastRenderedRow}doNotUnVirtualiseRow(e){const s=e.getRowNode(),r=this.focusService.isRowNodeFocused(s),o=e.isEditing(),n=s.detail;return r||o||n?!!this.isRowPresent(s):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.paginationService?this.paginationService.isRowPresent(e):!0:!1}createRowCon(e,t,i){const s=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(s)return s;const r=this.gos.get("suppressAnimationFrame"),o=i&&!r&&!this.printLayout;return new gs(e,this.beans,t,o,this.printLayout)}getRenderedNodes(){const e=this.rowCtrlsByRowIndex;return Object.values(e).map(t=>t.getRowNode())}getRowByPosition(e){let t;const{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:t=this.rowCtrlsByRowIndex[i],t||(t=this.getStickyTopRowCtrls().find(s=>s.getRowNode().rowIndex===i)||null,t||(t=this.getStickyBottomRowCtrls().find(s=>s.getRowNode().rowIndex===i)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const s=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!s}},ax=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.getRowNode().id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e==null||e.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.getRowNode()!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],Xe(this.entriesList,i)}removeFromCache(e){const t=e.getRowNode().id;delete this.entriesMap[t],Xe(this.entriesList,e)}getEntries(){return this.entriesList}},cx=class extends P{constructor(){super(...arguments),this.beanName="pinnedRowModel",this.nextId=0,this.pinnedTopRows=new _h,this.pinnedBottomRows=new _h}wireBeans(e){this.beans=e}postConstruct(){this.setPinnedRowData(this.gos.get("pinnedTopRowData"),"top"),this.setPinnedRowData(this.gos.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",e=>this.setPinnedRowData(e.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",e=>this.setPinnedRowData(e.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}isEmpty(e){return(e==="top"?this.pinnedTopRows:this.pinnedBottomRows).isEmpty()}isRowsToRender(e){return!this.isEmpty(e)}onGridStylesChanges(e){if(e.rowHeightChanged){const t=i=>{i.setRowHeight(i.rowHeight,!0)};this.pinnedBottomRows.forEach(t),this.pinnedTopRows.forEach(t)}}ensureRowHeightsValid(){var s,r;let e=!1,t=0;const i=o=>{if(o.rowHeightEstimated){const n=zi(this.gos,o);o.setRowTop(t),o.setRowHeight(n.height),t+=n.height,e=!0}};return(s=this.pinnedBottomRows)==null||s.forEach(i),t=0,(r=this.pinnedTopRows)==null||r.forEach(i),this.eventService.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventService.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const i=t==="top"?this.pinnedTopRows:this.pinnedBottomRows;if(e===void 0){i.clear();return}const s=fr(this.gos),r=t==="top"?ai.ID_PREFIX_TOP_PINNED:ai.ID_PREFIX_BOTTOM_PINNED,o=i.getIds(),n=[],l=new Set;let a=0,c=-1;for(const u of e){const d=(s==null?void 0:s({data:u,level:0,rowPinned:t}))??r+this.nextId++;if(l.has(d)){D("Duplicate ID",d,"found for pinned row with data",u,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter.");continue}c++,l.add(d),n.push(d);const h=i.getById(d);if(h!==void 0)h.data!==u&&h.setData(u),a+=this.setRowTopAndRowIndex(h,a,c),o.delete(d);else{const g=new ai(this.beans);g.id=d,g.data=u,g.rowPinned=t,a+=this.setRowTopAndRowIndex(g,a,c),i.push(g)}}o.forEach(u=>{var d;(d=i.getById(u))==null||d.clearRowTopAndRowIndex()}),i.removeAllById(o),i.setOrder(n)}setRowTopAndRowIndex(e,t,i){return e.setRowTop(t),e.setRowHeight(zi(this.gos,e).height),e.setRowIndex(i),e.rowHeight}getPinnedTopTotalHeight(){return this.getTotalHeight(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return this.getTotalHeight(this.pinnedBottomRows)}getPinnedTopRowCount(){return this.pinnedTopRows.getSize()}getPinnedBottomRowCount(){return this.pinnedBottomRows.getSize()}getPinnedTopRow(e){return this.pinnedTopRows.getByIndex(e)}getPinnedBottomRow(e){return this.pinnedBottomRows.getByIndex(e)}getPinnedRowById(e,t){return t==="top"?this.pinnedTopRows.getById(e):this.pinnedBottomRows.getById(e)}forEachPinnedRow(e,t){return e==="top"?this.pinnedTopRows.forEach(t):this.pinnedBottomRows.forEach(t)}getTotalHeight(e){const t=e.getSize();if(t===0)return 0;const i=e.getByIndex(t-1);return i===void 0?0:i.rowTop+i.rowHeight}},_h=class{constructor(){this.cache={},this.ordering=[]}getById(e){return this.cache[e]}getByIndex(e){const t=this.ordering[e];return this.cache[t]}push(e){this.cache[e.id]=e,this.ordering.push(e.id)}removeAllById(e){for(const t of e)delete this.cache[t];this.ordering=this.ordering.filter(t=>!e.has(t))}setOrder(e){this.ordering=e}forEach(e){this.ordering.forEach((t,i)=>{const s=this.cache[t];s&&e(s,i)})}clear(){this.ordering.length=0,this.cache={}}isEmpty(){return this.ordering.length===0}getSize(){return this.ordering.length}getIds(){return new Set(this.ordering)}},ux=class extends P{constructor(e){super(),this.state="needsLoading",this.version=0,this.id=e}getId(){return this.id}load(){this.state="loading",this.loadFromDatasource()}getVersion(){return this.version}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}getState(){return this.state}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed",this.processServerFail()),this.dispatchLoadCompleted(!1)}success(e,t){this.successCommon(e,t)}pageLoaded(e,t,i){this.successCommon(e,{rowData:t,rowCount:i})}isRequestMostRecentAndLive(e){const t=e===this.version,i=this.isAlive();return t&&i}successCommon(e,t){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}dispatchLoadCompleted(e=!0){const t={type:"loadComplete",success:e,block:this};this.dispatchLocalEvent(t)}},dx=class extends P{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=qe(this.performCheckBlocksToLoad.bind(this),e))}getMaxConcurrentDatasourceRequests(){const e=this.gos.get("maxConcurrentDatasourceRequests");if(e==null)return 2;if(!(e<=0))return e}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Xe(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchLocalEvent({type:"blockLoaded"}),this.activeBlockLoadsCount==0&&this.dispatchLocalEvent({type:"blockLoaderFinished"})}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){this.gos.get("debug")&&Lt("RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.getAvailableLoadingCount(),t=this.blocks.filter(i=>i.getState()==="needsLoading").slice(0,e);this.registerLoads(t.length),t.forEach(i=>i.load()),this.printCacheStatus()}getBlockState(){if(Xt(this.gos))return this.rowModel.getBlockStates();const e={};return this.blocks.forEach(t=>{const{id:i,state:s}=t.getBlockStateJson();e[i]=s}),e}printCacheStatus(){this.gos.get("debug")&&Lt(`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}isLoading(){return this.activeBlockLoadsCount>0}registerLoads(e){this.activeBlockLoadsCount+=e}getAvailableLoadingCount(){return this.maxConcurrentRequests!==void 0?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0}},hx={version:z,moduleName:"@ag-grid-community/row-node-block",beans:[dx]},gx=class{constructor(){this.root=null,this.end=null,this.cachedRange=[]}init(e){this.rowModel=e}reset(){this.root=null,this.end=null,this.cachedRange.length=0}setRoot(e){this.root=e,this.end=null,this.cachedRange.length=0}setEndRange(e){this.end=e,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)}return this.cachedRange}isInRange(e){return this.root===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(){var e;return this.root&&((e=this.root)==null?void 0:e.key)===null&&(this.root=this.rowModel.getRowNode(this.root.id)??null),this.root}getEnd(){var e;return this.end&&((e=this.end)==null?void 0:e.key)===null&&(this.end=this.rowModel.getRowNode(this.end.id)??null),this.end}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const i=t[0].id===this.root.id,s=t.findIndex(r=>r.id===e.id);if(s>-1){const r=t.slice(0,s),o=t.slice(s+1);return this.setEndRange(e),i?{keep:r,discard:o}:{keep:o,discard:r}}else return{keep:t,discard:[]}}extend(e,t=!1){const i=this.getRoot();if(i==null){const r=this.getRange().slice();return t&&e.depthFirstSearch(o=>!o.group&&r.push(o)),r.push(e),this.setRoot(e),{keep:r,discard:[]}}if(this.rowModel.getNodesInRangeForSelection(i,e).find(r=>{var o;return r.id===((o=this.end)==null?void 0:o.id)}))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const r=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:r}}}},px=class extends P{constructor(){super(...arguments),this.beanName="stylingService"}wireBeans(e){this.expressionService=e.expressionService}processAllCellClasses(e,t,i,s){this.processClassRules(void 0,e.cellClassRules,t,i,s),this.processStaticCellClasses(e,t,i)}processClassRules(e,t,i,s,r){if(t==null&&e==null)return;const o={},n={},l=(a,c)=>{a.split(" ").forEach(u=>{u.trim()!=""&&c(u)})};if(t){const a=Object.keys(t);for(let c=0;c<a.length;c++){const u=a[c],d=t[u];let h;typeof d=="string"?h=this.expressionService.evaluate(d,i):typeof d=="function"&&(h=d(i)),l(u,g=>{h?o[g]=!0:n[g]=!0})}}e&&r&&Object.keys(e).forEach(a=>l(a,c=>{o[c]||(n[c]=!0)})),r&&Object.keys(n).forEach(r),Object.keys(o).forEach(s)}getStaticCellClasses(e,t){const{cellClass:i}=e;if(!i)return[];let s;return typeof i=="function"?s=i(t):s=i,typeof s=="string"&&(s=[s]),s||[]}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(r=>{i(r)})}},yn=(e=>(e.TAB_GUARD="ag-tab-guard",e.TAB_GUARD_TOP="ag-tab-guard-top",e.TAB_GUARD_BOTTOM="ag-tab-guard-bottom",e))(yn||{}),_m=class extends P{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:i,eBottomGuard:s,focusTrapActive:r,forceFocusOutWhenTabGuardsAreEmpty:o,isFocusableContainer:n,focusInnerElement:l,onFocusIn:a,onFocusOut:c,shouldStopEventPropagation:u,onTabKeyDown:d,handleKeyDown:h,eFocusableElement:g}=e;this.comp=t,this.eTopGuard=i,this.eBottomGuard=s,this.providedFocusInnerElement=l,this.eFocusableElement=g,this.focusTrapActive=!!r,this.forceFocusOutWhenTabGuardsAreEmpty=!!o,this.isFocusableContainer=!!n,this.providedFocusIn=a,this.providedFocusOut=c,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=d,this.providedHandleKeyDown=h}wireBeans(e){this.focusService=e.focusService}postConstruct(){this.createManagedBean(new xs(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)}))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&this.focusService.findFocusableElements(this.eFocusableElement,".ag-tab-guard").length===0){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}findNextElementOutsideAndFocus(e){var a;const t=Se(this.gos),i=this.focusService.findFocusableElements(t.body,null,!0),s=i.indexOf(e?this.eTopGuard:this.eBottomGuard);if(s===-1)return;let r,o;e?(r=0,o=s):(r=s+1,o=i.length);const n=i.slice(r,o),l=this.gos.get("tabIndex");n.sort((c,u)=>{const d=parseInt(c.getAttribute("tabindex")||"0"),h=parseInt(u.getAttribute("tabindex")||"0");return h===l?1:d===l?-1:d===0?1:h===0?-1:d-h}),(a=n[e?n.length-1:0])==null||a.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const i=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),i&&(i.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length&&t[e?t.length-1:0].focus({preventScroll:!0})}getNextFocusableElement(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},fx=class extends P{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:i,eFocusableElement:s}=this,r=[t,i],o={setTabIndex:w=>{r.forEach(S=>w!=null?S.setAttribute("tabindex",w):S.removeAttribute("tabindex"))}};this.addTabGuards(t,i);const{focusTrapActive:n=!1,onFocusIn:l,onFocusOut:a,focusInnerElement:c,handleKeyDown:u,onTabKeyDown:d,shouldStopEventPropagation:h,forceFocusOutWhenTabGuardsAreEmpty:g,isFocusableContainer:v}=e;this.tabGuardCtrl=this.createManagedBean(new _m({comp:o,focusTrapActive:n,eTopGuard:t,eBottomGuard:i,eFocusableElement:s,onFocusIn:l,onFocusOut:a,focusInnerElement:c,handleKeyDown:u,onTabKeyDown:d,shouldStopEventPropagation:h,forceFocusOutWhenTabGuardsAreEmpty:g,isFocusableContainer:v}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=Se(this.gos).createElement("div"),i=e==="top"?"ag-tab-guard-top":"ag-tab-guard-bottom";return t.classList.add("ag-tab-guard",i),Bt(t,"presentation"),t}addTabGuards(e,t){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];pt(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,i){Wu(t)||(t=t.getGui());const{eBottomGuard:s}=this;s?s.insertAdjacentElement("beforebegin",t):e(t,i)}},mx=class extends re{initialiseTabGuard(t){this.tabGuardFeature=this.createManagedBean(new fx(this)),this.tabGuardFeature.initialiseTabGuard(t)}forceFocusOutOfContainer(t=!1){this.tabGuardFeature.forceFocusOutOfContainer(t)}appendChild(t,i){this.tabGuardFeature.appendChild(super.appendChild.bind(this),t,i)}},vx=0,Cx=200,wx=class extends P{constructor(){super(...arguments),this.beanName="popupService",this.popupList=[]}wireBeans(e){this.ctrlsService=e.ctrlsService,this.resizeObserverService=e.resizeObserverService,this.environment=e.environment}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:i}=e,s=this.getPopupIndex(i);if(s!==-1){const g=this.popupList[s];g.alignedToElement=t}const r=t.getBoundingClientRect(),o=this.getParentRect(),n=this.keepXYWithinBounds(i,r.top-o.top,0),l=i.clientWidth>0?i.clientWidth:200;i.style.minWidth=`${l}px`;const c=o.right-o.left-l;let u;this.gos.get("enableRtl")?(u=h(),u<0&&(u=d(),this.setAlignedStyles(i,"left")),u>c&&(u=0,this.setAlignedStyles(i,"right"))):(u=d(),u>c&&(u=h(),this.setAlignedStyles(i,"right")),u<0&&(u=0,this.setAlignedStyles(i,"left"))),i.style.left=`${u}px`,i.style.top=`${n}px`;function d(){return r.right-o.left-2}function h(){return r.left-o.left-l}}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:i,nudgeY:s,skipObserver:r}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:!0,skipObserver:r,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:r,eventSource:o,alignSide:n="left",position:l="over",column:a,rowNode:c,type:u}=e,d=o.getBoundingClientRect(),h=this.getParentRect(),g=this.getPopupIndex(t);if(g!==-1){const w=this.popupList[g];w.alignedToElement=o}const v=()=>{let w=d.left-h.left;n==="right"&&(w-=t.offsetWidth-d.width);let S;return l==="over"?(S=d.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,d,h,e.nudgeY||0)==="under"?S=d.top-h.top+d.height:S=d.top-t.offsetHeight-(s||0)*2-h.top),{x:w,y:S}};this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:r,updatePosition:v,postProcessCallback:()=>this.callPostProcessPopup(u,t,o,null,a,c)})}shouldRenderUnderOrAbove(e,t,i,s){const r=i.bottom-t.bottom,o=t.top-i.top,n=e.offsetHeight+s;return r>n?"under":o>n||o>r?"above":"under"}setAlignedStyles(e,t){const i=this.getPopupIndex(e);if(i===-1)return;const s=this.popupList[i],{alignedToElement:r}=s;!r||(["right","left","over","above","under"].forEach(n=>{r.classList.remove(`ag-has-popup-positioned-${n}`),e.classList.remove(`ag-popup-positioned-${n}`)}),!t)||(r.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}callPostProcessPopup(e,t,i,s,r,o){const n=this.gos.getCallback("postProcessPopup");n&&n({column:r,rowNode:o,ePopup:t,type:e,eventSource:i,mouseEvent:s})}positionPopup(e){const{ePopup:t,keepWithinBounds:i,nudgeX:s,nudgeY:r,skipObserver:o,updatePosition:n}=e,l={width:0,height:0},a=(c=!1)=>{let{x:u,y:d}=n();c&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,s&&(u+=s),r&&(d+=r),i&&(u=this.keepXYWithinBounds(t,u,1),d=this.keepXYWithinBounds(t,d,0)),t.style.left=`${u}px`,t.style.top=`${d}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!o){const c=this.resizeObserverService.observeResize(t,()=>a(!0));setTimeout(()=>c(),Cx)}}getActivePopups(){return this.popupList.map(e=>e.element)}getPopupList(){return this.popupList}getParentRect(){const e=Se(this.gos);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Bf(t)}keepXYWithinBounds(e,t,i){const s=i===0,r=s?"clientHeight":"clientWidth",o=s?"top":"left",n=s?"height":"width",l=s?"scrollTop":"scrollLeft",a=Se(this.gos),c=a.documentElement,u=this.getPopupParent(),d=e.getBoundingClientRect(),h=u.getBoundingClientRect(),g=a.documentElement.getBoundingClientRect(),v=u===a.body,w=Math.ceil(d[n]);let f=v?(s?Hf:tl)(c)+c[l]:u[r];v&&(f-=Math.abs(g[o]-h[o]));const p=f-w;return Math.min(Math.max(t,0),Math.abs(p))}addPopup(e){const t=Se(this.gos),{eChild:i,ariaLabel:s,alwaysOnTop:r,positionCallback:o,anchorToElement:n}=e;if(!t)return D("could not find the document, document is empty"),{hideFunc:()=>{}};const l=this.getPopupIndex(i);if(l!==-1)return{hideFunc:this.popupList[l].hideFunc};this.initialisePopupPosition(i);const a=this.createPopupWrapper(i,s,!!r),c=this.addEventListenersToPopup({...e,wrapperEl:a});return o&&o(),this.addPopupToPopupList(i,a,c,n),{hideFunc:c}}initialisePopupPosition(e){const i=this.getPopupParent().getBoundingClientRect();M(e.style.top)||(e.style.top=`${i.top*-1}px`),M(e.style.left)||(e.style.left=`${i.left*-1}px`)}createPopupWrapper(e,t,i){const s=this.getPopupParent(),r=document.createElement("div");return this.environment.applyThemeClasses(r),r.classList.add("ag-popup"),e.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Bt(e,"dialog"),ur(e,t),r.appendChild(e),s.appendChild(r),i?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),r}handleThemeChange(e){if(e.themeChanged)for(const t of this.popupList)this.environment.applyThemeClasses(t.wrapper)}addEventListenersToPopup(e){const t=Se(this.gos),i=this.getPopupParent(),{wrapperEl:s,eChild:r,closedCallback:o,afterGuiAttached:n,closeOnEsc:l,modal:a}=e;let c=!1;const u=v=>{if(!s.contains(fe(this.gos)))return;v.key===x.ESCAPE&&!li(v)&&g({keyboardEvent:v})},d=v=>g({mouseEvent:v}),h=v=>g({touchEvent:v}),g=(v={})=>{const{mouseEvent:w,touchEvent:S,keyboardEvent:f,forceHide:p}=v;!p&&(this.isEventFromCurrentPopup({mouseEvent:w,touchEvent:S},r)||c)||(c=!0,i.removeChild(s),t.removeEventListener("keydown",u),t.removeEventListener("mousedown",d),t.removeEventListener("touchstart",h),t.removeEventListener("contextmenu",d),this.eventService.removeEventListener("dragStarted",d),o&&o(w||S||f),this.removePopupFromPopupList(r))};return n&&n({hidePopup:g}),window.setTimeout(()=>{l&&t.addEventListener("keydown",u),a&&(t.addEventListener("mousedown",d),this.eventService.addEventListener("dragStarted",d),t.addEventListener("touchstart",h),t.addEventListener("contextmenu",d))},0),g}addPopupToPopupList(e,t,i,s){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:vx++,isAnchored:!!s}),s&&this.setPopupPositionRelatedToElement(e,s)}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const i=this.getPopupIndex(e);if(i===-1)return;const s=this.popupList[i];if(s.stopAnchoringPromise&&s.stopAnchoringPromise.then(o=>o&&o()),s.stopAnchoringPromise=void 0,s.isAnchored=!1,!t)return;const r=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:s.hideFunc});return s.stopAnchoringPromise=r,s.isAnchored=!0,r}removePopupFromPopupList(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),i=t.getBoundingClientRect(),{element:s,ePopup:r}=e,o=s.getBoundingClientRect(),n=d=>parseInt(d.substring(0,d.length-1),10),l=(d,h)=>{const g=i[d]-o[d],v=n(r.style[d]);return{initialDiff:g,lastDiff:g,initial:v,last:v,direction:h}},a=l("top",0),c=l("left",1),u=this.getFrameworkOverrides();return new we(d=>{u.wrapIncoming(()=>{u.setInterval(()=>{const h=t.getBoundingClientRect(),g=s.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const w=(S,f)=>{const p=n(r.style[f]);S.last!==p&&(S.initial=p,S.last=p);const m=h[f]-g[f];if(m!=S.lastDiff){const y=this.keepXYWithinBounds(r,S.initial+S.initialDiff-m,S.direction);r.style[f]=`${y}px`,S.last=y}S.lastDiff=m};w(a,"top"),w(c,"left")},200).then(h=>{d(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:i,touchEvent:s}=e,r=i||s;if(!r)return!1;const o=this.getPopupIndex(t);if(o===-1)return!1;for(let n=o;n<this.popupList.length;n++){const l=this.popupList[n];if(Qw(l.element,r))return!0}return this.isElementWithinCustomPopup(r.target)}isElementWithinCustomPopup(e){const t=Se(this.gos);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const i=this.getWrapper(e);i&&(i.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(i))}bringPopupToFront(e){const t=this.getPopupParent(),i=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),s=i.length,r=this.getWrapper(e);if(!r||s<=1||!t.contains(e))return;const o=[],n=[];for(const h of i)h!==r&&(h.classList.contains("ag-always-on-top")?n.push(h):o.push(h));const l=[],a=n.length,d=r.classList.contains("ag-always-on-top")||!a?[...o,...n,r]:[...o,r,...n];for(let h=0;h<=s;h++){const g=d[h];if(i[h]===d[h]||g===r)continue;g.querySelectorAll("div").forEach(w=>{w.scrollTop!==0&&l.push([w,w.scrollTop])}),h===0?t.insertAdjacentElement("afterbegin",g):d[h-1].insertAdjacentElement("afterend",g)}for(;l.length;){const h=l.pop();h[0].scrollTop=h[1]}}},Sx=["touchstart","touchend","touchmove","touchcancel"],Um=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t()}setInterval(e,t){return new we(i=>{i(window.setInterval(e,t))})}addEventListener(e,t,i,s){const r=ds(Sx,t);e.addEventListener(t,i,{capture:!!s,passive:r})}get shouldWrapOutgoing(){return!1}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`https://www.ag-grid.com/${this.frameworkName==="solid"?"react":this.frameworkName}-data-grid${e?`/${e}`:""}`}},yx=class extends P{constructor(){super(...arguments),this.beanName="cellNavigationService"}wireBeans(e){this.visibleColsService=e.visibleColsService,this.rowModel=e.rowModel,this.rowRenderer=e.rowRenderer,this.pinnedRowModel=e.pinnedRowModel,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService}getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const i=e===x.UP,s=e===x.DOWN,r=e===x.LEFT;let o,n;if(i||s)n=i?this.pageBoundsService.getFirstRow():this.pageBoundsService.getLastRow(),o=t.column;else{const l=this.visibleColsService.getAllCols(),a=this.gos.get("enableRtl");n=t.rowIndex,o=r!==a?l[0]:j(l)}return{rowIndex:n,rowPinned:null,column:o}}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,s=!1;for(;!s;){switch(e){case x.UP:i=this.getCellAbove(i);break;case x.DOWN:i=this.getCellBelow(i);break;case x.RIGHT:this.gos.get("enableRtl")?i=this.getCellToLeft(i):i=this.getCellToRight(i);break;case x.LEFT:this.gos.get("enableRtl")?i=this.getCellToRight(i):i=this.getCellToLeft(i);break;default:i=null,D("unknown key for navigation ",e);break}i?s=this.isCellGoodToFocusOn(i):s=!0}return i}isCellGoodToFocusOn(e){const t=e.column;let i;switch(e.rowPinned){case"top":i=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case"bottom":i=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:i=this.rowModel.getRow(e.rowIndex);break}return i?!t.isSuppressNavigable(i):!1}getCellToLeft(e){if(!e)return null;const t=this.visibleColsService.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.visibleColsService.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getRowBelow(e){const t=e.rowIndex,i=e.rowPinned;let s=!1;if(this.isLastRowInContainer(e))switch(i){case"bottom":return null;case"top":return this.rowModel.isRowsToRender()?{rowIndex:this.pageBoundsService.getFirstRow(),rowPinned:null}:this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;default:return this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null}else i&&(s=!0);const r=this.rowModel.getRow(e.rowIndex),o=s?void 0:this.getNextStickyPosition(r);return o||{rowIndex:t+1,rowPinned:i}}getNextStickyPosition(e,t){if(!bl(this.gos)||!e||!e.sticky)return;const i=this.rowRenderer.getStickyTopRowCtrls().some(l=>l.getRowNode().rowIndex===e.rowIndex);let s=[];i?s=[...this.rowRenderer.getStickyTopRowCtrls()].sort((l,a)=>l.getRowNode().rowIndex-a.getRowNode().rowIndex):s=[...this.rowRenderer.getStickyBottomRowCtrls()].sort((l,a)=>a.getRowNode().rowIndex-l.getRowNode().rowIndex);const r=t?-1:1,o=s.findIndex(l=>l.getRowNode().rowIndex===e.rowIndex),n=s[o+r];if(n)return{rowIndex:n.getRowNode().rowIndex,rowPinned:null}}getCellBelow(e){if(!e)return null;const t=this.getRowBelow(e);return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}isLastRowInContainer(e){const t=e.rowPinned,i=e.rowIndex;return t==="top"?this.pinnedRowModel.getPinnedTopRowCount()-1<=i:t==="bottom"?this.pinnedRowModel.getPinnedBottomRowCount()-1<=i:this.pageBoundsService.getLastRow()<=i}getRowAbove(e){const t=e.rowIndex,i=e.rowPinned,s=i?t===0:t===this.pageBoundsService.getFirstRow();let r=!1;if(s)return i==="top"?null:i?this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null:this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;i&&(r=!0);const o=this.rowModel.getRow(e.rowIndex),n=r?void 0:this.getNextStickyPosition(o,!0);return n||{rowIndex:t-1,rowPinned:i}}getCellAbove(e){if(!e)return null;const t=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}getLastBodyCell(){return{rowIndex:this.pageBoundsService.getLastRow(),rowPinned:null}}getLastFloatingTopRow(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowCount()-1,rowPinned:"top"}}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){var o;const t=this.visibleColsService.getAllCols();let i=e.rowIndex,s=e.rowPinned,r=this.visibleColsService.getColAfter(e.column);if(!r){r=t[0];const n=this.getRowBelow(e);if(K(n)||!n.rowPinned&&!(((o=this.paginationService)==null?void 0:o.isRowInPage(n))??!0))return null;i=n?n.rowIndex:null,s=n?n.rowPinned:null}return{rowIndex:i,column:r,rowPinned:s}}getNextTabbedCellBackwards(e){var o;const t=this.visibleColsService.getAllCols();let i=e.rowIndex,s=e.rowPinned,r=this.visibleColsService.getColBefore(e.column);if(!r){r=j(t);const n=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(K(n)||!n.rowPinned&&!(((o=this.paginationService)==null?void 0:o.isRowInPage(n))??!0))return null;i=n?n.rowIndex:null,s=n?n.rowPinned:null}return{rowIndex:i,column:r,rowPinned:s}}},je=(e,t)=>{for(const i in t)t[i]=e;return t},Uh={...je("@ag-grid-community/core",{dispatchEvent:0,destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,getState:0,setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0,redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRow:0,getFirstDisplayedRowIndex:0,getLastDisplayedRow:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0,getModel:0,getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0,getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0,addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0,expireValueCache:0,getValue:0,getCellValue:0,showColumnMenuAfterButtonClick:0,showColumnMenuAfterMouseClick:0,showColumnMenu:0,hidePopupMenu:0,onSortChanged:0,getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0,setGridAriaProperty:0,refreshCells:0,flashCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0,addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getColumnDef:0,getColumnDefs:0,sizeColumnsToFit:0,setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumn:0,getDisplayNameForColumnGroup:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnVisible:0,setColumnsVisible:0,setColumnPinned:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0,moveColumn:0,moveColumnByIndex:0,moveColumns:0,setColumnWidth:0,setColumnWidths:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0,autoSizeColumn:0,autoSizeColumns:0,autoSizeAllColumns:0,undoCellEditing:0,redoCellEditing:0,getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0,getCurrentUndoSize:0,getCurrentRedoSize:0,isAnyFilterPresent:0,onFilterChanged:0,isColumnFilterPresent:0,getFilterInstance:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0,paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0,expandAll:0,collapseAll:0,onRowHeightChanged:0,setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...je("@ag-grid-community/client-side-row-model",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...je("@ag-grid-community/csv-export",{getDataAsCsv:0,exportDataAsCsv:0}),...je("@ag-grid-community/infinite-row-model",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...je("@ag-grid-enterprise/advanced-filter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...je("@ag-grid-enterprise/charts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...je("@ag-grid-enterprise/clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...je("@ag-grid-enterprise/excel-export",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...je("@ag-grid-enterprise/master-detail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...je("@ag-grid-enterprise/menu",{showContextMenu:0,showColumnChooser:0,hideColumnChooser:0}),...je("@ag-grid-enterprise/range-selection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...je("@ag-grid-enterprise/row-grouping",{addAggFunc:0,addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0,isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumn:0,removeValueColumns:0,addValueColumn:0,addValueColumns:0,setRowGroupColumns:0,removeRowGroupColumn:0,removeRowGroupColumns:0,addRowGroupColumn:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0,setPivotColumns:0,removePivotColumn:0,removePivotColumns:0,addPivotColumn:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...je("@ag-grid-enterprise/server-side-row-model",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...je("@ag-grid-enterprise/side-bar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...je("@ag-grid-enterprise/status-bar",{getStatusPanel:0})},wa={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},bx=(e,t)=>e.eventService.dispatchEvent(t),jm=class{};Reflect.defineProperty(jm,"name",{value:"GridApi"});var Rx=class extends P{constructor(){super(),this.beanName="apiFunctionService",this.api=new jm,this.fns={...wa,dispatchEvent:bx},this.beans=null,this.preDestroyLink="";const{api:e}=this;for(const t in Uh)e[t]=this.makeApi(t)[t]}wireBeans(e){this.beans=e}postConstruct(){this.preDestroyLink=this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){var r;const{fns:i,beans:s}=this;i!==wa&&(i[e]=((r=s==null?void 0:s.validationService)==null?void 0:r.validateApiFunction(e,t))??t)}makeApi(e){return{[e]:(...t)=>{const{beans:i,fns:{[e]:s}}=this;return s?s(i,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:i,preDestroyLink:s}=this;if(!t)D(`Grid API function ${e}() cannot be called as the grid has been destroyed.
Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${s}`);else{const r=Uh[e];i.assertModuleRegistered(r,`api.${e}`)&&D(`API function '${e}' not registered to module '${r}'`)}}destroy(){super.destroy(),this.fns=wa,this.beans=null}};function Fx(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionService").api}}var xx=class extends P{constructor(){super(...arguments),this.beanName="columnDefFactory"}buildColumnDefs(e,t,i){const s=[],r={};return e.forEach(o=>{const n=this.createDefFromColumn(o,t,i);let l=!0,a=n,c=o.getOriginalParent(),u=null;for(;c;){let d=null;if(c.isPadding()){c=c.getOriginalParent();continue}const h=r[c.getGroupId()];if(h){h.children.push(a),l=!1;break}if(d=this.createDefFromGroup(c),d&&(d.children=[a],r[d.groupId]=d,a=d,c=c.getOriginalParent()),c!=null&&u===c){l=!1;break}u=c}l&&s.push(a)}),s}createDefFromGroup(e){const t=yc(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){const s=yc(e.getColDef());return s.colId=e.getColId(),s.width=e.getActualWidth(),s.rowGroup=e.isRowGroupActive(),s.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,s.pivot=e.isPivotActive(),s.pivotIndex=e.isPivotActive()?i.indexOf(e):null,s.aggFunc=e.isValueActive()?e.getAggFunc():null,s.hide=e.isVisible()?void 0:!0,s.pinned=e.isPinned()?e.getPinned():null,s.sort=e.getSort()?e.getSort():null,s.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,s}},Px=class extends P{constructor(){super(...arguments),this.beanName="columnEventDispatcher"}visibleCols(e){this.eventService.dispatchEvent({type:"displayedColumnsChanged",source:e})}gridColumns(){this.eventService.dispatchEvent({type:"gridColumnsChanged"})}headerHeight(e){this.eventService.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"})}groupHeaderHeight(e){this.eventService.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}groupOpened(e){this.eventService.dispatchEvent({type:"columnGroupOpened",columnGroup:e.length===1?e[0]:void 0,columnGroups:e})}rowGroupChanged(e,t){this.eventService.dispatchEvent({type:"columnRowGroupChanged",columns:e,column:e.length===1?e[0]:null,source:t})}genericColumnEvent(e,t,i){this.eventService.dispatchEvent({type:e,columns:t,column:t.length===1?t[0]:null,source:i})}pivotModeChanged(){this.eventService.dispatchEvent({type:"columnPivotModeChanged"})}virtualColumnsChanged(e){this.eventService.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}newColumnsLoaded(e){this.eventService.dispatchEvent({type:"newColumnsLoaded",source:e})}everythingChanged(e){this.eventService.dispatchEvent({type:"columnEverythingChanged",source:e})}columnMoved(e){const{movedColumns:t,source:i,toIndex:s,finished:r}=e;this.eventService.dispatchEvent({type:"columnMoved",columns:t,column:t&&t.length===1?t[0]:null,toIndex:s,finished:r,source:i})}columnPinned(e,t){if(!e.length)return;const i=e.length===1?e[0]:null,s=this.getCommonValue(e,r=>r.getPinned());this.eventService.dispatchEvent({type:"columnPinned",pinned:s??null,columns:e,column:i,source:t})}columnVisible(e,t){if(!e.length)return;const i=e.length===1?e[0]:null,s=this.getCommonValue(e,r=>r.isVisible());this.eventService.dispatchEvent({type:"columnVisible",visible:s,columns:e,column:i,source:t})}getCommonValue(e,t){if(!e||e.length==0)return;const i=t(e[0]);for(let s=1;s<e.length;s++)if(i!==t(e[s]))return;return i}columnChanged(e,t,i){this.eventService.dispatchEvent({type:e,columns:t,column:t&&t.length==1?t[0]:null,source:i})}columnResized(e,t,i,s=null){e&&e.length&&this.eventService.dispatchEvent({type:"columnResized",columns:e,column:e.length===1?e[0]:null,flexColumns:s,finished:t,source:i})}},Ex=class extends P{constructor(){super(...arguments),this.beanName="columnGetStateService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}getColumnState(){const e=this.columnModel.getColDefCols();if(K(e)||!this.columnModel.isAlive())return[];const i=this.columnModel.getAllCols().map(s=>this.createStateItemFromColumn(s));return this.orderColumnStateList(i),i}createStateItemFromColumn(e){const t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns(),s=e.isRowGroupActive()?t.indexOf(e):null,r=e.isPivotActive()?i.indexOf(e):null,o=e.isValueActive()?e.getAggFunc():null,n=e.getSort()!=null?e.getSort():null,l=e.getSortIndex()!=null?e.getSortIndex():null,a=e.getFlex()!=null&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:n,sortIndex:l,aggFunc:o,rowGroup:e.isRowGroupActive(),rowGroupIndex:s,pivot:e.isPivotActive(),pivotIndex:r,flex:a}}orderColumnStateList(e){const t=this.columnModel.getCols(),i=new Map(t.map((s,r)=>[s.getColId(),r]));e.sort((s,r)=>{const o=i.has(s.colId)?i.get(s.colId):-1,n=i.has(r.colId)?i.get(r.colId):-1;return o-n})}},Dx=class extends P{constructor(){super(...arguments),this.beanName="columnGroupStateService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService}getColumnGroupState(){const e=[],t=this.columnModel.getColTree();return pi(null,t,i=>{Ye(i)&&e.push({groupId:i.getGroupId(),open:i.isExpanded()})}),e}resetColumnGroupState(e){const t=this.columnModel.getColDefColTree();if(!t)return;const i=[];pi(null,t,s=>{if(Ye(s)){const r=s.getColGroupDef(),o={groupId:s.getGroupId(),open:r?r.openByDefault:void 0};i.push(o)}}),this.setColumnGroupState(i,e)}setColumnGroupState(e,t){if(!this.columnModel.getColTree())return;this.columnAnimationService.start();const s=[];e.forEach(r=>{const o=r.groupId,n=r.open,l=this.columnModel.getProvidedColGroup(o);l&&l.isExpanded()!==n&&(l.setExpanded(n),s.push(l))}),this.visibleColsService.refresh(t,!0),s.length&&this.eventDispatcher.groupOpened(s),this.columnAnimationService.finish()}},Mx=class extends P{constructor(){super(...arguments),this.beanName="columnViewportService",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={}}wireBeans(e){this.visibleColsService=e.visibleColsService,this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,i=!1){const s=this.visibleColsService.isBodyWidthDirty();if(!(e===this.scrollWidth&&t===this.scrollPosition&&!s)){if(this.scrollWidth=e,this.scrollPosition=t,this.visibleColsService.setBodyWidthDirty(),this.gos.get("enableRtl")){const o=this.visibleColsService.getBodyContainerWidth();this.viewportLeft=o-this.scrollPosition-this.scrollWidth,this.viewportRight=o-this.scrollPosition}else this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition;this.columnModel.isReady()&&this.checkViewportColumns(i)}}getHeadersToRender(e,t){let i;switch(e){case"left":i=this.rowsOfHeadersToRenderLeft[t];break;case"right":i=this.rowsOfHeadersToRenderRight[t];break;default:i=this.rowsOfHeadersToRenderCenter[t];break}return i||[]}extractViewportColumns(){const e=this.visibleColsService.getCenterCols();this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||this.isAnyParentAutoHeaderHeight(e)?!0:this.isColumnInRowViewport(e)}isAnyParentAutoHeaderHeight(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,i=t+e.getActualWidth(),s=this.viewportLeft-200,r=this.viewportRight+200,o=t<s&&i<s,n=t>r&&i>r;return!o&&!n}getViewportColumns(){const e=this.visibleColsService.getLeftCols(),t=this.visibleColsService.getRightCols();return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.columnModel.isColSpanActive())return this.colsWithinViewport;const t=r=>{const o=r.getLeft();return M(o)&&o>this.viewportLeft},i=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),s=this.visibleColsService.getColsCenter();return this.visibleColsService.getColsForRow(e,s,i,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventDispatcher.virtualColumnsChanged(e)}calculateHeaderRows(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={};const e={},t=this.visibleColsService.getLeftCols(),i=this.visibleColsService.getRightCols();this.headerColsWithinViewport.concat(t).concat(i).forEach(o=>e[o.getId()]=!0);const r=(o,n,l)=>{let a=!1;for(let c=0;c<o.length;c++){const u=o[c];let d=!1;if(Wi(u))d=e[u.getId()]===!0;else{const g=u.getDisplayedChildren();g&&(d=r(g,n,l+1))}d&&(a=!0,n[l]||(n[l]=[]),n[l].push(u))}return a};r(this.visibleColsService.getTreeLeft(),this.rowsOfHeadersToRenderLeft,0),r(this.visibleColsService.getTreeRight(),this.rowsOfHeadersToRenderRight,0),r(this.visibleColsService.getTreeCenter(),this.rowsOfHeadersToRenderCenter,0)}extractViewport(){const e=s=>`${s.getId()}-${s.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),i=this.colsWithinViewportHash!==t;return i&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),i}},Tx=class extends P{constructor(){super(...arguments),this.beanName="agComponentUtils"}wireBeans(e){this.componentMetadataProvider=e.componentMetadataProvider}adaptFunction(e,t){const i=this.componentMetadataProvider.retrieve(e);return i&&i.functionAdapter?i.functionAdapter(t):null}adaptCellRendererFunction(e){class t{refresh(){return!1}getGui(){return this.eGui}init(s){const r=e(s),o=typeof r;if(o==="string"||o==="number"||o==="boolean"){this.eGui=Po("<span>"+r+"</span>");return}if(r==null){this.eGui=Po("<span></span>");return}this.eGui=r}}return t}doesImplementIComponent(e){return e?e.prototype&&"getGui"in e.prototype:!1}},kx=class extends P{constructor(){super(...arguments),this.beanName="componentMetadataProvider"}wireBeans(e){this.agComponentUtils=e.agComponentUtils}postConstruct(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","onParamsUpdated","refresh"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},dragAndDropImageComponent:{mandatoryMethodList:["setIcon","setLabel"],optionalMethodList:[]},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached","onParamsUpdated","refresh"]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["refresh"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","getState"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]},menuItem:{mandatoryMethodList:[],optionalMethodList:["setActive","select","setExpanded","configureDefaults"]}}}retrieve(e){return this.componentMetaData[e]}},Ax=["rowPositionUtils","cellPositionUtils","headerPositionUtils","paginationAutoPageSizeService","apiFunctionService","gridApi","userComponentRegistry","agComponentUtils","componentMetadataProvider","resizeObserverService","userComponentFactory","rowContainerHeightService","horizontalResizeService","localeService","validationService","pinnedRowModel","dragService","visibleColsService","eventService","gos","popupService","selectionService","columnFilterService","quickFilterService","filterManager","columnModel","headerNavigationService","pageBoundsService","paginationService","pageBoundsListener","rowRenderer","expressionService","columnFactory","alignedGridsService","navigationService","valueCache","valueService","loggerFactory","autoWidthCalculator","filterMenuFactory","dragAndDropService","focusService","mouseEventService","environment","cellNavigationService","stylingService","scrollVisibleService","sortController","columnHoverService","columnAnimationService","selectableService","autoColService","controlsColService","changeDetectionService","animationFrameService","undoRedoService","columnDefFactory","rowCssClassCalculator","rowNodeBlockLoader","rowNodeSorter","ctrlsService","pinnedWidthService","rowNodeEventThrottle","ctrlsFactory","dataTypeService","syncService","overlayService","stateService","expansionService","apiEventService","ariaAnnouncementService","menuService","columnApplyStateService","columnEventDispatcher","columnMoveService","columnAutosizeService","columnGetStateService","columnGroupStateService","columnSizeService","funcColsService","columnNameService","columnViewportService","pivotResultColsService","showRowGroupColsService"],jh=Object.fromEntries(Ax.map((e,t)=>[e,t]));function Ix(e,t){const i=(e.beanName?jh[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,s=(t.beanName?jh[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return i-s}function Lx(e,t){return(e==null?void 0:e.beanName)==="gridDestroyService"?-1:0}var Ox=class extends P{constructor(){super(...arguments),this.beanName="ctrlsFactory",this.registry={}}register(e){this.registry[e.name]=e.classImp}getInstance(e,...t){const i=this.registry[e];if(i!=null)return new i(...t)}},Gx=class extends P{constructor(){super(...arguments),this.beanName="ctrlsService",this.params={gridCtrl:void 0,gridBodyCtrl:void 0,center:void 0,left:void 0,right:void 0,bottomCenter:void 0,bottomLeft:void 0,bottomRight:void 0,topCenter:void 0,topLeft:void 0,topRight:void 0,stickyTopCenter:void 0,stickyTopLeft:void 0,stickyTopRight:void 0,stickyBottomCenter:void 0,stickyBottomLeft:void 0,stickyBottomRight:void 0,fakeHScrollComp:void 0,fakeVScrollComp:void 0,gridHeaderCtrl:void 0,centerHeader:void 0,leftHeader:void 0,rightHeader:void 0},this.ready=!1,this.readyCallbacks=[],this.runReadyCallbacksAsync=!1}wireBeans(e){var t,i;this.runReadyCallbacksAsync=((i=(t=e.frameworkOverrides).runWhenReadyAsync)==null?void 0:i.call(t))??!1}postConstruct(){this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(e=>e(this.params)),this.readyCallbacks.length=0)},this.runReadyCallbacksAsync)}updateReady(){this.ready=Object.values(this.params).every(e=>(e==null?void 0:e.isAlive())??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const i=this.readyCallbacks.indexOf(t);i>=0&&this.readyCallbacks.splice(i,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:i}=this.params;return[e,i,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}},Nx=class extends P{constructor(){super(...arguments),this.beanName="cellPositionUtils"}createId(e){const{rowIndex:t,rowPinned:i,column:s}=e;return this.createIdFromValues({rowIndex:t,column:s,rowPinned:i})}createIdFromValues(e){const{rowIndex:t,rowPinned:i,column:s}=e;return`${t}.${i??"null"}.${s.getId()}`}equals(e,t){const i=e.column===t.column,s=e.rowPinned===t.rowPinned,r=e.rowIndex===t.rowIndex;return i&&s&&r}},Hx=class extends P{constructor(){super(...arguments),this.beanName="rowNodeEventThrottle",this.events=[]}wireBeans(e){this.animationFrameService=e.animationFrameService,this.rowModel=e.rowModel}postConstruct(){ae(this.gos)&&(this.clientSideRowModel=this.rowModel)}dispatchExpanded(e,t){if(this.clientSideRowModel==null){this.eventService.dispatchEvent(e);return}this.events.push(e);const i=()=>{this.clientSideRowModel&&this.clientSideRowModel.onRowGroupOpened(),this.events.forEach(s=>this.eventService.dispatchEvent(s)),this.events=[]};t?i():(this.dispatchExpandedDebounced==null&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(i)),this.dispatchExpandedDebounced())}},Bx=class extends P{constructor(){super(...arguments),this.beanName="rowPositionUtils"}wireBeans(e){this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel,this.pageBoundsService=e.pageBoundsService}getFirstRow(){let e=0,t;return this.pinnedRowModel.getPinnedTopRowCount()?t="top":this.rowModel.getRowCount()?(t=null,e=this.pageBoundsService.getFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(t="bottom"),t===void 0?null:{rowIndex:e,rowPinned:t}}getLastRow(){let e,t=null;const i=this.pinnedRowModel.getPinnedBottomRowCount(),s=this.pinnedRowModel.getPinnedTopRowCount();return i?(t="bottom",e=i-1):this.rowModel.getRowCount()?(t=null,e=this.pageBoundsService.getLastRow()):s&&(t="top",e=s-1),e===void 0?null:{rowIndex:e,rowPinned:t}}getRowNode(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRow(e.rowIndex);case"bottom":return this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);default:return this.rowModel.getRow(e.rowIndex)}}sameRow(e,t){return!e&&!t?!0:e&&!t||!e&&t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}before(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(M(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}},Kh={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},$h={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},Yh={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},Vx=class extends P{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.ancestorThemeClasses=[],this.sizesMeasured=!1,this.gridTheme=null}wireBeans(e){this.resizeObserverService=e.resizeObserverService,this.eGridDiv=e.eGridDiv}postConstruct(){this.addManagedPropertyListener("theme",()=>this.handleThemeGridOptionChange()),this.handleThemeGridOptionChange(),this.addDestroyFunc(()=>this.stopUsingTheme()),this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.ancestorThemeClasses=this.readAncestorThemeClasses(),this.setUpThemeClassObservers(),this.getSizeEl(Kh),this.getSizeEl($h),this.getSizeEl(Yh)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(Kh)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue($h)}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(Yh)}hasMeasuredSizes(){return this.sizesMeasured}getGridThemeClass(){var e;return((e=this.gridTheme)==null?void 0:e.getCssClass())||null}getThemeClasses(){return this.gridTheme?[this.gridTheme.getCssClass()]:this.ancestorThemeClasses}applyThemeClasses(e){const t=this.getThemeClasses();for(const i of Array.from(e.classList))i.startsWith("ag-theme-")&&!t.includes(i)&&e.classList.remove(i);e.classList.add(...t)}refreshRowHeightVariable(){const e=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),t=this.gos.get("rowHeight");if(t==null||isNaN(t)||!isFinite(t))return e!==null&&this.eGridDiv.style.setProperty("--ag-line-height",null),-1;const i=`${t}px`;return e!=i?(this.eGridDiv.style.setProperty("--ag-line-height",i),t):e!=""?parseFloat(e):-1}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const i=this.measureSizeEl(e);return i==="detached"||i==="no-styles"?e.defaultValue:(this.lastKnownValues.set(e,i),i)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const i=t.offsetWidth;return i===Qh?"no-styles":(this.sizesMeasured=!0,i)}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;let i=this.eMeasurementContainer;i||(i=this.eMeasurementContainer=document.createElement("div"),i.className="ag-measurement-container",this.gos.get("theme")&&this.applyThemeClasses(i),this.eGridDiv.appendChild(i)),t=document.createElement("div"),t.style.width=`var(${e.cssName}, ${Qh}px)`,i.appendChild(t),this.sizeEls.set(e,t);let s=this.measureSizeEl(e);s==="no-styles"&&D(`no value for ${e.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e.defaultValue} will be used and updated when styles load.`);const r=this.resizeObserverService.observeResize(t,()=>{const o=this.measureSizeEl(e);o==="detached"||o==="no-styles"||(this.lastKnownValues.set(e,o),o!==s&&(s=o,this.fireGridStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>r()),t}fireGridStylesChangedEvent(e){this.eventService.dispatchEvent({type:"gridStylesChanged",[e]:!0})}setUpThemeClassObservers(){const e=new MutationObserver(()=>{const i=this.readAncestorThemeClasses();zx(i,this.ancestorThemeClasses)||(this.ancestorThemeClasses=i,this.fireGridStylesChangedEvent("themeChanged"))});let t=this.eGridDiv;for(;t;)e.observe(t||this.eGridDiv,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement;this.addDestroyFunc(()=>e.disconnect())}readAncestorThemeClasses(){let e=this.eGridDiv;const t=[];for(;e;){const i=Array.from(e.classList).filter(s=>s.startsWith("ag-theme-"));for(const s of i)t.includes(s)||t.unshift(s);e=e.parentElement}return Object.freeze(t)}handleThemeGridOptionChange(){const{gos:e,eMeasurementContainer:t,gridTheme:i}=this,s=e.get("theme")||null;s!==i&&(i==null||i.stopUse(),this.gridTheme=s,s==null||s.startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),container:this.eGridDiv}),t&&this.applyThemeClasses(t),this.fireGridStylesChangedEvent("themeChanged"))}stopUsingTheme(){var e;(e=this.gridTheme)==null||e.stopUse(),this.gridTheme=null}},zx=(e,t)=>e.length===t.length&&e.findIndex((i,s)=>e[s]!==t[s])===-1,Qh=15538,Wx=class extends P{constructor(){super(...arguments),this.beanName="eventService",this.globalEventService=new pr}wireBeans(e){this.globalEventListener=e.globalEventListener,this.globalSyncEventListener=e.globalSyncEventListener}postConstruct(){if(this.globalEventListener){const e=Qn(this.gos);this.addGlobalListener(this.globalEventListener,e)}this.globalSyncEventListener&&this.addGlobalListener(this.globalSyncEventListener,!1)}addEventListener(e,t,i){this.globalEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.globalEventService.removeEventListener(e,t,i)}addGlobalListener(e,t=!1){this.globalEventService.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalEventService.removeGlobalListener(e,t)}dispatchLocalEvent(){}dispatchEvent(e){this.globalEventService.dispatchEvent(this.gos.addGridCommonParams(e))}dispatchEventOnce(e){this.globalEventService.dispatchEventOnce(this.gos.addGridCommonParams(e))}},od=class vt extends P{constructor(){super(...arguments),this.beanName="focusService"}wireBeans(t){this.eGridDiv=t.eGridDiv,this.columnModel=t.columnModel,this.visibleColsService=t.visibleColsService,this.headerNavigationService=t.headerNavigationService,this.headerPositionUtils=t.headerPositionUtils,this.rowRenderer=t.rowRenderer,this.rowPositionUtils=t.rowPositionUtils,this.cellPositionUtils=t.cellPositionUtils,this.navigationService=t.navigationService,this.ctrlsService=t.ctrlsService,this.filterManager=t.filterManager,this.rangeService=t.rangeService,this.advancedFilterService=t.advancedFilterService,this.overlayService=t.overlayService}static addKeyboardModeEvents(t){this.instanceCount>0||(t.addEventListener("keydown",vt.toggleKeyboardMode),t.addEventListener("mousedown",vt.toggleKeyboardMode))}static removeKeyboardModeEvents(t){this.instanceCount>0||(t.removeEventListener("keydown",vt.toggleKeyboardMode),t.removeEventListener("mousedown",vt.toggleKeyboardMode))}static toggleKeyboardMode(t){const i=vt.keyboardModeActive,s=t.type==="keydown";s&&(t.ctrlKey||t.metaKey||t.altKey)||i!==s&&(vt.keyboardModeActive=s)}postConstruct(){const t=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:t,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:t,columnRowGroupChanged:t}),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady(this,i=>{this.gridCtrl=i.gridCtrl})}registerKeyboardFocusEvents(){const t=Se(this.gos);vt.addKeyboardModeEvents(t),vt.instanceCount++,this.addDestroyFunc(()=>{vt.instanceCount--,vt.removeKeyboardModeEvents(t)})}onColumnEverythingChanged(){if(!this.focusedCellPosition)return;const t=this.focusedCellPosition.column,i=this.columnModel.getCol(t.getId());t!==i&&this.clearFocusedCell()}isKeyboardMode(){return vt.keyboardModeActive}getFocusCellToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(fe(this.gos),gs.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(fe(this.gos),Dl.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition}isDomDataMissingInHierarchy(t,i){let s=t;for(;s;){if(So(this.gos,s,i))return!1;s=s.parentNode}return!0}getFocusedCell(){return this.focusedCellPosition}shouldRestoreFocus(t){return this.isCellRestoreFocused(t)?(setTimeout(()=>{this.restoredFocusedCellPosition=null},0),!0):!1}clearRestoreFocus(){this.restoredFocusedCellPosition=null,this.awaitRestoreFocusedCell=!1}restoreFocusedCell(t,i){this.awaitRestoreFocusedCell=!0,setTimeout(()=>{this.awaitRestoreFocusedCell&&(this.setRestoreFocusedCell(t),i())})}isCellRestoreFocused(t){return this.restoredFocusedCellPosition==null?!1:this.cellPositionUtils.equals(t,this.restoredFocusedCellPosition)}setRestoreFocusedCell(t){this.getFrameworkOverrides().renderingEngine==="react"&&(this.restoredFocusedCellPosition=t)}getFocusEventParams(t){const{rowIndex:i,rowPinned:s,column:r}=t,o={rowIndex:i,rowPinned:s,column:r,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:i,rowPinned:s});return n&&(o.isFullWidthCell=n.isFullWidth()),o}clearFocusedCell(){if(this.restoredFocusedCellPosition=null,this.focusedCellPosition==null)return;const t=this.getFocusEventParams(this.focusedCellPosition);this.focusedCellPosition=null,this.eventService.dispatchEvent({type:"cellFocusCleared",...t})}setFocusedCell(t){const{column:i,rowIndex:s,rowPinned:r,forceBrowserFocus:o=!1,preventScrollOnBrowserFocus:n=!1}=t,l=this.columnModel.getCol(i);if(!l){this.focusedCellPosition=null;return}this.focusedCellPosition={rowIndex:s,rowPinned:ni(r),column:l},this.eventService.dispatchEvent({type:"cellFocused",...this.getFocusEventParams(this.focusedCellPosition),forceBrowserFocus:o,preventScrollOnBrowserFocus:n})}isCellFocused(t){return this.focusedCellPosition==null?!1:this.cellPositionUtils.equals(t,this.focusedCellPosition)}isRowNodeFocused(t){return this.isRowFocused(t.rowIndex,t.rowPinned)}isHeaderWrapperFocused(t){if(this.focusedHeaderPosition==null)return!1;const i=t.getColumnGroupChild(),s=t.getRowIndex(),r=t.getPinned(),{column:o,headerRowIndex:n}=this.focusedHeaderPosition;return i===o&&s===n&&r==o.getPinned()}clearFocusedHeader(){this.focusedHeaderPosition=null}getFocusedHeader(){return this.focusedHeaderPosition}setFocusedHeader(t,i){this.focusedHeaderPosition={headerRowIndex:t,column:i}}isHeaderFocusSuppressed(){return this.gos.get("suppressHeaderFocus")||this.overlayService.isExclusive()}isCellFocusSuppressed(){return this.gos.get("suppressCellFocus")||this.overlayService.isExclusive()}focusHeaderPosition(t){var c;if(this.isHeaderFocusSuppressed())return!1;const{direction:i,fromTab:s,allowUserOverride:r,event:o,fromCell:n,rowWithoutSpanValue:l}=t;let{headerPosition:a}=t;if(n&&((c=this.filterManager)!=null&&c.isAdvancedFilterHeaderActive()))return this.focusAdvancedFilter(a);if(r){const u=this.getFocusedHeader(),d=this.headerNavigationService.getHeaderRowCount();if(s){const h=this.gos.getCallback("tabToNextHeader");h&&(a=this.getHeaderPositionFromUserFunc({userFunc:h,direction:i,currentPosition:u,headerPosition:a,headerRowCount:d}))}else{const h=this.gos.getCallback("navigateToNextHeader");if(h&&o){const g={key:o.key,previousHeaderPosition:u,nextHeaderPosition:a,headerRowCount:d,event:o};a=h(g)}}}return a?this.focusProvidedHeaderPosition({headerPosition:a,direction:i,event:o,fromCell:n,rowWithoutSpanValue:l}):!1}focusHeaderPositionFromUserFunc(t){if(this.isHeaderFocusSuppressed())return!1;const{userFunc:i,headerPosition:s,direction:r,event:o}=t,n=this.getFocusedHeader(),l=this.headerNavigationService.getHeaderRowCount(),a=this.getHeaderPositionFromUserFunc({userFunc:i,direction:r,currentPosition:n,headerPosition:s,headerRowCount:l});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:r,event:o})}getHeaderPositionFromUserFunc(t){const{userFunc:i,direction:s,currentPosition:r,headerPosition:o,headerRowCount:n}=t,a=i({backwards:s==="Before",previousHeaderPosition:r,nextHeaderPosition:o,headerRowCount:n});return a===!0||a===null?(a===null&&D("Since v31.3 Returning `null` from tabToNextHeader is deprecated. Return `true` to stay on the current header, or `false` to let the browser handle the tab behaviour."),r):a===!1?null:a}focusProvidedHeaderPosition(t){var d;const{headerPosition:i,direction:s,fromCell:r,rowWithoutSpanValue:o,event:n}=t,{column:l,headerRowIndex:a}=i;if(a===-1)return(d=this.filterManager)!=null&&d.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(i):this.focusGridView(l);this.headerNavigationService.scrollToColumn(l,s);const c=this.ctrlsService.getHeaderRowContainerCtrl(l.getPinned()),u=(c==null?void 0:c.focusHeader(i.headerRowIndex,l,n))||!1;return u&&(o!=null||r)&&this.headerNavigationService.setCurrentHeaderRowWithoutSpan(o??-1),u}focusFirstHeader(){if(this.overlayService.isExclusive()&&this.focusOverlay())return!0;let t=this.visibleColsService.getAllCols()[0];if(!t)return!1;t.getParent()&&(t=this.visibleColsService.getColGroupAtLevel(t,0));const i=this.headerPositionUtils.getHeaderIndexToFocus(t,0);return this.focusHeaderPosition({headerPosition:i,rowWithoutSpanValue:0})}focusLastHeader(t){if(this.overlayService.isExclusive()&&this.focusOverlay(!0))return!0;const i=this.headerNavigationService.getHeaderRowCount()-1,s=j(this.visibleColsService.getAllCols());return this.focusHeaderPosition({headerPosition:{headerRowIndex:i,column:s},rowWithoutSpanValue:-1,event:t})}focusPreviousFromFirstCell(t){var i;return(i=this.filterManager)!=null&&i.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(t)}isAnyCellFocused(){return!!this.focusedCellPosition}isRowFocused(t,i){return this.focusedCellPosition==null?!1:this.focusedCellPosition.rowIndex===t&&this.focusedCellPosition.rowPinned===ni(i)}findFocusableElements(t,i,s=!1){const r=GS;let o=Nf;i&&(o+=", "+i),s&&(o+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(t.querySelectorAll(r)).filter(c=>qt(c)),l=Array.prototype.slice.apply(t.querySelectorAll(o));return l.length?((c,u)=>c.filter(d=>u.indexOf(d)===-1))(n,l):n}focusInto(t,i=!1,s=!1){const r=this.findFocusableElements(t,null,s),o=i?j(r):r[0];return o?(o.focus({preventScroll:!0}),!0):!1}findFocusableElementBeforeTabGuard(t,i){if(!i)return null;const s=this.findFocusableElements(t),r=s.indexOf(i);if(r===-1)return null;let o=-1;for(let n=r-1;n>=0;n--)if(s[n].classList.contains("ag-tab-guard-top")){o=n;break}return o<=0?null:s[o-1]}findNextFocusableElement(t=this.eGridDiv,i,s){const r=this.findFocusableElements(t,i?':not([tabindex="-1"])':null),o=fe(this.gos);let n;i?n=r.findIndex(a=>a.contains(o)):n=r.indexOf(o);const l=n+(s?-1:1);return l<0||l>=r.length?null:r[l]}isTargetUnderManagedComponent(t,i){if(!i)return!1;const s=t.querySelectorAll(`.${xs.FOCUS_MANAGED_CLASS}`);if(!s.length)return!1;for(let r=0;r<s.length;r++)if(s[r].contains(i))return!0;return!1}findTabbableParent(t,i=5){let s=0;for(;t&&Pc(t)===null&&++s<=i;)t=t.parentElement;return Pc(t)===null?null:t}focusOverlay(t){var s;const i=this.overlayService.isVisible()&&((s=this.overlayService.getOverlayWrapper())==null?void 0:s.getGui());return!!i&&this.focusInto(i,t)}focusGridViewFailed(t,i){return i&&this.focusOverlay(t)||t&&this.focusLastHeader()}focusGridView(t,i=!1,s=!0){var o,n;if(this.overlayService.isExclusive())return s&&this.focusOverlay(i);if(this.isCellFocusSuppressed())return i&&!this.isHeaderFocusSuppressed()?this.focusLastHeader():s&&this.focusOverlay(i)?!0:this.focusNextGridCoreContainer(!1);const r=i?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(r){const{rowIndex:l,rowPinned:a}=r;if(t??(t=(o=this.getFocusedHeader())==null?void 0:o.column),t&&l!==void 0&&l!==null){if(this.navigationService.ensureCellVisible({rowIndex:l,column:t,rowPinned:a}),i){const c=this.rowRenderer.getRowByPosition(r);if(c!=null&&c.isFullWidth()&&this.navigationService.tryToFocusFullWidthRow(r,i))return!0}return this.setFocusedCell({rowIndex:l,column:t,rowPinned:ni(a),forceBrowserFocus:!0}),(n=this.rangeService)==null||n.setRangeToCell({rowIndex:l,rowPinned:a,column:t}),!0}}return!!(s&&this.focusOverlay(i)||i&&this.focusLastHeader())}isGridFocused(){const t=fe(this.gos);return!!t&&this.eGridDiv.contains(t)}focusNextGridCoreContainer(t,i=!1){return!i&&this.gridCtrl.focusNextInnerContainer(t)?!0:((i||!t&&!this.gridCtrl.isDetailGrid())&&this.gridCtrl.forceFocusOutOfContainer(t),!1)}focusAdvancedFilter(t){var i;return this.advancedFilterFocusColumn=t==null?void 0:t.column,((i=this.advancedFilterService)==null?void 0:i.getCtrl().focusHeaderComp())??!1}focusNextFromAdvancedFilter(t,i){var r;const s=(i?void 0:this.advancedFilterFocusColumn)??((r=this.visibleColsService.getAllCols())==null?void 0:r[0]);return t?this.focusHeaderPosition({headerPosition:{column:s,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(s)}clearAdvancedFilterColumn(){this.advancedFilterFocusColumn=void 0}addFocusableContainer(t){this.gridCtrl.addFocusableContainer(t)}removeFocusableContainer(t){this.gridCtrl.removeFocusableContainer(t)}focusGridInnerElement(t){return this.gridCtrl.focusInnerElement(t)}allowFocusForNextGridCoreContainer(t){this.gridCtrl.allowFocusForNextCoreContainer(t)}};od.keyboardModeActive=!1;od.instanceCount=0;var _x=od,Ux=class extends P{constructor(){super(...arguments),this.beanName="pinnedWidthService"}wireBeans(e){this.visibleColsService=e.visibleColsService}postConstruct(){const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const e=Le(this.gos,"print"),t=e?0:this.visibleColsService.getColsLeftWidth(),i=e?0:this.visibleColsService.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:"leftPinnedWidthChanged"})),i!=this.rightWidth&&(this.rightWidth=i,this.eventService.dispatchEvent({type:"rightPinnedWidthChanged"}))}getPinnedRightWidth(){return this.rightWidth}getPinnedLeftWidth(){return this.leftWidth}},jx=class extends P{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}wireBeans(e){this.beans=e,this.focusService=e.focusService,this.visibleColsService=e.visibleColsService}setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.beans.context.getGridId());const{dragAndDropService:s,mouseEventService:r,ctrlsService:o,resizeObserverService:n}=this.beans,l={getContainer:()=>this.eGui,isInterestedIn:c=>c===1||c===0,getIconName:()=>"notAllowed"};s.addDropTarget(l),this.addDestroyFunc(()=>s.removeDropTarget(l)),r.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new rd(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr"),this.updateGridThemeClass(),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)});const a=n.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>a()),o.register("gridCtrl",this)}isDetailGrid(){var t;const e=this.focusService.findTabbableParent(this.getGui());return((t=e==null?void 0:e.getAttribute("row-id"))==null?void 0:t.startsWith("detail"))||!1}getOptionalSelectors(){var t,i,s,r,o;const e=this.beans;return{paginationSelector:(t=e.paginationService)==null?void 0:t.getPaginationSelector(),gridHeaderDropZonesSelector:(i=e.columnDropZonesService)==null?void 0:i.getDropZoneSelector(),sideBarSelector:(s=e.sideBarService)==null?void 0:s.getSideBarSelector(),statusBarSelector:(r=e.statusBarService)==null?void 0:r.getStatusPanelSelector(),watermarkSelector:(o=e.licenseManager)==null?void 0:o.getWatermarkSelector()}}onGridSizeChanged(){this.eventService.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:i,nextIndex:s}=this.getNextFocusableIndex(t,e);if(s<0||s>=t.length)return!1;if(s===0){if(i>0){const r=this.visibleColsService.getAllCols(),o=j(r);if(this.focusService.focusGridView(o,!0))return!0}return!1}return this.focusContainer(t[s],e)}focusInnerElement(e){const t=this.gos.getCallback("focusGridInnerElement");if(t&&t({fromBottom:!!e}))return!0;const i=this.getFocusableContainers(),s=this.visibleColsService.getAllCols();if(e){if(i.length>1)return this.focusContainer(j(i),!0);const r=j(s);if(this.focusService.focusGridView(r,!0))return!0}if(this.gos.get("headerHeight")===0||this.focusService.isHeaderFocusSuppressed()){if(this.focusService.focusGridView(s[0]))return!0;for(let r=1;r<i.length;r++)if(this.focusService.focusInto(i[r].getGui()))return!0;return!1}return this.focusService.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){var o;const t=this.view.getFocusableContainers(),{nextIndex:i,indexWithFocus:s}=this.getNextFocusableIndex(t,e);if(s===-1||i<0||i>=t.length)return;const r=t[i];(o=r.setAllowFocus)==null||o.call(r,!0),setTimeout(()=>{var n;(n=r.setAllowFocus)==null||n.call(r,!1)})}getNextFocusableIndex(e,t){const i=fe(this.gos),s=e.findIndex(o=>o.getGui().contains(i)),r=s+(t?-1:1);return{indexWithFocus:s,nextIndex:r}}focusContainer(e,t){var s,r;(s=e.setAllowFocus)==null||s.call(e,!0);const i=this.focusService.focusInto(e.getGui(),t);return(r=e.setAllowFocus)==null||r.call(e,!1),i}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}updateGridThemeClass(){const e=this.beans.environment.getGridThemeClass();e&&this.view.setGridThemeClass(e)}handleThemeChange(e){e.themeChanged&&this.updateGridThemeClass()}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},Kx=class extends P{constructor(){super(...arguments),this.beanName="alignedGridsService",this.consuming=!1}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.ctrlsService=e.ctrlsService,this.columnApplyStateService=e.columnApplyStateService}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";typeof e=="function"&&(e=e());const i=()=>`See ${this.getFrameworkOverrides().getDocLink("aligned-grids")}`;return e.map(r=>{var n;if(!r){$("alignedGrids contains an undefined option."),t||$(`You may want to configure via a callback to avoid setup race conditions:
                     "alignedGrids: () => [linkedGrid]"`),$(i());return}if(this.isGridApi(r))return r;const o=r;return"current"in o?(n=o.current)==null?void 0:n.api:(o.api||$(`alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ${i()}`),o.api)}).filter(r=>!!r&&!r.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{t.isDestroyed()||t.dispatchEvent(e)})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const i=[];return e.columns?e.columns.forEach(s=>{i.push(t(s))}):e.column&&i.push(t(e.column)),i}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":D("pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.");break}})}processGroupOpenedEvent(e){const{columnModel:t}=this;e.columnGroups.forEach(i=>{let s=null;i&&(s=t.getProvidedColGroup(i.getGroupId())),!(i&&!s)&&t.setColumnGroupOpened(s,i.isExpanded(),"alignedGridChanged")})}processColumnEvent(e){var c;const t=e.column;let i=null;if(t&&(i=this.columnModel.getColDefCol(t.getColId())),t&&!i)return;const s=this.getMasterColumns(e),{columnApplyStateService:r,columnSizeService:o,ctrlsService:n}=this;switch(e.type){case"columnMoved":{const d=e.api.getColumnState().map(h=>({colId:h.colId}));r.applyColumnState({state:d,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const d=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));r.applyColumnState({state:d},"alignedGridChanged")}break;case"columnPinned":{const d=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));r.applyColumnState({state:d},"alignedGridChanged")}break;case"columnResized":{const u=e,d={};s.forEach(h=>{d[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()}}),(c=u.flexColumns)==null||c.forEach(h=>{d[h.getId()]&&delete d[h.getId()]}),o.setColumnWidths(Object.values(d),!1,u.finished,"alignedGridChanged");break}}const a=n.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(u=>{u.setGridOption("alwaysShowVerticalScroll",a)})}},$x={version:z,moduleName:"@ag-grid-community/aligned-grid",beans:[Kx]};function Yx(e,t){const i=e.columnModel.getColDefCol(t);return i?i.getColDef():null}function Qx(e){return e.columnModel.getColumnDefs()}function qx(e,t){typeof t=="number"?e.columnSizeService.sizeColumnsToFit(t,"api"):e.ctrlsService.getGridBodyCtrl().sizeColumnsToFit(t)}function Xx(e,t,i){e.columnModel.setColumnGroupOpened(t,i,"api")}function Zx(e,t,i){return e.visibleColsService.getColumnGroup(t,i)}function Jx(e,t){return e.columnModel.getProvidedColGroup(t)}function eP(e,t,i){return e.columnNameService.getDisplayNameForColumn(t,i)||""}function tP(e,t,i){return e.columnNameService.getDisplayNameForColumnGroup(t,i)||""}function iP(e,t){return e.columnModel.getColDefCol(t)}function sP(e){return e.columnModel.getColDefCols()}function rP(e,t){return e.columnApplyStateService.applyColumnState(t,"api")}function oP(e){return e.columnGetStateService.getColumnState()}function nP(e){e.columnApplyStateService.resetColumnState("api")}function lP(e){return e.columnGroupStateService.getColumnGroupState()}function aP(e,t){e.columnGroupStateService.setColumnGroupState(t,"api")}function cP(e){e.columnGroupStateService.resetColumnGroupState("api")}function uP(e){return e.visibleColsService.isPinningLeft()||e.visibleColsService.isPinningRight()}function dP(e){return e.visibleColsService.isPinningLeft()}function hP(e){return e.visibleColsService.isPinningRight()}function gP(e,t){return e.visibleColsService.getColAfter(t)}function pP(e,t){return e.visibleColsService.getColBefore(t)}function fP(e,t,i){e.columnModel.setColsVisible([t],i,"api")}function mP(e,t,i){e.columnModel.setColsVisible(t,i,"api")}function vP(e,t,i){e.columnModel.setColsPinned([t],i,"api")}function CP(e,t,i){e.columnModel.setColsPinned(t,i,"api")}function wP(e){return e.columnModel.getCols()}function SP(e){return e.visibleColsService.getLeftCols()}function yP(e){return e.visibleColsService.getCenterCols()}function bP(e){return e.visibleColsService.getRightCols()}function RP(e){return e.visibleColsService.getAllCols()}function FP(e){return e.columnViewportService.getViewportColumns()}function xP(e,t,i){e.columnMoveService.moveColumns([t],i,"api")}function PP(e,t,i){e.columnMoveService.moveColumnByIndex(t,i,"api")}function EP(e,t,i){e.columnMoveService.moveColumns(t,i,"api")}function DP(e,t,i,s=!0,r="api"){e.columnSizeService.setColumnWidths([{key:t,newWidth:i}],!1,s,r)}function MP(e,t,i=!0,s="api"){e.columnSizeService.setColumnWidths(t,!1,i,s)}function TP(e){return e.visibleColsService.getTreeLeft()}function kP(e){return e.visibleColsService.getTreeCenter()}function AP(e){return e.visibleColsService.getTreeRight()}function IP(e){return e.visibleColsService.getAllTrees()}function LP(e,t,i){return e.columnAutosizeService.autoSizeCols({colKeys:[t],skipHeader:i,source:"api"})}function OP(e,t,i){e.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"api"})}function GP(e,t){e.columnAutosizeService.autoSizeAllColumns("api",t)}var NP=class extends P{constructor(){super(...arguments),this.beanName="dataTypeService",this.dataTypeDefinitions={},this.isWaitingForRowData=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}wireBeans(e){this.rowModel=e.rowModel,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.columnApplyStateService=e.columnApplyStateService,this.filterManager=e.filterManager}postConstruct(){this.groupHideOpenParents=this.gos.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",()=>{this.groupHideOpenParents=this.gos.get("groupHideOpenParents")}),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.columnModel.recreateColumnDefs(es(e.source))})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes();this.dataTypeDefinitions={},this.formatValueFuncs={};const t=s=>r=>{const{column:o,node:n,value:l}=r;let a=o.getColDef().valueFormatter;return a===s.groupSafeValueFormatter&&(a=s.valueFormatter),this.valueService.formatValue(o,n,l,a)};Object.entries(e).forEach(([s,r])=>{const o={...r,groupSafeValueFormatter:this.createGroupSafeValueFormatter(r)};this.dataTypeDefinitions[s]=o,this.formatValueFuncs[s]=t(o)});const i=this.gos.get("dataTypeDefinitions")??{};this.dataTypeMatchers={},Object.entries(i).forEach(([s,r])=>{const o=this.processDataTypeDefinition(r,i,[s],e);o&&(this.dataTypeDefinitions[s]=o,r.dataTypeMatcher&&(this.dataTypeMatchers[s]=r.dataTypeMatcher),this.formatValueFuncs[s]=t(o))}),this.checkObjectValueHandlers(e),["dateString","text","number","boolean","date"].forEach(s=>{const r=this.dataTypeMatchers[s];r&&delete this.dataTypeMatchers[s],this.dataTypeMatchers[s]=r??e[s].dataTypeMatcher})}mergeDataTypeDefinitions(e,t){const i={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...Sn(e.columnTypes),...Sn(t.columnTypes)]),i}processDataTypeDefinition(e,t,i,s){let r;const o=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let n=s[o];const l=t[o];if(n&&l&&(n=l),!this.validateDataTypeDefinition(e,n,o))return;r=this.mergeDataTypeDefinitions(n,e)}else{if(i.includes(o)){D('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');return}const n=t[o];if(!this.validateDataTypeDefinition(e,n,o))return;const l=this.processDataTypeDefinition(n,t,[...i,o],s);if(!l)return;r=this.mergeDataTypeDefinitions(l,e)}return{...r,groupSafeValueFormatter:this.createGroupSafeValueFormatter(r)}}validateDataTypeDefinition(e,t,i){return t?t.baseDataType!==e.baseDataType?(D('The "baseDataType" property of a data type definition must match that of its parent.'),!1):!0:(D(`The data type definition ${i} does not exist.`),!1)}createGroupSafeValueFormatter(e){if(e.valueFormatter)return t=>{var i,s;if((i=t.node)!=null&&i.group){const r=(t.colDef.pivotValueColumn??t.column).getAggFunc();if(r){if(r==="first"||r==="last")return e.valueFormatter(t);if(e.baseDataType==="number"&&r!=="count"){if(typeof t.value=="number")return e.valueFormatter(t);if(typeof t.value=="object"){if(!t.value)return;if("toNumber"in t.value)return e.valueFormatter({...t,value:t.value.toNumber()});if("value"in t.value)return e.valueFormatter({...t,value:t.value.value})}}return}if((this.gos.get("suppressGroupMaintainValueType")||this.gos.get("groupDisplayType")==="groupRows")&&!this.gos.get("treeData"))return}else if(this.groupHideOpenParents&&t.column.isRowGroupActive()&&typeof t.value=="string"&&!((s=e.dataTypeMatcher)!=null&&s.call(e,t.value)))return;return e.valueFormatter(t)}}updateColDefAndGetColumnType(e,t,i){let{cellDataType:s}=t;const{field:r}=t;if(s===void 0&&(s=e.cellDataType),(s==null||s===!0)&&(s=this.canInferCellDataType(e,t)?this.inferCellDataType(r,i):!1),!s){e.cellDataType=!1;return}const o=this.dataTypeDefinitions[s];if(!o){D(`Missing data type definition - "${s}"`);return}return e.cellDataType=s,o.groupSafeValueFormatter&&(e.valueFormatter=o.groupSafeValueFormatter),o.valueParser&&(e.valueParser=o.valueParser),o.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,s,o,i),o.columnTypes}addColumnListeners(e){if(!this.isWaitingForRowData)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const i=s=>{t.add(s.key)};e.addEventListener("columnStateUpdated",i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.removeEventListener("columnStateUpdated",i))}canInferCellDataType(e,t){if(!ae(this.gos))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(this.doColDefPropsPreventInference(t,i))return!1;const s=t.type===null?e.type:t.type;if(s){const r=this.gos.get("columnTypes")??{};if(Sn(s).some(n=>{const l=r[n.trim()];return l&&this.doColDefPropsPreventInference(l,i)}))return!1}return!this.doColDefPropsPreventInference(e,i)}doColDefPropsPreventInference(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,s])=>this.doesColDefPropPreventInference(e,t,i,s))}doesColDefPropPreventInference(e,t,i,s){if(!t[i])return!1;const r=e[i];return r===null?(t[i]=!1,!1):s===void 0?!!r:r===s}inferCellDataType(e,t){if(!e)return;let i;const s=this.getInitialData();if(s){const o=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");i=qr(s,e,o)}else this.initWaitForRowData(t);if(i==null)return;const[r]=Object.entries(this.dataTypeMatchers).find(([o,n])=>n(i))??["object"];return r}getInitialData(){const e=this.gos.get("rowData");if(e!=null&&e.length)return e[0];if(this.initialData)return this.initialData;{const t=this.rowModel.getRootNode().allLeafChildren;if(t!=null&&t.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isWaitingForRowData)return;this.isWaitingForRowData=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions;t&&this.columnModel.queueResizeOperations();const[i]=this.addManagedEventListeners({rowDataUpdateStarted:s=>{const{firstRowData:r}=s;r&&(i==null||i(),this.isWaitingForRowData=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&this.columnModel.processResizeOperations(),this.eventService.dispatchEvent({type:"dataTypesInferred"}))}})}isPendingInference(){return this.isWaitingForRowData}processColumnsPendingInference(e,t){this.initialData=e;const i=[];this.destroyColumnStateUpdateListeners();const s={},r={};Object.entries(this.columnStateUpdatesPendingInference).forEach(([o,n])=>{const l=this.columnModel.getCol(o);if(!l)return;const a=l.getColDef();if(!this.columnModel.resetColDefIntoCol(l,"cellDataTypeInferred"))return;const c=l.getColDef();if(t&&c.type&&c.type!==a.type){const u=this.getUpdatedColumnState(l,n);u.rowGroup&&u.rowGroupIndex==null&&(s[o]=u),u.pivot&&u.pivotIndex==null&&(r[o]=u),i.push(u)}}),t&&i.push(...this.funcColsService.generateColumnStateForRowGroupAndPivotIndexes(s,r)),i.length&&this.columnApplyStateService.applyColumnState({state:i},"cellDataTypeInferred"),this.initialData=null}getUpdatedColumnState(e,t){const i=this.columnApplyStateService.getColumnStateFromColDef(e);return t.forEach(s=>{delete i[s],s==="rowGroup"?delete i.rowGroupIndex:s==="pivot"&&delete i.pivotIndex}),i}checkObjectValueHandlers(e){const t=this.dataTypeDefinitions.object,i=e.object;this.hasObjectValueParser=t.valueParser!==i.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==i.valueFormatter}getDateStringTypeDefinition(e){return e?this.getDataTypeDefinition(e)??this.dataTypeDefinitions.dateString:this.dataTypeDefinitions.dateString}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){var t;return(t=this.getDataTypeDefinition(e))==null?void 0:t.baseDataType}checkType(e,t){var s;if(t==null)return!0;const i=(s=this.getDataTypeDefinition(e))==null?void 0:s.dataTypeMatcher;return i?i(t):!0}validateColDef(e){const t=i=>D(`Cell data type is "object" but no Value ${i} has been provided. Please either provide an object data type definition with a Value ${i}, or set "colDef.value${i}"`);e.cellDataType==="object"&&(e.valueFormatter===this.dataTypeDefinitions.object.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&t("Parser"))}getFormatValue(e){return this.formatValueFuncs[e]}setColDefPropertiesForBaseDataType(e,t,i,s){var o;const r=this.formatValueFuncs[t];switch(i.baseDataType){case"number":{e.cellEditor="agNumberCellEditor";break}case"boolean":{e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=n=>!!n.colDef.editable&&n.event.key===x.SPACE;break}case"date":{e.cellEditor="agDateCellEditor",e.keyCreator=r;break}case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=r;break}case"object":{e.cellEditorParams={useFormatter:!0},e.comparator=(n,l)=>{const a=this.columnModel.getColDefCol(s),c=a==null?void 0:a.getColDef();if(!a||!c)return 0;const u=n==null?"":r({column:a,node:null,value:n}),d=l==null?"":r({column:a,node:null,value:l});return u===d?0:u>d?1:-1},e.keyCreator=r;break}}(o=this.filterManager)==null||o.setColDefPropertiesForDataType(e,i,r)}getDefaultDataTypes(){const e=i=>!!i.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:i=>{var s,r;return((r=(s=i.newValue)==null?void 0:s.trim)==null?void 0:r.call(s))===""?null:Number(i.newValue)},valueFormatter:i=>i.value==null?"":typeof i.value!="number"||isNaN(i.value)?t("invalidNumber","Invalid Number"):String(i.value),dataTypeMatcher:i=>typeof i=="number"},text:{baseDataType:"text",valueParser:i=>i.newValue===""?null:pc(i.newValue),dataTypeMatcher:i=>typeof i=="string"},boolean:{baseDataType:"boolean",valueParser:i=>{var s,r;return i.newValue==null?i.newValue:((r=(s=i.newValue)==null?void 0:s.trim)==null?void 0:r.call(s))===""?null:String(i.newValue).toLowerCase()==="true"},valueFormatter:i=>i.value==null?"":String(i.value),dataTypeMatcher:i=>typeof i=="boolean"},date:{baseDataType:"date",valueParser:i=>st(i.newValue==null?null:String(i.newValue)),valueFormatter:i=>i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):xt(i.value,!1)??"",dataTypeMatcher:i=>i instanceof Date},dateString:{baseDataType:"dateString",dateParser:i=>st(i)??void 0,dateFormatter:i=>xt(i??null,!1)??void 0,valueParser:i=>e(String(i.newValue))?i.newValue:null,valueFormatter:i=>e(String(i.value))?i.value:"",dataTypeMatcher:i=>typeof i=="string"&&e(i)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:i=>pc(i.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}},HP={version:z,moduleName:"@ag-grid-community/data-type",beans:[NP]},BP={version:z,moduleName:"@ag-grid-community/column-api",apiFunctions:{getColumnDef:Yx,getColumnDefs:Qx,sizeColumnsToFit:qx,setColumnGroupOpened:Xx,getColumnGroup:Zx,getProvidedColumnGroup:Jx,getDisplayNameForColumn:eP,getDisplayNameForColumnGroup:tP,getColumn:iP,getColumns:sP,applyColumnState:rP,getColumnState:oP,resetColumnState:nP,getColumnGroupState:lP,setColumnGroupState:aP,resetColumnGroupState:cP,isPinning:uP,isPinningLeft:dP,isPinningRight:hP,getDisplayedColAfter:gP,getDisplayedColBefore:pP,setColumnVisible:fP,setColumnsVisible:mP,setColumnPinned:vP,setColumnsPinned:CP,getAllGridColumns:wP,getDisplayedLeftColumns:SP,getDisplayedCenterColumns:yP,getDisplayedRightColumns:bP,getAllDisplayedColumns:RP,getAllDisplayedVirtualColumns:FP,moveColumn:xP,moveColumnByIndex:PP,moveColumns:EP,setColumnWidth:DP,setColumnWidths:MP,getLeftDisplayedColumnGroups:TP,getCenterDisplayedColumnGroups:kP,getRightDisplayedColumnGroups:AP,getAllDisplayedColumnGroups:IP,autoSizeColumn:LP,autoSizeColumns:OP,autoSizeAllColumns:GP}};function VP(e,t){e.ctrlsService.getGridBodyCtrl().getRowDragFeature().addRowDropZone(t)}function zP(e,t){const i=e.dragAndDropService.findExternalZone(t);i&&e.dragAndDropService.removeDropTarget(i)}function WP(e,t){return e.ctrlsService.getGridBodyCtrl().getRowDragFeature().getRowDropZone(t)}var _P={version:z,moduleName:"@ag-grid-community/drag-api",apiFunctions:{addRowDropZone:VP,removeRowDropZone:zP,getRowDropZoneParams:WP}};function UP(e){return e.pinnedRowModel.getPinnedTopRowCount()}function jP(e){return e.pinnedRowModel.getPinnedBottomRowCount()}function KP(e,t){return e.pinnedRowModel.getPinnedTopRow(t)}function $P(e,t){return e.pinnedRowModel.getPinnedBottomRow(t)}var YP={version:z,moduleName:"@ag-grid-community/pinned-row-api",apiFunctions:{getPinnedTopRowCount:UP,getPinnedBottomRowCount:jP,getPinnedTopRow:KP,getPinnedBottomRow:$P}};function QP(e){e.overlayService.showLoadingOverlay()}function qP(e){e.overlayService.showNoRowsOverlay()}function XP(e){e.overlayService.hideOverlay()}var ZP={version:z,moduleName:"@ag-grid-community/overlay-api",apiFunctions:{showLoadingOverlay:QP,showNoRowsOverlay:qP,hideOverlay:XP}};function JP(e,t,i){if(!t)return;const s=e.ctrlsService.getGridBodyCtrl().getGui(),r=`aria-${t}`;i===null?s.removeAttribute(r):s.setAttribute(r,i)}function eE(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function tE(e,t={}){const i=s=>D(`Since v31.1 api.flashCells parameter '${s}Delay' is deprecated. Please use '${s}Duration' instead.`);M(t.fadeDelay)&&i("fade"),M(t.flashDelay)&&i("flash"),e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.flashCells(t))}function iE(e){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsService.getHeaderRowContainerCtrls().forEach(t=>t.refresh()))}function sE(e){return e.animationFrameService.isQueueEmpty()}function rE(e){e.animationFrameService.flushAllFrames()}function oE(e){return{rowHeight:us(e.gos),headerHeight:e.columnModel.getHeaderHeight()}}function nE(e,t={}){return e.rowRenderer.getCellRendererInstances(t).map(Zr)}var lE={version:z,moduleName:"@ag-grid-community/render-api",apiFunctions:{setGridAriaProperty:JP,refreshCells:eE,flashCells:tE,refreshHeader:iE,isAnimationFrameQueueEmpty:sE,flushAllAnimationFrames:rE,getSizesForCurrentTheme:oE,getCellRendererInstances:nE}};function aE(e){e.valueCache.expire()}function cE(e,t,i){return Km(e,{colKey:t,rowNode:i})}function Km(e,t){const{colKey:i,rowNode:s,useFormatter:r}=t,o=e.columnModel.getColDefCol(i)??e.columnModel.getCol(i);if(K(o))return null;const n=e.valueService.getValueForDisplay(o,s);return r?e.valueService.formatValue(o,s,n)??Qt(n,!0):n}function uE(e){return e.context.getGridId()}function dE(e){e.gridDestroyService.destroy()}function hE(e){return e.gridDestroyService.isDestroyCalled()}function gE(e,t){return e.gos.get(t)}function pE(e,t,i){$m(e,{[t]:i})}function $m(e,t){e.gos.updateGridOptions({options:t})}function fE(e,t,i){e.apiEventService.addEventListener(t,i)}function mE(e,t,i){e.apiEventService.removeEventListener(t,i)}function vE(e,t){e.apiEventService.addGlobalListener(t)}function CE(e,t){e.apiEventService.removeGlobalListener(t)}function wE(e){return e.focusService.getFocusedCell()}function SE(e){return e.focusService.clearFocusedCell()}function yE(e,t,i,s){e.focusService.setFocusedCell({rowIndex:t,column:i,rowPinned:s,forceBrowserFocus:!0})}function bE(e,t){return e.navigationService.tabToNextCell(!1,t)}function RE(e,t){return e.navigationService.tabToNextCell(!0,t)}function FE(e,t,i=!1){const s=e.headerNavigationService.getHeaderPositionForColumn(t,i);s&&e.focusService.focusHeaderPosition({headerPosition:s})}function xE(e,t,i){const s=e.columnModel.getCol(t);e.menuService.showColumnMenu({column:s,buttonElement:i,positionBy:"button"})}function PE(e,t,i){let s=e.columnModel.getCol(t);if(s||(s=e.columnModel.getColDefCol(t)),!s){$(`column '${t}' not found`);return}e.menuService.showColumnMenu({column:s,mouseEvent:i,positionBy:"mouse"})}function EE(e,t){const i=e.columnModel.getCol(t);if(!i){$(`column '${t}' not found`);return}e.menuService.showColumnMenu({column:i,positionBy:"auto"})}function DE(e){e.menuService.hidePopupMenu()}function ME(e,t={}){const i=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(i))}function TE(e,t,i,s,r){e.expansionService.setRowNodeExpanded(t,i,s,r)}function kE(e,t){return e.rowModel.getRowNode(t)}function AE(e,t,i,s){e.rowRenderer.addRenderedRowListener(t,i,s)}function IE(e){return e.rowRenderer.getRenderedNodes()}function LE(e,t,i){e.rowModel.forEachNode(t,i)}function OE(e){return Ym(e)}function Ym(e){return e.rowRenderer.getFirstVirtualRenderedRow()}function GE(e){return Qm(e)}function Qm(e){return e.rowRenderer.getLastVirtualRenderedRow()}function NE(e,t){return e.rowModel.getRow(t)}function HE(e){return e.rowModel.getRowCount()}function BE(e){return e.rowModel}function VE(e,t){if(!t.nodes.every(l=>l.rowPinned?(D("cannot select pinned rows"),!1):l.id===void 0?(D("cannot select node until id for node is known"),!1):!0))return;const{nodes:s,source:r,newValue:o}=t,n=s;e.selectionService.setNodesSelected({nodes:n,source:r??"api",newValue:o})}function zE(e,t="apiSelectAll"){e.selectionService.selectAllRowNodes({source:t})}function WE(e,t="apiSelectAll"){e.selectionService.deselectAllRowNodes({source:t})}function _E(e,t="apiSelectAllFiltered"){e.selectionService.selectAllRowNodes({source:t,justFiltered:!0})}function UE(e,t="apiSelectAllFiltered"){e.selectionService.deselectAllRowNodes({source:t,justFiltered:!0})}function jE(e,t="apiSelectAllCurrentPage"){e.selectionService.selectAllRowNodes({source:t,justCurrentPage:!0})}function KE(e,t="apiSelectAllCurrentPage"){e.selectionService.deselectAllRowNodes({source:t,justCurrentPage:!0})}function $E(e){return e.selectionService.getSelectedNodes()}function YE(e){return e.selectionService.getSelectedRows()}function QE(e){e.sortController.onSortChanged("api")}var qE={version:z,moduleName:"@ag-grid-community/core-api",apiFunctions:{getGridId:uE,destroy:dE,isDestroyed:hE,getGridOption:gE,setGridOption:pE,updateGridOptions:$m}},XE={version:z,moduleName:"@ag-grid-community/row-selection-api",apiFunctions:{setNodesSelected:VE,selectAll:zE,deselectAll:WE,selectAllFiltered:_E,deselectAllFiltered:UE,selectAllOnCurrentPage:jE,deselectAllOnCurrentPage:KE,getSelectedNodes:$E,getSelectedRows:YE}},ZE={version:z,moduleName:"@ag-grid-community/row-api",apiFunctions:{redrawRows:ME,setRowNodeExpanded:TE,getRowNode:kE,addRenderedRowListener:AE,getRenderedNodes:IE,forEachNode:LE,getFirstDisplayedRow:OE,getFirstDisplayedRowIndex:Ym,getLastDisplayedRow:GE,getLastDisplayedRowIndex:Qm,getDisplayedRowAtIndex:NE,getDisplayedRowCount:HE,getModel:BE}},JE={version:z,moduleName:"@ag-grid-community/scroll-api",apiFunctions:{getVerticalPixelRange:HF,getHorizontalPixelRange:BF,ensureColumnVisible:Vm,ensureIndexVisible:zm,ensureNodeVisible:VF}},e0={version:z,moduleName:"@ag-grid-community/keyboard-navigation-api",apiFunctions:{getFocusedCell:wE,clearFocusedCell:SE,setFocusedCell:yE,setFocusedHeader:FE,tabToNextCell:bE,tabToPreviousCell:RE}},t0={version:z,moduleName:"@ag-grid-community/event-api",apiFunctions:{addEventListener:fE,addGlobalListener:vE,removeEventListener:mE,removeGlobalListener:CE}},i0={version:z,moduleName:"@ag-grid-community/cell-api",apiFunctions:{expireValueCache:aE,getValue:cE,getCellValue:Km}},s0={version:z,moduleName:"@ag-grid-community/menu-api",apiFunctions:{showColumnMenuAfterButtonClick:xE,showColumnMenuAfterMouseClick:PE,showColumnMenu:EE,hidePopupMenu:DE}},r0={version:z,moduleName:"@ag-grid-community/sort-api",apiFunctions:{onSortChanged:QE}},o0={version:z,moduleName:"@ag-grid-community/api",dependantModules:[qE,YP,XE,BP,ZE,_P,JE,ZP,e0,t0,lE,i0,s0,r0]};function n0(e){var t;return((t=e.stateService)==null?void 0:t.getState())??{}}function l0(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=a0(e)}return e}function a0(e){return e.cellSelection=c0(e,"rangeSelection"),e}function c0(e,t){if(e&&typeof e=="object")return e[t]}var u0=class extends P{constructor(){super(...arguments),this.beanName="stateService",this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=qe(()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=qe(()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),0),this.onRowSelectedDebounced=qe(()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}wireBeans(e){this.filterManager=e.filterManager,this.ctrlsService=e.ctrlsService,this.pivotResultColsService=e.pivotResultColsService,this.focusService=e.focusService,this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.columnGroupStateService=e.columnGroupStateService,this.columnGetStateService=e.columnGetStateService,this.paginationService=e.paginationService,this.selectionService=e.selectionService,this.expansionService=e.expansionService,this.columnAnimationService=e.columnAnimationService,this.columnApplyStateService=e.columnApplyStateService,this.sideBarService=e.sideBarService,this.rangeService=e.rangeService}postConstruct(){this.isClientSideRowModel=ae(this.gos),this.cachedState=this.getInitialState(),this.setCachedStateValue("version",z),this.ctrlsService.whenReady(this,()=>this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnGridReady()));const[e,t,i]=this.addManagedEventListeners({newColumnsLoaded:({source:s})=>{s==="gridInitializing"&&(e(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnColumnsInitialised()))},rowCountReady:()=>{t==null||t(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnRowCountReady())},firstDataRendered:()=>{i==null||i(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnFirstDataRendered())}})}getInitialState(){return l0(this.gos.get("initialState")??{})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){this.updateCachedState("sideBar",this.getSideBarState());const e=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:e,sideBarUpdated:e})}setupStateOnColumnsInitialised(){const e=this.getInitialState();this.setColumnState(e),this.setColumnGroupState(e),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState());const t=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:t("aggregation"),columnMoved:t("columnOrder"),columnPinned:t("columnPinning"),columnResized:t("columnSizing"),columnVisible:t("columnVisibility"),columnPivotChanged:t("pivot"),columnPivotModeChanged:t("pivot"),columnRowGroupChanged:t("rowGroup"),sortChanged:t("sort"),newColumnsLoaded:()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setupStateOnRowCountReady(){const{filter:e,rowGroupExpansion:t,rowSelection:i,pagination:s}=this.getInitialState(),r=this.gos.get("advancedFilterModel");(e||r)&&this.setFilterState(e,r),t&&this.setRowGroupExpansionState(t),i&&this.setRowSelectionState(i),s&&this.setPaginationState(s),this.updateCachedState("filter",this.getFilterState()),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState());const o=()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState());this.addManagedEventListeners({filterChanged:()=>this.updateCachedState("filter",this.getFilterState()),rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:o,columnRowGroupChanged:o,rowDataUpdated:()=>{this.gos.get("groupDefaultExpanded")!==0&&setTimeout(()=>{o()})},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:n=>{(n.newPage||n.newPageSize)&&this.updateCachedState("pagination",this.getPaginationState())}})}setupStateOnFirstDataRendered(){const{scroll:e,cellSelection:t,focusedCell:i,columnOrder:s}=this.getInitialState();i&&this.setFocusedCellState(i),t&&this.setCellSelectionState(t),e&&this.setScrollState(e),this.setColumnPivotState(!!(s!=null&&s.orderedColIds)),this.updateCachedState("sideBar",this.getSideBarState()),this.updateCachedState("focusedCell",this.getFocusedCellState());const r=this.getRangeSelectionState();this.updateCachedState("rangeSelection",r),this.updateCachedState("cellSelection",r),this.updateCachedState("scroll",this.getScrollState()),this.addManagedEventListeners({cellFocused:()=>this.updateCachedState("focusedCell",this.getFocusedCellState()),cellSelectionChanged:o=>{if(o.finished){const n=this.getRangeSelectionState();this.updateCachedState("rangeSelection",n),this.updateCachedState("cellSelection",n)}},bodyScrollEnd:()=>this.updateCachedState("scroll",this.getScrollState())})}getColumnState(){const e=this.columnModel.isPivotMode(),t=[],i=[],s=[],r=[],o=[],n=[],l=[],a=[],c=[];let u=0;const d=this.columnGetStateService.getColumnState();for(let h=0;h<d.length;h++){const{colId:g,sort:v,sortIndex:w,rowGroup:S,rowGroupIndex:f,aggFunc:p,pivot:m,pivotIndex:y,pinned:b,hide:F,width:R,flex:E}=d[h];c.push(g),v&&(t[w??u++]={colId:g,sort:v}),S&&(i[f??0]=g),typeof p=="string"&&s.push({colId:g,aggFunc:p}),m&&(r[y??0]=g),b&&(b==="right"?n:o).push(g),F&&l.push(g),(E||R)&&a.push({colId:g,flex:E??void 0,width:R})}return{sort:t.length?{sortModel:t}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:r.length||e?{pivotMode:e,pivotColIds:r}:void 0,columnPinning:o.length||n.length?{leftColIds:o,rightColIds:n}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:a.length?{columnSizingModel:a}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}setColumnState(e){const{sort:t,rowGroup:i,aggregation:s,pivot:r,columnPinning:o,columnVisibility:n,columnSizing:l,columnOrder:a,partialColumnState:c}=e,u={},d=S=>{let f=u[S];return f||(f={colId:S},u[S]=f,f)},h=c?{}:{sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};t&&(t.sortModel.forEach(({colId:S,sort:f},p)=>{const m=d(S);m.sort=f,m.sortIndex=p}),h.sort=null,h.sortIndex=null),i&&(i.groupColIds.forEach((S,f)=>{const p=d(S);p.rowGroup=!0,p.rowGroupIndex=f}),h.rowGroup=null,h.rowGroupIndex=null),s&&(s.aggregationModel.forEach(({colId:S,aggFunc:f})=>{d(S).aggFunc=f}),h.aggFunc=null),r&&(r.pivotColIds.forEach((S,f)=>{const p=d(S);p.pivot=!0,p.pivotIndex=f}),this.gos.updateGridOptions({options:{pivotMode:r.pivotMode},source:"gridInitializing"}),h.pivot=null,h.pivotIndex=null),o&&(o.leftColIds.forEach(S=>{d(S).pinned="left"}),o.rightColIds.forEach(S=>{d(S).pinned="right"}),h.pinned=null),n&&(n.hiddenColIds.forEach(S=>{d(S).hide=!0}),h.hide=null),l&&(l.columnSizingModel.forEach(({colId:S,flex:f,width:p})=>{const m=d(S);m.flex=f??null,m.width=p}),h.flex=null);const g=a==null?void 0:a.orderedColIds,v=!!(g!=null&&g.length),w=v?g.map(S=>d(S)):Object.values(u);w.length&&(this.columnStates=w,this.columnApplyStateService.applyColumnState({state:w,applyOrder:v,defaultState:h},"gridInitializing"))}setColumnPivotState(e){const t=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;if(this.columnGroupStates=void 0,!!this.pivotResultColsService.isPivotResultColsPresent()){if(t){const s=[];for(const r of t)this.pivotResultColsService.getPivotResultCol(r.colId)&&s.push(r);this.columnApplyStateService.applyColumnState({state:s,applyOrder:e},"gridInitializing")}i&&this.columnGroupStateService.setColumnGroupState(i,"gridInitializing")}}getColumnGroupState(){const e=this.columnGroupStateService.getColumnGroupState(),t=[];return e.forEach(({groupId:i,open:s})=>{s&&t.push(i)}),t.length?{openColumnGroupIds:t}:void 0}setColumnGroupState(e){var r;if(!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const t=new Set((r=e.columnGroup)==null?void 0:r.openColumnGroupIds),s=this.columnGroupStateService.getColumnGroupState().map(({groupId:o})=>{const n=t.has(o);return n&&t.delete(o),{groupId:o,open:n}});t.forEach(o=>{s.push({groupId:o,open:!0})}),s.length&&(this.columnGroupStates=s),this.columnGroupStateService.setColumnGroupState(s,"gridInitializing")}getFilterState(){var i,s;let e=(i=this.filterManager)==null?void 0:i.getFilterModel();e&&Object.keys(e).length===0&&(e=void 0);const t=((s=this.filterManager)==null?void 0:s.getAdvancedFilterModel())??void 0;return e||t?{filterModel:e,advancedFilterModel:t}:void 0}setFilterState(e,t){var r,o;const{filterModel:i,advancedFilterModel:s}=e??{advancedFilterModel:t};i&&((r=this.filterManager)==null||r.setFilterModel(i,"columnFilter")),s&&((o=this.filterManager)==null||o.setAdvancedFilterModel(s))}getRangeSelectionState(){var t;const e=(t=this.rangeService)==null?void 0:t.getCellRanges().map(i=>{const{id:s,type:r,startRow:o,endRow:n,columns:l,startColumn:a}=i;return{id:s,type:r,startRow:o,endRow:n,colIds:l.map(c=>c.getColId()),startColId:a.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeService:i,columnModel:s,visibleColsService:r}=this;if(!gi(t)||!i)return;const o=[];if(e.cellRanges.forEach(n=>{const l=[];if(n.colIds.forEach(c=>{const u=s.getCol(c);u&&l.push(u)}),!l.length)return;let a=s.getCol(n.startColId);if(!a){const c=r.getAllCols(),u=new Set(l);a=c.find(d=>u.has(d))}o.push({...n,columns:l,startColumn:a})}),Bw(t)&&Vw(t)&&o.length>1)return D("cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`");i.setCellRanges(o)}getScrollState(){var s;if(!this.isClientSideRowModel)return;const e=(s=this.ctrlsService.getGridBodyCtrl())==null?void 0:s.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:i}=(e==null?void 0:e.getVScrollPosition())??{top:0};return i||t?{top:i,left:t}:void 0}setScrollState(e){var s;if(!this.isClientSideRowModel)return;const{top:t,left:i}=e;(s=this.ctrlsService.getGridBodyCtrl())==null||s.getScrollFeature().setScrollPosition(t,i)}getSideBarState(){var e,t;return(t=(e=this.sideBarService)==null?void 0:e.getSideBarComp())==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.focusService.getFocusedCell();if(e){const{column:t,rowIndex:i,rowPinned:s}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:s}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{colId:t,rowIndex:i,rowPinned:s}=e;this.focusService.setFocusedCell({column:this.columnModel.getCol(t),rowIndex:i,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){if(!this.paginationService)return;const e=this.paginationService.getCurrentPage(),t=this.gos.get("paginationAutoPageSize")?void 0:this.paginationService.getPageSize();if(!(!e&&!t))return{page:e,pageSize:t}}setPaginationState(e){this.paginationService&&(e.pageSize&&!this.gos.get("paginationAutoPageSize")&&this.paginationService.setPageSize(e.pageSize,"initialState"),typeof e.page=="number"&&this.paginationService.setPage(e.page))}getRowSelectionState(){var i;const e=this.selectionService.getSelectionState();return!e||!Array.isArray(e)&&(e.selectAll===!1||e.selectAllChildren===!1)&&!((i=e==null?void 0:e.toggledNodes)!=null&&i.length)?void 0:e}setRowSelectionState(e){this.selectionService.setSelectionState(e,"gridInitializing")}getRowGroupExpansionState(){const e=this.expansionService.getExpandedRows();return e.length?{expandedRowGroupIds:e}:void 0}setRowGroupExpansionState(e){this.expansionService.expandRows(e.expandedRowGroupIds)}updateColumnState(e){const t=this.getColumnState();let i=!1;Object.entries(t).forEach(([s,r])=>{wo(r,this.cachedState[s])||(i=!0)}),this.cachedState={...this.cachedState,...t},i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const i=this.cachedState[e];this.setCachedStateValue(e,t),wo(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){this.staleStateKeys.forEach(e=>{switch(e){case"rowSelection":this.setCachedStateValue(e,this.getRowSelectionState());break}}),this.staleStateKeys.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(t=>this.queuedUpdateSources.add(t)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){const e=Array.from(this.queuedUpdateSources);this.queuedUpdateSources.clear(),this.eventService.dispatchEvent({type:"stateUpdated",sources:e,state:this.cachedState})}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0,this.columnAnimationService.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.columnAnimationService.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}},qm={version:z,moduleName:"@ag-grid-community/state-core",beans:[u0]},d0={version:z,moduleName:"@ag-grid-community/state-api",apiFunctions:{getState:n0},dependantModules:[qm]},h0={version:z,moduleName:"@ag-grid-community/state",dependantModules:[qm,d0]};function g0(e){return e.rowModel.isLastRowIndexKnown()}function p0(e){var t;return((t=e.paginationService)==null?void 0:t.getPageSize())??100}function f0(e){var t;return((t=e.paginationService)==null?void 0:t.getCurrentPage())??0}function m0(e){var t;return((t=e.paginationService)==null?void 0:t.getTotalPages())??1}function v0(e){return e.paginationService?e.paginationService.getMasterRowCount():e.rowModel.getRowCount()}function C0(e){var t;(t=e.paginationService)==null||t.goToNextPage()}function w0(e){var t;(t=e.paginationService)==null||t.goToPreviousPage()}function S0(e){var t;(t=e.paginationService)==null||t.goToFirstPage()}function y0(e){var t;(t=e.paginationService)==null||t.goToLastPage()}function b0(e,t){var i;(i=e.paginationService)==null||i.goToPage(t)}var R0=class extends P{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeService"}wireBeans(e){this.ctrlsService=e.ctrlsService,this.paginationService=e.paginationService}postConstruct(){this.ctrlsService.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.paginationService.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.getViewportSizeFeature().getBodyHeight();if(e>0){const t=()=>{const i=Math.max(us(this.gos),1),s=Math.floor(e/i);this.paginationService.setPageSize(s,"autoCalculated")};this.isBodyRendered?qe(()=>t(),50)():(t(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function F0(e,t,i){e.addManagedElementListeners(t,{keydown:s=>{if(!s.defaultPrevented&&s.key===x.TAB){const r=s.shiftKey;i.findNextFocusableElement(t,!1,r)||i.focusNextGridCoreContainer(r)&&s.preventDefault()}}})}var Lr="paginationPageSizeSelector",x0=class extends re{constructor(){super('<span class="ag-paging-page-size"></span>'),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.paginationService.getPageSize()||(this.paginationService.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.paginationService=e.paginationService}postConstruct(){this.addManagedPropertyListener(Lr,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))return;const t=this.paginationService.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){pt(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(Lr)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.paginationService.getPageSize(),i=!t||!e.includes(t);if(i){const r=this.gos.exists("paginationPageSize"),o=this.gos.get(Lr)!==!0;D(`'paginationPageSize=${t}'${r?"":" (default value)"}, but ${t} is not included in${o?"":" the default"} paginationPageSizeSelector=[${e.join(", ")}].`),o||D(`Either set '${Lr}' to an array that includes ${t} or to 'false' to disable the page size selector.`),e.unshift("")}const s=String(i?"":t);this.selectPageSizeComp?($i(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(s,!0)):this.createPageSizeSelectorComp(e,s),this.hasEmptyOption=i}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const i=this.localeService.getLocaleTextFunc(),s=i("pageSizeSelectorLabel","Page Size:"),r=i("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Qu).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(r).setLabel(s).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(Lr);return!Array.isArray(t)||ht(t)?e:[...t].sort((i,s)=>i-s)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},P0={selector:"AG-PAGE-SIZE-SELECTOR",component:x0},E0=class extends mx{constructor(){super(),this.btFirst=B,this.btPrevious=B,this.btNext=B,this.btLast=B,this.lbRecordCount=B,this.lbFirstRowOnPage=B,this.lbLastRowOnPage=B,this.lbCurrent=B,this.lbTotal=B,this.pageSizeComp=B,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1}wireBeans(e){this.rowModel=e.rowModel,this.paginationService=e.paginationService,this.focusService=e.focusService,this.ariaAnnouncementService=e.ariaAnnouncementService}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[P0]);const{btFirst:t,btPrevious:i,btNext:s,btLast:r}=this;this.activateTabIndex([t,i,s,r]),t.insertAdjacentElement("afterbegin",ut(e?"last":"first",this.gos)),i.insertAdjacentElement("afterbegin",ut(e?"next":"previous",this.gos)),s.insertAdjacentElement("afterbegin",ut(e?"previous":"next",this.gos)),r.insertAdjacentElement("afterbegin",ut(e?"first":"last",this.gos)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:o=>{this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(o):this.focusService.focusGridInnerElement(o)},forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)}),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach(e=>{const{el:t,fn:i}=e;this.addManagedListeners(t,{click:i,keydown:s=>{(s.key===x.ENTER||s.key===x.SPACE)&&(s.preventDefault(),i())}})}),F0(this,this.getGui(),this.focusService),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.paginationService.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");if(t)return t({value:e});const i=this.localeService.getLocaleTextFunc(),s=i("thousandSeparator",","),r=i("decimalSeparator",".");return gb(e,s,r)}getTemplate(){const e=this.localeService.getLocaleTextFunc(),t=e("page","Page"),i=e("to","to"),s=e("of","of"),r=e("firstPage","First Page"),o=e("previousPage","Previous Page"),n=e("nextPage","Next Page"),l=e("lastPage","Last Page"),a=this.getCompId();return`<div class="ag-paging-panel ag-unselectable" id="ag-${a}">
                <ag-page-size-selector data-ref="pageSizeComp"></ag-page-size-selector>
                <span class="ag-paging-row-summary-panel">
                    <span id="ag-${a}-first-row" data-ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>
                    <span id="ag-${a}-to">${i}</span>
                    <span id="ag-${a}-last-row" data-ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>
                    <span id="ag-${a}-of">${s}</span>
                    <span id="ag-${a}-row-count" data-ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>
                </span>
                <span class="ag-paging-page-summary-panel" role="presentation">
                    <div data-ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>
                    <div data-ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>
                    <span class="ag-paging-description">
                        <span id="ag-${a}-start-page">${t}</span>
                        <span id="ag-${a}-start-page-number" data-ref="lbCurrent" class="ag-paging-number"></span>
                        <span id="ag-${a}-of-page">${s}</span>
                        <span id="ag-${a}-of-page-number" data-ref="lbTotal" class="ag-paging-number"></span>
                    </span>
                    <div data-ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${n}"></div>
                    <div data-ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${l}"></div>
                </span>
            </div>`}onBtNext(){this.nextButtonDisabled||this.paginationService.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.paginationService.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.paginationService.goToLastPage()}enableOrDisableButtons(){const e=this.paginationService.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),i=this.paginationService.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const s=this.isZeroPagesToDisplay(),r=e===i-1;this.nextButtonDisabled=r||s,this.lastButtonDisabled=!t||s||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){PS(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.paginationService.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.paginationService.getTotalPages(),i=this.paginationService.getMasterRowCount(),s=e?i:null;if(s===1){const p=this.rowModel.getRow(0);if(p&&p.group&&!(p.groupData||p.aggData)){this.setTotalLabelsToZero();return}}const r=this.paginationService.getCurrentPage(),o=this.paginationService.getPageSize();let n,l;this.isZeroPagesToDisplay()?n=l=0:(n=o*r+1,l=n+o-1,e&&l>s&&(l=s));const a=n+o-1,c=!e&&i<a,u=this.formatNumber(n);this.lbFirstRowOnPage.textContent=u;let d;const h=this.localeService.getLocaleTextFunc();c?d=h("pageLastRowUnknown","?"):d=this.formatNumber(l),this.lbLastRowOnPage.textContent=d;const v=t>0?r+1:0,w=this.formatNumber(v);this.lbCurrent.textContent=w;let S,f;if(e)S=this.formatNumber(t),f=this.formatNumber(s);else{const p=h("more","more");S=p,f=p}this.lbTotal.textContent=S,this.lbRecordCount.textContent=f,this.announceAriaStatus(u,d,f,w,S)}announceAriaStatus(e,t,i,s,r){const o=this.localeService.getLocaleTextFunc(),n=o("page","Page"),l=o("to","to"),a=o("of","of"),c=`${e} ${l} ${t} ${a} ${i}`,u=`${n} ${s} ${a} ${r}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,this.ariaAnnouncementService.announceValue(c,"paginationRow")),u!==this.ariaPageStatus&&(this.ariaPageStatus=u,this.ariaAnnouncementService.announceValue(u,"paginationPage"))}setTotalLabelsToZero(){const e=this.formatNumber(0);this.lbFirstRowOnPage.textContent=e,this.lbCurrent.textContent=e,this.lbLastRowOnPage.textContent=e,this.lbTotal.textContent=e,this.lbRecordCount.textContent=e,this.announceAriaStatus(e,e,e,e,e)}},D0={selector:"AG-PAGINATION",component:E0},M0=class extends P{constructor(){super(...arguments),this.beanName="paginationService",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}wireBeans(e){this.rowModel=e.rowModel,this.pageBoundsService=e.pageBoundsService}postConstruct(){this.active=this.gos.get("pagination"),this.pageSizeFromGridOptions=this.gos.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return D0}isPaginateChildRows(){return this.gos.get("groupRemoveSingleChildren")||this.gos.get("groupRemoveLowestSingleChildren")?!0:this.gos.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){!this.active||this.currentPage===e||typeof this.currentPage!="number"||(this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0}))}isRowPresent(e){return e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex}getPageForIndex(e){return Math.floor(e/this.pageSize)}goToPageWithIndex(e){if(!this.active)return;const t=this.getPageForIndex(e);this.goToPage(t)}isRowInPage(e){return this.active?this.getPageForIndex(e.rowIndex)===this.currentPage:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return M(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:M(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:M(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:M(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.pageBoundsService.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const i=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}i!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0){this.setZeroRows();return}const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid();const t=this.pageSize*this.currentPage;let i=this.pageSize*(this.currentPage+1)-1;if(i>e&&(i=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(t),i===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{const s=this.rowModel.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=s-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){if(this.masterRowCount=this.rowModel.getRowCount(),this.masterRowCount===0){this.setZeroRows();return}const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>e&&(this.bottomDisplayedRowIndex=e)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:i=!1,newPageSize:s=!1}=e;this.eventService.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:i,newPageSize:s,keepRenderedRows:t})}},Xm={version:z,moduleName:"@ag-grid-community/pagination-core",beans:[M0,R0]},T0={version:z,moduleName:"@ag-grid-community/pagination-api",dependantModules:[Xm],apiFunctions:{paginationIsLastPageFound:g0,paginationGetPageSize:p0,paginationGetCurrentPage:f0,paginationGetTotalPages:m0,paginationGetRowCount:v0,paginationGoToNextPage:C0,paginationGoToPreviousPage:w0,paginationGoToFirstPage:S0,paginationGoToLastPage:y0,paginationGoToPage:b0}},k0={version:z,moduleName:"@ag-grid-community/pagination",dependantModules:[Xm,T0]},et="clientSide",Ke="serverSide",Ms="infinite",A0={onGroupExpandedOrCollapsed:[et],refreshClientSideRowModel:[et],isRowDataEmpty:[et],forEachLeafNode:[et],forEachNodeAfterFilter:[et],forEachNodeAfterFilterAndSort:[et],resetRowHeights:[et],applyTransaction:[et],applyTransactionAsync:[et],flushAsyncTransactions:[et],getBestCostNodeSelection:[et],getServerSideSelectionState:[Ke],setServerSideSelectionState:[Ke],applyServerSideTransaction:[Ke],applyServerSideTransactionAsync:[Ke],applyServerSideRowData:[Ke],retryServerSideLoads:[Ke],flushServerSideAsyncTransactions:[Ke],refreshServerSide:[Ke],getServerSideGroupLevelState:[Ke],refreshInfiniteCache:[Ms],purgeInfiniteCache:[Ms],getInfiniteRowCount:[Ms],isLastRowIndexKnown:[Ms,Ke],expandAll:[et,Ke],collapseAll:[et,Ke],onRowHeightChanged:[et,Ke],setRowCount:[Ms,Ke],getCacheBlockState:[Ms,Ke]},I0={getValue:{version:"v31.3",new:"getCellValue"},getFirstDisplayedRow:{version:"v31.1",new:"getFirstDisplayedRowIndex"},getLastDisplayedRow:{version:"v31.1",new:"getLastDisplayedRowIndex"},getModel:{version:"v31.1",message:"Please use the appropriate grid API methods instead."},setColumnVisible:{version:"v31.1",old:"setColumnVisible(key,visible)",new:"setColumnsVisible([key],visible)"},setColumnPinned:{version:"v31.1",old:"setColumnPinned(key,pinned)",new:"setColumnsPinned([key],pinned)"},moveColumn:{version:"v31.1",old:"moveColumn(key, toIndex)",new:"moveColumns([key], toIndex)"},setColumnWidth:{version:"v31.1",old:"setColumnWidth(col, width)",new:"setColumnWidths([{key: col, newWidth: width}])"},autoSizeColumn:{version:"v31.1",old:"autoSizeColumn(key, skipHeader)",new:"autoSizeColumns([key], skipHeader)"},addAggFunc:{version:"v31.1",old:"addAggFunc(key, func)",new:"addAggFuncs({ key: func })"},removeValueColumn:{version:"v31.1",old:"removeValueColumn(colKey)",new:"removeValueColumns([colKey])"},addValueColumn:{version:"v31.1",old:"addValueColumn(colKey)",new:"addValueColumns([colKey])"},removeRowGroupColumn:{version:"v31.1",old:"removeRowGroupColumn(colKey)",new:"removeRowGroupColumns([colKey])"},addRowGroupColumn:{version:"v31.1",old:"addRowGroupColumn(colKey)",new:"addRowGroupColumns([colKey])"},removePivotColumn:{version:"v31.1",old:"removePivotColumn(colKey)",new:"removePivotColumns([colKey])"},addPivotColumn:{version:"v31.1",old:"addPivotColumn(colKey)",new:"addPivotColumns([colKey])"},showColumnMenuAfterButtonClick:{version:"v31.1",message:"Use 'IHeaderParams.showColumnMenu' within a header component, or 'api.showColumnMenu' elsewhere."},showColumnMenuAfterMouseClick:{version:"v31.1",message:"Use 'IHeaderParams.showColumnMenuAfterMouseClick' within a header component, or 'api.showColumnMenu' elsewhere."},getFilterInstance:{version:"v31.1",message:"'getFilterInstance' is deprecated. To get/set individual filter models, use 'getColumnFilterModel' or 'setColumnFilterModel' instead. To get hold of the filter instance, use 'getColumnFilterInstance' which returns the instance asynchronously."},showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"}};function L0(e,t,i){const s=I0[e];if(s){const{version:o,new:n,old:l,message:a}=s,c=l??e;return(...u)=>{const d=n?`Please use ${n} instead. `:"";return D(`Since ${o} api.${c} is deprecated. ${d}${a??""}`),t.apply(t,u)}}const r=A0[e];return r?(...o)=>{const n=i.rowModel.getType();if(!r.includes(n)){$(`api.${e} can only be called when gridOptions.rowModelType is ${r.join(" or ")}`);return}return t.apply(t,o)}:t}var O0={columnsMenuParams:{version:"31.1",message:"Use `columnChooserParams` instead."},suppressMenu:{version:"31.1",message:"Use `suppressHeaderMenuButton` instead."},suppressCellFlash:{version:"31.2",message:"Use `enableCellChangeFlash={false}` in the ColDef"},checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."}},yi=(e,t)=>{const i=t.rowModelType??"clientSide";return i==="clientSide"||i==="serverSide"?{module:"@ag-grid-enterprise/row-grouping"}:null},G0={enableRowGroup:yi,rowGroup:yi,rowGroupIndex:yi,enablePivot:yi,enableValue:yi,pivot:yi,pivotIndex:yi,aggFunc:yi,cellEditor:e=>e.cellEditor==="agRichSelect"||e.cellEditor==="agRichSelectCellEditor"?{module:"@ag-grid-enterprise/rich-select"}:null,menuTabs:e=>{var i;const t=["columnsMenuTab","generalMenuTab"];return(i=e.menuTabs)!=null&&i.some(s=>t.includes(s))?{module:"@ag-grid-enterprise/menu"}:null},columnsMenuParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},columnChooserParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},children:()=>Ts},N0={headerName:void 0,columnGroupShow:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnsMenuParams:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressCellFlash:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressMenu:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0},H0=Object.keys(N0),Ts={objectName:"colDef",allProperties:H0,docsUrl:"column-properties/",deprecations:O0,validations:G0},B0=()=>({advancedFilterModel:{version:"31",message:"Use `initialState.filter.advancedFilterModel` instead."},suppressAsyncEvents:{version:"31",message:"Events should be handled asynchronously."},cellFadeDelay:{version:"31.1",renamed:"cellFadeDuration"},cellFlashDelay:{version:"31.1",renamed:"cellFlashDuration"},suppressServerSideInfiniteScroll:{version:"31.1"},serverSideSortOnServer:{version:"31.1"},serverSideFilterOnServer:{version:"31.1"},enableCellChangeFlash:{version:"31.2",message:"Use `enableCellChangeFlash` in the `ColDef` or `defaultColDef` for all columns."},groupIncludeFooter:{version:"31.3",message:"Use `groupTotalRow` instead."},groupIncludeTotalFooter:{version:"31.3",message:"Use `grandTotalRow` instead."},suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."}}),V0={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"	",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressAsyncEvents:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,enableCellChangeFlash:!1,cellFlashDelay:500,cellFlashDuration:500,cellFadeDelay:1e3,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupIncludeTotalFooter:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,suppressServerSideInfiniteScroll:!1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSideSortOnServer:!1,serverSideFilterOnServer:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,suppressGroupMaintainValueType:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1},z0=()=>({sideBar:{module:"@ag-grid-enterprise/side-bar"},statusBar:{module:"@ag-grid-enterprise/status-bar"},enableCharts:{module:"@ag-grid-enterprise/charts"},getMainMenuItems:{module:"@ag-grid-enterprise/menu"},getContextMenuItems:{module:"@ag-grid-enterprise/menu"},allowContextMenuWithControlKey:{module:"@ag-grid-enterprise/menu"},enableAdvancedFilter:{module:"@ag-grid-enterprise/advanced-filter"},treeData:{supportedRowModels:["clientSide","serverSide"],module:"@ag-grid-enterprise/row-grouping",validate:e=>{const t=e.rowModelType??"clientSide";switch(t){case"clientSide":{const i=`treeData requires 'getDataPath' in the ${t} row model.`;return e.getDataPath?null:i}case"serverSide":{const i=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${t} row model.`;return e.isServerSideGroup&&e.getServerSideGroupKey?null:i}}return null}},masterDetail:{module:"@ag-grid-enterprise/master-detail"},enableRangeSelection:{module:"@ag-grid-enterprise/range-selection"},enableRangeHandle:{dependencies:{enableRangeSelection:[!0]}},enableFillHandle:{dependencies:{enableRangeSelection:[!0]}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupIncludeFooter:{supportedRowModels:["clientSide","serverSide"],validate:e=>{switch(e.rowModelType??"clientSide"){case"clientSide":return null;case"serverSide":return e.suppressServerSideInfiniteScroll?"groupIncludeFooter is not supported alongside suppressServerSideInfiniteScroll":null}return null}},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:[void 0,"bottom"]}},groupIncludeTotalFooter:{supportedRowModels:["clientSide"]},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveLowestSingleChildren:[void 0,!1]}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveSingleChildren:[void 0,!1]}},groupSelectsChildren:{dependencies:{rowSelection:["multiple"]}},viewportDatasource:{supportedRowModels:["viewport"],module:"@ag-grid-enterprise/viewport-row-model"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"@ag-grid-enterprise/server-side-row-model"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"]},datasource:{supportedRowModels:["infinite"],module:"@ag-grid-community/infinite-row-model"},rowData:{supportedRowModels:["clientSide"],module:"@ag-grid-community/client-side-row-model"},paginationPageSizeSelector:{validate:e=>{const t=e.paginationPageSizeSelector;return typeof t=="boolean"||t==null||t.length?null:`'paginationPageSizeSelector' cannot be an empty array.
                    If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},rowSelection:{validate({rowSelection:e}){return e&&typeof e=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':e&&typeof e!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":null}},cellSelection:{module:"@ag-grid-enterprise/range-selection"},columnDefs:()=>Ts,defaultColDef:()=>Ts,defaultColGroupDef:()=>Ts,autoGroupColumnDef:()=>Ts,selectionColumnDef:()=>Ts}),W0=()=>({objectName:"gridOptions",allProperties:[...bo.ALL_PROPERTIES,...Ro.EVENT_CALLBACKS],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:B0(),validations:z0()}),_0=class extends P{constructor(){super(...arguments),this.beanName="validationService"}wireBeans(e){this.beans=e,this.gridOptions=e.gridOptions}postConstruct(){this.processGridOptions(this.gridOptions)}processGridOptions(e){this.processOptions(e,W0())}validateApiFunction(e,t){return L0(e,t,this.beans)}processOptions(e,t){const{validations:i,deprecations:s,allProperties:r,propertyExceptions:o,objectName:n,docsUrl:l}=t;r&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...o??[],...Object.keys(s)],r,n,l);const a=new Set;Object.keys(e).forEach(u=>{const d=s[u];if(d)if("renamed"in d){const{renamed:m,version:y}=d;a.add(`As of v${y}, ${String(u)} is deprecated. Please use ${String(m)} instead.`),e[m]=e[u]}else{const{message:m,version:y}=d;a.add(`As of v${y}, ${String(u)} is deprecated. ${m??""}`)}const h=e[u];if(h==null||h===!1)return;const g=i[u];let v;if(g)if(typeof g=="function"){const m=g(e,this.gridOptions);if(!m)return;if("objectName"in m){const y=e[u];if(Array.isArray(y)){y.forEach(b=>{this.processOptions(b,m)});return}this.processOptions(e[u],m);return}v=m}else v=g;else return;const{module:w,dependencies:S,validate:f,supportedRowModels:p}=v;if(p){const m=this.gridOptions.rowModelType??"clientSide";if(!p.includes(m)){a.add(`${String(u)} is not supported with the '${m}' row model.`);return}}if(w){const m=Array.isArray(w)?w:[w];let y=!0;if(m.forEach(b=>{this.gos.assertModuleRegistered(b,String(u))||(y=!1,a.add(`${String(u)} is only available when ${b} is loaded.`))}),!y)return}if(S){const m=this.checkForRequiredDependencies(u,S,e);if(m){a.add(m);return}}if(f){const m=f(e,this.gridOptions);if(m){a.add(m);return}}}),a.size>0&&a.forEach(u=>{D(u)})}checkForRequiredDependencies(e,t,i){const r=Object.entries(t).find(([l,a])=>{const c=i[l];return!a.includes(c)});if(!r)return null;const[o,n]=r;return n.length>1?`'${String(e)}' requires '${o}' to be one of [${n.join(", ")}].`:`'${String(e)}' requires '${o}' to be ${n[0]}.`}checkProperties(e,t,i,s,r){const o=["__ob__","__v_skip","__metadata__"],n=U0(Object.getOwnPropertyNames(e),[...o,...t,...i],i);if(It(n,(l,a)=>{let c=`invalid ${s} property '${l}' did you mean any of these: ${a.slice(0,8).join(", ")}.`;i.includes("context")&&(c+=`
If you are trying to annotate ${s} with application data, use the '${s}.context' property instead.`),D(c)}),Object.keys(n).length>0&&r){const l=this.getFrameworkOverrides().getDocLink(r);D(`to see all the valid ${s} properties please check: ${l}`)}}};function U0(e,t,i){const s={},r=e.filter(o=>!t.some(n=>n===o));return r.length>0&&r.forEach(o=>s[o]=Zf({inputValue:o,allSuggestions:i}).values),s}var j0={version:z,moduleName:"@ag-grid-community/core"},K0={version:z,moduleName:"@ag-grid-community/core-validations",beans:[_0]},Zm={version:z,moduleName:"@ag-grid-community/core-community-features",dependantModules:[j0,K0,rx,Xb,h0,HP,$x,k0,o0]},$0=class extends P{constructor(){super(...arguments),this.beanName="gridDestroyService",this.destroyCalled=!1}wireBeans(e){this.beans=e}destroy(){var e,t;this.destroyCalled||(this.eventService.dispatchEvent({type:"gridPreDestroyed",state:((e=this.beans.stateService)==null?void 0:e.getState())??{}}),this.destroyCalled=!0,(t=this.beans.ctrlsService.get("gridCtrl"))==null||t.destroyGridUi(),this.beans.context.destroy(),super.destroy())}isDestroyCalled(){return this.destroyCalled}},bn=new Set(["gridPreDestroyed","fillStart","pasteStart"]),Y0=e=>e==="checkboxSelected"||e==="rowClicked"||e==="spaceKey"||e==="uiSelectAll"||e==="uiSelectAllCurrentPage"||e==="uiSelectAllFiltered",Q0=new Map([...bo.BOOLEAN_PROPERTIES.map(e=>[e,mc]),...bo.NUMBER_PROPERTIES.map(e=>[e,mm]),["groupAggFiltering",e=>typeof e=="function"?e:mc(e)],["pageSize",Wt(1)],["autoSizePadding",Wt(0)],["keepDetailRowsCount",Wt(1)],["rowBuffer",Wt(0)],["infiniteInitialRowCount",Wt(1)],["cacheOverflowSize",Wt(1)],["cacheBlockSize",Wt(1)],["serverSideInitialRowCount",Wt(1)],["viewportRowModelPageSize",Wt(1)],["viewportRowModelBufferSize",Wt(0)]]);function Jm(e,t){const i=Q0.get(e);return i?i(t):t}function q0(e){const t={};return Object.entries(e).forEach(([i,s])=>{const r=Jm(i,s);t[i]=r}),t}var ev=class tv extends P{constructor(){super(...arguments),this.beanName="gos",this.gridReadyFired=!1,this.queueEvents=[],this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new pr,this.globalEventHandlerFactory=t=>(i,s)=>{if(!this.isAlive())return;const r=bn.has(i);if(r&&!t||!r&&t)return;const o=(n,l)=>{const a=this.gridOptions[Ro.getCallbackForEvent(n)];typeof a=="function"&&this.frameworkOverrides.wrapOutgoing(()=>a(l))};if(this.gridReadyFired)o(i,s);else if(i==="gridReady"){o(i,s),this.gridReadyFired=!0;for(const n of this.queueEvents)o(n.eventName,n.event);this.queueEvents=[]}else this.queueEvents.push({eventName:i,event:s})}}wireBeans(t){this.gridOptions=t.gridOptions,this.eGridDiv=t.eGridDiv,this.validationService=t.validationService,this.environment=t.environment,this.api=t.gridApi,this.gridId=t.context.getGridId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){const t=!this.get("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),t),this.eventService.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propertyEventService.setFrameworkOverrides(this.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:i})=>{this.updateGridOptions({options:i,force:!0,source:"gridOptionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(t){return this.gridOptions[t]??V0[t]}getCallback(t){return this.mergeGridCommonParams(this.gridOptions[t])}exists(t){return M(this.gridOptions[t])}mergeGridCommonParams(t){return t&&(s=>{const r=s;return r.api=this.api,r.context=this.gridOptionsContext,t(r)})}updateGridOptions({options:t,force:i,source:s="api"}){var n;const r={id:tv.changeSetId++,properties:[]},o=[];Object.entries(t).forEach(([l,a])=>{s==="api"&&wS[l]&&D(`${l} is an initial property and cannot be updated.`);const c=Jm(l,a),u=i||typeof c=="object"&&s==="api",d=this.gridOptions[l];if(u||d!==c){this.gridOptions[l]=c;const h={type:l,currentValue:c,previousValue:d,changeSet:r,source:s};o.push(h)}}),(n=this.validationService)==null||n.processGridOptions(this.gridOptions),r.properties=o.map(l=>l.type),o.forEach(l=>{this.gridOptions.debug&&Lt(`Updated property ${l.type} from`,l.previousValue," to ",l.currentValue),this.propertyEventService.dispatchEvent(l)})}addPropertyEventListener(t,i){this.propertyEventService.addEventListener(t,i)}removePropertyEventListener(t,i){this.propertyEventService.removeEventListener(t,i)}getDomDataKey(){return this.domDataKey}getGridCommonParams(){return{api:this.api,context:this.gridOptionsContext}}addGridCommonParams(t){const i=t;return i.api=this.api,i.context=this.gridOptionsContext,i}assertModuleRegistered(t,i){return Kt.__assertRegistered(t,i,this.gridId)}isModuleRegistered(t){return Kt.__isRegistered(t,this.gridId)}};ev.changeSetId=0;var X0=ev,Z0=class extends P{constructor(){super(...arguments),this.beanName="headerPositionUtils"}wireBeans(e){this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}findHeader(e,t){let i,s;if(be(e.column)?i=this.visibleColsService.getGroupAtDirection(e.column,t):(s=`getCol${t}`,i=this.visibleColsService[s](e.column)),!i)return;const{headerRowIndex:r}=e;if(this.getHeaderRowType(r)!=="filter"){const l=[i];for(;i.getParent();)i=i.getParent(),l.push(i);i=l[l.length-1-r]}const{column:o,headerRowIndex:n}=this.getHeaderIndexToFocus(i,r);return{column:o,headerRowIndex:n}}getHeaderIndexToFocus(e,t){let i;if(be(e)&&this.isAnyChildSpanningHeaderHeight(e)&&e.isPadding()){const s=e;i=s.getLeafColumns()[0];let r=i;for(;r!==s;)t++,r=r.getParent()}return{column:i||e,headerRowIndex:t}}isAnyChildSpanningHeaderHeight(e){return e?e.getLeafColumns().some(t=>t.isSpanHeaderHeight()):!1}getColumnVisibleParent(e,t){const i=this.getHeaderRowType(t),s=i==="filter",r=i==="column";let o=s?e:e.getParent(),n=t-1,l=n;if(r&&this.isAnyChildSpanningHeaderHeight(e.getParent())){for(;o&&o.isPadding();)o=o.getParent(),n--;l=n,n<0&&(o=e,n=t,l=void 0)}return{column:o,headerRowIndex:n,headerRowIndexWithoutSpan:l}}getColumnVisibleChild(e,t,i="After"){const s=this.getHeaderRowType(t);let r=e,o=t+1;const n=o;if(s==="group"){const l=e.getDisplayedLeafColumns(),a=i==="After"?l[0]:j(l),c=[];let u=a;for(;u.getParent()!==e;)u=u.getParent(),c.push(u);if(r=a,a.isSpanHeaderHeight())for(let d=c.length-1;d>=0;d--){const h=c[d];if(!h.isPadding()){r=h;break}o++}else r=j(c),r||(r=a)}return{column:r,headerRowIndex:o,headerRowIndexWithoutSpan:n}}getHeaderRowType(e){const t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){const i=this.visibleColsService.getAllCols(),s=i[t==="start"?0:i.length-1];if(!s)return;const r=this.ctrlsService.getHeaderRowContainerCtrl(s.getPinned()),o=r==null?void 0:r.getRowType(e);if(o=="group"){const n=this.visibleColsService.getColGroupAtLevel(s,e);return{headerRowIndex:e,column:n}}return{headerRowIndex:o==null?-1:e,column:s}}},J0=class extends P{constructor(){super(...arguments),this.beanName="localeService"}getLocaleTextFunc(){const e=this.gos.getCallback("getLocaleText");if(e)return(i,s,r)=>e({key:i,defaultValue:s,variableValues:r});const t=this.gos.get("localeText");return(i,s,r)=>{let o=t&&t[i];if(o&&r&&r.length){let n=0;for(;!(n>=r.length||o.indexOf("${variable}")===-1);)o=o.replace("${variable}",r[n++])}return o??s}}},eD=class extends P{constructor(){super(...arguments),this.beanName="apiEventService",this.syncEventListeners=new Map,this.asyncEventListeners=new Map,this.syncGlobalEventListeners=new Set,this.globalEventListenerPairs=new Map}postConstruct(){this.frameworkEventWrappingService=new Gu(this.getFrameworkOverrides())}addEventListener(e,t){const i=this.frameworkEventWrappingService.wrap(e,t),s=Qn(this.gos)&&!bn.has(e),r=s?this.asyncEventListeners:this.syncEventListeners;r.has(e)||r.set(e,new Set),r.get(e).add(i),this.eventService.addEventListener(e,i,s)}removeEventListener(e,t){var o;const i=this.frameworkEventWrappingService.unwrap(e,t),s=this.asyncEventListeners.get(e),r=!!(s!=null&&s.delete(i));r||(o=this.syncEventListeners.get(e))==null||o.delete(i),this.eventService.removeEventListener(e,i,r)}addGlobalListener(e){const t=this.frameworkEventWrappingService.wrapGlobal(e);if(Qn(this.gos)){const s=(o,n)=>{bn.has(o)&&t(o,n)},r=(o,n)=>{bn.has(o)||t(o,n)};this.globalEventListenerPairs.set(e,{syncListener:s,asyncListener:r}),this.eventService.addGlobalListener(s,!1),this.eventService.addGlobalListener(r,!0)}else this.syncGlobalEventListeners.add(t),this.eventService.addGlobalListener(t,!1)}removeGlobalListener(e){const t=this.frameworkEventWrappingService.unwrapGlobal(e);if(this.globalEventListenerPairs.has(t)){const{syncListener:s,asyncListener:r}=this.globalEventListenerPairs.get(t);this.eventService.removeGlobalListener(s,!1),this.eventService.removeGlobalListener(r,!0),this.globalEventListenerPairs.delete(e)}else this.syncGlobalEventListeners.delete(t),this.eventService.removeGlobalListener(t,!1)}destroyEventListeners(e,t){e.forEach((i,s)=>{i.forEach(r=>this.eventService.removeEventListener(s,r,t)),i.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(i=>this.eventService.removeGlobalListener(i,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncEventListeners,!1),this.destroyEventListeners(this.asyncEventListeners,!0),this.destroyGlobalListeners(this.syncGlobalEventListeners,!1),this.globalEventListenerPairs.forEach(({syncListener:e,asyncListener:t})=>{this.eventService.removeGlobalListener(e,!1),this.eventService.removeGlobalListener(t,!0)}),this.globalEventListenerPairs.clear()}},tD=class extends P{constructor(){super(...arguments),this.beanName="pageBoundsListener"}wireBeans(e){this.rowModel=e.rowModel,this.paginationService=e.paginationService,this.pageBoundsService=e.pageBoundsService}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventService.dispatchEvent({type:"paginationChanged",animate:(e==null?void 0:e.animate)??!1,newData:(e==null?void 0:e.newData)??!1,newPage:(e==null?void 0:e.newPage)??!1,newPageSize:(e==null?void 0:e.newPageSize)??!1,keepRenderedRows:(e==null?void 0:e.keepRenderedRows)??!1})}calculatePages(){this.paginationService?this.paginationService.calculatePages():this.pageBoundsService.calculateBounds(0,this.rowModel.getRowCount()-1)}},iD=class extends P{constructor(){super(...arguments),this.beanName="pageBoundsService",this.pixelOffset=0}wireBeans(e){this.rowModel=e.rowModel}getFirstRow(){return this.topRowBounds?this.topRowBounds.rowIndex:-1}getLastRow(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1}getCurrentPageHeight(){return K(this.topRowBounds)||K(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)}getCurrentPagePixelRange(){const e=this.topRowBounds?this.topRowBounds.rowTop:0,t=this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0;return{pageFirstPixel:e,pageLastPixel:t}}calculateBounds(e,t){this.topRowBounds=this.rowModel.getRowBounds(e),this.topRowBounds&&(this.topRowBounds.rowIndex=e),this.bottomRowBounds=this.rowModel.getRowBounds(t),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=t),this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=M(this.topRowBounds)?this.topRowBounds.rowTop:0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},sD=class extends P{constructor(){super(),this.beanName="ariaAnnouncementService",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.updateAnnouncement=qe(this.updateAnnouncement.bind(this),200)}wireBeans(e){this.eGridDiv=e.eGridDiv}postConstruct(){const e=Se(this.gos),t=this.descriptionContainer=e.createElement("div");t.classList.add("ag-aria-description-container"),Lf(t,"polite"),xS(t,"additions text"),FS(t,!0),this.eGridDiv.appendChild(t)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.isAlive()&&this.descriptionContainer&&(this.descriptionContainer.textContent=e)},50)}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(pt(e),e.parentElement&&e.parentElement.removeChild(e)),this.descriptionContainer=null,this.eGridDiv=null,this.pendingAnnouncements.clear()}},rD=class extends P{constructor(){super(...arguments),this.beanName="columnAnimationService",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}wireBeans(e){this.ctrlsService=e.ctrlsService}postConstruct(){this.ctrlsService.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){this.active||this.gos.get("suppressColumnMoveAnimation")||this.gos.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&this.gridBodyCtrl.setColumnMovingCss(!1)})}flush(e,t){if(this.executeNextFuncs.length===0&&this.executeLaterFuncs.length===0){e(),t();return}const i=s=>{for(;s.length;){const r=s.pop();r&&r()}};this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e(),i(this.executeNextFuncs)},0),window.setTimeout(()=>{t(),i(this.executeLaterFuncs)},200)})}},oD=class extends P{constructor(){super(...arguments),this.beanName="columnHoverService"}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0}updateState(e){this.selectedColumns=e,this.eventService.dispatchEvent({type:"columnHoverChanged"})}},nD=class extends P{constructor(){super(...arguments),this.beanName="overlayService",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}wireBeans(e){this.userComponentFactory=e.userComponentFactory,this.rowModel=e.rowModel,this.columnModel=e.columnModel,this.ctrlsService=e.ctrlsService}postConstruct(){this.isClientSide=ae(this.gos);const e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.onGridSizeChanged.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.overlayWrapperComp=e,this.updateOverlayVisibility()}isVisible(){return this.state!==0&&!!this.overlayWrapperComp}isExclusive(){return this.state===1&&!!this.overlayWrapperComp}getOverlayWrapper(){return this.overlayWrapperComp}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos.get("loading");!e&&(e!==void 0||this.gos.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1,!(this.gos.get("loading")||this.gos.get("suppressNoRowsOverlay"))&&this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){D("Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.");return}this.doHideOverlay()}updateOverlayVisibility(){if(!this.overlayWrapperComp){this.state=0;return}let e=this.gos.get("loading");this.showInitialOverlay&&e===void 0&&!this.gos.get("suppressLoadingOverlay")&&(e=!this.gos.get("columnDefs")||!this.columnModel.isReady()||!this.gos.get("rowData")&&this.isClientSide),e?this.state!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,this.rowModel.isEmpty()&&!this.gos.get("suppressNoRowsOverlay")&&this.isClientSide?this.state!==2&&this.doShowNoRowsOverlay():this.state!==0&&this.doHideOverlay())}doShowLoadingOverlay(){this.overlayWrapperComp&&(this.state=1,this.showOverlay(this.userComponentFactory.getLoadingOverlayCompDetails({}),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.overlayWrapperComp&&(this.state=2,this.showOverlay(this.userComponentFactory.getNoRowsOverlayCompDetails({}),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.overlayWrapperComp&&(this.state=0,this.overlayWrapperComp.hideOverlay(),this.updateExclusive())}showOverlay(e,t,i){var r;const s=e.newAgStackInstance();(r=this.overlayWrapperComp)==null||r.showOverlay(s,t,this.isExclusive(),i),this.refreshWrapperPadding()}updateExclusive(){const e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventService.dispatchEvent({type:"overlayExclusiveChanged"})}onGridSizeChanged(){this.refreshWrapperPadding()}refreshWrapperPadding(){if(!this.overlayWrapperComp)return;let e=0;if(this.state===2){const t=this.ctrlsService.get("gridHeaderCtrl");e=(t==null?void 0:t.getHeaderHeight())||0}else this.wrapperPadding!==0&&(e=0);this.wrapperPadding!==e&&(this.wrapperPadding=e,this.overlayWrapperComp.updateOverlayWrapperPaddingTop(e))}},lD=class extends P{constructor(){super(...arguments),this.beanName="rowCssClassCalculator"}wireBeans(e){this.stylingService=e.stylingService}getInitialRowClasses(e){const t=[];return M(e.extraCssClass)&&t.push(e.extraCssClass),t.push("ag-row"),t.push(e.rowFocused?"ag-row-focus":"ag-row-no-focus"),e.fadeRowIn&&t.push("ag-opacity-zero"),t.push(e.rowIsEven?"ag-row-even":"ag-row-odd"),e.rowNode.isRowPinned()&&t.push("ag-row-pinned"),e.rowNode.isSelected()&&t.push("ag-row-selected"),e.rowNode.footer&&t.push("ag-row-footer"),t.push("ag-row-level-"+e.rowLevel),e.rowNode.stub&&t.push("ag-row-loading"),e.fullWidthRow&&t.push("ag-full-width-row"),e.expandable&&(t.push("ag-row-group"),t.push(e.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")),e.rowNode.dragging&&t.push("ag-row-dragging"),Eh(t,this.processClassesFromGridOptions(e.rowNode)),Eh(t,this.preProcessRowClassRules(e.rowNode)),t.push(e.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),e.firstRowOnPage&&t.push("ag-row-first"),e.lastRowOnPage&&t.push("ag-row-last"),e.fullWidthRow&&(e.pinned==="left"&&t.push("ag-cell-last-left-pinned"),e.pinned==="right"&&t.push("ag-cell-first-right-pinned")),t}processClassesFromGridOptions(e){const t=[],i=o=>{typeof o=="string"?t.push(o):Array.isArray(o)&&o.forEach(n=>t.push(n))},s=this.gos.get("rowClass");if(s){if(typeof s=="function")return D("rowClass should not be a function, please use getRowClass instead"),[];i(s)}const r=this.gos.getCallback("getRowClass");if(r){const o={data:e.data,node:e,rowIndex:e.rowIndex},n=r(o);i(n)}return t}preProcessRowClassRules(e){const t=[];return this.processRowClassRules(e,i=>{t.push(i)},()=>{}),t}processRowClassRules(e,t,i){const s=this.gos.addGridCommonParams({data:e.data,node:e,rowIndex:e.rowIndex});this.stylingService.processClassRules(void 0,this.gos.get("rowClassRules"),s,t,i)}calculateRowLevel(e){return e.group?e.level:e.parent?e.parent.level+1:0}},aD=class extends P{constructor(){super(...arguments),this.beanName="rowContainerHeightService",this.scrollY=0,this.uiBodyHeight=0}wireBeans(e){this.ctrlsService=e.ctrlsService}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=_S(),this.gos.get("debug")&&Lt("RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}isStretching(){return this.stretching}getDivStretchOffset(){return this.divStretchOffset}updateOffset(){if(!this.stretching)return;const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition().top,i=this.getUiBodyHeight();(t!==this.scrollY||i!==this.uiBodyHeight)&&(this.scrollY=t,this.uiBodyHeight=i,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;this.gos.get("debug")&&Lt(`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventService.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getUiContainerHeight(){return this.uiContainerHeight}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition();return t.bottom-t.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),i=e/t;return this.maxScrollY*i}},cD=class extends P{constructor(){super(...arguments),this.beanName="rowNodeSorter"}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.showRowGroupColsService=e.showRowGroupColsService}postConstruct(){this.isAccentedSort=this.gos.get("accentedSort"),this.primaryColumnsSortGroups=jt(this.gos),this.addManagedPropertyListener("accentedSort",e=>this.isAccentedSort=e.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=jt(this.gos))}doFullSort(e,t){const i=(r,o)=>({currentPos:o,rowNode:r}),s=e.map(i);return s.sort(this.compareRowNodes.bind(this,t)),s.map(r=>r.rowNode)}compareRowNodes(e,t,i){const s=t.rowNode,r=i.rowNode;for(let o=0,n=e.length;o<n;o++){const l=e[o],a=l.sort==="desc",c=this.getValue(s,l.column),u=this.getValue(r,l.column);let d;const h=this.getComparator(l,s);if(h?d=h(c,u,s,r,a):d=Lw(c,u,this.isAccentedSort),!isNaN(d)&&d!==0)return l.sort==="asc"?d:d*-1}return t.currentPos-i.currentPos}getComparator(e,t){const i=e.column,s=i.getColDef().comparator;if(s!=null)return s;if(!i.getColDef().showRowGroup)return;const r=!t.group&&i.getColDef().field;if(!r)return;const o=this.columnModel.getColDefCol(r);if(o)return o.getColDef().comparator}getValue(e,t){var s,r,o;if(!this.primaryColumnsSortGroups)return this.valueService.getValue(t,e,!1,!1);if(e.rowGroupColumn===t){if(Rl(this.gos,this.columnModel.isPivotActive())){const a=(s=e.allLeafChildren)==null?void 0:s[0];return a?this.valueService.getValue(t,a,!1,!1):void 0}const l=(r=this.showRowGroupColsService)==null?void 0:r.getShowRowGroupCol(t.getId());return l?(o=e.groupData)==null?void 0:o[l.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return this.valueService.getValue(t,e,!1,!1)}},Tl=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}setInactive(){this.active=!1}isActive(){return this.active}depthFirstSearchChangedPath(e,t){if(e.children)for(let i=0;i<e.children.length;i++)this.depthFirstSearchChangedPath(e.children[i],t);t(e.rowNode)}depthFirstSearchEverything(e,t,i){if(e.childrenAfterGroup)for(let s=0;s<e.childrenAfterGroup.length;s++){const r=e.childrenAfterGroup[s];r.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[s],t,i):i&&t(r)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,i=!1){this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,i=0;for(;!this.mapToItems[t.id];){const s={rowNode:t,children:null};this.mapToItems[t.id]=s,i++,t=t.parent}return i}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let i=e;for(;i;)this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}),t.forEach(s=>this.nodeIdsToColumns[i.id][s.getId()]=!0),i=i.parent}linkPathItems(e,t){let i=e;for(let s=0;s<t;s++){const r=this.mapToItems[i.id],o=this.mapToItems[i.parent.id];o.children||(o.children=[]),o.children.push(r),i=i.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const i=this.createPathItems(e);this.linkPathItems(e,i),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const i=this.nodeIdsToColumns[e.id];return t.filter(r=>i[r.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const i=this.nodeIdsToColumns[e.id];return t.filter(r=>!i[r.getId()])}},iv=class extends P{constructor(){super(...arguments),this.beanName="selectionService",this.selectedNodes=new Map,this.selectionCtx=new gx,this.rowSelectionMode=void 0}wireBeans(e){this.rowModel=e.rowModel,this.pageBoundsService=e.pageBoundsService}postConstruct(){const{gos:e,rowModel:t,onRowSelected:i}=this;this.selectionCtx.init(t),this.rowSelectionMode=Xn(e),this.groupSelectsChildren=Ss(e),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{const s=Ss(e),r=Xn(e);(s!==this.groupSelectsChildren||r!==this.rowSelectionMode)&&(this.groupSelectsChildren=s,this.rowSelectionMode=r,this.deselectAllRowNodes({source:"api"}))}),this.addManagedEventListeners({rowSelected:i.bind(this)})}destroy(){super.destroy(),this.resetNodes(),this.selectionCtx.reset()}isMultiSelect(){return this.rowSelectionMode==="multiRow"}overrideSelectionValue(e,t){if(!Y0(t))return e;const i=this.selectionCtx.getRoot();return i?i.isSelected()??!1:!0}setNodesSelected(e){var d;const{newValue:t,clearSelection:i,suppressFinishActions:s,rangeSelect:r,nodes:o,event:n,source:l}=e;if(o.length===0)return 0;if(o.length>1&&!this.isMultiSelect())return D("cannot multi select unless selection mode is 'multiRow'"),0;const a=this.groupSelectsChildren&&e.groupSelectsFiltered===!0,c=o.map(h=>h.footer?h.sibling:h);if(r){if(c.length>1)return D("cannot range select while selecting multiple rows"),0;const h=c[0],g=this.overrideSelectionValue(t,l);if(this.isMultiSelect()){if(this.selectionCtx.isInRange(h)){const v=this.selectionCtx.truncate(h);return g&&this.selectRange(v.discard,!1,l),this.selectRange(v.keep,g,l)}else if(this.selectionCtx.getRoot()!==h){const S=this.selectionCtx.extend(h,this.groupSelectsChildren);return g&&this.selectRange(S.discard,!1,l),this.selectRange(S.keep,g,l)}}}s||this.selectionCtx.setRoot(c[0]);let u=0;for(let h=0;h<c.length;h++){const g=c[h];a&&g.group||g.selectThisNode(t,n,l)&&u++,this.groupSelectsChildren&&((d=g.childrenAfterGroup)!=null&&d.length)&&(u+=this.selectChildren(g,t,a,l))}return s||(t&&(i||!this.isMultiSelect())&&(u+=this.clearOtherNodes(c[0],l)),u>0&&(this.updateGroupsFromChildrenSelections(l),this.dispatchSelectionChanged(l))),u}selectRange(e,t,i){let s=0;return e.forEach(r=>{if(r.group&&this.groupSelectsChildren)return;r.selectThisNode(t,void 0,i)&&s++}),s>0&&(this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i)),s}selectChildren(e,t,i,s){const r=i?e.childrenAfterAggFilter:e.childrenAfterGroup;return K(r)?0:this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:i,source:s,nodes:r})}getSelectedNodes(){const e=[];return this.selectedNodes.forEach(t=>{t&&e.push(t)}),e}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>{t&&t.data&&e.push(t.data)}),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((i,s)=>{i&&e(i)&&t.set(s,i)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsChildren||!ae(this.gos))return!1;const s=this.rowModel.getRootNode();t||(t=new Tl(!0,s),t.setInactive());let r=!1;return t.forEachChangedNodeDepthFirst(o=>{if(o!==s){const n=o.calculateSelectedFromChildren();r=o.selectThisNode(n===null?!1:n,void 0,e)||r}}),r}clearOtherNodes(e,t){const i=new Map;let s=0;return this.selectedNodes.forEach(r=>{if(r&&r.id!==e.id){const o=this.selectedNodes.get(r.id);s+=o.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:t}),this.groupSelectsChildren&&r.parent&&i.set(r.parent.id,r.parent)}}),i.forEach(r=>{const o=r.calculateSelectedFromChildren();r.selectThisNode(o===null?!1:o,void 0,t)}),s}onRowSelected(e){const t=e.node;this.groupSelectsChildren&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}syncInOldRowNode(e,t){if(M(t)&&e.id!==t.id&&t){const s=t.id;this.selectedNodes.get(s)==e&&this.selectedNodes.set(t.id,t)}}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.setSelectedInitialValue(!0),this.selectedNodes.set(e.id,e)):e.setSelectedInitialValue(!1)}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){var e;(e=this.selectedNodes)==null||e.clear()}getBestCostNodeSelection(){if(!ae(this.gos))return;const t=this.rowModel.getTopLevelNodes();if(t===null)return;const i=[];function s(r){for(let o=0,n=r.length;o<n;o++){const l=r[o];if(l.isSelected())i.push(l);else{const a=l;a.group&&a.children&&s(a.children)}}}return s(t),i}isEmpty(){let e=0;return this.selectedNodes.forEach(t=>{t&&e++}),e===0}deselectAllRowNodes(e){const t=n=>n.selectThisNode(!1,void 0,s),i=ae(this.gos),{source:s,justFiltered:r,justCurrentPage:o}=e;if(o||r){if(!i){$("selecting just filtered only works when gridOptions.rowModelType='clientSide'");return}this.getNodesToSelect(r,o).forEach(t)}else this.selectedNodes.forEach(n=>{n&&t(n)}),this.reset(s);this.selectionCtx.reset(),i&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)}getSelectedCounts(e,t){let i=0,s=0;const r=o=>{this.groupSelectsChildren&&o.group||(o.isSelected()?i++:o.selectable&&s++)};return this.getNodesToSelect(e,t).forEach(r),{selectedCount:i,notSelectedCount:s}}getSelectAllState(e,t){const{selectedCount:i,notSelectedCount:s}=this.getSelectedCounts(e,t);return i===0&&s===0?!1:i>0&&s>0?null:i>0}hasNodesToSelect(e=!1,t=!1){return this.getNodesToSelect(e,t).filter(i=>i.selectable).length>0}getNodesToSelect(e=!1,t=!1){this.validateSelectAllType();const i=[];if(t)return this.forEachNodeOnPage(r=>{if(!r.group){i.push(r);return}if(!r.expanded){const o=n=>{var l;i.push(n),(l=n.childrenAfterFilter)!=null&&l.length&&n.childrenAfterFilter.forEach(o)};o(r);return}this.groupSelectsChildren||i.push(r)}),i;const s=this.rowModel;return e?(s.forEachNodeAfterFilter(r=>{i.push(r)}),i):(s.forEachNode(r=>{i.push(r)}),i)}forEachNodeOnPage(e){const t=this.pageBoundsService.getFirstRow(),i=this.pageBoundsService.getLastRow();for(let s=t;s<=i;s++){const r=this.rowModel.getRow(s);r&&e(r)}}selectAllRowNodes(e){if(Hw(this.gos)&&!Sf(this.gos))return D("cannot multi select unless selection mode is 'multiRow'");this.validateSelectAllType();const{source:t,justFiltered:i,justCurrentPage:s}=e,r=this.getNodesToSelect(i,s);r.forEach(o=>o.selectThisNode(!0,void 0,t)),this.selectionCtx.setRoot(r[0]??null),this.selectionCtx.setEndRange(j(r)??null),ae(this.gos)&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(t),this.dispatchSelectionChanged(t)}getSelectionState(){const e=[];return this.selectedNodes.forEach(t=>{t!=null&&t.id&&e.push(t.id)}),e.length?e:null}setSelectionState(e,t){if(!Array.isArray(e))return $("Invalid selection state. When using client-side row model, the state must conform to `string[]`.");const i=new Set(e),s=[];this.rowModel.forEachNode(r=>{i.has(r.id)&&s.push(r)}),this.setNodesSelected({newValue:!0,nodes:s,source:t})}dispatchSelectionChanged(e){this.eventService.dispatchEvent({type:"selectionChanged",source:e})}validateSelectAllType(){if(!ae(this.gos))throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`)}},uD=class extends P{constructor(){super(...arguments),this.beanName="selectableService"}wireBeans(e){this.rowModel=e.rowModel,this.selectionService=e.selectionService}postConstruct(){this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>this.updateSelectable())}updateSelectableAfterGrouping(){this.updateSelectable(!0)}updateSelectable(e=!1){const{gos:t}=this,i=Yn(t),s=Iu(t);if(!i||!s)return;const r=Ss(t),o=ae(t)&&r,n=[],l=a=>{if(e&&!a.group)return;if(o&&a.group){const u=a.childrenAfterGroup.some(d=>d.selectable===!0);a.setRowSelectable(u,!0);return}const c=(s==null?void 0:s(a))??!0;a.setRowSelectable(c,!0),!c&&a.isSelected()&&n.push(a)};if(o){const a=this.rowModel;new Tl(!1,a.getRootNode()).forEachChangedNodeDepthFirst(l,!0,!0)}else this.rowModel.forEachNode(l);n.length&&this.selectionService.setNodesSelected({nodes:n,newValue:!1,source:"selectableChanged"}),o&&this.selectionService instanceof iv&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged")}},qh=["asc","desc",null],dD=class extends P{constructor(){super(...arguments),this.beanName="sortController"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.showRowGroupColsService=e.showRowGroupColsService}progressSort(e,t,i){const s=this.getNextSortDirection(e);this.setSortForColumn(e,s,t,i)}setSortForColumn(e,t,i,s){t!=="asc"&&t!=="desc"&&(t=null);const r=jt(this.gos);let o=[e];if(r&&e.getColDef().showRowGroup){const a=this.funcColsService.getSourceColumnsForGroupColumn(e),c=a==null?void 0:a.filter(u=>u.isSortable());c&&(o=[e,...c])}o.forEach(a=>a.setSort(t,s));const n=(i||this.gos.get("alwaysMultiSort"))&&!this.gos.get("suppressMultiSort"),l=[];if(!n){const a=this.clearSortBarTheseColumns(o,s);l.push(...a)}this.updateSortIndex(e),l.push(...o),this.dispatchSortChangedEvents(s,l)}updateSortIndex(e){var l;const t=jt(this.gos),i=(l=this.showRowGroupColsService)==null?void 0:l.getShowRowGroupCol(e.getId()),s=t&&i||e,r=this.getColumnsWithSortingOrdered();this.columnModel.getAllCols().forEach(a=>a.setSortIndex(null));const o=r.filter(a=>t&&a.getColDef().showRowGroup?!1:a!==s);(s.getSort()?[...o,s]:o).forEach((a,c)=>{a.setSortIndex(c)})}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){const t=this.columnModel.getAllCols().filter(i=>!!i.getSort());return t&&t.length>0}dispatchSortChangedEvents(e,t){const i={type:"sortChanged",source:e};t&&(i.columns=t),this.eventService.dispatchEvent(i)}clearSortBarTheseColumns(e,t){const i=[];return this.columnModel.getAllCols().forEach(s=>{e.includes(s)||(s.getSort()&&i.push(s),s.setSort(void 0,t))}),i}getNextSortDirection(e){let t;if(e.getColDef().sortingOrder?t=e.getColDef().sortingOrder:this.gos.get("sortingOrder")?t=this.gos.get("sortingOrder"):t=qh,!Array.isArray(t)||t.length<=0)return D(`sortingOrder must be an array with at least one element, currently it's ${t}`),null;const i=t.indexOf(e.getSort()),s=i<0,r=i==t.length-1;let o;return s||r?o=t[0]:o=t[i+1],qh.indexOf(o)<0?(D("invalid sort type ",o),null):o}getIndexedSortMap(){let e=this.columnModel.getAllCols().filter(o=>!!o.getSort());if(this.columnModel.isPivotMode()){const o=jt(this.gos);e=e.filter(n=>{var u;const l=!!n.getAggFunc(),a=!n.isPrimary(),c=o?(u=this.showRowGroupColsService)==null?void 0:u.getShowRowGroupCol(n.getId()):n.getColDef().showRowGroup;return l||a||c})}const t=this.funcColsService.getRowGroupColumns().filter(o=>!!o.getSort()),i={};e.forEach((o,n)=>i[o.getId()]=n),e.sort((o,n)=>{const l=o.getSortIndex(),a=n.getSortIndex();if(l!=null&&a!=null)return l-a;if(l==null&&a==null){const c=i[o.getId()],u=i[n.getId()];return c>u?1:-1}else return a==null?-1:1});const s=jt(this.gos)&&!!t.length;s&&(e=[...new Set(e.map(o=>{var n;return((n=this.showRowGroupColsService)==null?void 0:n.getShowRowGroupCol(o.getId()))??o}))]);const r=new Map;return e.forEach((o,n)=>r.set(o,n)),s&&t.forEach(o=>{const n=this.showRowGroupColsService.getShowRowGroupCol(o.getId());r.set(o,r.get(n))}),r}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([e,t],[i,s])=>t-s).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=jt(this.gos),i=!!e.getColDef().showRowGroup;return t&&i}getDisplaySortForColumn(e){const t=this.funcColsService.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(t!=null&&t.length))return e.getSort();const s=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,r=s[0].getSort();return s.every(n=>n.getSort()==r)?r:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}},hD=class extends P{constructor(){super(...arguments),this.beanName="syncService",this.waitingForColumns=!1}wireBeans(e){this.ctrlsService=e.ctrlsService,this.columnModel=e.columnModel,this.rowModel=e.rowModel}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.ctrlsService.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){this.columnModel.setColumnDefs(e??[],"gridInitializing"),this.rowModel.start()}gridReady(){this.eventService.dispatchEvent({type:"gridReady"});const e=this.gos.isModuleRegistered("@ag-grid-enterprise/core");this.gos.get("debug")&&Lt(`initialised successfully, enterprise = ${e}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.columnModel.setColumnDefs(t,es(e.source))}}},gD="paste",pD=class extends P{constructor(){super(...arguments),this.beanName="changeDetectionService"}wireBeans(e){this.rowModel=e.rowModel,this.rowRenderer=e.rowRenderer}postConstruct(){ae(this.gos)&&(this.clientSideRowModel=this.rowModel),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){e.source!==gD&&this.doChangeDetection(e.node,e.column)}doChangeDetection(e,t){if(this.gos.get("suppressChangeDetection"))return;const i=[e];if(this.clientSideRowModel&&!e.isRowPinned()){const s=this.gos.get("aggregateOnlyChangedColumns"),r=new Tl(s,this.clientSideRowModel.getRootNode());r.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(r),r.forEachChangedNodeDepthFirst(o=>{i.push(o)})}this.rowRenderer.refreshCells({rowNodes:i})}},fD=class extends P{constructor(){super(...arguments),this.beanName="expressionService",this.expressionToFunctionCache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);$("value should be either a string or a function",e)}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(i){return Lt("Processing of the expression failed"),Lt("Expression = ",e),Lt("Params = ",t),Lt("Exception = ",i),null}}createExpressionFunction(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];const t=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",t);return this.expressionToFunctionCache[e]=i,i}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}},mD=class extends P{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){this.active=this.gos.get("valueCache"),this.neverExpires=this.gos.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=i)}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},vD=class extends P{constructor(){super(...arguments),this.beanName="valueService",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionService=e.expressionService,this.columnModel=e.columnModel,this.valueCache=e.valueCache,this.dataTypeService=e.dataTypeService}postConstruct(){this.initialised||this.init()}init(){this.isSsrm=Xt(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=i=>this.callColumnCellValueChangedHandler(i),t=Qn(this.gos);this.eventService.addEventListener("cellValueChanged",e,t),this.addDestroyFunc(()=>this.eventService.removeEventListener("cellValueChanged",e,t)),this.addManagedPropertyListener("treeData",i=>this.isTreeData=i.currentValue)}getValueForDisplay(e,t){const i=t.leafGroup&&this.columnModel.isPivotMode(),s=t.group&&t.expanded&&!t.footer&&!i,r=this.gos.get("groupSuppressBlankHeader");if(!s||r)return this.getValue(e,t);let o=!1;const n=this.gos.get("groupTotalRow")??this.gos.get("groupIncludeFooter");typeof n!="function"?o=!!n:o=!!(this.gos.getCallback("groupTotalRow")??this.gos.getCallback("groupIncludeFooter"))({node:this});const l=s&&o;return this.getValue(e,t,!1,l)}getValue(e,t,i=!1,s=!1){if(this.initialised||this.init(),!t)return;const r=e.getColDef(),o=r.field,n=e.getColId(),l=t.data;let a;const c=t.groupData&&t.groupData[n]!==void 0,u=!s&&t.aggData&&t.aggData[n]!==void 0,d=this.isSsrm&&s&&!!e.getColDef().aggFunc,h=this.isSsrm&&t.footer&&t.field&&(e.getColDef().showRowGroup===!0||e.getColDef().showRowGroup===t.field);if(i&&r.filterValueGetter?a=this.executeFilterValueGetter(r.filterValueGetter,l,e,t):this.isTreeData&&u?a=t.aggData[n]:this.isTreeData&&r.valueGetter?a=this.executeValueGetter(r.valueGetter,l,e,t):this.isTreeData&&o&&l?a=qr(l,o,e.isFieldContainsDots()):c?a=t.groupData[n]:u?a=t.aggData[n]:r.valueGetter?a=this.executeValueGetter(r.valueGetter,l,e,t):h?a=qr(l,t.field,e.isFieldContainsDots()):o&&l&&!d&&(a=qr(l,o,e.isFieldContainsDots())),this.cellExpressions&&typeof a=="string"&&a.indexOf("=")===0){const g=a.substring(1);a=this.executeValueGetter(g,l,e,t)}if(a==null){const g=this.getOpenedGroup(t,e);if(g!=null)return g}return a}parseValue(e,t,i,s){const r=e.getColDef(),o=r.valueParser;if(M(o)){const n=this.gos.addGridCommonParams({node:t,data:t==null?void 0:t.data,oldValue:s,newValue:i,colDef:r,column:e});return typeof o=="function"?o(n):this.expressionService.evaluate(o,n)}return i}getDeleteValue(e,t){return M(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t))??null:null}formatValue(e,t,i,s,r=!0){let o=null,n;const l=e.getColDef();if(s?n=s:r&&(n=l.valueFormatter),n){const a=this.gos.addGridCommonParams({value:i,node:t,data:t?t.data:null,colDef:l,column:e});typeof n=="function"?o=n(a):o=this.expressionService.evaluate(n,a)}else if(l.refData)return l.refData[i]||"";return o==null&&Array.isArray(i)&&(o=i.join(", ")),o}getOpenedGroup(e,t){if(!this.gos.get("showOpenedGroup")||!t.getColDef().showRowGroup)return;const s=t.getColDef().showRowGroup;let r=e.parent;for(;r!=null;){if(r.rowGroupColumn&&(s===!0||s===r.rowGroupColumn.getColId()))return r.key;r=r.parent}}setValue(e,t,i,s){const r=this.columnModel.getColDefCol(t);if(!e||!r)return!1;K(e.data)&&(e.data={});const{field:o,valueSetter:n}=r.getColDef();if(K(o)&&K(n))return D("you need either field or valueSetter set on colDef for editing to work"),!1;if(this.dataTypeService&&!this.dataTypeService.checkType(r,i))return D("Data type of the new value does not match the cell data type of the column"),!1;const l=this.gos.addGridCommonParams({node:e,data:e.data,oldValue:this.getValue(r,e),newValue:i,colDef:r.getColDef(),column:r});l.newValue=i;let a;if(M(n)?typeof n=="function"?a=n(l):a=this.expressionService.evaluate(n,l):a=this.setValueUsingField(e.data,o,i,r.isFieldContainsDots()),a===void 0&&(a=!0),!a)return!1;e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged();const c=this.getValue(r,e);return this.eventService.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:l.column,colDef:l.colDef,data:e.data,node:e,oldValue:l.oldValue,newValue:c,value:c,source:s}),!0}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.getFrameworkOverrides().wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,i,s){if(!t)return!1;let r=!1;if(!s)r=e[t]===i,r||(e[t]=i);else{const o=t.split(".");let n=e;for(;o.length>0&&n;){const l=o.shift();o.length===0?(r=n[l]===i,r||(n[l]=i)):n=n[l]}}return!r}executeFilterValueGetter(e,t,i,s){const r=this.gos.addGridCommonParams({data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});return typeof e=="function"?e(r):this.expressionService.evaluate(e,r)}executeValueGetter(e,t,i,s){const r=i.getColId(),o=this.valueCache.getValue(s,r);if(o!==void 0)return o;const n=this.gos.addGridCommonParams({data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});let l;return typeof e=="function"?l=e(n):l=this.expressionService.evaluate(e,n),this.valueCache.setValue(s,r,l),l}getValueCallback(e,t){const i=this.columnModel.getColDefCol(t);return i?this.getValue(i,e):null}getKeyForNode(e,t){const i=this.getValue(e,t),s=e.getColDef().keyCreator;let r=i;if(s){const o=this.gos.addGridCommonParams({value:i,colDef:e.getColDef(),column:e,node:t,data:t.data});r=s(o)}return typeof r=="string"||r==null||(r=String(r),r==="[object Object]"&&D("a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key")),r}},nd=class Ji{static applyGlobalGridOptions(t){if(!Ji.gridOptions)return t;let i={};return Qe(i,Ji.gridOptions,!0,!0),Ji.mergeStrategy==="deep"?Qe(i,t,!0,!0):i={...i,...t},Ji.gridOptions.context&&(i.context=Ji.gridOptions.context),t.context&&(Ji.mergeStrategy==="deep"&&i.context&&Qe(t.context,i.context,!0,!0),i.context=t.context),i}};nd.gridOptions=void 0;nd.mergeStrategy="shallow";var sv=nd;function CD(e){var t;return(t=sv.gridOptions)==null?void 0:t[e]}var wD=1,SD=class{create(e,t,i,s,r){const o=sv.applyGlobalGridOptions(t),n=q0(o),l=n.gridId??String(wD++),a=this.getRegisteredModules(r,l),c=this.createBeansList(n.rowModelType,a,l),u=this.createProvidedBeans(e,n,r);if(!c){$("Failed to create grid.");return}const d={providedBeanInstances:u,beanClasses:c,gridId:l,beanInitComparator:Ix,beanDestroyComparator:Lx,derivedBeans:[Fx]},h=new Ny(d);return this.registerModuleUserComponents(h,a),this.registerControllers(h,a),this.registerModuleApiFunctions(h,a),i(h),h.getBean("syncService").start(),s&&s(h),h.getBean("gridApi")}registerControllers(e,t){const i=e.getBean("ctrlsFactory");t.forEach(s=>{s.controllers&&s.controllers.forEach(r=>i.register(r))})}getRegisteredModules(e,t){const i=e?e.modules:null,s=Kt.__getRegisteredModules(t),r=[],o={},n=(l,a,c)=>{(d=>{o[d.moduleName]||(o[d.moduleName]=!0,r.push(d),Kt.__register(d,l,c))})(a),a.dependantModules&&a.dependantModules.forEach(d=>n(l,d,c))};return n(!!(i!=null&&i.length)||!Kt.__isPackageBased(),Zm,void 0),i&&i.forEach(l=>n(!0,l,t)),s&&s.forEach(l=>n(!Kt.__isPackageBased(),l,void 0)),r}registerModuleUserComponents(e,t){const i=this.extractModuleEntity(t,r=>r.userComponents?r.userComponents:[]),s=e.getBean("userComponentRegistry");i.forEach(({name:r,classImp:o,params:n})=>{s.registerDefaultComponent(r,o,n)})}registerModuleApiFunctions(e,t){const i=e.getBean("apiFunctionService");t.forEach(s=>{const r=s.apiFunctions;r&&Object.keys(r).forEach(n=>{i==null||i.addFunction(n,r[n])})})}createProvidedBeans(e,t,i){let s=i?i.frameworkOverrides:null;K(s)&&(s=new Um);const r={gridOptions:t,eGridDiv:e,globalEventListener:i?i.globalEventListener:null,globalSyncEventListener:i?i.globalSyncEventListener:null,frameworkOverrides:s};return i&&i.providedBeanInstances&&Object.assign(r,i.providedBeanInstances),r}createBeansList(e="clientSide",t,i){const s=t.filter(a=>!a.rowModel||a.rowModel===e),r={clientSide:"@ag-grid-community/client-side-row-model",infinite:"@ag-grid-community/infinite-row-model",serverSide:"@ag-grid-enterprise/server-side-row-model",viewport:"@ag-grid-enterprise/viewport-row-model"};if(!r[e]){$("Could not find row model for rowModelType = ",e);return}if(!Kt.__assertRegistered(r[e],`rowModelType = '${e}'`,i))return;const o=[Bx,Nx,Z0,$0,Rx,vy,Tx,kx,CF,Jf,aD,mF,J0,cx,zy,mS,Wx,X0,wx,iv,oS,Zb,iD,tD,lx,fD,rS,fF,mD,vD,ox,vF,Hy,_x,pF,Vx,yx,px,gF,dD,oD,rD,uD,pD,wF,xx,lD,cD,Gx,Ux,Hx,Ox,hD,nD,SF,eD,sD,yF,aS,Px,cS,nS,Ex,Dx,fS,lS,gS,Mx,pS,Jw],n=this.extractModuleEntity(s,a=>a.beans?a.beans:[]);o.push(...n);const l=[];return o.forEach(a=>{l.indexOf(a)<0&&l.push(a)}),l}extractModuleEntity(e,t){return[].concat(...e.map(t))}},rv=class extends P{constructor(){super(...arguments),this.beanName="rowModelHelperService"}wireBeans(e){this.rowModel=e.rowModel}postConstruct(){const e=this.rowModel;switch(e.getType()){case"clientSide":this.clientSideRowModel=e;break;case"infinite":this.infiniteRowModel=e;break;case"serverSide":this.serverSideRowModel=e;break}}getClientSideRowModel(){return this.clientSideRowModel}getInfiniteRowModel(){return this.infiniteRowModel}getServerSideRowModel(){return this.serverSideRowModel}};function yD(e){e.expansionService.expandAll(!0)}function bD(e){e.expansionService.expandAll(!1)}function RD(e){var s,r;const t=(s=e.rowModelHelperService)==null?void 0:s.getClientSideRowModel(),i=(r=e.rowModelHelperService)==null?void 0:r.getServerSideRowModel();t?t.onRowHeightChanged():i&&i.onRowHeightChanged()}function FD(e,t,i){var o,n;const s=(o=e.rowModelHelperService)==null?void 0:o.getServerSideRowModel();if(s){if(e.funcColsService.isRowGroupEmpty()){s.setRowCount(t,i);return}$("setRowCount cannot be used while using row grouping.");return}const r=(n=e.rowModelHelperService)==null?void 0:n.getInfiniteRowModel();if(r){r.setRowCount(t,i);return}}function xD(e){var t;return((t=e.rowNodeBlockLoader)==null?void 0:t.getBlockState())??{}}function PD(e){return e.rowModel.isLastRowIndexKnown()}var ED={version:z,moduleName:"@ag-grid-community/csrm-ssrm-shared-api",apiFunctions:{expandAll:yD,collapseAll:bD,onRowHeightChanged:RD}},DD={version:z,moduleName:"@ag-grid-community/ssrm-infinite-shared-api",apiFunctions:{setRowCount:FD,getCacheBlockState:xD,isLastRowIndexKnown:PD}},MD=class{wrap(e,t,i=[],s){const r=this.createWrapper(e,s);return t.forEach(o=>{this.createMethod(r,o,!0)}),i.forEach(o=>{this.createMethod(r,o,!1)}),r}createMethod(e,t,i){e.addMethod(t,this.createMethodProxy(e,t,i))}createMethodProxy(e,t,i){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(i&&D("Framework component is missing the method "+t+"()"),null)}}},wr=typeof global>"u"?{}:global;wr.HTMLElement=typeof HTMLElement>"u"?{}:HTMLElement;wr.HTMLButtonElement=typeof HTMLButtonElement>"u"?{}:HTMLButtonElement;wr.HTMLSelectElement=typeof HTMLSelectElement>"u"?{}:HTMLSelectElement;wr.HTMLInputElement=typeof HTMLInputElement>"u"?{}:HTMLInputElement;wr.Node=typeof Node>"u"?{}:Node;wr.MouseEvent=typeof MouseEvent>"u"?{}:MouseEvent;var TD="ROOT_NODE_ID",Sa=0,kD=class{constructor(e,t,i,s,r,o){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=e,this.gos=t,this.eventService=i,this.funcColsService=s,this.beans=o,this.selectionService=r,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=TD,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return Pf(this.allNodesMap)}getRowNode(e){return this.allNodesMap[e]}setRowData(e){if(typeof e=="string"){D("rowData must be an array.");return}this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e);const t=this.rootNode,i=this.rootNode.sibling;t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.nextId=0,this.allNodesMap={},e?t.allLeafChildren=e.map((s,r)=>this.createNode(s,this.rootNode,Sa,r)):(t.allLeafChildren=[],t.childrenAfterGroup=[]),i&&(i.childrenAfterFilter=t.childrenAfterFilter,i.childrenAfterGroup=t.childrenAfterGroup,i.childrenAfterAggFilter=t.childrenAfterAggFilter,i.childrenAfterSort=t.childrenAfterSort,i.childrenMapped=t.childrenMapped,i.allLeafChildren=t.allLeafChildren)}updateRowData(e){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e.add);const t={rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},i=[];return this.executeRemove(e,t,i),this.executeUpdate(e,t,i),this.executeAdd(e,t),this.updateSelection(i,"rowDataChanged"),t}updateRowOrderFromRowData(e){const t=this.rootNode.allLeafChildren,i=(t==null?void 0:t.length)??0,s=new Map;let r=-1,o=-1;for(let n=0;n<i;++n){const l=t[n],a=l.data;a!==e[n]&&(o<0&&(r=n),o=n,s.set(a,l))}if(r<0)return!1;for(let n=r;n<=o;++n){const l=s.get(e[n]);l!==void 0&&(t[n]=l,l.sourceRowIndex=n)}return!0}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(e){this.eventService.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e!=null&&e.length?e[0]:null})}updateSelection(e,t){const i=e.length>0;i&&this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),this.selectionService.updateGroupsFromChildrenSelections(t),i&&this.eventService.dispatchEvent({type:"selectionChanged",source:t})}executeAdd(e,t){const i=e.add;if(ht(i))return;const s=this.rootNode.allLeafChildren;let r=s.length;if(typeof e.addIndex=="number"&&(r=this.sanitizeAddIndex(e.addIndex),r>0&&this.gos.get("treeData")))for(let a=0;a<s.length;a++){const c=s[a];if((c==null?void 0:c.rowIndex)==r-1){r=a+1;break}}const o=i.map((l,a)=>this.createNode(l,this.rootNode,Sa,r+a));if(r<s.length){const l=s.slice(0,r),a=s.slice(r,s.length),c=l.length+o.length;for(let u=0,d=a.length;u<d;++u)a[u].sourceRowIndex=c+u;this.rootNode.allLeafChildren=[...l,...o,...a],t.rowsInserted=!0}else this.rootNode.allLeafChildren=s.concat(o);const n=this.rootNode.sibling;n&&(n.allLeafChildren=s),t.rowNodeTransaction.add=o}sanitizeAddIndex(e){var i;const t=((i=this.rootNode.allLeafChildren)==null?void 0:i.length)??0;return e<0||e>=t||Number.isNaN(e)?t:Math.ceil(e)}executeRemove(e,{rowNodeTransaction:t},i){var n,l;const{remove:s}=e;if(ht(s))return;const r={};s.forEach(a=>{const c=this.lookupRowNode(a);c&&(c.isSelected()&&i.push(c),c.clearRowTopAndRowIndex(),r[c.id]=!0,delete this.allNodesMap[c.id],t.remove.push(c))}),this.rootNode.allLeafChildren=((n=this.rootNode.allLeafChildren)==null?void 0:n.filter(a=>!r[a.id]))??null,(l=this.rootNode.allLeafChildren)==null||l.forEach((a,c)=>{a.sourceRowIndex=c});const o=this.rootNode.sibling;o&&(o.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(e,{rowNodeTransaction:t},i){const{update:s}=e;ht(s)||s.forEach(r=>{const o=this.lookupRowNode(r);o&&(o.updateData(r),!o.selectable&&o.isSelected()&&i.push(o),this.setMasterForRow(o,r,Sa,!1),t.update.push(o))})}lookupRowNode(e){var s;const t=fr(this.gos);let i;if(t){const r=t({data:e,level:0});if(i=this.allNodesMap[r],!i)return $(`could not find row id=${r}, data item was not found for this id`),null}else if(i=(s=this.rootNode.allLeafChildren)==null?void 0:s.find(r=>r.data===e),!i)return $("could not find data item as object was not found",e),$("Consider using getRowId to help the Grid find matching row data"),null;return i||null}createNode(e,t,i,s){const r=new ai(this.beans);return r.sourceRowIndex=s,r.group=!1,this.setMasterForRow(r,e,i,!0),t&&(r.parent=t),r.level=i,r.setDataAndId(e,this.nextId.toString()),this.allNodesMap[r.id]&&D(`duplicate node id '${r.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[r.id]=r,this.nextId++,r}setMasterForRow(e,t,i,s){if(this.gos.get("treeData"))e.setMaster(!1),s&&(e.expanded=!1);else{if(this.gos.get("masterDetail")){const n=this.gos.get("isRowMaster");n?e.setMaster(n(t)):e.setMaster(!0)}else e.setMaster(!1);if(s){const n=this.funcColsService.getRowGroupColumns(),l=n?n.length:0,a=i+l;e.expanded=e.master?this.isExpanded(a):!1}}}isExpanded(e){const t=this.gos.get("groupDefaultExpanded");return t===-1?!0:e<t}},AD=class extends P{constructor(){super(...arguments),this.beanName="rowModel",this.onRowHeightChanged_debounced=qe(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[],this.hasStarted=!1,this.shouldSkipSettingDataOnStart=!1,this.isRefreshingModel=!1,this.rowCountReady=!1}wireBeans(e){this.beans=e,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.selectionService=e.selectionService,this.valueCache=e.valueCache,this.environment=e.environment,this.filterStage=e.filterStage,this.sortStage=e.sortStage,this.flattenStage=e.flattenStage,this.groupStage=e.groupStage,this.aggregationStage=e.aggregationStage,this.pivotStage=e.pivotStage,this.filterAggregatesStage=e.filterAggregatesStage}postConstruct(){const e=this.refreshModel.bind(this,{step:"group"}),t=!this.gos.get("suppressAnimationFrame"),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:e,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:e,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new ai(this.beans),this.nodeManager=new kD(this.rootNode,this.gos,this.eventService,this.funcColsService,this.selectionService,this.beans)}addPropertyListeners(){const e=new Set(["treeData","masterDetail"]),t=new Set(["groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),i=new Set(["excludeChildrenWhenTreeDataFiltering"]),s=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),r=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),o=new Set(["postSortRows","groupDisplayType","accentedSort"]),n=new Set([]),l=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),a=[...e,...t,...i,...s,...s,...r,...o,...n,...l];this.addManagedPropertyListeners(a,c=>{var h;const u=(h=c.changeSet)==null?void 0:h.properties;if(!u)return;const d=g=>u.some(v=>g.has(v));if(d(e)){this.setRowData(this.rootNode.allLeafChildren.map(g=>g.data));return}if(d(t)){this.refreshModel({step:"group"});return}if(d(i)){this.refreshModel({step:"filter"});return}if(d(s)){this.refreshModel({step:"pivot"});return}if(d(r)){this.refreshModel({step:"aggregate"});return}if(d(o)){this.refreshModel({step:"sort"});return}if(d(n)){this.refreshModel({step:"filter_aggregates"});return}d(l)&&this.refreshModel({step:"map"})}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()}setInitialData(){const e=this.gos.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e))}ensureRowHeightsValid(e,t,i,s){let r,o=!1;do{r=!1;const n=this.getRowIndexAtPixel(e),l=this.getRowIndexAtPixel(t),a=Math.max(n,i),c=Math.min(l,s);for(let u=a;u<=c;u++){const d=this.getRow(u);if(d.rowHeightEstimated){const h=zi(this.gos,d);d.setRowHeight(h.height),r=!0,o=!0}}r&&this.setRowTopAndRowIndex()}while(r);return o}setRowTopAndRowIndex(){const e=this.environment.getDefaultRowHeight();let t=0;const i=new Set,s=Le(this.gos,"normal");for(let r=0;r<this.rowsToDisplay.length;r++){const o=this.rowsToDisplay[r];if(o.id!=null&&i.add(o.id),o.rowHeight==null){const n=zi(this.gos,o,s,e);o.setRowHeight(n.height,n.estimated)}o.setRowTop(t),o.setRowIndex(r),t+=o.rowHeight}return i}clearRowTopAndRowIndex(e,t){const i=e.isActive(),s=o=>{o&&o.id!=null&&!t.has(o.id)&&o.clearRowTopAndRowIndex()},r=o=>{if(s(o),s(o.detailNode),s(o.sibling),o.hasChildren()&&o.childrenAfterGroup){const n=o.level==-1;i&&!n&&!o.expanded||o.childrenAfterGroup.forEach(r)}};r(this.rootNode)}ensureRowsAtPixel(e,t,i=0){const s=this.getRowIndexAtPixel(t),r=this.getRow(s),o=!this.gos.get("suppressAnimationFrame");if(r===e[0])return!1;const n=this.rootNode.allLeafChildren;return e.forEach(l=>{Xe(n,l)}),e.forEach((l,a)=>{Zn(n,l,Math.max(s+i,0)+a)}),e.forEach((l,a)=>{l.sourceRowIndex=a}),this.refreshModel({step:"group",keepRenderedRows:!0,keepEditingRows:!0,animate:o,rowNodesOrderChanged:!0}),!0}highlightRowAtPixel(e,t){const i=t!=null?this.getRowIndexAtPixel(t):null,s=i!=null?this.getRow(i):null;if(!s||!e||t==null){this.clearHighlightedRow();return}const r=this.getHighlightPosition(t,s),o=this.isHighlightingCurrentPosition(e,s,r),n=this.lastHighlightedRow!=null&&this.lastHighlightedRow!==s;(o||n)&&(this.clearHighlightedRow(),o)||(s.setHighlighted(r),this.lastHighlightedRow=s)}getHighlightPosition(e,t){if(!t){const r=this.getRowIndexAtPixel(e);if(t=this.getRow(r||0),!t)return 1}const{rowTop:i,rowHeight:s}=t;return e-i<s/2?0:1}getLastHighlightedRowNode(){return this.lastHighlightedRow}isHighlightingCurrentPosition(e,t,i){if(e===t)return!0;const s=i===0?-1:1;return this.getRow(t.rowIndex+s)===e}clearHighlightedRow(){this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){if(this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return 1;const t=this.rootNode.childrenAfterAggFilter,i=this.rootNode.sibling?1:0;return(t?t.length:0)+i}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let i=e;if(this.rowsToDisplay[0].footer){if(e===0)return 0;i-=1}const s=this.rowsToDisplay[this.rowsToDisplay.length-1],r=i>=this.rootNode.childrenAfterSort.length;if(s.footer&&r)return s.rowIndex;let o=this.rootNode.childrenAfterSort[i];if(this.gos.get("groupHideOpenParents"))for(;o.expanded&&o.childrenAfterSort&&o.childrenAfterSort.length>0;)o=o.childrenAfterSort[0];return o.rowIndex}getRowBounds(e){if(K(this.rowsToDisplay))return null;const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=Xs(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=Xs(this.gos),s=e.columns.length===0||e.columns.some(r=>r.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=Xs(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:"pivot"}):this.refreshModel({step:"aggregate"})}createChangePath(e){const t=ht(e),i=new Tl(!1,this.rootNode);return t&&i.setInactive(),i}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction")||e.rowNodeTransactions==null)return!1;const t=e.rowNodeTransactions.filter(s=>s.add!=null&&s.add.length>0||s.remove!=null&&s.remove.length>0);return t==null||t.length==0}buildRefreshModelParams(e){let t="group";const i={everything:"group",group:"group",filter:"filter",map:"map",aggregate:"aggregate",filter_aggregates:"filter_aggregates",sort:"sort",pivot:"pivot",nothing:"nothing"};if(M(e)&&(t=i[e]),K(t)){$(`invalid step ${e}, available steps are ${Object.keys(i).join(", ")}`);return}const s=!this.gos.get("suppressAnimationFrame");return{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:s}}refreshModel(e){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.isChangeEventsDispatching())return;const t=typeof e=="object"&&"step"in e?e:this.buildRefreshModelParams(e);if(!t||this.isSuppressModelUpdateAfterUpdateTransaction(t))return;const i=this.createChangePath(t.rowNodeTransactions);switch(this.isRefreshingModel=!0,t.step){case"group":this.doRowGrouping(t.rowNodeTransactions,i,!!t.rowNodesOrderChanged,!!t.afterColumnsChanged);case"filter":this.doFilter(i);case"pivot":this.doPivot(i);case"aggregate":this.doAggregate(i);case"filter_aggregates":this.doFilterAggregates(i);case"sort":this.doSort(t.rowNodeTransactions,i);case"map":this.doRowsToDisplay()}const s=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,s),this.isRefreshingModel=!1,this.eventService.dispatchEvent({type:"modelUpdated",animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack})}isEmpty(){const e=K(this.rootNode.allLeafChildren)||this.rootNode.allLeafChildren.length===0;return K(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return M(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!1,s=!1;const r=[],o=Ss(this.gos);return this.forEachNodeAfterFilterAndSort(n=>{if(s)return;if(i&&(n===t||n===e)&&(s=!0,n.group&&o)){r.push(...n.allLeafChildren);return}if(!i){if(n!==t&&n!==e)return;i=!0}if(!n.group||!o){r.push(n);return}}),r}setDatasource(e){$("should never call setDatasource on clientSideRowController")}getTopLevelNodes(){return this.rootNode?this.rootNode.childrenAfterGroup:null}getRootNode(){return this.rootNode}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){if(this.isEmpty()||this.rowsToDisplay.length===0)return-1;let t=0,i=this.rowsToDisplay.length-1;if(e<=0)return 0;if(j(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let r=-1,o=-1;for(;;){const n=Math.floor((t+i)/2),l=this.rowsToDisplay[n];if(this.isRowInPixel(l,e)||(l.rowTop<e?t=n+1:l.rowTop>e&&(i=n-1),r===t&&o===i))return n;r=t,o=i}}isRowInPixel(e,t){const i=e.rowTop,s=e.rowTop+e.rowHeight;return i<=t&&s>t}forEachLeafNode(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((t,i)=>e(t,i))}forEachNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterGroup||[]],callback:e,recursionType:0,index:0,includeFooterNodes:t})}forEachNodeAfterFilter(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterAggFilter||[]],callback:e,recursionType:1,index:0,includeFooterNodes:t})}forEachNodeAfterFilterAndSort(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterSort||[]],callback:e,recursionType:2,index:0,includeFooterNodes:t})}forEachPivotNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:3,index:0,includeFooterNodes:t})}recursivelyWalkNodesAndCallback(e){const{nodes:t,callback:i,recursionType:s,includeFooterNodes:r}=e;let{index:o}=e;const n=l=>{var g;const a=(g=t[0])==null?void 0:g.parent;if(!a)return;const c=r&&mf(this.gos),u=vf(this.gos),d=r&&u({node:a});if(a===this.rootNode){c===l&&(a.createFooter(),i(a.sibling,o++));return}d===l&&(a.createFooter(),i(a.sibling,o++))};n("top");for(let l=0;l<t.length;l++){const a=t[l];if(i(a,o++),a.hasChildren()&&!a.footer){let c=null;switch(s){case 0:c=a.childrenAfterGroup;break;case 1:c=a.childrenAfterAggFilter;break;case 2:c=a.childrenAfterSort;break;case 3:c=a.leafGroup?null:a.childrenAfterSort;break}c&&(o=this.recursivelyWalkNodesAndCallback({nodes:[...c],callback:i,recursionType:s,index:o,includeFooterNodes:r}))}}return n("bottom"),o}doAggregate(e){var t;(t=this.aggregationStage)==null||t.execute({rowNode:this.rootNode,changedPath:e})}doFilterAggregates(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter}expandOrCollapseAll(e){const t=this.gos.get("treeData"),i=this.columnModel.isPivotActive(),s=r=>{r&&r.forEach(o=>{const n=()=>{o.expanded=e,s(o.childrenAfterGroup)};if(t){M(o.childrenAfterGroup)&&n();return}if(i){!o.leafGroup&&n();return}o.group&&n()})};this.rootNode&&s(this.rootNode.childrenAfterGroup),this.refreshModel({step:"map"}),this.eventService.dispatchEvent({type:"expandOrCollapseAll",source:e?"expandAll":"collapseAll"})}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}doRowGrouping(e,t,i,s){if(this.groupStage)e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodesOrderChanged:i,changedPath:t}):this.groupStage.execute({rowNode:this.rootNode,changedPath:t,afterColumnsChanged:s}),Ss(this.gos)&&this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",t)&&this.eventService.dispatchEvent({type:"selectionChanged",source:"rowGroupChanged"});else{const r=this.rootNode,o=r.sibling;r.childrenAfterGroup=r.allLeafChildren,o&&(o.childrenAfterGroup=r.childrenAfterGroup),this.rootNode.updateHasChildren()}this.nodeManager.isRowCountReady()&&(this.rowCountReady=!0,this.eventService.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}doPivot(e){var t;(t=this.pivotStage)==null||t.execute({rowNode:this.rootNode,changedPath:e})}getNodeManager(){return this.nodeManager}getRowNode(e){if(typeof e=="string"&&e.indexOf(ai.ID_PREFIX_ROW_GROUP)==0){let i;return this.forEachNode(s=>{s.id===e&&(i=s)}),i}return this.nodeManager.getRowNode(e)}setRowData(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()}dispatchUpdateEventsAndRefresh(){this.eventService.dispatchEvent({type:"rowDataUpdated"}),this.refreshModel({step:"group",newData:!0})}batchUpdateRowData(e,t){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const i=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},i)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var s;this.valueCache.onDataChanged();const e=[],t=[];let i=!1;(s=this.rowDataTransactionBatch)==null||s.forEach(r=>{const{rowNodeTransaction:o,rowsInserted:n}=this.nodeManager.updateRowData(r.rowDataTransaction);n&&(i=!0),t.push(o),r.callback&&e.push(r.callback.bind(null,o))}),this.commonUpdateRowData(t,i),e.length>0&&window.setTimeout(()=>{e.forEach(r=>r())},0),t.length>0&&this.eventService.dispatchEvent({type:"asyncTransactionsFlushed",results:t}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e){this.valueCache.onDataChanged();const{rowNodeTransaction:t,rowsInserted:i}=this.nodeManager.updateRowData(e);return this.commonUpdateRowData([t],i),t}afterImmutableDataChange(e,t){this.commonUpdateRowData([e],t)}commonUpdateRowData(e,t){if(!this.hasStarted)return;const i=!this.gos.get("suppressAnimationFrame");this.eventService.dispatchEvent({type:"rowDataUpdated"}),this.refreshModel({step:"group",rowNodeTransactions:e,rowNodesOrderChanged:t,keepRenderedRows:!0,keepEditingRows:!0,animate:i})}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes();this.rootNode.setRowHeight(this.rootNode.rowHeight,!0),this.rootNode.sibling&&this.rootNode.sibling.setRowHeight(this.rootNode.sibling.rowHeight,!0),e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const i=t.detailNode;i&&i.setRowHeight(i.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){if(e.rowHeightChanged){if(this.columnModel.isAutoRowHeightActive())return;this.resetRowHeights()}}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.clearHighlightedRow()}};function ID(e){e.expansionService.onGroupExpandedOrCollapsed()}function LD(e,t){var i,s;(s=(i=e.rowModelHelperService)==null?void 0:i.getClientSideRowModel())==null||s.refreshModel(t)}function OD(e){var t,i;return((i=(t=e.rowModelHelperService)==null?void 0:t.getClientSideRowModel())==null?void 0:i.isEmpty())??!0}function GD(e,t){var i,s;(s=(i=e.rowModelHelperService)==null?void 0:i.getClientSideRowModel())==null||s.forEachLeafNode(t)}function ND(e,t){var i,s;(s=(i=e.rowModelHelperService)==null?void 0:i.getClientSideRowModel())==null||s.forEachNodeAfterFilter(t)}function HD(e,t){var i,s;(s=(i=e.rowModelHelperService)==null?void 0:i.getClientSideRowModel())==null||s.forEachNodeAfterFilterAndSort(t)}function BD(e){var t,i;if(e.columnModel.isAutoRowHeightActive()){D("calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");return}(i=(t=e.rowModelHelperService)==null?void 0:t.getClientSideRowModel())==null||i.resetRowHeights()}function VD(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var i,s;return(s=(i=e.rowModelHelperService)==null?void 0:i.getClientSideRowModel())==null?void 0:s.updateRowData(t)})}function zD(e,t,i){e.frameworkOverrides.wrapIncoming(()=>{var s,r;return(r=(s=e.rowModelHelperService)==null?void 0:s.getClientSideRowModel())==null?void 0:r.batchUpdateRowData(t,i)})}function WD(e){e.frameworkOverrides.wrapIncoming(()=>{var t,i;return(i=(t=e.rowModelHelperService)==null?void 0:t.getClientSideRowModel())==null?void 0:i.flushAsyncTransactions()})}function _D(e){return e.selectionService.getBestCostNodeSelection()}var UD=class extends P{constructor(){super(...arguments),this.beanName="filterStage"}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){var i;const t=!!((i=this.filterManager)!=null&&i.isChildFilterPresent());this.filterNodes(t,e)}filterNodes(e,t){const i=(s,r)=>{s.hasChildren()&&e&&!r?s.childrenAfterFilter=s.childrenAfterGroup.filter(o=>{const n=o.childrenAfterFilter&&o.childrenAfterFilter.length>0,l=o.data&&this.filterManager.doesRowPassFilter({rowNode:o});return n||l}):s.childrenAfterFilter=s.childrenAfterGroup,s.sibling&&(s.sibling.childrenAfterFilter=s.childrenAfterFilter)};if(this.doingTreeDataFiltering()){const s=(o,n)=>{if(o.childrenAfterGroup)for(let l=0;l<o.childrenAfterGroup.length;l++){const a=o.childrenAfterGroup[l],c=n||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?s(o.childrenAfterGroup[l],c):i(a,c)}i(o,n)},r=o=>s(o,!1);t.executeFromRootNode(r)}else{const s=r=>i(r,!1);t.forEachChangedNodeDepthFirst(s,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},jD=class extends P{constructor(){super(...arguments),this.beanName="flattenStage"}wireBeans(e){this.beans=e,this.columnModel=e.columnModel}execute(e){const t=e.rowNode,i=[],s=this.columnModel.isPivotMode(),r=s&&t.leafGroup,o=r?[t]:t.childrenAfterSort,n=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(n,o,i,s,0);const l=i.length>0;if(!r&&l&&n.grandTotalRow){t.createFooter();const c=n.grandTotalRow==="top";this.addRowNodeToRowsToDisplay(n,t.sibling,i,0,c)}return i}getFlattenDetails(){const e=this.gos.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gos.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:Cf(this.gos),hideOpenParents:this.gos.get("groupHideOpenParents"),grandTotalRow:mf(this.gos),groupTotalRow:vf(this.gos)}}recursivelyAddToRowsToDisplay(e,t,i,s,r){if(!ht(t))for(let o=0;o<t.length;o++){const n=t[o],l=n.hasChildren(),a=s&&!l,c=e.groupRemoveSingleChildren&&l&&n.childrenAfterGroup.length===1,u=e.groupRemoveLowestSingleChildren&&l&&n.leafGroup&&n.childrenAfterGroup.length===1,d=s&&n.leafGroup,h=e.hideOpenParents&&n.expanded&&!n.master&&!d;if(!a&&!h&&!c&&!u&&this.addRowNodeToRowsToDisplay(e,n,i,r),!(s&&n.leafGroup)){if(l){const v=c||u;if(n.expanded||v){const w=e.groupTotalRow({node:n});w||n.destroyFooter();const S=v?r:r+1;w==="top"&&(n.createFooter(),this.addRowNodeToRowsToDisplay(e,n.sibling,i,S)),this.recursivelyAddToRowsToDisplay(e,n.childrenAfterSort,i,s,S),w==="bottom"&&(n.createFooter(),this.addRowNodeToRowsToDisplay(e,n.sibling,i,S))}}else if(n.master&&n.expanded){const v=this.createDetailNode(n);this.addRowNodeToRowsToDisplay(e,v,i,r)}}}}addRowNodeToRowsToDisplay(e,t,i,s,r){r?i.unshift(t):i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:s)}createDetailNode(e){if(M(e.detailNode))return e.detailNode;const t=new ai(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,M(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}},KD=class extends P{constructor(){super(...arguments),this.beanName="immutableService"}wireBeans(e){this.rowModel=e.rowModel,this.selectionService=e.selectionService}postConstruct(){ae(this.gos)&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",()=>this.onRowDataUpdated()))}isActive(){const e=this.gos.exists("getRowId");return this.gos.get("resetRowDataOnUpdate")?!1:e}setRowData(e){const t=this.createTransactionForRowData(e);if(!t)return;const i=this.clientSideRowModel.getNodeManager(),{rowNodeTransaction:s,rowsInserted:r}=i.updateRowData(t);let o=!1;this.gos.get("suppressMaintainUnsortedOrder")||(o=i.updateRowOrderFromRowData(e)),this.clientSideRowModel.afterImmutableDataChange(s,o||r)}createTransactionForRowData(e){if(!ae(this.gos))return $("ImmutableService only works with ClientSideRowModel"),null;const t=fr(this.gos);if(t==null)return $("ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!"),null;const i=this.clientSideRowModel.getNodeManager().getCopyOfNodesMap(),s=[],r=[],o=[];return M(e)&&e.forEach(n=>{const l=t({data:n,level:0}),a=i[l];a?(a.data!==n&&r.push(n),i[l]=void 0):o.push(n)}),It(i,(n,l)=>{l&&s.push(l.data)}),{remove:s,update:r,add:o}}onRowDataUpdated(){const e=this.gos.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}},$D=class extends P{constructor(){super(...arguments),this.beanName="sortService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.rowNodeSorter=e.rowNodeSorter,this.showRowGroupColsService=e.showRowGroupColsService}sort(e,t,i,s,r,o){const n=this.gos.get("groupMaintainOrder"),l=this.columnModel.getCols().some(h=>h.isRowGroupActive());let a={};i&&s&&(a=this.calculateDirtyNodes(s));const c=this.columnModel.isPivotMode(),u=this.gos.getCallback("postSortRows"),d=h=>{var w;this.pullDownGroupDataForHideOpenParents(h.childrenAfterAggFilter,!0);const g=c&&h.leafGroup;if(n&&l&&!h.leafGroup&&!o){const S=(w=this.funcColsService.getRowGroupColumns())==null?void 0:w[h.level+1],f=(S==null?void 0:S.getSort())===null,p=h.childrenAfterAggFilter.slice(0);if(h.childrenAfterSort&&!f){const m={};h.childrenAfterSort.forEach((y,b)=>{m[y.id]=b}),p.sort((y,b)=>(m[y.id]??0)-(m[b.id]??0))}h.childrenAfterSort=p}else!t||g?h.childrenAfterSort=h.childrenAfterAggFilter.slice(0):i?h.childrenAfterSort=this.doDeltaSort(h,a,r,e):h.childrenAfterSort=this.rowNodeSorter.doFullSort(h.childrenAfterAggFilter,e);if(h.sibling&&(h.sibling.childrenAfterSort=h.childrenAfterSort),this.updateChildIndexes(h),u){const S={nodes:h.childrenAfterSort};u(S)}};r&&r.forEachChangedNodeDepthFirst(d),this.updateGroupDataForHideOpenParents(r)}calculateDirtyNodes(e){const t={},i=s=>{s&&s.forEach(r=>t[r.id]=!0)};return e&&e.forEach(s=>{i(s.add),i(s.update),i(s.remove)}),t}doDeltaSort(e,t,i,s){const r=e.childrenAfterAggFilter,o=e.childrenAfterSort;if(!o)return this.rowNodeSorter.doFullSort(r,s);const n={},l=[];r.forEach(d=>{t[d.id]||!i.canSkip(d)?l.push(d):n[d.id]=!0});const a=o.filter(d=>n[d.id]),c=(d,h)=>({currentPos:h,rowNode:d}),u=l.map(c).sort((d,h)=>this.rowNodeSorter.compareRowNodes(s,d,h));return this.mergeSortedArrays(s,u,a.map(c)).map(({rowNode:d})=>d)}mergeSortedArrays(e,t,i){const s=[];let r=0,o=0;for(;r<t.length&&o<i.length;)this.rowNodeSorter.compareRowNodes(e,t[r],i[o])<0?s.push(t[r++]):s.push(i[o++]);for(;r<t.length;)s.push(t[r++]);for(;o<i.length;)s.push(i[o++]);return s}updateChildIndexes(e){if(K(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let i=0;i<t.length;i++){const s=t[i],r=i===0,o=i===e.childrenAfterSort.length-1;s.setFirstChild(r),s.setLastChild(o),s.setChildIndex(i)}}updateGroupDataForHideOpenParents(e){if(!this.gos.get("groupHideOpenParents"))return;if(this.gos.get("treeData"))return D("The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them."),!1;const t=i=>{this.pullDownGroupDataForHideOpenParents(i.childrenAfterSort,!1),i.childrenAfterSort.forEach(s=>{s.hasChildren()&&t(s)})};e&&e.executeFromRootNode(i=>t(i))}pullDownGroupDataForHideOpenParents(e,t){!this.gos.get("groupHideOpenParents")||K(e)||e.forEach(i=>{var r;(((r=this.showRowGroupColsService)==null?void 0:r.getShowRowGroupCols())??[]).forEach(o=>{const n=o.getColDef().showRowGroup;if(typeof n!="string"){$("groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");return}const l=n,a=this.columnModel.getColDefCol(l);if(a!==i.rowGroupColumn)if(t)i.setGroupValue(o.getId(),void 0);else{const u=this.getFirstChildOfFirstChild(i,a);u&&i.setGroupValue(o.getId(),u.key)}})})}getFirstChildOfFirstChild(e,t){let i=e;for(;i;){const s=i.parent;if(s&&i.firstChild){if(s.rowGroupColumn===t)return s}else return null;i=s}return null}},YD=class extends P{constructor(){super(...arguments),this.beanName="sortStage"}wireBeans(e){this.sortService=e.sortService,this.sortController=e.sortController}execute(e){const t=this.sortController.getSortOptions(),i=M(t)&&t.length>0,s=i&&M(e.rowNodeTransactions)&&this.gos.get("deltaSort"),r=t.some(o=>jt(this.gos)?o.column.isPrimary()&&o.column.isRowGroupActive():!!o.column.getColDef().showRowGroup);this.sortService.sort(t,i,s,e.rowNodeTransactions,e.changedPath,r)}},ld="32.3.9",ov={version:ld,moduleName:"@ag-grid-community/client-side-row-model-core",rowModel:"clientSide",beans:[AD,UD,YD,jD,$D,KD]},QD={version:ld,moduleName:"@ag-grid-community/client-side-row-model-api",beans:[rv],apiFunctions:{onGroupExpandedOrCollapsed:ID,refreshClientSideRowModel:LD,isRowDataEmpty:OD,forEachLeafNode:GD,forEachNodeAfterFilter:ND,forEachNodeAfterFilterAndSort:HD,resetRowHeights:BD,applyTransaction:VD,applyTransactionAsync:zD,flushAsyncTransactions:WD,getBestCostNodeSelection:_D},dependantModules:[ov,ED]},qD={version:ld,moduleName:"@ag-grid-community/client-side-row-model",dependantModules:[ov,QD]},XD=class extends P{setBeans(e){this.beans=e}getFileName(e){const t=this.getDefaultFileExtension();return(e==null||!e.length)&&(e=this.getDefaultFileName()),e.indexOf(".")===-1?`${e}.${t}`:e}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},ZD=class{constructor(e){this.groupColumns=[];const{columnModel:t,funcColsService:i,columnNameService:s,valueService:r,gos:o,processCellCallback:n,processHeaderCallback:l,processGroupHeaderCallback:a,processRowGroupCallback:c}=e;this.columnModel=t,this.funcColsService=i,this.columnNameService=s,this.valueService=r,this.gos=o,this.processCellCallback=n,this.processHeaderCallback=l,this.processGroupHeaderCallback=a,this.processRowGroupCallback=c}prepare(e){this.groupColumns=e.filter(t=>!!t.getColDef().showRowGroup)}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,i,s,r){const n=(!this.gos.get("groupHideOpenParents")||r.footer)&&this.shouldRenderGroupSummaryCell(r,e,t)?this.createValueForGroupNode(e,r):this.valueService.getValue(e,r);return this.processCell({accumulatedRowIndex:i,rowNode:r,column:e,value:n,processCellCallback:this.processCellCallback,type:s})}shouldRenderGroupSummaryCell(e,t,i){var n;if(!(e&&e.group))return!1;if(this.groupColumns.indexOf(t)!==-1){const l=(n=e.groupData)==null?void 0:n[t.getId()],a=this.gos.get("suppressGroupMaintainValueType");if(a&&l!=null||!a&&l!==void 0||Xt(this.gos)&&e.group)return!0;if(e.footer&&e.level===-1){const c=t.getColDef();return c==null||c.showRowGroup===!0||c.showRowGroup===this.funcColsService.getRowGroupColumns()[0].getId()}}const o=Rl(this.gos,this.columnModel.isPivotMode());return i===0&&o}getHeaderName(e,t){return e?e(this.gos.addGridCommonParams({column:t})):this.columnNameService.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(this.gos.addGridCommonParams({column:e,node:t}));const i=this.gos.get("treeData"),s=this.gos.get("suppressGroupMaintainValueType"),r=a=>{var u;if(i||s)return a.key;const c=(u=a.groupData)==null?void 0:u[e.getId()];return!c||!a.rowGroupColumn||a.rowGroupColumn.getColDef().useValueFormatterForExport===!1?c:this.valueService.formatValue(a.rowGroupColumn,a,c)??c},o=t.footer,n=[r(t)];if(!Cf(this.gos))for(;t.parent;)t=t.parent,n.push(r(t));const l=n.reverse().join(" -> ");return o?`Total ${l}`:l}processCell(e){const{accumulatedRowIndex:t,rowNode:i,column:s,value:r,processCellCallback:o,type:n}=e;return o?{value:o(this.gos.addGridCommonParams({accumulatedRowIndex:t,column:s,node:i,value:r,type:n,parseValue:l=>this.valueService.parseValue(s,i,l,this.valueService.getValue(s,i)),formatValue:l=>this.valueService.formatValue(s,i,l)??l}))??""}:s.getColDef().useValueFormatterForExport!==!1?{value:r??"",valueFormatted:this.valueService.formatValue(s,i,r)}:{value:r??""}}},JD=class{static download(e,t){const i=document.defaultView||window;if(!i){D("There is no `window` associated with the current `document`");return}const s=document.createElement("a"),r=i.URL.createObjectURL(t);s.setAttribute("href",r),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),document.body.removeChild(s),i.setTimeout(()=>{i.URL.revokeObjectURL(r)},0)}},Xh=`\r
`,eM=class extends ZD{constructor(e){super(e),this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,Xh),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((i,s)=>{s!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(i.data.value||""),i.mergeAcross&&this.appendEmptyCells(i.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,i,s){i!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(s)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){t!=0&&(this.result+=this.columnSeparator);const s=this.extractRowCellValue(e,t,t,"csv",i);this.result+=this.putInQuotes(s.valueFormatted??s.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(D("unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=Xh),this.isFirstLine=!1}},tM=class extends XD{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.valueService=e.valueService,this.gridSerializer=e.gridSerializer}postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){D("Export cancelled. Export is not allowed as per your configuration.");return}const t=this.getMergedParams(e),i=this.getData(t),s=new Blob(["\uFEFF",i],{type:"text/plain"}),r=typeof t.fileName=="function"?t.fileName(this.gos.getGridCommonParams()):t.fileName;JD.download(this.getFileName(r),s)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{columnModel:t,columnNameService:i,funcColsService:s,valueService:r,gos:o}=this,{processCellCallback:n,processHeaderCallback:l,processGroupHeaderCallback:a,processRowGroupCallback:c,suppressQuotes:u,columnSeparator:d}=e;return new eM({columnModel:t,columnNameService:i,funcColsService:s,valueService:r,gos:o,processCellCallback:n||void 0,processHeaderCallback:l||void 0,processGroupHeaderCallback:a||void 0,processRowGroupCallback:c||void 0,suppressQuotes:u||!1,columnSeparator:d||","})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function iM(e,t){var i;return(i=e.csvCreator)==null?void 0:i.getDataAsCsv(t)}function sM(e,t){var i;(i=e.csvCreator)==null||i.exportDataAsCsv(t)}var rM=class extends P{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleColsService=e.visibleColsService,this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel,this.selectionService=e.selectionService,this.rowNodeSorter=e.rowNodeSorter,this.sortController=e.sortController}serialize(e,t={}){const{allColumns:i,columnKeys:s,skipRowGroups:r}=t,o=this.getColumnsToExport(i,r,s);return Iw(this.prepareSession(o),this.prependContent(t),this.exportColumnGroups(t,o),this.exportHeaders(t,o),this.processPinnedTopRows(t,o),this.processRows(t,o),this.processPinnedBottomRows(t,o),this.appendContent(t))(e).parse()}processRow(e,t,i,s){var f;const r=t.shouldRowBeSkipped||(()=>!1),o=this.gos.get("groupRemoveSingleChildren"),n=this.gos.get("groupRemoveLowestSingleChildren"),a=t.rowPositions!=null||!!t.onlySelected,c=this.gos.get("groupHideOpenParents")&&!a,u=this.columnModel.isPivotMode()?s.leafGroup:!s.group,d=!!s.footer,h=n&&s.leafGroup,g=s.allChildrenCount===1&&((f=s.childrenAfterGroup)==null?void 0:f.length)===1&&(o||h);if(!u&&!d&&(t.skipRowGroups||g||c)||t.onlySelected&&!s.isSelected()||t.skipPinnedTop&&s.rowPinned==="top"||t.skipPinnedBottom&&s.rowPinned==="bottom"||s.level===-1&&!u&&!d||r(this.gos.addGridCommonParams({node:s})))return;const S=e.onNewBodyRow(s);if(i.forEach((p,m)=>{S.onColumn(p,m,s)}),t.getCustomContentBelowRow){const p=t.getCustomContentBelowRow(this.gos.addGridCommonParams({node:s}));p&&e.addCustomContent(p)}}appendContent(e){return t=>{const i=e.appendContent;return i&&t.addCustomContent(i),t}}prependContent(e){return t=>{const i=e.prependContent;return i&&t.addCustomContent(i),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return i=>{if(!e.skipColumnGroupHeaders){const s=new Tf,r=this.visibleColsService.createGroups({columns:t,idCreator:s,pinned:null,isStandaloneStructure:!0});this.recursivelyAddHeaderGroups(r,i,e.processGroupHeaderCallback)}return i}}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){const s=i.onNewHeaderRow();t.forEach((r,o)=>{s.onColumn(r,o,void 0)})}return i}}processPinnedTopRows(e,t){return i=>{const s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(r=>r.rowPinned==="top").sort((r,o)=>r.rowIndex-o.rowIndex).map(r=>this.pinnedRowModel.getPinnedTopRow(r.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedRow("top",s),i}}processRows(e,t){return i=>{const s=this.rowModel,r=ae(this.gos),o=Xt(this.gos),n=!r&&e.onlySelected,l=this.processRow.bind(this,i,e,t),{exportedRows:a="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(c=>c.rowPinned==null).sort((c,u)=>c.rowIndex-u.rowIndex).map(c=>s.getRow(c.rowIndex)).forEach(l);else if(this.columnModel.isPivotMode())r?s.forEachPivotNode(l,!0):o?s.forEachNodeAfterFilterAndSort(l,!0):s.forEachNode(l);else if(e.onlySelectedAllPages||n){const c=this.selectionService.getSelectedNodes();this.replicateSortedOrder(c),c.forEach(l)}else a==="all"?s.forEachNode(l):r||o?s.forEachNodeAfterFilterAndSort(l,!0):s.forEachNode(l);return i}}replicateSortedOrder(e){const t=this.sortController.getSortOptions(),i=(s,r)=>{var o,n;return s.rowIndex!=null&&r.rowIndex!=null?s.rowIndex-r.rowIndex:s.level===r.level?((o=s.parent)==null?void 0:o.id)===((n=r.parent)==null?void 0:n.id)?this.rowNodeSorter.compareRowNodes(t,{rowNode:s,currentPos:s.rowIndex??-1},{rowNode:r,currentPos:r.rowIndex??-1}):i(s.parent,r.parent):s.level>r.level?i(s.parent,r):i(s,r.parent)};e.sort(i)}processPinnedBottomRows(e,t){return i=>{const s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(r=>r.rowPinned==="bottom").sort((r,o)=>r.rowIndex-o.rowIndex).map(r=>this.pinnedRowModel.getPinnedBottomRow(r.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedRow("bottom",s),i}}getColumnsToExport(e=!1,t=!1,i){const s=this.columnModel.isPivotMode();if(i&&i.length)return this.columnModel.getColsForKeys(i);const r=this.gos.get("treeData");let o=[];return e&&!s?o=this.columnModel.getCols():o=this.visibleColsService.getAllCols(),t&&!r&&(o=o.filter(n=>!Sc(n)&&!cr(n))),o}recursivelyAddHeaderGroups(e,t,i){const s=[];e.forEach(r=>{const o=r;o.getChildren&&o.getChildren().forEach(n=>s.push(n))}),e.length>0&&be(e[0])&&this.doAddHeaderHeader(t,e,i),s&&s.length>0&&this.recursivelyAddHeaderGroups(s,t,i)}doAddHeaderHeader(e,t,i){const s=e.onNewHeaderGroupingRow();let r=0;t.forEach(o=>{const n=o;let l;i?l=i(this.gos.addGridCommonParams({columnGroup:n})):l=this.columnNameService.getDisplayNameForColumnGroup(n,"header");const a=n.getLeafColumns().reduce((c,u,d,h)=>{let g=j(c);return u.getColumnGroupShow()==="open"?(!g||g[1]!=null)&&(g=[d],c.push(g)):g&&g[1]==null&&(g[1]=d-1),d===h.length-1&&g&&g[1]==null&&(g[1]=d),c},[]);s.onColumn(n,l||"",r++,n.getLeafColumns().length-1,a)})}},ad="32.3.9",nv={version:ad,moduleName:"@ag-grid-community/csv-export-core",beans:[tM,rM]},oM={version:ad,moduleName:"@ag-grid-community/csv-export-api",apiFunctions:{getDataAsCsv:iM,exportDataAsCsv:sM},dependantModules:[nv]},nM={version:ad,moduleName:"@ag-grid-community/csv-export",dependantModules:[nv,oM]},lM=class extends ux{wireBeans(e){this.beans=e}constructor(e,t,i){super(e),this.parentCache=t,this.params=i,this.startRow=e*i.blockSize,this.endRow=this.startRow+i.blockSize}postConstruct(){this.createRowNodes()}getBlockStateJson(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}}setDataAndId(e,t,i){M(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(K(this.params.datasource.getRows)){D("datasource is missing getRows method");return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}processServerFail(){}createLoadParams(){return{startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),sortModel:this.params.sortModel,filterModel:this.params.filterModel,context:this.gos.getGridCommonParams().context}}forEachNode(e,t,i){this.rowNodes.forEach((s,r)=>{this.startRow+r<i&&e(s,t.next())})}getLastAccessed(){return this.lastAccessed}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.next());const i=e-this.startRow;return this.rowNodes[i]}getStartRow(){return this.startRow}getEndRow(){return this.endRow}createRowNodes(){this.rowNodes=[];for(let e=0;e<this.params.blockSize;e++){const t=this.startRow+e,i=new ai(this.beans);i.setRowHeight(this.params.rowHeight),i.uiLevel=0,i.setRowIndex(t),i.setRowTop(this.params.rowHeight*t),this.rowNodes.push(i)}}processServerResult(e){this.rowNodes.forEach((i,s)=>{const r=e.rowData?e.rowData[s]:void 0;!i.id&&i.alreadyRendered&&r&&(this.rowNodes[s]=new ai(this.beans),this.rowNodes[s].setRowIndex(i.rowIndex),this.rowNodes[s].setRowTop(i.rowTop),this.rowNodes[s].setRowHeight(i.rowHeight),i.clearRowTopAndRowIndex()),this.setDataAndId(this.rowNodes[s],r,this.startRow+s)});const t=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,t)}destroy(){this.rowNodes.forEach(e=>{e.clearRowTopAndRowIndex()}),super.destroy()}},aM=2,cM=class extends P{constructor(e){super(),this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount,this.params=e}wireBeans(e){this.rowRenderer=e.rowRenderer,this.focusService=e.focusService}getRow(e,t=!1){const i=Math.floor(e/this.params.blockSize);let s=this.blocks[i];if(!s){if(t)return;s=this.createBlock(i)}return s.getRow(e)}createBlock(e){const t=this.createBean(new lM(e,this,this.params));return this.blocks[t.getId()]=t,this.blockCount++,this.purgeBlocksIfNeeded(t),this.params.rowNodeBlockLoader.addBlock(t),t}refreshCache(){if(this.blockCount==0){this.purgeCache();return}this.getBlocksInOrder().forEach(t=>t.setStateWaitingToLoad()),this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){this.getBlocksInOrder().forEach(e=>this.destroyBlock(e)),super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(this.gos.get("debug")&&Lt(`InfiniteCache - onPageLoaded: page = ${e.getId()}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(n=>n!=e),i=(n,l)=>l.getLastAccessed()-n.getLastAccessed();t.sort(i);const s=this.params.maxBlocksInCache>0,r=s?this.params.maxBlocksInCache-1:null,o=aM-1;t.forEach((n,l)=>{const a=n.getState()==="needsLoading"&&l>=o,c=s?l>=r:!1;if(a||c){if(this.isBlockCurrentlyDisplayed(n)||this.isBlockFocused(n))return;this.removeBlockFromCache(n)}})}isBlockFocused(e){const t=this.focusService.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const i=e.getStartRow(),s=e.getEndRow();return t.rowIndex>=i&&t.rowIndex<s}isBlockCurrentlyDisplayed(e){const t=e.getStartRow(),i=e.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(t,i)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const s=(e.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<s&&(this.rowCount=s)}}setRowCount(e,t){this.rowCount=e,M(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t=new dr;this.getBlocksInOrder().forEach(i=>i.forEachNode(e,t,this.rowCount))}getBlocksInOrder(){const e=(i,s)=>i.getId()-s.getId();return bc(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.getId()],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventService.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];this.getBlocksInOrder().forEach(t=>{t.getId()*this.params.blockSize>=this.rowCount&&e.push(t)}),e.length>0&&e.forEach(t=>this.destroyBlock(t))}purgeCache(){this.getBlocksInOrder().forEach(e=>this.removeBlockFromCache(e)),this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const i=[];let s=-1,r=!1;const o=new dr;let n=!1;return this.getBlocksInOrder().forEach(a=>{if(!n){if(r&&s+1!==a.getId()){n=!0;return}s=a.getId(),a.forEachNode(c=>{const u=c===e||c===t;(r||u)&&i.push(c),u&&(r=!r)},o,this.rowCount)}}),n||r?[]:i}},uM=class extends P{constructor(){super(...arguments),this.beanName="rowModel"}wireBeans(e){this.filterManager=e.filterManager,this.sortController=e.sortController,this.selectionService=e.selectionService,this.rowRenderer=e.rowRenderer,this.rowNodeBlockLoader=e.rowNodeBlockLoader}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){this.gos.get("rowModelType")==="infinite"&&(this.rowHeight=us(this.gos),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache()),this.verifyProps())}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&D("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy()}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.onCacheUpdated.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=us(this.gos),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onFilterChanged(){this.reset()}onSortChanged(){this.reset()}onColumnEverything(){let e;this.cacheParams?e=this.isSortModelDifferent():e=!0,e&&this.reset()}isSortModelDifferent(){return!wo(this.cacheParams.sortModel,this.sortController.getSortModel())}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]}reset(){if(!this.datasource)return;fr(this.gos)!=null||this.selectionService.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventService.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){var e;this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:((e=this.filterManager)==null?void 0:e.getFilterModel())??{},sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gos.get("infiniteInitialRowCount"),maxBlocksInCache:this.gos.get("maxBlocksInCache"),rowHeight:us(this.gos),overflowSize:this.gos.get("cacheOverflowSize"),blockSize:this.gos.get("cacheBlockSize"),lastAccessedSequence:new dr},this.infiniteCache=this.createBean(new cM(this.cacheParams)),this.eventService.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))}onCacheUpdated(){this.dispatchModelUpdatedEvent()}getRow(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}forEachNode(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache&&this.infiniteCache.refreshCache()}purgeCache(){this.infiniteCache&&this.infiniteCache.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?this.infiniteCache.isLastRowIndexKnown():!1}setRowCount(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t)}};function dM(e){var t,i;(i=(t=e.rowModelHelperService)==null?void 0:t.getInfiniteRowModel())==null||i.refreshCache()}function hM(e){var t,i;(i=(t=e.rowModelHelperService)==null?void 0:t.getInfiniteRowModel())==null||i.purgeCache()}function gM(e){var t,i;return(i=(t=e.rowModelHelperService)==null?void 0:t.getInfiniteRowModel())==null?void 0:i.getRowCount()}var cd="32.3.9",lv={version:cd,moduleName:"@ag-grid-community/infinite-row-model-core",rowModel:"infinite",beans:[uM],dependantModules:[hx]},pM={version:cd,moduleName:"@ag-grid-community/infinite-row-model-api",beans:[rv],apiFunctions:{refreshInfiniteCache:dM,purgeInfiniteCache:hM,getInfiniteRowCount:gM},dependantModules:[lv,DD]},fM={version:cd,moduleName:"@ag-grid-community/infinite-row-model",dependantModules:[lv,pM]},av=(e,t)=>new cv(e.feature,t,e.defaults,e.css),mM=0,Oo=(e,t=`customPart${++mM}`)=>new cv(e,t),cv=class Gc{constructor(t,i,s={},r=[]){this.feature=t,this.variant=i,this.defaults=s,this.css=r}get id(){return this.feature?`${this.feature}/${this.variant}`:this.variant}withParams(t){const i={...this.defaults};for(const[s,r]of Object.entries(t))r!=null&&(i[s]=r);return new Gc(this.feature,this.variant,i,this.css)}withAdditionalParams(t){return this.withParams(t)}withCSS(t){return new Gc(this.feature,this.variant,this.defaults,this.css.concat(t))}},Zh=`:where([class^=ag-]){box-sizing:border-box;outline:none;&:after,&:before,&:focus,&:focus-within{box-sizing:border-box;outline:none}&:where(button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;padding:0}&:where(button){font-weight:inherit}&::-ms-clear{display:none}}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-virtual-list-viewport .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-watermark{bottom:20px;color:#9b9b9b;opacity:.7;position:absolute;right:25px;transition:opacity 1s ease-out 3s;&:before{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDkiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyMDkgMzYiPjxwYXRoIGZpbGw9IiM5QjlCOUIiIGQ9Ik0xOTIuOTkzIDIzLjY1OHYtNy45NDZoLTEzLjU0MWwtNy45NDcgNy45NDZ6TTIwOC4yNSAzLjk1aC0xNi45NzRsLTguMDEgNy45NDdoMjQuOTg0ek0xNjMuNjIyIDMxLjYwNWw0LjA2OS00LjA2OWgxMy43MzJ2Ny45NDdoLTE3LjgwMXoiLz48cGF0aCBmaWxsPSIjOUI5QjlCIiBkPSJNMTY2LjYxIDE5Ljc4aDguNzczbDguMDEtNy45NDZIMTY2LjYxek0xNTcuMDExIDMxLjYwNWg2LjYxMWw3Ljg4My03Ljk0N2gtMTQuNDk0ek0xOTEuMjc2IDMuOTVsLTQuMDY4IDQuMDdIMTYxLjI3Vi4wNzJoMzAuMDA2ek0yMC44NCAzMC4yMDZIOC4zNzhsLTIuMTYyIDUuMzRILjc1TDEyLjI1NyA4LjU5Mmg0Ljc2OEwyOC41MyAzNS41NDZoLTUuNTN6bS0xLjcxNy00LjI2TDE0LjYwOSAxNC45NWwtNC41MTQgMTAuOTk4ek0xMDQuNDM3IDE4LjUwOWMxLjU4OS0yLjM1MiA1LjU5NC0yLjYwNyA3LjI0Ny0yLjYwN3Y0LjU3OGMtMi4wMzQgMC00LjA2OS4wNjMtNS4yNzcuOTUzLTEuMjA3Ljg5LTEuODQzIDIuMDk4LTEuODQzIDMuNTZ2MTAuNTUzaC00Ljk1OVYxNS45MDJoNC43Njh6TTExOS4zNzYgMTUuOTAyaC00Ljk1OHYxOS42NDRoNC45NTh6TTExOS4zNzYgNy4xM2gtNC45NTh2NS44NDhoNC45NTh6TTE0My45NzkgNy4xM3YyOC40MTZoLTQuNzY4bC0uMTI3LTIuOTg4YTguMyA4LjMgMCAwIDEtMi42NyAyLjQ4Yy0xLjA4MS41NzItMi40MTYuODktMy45NDIuODktMS4zMzUgMC0yLjYwNi0uMjU1LTMuNjg3LS43LTEuMTQ0LS41MDgtMi4xNjItMS4xNDQtMi45ODgtMi4wMzRhOS42IDkuNiAwIDAgMS0xLjk3MS0zLjE3OWMtLjUwOC0xLjIwNy0uNjk5LTIuNjA2LS42OTktNC4xMzJzLjI1NC0yLjkyNC42OTktNC4xOTZjLjUwOS0xLjI3MSAxLjE0NS0yLjM1MiAxLjk3MS0zLjI0MnMxLjg0NC0xLjU4OSAyLjk4OC0yLjA5OCAyLjM1Mi0uNzYzIDMuNjg3LS43NjNjMS41MjYgMCAyLjc5Ny4yNTUgMy44NzguODI3czEuOTcxIDEuMzM1IDIuNjcgMi40MTZWNy4xOTNoNC45NTl6bS0xMC40MjYgMjQuNTM4YzEuNjUzIDAgMi45MjQtLjU3MiAzLjk0MS0xLjY1M3MxLjUyNi0yLjU0MyAxLjUyNi00LjMyMy0uNTA5LTMuMTc4LTEuNTI2LTQuMzIyYy0xLjAxNy0xLjA4MS0yLjI4OC0xLjY1My0zLjk0MS0xLjY1My0xLjU5IDAtMi45MjUuNTcyLTMuODc4IDEuNjUzLTEuMDE3IDEuMDgtMS41MjYgMi41NDMtMS41MjYgNC4zMjIgMCAxLjc4LjUwOSAzLjE4IDEuNTI2IDQuMjYgMS4wMTcgMS4xNDQgMi4yODggMS43MTYgMy44NzggMS43MTZNNTcuMjAyIDIwLjM1M0g0NC45MzN2NC4yNTloNi45OTNjLS4xOSAyLjE2MS0xLjAxNyAzLjgxNC0yLjQxNiA1LjE1LTEuMzk4IDEuMjctMy4xNzggMS45MDYtNS40NjcgMS45MDYtMS4yNzEgMC0yLjQ4LS4yNTQtMy40OTYtLjY5OWE3IDcgMCAwIDEtMi43MzQtMS45N2MtLjc2My0uODI3LTEuMzM1LTEuODQ0LTEuNzgtMy4wNTJzLS42MzYtMi40OC0uNjM2LTMuOTQyLjE5LTIuNzMzLjYzNi0zLjk0MWMuMzgxLTEuMjA4IDEuMDE3LTIuMTYyIDEuNzgtMy4wNTIuNzYzLS44MjYgMS42NTMtMS40NjIgMi43MzMtMS45N2E5LjEgOS4xIDAgMCAxIDMuNTYtLjdxNC4wMDUgMCA2LjEwMyAxLjkwN2wzLjMwNi0zLjMwNWMtMi40OC0xLjkwNy01LjY1OC0yLjkyNS05LjQwOS0yLjkyNS0yLjA5NyAwLTQuMDA0LjMxOC01LjcyMSAxLjAxOC0xLjcxNi42OTktMy4xNzkgMS41ODktNC4zODYgMi43OTdBMTIuMSAxMi4xIDAgMCAwIDMxLjIgMTYuMjJjLS42MzUgMS43MTctLjk1MyAzLjYyNC0uOTUzIDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1NyAxLjAxNyAyLjAzNSAwIDMuODc4LS4zMTggNS41MzEtMS4wMTcgMS42NTMtLjcgMy4wNTItMS41OSA0LjE5Ni0yLjc5N3ExLjcxNi0xLjgxMiAyLjY3LTQuMzg3Yy42MzYtMS43MTYuOTU0LTMuNjIzLjk1NC01LjY1OHYtLjgyNmMtLjE5MS0uMTI3LS4yNTUtLjQ0NS0uMjU1LS43TTk1Ljk4MiAyMC4zNTNoLTEyLjI3djQuMjU5aDYuOTkzYy0uMTkgMi4xNjEtMS4wMTcgMy44MTQtMi40MTYgNS4xNS0xLjM5OCAxLjI3LTMuMTc4IDEuOTA2LTUuNDY3IDEuOTA2LTEuMjcxIDAtMi40OC0uMjU0LTMuNDk2LS42OTlhNyA3IDAgMCAxLTIuNzM0LTEuOTdjLS43NjMtLjgyNy0xLjMzNS0xLjg0NC0xLjc4LTMuMDUycy0uNjM2LTIuNDgtLjYzNi0zLjk0Mi4xOS0yLjczMy42MzYtMy45NDFjLjM4MS0xLjIwOCAxLjAxNy0yLjE2MiAxLjc4LTMuMDUyLjc2My0uODI2IDEuNjUzLTEuNDYyIDIuNzM0LTEuOTdhOS4xIDkuMSAwIDAgMSAzLjU2LS43cTQuMDA1IDAgNi4xMDMgMS45MDdsMy4zMDUtMy4zMDVjLTIuNDc5LTEuOTA3LTUuNjU4LTIuOTI1LTkuNDA4LTIuOTI1LTIuMDk4IDAtNC4wMDUuMzE4LTUuNzIyIDEuMDE4LTEuNzE2LjY5OS0zLjE3OCAxLjU4OS00LjM4NiAyLjc5N2ExMi4xIDEyLjEgMCAwIDAtMi43OTcgNC4zODZjLS42MzYgMS43MTctLjk1NCAzLjYyNC0uOTU0IDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1OCAxLjAxNyAyLjAzNCAwIDMuODc4LS4zMTggNS41My0xLjAxNyAxLjY1My0uNyAzLjA1Mi0xLjU5IDQuMTk2LTIuNzk3cTEuNzE4LTEuODEyIDIuNjctNC4zODdjLjYzNi0xLjcxNi45NTQtMy42MjMuOTU0LTUuNjU4di0uODI2Yy0uMTktLjEyNy0uMjU1LS40NDUtLjI1NS0uNyIvPjwvc3ZnPg==);background-repeat:no-repeat;background-size:170px 40px;content:"";display:block;height:40px;width:170px}}.ag-watermark-text{font-family:Impact,sans-serif;font-size:19px;font-weight:700;opacity:.5}.ag-ltr .ag-watermark-text{padding-left:.7rem}.ag-rtl .ag-watermark-text{padding-right:.7rem}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&.ag-layout-normal{overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}.ag-ltr .ag-floating-bottom-full-width-container,.ag-ltr .ag-floating-top-full-width-container,.ag-ltr .ag-full-width-container,.ag-ltr .ag-sticky-bottom-full-width-container,.ag-ltr .ag-sticky-top-full-width-container{left:0}.ag-rtl .ag-floating-bottom-full-width-container,.ag-rtl .ag-floating-top-full-width-container,.ag-rtl .ag-full-width-container,.ag-rtl .ag-sticky-bottom-full-width-container,.ag-rtl .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&.ag-scrollbar-invisible{bottom:0;position:absolute;&.ag-apple-scrollbar{opacity:0;transition:opacity .4s;visibility:hidden;&.ag-scrollbar-active,&.ag-scrollbar-scrolling{opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&.ag-scrollbar-invisible{left:0;right:0}}.ag-body-vertical-scroll{height:100%;&.ag-scrollbar-invisible{top:0;z-index:10}}.ag-ltr .ag-body-vertical-scroll{&.ag-scrollbar-invisible{right:0}}.ag-rtl .ag-body-vertical-scroll{&.ag-scrollbar-invisible{left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&.ag-scroller-corner{overflow-x:hidden}}.ag-ltr .ag-column-moving{.ag-cell,.ag-header-cell{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}.ag-rtl .ag-column-moving{.ag-cell,.ag-header-cell{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}.ag-row-animation .ag-row{transition:transform .4s,top .4s,opacity .2s}.ag-row-animation .ag-row.ag-after-created{transition:transform .4s,top .4s,height .4s,opacity .2s}.ag-row-no-animation .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}.ag-sparkline-wrapper{height:100%;left:0;position:absolute;top:0;width:100%}.ag-full-width-row .ag-cell-wrapper.ag-row-group{align-items:center;height:100%}.ag-cell .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{border-bottom:var(--ag-pinned-row-border);display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-pinned-left-floating-top,.ag-pinned-right-floating-top{display:inline-block;min-width:0;overflow:hidden;position:relative}.ag-floating-bottom{border-top:var(--ag-pinned-row-border);display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-pinned-left-floating-bottom,.ag-pinned-right-floating-bottom{display:inline-block;min-width:0;overflow:hidden;position:relative}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-value-slide-out{opacity:1}.ag-ltr .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}.ag-rtl .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:is(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}.ag-ltr .ag-value-slide-out-end{margin-right:10px}.ag-rtl .ag-value-slide-out-end{margin-left:10px}.ag-opacity-zero{opacity:0!important}.ag-details-row{width:100%}.ag-details-row-fixed-height{height:100%}.ag-details-grid{width:100%}.ag-details-grid-fixed-height{height:100%}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}.ag-right-aligned-header{.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}.ag-pill-select{display:flex;flex-direction:column;.ag-column-drop-list{padding:0}.ag-select{padding-top:var(--ag-spacing)}.ag-picker-field-wrapper{background-color:transparent;border:0}.ag-picker-field-display{cursor:pointer}}.ag-ltr{direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}.ag-rtl{direction:rtl;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}.ag-rtl{.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}.ag-rtl{.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{overflow:hidden;visibility:hidden;width:0;& div{position:absolute}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-group-title-bar .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-direction:row;flex-wrap:wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}.ag-ltr .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}.ag-rtl .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}.ag-group-item-alignment-stretch .ag-group-item{align-items:stretch}.ag-group-item-alignment-start .ag-group-item{align-items:flex-start}.ag-group-item-alignment-end .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}.ag-rtl{text-align:right}.ag-ltr .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}.ag-rtl .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}.ag-ltr .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-rtl .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);color:var(--ag-cell-text-color);font-size:var(--ag-data-font-size);height:var(--ag-row-height);white-space:nowrap;width:100%;--ag-internal-content-line-height:min(calc(var(--ag-row-height) - 1px),var(--ag-line-height,1000px))}:where(.ag-body-vertical-content-no-gap) .ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important;display:none}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height)}.ag-ltr .ag-cell{border-right:var(--ag-column-border)}.ag-rtl .ag-cell{border-left:var(--ag-column-border)}.ag-ltr :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}.ag-rtl :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;&.ag-row-group{align-items:flex-start}>:not(.ag-cell-value):not(.ag-group-value){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}}.ag-ltr .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}.ag-rtl .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}.ag-ltr .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-rtl .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-ltr .ag-group-contracted,.ag-ltr .ag-group-expanded,.ag-ltr .ag-row-drag,.ag-ltr .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}.ag-rtl .ag-group-contracted,.ag-rtl .ag-group-expanded,.ag-rtl .ag-row-drag,.ag-rtl .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-ltr .ag-group-child-count{margin-left:3px}.ag-rtl .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}.ag-ltr .ag-row-highlight-above:after,.ag-ltr .ag-row-highlight-below:after{left:1px}.ag-rtl .ag-row-highlight-above:after,.ag-rtl .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:-1px}.ag-row-highlight-above.ag-row-first:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row-hover.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}.ag-ltr .ag-right-aligned-cell{text-align:right}.ag-rtl .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}.ag-cell:not(.ag-cell-inline-editing),.ag-full-width-row .ag-cell-wrapper.ag-row-group{-webkit-font-smoothing:subpixel-antialiased}.ag-ltr .ag-cell:not(.ag-cell-inline-editing),.ag-ltr .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-rtl .ag-cell:not(.ag-cell-inline-editing),.ag-rtl .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.5)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}.ag-ltr .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}.ag-rtl .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{align-items:center;display:flex;height:100%}.ag-ltr .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}.ag-ltr .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}.ag-rtl .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-details-row{padding:calc(var(--ag-spacing)*3.75)}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left):not(.ag-cell-range-single-cell){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right):not(.ag-cell-range-single-cell){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header,.ag-pinned-right-header{height:100%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}.ag-body-viewport:not(.ag-has-focus) .ag-cell-range-single-cell:not(.ag-cell-inline-editing),.ag-cell-range-selected:not(.ag-cell-focus){background-color:var(--ag-range-selection-background-color);&.ag-cell-range-chart{background-color:var(--ag-range-selection-chart-background-color)!important;&.ag-cell-range-chart-category{background-color:var(--ag-range-selection-chart-category-background-color)!important}}}.ag-cell-range-selected-1:not(.ag-cell-focus),.ag-root:not(.ag-context-menu-open) .ag-body-viewport:not(.ag-has-focus) .ag-cell-range-selected-1:not(.ag-cell-inline-editing){background-color:var(--ag-range-selection-background-color)}.ag-cell-range-selected-2:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell-range-selected-3:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell-range-selected-4:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell.ag-cell-range-selected:not(.ag-cell-range-single-cell){&.ag-cell-range-top{border-top-color:var(--ag-range-selection-border-color);border-top-style:var(--ag-range-selection-border-style)}&.ag-cell-range-right{border-right-color:var(--ag-range-selection-border-color);border-right-style:var(--ag-range-selection-border-style)}&.ag-cell-range-bottom{border-bottom-color:var(--ag-range-selection-border-color);border-bottom-style:var(--ag-range-selection-border-style)}&.ag-cell-range-left{border-left-color:var(--ag-range-selection-border-color);border-left-style:var(--ag-range-selection-border-style)}}.ag-ltr,.ag-rtl{.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}}.ag-cell.ag-selection-fill-top,.ag-cell.ag-selection-fill-top.ag-cell-range-selected{border-top:1px dashed;border-top-color:var(--ag-range-selection-border-color)}.ag-ltr .ag-cell.ag-selection-fill-right,.ag-ltr .ag-cell.ag-selection-fill-right.ag-cell-range-selected{border-right:1px dashed var(--ag-range-selection-border-color)!important}.ag-rtl .ag-cell.ag-selection-fill-right,.ag-rtl .ag-cell.ag-selection-fill-right.ag-cell-range-selected{border-left:1px dashed var(--ag-range-selection-border-color)!important}.ag-cell.ag-selection-fill-bottom,.ag-cell.ag-selection-fill-bottom.ag-cell-range-selected{border-bottom:1px dashed;border-bottom-color:var(--ag-range-selection-border-color)}.ag-ltr .ag-cell.ag-selection-fill-left,.ag-ltr .ag-cell.ag-selection-fill-left.ag-cell-range-selected{border-left:1px dashed var(--ag-range-selection-border-color)!important}.ag-rtl .ag-cell.ag-selection-fill-left,.ag-rtl .ag-cell.ag-selection-fill-left.ag-cell-range-selected{border-right:1px dashed var(--ag-range-selection-border-color)!important}.ag-fill-handle,.ag-range-handle{background-color:var(--ag-range-selection-border-color);bottom:-1px;height:6px;position:absolute;width:6px}.ag-ltr .ag-fill-handle,.ag-ltr .ag-range-handle{right:-1px}.ag-rtl .ag-fill-handle,.ag-rtl .ag-range-handle{left:-1px}.ag-fill-handle{cursor:cell}.ag-ltr .ag-range-handle{cursor:nwse-resize}.ag-rtl .ag-range-handle{cursor:nesw-resize}.ag-cell-inline-editing{border:var(--ag-input-focus-border)!important}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input{flex:1 1 auto}.ag-floating-filter-input .ag-input-field-input[type=date]{width:1px}.ag-input-field-input{min-width:0;width:100%}.ag-column-select-header-filter-wrapper,.ag-filter-filter,.ag-filter-toolpanel-search,.ag-mini-filter{.ag-input-wrapper:before{background-color:currentColor;content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:50%;position:absolute;width:12px}}.ag-ltr .ag-column-select-header-filter-wrapper,.ag-ltr .ag-filter-filter,.ag-ltr .ag-filter-toolpanel-search,.ag-ltr .ag-mini-filter{.ag-input-wrapper:before{margin-left:var(--ag-spacing)}& input.ag-number-field-input,& input.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}.ag-rtl .ag-column-select-header-filter-wrapper,.ag-rtl .ag-filter-filter,.ag-rtl .ag-filter-toolpanel-search,.ag-rtl .ag-mini-filter{.ag-input-wrapper:before{margin-right:var(--ag-spacing)}& input.ag-number-field-input,& input.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}.ag-advanced-filter-header{align-items:center;background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);display:flex;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);position:relative}.ag-advanced-filter{align-items:center;display:flex;width:100%}.ag-advanced-filter-apply-button,.ag-advanced-filter-builder-button{line-height:normal;white-space:nowrap}.ag-ltr .ag-advanced-filter-apply-button,.ag-ltr .ag-advanced-filter-builder-button{margin-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-advanced-filter-apply-button,.ag-rtl .ag-advanced-filter-builder-button{margin-right:calc(var(--ag-spacing)*2)}.ag-advanced-filter-builder-button{align-items:center;background-color:unset;border:0;display:flex;font-size:var(--ag-font-size);font-weight:600;padding:var(--ag-spacing);&:hover:not(:disabled){background-color:var(--ag-row-hover-color)}&:not(:disabled){cursor:pointer}}.ag-ltr .ag-advanced-filter-builder-button-label{margin-left:var(--ag-spacing)}.ag-rtl .ag-advanced-filter-builder-button-label{margin-right:var(--ag-spacing)}.ag-advanced-filter-builder{display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.ag-advanced-filter-builder-list{flex:1;overflow:auto}.ag-advanced-filter-builder-button-panel{border-top:var(--ag-advanced-filter-builder-button-bar-border);display:flex;justify-content:flex-end;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-ltr .ag-advanced-filter-builder .ag-advanced-filter-builder-button-panel{.ag-advanced-filter-builder-apply-button,.ag-advanced-filter-builder-cancel-button{margin-left:calc(var(--ag-spacing)*2)}}.ag-rtl .ag-advanced-filter-builder .ag-advanced-filter-builder-button-panel{.ag-advanced-filter-builder-apply-button,.ag-advanced-filter-builder-cancel-button{margin-right:calc(var(--ag-spacing)*2)}}.ag-advanced-filter-builder-item-wrapper{align-items:center;display:flex;flex:1 1 auto;justify-content:space-between;overflow:hidden}.ag-ltr .ag-advanced-filter-builder-item-wrapper{padding-left:calc(var(--ag-icon-size)/2);padding-right:var(--ag-icon-size)}.ag-rtl .ag-advanced-filter-builder-item-wrapper{padding-left:var(--ag-icon-size);padding-right:calc(var(--ag-icon-size)/2)}.ag-virtual-list-viewport .ag-advanced-filter-builder-item-wrapper .ag-tab-guard{position:absolute}.ag-advanced-filter-builder-item-tree-lines>*{width:var(--ag-advanced-filter-builder-indent-size)}.ag-advanced-filter-builder-item-tree-lines .ag-advanced-filter-builder-item-tree-line-root{width:var(--ag-icon-size);&:before{height:50%;top:50%}}.ag-advanced-filter-builder-item-tree-line-horizontal,.ag-advanced-filter-builder-item-tree-line-vertical,.ag-advanced-filter-builder-item-tree-line-vertical-bottom,.ag-advanced-filter-builder-item-tree-line-vertical-top{align-items:center;display:flex;height:100%;position:relative;&:after,&:before{content:"";height:100%;position:absolute}}.ag-advanced-filter-builder-item-tree-line-horizontal:after{border-bottom:1px solid var(--ag-border-color);height:50%;top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size))}.ag-ltr .ag-advanced-filter-builder-item-tree-line-horizontal:after{left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-horizontal:after{right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical:before{top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical-top:before{height:50%;top:0;width:calc(var(--ag-advanced-filter-builder-indent-size) - var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical-top:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical-top:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{height:calc(50% - var(--ag-icon-size)*1.5/2);top:calc(50% + var(--ag-icon-size)*1.5/2);width:calc(var(--ag-icon-size)/2)}.ag-ltr .ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{border-left:1px solid var(--ag-border-color);left:calc(var(--ag-icon-size)/2)}.ag-rtl .ag-advanced-filter-builder-item-tree-line-vertical-bottom:before{border-right:1px solid var(--ag-border-color);right:calc(var(--ag-icon-size)/2)}.ag-advanced-filter-builder-item-condition{padding-bottom:var(--ag-spacing);padding-top:var(--ag-spacing)}.ag-advanced-filter-builder-item,.ag-advanced-filter-builder-item-buttons,.ag-advanced-filter-builder-item-condition,.ag-advanced-filter-builder-item-tree-lines,.ag-advanced-filter-builder-pill,.ag-advanced-filter-builder-pill-wrapper{align-items:center;display:flex;height:100%}.ag-advanced-filter-builder-pill-wrapper{margin:0 var(--ag-spacing)}.ag-advanced-filter-builder-pill{border-radius:var(--ag-border-radius);min-height:calc(100% - var(--ag-spacing)*3);min-width:calc(var(--ag-spacing)*2);padding:var(--ag-spacing) calc(var(--ag-spacing)*2);position:relative;.ag-advanced-filter-builder-value-number{font-family:monospace;font-weight:700}.ag-advanced-filter-builder-value-empty{color:var(--ag-subtle-text-color)}}.ag-ltr .ag-advanced-filter-builder-pill{.ag-picker-field-display{margin-right:var(--ag-spacing)}}.ag-rtl .ag-advanced-filter-builder-pill{.ag-picker-field-display{margin-left:var(--ag-spacing)}}.ag-advanced-filter-builder-item-button,.ag-advanced-filter-builder-pill{&:focus-visible{shadow:var(--ag-focus-shadow)}}.ag-advanced-filter-builder-pill-display{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-advanced-filter-builder-join-pill{background-color:var(--ag-advanced-filter-builder-join-pill-color);cursor:pointer}.ag-advanced-filter-builder-column-pill{background-color:var(--ag-advanced-filter-builder-column-pill-color);cursor:pointer}.ag-advanced-filter-builder-option-pill{background-color:var(--ag-advanced-filter-builder-option-pill-color);cursor:pointer}.ag-advanced-filter-builder-value-pill{background-color:var(--ag-advanced-filter-builder-value-pill-color);cursor:text;max-width:140px;.ag-advanced-filter-builder-pill-display{display:block}}.ag-advanced-filter-builder-item-buttons>*{margin:0 calc(var(--ag-spacing)*.5)}.ag-advanced-filter-builder-item-button{color:var(--ag-subtle-text-color);cursor:pointer;position:relative}.ag-advanced-filter-builder-item-button-disabled{cursor:default;opacity:.5}.ag-advanced-filter-builder-virtual-list-container{top:var(--ag-spacing)}.ag-advanced-filter-builder-virtual-list-item{cursor:default;display:flex;height:var(--ag-list-item-height);&:hover{background-color:var(--ag-row-hover-color);.ag-advanced-filter-builder-item-button{opacity:100%}}}.ag-advanced-filter-builder-validation .ag-advanced-filter-builder-invalid,.ag-advanced-filter-builder-virtual-list-item-highlight .ag-advanced-filter-builder-item-button:focus-visible{opacity:100%}.ag-advanced-filter-builder-invalid{color:var(--ag-invalid-color);cursor:default;margin:0 var(--ag-spacing)}.ag-cell-inline-editing{border-radius:var(--ag-border-radius);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-editor .ag-wrapper,.ag-cell-editor input,.ag-cell-wrapper{height:100%;line-height:normal;width:100%}}.ag-autocomplete-list-popup,.ag-popup-editor .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{height:auto;padding:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-large-text-input textarea{resize:none}.ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding)}.ag-chart{display:flex;height:100%;position:relative;width:100%}.ag-chart-components-wrapper{display:flex}.ag-chart-canvas-wrapper,.ag-chart-components-wrapper{flex:1 1 auto;position:relative}.ag-chart-menu{display:flex;flex-direction:column;position:absolute;top:16px}.ag-ltr .ag-chart-menu{right:20px}.ag-rtl .ag-chart-menu{left:20px}.ag-chart-docked-container{min-width:var(--ag-chart-menu-panel-width);position:relative}.ag-chart-menu-hidden~.ag-chart-docked-container{display:none}.ag-chart-tabbed-menu{display:flex;flex-direction:column;height:100%;overflow:hidden;width:100%}.ag-chart-tabbed-menu-header{cursor:default;flex:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-chart-tabbed-menu-body{align-items:stretch;display:flex;flex:1 1 auto;overflow:hidden}.ag-chart-tab{overflow:hidden;overflow-y:auto;width:100%}.ag-chart-settings{overflow-x:hidden}.ag-chart-settings-wrapper{display:flex;flex-direction:column;height:100%;overflow:hidden;position:relative;width:100%}.ag-chart-settings-nav-bar{align-items:center;display:flex;height:30px;padding:0 10px;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.ag-chart-settings-card-selector{align-items:center;display:flex;flex:1 1 auto;height:100%;justify-content:space-around;padding:0 10px}.ag-chart-settings-card-item{background-color:var(--ag-foreground-color);border-radius:4px;cursor:pointer;height:10px;height:8px;position:relative;width:10px;width:8px;&.ag-not-selected{opacity:.2}&:before{background-color:transparent;content:" ";display:block;height:20px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:50%;width:20px}&.ag-selected{background-color:var(--ag-accent-color)}}.ag-chart-settings-next,.ag-chart-settings-prev{flex:none;position:relative;&:focus-within{border-radius:1px;box-shadow:var(--ag-focus-shadow)}}.ag-chart-settings-next-button,.ag-chart-settings-prev-button{cursor:pointer;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}.ag-chart-settings-mini-charts-container{flex:1 1 auto;overflow-x:hidden;overflow-y:auto;position:relative}.ag-chart-settings-mini-wrapper{display:flex;flex-direction:column;left:0;min-height:100%;overflow:hidden;position:absolute;top:0;width:100%;&.ag-animating{transition:left .3s;transition-timing-function:ease-in-out}}.ag-chart-mini-thumbnail{cursor:pointer}.ag-chart-mini-thumbnail-canvas{display:block}.ag-chart-advanced-settings-wrapper,.ag-chart-data-wrapper,.ag-chart-format-wrapper{display:flex;flex-direction:column;padding-bottom:16px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-chart-advanced-settings-wrapper,.ag-chart-data-wrapper{height:100%;overflow-y:auto}.ag-chart-advanced-settings{background-color:var(--ag-chrome-background-color)}.ag-chart-advanced-settings,.ag-chart-advanced-settings-wrapper{width:100%}.ag-chart-advanced-settings-wrapper{padding-bottom:0}.ag-chart-advanced-settings-section,.ag-chart-data-section,.ag-chart-format-section{display:flex;margin:0}.ag-chart-advanced-settings-section{border-bottom:1px solid var(--ag-border-color)}.ag-chart-empty-text{align-items:center;background-color:var(--ag-background-color);display:flex;height:100%;justify-content:center;top:0;width:100%}.ag-chart .ag-chart-menu{display:none}.ag-chart-menu-hidden:hover .ag-chart-menu{display:block}.ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{display:flex;flex-direction:row;gap:20px;top:8px;width:auto}}}.ag-ltr .ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{justify-content:right;right:calc(var(--ag-cell-horizontal-padding) + var(--ag-spacing) - 4px)}}}.ag-rtl .ag-chart{.ag-chart-menu-wrapper{.ag-chart-menu{justify-content:left;left:calc(var(--ag-cell-horizontal-padding) + var(--ag-spacing) - 4px)}}}.ag-charts-font-size-color{align-self:stretch;display:flex;justify-content:space-between}.ag-charts-data-group-item{position:relative}.ag-charts-data-group-item:not(:last-child){margin-bottom:var(--ag-spacing)}.ag-chart-menu{background:var(--ag-background-color);border-radius:var(--ag-border-radius)}.ag-chart-menu-icon{border-radius:var(--ag-border-radius);cursor:pointer;margin:2px 0;opacity:.5;opacity:.8;&:hover{opacity:1}}.ag-chart-menu-toolbar-button{background-color:unset;border:0;border-radius:1px;padding:0 2px}.ag-chart-mini-thumbnail{border:1px solid var(--ag-border-color);border-radius:5px;&.ag-selected{border-color:var(--ag-accent-color);border-width:2px}&:focus-visible{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}}.ag-chart-data-column-drag-handle{margin-left:var(--ag-spacing)}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-title-bar{position:relative}.ag-charts-advanced-settings-top-level-group-title-bar{background-color:unset;position:relative}.ag-charts-advanced-settings-top-level-group-title-bar:focus-visible,.ag-charts-data-group-title-bar:focus-visible,.ag-charts-format-top-level-group-title-bar:focus-visible,.ag-charts-settings-group-title-bar:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-charts-data-group-container{padding:calc(var(--ag-widget-container-vertical-padding)*.5) var(--ag-widget-container-horizontal-padding);.ag-charts-data-group-item:not(.ag-charts-format-sub-level-group):not(.ag-pill-select):not(.ag-select){height:var(--ag-list-item-height)}.ag-charts-data-group-item.ag-picker-field{margin-top:var(--ag-spacing)}}.ag-charts-advanced-settings-top-level-group-container,.ag-charts-format-top-level-group-container{margin-left:calc(var(--ag-spacing)*2);padding:var(--ag-spacing)}.ag-charts-advanced-settings-top-level-group-item,.ag-charts-format-top-level-group-item{margin:var(--ag-spacing) 0}.ag-charts-format-sub-level-group-container{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-charts-settings-group-container{display:grid;grid-template-columns:60px 1fr 60px 1fr 60px;padding:var(--ag-spacing);row-gap:8px;.ag-chart-mini-thumbnail:nth-child(3n+1){grid-column:1}.ag-chart-mini-thumbnail:nth-child(3n+2){grid-column:3}.ag-chart-mini-thumbnail:nth-child(3n+3){grid-column:5}}.ag-chart-data-section,.ag-chart-format-section{display:flex;margin:0}.ag-chart-menu-panel{background-color:var(--ag-chrome-background-color)}.ag-ltr .ag-chart-menu-panel{border-left:1px solid var(--ag-border-color)}.ag-rtl .ag-chart-menu-panel{border-right:1px solid var(--ag-border-color)}.ag-chart-tabbed-menu-body{position:relative;&:after{background:linear-gradient(var(--ag-background-color),transparent);content:"";display:block;height:16px;left:0;position:absolute;right:0;top:0}}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-container,.ag-charts-settings-group-title-bar{border-top:none;font-weight:500;padding:0 calc(var(--ag-spacing)*1.5)}.ag-chart-settings-nav-bar{border-top:1px solid var(--ag-border-color)}.ag-charts-format-sub-level-group-title-bar{background:none;font-weight:500}.ag-chart-data-section,.ag-chart-format-section{.ag-label:not(.ag-group-title-bar){color:var(--ag-chart-menu-label-color)}.ag-label-align-top .ag-label{margin-bottom:var(--ag-widget-vertical-spacing);margin-top:calc(var(--ag-widget-vertical-spacing)*.5)}.ag-slider.ag-label-align-top .ag-label{margin-bottom:0}& label{display:inline-block}}.ag-chart-data-wrapper,.ag-chart-format-wrapper,.ag-charts-data-group-container,.ag-charts-data-group-title-bar,.ag-charts-format-sub-level-group,.ag-charts-format-sub-level-group-container,.ag-charts-format-sub-level-group-container>*,.ag-charts-format-sub-level-group-item:last-child,.ag-charts-format-sub-level-group-title-bar,.ag-charts-format-top-level-group,.ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-charts-format-top-level-group-item,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-container,.ag-charts-settings-group-title-bar{margin:0;padding:0}.ag-charts-data-group,.ag-charts-format-top-level-group{border-top:1px solid var(--ag-border-color)}.ag-charts-data-group-title-bar,.ag-charts-format-top-level-group-title-bar,.ag-charts-settings-group-title-bar{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-charts-data-group .ag-charts-data-group-container,.ag-charts-format-top-level-group .ag-charts-format-top-level-group-container,.ag-charts-settings-group .ag-charts-settings-group-container{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-charts-format-sub-level-group-title-bar{padding:var(--ag-widget-vertical-spacing) 0}.ag-charts-format-sub-level-group-container{padding-bottom:var(--ag-widget-container-vertical-padding);padding-top:var(--ag-widget-vertical-spacing)}.ag-charts-format-sub-level-group-container>*,.ag-charts-format-sub-level-no-header-group-container>*,.ag-charts-format-top-level-group-container>*{margin-bottom:var(--ag-widget-vertical-spacing)}.ag-chart-advanced-settings-section,.ag-chart-settings-mini-wrapper,.ag-charts-data-group-item{padding-bottom:var(--ag-widget-container-vertical-padding)}.ag-chart-advanced-settings-section{padding-top:var(--ag-widget-container-vertical-padding)}.ag-charts-advanced-settings-top-level-group{.ag-charts-advanced-settings-top-level-group-container,.ag-charts-advanced-settings-top-level-group-title-bar{padding:0 var(--ag-widget-container-horizontal-padding)}}.ag-charts-advanced-settings-top-level-group-container{margin:0}.ag-charts-advanced-settings-top-level-group-item{margin-bottom:0;margin-top:calc(var(--ag-widget-vertical-spacing)*2)}.ag-chart-menu{--ag-icon-size:20px;background-color:color-mix(in srgb,transparent,var(--ag-background-color) 30%);padding:4px 2px}.ag-chart-settings-card-item.ag-not-selected:hover{opacity:.35}.ag-column-drop{align-items:center;display:inline-flex;overflow:auto;position:relative;width:100%}.ag-column-drop-cell,.ag-column-drop-list{align-items:center;display:flex}.ag-column-drop-cell{gap:var(--ag-spacing);position:relative}.ag-column-drop-cell-text{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-drop-vertical{align-items:stretch;display:flex;flex-direction:column;overflow:hidden}.ag-column-drop-vertical-title-bar{align-items:center;display:flex;flex:none}.ag-column-drop-vertical-list{align-items:stretch;flex-direction:column;flex-grow:1;overflow-x:auto;position:relative;>*{flex:none}}.ag-column-drop-empty .ag-column-drop-vertical-list{overflow:hidden}.ag-column-drop-vertical-empty-message{display:block}.ag-column-drop.ag-column-drop-horizontal{overflow:hidden;white-space:nowrap}.ag-column-drop-cell-button{cursor:pointer}.ag-column-drop-wrapper{display:flex}.ag-column-drop-horizontal-half-width{width:50%!important}.ag-column-drop-cell{background:var(--ag-column-drop-cell-background-color);border:var(--ag-column-drop-cell-border);border-radius:500px;padding:calc(var(--ag-spacing)*.5);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-ltr .ag-column-drop-cell{padding-left:calc(var(--ag-spacing)*.75)}.ag-rtl .ag-column-drop-cell{padding-right:calc(var(--ag-spacing)*.75)}.ag-column-drop-cell-button{min-width:calc(var(--ag-spacing)*4)}.ag-column-drop-cell-ghost{opacity:.5}.ag-column-drop-horizontal{gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height)}.ag-ltr .ag-column-drop-horizontal{padding-left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-column-drop-horizontal{padding-right:var(--ag-cell-horizontal-padding)}.ag-column-drop-horizontal-list{gap:var(--ag-cell-widget-spacing)}.ag-column-drop-vertical-list{padding-bottom:var(--ag-spacing);padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}.ag-column-drop-vertical-cell{margin-top:var(--ag-spacing)}.ag-ltr .ag-column-drop-vertical-icon{margin-right:var(--ag-widget-horizontal-spacing)}.ag-rtl .ag-column-drop-vertical-icon{margin-left:var(--ag-widget-horizontal-spacing)}.ag-column-drop-vertical-empty-message{bottom:0;left:0;margin-top:var(--ag-spacing);overflow:hidden;position:absolute;right:0;top:0}.ag-select-agg-func-popup{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);height:calc(var(--ag-spacing)*5*3.5);padding:0;position:absolute}.ag-select-agg-func-virtual-list-item{cursor:default;&:hover{background-color:var(--ag-selected-row-background-color)}&:focus-visible{shadow:var(--ag-focus-shadow)}}.ag-ltr .ag-select-agg-func-virtual-list-item{padding-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-select-agg-func-virtual-list-item{padding-right:calc(var(--ag-spacing)*2)}.ag-sort-indicator-container{display:contents}.ag-ltr .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}.ag-rtl .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-column-drop-horizontal{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border)}.ag-ltr .ag-column-drop-horizontal-half-width:not(:last-child){border-right:var(--ag-column-border)}.ag-rtl .ag-column-drop-horizontal-half-width:not(:last-child){border-left:var(--ag-column-border)}.ag-column-drop-cell-button{min-width:0;opacity:.75;&:hover{opacity:1}}.ag-column-drop-vertical{min-height:75px}.ag-column-drop-vertical-title-bar{padding:var(--ag-widget-container-vertical-padding) calc(var(--ag-spacing)*2) 0}.ag-column-drop-vertical-empty-message{align-items:center;border:1px dashed;border-color:var(--ag-border-color);display:flex;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);padding:calc(var(--ag-spacing)*2)}.ag-column-select{display:flex;flex:3 1 0px;flex-direction:column;overflow:hidden;position:relative}.ag-column-select-header{flex:none;height:var(--ag-header-height);padding-left:var(--ag-widget-container-horizontal-padding);padding-right:var(--ag-widget-container-horizontal-padding)}.ag-column-select-column,.ag-column-select-column-group,.ag-column-select-header{align-items:center;display:flex;gap:var(--ag-widget-horizontal-spacing);position:relative}.ag-column-select-column,.ag-column-select-column-group{height:100%}.ag-column-select-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-column-select-header-icon{border-radius:var(--ag-border-radius);cursor:pointer;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-column-select-header-filter-wrapper{flex:1 1 auto}.ag-column-select-header-filter{width:100%}.ag-column-select-list{flex:1 1 0px;overflow:hidden}.ag-ltr .ag-column-select-column,.ag-ltr .ag-column-select-column-group{padding-left:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-rtl .ag-column-select-column,.ag-rtl .ag-column-select-column-group{padding-right:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-ltr .ag-column-select-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-rtl .ag-column-select-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-column-select-column,.ag-column-select-column-group{&:not(:last-child){margin-bottom:var(--ag-widget-vertical-spacing)}}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly{opacity:.5;pointer-events:none}.ag-column-select-virtual-list-viewport{padding:calc(var(--ag-widget-container-vertical-padding)*.5) 0}.ag-column-select-virtual-list-item{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-column-select-column-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-select-checkbox{display:flex}.ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}.ag-filter-body-wrapper{display:flex;flex-direction:column}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-full-body>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}}.ag-floating-filter-button{display:flex;flex:none}.ag-set-floating-filter-input input[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1}.ag-column-panel{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.ag-pivot-mode-panel{display:flex;height:var(--ag-header-height)}.ag-pivot-mode-select{align-items:center;display:flex}.ag-ltr .ag-pivot-mode-select{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-rtl .ag-pivot-mode-select{margin-right:var(--ag-widget-container-horizontal-padding)}.ag-column-panel-column-select{border-bottom:var(--ag-tool-panel-separator-border);border-top:var(--ag-tool-panel-separator-border)}:where(.ag-column-panel) .ag-column-drop-vertical{flex:1 1 0px;min-height:50px;&:where(:not(.ag-last-column-drop)){border-bottom:var(--ag-tool-panel-separator-border)}}.ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);max-width:200px;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2))}.ag-dnd-ghost,.ag-header{display:flex;overflow:hidden;white-space:nowrap}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-header-row:not(:first-child){.ag-header-cell:not(.ag-header-span-height.ag-header-span-total),.ag-header-group-cell.ag-header-group-cell-with-group{border-top:var(--ag-header-row-border)}}.ag-header-row:not(.ag-header-row-column-group){overflow:hidden}.ag-header.ag-header-allow-overflow .ag-header-row{overflow:visible}.ag-header-cell,.ag-header-group-cell{align-items:center;display:inline-flex;gap:var(--ag-cell-widget-spacing);height:100%;overflow:hidden;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:not(.ag-floating-filter),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:hover:before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&.ag-header-cell-moving:before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-filter-button,.ag-header-cell.ag-header-active .ag-header-cell-menu-button{opacity:1}.ag-header-cell-menu-button:not(.ag-header-menu-always-show){opacity:0;transition:opacity .2s}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;gap:var(--ag-spacing);padding:5px 0}.ag-header-cell-label{overflow:hidden;text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;position:sticky}.ag-ltr .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}.ag-rtl .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-group-cell .ag-header-cell-comp-wrapper{display:flex}.ag-header-cell:not(.ag-header-cell-auto-height) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-comp-wrapper{width:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-right-aligned-header .ag-header-cell-label{flex-direction:row-reverse}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-cell-sortable .ag-header-cell-label,.ag-header-expand-icon,.ag-panel-title-bar-button{cursor:pointer}.ag-advanced-filter-header-cell,.ag-header-cell,.ag-header-group-cell{&:focus-visible{box-shadow:inset var(--ag-focus-shadow)}}.ag-ltr :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-rtl :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}.ag-ltr :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}.ag-rtl :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}.ag-ltr .ag-header-cell:after,.ag-ltr .ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):after{border-right:var(--ag-header-column-border);right:0}.ag-rtl .ag-header-cell:after,.ag-rtl .ag-header-group-cell:not(.ag-header-span-height.ag-header-group-cell-no-group):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}.ag-ltr .ag-header-highlight-before:after{left:0}.ag-ltr .ag-header-highlight-after:after,.ag-rtl .ag-header-highlight-before:after{right:0}.ag-rtl .ag-header-highlight-after:after{left:0}.ag-ltr .ag-pinned-left-header .ag-header-highlight-after:after{right:1px}.ag-rtl .ag-pinned-left-header .ag-header-highlight-after:after{left:1px}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}.ag-ltr .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}.ag-rtl .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}.ag-header-cell.ag-header-span-height .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group.ag-header-span-height .ag-header-cell-resize{display:none}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;min-width:180px;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-menu-list{cursor:default;display:table;padding:var(--ag-spacing) 0;width:100%}.ag-menu-option,.ag-menu-separator{display:table-row}.ag-menu-option-part,.ag-menu-separator-part{display:table-cell;vertical-align:middle}.ag-menu-option-text{white-space:nowrap}.ag-menu-option-custom{display:contents}.ag-compact-menu-option{display:flex;flex-wrap:nowrap;width:100%}.ag-compact-menu-option-text{flex:1 1 auto;white-space:nowrap}.ag-menu-separator{height:calc(var(--ag-spacing)*2 + 1px)}.ag-menu-separator-part:after{border-top:1px solid var(--ag-menu-separator-color);content:"";display:block}.ag-compact-menu-option-active,.ag-menu-option-active{background-color:var(--ag-row-hover-color)}.ag-compact-menu-option-part,.ag-menu-option-part{line-height:var(--ag-icon-size);padding:calc(var(--ag-spacing) + 2px) 0}.ag-compact-menu-option-disabled,.ag-menu-option-disabled{cursor:not-allowed;opacity:.5}.ag-compact-menu-option-icon,.ag-menu-option-icon{width:var(--ag-icon-size)}.ag-ltr .ag-compact-menu-option-icon,.ag-ltr .ag-menu-option-icon{padding-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-compact-menu-option-icon,.ag-rtl .ag-menu-option-icon{padding-right:calc(var(--ag-spacing)*2)}.ag-compact-menu-option-text,.ag-menu-option-text{padding-left:calc(var(--ag-spacing)*2);padding-right:calc(var(--ag-spacing)*2)}.ag-ltr .ag-compact-menu-option-shortcut,.ag-ltr .ag-menu-option-shortcut{padding-right:var(--ag-spacing)}.ag-rtl .ag-compact-menu-option-shortcut,.ag-rtl .ag-menu-option-shortcut{padding-left:var(--ag-spacing)}.ag-ltr .ag-compact-menu-option-popup-pointer,.ag-ltr .ag-menu-option-popup-pointer{padding-right:var(--ag-spacing)}.ag-rtl .ag-compact-menu-option-popup-pointer,.ag-rtl .ag-menu-option-popup-pointer{padding-left:var(--ag-spacing)}.ag-menu-column-select-wrapper{height:265px;overflow:auto;.ag-column-select{height:100%}}.ag-menu.ag-tabs{min-width:290px}.ag-filter-separator{border-top:1px solid var(--menu-separator-color)}.ag-filter-select .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}.ag-ltr .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-ltr .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-rtl .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-ltr .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}.ag-rtl .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}.ag-ltr .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}.ag-rtl .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-menu .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}.ag-ltr .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}.ag-rtl .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}.ag-resizer-wrapper{margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-menu-option{cursor:pointer;font-weight:500}.ag-ltr .ag-menu-option-popup-pointer .ag-icon{text-align:right}.ag-rtl .ag-menu-option-popup-pointer .ag-icon{text-align:left}.ag-panel{background-color:var(--ag-panel-background-color);display:flex;flex-direction:column;overflow:hidden;position:relative}.ag-dialog{border:var(--ag-dialog-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dialog-shadow);position:absolute}.ag-panel-title-bar{align-items:center;background-color:var(--ag-panel-title-bar-background-color);border-bottom:var(--ag-panel-title-bar-border);color:var(--ag-header-text-color);cursor:default;display:flex;flex:none;height:var(--ag-header-height);padding:var(--ag-spacing) var(--ag-cell-horizontal-padding)}.ag-ltr .ag-panel-title-bar-button{margin-left:calc(var(--ag-spacing)*2);margin-right:var(--ag-spacing)}.ag-rtl .ag-panel-title-bar-button{margin-left:var(--ag-spacing);margin-right:calc(var(--ag-spacing)*2)}.ag-panel-title-bar-title{color:var(--ag-header-text-color);flex:1 1 auto;font-weight:500}.ag-panel-title-bar-buttons{display:flex}.ag-panel-title-bar-button{cursor:pointer}.ag-panel-content-wrapper{display:flex;flex:1 1 auto;overflow:hidden;position:relative}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1;&.ag-resizer-topLeft{height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}.ag-ltr .ag-resizer{&.ag-resizer-topLeft{cursor:nwse-resize}&.ag-resizer-topRight{cursor:nesw-resize}&.ag-resizer-bottomRight{cursor:nwse-resize}&.ag-resizer-bottomLeft{cursor:nesw-resize}}.ag-rtl .ag-resizer{&.ag-resizer-topLeft{cursor:nesw-resize}&.ag-resizer-topRight{cursor:nwse-resize}&.ag-resizer-bottomRight{cursor:nesw-resize}&.ag-resizer-bottomLeft{cursor:nwse-resize}}.ag-dragging-fill-handle .ag-dialog,.ag-dragging-range-handle .ag-dialog{opacity:.7;pointer-events:none}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}.ag-select{align-items:center;display:flex;flex-direction:row;.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}&.ag-disabled{opacity:.5}}.ag-ltr .ag-select{.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}.ag-rtl .ag-select{.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-rich-select{cursor:default;height:100%}.ag-rich-select-value{align-items:center;background-color:var(--ag-input-background-color);display:flex;height:100%;padding:var(--ag-spacing);.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;&.ag-display-as-placeholder{opacity:.5}}}.ag-rich-select-list{background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);box-shadow:var(--ag-dropdown-shadow);height:auto;position:relative;width:100%;.ag-loading-text{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}}.ag-rich-select-row{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;padding:0 var(--ag-spacing);white-space:nowrap}.ag-rich-select-row-selected{background-color:var(--ag-selected-row-background-color)}.ag-rich-select-row-highlighted,.ag-rich-select-row:hover{background-image:linear-gradient(var(--ag-row-hover-color),var(--ag-row-hover-color))}.ag-rich-select-row-text-highlight{font-weight:700}.ag-rich-select-field-input{flex:1 1 auto;.ag-input-field-input{border:none!important;box-shadow:none!important;padding:0!important;text-overflow:ellipsis;&::-moz-placeholder{opacity:.8}&::placeholder{opacity:.8}}}.ag-ltr .ag-rich-select-field-input{left:var(--ag-spacing)}.ag-rtl .ag-rich-select-field-input{right:var(--ag-spacing)}.ag-popup-editor .ag-rich-select-value{height:var(--ag-row-height);min-width:200px}.ag-rich-select-virtual-list-item{cursor:default;height:var(--ag-list-item-height)}.ag-pill-container{display:flex;flex-wrap:nowrap;gap:.25rem}.ag-pill{align-items:center;background:var(--ag-select-cell-background-color);border:var(--ag-select-cell-border);border-radius:var(--ag-border-radius);display:flex;padding:0 .25rem;white-space:nowrap;&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-pill .ag-pill-button{border:none;padding:0;&:hover{color:var(--ag-accent-color);cursor:pointer}}.ag-ltr .ag-pill .ag-pill-button{margin-left:var(--ag-spacing)}.ag-rtl .ag-pill .ag-pill-button{margin-right:var(--ag-spacing)}ag-grid,ag-grid-angular{display:block}.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-tool-panel-wrapper{cursor:default;display:flex;overflow-x:hidden;overflow-y:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-side-bar-panel-width)}.ag-select-agg-func-item{align-items:center;display:flex;flex:1 1 auto;flex-direction:row;flex-wrap:nowrap;height:100%;overflow:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;>*{flex:none}}.ag-tool-panel-horizontal-resize{cursor:ew-resize;height:100%;position:absolute;top:0;width:5px;z-index:1}.ag-ltr .ag-side-bar-left .ag-tool-panel-horizontal-resize{right:-3px}.ag-ltr .ag-side-bar-right .ag-tool-panel-horizontal-resize,.ag-rtl .ag-side-bar-left .ag-tool-panel-horizontal-resize{left:-3px}.ag-rtl .ag-side-bar-right .ag-tool-panel-horizontal-resize{right:-3px}.ag-side-bar{background-color:var(--ag-side-bar-background-color);display:flex;flex-direction:row-reverse;position:relative}.ag-side-bar-left{flex-direction:row;order:-1}.ag-side-buttons{position:relative;width:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-side-button{&.ag-selected{background-color:var(--ag-background-color);border-bottom:1px solid var(--ag-border-color);&:not(:first-of-type){border-top:1px solid var(--ag-border-color)}}}.ag-side-button-button{align-items:center;cursor:pointer;display:flex;flex-direction:column;gap:var(--ag-spacing);padding:calc(var(--ag-spacing)*3) 0;position:relative;white-space:nowrap;width:100%;&:focus{box-shadow:none}}.ag-side-button-button:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-side-button-label{writing-mode:vertical-lr}@media (max-resolution:1.5x){.ag-side-button-label{font-family:"Segoe UI",var(--ag-font-family)}.ag-ltr .ag-side-button-label{transform:rotate(.05deg)}.ag-rtl .ag-side-button-label{transform:rotate(-.05deg)}}.ag-ltr .ag-side-bar-left,.ag-rtl .ag-side-bar-right{border-right:var(--ag-side-panel-border);.ag-tool-panel-wrapper{border-left:var(--ag-side-panel-border)}}.ag-ltr .ag-side-bar-right,.ag-rtl .ag-side-bar-left{border-left:var(--ag-side-panel-border);.ag-tool-panel-wrapper{border-right:var(--ag-side-panel-border)}}.ag-ltr .ag-chart-menu-panel{border-left:var(--ag-side-panel-border)}.ag-rtl .ag-chart-menu-panel{border-right:var(--ag-side-panel-border)}.ag-button{border-radius:0}.ag-standard-button{-moz-appearance:none;appearance:none;-webkit-appearance:none;background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:var(--ag-border-radius);cursor:pointer;font-family:inherit;padding:var(--ag-spacing) calc(var(--ag-spacing)*2);&:hover{background-color:var(--ag-row-hover-color)}&:active{border-color:var(--ag-accent-color)}&:disabled{background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}}:where(input[class^=ag-][type=button],button[class^=ag-]):focus-visible{box-shadow:var(--ag-focus-shadow)}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow-x:hidden;overflow-y:auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;& span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}.ag-ltr .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}.ag-rtl .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}.ag-range-field{align-items:center;display:flex;.ag-input-wrapper{height:100%}}& input[class^=ag-][type=range]{-webkit-appearance:none;background:none;height:100%;overflow:visible;padding:0;width:100%;&::-webkit-slider-runnable-track{background-color:var(--ag-border-color);border-radius:1.5px;height:3px;margin:0;padding:0;width:100%}&::-moz-range-track{background-color:var(--ag-border-color);border-radius:1.5px;height:3px;margin:0;padding:0;width:100%}&::-webkit-slider-thumb{-webkit-appearance:none;background-color:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:100%;height:var(--ag-icon-size);margin:0;padding:0;transform:translateY(calc(var(--ag-icon-size)*-.5 + 1.5px));width:var(--ag-icon-size)}&::-moz-ag-range-thumb{-webkit-appearance:none;background-color:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:100%;height:var(--ag-icon-size);margin:0;padding:0;transform:translateY(calc(var(--ag-icon-size)*-.5 + 1.5px));width:var(--ag-icon-size)}&:focus{&::-webkit-slider-thumb{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}&::-moz-ag-range-thumb{border-color:var(--ag-accent-color);box-shadow:var(--ag-focus-shadow)}}&:active{&::-webkit-slider-runnable-track{background-color:var(--ag-accent-color)}&::-moz-ag-range-track{background-color:var(--ag-accent-color)}}&:disabled{opacity:.5}}.ag-toggle-button{flex:none;min-width:unset;width:unset}.ag-toggle-button-input-wrapper{background-color:var(--ag-toggle-button-off-background-color);border:solid var(--ag-toggle-button-border-width) var(--ag-toggle-button-off-border-color);border-radius:calc(var(--ag-toggle-button-height)*.5);flex:none;height:var(--ag-toggle-button-height);max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);position:relative;& input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:100%;opacity:0;width:100%}&:before{background-color:var(--ag-toggle-button-switch-background-color);border:var(--ag-toggle-button-border-width) solid var(--ag-toggle-button-switch-border-color);border-radius:100%;content:"";display:block;height:var(--ag-toggle-button-height);pointer-events:none;position:absolute;top:calc(0px - var(--ag-toggle-button-border-width));width:var(--ag-toggle-button-height)}&.ag-checked{background-color:var(--ag-toggle-button-on-background-color);border-color:var(--ag-toggle-button-on-border-color);&:before{border-color:var(--ag-toggle-button-on-border-color)}}&:focus-within{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{opacity:.5}}.ag-ltr .ag-toggle-button-input-wrapper{&:before{left:calc(0px - var(--ag-toggle-button-border-width));transition:left .1s}&.ag-checked{&:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-border-width))}}}.ag-rtl .ag-toggle-button-input-wrapper{&:before{right:calc(0px - var(--ag-toggle-button-border-width));transition:right .1s}&.ag-checked{&:before{right:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-border-width))}}}.ag-autocomplete{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}}.ag-autocomplete-list-popup{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-autocomplete-list{height:calc(var(--ag-row-height)*6.5);min-width:200px;position:relative;width:100%}.ag-autocomplete-virtual-list-item{cursor:default;display:flex;height:var(--ag-list-item-height);&:focus-visible:after{content:none}&:hover{background-color:var(--ag-row-hover-color)}}.ag-autocomplete-row{align-items:center;display:flex;flex:1 1 auto;overflow:hidden}.ag-autocomplete-row-label{margin:0 var(--ag-widget-container-horizontal-padding);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-autocomplete-row-selected{background-color:var(--ag-selected-row-background-color)}.ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);white-space:normal}.ag-tooltip,.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:not(.ag-tooltip-interactive),.ag-tooltip:not(.ag-tooltip-interactive){pointer-events:none}.ag-tooltip-custom.ag-tooltip-animate,.ag-tooltip.ag-tooltip-animate{transition:opacity 1s;&.ag-tooltip-hiding{opacity:0}}.ag-angle-select{align-items:center;display:flex}.ag-angle-select-wrapper{display:flex}.ag-angle-select-parent-circle{display:block;position:relative}.ag-angle-select-child-circle{position:absolute}.ag-slider-wrapper{display:flex;.ag-input-field{flex:1 1 auto}}.ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-color-panel{display:flex;flex-direction:column;text-align:center;width:100%}.ag-spectrum-color{cursor:default;flex:1 1 auto;overflow:visible;position:relative}.ag-spectrum-fill{inset:0;position:absolute}.ag-spectrum-val{cursor:pointer}.ag-spectrum-dragger{cursor:pointer;pointer-events:none;position:absolute}.ag-spectrum-alpha,.ag-spectrum-hue{cursor:default}.ag-spectrum-hue-background{background:linear-gradient(270deg,red 3%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);height:100%;width:100%}.ag-spectrum-alpha-background{background:linear-gradient(to right,var(--ag-internal-spectrum-alpha-color-from),var(--ag-internal-spectrum-alpha-color-to)),url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect x="0" y="0" width="4" height="4" fill="%23fff"/><path d="M0 0H2V4H4V2H0Z" fill="%23b2b2b2"/></svg>') 0 0 /4px 4px;height:100%;width:100%}.ag-spectrum-tool{cursor:pointer;position:relative}.ag-spectrum-slider{pointer-events:none;position:absolute}.ag-spectrum-alpha .ag-spectrum-slider{background:linear-gradient(to bottom,var(--ag-internal-spectrum-alpha-color),var(--ag-internal-spectrum-alpha-color)) var(--ag-background-color)}.ag-recent-colors{display:flex;gap:6px;margin-top:10px}.ag-recent-color{cursor:pointer}.ag-angle-select[disabled]{opacity:.5;pointer-events:none}.ag-ltr .ag-angle-select-field,.ag-ltr .ag-slider-field{margin-right:calc(var(--ag-spacing)*2)}.ag-rtl .ag-angle-select-field,.ag-rtl .ag-slider-field{margin-left:calc(var(--ag-spacing)*2)}.ag-angle-select-parent-circle{background-color:var(--ag-background-color);border:1px solid;border-color:var(--ag-border-color);border-radius:12px;height:24px;width:24px}.ag-angle-select-child-circle{background-color:var(--ag-foreground-color);border-radius:3px;height:6px;left:12px;margin-left:-3px;margin-top:-4px;top:4px;width:6px}.ag-picker-field-wrapper{background-color:var(--ag-background-color);border:var(--ag-input-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:disabled{opacity:.5}&.ag-picker-has-focus,&:focus-within{border:var(--ag-input-focus-border);box-shadow:var(--ag-focus-shadow)}}.ag-picker-field-button{background-color:var(--ag-background-color)}.ag-dialog.ag-color-dialog{border-radius:5px}.ag-color-picker{.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}.ag-picker-field-display{align-items:center;display:flex;flex-direction:row;min-height:var(--ag-list-item-height)}}.ag-ltr .ag-color-picker-color,.ag-ltr .ag-color-picker-value{margin-right:var(--ag-spacing)}.ag-rtl .ag-color-picker-color,.ag-rtl .ag-color-picker-value{margin-left:var(--ag-spacing)}.ag-color-panel{padding:var(--ag-spacing)}.ag-spectrum-tools{padding-bottom:0;padding-left:0;padding-right:0}.ag-spectrum-tool{height:12px}.ag-spectrum-alpha-background,.ag-spectrum-hue-background{border-radius:12px}.ag-spectrum-slider{border:3px solid #f8f8f8;border-radius:18px;height:18px;margin-top:-15px;width:18px}.ag-recent-colors{margin-bottom:2px;margin-left:var(--ag-spacing);margin-right:var(--ag-spacing)}.ag-color-input-color,.ag-color-picker-color,.ag-recent-color{border-radius:4px}.ag-recent-color{border:1px solid var(--ag-border-color)}.ag-spectrum-sat{background-image:linear-gradient(90deg,#fff,hsla(20,42%,65%,0))}.ag-spectrum-val{background-image:linear-gradient(0deg,#000,hsla(20,42%,65%,0))}.ag-spectrum-dragger{background:#000;border:3px solid #fff;border-radius:18px;box-shadow:0 0 2px 0 rgba(0,0,0,.24);height:18px;width:18px}.ag-spectrum-alpha-background,.ag-spectrum-hue-background{border-radius:2px}.ag-spectrum-tool{border-radius:2px;height:11px;margin-bottom:10px}.ag-spectrum-slider{border:2px solid #fff;border-radius:13px;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);height:13px;margin-top:-12px;width:13px}.ag-recent-color,.ag-spectrum-color,.ag-spectrum-slider{&:focus-visible:not(:disabled):not([readonly]){box-shadow:var(--ag-focus-shadow)}}.ag-color-input{.ag-color-input-color{position:absolute}}.ag-ltr .ag-color-input{& input[class^=ag-][type=text].ag-input-field-input{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-color-input-color{margin-left:var(--ag-spacing)}}.ag-rtl .ag-color-input{& input[class^=ag-][type=text].ag-input-field-input{padding-right:calc(var(--ag-icon-size) + var(--ag-spacing)*2)}.ag-color-input-color{margin-right:var(--ag-spacing)}}.ag-color-input-color,.ag-color-picker-color{border:1px solid var(--ag-border-color);border-radius:2px;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-pill-select{.ag-picker-field-display{font-weight:500}.ag-picker-field-display,.ag-picker-field-icon .ag-icon{color:var(--ag-chart-menu-label-color)}}.ag-filter-toolpanel{flex:1 1 0px;min-width:0}.ag-filter-toolpanel-header{position:relative}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{align-items:center;display:flex;>*{align-items:center;display:flex}}.ag-filter-toolpanel-header{height:calc(var(--ag-spacing)*6);&:focus-visible{border-radius:var(--ag-border-radius);box-shadow:inset var(--ag-focus-shadow)}}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{padding:0 var(--ag-spacing)}.ag-filter-toolpanel-group:not(.ag-has-filter)>.ag-group-title-bar .ag-filter-toolpanel-group-instance-header-icon{display:none}.ag-filter-toolpanel-group-level-0-header{height:calc(var(--ag-spacing)*8)}.ag-filter-toolpanel-group-item{margin-bottom:calc(var(--ag-spacing)*.5);margin-top:calc(var(--ag-spacing)*.5)}.ag-filter-toolpanel-search{margin-bottom:var(--ag-spacing);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-toolpanel-search-input{flex-grow:1;height:calc(var(--ag-spacing)*4)}.ag-ltr .ag-filter-toolpanel-group-title-bar-icon{margin-right:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-group-title-bar-icon{margin-left:var(--ag-spacing)}.ag-filter-toolpanel-expand{cursor:pointer}.ag-ltr .ag-filter-toolpanel-expand{margin-right:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-expand{margin-left:var(--ag-spacing)}.ag-ltr .ag-filter-toolpanel-group-title-bar,.ag-ltr .ag-filter-toolpanel-instance-header{padding-left:calc(var(--ag-spacing) + var(--ag-filter-tool-panel-group-indent)*var(--ag-indentation-level))}.ag-rtl .ag-filter-toolpanel-group-title-bar,.ag-rtl .ag-filter-toolpanel-instance-header{padding-right:calc(var(--ag-spacing) + var(--ag-filter-tool-panel-group-indent)*var(--ag-indentation-level))}.ag-ltr .ag-filter-toolpanel-instance-body{margin-left:var(--ag-filter-tool-panel-group-indent)}.ag-rtl .ag-filter-toolpanel-instance-body{margin-right:var(--ag-filter-tool-panel-group-indent)}.ag-ltr .ag-filter-toolpanel-group-instance-header-icon,.ag-ltr .ag-filter-toolpanel-instance-header-icon{margin-left:var(--ag-spacing)}.ag-rtl .ag-filter-toolpanel-group-instance-header-icon,.ag-rtl .ag-filter-toolpanel-instance-header-icon{margin-right:var(--ag-spacing)}.ag-filter-toolpanel-instance-filter{background-color:var(--ag-chrome-background-color)}.ag-filter-toolpanel-group-level-0{border-top:none}.ag-filter-toolpanel-header{height:auto;padding-bottom:var(--ag-spacing);padding-top:var(--ag-spacing)}.ag-filter-toolpanel-group-item{margin:0}.ag-filter-toolpanel-header,.ag-filter-toolpanel-search{color:var(--ag-header-text-color);font-weight:500}.ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:max(var(--ag-row-height),22px);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}.ag-paging-page-size .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&:focus-visible{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}.ag-status-bar{border-top:var(--ag-footer-row-border);display:flex;justify-content:space-between;line-height:1.5;overflow:hidden;padding-left:calc(var(--ag-spacing)*4);padding-right:calc(var(--ag-spacing)*4)}.ag-status-panel{display:inline-flex}.ag-status-name-value{white-space:nowrap}.ag-status-bar-center,.ag-status-bar-left,.ag-status-bar-right{display:inline-flex}.ag-status-bar-center{text-align:center}.ag-status-name-value{margin-left:var(--ag-spacing);margin-right:var(--ag-spacing);padding-bottom:var(--ag-widget-container-vertical-padding);padding-top:var(--ag-widget-container-vertical-padding)}.ag-status-name-value-value{font-weight:500}.ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}.ag-icon{display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-column-select-column-group-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}}.ag-column-select-column-readonly .ag-icon-grip,.ag-column-select-column-readonly.ag-icon-grip{opacity:.35}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-contracted .ag-icon,.ag-group-expanded .ag-icon,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons{&:hover{background-color:var(--ag-icon-button-hover-color);border-radius:1px;box-shadow:0 0 0 4px var(--ag-icon-button-hover-color)}}.ag-filter-active{--ag-icon-button-hover-color:color-mix(in srgb,transparent,var(--ag-accent-color) 28%);background-color:color-mix(in srgb,transparent,var(--ag-accent-color) 14%);border-radius:1px;box-shadow:0 0 0 4px color-mix(in srgb,transparent,var(--ag-accent-color) 14%);position:relative;&:after{background-color:var(--ag-accent-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}.ag-icon-filter{clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z")}}.ag-ltr .ag-filter-active{&:after{right:-1px}}.ag-rtl .ag-filter-active{&:after{left:-1px}}.ag-label-align-right{.ag-label{order:1}>*{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-label{white-space:nowrap}.ag-ltr .ag-label{margin-right:var(--ag-spacing)}.ag-rtl .ag-label{margin-left:var(--ag-spacing)}.ag-label-align-top .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}.ag-ltr .ag-label-align-right .ag-label{margin-left:var(--ag-spacing)}.ag-rtl .ag-label-align-right .ag-label{margin-right:var(--ag-spacing)}`,Jh={backgroundColor:"#FFF",foregroundColor:"#181d1f",textColor:{ref:"foregroundColor"},accentColor:"#2196f3",invalidColor:"#e02525",borderColor:{ref:"foregroundColor",mix:.15},wrapperBorder:!0,rowBorder:!0,browserColorScheme:"light",headerRowBorder:{ref:"rowBorder"},footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],chromeBackgroundColor:{ref:"foregroundColor",mix:.02,onto:"backgroundColor"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"backgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},subtleTextColor:{ref:"textColor",mix:.5},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:{ref:"accentColor"},rangeSelectionBackgroundColor:{ref:"accentColor",mix:.2},rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:{ref:"accentColor",mix:.5},rowHoverColor:{ref:"accentColor",mix:.08},columnHoverColor:{ref:"accentColor",mix:.05},selectedRowBackgroundColor:{ref:"accentColor",mix:.12},modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},oddRowBackgroundColor:{ref:"backgroundColor"},borderRadius:4,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",spacing:8,fontSize:14,rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,popupShadow:{radius:16,color:"#00000026"},dropdownShadow:{radius:4,spread:1,offsetY:1,color:"#babfc766"},dragAndDropImageBackgroundColor:{ref:"backgroundColor"},dragAndDropImageBorder:!0,dragAndDropImageShadow:{ref:"popupShadow"},dragHandleColor:{ref:"foregroundColor",mix:.7},focusShadow:{spread:3,color:{ref:"accentColor",mix:.5}},sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},listItemHeight:{calc:"iconSize + widgetVerticalSpacing"},iconSize:16,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonBorderWidth:2,toggleButtonOnBorderColor:{ref:"accentColor"},toggleButtonOnBackgroundColor:{ref:"accentColor"},toggleButtonOffBorderColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},toggleButtonOffBackgroundColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},toggleButtonSwitchBorderColor:{ref:"toggleButtonOffBorderColor"},toggleButtonSwitchBackgroundColor:{ref:"backgroundColor"},menuBorder:{color:{ref:"foregroundColor",mix:.2}},menuBackgroundColor:{ref:"foregroundColor",mix:.03,onto:"backgroundColor"},menuTextColor:{ref:"foregroundColor",mix:.95,onto:"backgroundColor"},menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:{ref:"foregroundColor",mix:.8},iconButtonHoverColor:{ref:"foregroundColor",mix:.1},dialogShadow:{ref:"popupShadow"},dialogBorder:{color:{ref:"foregroundColor",mix:.2}},panelBackgroundColor:{ref:"backgroundColor"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipTextColor:{ref:"textColor"},tooltipBorder:!0,columnDropCellBackgroundColor:{ref:"foregroundColor",mix:.07},columnDropCellBorder:{color:{ref:"foregroundColor",mix:.13}},selectCellBackgroundColor:{ref:"foregroundColor",mix:.07},selectCellBorder:{color:{ref:"foregroundColor",mix:.13}},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterToolPanelGroupIndent:{ref:"spacing"},iconButtonHoverBackgroundColor:{ref:"foregroundColor",mix:.1},rowLoadingSkeletonEffectColor:"rgba(66, 66, 66, 0.2)"},vM=e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase(),uv=e=>`--ag-${vM(e)}`,_i=e=>`var(${uv(e)})`,CM=(e,t,i)=>Math.max(t,Math.min(i,e)),wM=e=>{const t=new Map;return i=>{const s=i;return t.has(s)||t.set(s,e(i)),t.get(s)}},SM=wM(e=>{if(/Color$/.test(e))return"color";if(/Scale?$/.test(e))return"scale";if(e==="spacing"||/(Padding|Spacing|Size|Width|Height|Radius|Indent|Start|End|Top|Bottom|Horizontal|Vertical)$/.test(e))return"length";if(/Border$/.test(e))return"border";if(/BorderStyle$/.test(e))return"borderStyle";if(/Shadow$/.test(e))return"shadow";if(/Image$/.test(e))return"image";if(/Family$/.test(e))return"fontFamily";if(/Weight$/.test(e))return"fontWeight";if(/Duration$/.test(e))return"duration";if(/ColorScheme$/.test(e))return"colorScheme";throw new Error(`"${e}" is not a valid theme parameter.`)}),kl=e=>typeof e=="string"?e:typeof e=="number"?String(e):!1,ud=e=>{if(typeof e=="string")return e;if("ref"in e){const t=_i(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?"var(--ag-background-color)":"transparent"}, ${t} ${CM(e.mix*100,0,100)}%)`}return!1},yM=kl,Us=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?[a-z][a-z0-9]*\b(?![-(])/gi,i=>i[0]==="-"?i:` ${_i(i)} `)})`:"ref"in e?_i(e.ref):!1,bM=kl,RM=(e,t)=>typeof e=="string"?e:e===!0?"solid 1px var(--ag-border-color)":e===!1?t==="columnBorder"?"solid 1px transparent":"none":"ref"in e?_i(e.ref):dv(e.style??"solid")+" "+Us(e.width??1)+" "+ud(e.color??{ref:"borderColor"}),FM=e=>typeof e=="string"?e:e===!1?"none":"ref"in e?_i(e.ref):[Us(e.offsetX??0),Us(e.offsetY??0),Us(e.radius??0),Us(e.spread??0),ud(e.color??{ref:"foregroundColor"})].join(" "),dv=kl,hv=e=>typeof e=="string"?e:"googleFont"in e?hv(e.googleFont):"ref"in e?_i(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),/^[\w-]+$/.test(t)?t:JSON.stringify(t))).join(", "):!1,xM=kl,gv=e=>typeof e=="string"?e:"url"in e?`url(${JSON.stringify(e.url)})`:"svg"in e?gv({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):"ref"in e?_i(e.ref):!1,PM=(e,t)=>typeof e=="string"?e:typeof e=="number"?(e>50&&$(`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`),`${e}s`):"ref"in e?_i(e.ref):!1,EM={color:ud,colorScheme:yM,length:Us,scale:bM,border:RM,borderStyle:dv,shadow:FM,image:gv,fontFamily:hv,fontWeight:xM,duration:PM},DM=(e,t)=>{const i=SM(e);return EM[i](t,e)},MM=0,TM=(e=`customTheme${++MM}`)=>new IM(e,[],{}),kM=typeof window!="object"||!window||typeof document!="object"||window.document!==document,AM=0,eg=!1,IM=class Nc{constructor(t,i=[],s={}){this.id=t,this.dependencies=i,this.defaults=s,this.useCount=0}withPart(t){return typeof t=="function"&&(t=t()),new Nc(this.id,this.dependencies.concat(t),this.defaults)}withParams(t){const i={...this.defaults};for(const[s,r]of Object.entries(t))r!=null&&(i[s]=r);return new Nc(this.id,this.dependencies,i)}getCSS(){return[Zh,...this._getCSSChunks().map(t=>t.css)].join(`

`)}startUse(t){++this.useCount,this.useCount===1&&this._install(t)}stopUse(){--this.useCount,this.useCount===0&&setTimeout(()=>{this.useCount===0&&tg(this.getCssClass(),this._installRoot)},1e3)}getCssClass(){return this._cssClass==null&&(this._cssClass=`ag-theme-${++AM}`),this._cssClass}getParams(){if(this._getParamsCache)return this._getParamsCache;const t={...Jh};for(const i of this._getFlatUnits())for(const[s,r]of Object.entries(i.defaults)){const o=r??Jh[s];o!=null&&(t[s]=o)}return this._getParamsCache=t}async _install({container:t,loadThemeGoogleFonts:i}){if(kM)return;eg||(eg=!0,tg("legacy",document.head),getComputedStyle(document.body).getPropertyValue("--ag-legacy-styles-loaded")&&$("both Theming API and the ag-grid.css are used on the same page, styling will be incorrect"));let s=t.getRootNode();s instanceof ShadowRoot||(s=document.head),this._installRoot=s;const r=[];r.push(Hc({css:Zh,part:"core",root:s}));for(const o of OM(this))i?GM(o):i==null&&D(`theme uses google font ${o} but no value for loadThemeGoogleFonts was provided. Pass true to load fonts from ${pv} or false to silence this warning.`);for(const o of this._getCSSChunks())Hc({css:o.css,part:o.id,scope:this.getCssClass(),root:s});return Promise.all(r)}_getFlatUnits(){if(this._getFlatUnitsCache)return this._getFlatUnitsCache;const t={};for(const s of this.dependencies)delete t[s.feature],t[s.feature]=s;const i=[...Object.values(t),this];return this._getFlatUnitsCache=i}_getCSSChunks(){if(this._getCssChunksCache)return this._getCssChunksCache;const t=[];t.push(LM(this));for(const i of this._getFlatUnits())if(i.css&&i.css.length>0){let s=`/* Part ${i.id} */`;s+=i.css.map(r=>typeof r=="function"?r():r).join(`
`)+`
`,s=`.${this.getCssClass()} {
	${s}
}`,t.push({css:s,id:i.id})}return this._getCssChunksCache=t}},LM=e=>{let t="",i="";for(const[o,n]of Object.entries(e.getParams())){const l=DM(o,n);if(l===!1)$(`Invalid value for param ${o} - ${HM(n)}`);else{const a=uv(o),c=a.replace("--ag-","--ag-inherited-");t+=`	${a}: var(${c}, ${l});
`,i+=`	${c}: var(${a});
`}}const s=`:where(.${e.getCssClass()})`;let r=`${s} {
${t}}
`;return r+=`:has(> ${s}):not(${s}) {
${i}}
`,{css:r,id:"variables"}},OM=e=>Array.from(new Set(Object.values(e.getParams()).flat().map(t=>t==null?void 0:t.googleFont).filter(t=>typeof t=="string"))).sort(),Hc=async({root:e,part:t,scope:i,css:s})=>{let r=`:scope > style[data-ag-part="${t}"]`;i&&(r+=`[data-ag-scope="${i}"]`);let o=e.querySelector(r);if(!o){o=document.createElement("style"),o.dataset.agPart=t,i&&(o.dataset.agScope=i);const n=e.querySelectorAll(":scope > style[data-ag-part]"),l=n[n.length-1];l?l.insertAdjacentElement("afterend",o):e.firstElementChild?e.firstElementChild.insertAdjacentElement("beforebegin",o):e.appendChild(o)}if(o._agTextContent!==s)return o.textContent=s,o._agTextContent=s,NM(o)},tg=(e,t)=>{for(const i of Array.from(t.querySelectorAll(`:scope > style[data-ag-scope="${e}"]`)))i.remove()},ig=new Set,GM=async e=>{if(ig.has(e))return;ig.add(e);const t=`@import url('https://${pv}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
`;return Hc({css:t,part:`googleFont:${e}`,root:document.head})},pv="fonts.googleapis.com",NM=e=>new Promise(t=>{const i=()=>{e.removeEventListener("load",i),t()};e.addEventListener("load",i)}),HM=e=>e==null?String(e):`${typeof e} ${e}`,BM='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);& input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:100%;opacity:0;width:100%}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&.ag-checked{background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:active,&:focus-within{box-shadow:var(--ag-focus-shadow)}&.ag-disabled{filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&.ag-checked:after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&.ag-indeterminate{background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-radio-button-input-wrapper{border-radius:100%;&.ag-checked:after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',VM=Oo("checkboxStyle","default").withAdditionalParams({checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:{ref:"backgroundColor"},checkboxUncheckedBorderColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},checkboxCheckedBackgroundColor:{ref:"accentColor"},checkboxCheckedBorderColor:{ref:"accentColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:{ref:"backgroundColor"},checkboxIndeterminateBackgroundColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},checkboxIndeterminateBorderColor:{ref:"foregroundColor",mix:.3,onto:"backgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:{ref:"backgroundColor"},radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}}).withCSS(BM),zM=Oo("colorScheme","light"),WM='.ag-icon:before{background-color:currentColor;content:"";display:block;height:var(--ag-icon-size);-webkit-mask-image:linear-gradient(#0000,#0000);mask-image:linear-gradient(#0000,#0000);-webkit-mask-size:contain;mask-size:contain;width:var(--ag-icon-size)}',fv={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-down":'<path d="m6 9 6 6 6-6"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',"small-up":'<path d="m18 15-6-6-6 6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},_M=(e={})=>{let t=WM;for(const i of Object.keys(fv)){const s=UM(i,e.strokeWidth||1.5);t+=`.ag-icon-${i}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(s)}'); }
`}return t},UM=(e,t)=>{const i=fv[e];if(!i)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon ag-icon-${e}" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+i+"</svg>"},jM=(e={})=>Oo("iconSet","quartz").withCSS(()=>_M(e)),KM=":where(input[class^=ag-][type=number]:not(.ag-number-field-input-stepper)){-moz-appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}}:where(input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);cursor:pointer;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color)}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}&.ag-ltr :where(input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]){padding-left:var(--ag-input-padding-start)}&.ag-rtl :where(input[class^=ag-]:not([type]),input[class^=ag-][type=text],input[class^=ag-][type=number],input[class^=ag-][type=tel],input[class^=ag-][type=date],input[class^=ag-][type=datetime-local],textarea[class^=ag-]){padding-right:var(--ag-input-padding-start)}",$M=Oo("inputStyle","base").withAdditionalParams({inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"}}).withCSS(KM),YM=av($M,"bordered").withParams({inputBackgroundColor:{ref:"backgroundColor"},inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:{ref:"accentColor"}},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:{ref:"foregroundColor",mix:.06,onto:"backgroundColor"},inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}}}),QM='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex;.ag-tabs-header{flex:1}}.ag-tabs-close-button-wrapper{border:0;padding:var(--ag-spacing)}&.ag-ltr .ag-tabs-close-button-wrapper{border-right:1px solid var(--ag-border-color)}&.ag-rtl .ag-tabs-close-button-wrapper{border-left:1px solid var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}&:focus-visible{box-shadow:inset var(--ag-focus-shadow)}}&.ag-ltr .ag-tab{&.ag-tab-selected{&:not(:first-of-type){border-left-color:var(--ag-tab-selected-border-color)}&:not(:last-of-type){border-right-color:var(--ag-tab-selected-border-color)}}}&.ag-rtl .ag-tab{&.ag-tab-selected{&:not(:first-of-type){border-right-color:var(--ag-tab-selected-border-color)}&:not(:last-of-type){border-left-color:var(--ag-tab-selected-border-color)}}}',qM=Oo("tabStyle","base").withAdditionalParams({tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:1,tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:"0",tabSelectedUnderlineTransitionDuration:"0",tabBarBorder:!1}).withCSS(QM),XM=av(qM,"quartz").withParams({tabBarBorder:!0,tabBarBackgroundColor:{ref:"foregroundColor",mix:.05},tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:{ref:"backgroundColor"}}),ZM=e=>TM(e).withPart(VM),nk=ZM("quartz").withPart(zM).withPart(jM).withPart(XM).withPart(()=>YM).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]});Kt.__registerModules([Zm,qD,fM,nM],!1,void 0);var _e=k.createContext({}),Go=(e,t,i,s)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const o=e.newAgStackInstance();if(o==null)return;let n,l,a=!1;return o.then(c=>{if(a){t.destroyBean(c);return}n=c,l=n.getGui(),i.appendChild(l),sg(s,n)}),()=>{var c;a=!0,n&&((c=l==null?void 0:l.parentElement)==null||c.removeChild(l),t.destroyBean(n),s&&sg(s,void 0))}},sg=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const i=e;i.current=t}},kt=(...e)=>e.filter(i=>i!=null&&i!=="").join(" "),yt=class mv{constructor(...t){this.classesMap={},t.forEach(i=>{this.classesMap[i]=!0})}setClass(t,i){if(!!this.classesMap[t]==i)return this;const r=new mv;return r.classesMap={...this.classesMap},r.classesMap[t]=i,r}toString(){return Object.keys(this.classesMap).filter(i=>this.classesMap[i]).join(" ")}},Sr=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,i=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===i()},ag,Bc=(ag=k.version)==null?void 0:ag.split(".")[0],JM=Bc==="16"||Bc==="17";function eT(){return Bc==="19"}var Rn=!1;function tT(e){return Rn||setTimeout(()=>Rn=!1,0),Rn=!0,e()}var dd=(e,t)=>{!JM&&e&&!Rn?Mw.flushSync(t):t()};function hd(e,t,i){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(i||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const s=[],r=[],o=new Map,n=new Map;for(let l=0;l<t.length;l++){const a=t[l];n.set(a.instanceId,a)}for(let l=0;l<e.length;l++){const a=e[l];o.set(a.instanceId,a),n.has(a.instanceId)&&s.push(a)}for(let l=0;l<t.length;l++){const a=t[l],c=a.instanceId;o.has(c)||r.push(a)}return s.length===e.length&&r.length===0?e:s.length===0&&r.length===t.length?t:s.length===0?r:r.length===0?s:[...s,...r]}var vv=C.forwardRef((e,t)=>{var q;const{ctrlsFactory:i,context:s}=C.useContext(_e),r=C.useRef(null),o=C.useRef(null),n=C.useRef(null),l=C.useRef(null),a=C.useRef(null),c=C.useRef(),[u,d]=C.useState(),[h,g]=C.useState(),[v,w]=C.useState(),[S,f]=C.useState(()=>new yt),[p,m]=C.useState(()=>new yt("ag-hidden")),[y,b]=C.useState(()=>new yt("ag-hidden")),[F,R]=C.useState(()=>new yt("ag-invisible"));C.useImperativeHandle(t,()=>({refresh(){return!1}})),C.useLayoutEffect(()=>Go(u,s,o.current),[u]);const E=C.useCallback(T=>{if(r.current=T,!T){c.current=s.destroyBean(c.current);return}const G={setInnerRenderer:(_,W)=>{d(_),w(W)},setChildCount:_=>g(_),addOrRemoveCssClass:(_,W)=>f(Ee=>Ee.setClass(_,W)),setContractedDisplayed:_=>b(W=>W.setClass("ag-hidden",!_)),setExpandedDisplayed:_=>m(W=>W.setClass("ag-hidden",!_)),setCheckboxVisible:_=>R(W=>W.setClass("ag-invisible",!_))},H=i.getInstance("groupCellRendererCtrl");H&&(c.current=s.createBean(H),c.current.init(G,T,n.current,l.current,a.current,vv,e))},[]),L=C.useMemo(()=>`ag-cell-wrapper ${S.toString()}`,[S]),A=C.useMemo(()=>`ag-group-expanded ${p.toString()}`,[p]),O=C.useMemo(()=>`ag-group-contracted ${y.toString()}`,[y]),V=C.useMemo(()=>`ag-group-checkbox ${F.toString()}`,[F]),Q=u&&u.componentFromFramework,Z=Q?u.componentClass:void 0,ue=u==null&&v!=null,Y=Qt(v,!0);return k.createElement("span",{className:L,ref:E,...e.colDef?{}:{role:(q=c.current)==null?void 0:q.getCellAriaRole()}},k.createElement("span",{className:A,ref:l}),k.createElement("span",{className:O,ref:a}),k.createElement("span",{className:V,ref:n}),k.createElement("span",{className:"ag-group-value",ref:o},ue&&k.createElement(k.Fragment,null,Y),Q&&k.createElement(Z,{...u.params})),k.createElement("span",{className:"ag-group-child-count"},h))}),rg=vv,gd=C.createContext({setMethods:()=>{}}),iT=e=>{const{initialProps:t,addUpdateCallback:i,CustomComponentClass:s,setMethods:r}=e,[{key:o,...n},l]=C.useState(t);return C.useEffect(()=>{i(a=>l(a))},[]),k.createElement(gd.Provider,{value:{setMethods:r}},k.createElement(s,{key:o,...n}))},sT=C.memo(iT),rT=0;function og(){return`agPortalKey_${++rT}`}var Cv=class{constructor(e,t,i,s){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=i,this.suppressFallbackMethods=!!s,this.statelessComponent=this.isStateless(this.reactComponent),this.key=og(),this.portalKey=og(),this.instanceCreated=this.isStatelessComponent()?we.resolve(!1):new we(r=>{this.resolveInstanceCreated=r})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){this.componentInstance&&typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy();const e=this.portal;e&&this.portalManager.destroyPortal(e)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),i=document.createElement(t||"div");return i.classList.add("ag-react-container"),e.reactContainer=i,i}addParentContainerStyleAndClasses(){this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&(D('Since v31.1 "getReactContainerStyle" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),Object.assign(this.eParentElement.style,this.componentInstance.getReactContainerStyle())),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses()&&(D('Since v31.1 "getReactContainerClasses" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),this.componentInstance.getReactContainerClasses().forEach(t=>this.eParentElement.classList.add(t))))}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return typeof Symbol=="function"&&Symbol.for}isStateless(e){return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&t[e]!=null||this.fallbackMethodAvailable(e)}callMethod(e,t){const i=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!i){setTimeout(()=>this.callMethod(e,t));return}const s=i[e];if(s)return s.apply(i,t);if(this.fallbackMethodAvailable(e))return this.fallbackMethod(e,t&&t[0]?t[0]:{})}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.createOrUpdatePortal(e),new we(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{var i;this.componentInstance=t,this.addParentContainerStyleAndClasses(),(i=this.resolveInstanceCreated)==null||i.call(this,!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=Tu.createPortal(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return C.createElement(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,e)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!!(!this.isStatelessComponent()&&this.getFrameworkComponentInstance())}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const i=this[`${e}Component`];if(!this.suppressFallbackMethods&&i)return i.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function pd(e,t,i){e.forEach(s=>{const r=t[s];r&&(i[s]=r)})}var Jt=class extends Cv{constructor(){super(...arguments),this.awaitUpdateCallback=new we(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=sT}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:i=>this.setMethods(i),addUpdateCallback:i=>{this.updateCallback=()=>(i(this.getProps()),new we(s=>{setTimeout(()=>{s()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,pd(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new we(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},oT=class extends Jt{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},nT=class extends Jt{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},lT=class extends Jt{constructor(){super(...arguments),this.label="",this.icon=null,this.shake=!1}setIcon(e,t){this.icon=e,this.shake=t,this.refreshProps()}setLabel(e){this.label=e,this.refreshProps()}getProps(){const e=super.getProps(),{label:t,icon:i,shake:s}=this;return e.label=t,e.icon=i,e.shake=s,e}},aT=class extends Jt{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterChangedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1}isFilterActive(){return this.model!=null}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.expectingNewMethods=!0,this.model=e,this.hasBeenActive||(this.hasBeenActive=this.isFilterActive()),this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getOptionalMethods(){return["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}setMethods(e){var t;this.expectingNewMethods===!1&&this.hasBeenActive&&((t=this.providedMethods)==null?void 0:t.doesFilterPass)!==(e==null?void 0:e.doesFilterPass)&&setTimeout(()=>{this.sourceParams.filterChangedCallback()}),this.expectingNewMethods=!1,super.setMethods(e)}updateModel(e){this.setModel(e).then(()=>this.sourceParams.filterChangedCallback())}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,delete e.filterModifiedCallback,delete e.valueGetter,e}};function wv(e,t){e.parentFilterInstance(i=>{(i.setModel(t)||we.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var cT=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=i=>this.updateModel(i)}getProps(){return{...this.floatingFilterParams,model:this.model,onModelChange:this.onModelChange}}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){pd(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),wv(this.floatingFilterParams,e)}},uT=class extends Jt{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),wv(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},dT=class extends Jt{refresh(e){this.sourceParams=e,this.refreshProps()}},hT=class extends Jt{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},gT=class extends Jt{refresh(e){this.sourceParams=e,this.refreshProps()}},pT=class extends Jt{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},fT=class extends Jt{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}};function fd(){D("As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.")}var mT=1e3,vT=class{constructor(e,t,i){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=i||mT}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter(t=>t!==e),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,i){this.portals=[...this.portals,e],this.waitForInstance(t,i),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(e,t,i=Date.now()){if(this.destroyed){t(null);return}if(e.rendered())t(e);else{if(Date.now()-i>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return;window.setTimeout(()=>{this.waitForInstance(e,t,i)})}}},CT=({ctrl:e})=>{const t=e.isAlive(),{context:i}=C.useContext(_e),s=t?e.getColId():void 0,[r,o]=C.useState(),n=C.useRef(),l=C.useRef(null),a=C.useRef(null),c=C.useRef(null),u=C.useRef(),d=C.useRef();t&&!d.current&&(d.current=new Ao(()=>l.current));const h=C.useCallback(S=>{var m;if(l.current=S,n.current=S?i.createBean(new mr):i.destroyBean(n.current),!S||!t)return;const f={setWidth:y=>{l.current&&(l.current.style.width=y)},addOrRemoveCssClass:(y,b)=>d.current.addOrRemoveCssClass(y,b),setAriaSort:y=>{l.current&&(y?IS(l.current,y):LS(l.current))},setUserCompDetails:y=>o(y),getUserCompInstance:()=>u.current||void 0};e.setComp(f,S,a.current,c.current,n.current);const p=e.getSelectAllGui();(m=a.current)==null||m.insertAdjacentElement("afterend",p),n.current.addDestroyFunc(()=>p.remove())},[]);C.useLayoutEffect(()=>Go(r,i,c.current,u),[r]),C.useEffect(()=>{e.setDragSource(l.current)},[r]);const g=C.useMemo(()=>!!((r==null?void 0:r.componentFromFramework)&&Sr(r.componentClass)),[r]),v=r&&r.componentFromFramework,w=r&&r.componentClass;return k.createElement("div",{ref:h,className:"ag-header-cell","col-id":s,role:"columnheader"},k.createElement("div",{ref:a,className:"ag-header-cell-resize",role:"presentation"}),k.createElement("div",{ref:c,className:"ag-header-cell-comp-wrapper",role:"presentation"},v&&g&&k.createElement(w,{...r.params}),v&&!g&&k.createElement(w,{...r.params,ref:u})))},wT=C.memo(CT),ST=({ctrl:e})=>{const{context:t,gos:i}=C.useContext(_e),[s,r]=C.useState(()=>new yt("ag-header-cell","ag-floating-filter")),[o,n]=C.useState(()=>new yt),[l,a]=C.useState(()=>new yt("ag-floating-filter-button","ag-hidden")),[c,u]=C.useState("false"),[d,h]=C.useState(),[,g]=C.useState(1),v=C.useRef(),w=C.useRef(null),S=C.useRef(null),f=C.useRef(null),p=C.useRef(null),m=C.useRef(),y=C.useRef(),b=Y=>{Y!=null&&m.current&&m.current(Y)},F=C.useCallback(Y=>{if(w.current=Y,v.current=Y?t.createBean(new mr):t.destroyBean(v.current),!Y)return;y.current=new we(T=>{m.current=T});const q={addOrRemoveCssClass:(T,G)=>r(H=>H.setClass(T,G)),addOrRemoveBodyCssClass:(T,G)=>n(H=>H.setClass(T,G)),setButtonWrapperDisplayed:T=>{a(G=>G.setClass("ag-hidden",!T)),u(T?"false":"true")},setWidth:T=>{w.current&&(w.current.style.width=T)},setCompDetails:T=>h(T),getFloatingFilterComp:()=>y.current?y.current:null,setMenuIcon:T=>{var G;return(G=p.current)==null?void 0:G.appendChild(T)}};e.setComp(q,Y,p.current,S.current,v.current)},[]);C.useLayoutEffect(()=>Go(d,t,S.current,b),[d]);const R=C.useMemo(()=>s.toString(),[s]),E=C.useMemo(()=>o.toString(),[o]),L=C.useMemo(()=>l.toString(),[l]),A=C.useMemo(()=>!!(d&&d.componentFromFramework&&Sr(d.componentClass)),[d]),O=C.useMemo(()=>i.get("reactiveCustomComponents"),[]),V=C.useMemo(()=>{if(d)if(O){const Y=new cT(d.params,()=>g(q=>q+1));return b(Y),Y}else d.componentFromFramework&&fd()},[d]),Q=V==null?void 0:V.getProps(),Z=d&&d.componentFromFramework,ue=d&&d.componentClass;return k.createElement("div",{ref:F,className:R,role:"gridcell"},k.createElement("div",{ref:S,className:E,role:"presentation"},Z&&!O&&k.createElement(ue,{...d.params,ref:A?()=>{}:b}),Z&&O&&k.createElement(gd.Provider,{value:{setMethods:Y=>V.setMethods(Y)}},k.createElement(ue,{...Q}))),k.createElement("div",{ref:f,"aria-hidden":c,className:L,role:"presentation"},k.createElement("button",{ref:p,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},yT=C.memo(ST),bT=({ctrl:e})=>{const{context:t}=C.useContext(_e),[i,s]=C.useState(()=>new yt),[r,o]=C.useState(()=>new yt),[n,l]=C.useState("false"),[a,c]=C.useState(),[u,d]=C.useState(),h=C.useMemo(()=>e.getColId(),[]),g=C.useRef(),v=C.useRef(null),w=C.useRef(null),S=C.useRef(null),f=C.useRef(),p=C.useCallback(E=>{if(v.current=E,g.current=E?t.createBean(new mr):t.destroyBean(g.current),!E)return;const L={setWidth:A=>{v.current&&(v.current.style.width=A)},addOrRemoveCssClass:(A,O)=>s(V=>V.setClass(A,O)),setHeaderWrapperHidden:A=>{const O=S.current;O&&(A?O.style.setProperty("display","none"):O.style.removeProperty("display"))},setHeaderWrapperMaxHeight:A=>{const O=S.current;O&&(A!=null?O.style.setProperty("max-height",`${A}px`):O.style.removeProperty("max-height"),O.classList.toggle("ag-header-cell-comp-wrapper-limited-height",A!=null))},setUserCompDetails:A=>d(A),setResizableDisplayed:A=>{o(O=>O.setClass("ag-hidden",!A)),l(A?"false":"true")},setAriaExpanded:A=>c(A),getUserCompInstance:()=>f.current||void 0};e.setComp(L,E,w.current,S.current,g.current)},[]);C.useLayoutEffect(()=>Go(u,t,S.current),[u]),C.useEffect(()=>{v.current&&e.setDragSource(v.current)},[u]);const m=C.useMemo(()=>!!((u==null?void 0:u.componentFromFramework)&&Sr(u.componentClass)),[u]),y=C.useMemo(()=>"ag-header-group-cell "+i.toString(),[i]),b=C.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),F=u&&u.componentFromFramework,R=u&&u.componentClass;return k.createElement("div",{ref:p,className:y,"col-id":h,role:"columnheader","aria-expanded":a},k.createElement("div",{ref:S,className:"ag-header-cell-comp-wrapper",role:"presentation"},F&&m&&k.createElement(R,{...u.params}),F&&!m&&k.createElement(R,{...u.params,ref:f})),k.createElement("div",{ref:w,"aria-hidden":n,className:b}))},RT=C.memo(bT),FT=({ctrl:e})=>{const{context:t}=C.useContext(_e),{topOffset:i,rowHeight:s}=C.useMemo(()=>e.getTopAndHeight(),[]),r=e.getAriaRowIndex(),o=e.getHeaderRowClass(),[n,l]=C.useState(()=>s+"px"),[a,c]=C.useState(()=>i+"px"),u=C.useRef(null),d=C.useRef(null),[h,g]=C.useState(()=>e.getHeaderCtrls()),v=C.useRef(),w=C.useRef(null),S=C.useCallback(m=>{if(w.current=m,v.current=m?t.createBean(new mr):t.destroyBean(v.current),!m)return;const y={setHeight:b=>l(b),setTop:b=>c(b),setHeaderCtrls:(b,F,R)=>{d.current=u.current,u.current=b;const E=hd(d.current,b,F);E!==d.current&&dd(R,()=>g(E))},setWidth:b=>{w.current&&(w.current.style.width=b)}};e.setComp(y,v.current,!1)},[]),f=C.useMemo(()=>({height:n,top:a}),[n,a]),p=C.useCallback(m=>{switch(e.getType()){case kc.COLUMN_GROUP:return k.createElement(RT,{ctrl:m,key:m.instanceId});case kc.FLOATING_FILTER:return k.createElement(yT,{ctrl:m,key:m.instanceId});default:return k.createElement(wT,{ctrl:m,key:m.instanceId})}},[]);return k.createElement("div",{ref:S,className:o,role:"row",style:f,"aria-rowindex":r},h.map(p))},xT=C.memo(FT),PT=({pinned:e})=>{const[t,i]=C.useState(!0),[s,r]=C.useState([]),{context:o}=C.useContext(_e),n=C.useRef(null),l=C.useRef(null),a=C.useRef(),c=e==="left",u=e==="right",d=!c&&!u,h=C.useCallback(w=>{if(n.current=w,a.current=w?o.createBean(new mR(e)):o.destroyBean(a.current),!w)return;const S={setDisplayed:i,setCtrls:f=>r(f),setCenterWidth:f=>{l.current&&(l.current.style.width=f)},setViewportScrollLeft:f=>{n.current&&(n.current.scrollLeft=f)},setPinnedContainerWidth:f=>{n.current&&(n.current.style.width=f,n.current.style.minWidth=f,n.current.style.maxWidth=f)}};a.current.setComp(S,n.current)},[]),g=t?"":"ag-hidden",v=()=>s.map(w=>k.createElement(xT,{ctrl:w,key:w.instanceId}));return k.createElement(k.Fragment,null,c&&k.createElement("div",{ref:h,className:"ag-pinned-left-header "+g,"aria-hidden":!t,role:"rowgroup"},v()),u&&k.createElement("div",{ref:h,className:"ag-pinned-right-header "+g,"aria-hidden":!t,role:"rowgroup"},v()),d&&k.createElement("div",{ref:h,className:"ag-header-viewport "+g,role:"presentation"},k.createElement("div",{ref:l,className:"ag-header-container",role:"rowgroup"},v())))},ya=C.memo(PT),ET=()=>{const[e,t]=C.useState(()=>new yt),[i,s]=C.useState(),{context:r}=C.useContext(_e),o=C.useRef(null),n=C.useRef(),l=C.useCallback(u=>{if(o.current=u,n.current=u?r.createBean(new Jb):r.destroyBean(n.current),!u)return;const d={addOrRemoveCssClass:(h,g)=>t(v=>v.setClass(h,g)),setHeightAndMinHeight:h=>s(h)};n.current.setComp(d,u,u)},[]),a=C.useMemo(()=>"ag-header "+e.toString(),[e]),c=C.useMemo(()=>({height:i,minHeight:i}),[i]);return k.createElement("div",{ref:l,className:a,style:c,role:"presentation"},k.createElement(ya,{pinned:"left"}),k.createElement(ya,{pinned:null}),k.createElement(ya,{pinned:"right"}))},DT=C.memo(ET),MT=(e,t)=>{C.useEffect(()=>{const i=t.current;if(i){const s=i.parentElement;if(s){const r=document.createComment(e);return s.insertBefore(r,i),()=>{s.removeChild(r)}}}},[e])},is=MT,TT=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new we(i=>{this.resolveInstanceCreated=i}),this.onValueChange=i=>this.updateValue(i),this.value=e.value}getProps(){return{...this.cellEditorParams,initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange}}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){pd(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){var t;this.componentInstance=e,(t=this.resolveInstanceCreated)==null||t.call(this),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isCancelBeforeStart","isCancelAfterEnd","focusIn","focusOut","afterGuiAttached"]}updateValue(e){this.value=e,this.refreshProps()}},kT=e=>{const t=C.useRef(e),i=C.useRef(),s=C.useRef(!1),r=C.useRef(!1),[,o]=C.useState(0);s.current&&(r.current=!0),C.useEffect(()=>(s.current||(i.current=t.current(),s.current=!0),o(n=>n+1),()=>{var n;r.current&&((n=i.current)==null||n.call(i))}),[])},AT=e=>{const[t,i]=C.useState(),{context:s,popupService:r,localeService:o,gos:n,editService:l}=C.useContext(_e);return kT(()=>{var y,b;const{editDetails:a,cellCtrl:c,eParentCell:u}=e,{compDetails:d}=a,h=n.get("stopEditingWhenCellsLoseFocus"),g=s.createBean(l.createPopupEditorWrapper(d.params)),v=g.getGui();if(e.jsChildComp){const F=e.jsChildComp.getGui();F&&v.appendChild(F)}const w={column:c.getColumn(),rowNode:c.getRowNode(),type:"popupCellEditor",eventSource:u,ePopup:v,position:a.popupPosition,keepWithinBounds:!0},S=r.positionPopupByComponent.bind(r,w),f=o.getLocaleTextFunc(),p=r.addPopup({modal:h,eChild:v,closeOnEsc:!0,closedCallback:()=>{c.onPopupEditorClosed()},anchorToElement:u,positionCallback:S,ariaLabel:f("ariaLabelCellEditor","Cell Editor")}),m=p?p.hideFunc:void 0;return i(g),(b=(y=e.jsChildComp)==null?void 0:y.afterGuiAttached)==null||b.call(y),()=>{m==null||m(),s.destroyBean(g)}}),k.createElement(k.Fragment,null,t&&e.wrappedContent&&Tu.createPortal(e.wrappedContent,t.getGui()))},ng=C.memo(AT),IT=(e,t,i,s,r,o)=>{const{context:n}=C.useContext(_e),l=C.useCallback(()=>{const a=r.current;if(!a)return;const c=a.getGui();c&&c.parentElement&&c.parentElement.removeChild(c),n.destroyBean(a),r.current=void 0},[]);C.useEffect(()=>{const a=e!=null,c=(e==null?void 0:e.compDetails)&&!e.compDetails.componentFromFramework,u=t&&i==null;if(!(a&&c&&!u)){l();return}const h=e.compDetails;if(r.current){const v=r.current,S=v.refresh!=null&&e.force==!1?v.refresh(h.params):!1;if(S===!0||S===void 0)return;l()}const g=h.newAgStackInstance();g!=null&&g.then(v=>{if(!v)return;const w=v.getGui();if(!w)return;(t?i:o.current).appendChild(w),r.current=v})},[e,t,s]),C.useEffect(()=>l,[])},LT=IT,OT=(e,t,i)=>{const{compProxy:s}=e;i(s);const r=s.getProps(),o=Sr(t);return k.createElement(gd.Provider,{value:{setMethods:n=>s.setMethods(n)}},o?k.createElement(t,{...r}):k.createElement(t,{...r,ref:n=>s.setRef(n)}))},lg=(e,t,i)=>{const s=e.compProxy;return k.createElement(k.Fragment,null,s?OT(e,t,i):k.createElement(t,{...e.compDetails.params,ref:i}))},GT=(e,t,i,s,r)=>{const o=e.compDetails,n=o.componentClass,l=o.componentFromFramework&&!e.popup,a=o.componentFromFramework&&e.popup,c=!o.componentFromFramework&&e.popup;return k.createElement(k.Fragment,null,l&&lg(e,n,t),a&&k.createElement(ng,{editDetails:e,cellCtrl:s,eParentCell:i,wrappedContent:lg(e,n,t)}),c&&r&&k.createElement(ng,{editDetails:e,cellCtrl:s,eParentCell:i,jsChildComp:r}))},NT=(e,t,i,s,r,o,n)=>{const{compDetails:l,value:a}=e,c=!l,u=l&&l.componentFromFramework,d=l&&l.componentClass,h=a!=null&&a.toString?a.toString():a,g=()=>k.createElement(k.Fragment,null,c&&k.createElement(k.Fragment,null,h),u&&!o&&k.createElement(d,{...l.params,key:t,ref:s}),u&&o&&k.createElement(d,{...l.params,key:t}));return k.createElement(k.Fragment,null,r?k.createElement("span",{role:"presentation",id:`cell-${i}`,className:"ag-cell-value",ref:n},g()):g())},HT=({cellCtrl:e,printLayout:t,editingRow:i})=>{const{context:s}=C.useContext(_e),{colIdSanitised:r,instanceId:o}=e,n=C.useRef(),[l,a]=C.useState(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[c,u]=C.useState(),[d,h]=C.useState(1),[g,v]=C.useState(),[w,S]=C.useState(!1),[f,p]=C.useState(!1),[m,y]=C.useState(!1),[b,F]=C.useState(),R=C.useMemo(()=>e.isForceWrapper(),[e]),E=C.useMemo(()=>e.getCellAriaRole(),[e]),L=C.useRef(null),A=C.useRef(null),O=C.useRef(),V=C.useRef(),Q=C.useRef(),Z=C.useRef([]),ue=C.useRef(),[Y,q]=C.useState(0),T=C.useCallback(oe=>{ue.current=oe,q(Fe=>Fe+1)},[]),G=l!=null&&(w||m||f),H=R||G,_=C.useCallback(oe=>{if(V.current=oe,oe){const Fe=oe.isCancelBeforeStart&&oe.isCancelBeforeStart();setTimeout(()=>{Fe?(e.stopEditing(!0),e.focusCell(!0)):e.cellEditorAttached()})}},[e]),W=C.useRef();W.current||(W.current=new Ao(()=>L.current)),LT(l,H,ue.current,Y,O,L);const Ee=C.useRef();C.useLayoutEffect(()=>{var Ne;const oe=Ee.current,Fe=l;if(Ee.current=l,oe==null||oe.compDetails==null||Fe==null||Fe.compDetails==null)return;const Ge=oe.compDetails,se=Fe.compDetails;if(Ge.componentClass!=se.componentClass||((Ne=A.current)==null?void 0:Ne.refresh)==null)return;A.current.refresh(se.params)!=!0&&h(he=>he+1)},[l]),C.useLayoutEffect(()=>{if(!(c&&!c.compDetails.componentFromFramework))return;const Fe=c.compDetails,Ge=c.popup===!0,se=Fe.newAgStackInstance();return se.then(xe=>{if(!xe)return;const Ne=xe.getGui();if(_(xe),!Ge){const he=(R?Q:L).current;he==null||he.appendChild(Ne),xe.afterGuiAttached&&xe.afterGuiAttached()}F(xe)}),()=>{se.then(xe=>{var he;const Ne=xe.getGui();s.destroyBean(xe),_(void 0),F(void 0),(he=Ne==null?void 0:Ne.parentElement)==null||he.removeChild(Ne)})}},[c]);const U=C.useCallback(oe=>{if(Q.current=oe,!oe){Z.current.forEach(Ge=>Ge()),Z.current=[];return}const Fe=Ge=>{if(Ge){const se=Ge.getGui();oe.insertAdjacentElement("afterbegin",se),Z.current.push(()=>{s.destroyBean(Ge),ys(se)})}return Ge};if(w){const Ge=e.createSelectionCheckbox();Fe(Ge)}m&&Fe(e.createDndSource()),f&&Fe(e.createRowDragComp())},[e,s,m,f,w]),ie=C.useCallback(oe=>{if(L.current=oe,n.current=oe?s.createBean(new mr):s.destroyBean(n.current),!oe||!e)return;const Fe={addOrRemoveCssClass:(se,xe)=>W.current.addOrRemoveCssClass(se,xe),setUserStyles:se=>v(se),getFocusableElement:()=>L.current,setIncludeSelection:se=>S(se),setIncludeRowDrag:se=>p(se),setIncludeDndSource:se=>y(se),getCellEditor:()=>V.current||null,getCellRenderer:()=>A.current??O.current,getParentOfValue:()=>ue.current??Q.current??L.current,setRenderDetails:(se,xe,Ne)=>{a(he=>(he==null?void 0:he.compDetails)!==se||(he==null?void 0:he.value)!==xe||(he==null?void 0:he.force)!==Ne?{value:xe,compDetails:se,force:Ne}:he)},setEditDetails:(se,xe,Ne,he)=>{if(se){let Ci;he?Ci=new TT(se.params,()=>h(Al=>Al+1)):se.componentFromFramework&&fd(),u({compDetails:se,popup:xe,popupPosition:Ne,compProxy:Ci}),xe||a(void 0)}else u(Ci=>{Ci!=null&&Ci.compProxy&&(V.current=void 0)})}},Ge=Q.current||void 0;e.setComp(Fe,oe,Ge,t,i,n.current)},[]),ee=C.useMemo(()=>{var Fe;return!!(((Fe=l==null?void 0:l.compDetails)==null?void 0:Fe.componentFromFramework)&&Sr(l.compDetails.componentClass))},[l]);C.useLayoutEffect(()=>{var oe;L.current&&(W.current.addOrRemoveCssClass("ag-cell-value",!H),W.current.addOrRemoveCssClass("ag-cell-inline-editing",!!c&&!c.popup),W.current.addOrRemoveCssClass("ag-cell-popup-editing",!!c&&!!c.popup),W.current.addOrRemoveCssClass("ag-cell-not-inline-editing",!c||!!c.popup),(oe=e.getRowCtrl())==null||oe.setInlineEditingCss(),e.shouldRestoreFocus()&&!e.isEditing()&&L.current.focus({preventScroll:!0}))});const Ue=()=>k.createElement(k.Fragment,null,l!=null&&NT(l,d,o,A,H,ee,T),c!=null&&GT(c,_,L.current,e,b)),Qi=C.useCallback(()=>e.onFocusOut(),[]);return k.createElement("div",{ref:ie,style:g,role:E,"col-id":r,onBlur:Qi},H?k.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:U},Ue()):Ue())},BT=C.memo(HT),VT=({rowCtrl:e,containerType:t})=>{const{context:i,gos:s}=C.useContext(_e),r=C.useRef(),o=C.useRef(e.getDomOrder()),n=e.isFullWidth(),l=e.getRowNode().displayed,[a,c]=C.useState(()=>l?e.getRowIndex():null),[u,d]=C.useState(()=>e.getRowId()),[h,g]=C.useState(()=>e.getBusinessKey()),[v,w]=C.useState(()=>e.getRowStyles()),S=C.useRef(null),f=C.useRef(null),[p,m]=C.useState(()=>null),[y,b]=C.useState(),[F,R]=C.useState(()=>l?e.getInitialRowTop(t):void 0),[E,L]=C.useState(()=>l?e.getInitialTransform(t):void 0),A=C.useRef(null),O=C.useRef(),V=C.useRef(!1),[Q,Z]=C.useState(0);C.useEffect(()=>{var ie;if(V.current||!y||Q>10)return;const U=(ie=A.current)==null?void 0:ie.firstChild;U?(e.setupDetailRowAutoHeight(U),V.current=!0):Z(ee=>ee+1)},[y,Q]);const ue=C.useRef();ue.current||(ue.current=new Ao(()=>A.current));const Y=C.useCallback(U=>{if(A.current=U,r.current=U?i.createBean(new mr):i.destroyBean(r.current),!U){e.unsetComp(t);return}if(!e.isAlive())return;const ie={setTop:R,setTransform:L,addOrRemoveCssClass:(ee,Ue)=>ue.current.addOrRemoveCssClass(ee,Ue),setDomOrder:ee=>o.current=ee,setRowIndex:c,setRowId:d,setRowBusinessKey:g,setUserStyles:w,setCellCtrls:(ee,Ue)=>{f.current=S.current;const Qi=hd(f.current,ee,o.current);Qi!==f.current&&(S.current=Qi,dd(Ue,()=>m(Qi)))},showFullWidth:ee=>b(ee),getFullWidthCellRenderer:()=>O.current,refreshFullWidth:ee=>_.current?(b(Ue=>({...Ue,params:ee()})),!0):!O.current||!O.current.refresh?!1:O.current.refresh(ee())};e.setComp(ie,U,t,r.current)},[]);C.useLayoutEffect(()=>Go(y,i,A.current,O),[y]);const q=C.useMemo(()=>{const U={top:F,transform:E};return Object.assign(U,v),U},[F,E,v]),T=n&&(y==null?void 0:y.componentFromFramework),G=!n&&p!=null,H=C.useMemo(()=>!!((y==null?void 0:y.componentFromFramework)&&Sr(y.componentClass)),[y]),_=C.useRef(!1);C.useEffect(()=>{_.current=H&&!!y&&!!s.get("reactiveCustomComponents")},[H,y]);const W=()=>p==null?void 0:p.map(U=>k.createElement(BT,{cellCtrl:U,editingRow:e.isEditing(),printLayout:e.isPrintLayout(),key:U.instanceId})),Ee=()=>{const U=y.componentClass;return k.createElement(k.Fragment,null,H?k.createElement(U,{...y.params}):k.createElement(U,{...y.params,ref:O}))};return k.createElement("div",{ref:Y,role:"row",style:q,"row-index":a,"row-id":u,"row-business-key":h},G&&W(),T&&Ee())},zT=C.memo(VT),WT=({name:e})=>{const{context:t}=C.useContext(_e),i=C.useMemo(()=>_s(e),[e]),s=C.useRef(null),r=C.useRef(null),o=C.useRef([]),n=C.useRef([]),[l,a]=C.useState(()=>[]),c=C.useRef(!1),u=C.useRef(),d=C.useMemo(()=>kt(i.viewport),[i]),h=C.useMemo(()=>kt(i.container),[i]),g=i.type==="center",v=g?s:r;is(" AG Row Container "+e+" ",v);const w=C.useCallback(()=>g?s.current!=null&&r.current!=null:r.current!=null,[]),S=C.useCallback(()=>g?s.current==null&&r.current==null:r.current==null,[]),f=C.useCallback(()=>{if(S()&&(u.current=t.destroyBean(u.current)),w()){const b=R=>{const E=hd(n.current,o.current,c.current);E!==n.current&&(n.current=E,dd(R,()=>a(E)))},F={setHorizontalScroll:R=>{s.current&&(s.current.scrollLeft=R)},setViewportHeight:R=>{s.current&&(s.current.style.height=R)},setRowCtrls:({rowCtrls:R,useFlushSync:E})=>{const L=!!E&&o.current.length>0&&R.length>0;o.current=R,b(L)},setDomOrder:R=>{c.current!=R&&(c.current=R,b(!1))},setContainerWidth:R=>{r.current&&(r.current.style.width=R)},setOffsetTop:R=>{r.current&&(r.current.style.transform=`translateY(${R})`)}};u.current=t.createBean(new aF(e)),u.current.setComp(F,r.current,s.current)}},[w,S]),p=C.useCallback(b=>{r.current=b,f()},[f]),m=C.useCallback(b=>{s.current=b,f()},[f]),y=()=>k.createElement("div",{className:h,ref:p,role:"rowgroup"},l.map(b=>k.createElement(zT,{rowCtrl:b,containerType:i.type,key:b.instanceId})));return k.createElement(k.Fragment,null,g?k.createElement("div",{className:d,ref:m,role:"presentation"},y()):y())},_T=C.memo(WT),UT=()=>{const{context:e,resizeObserverService:t}=C.useContext(_e),[i,s]=C.useState(""),[r,o]=C.useState(0),[n,l]=C.useState(0),[a,c]=C.useState("0px"),[u,d]=C.useState("0px"),[h,g]=C.useState("100%"),[v,w]=C.useState("0px"),[S,f]=C.useState("0px"),[p,m]=C.useState("100%"),[y,b]=C.useState(""),[F,R]=C.useState(""),[E,L]=C.useState(null),[A,O]=C.useState(""),[V,Q]=C.useState(null),[Z,ue]=C.useState("ag-layout-normal"),Y=C.useRef();Y.current||(Y.current=new Ao(()=>q.current));const q=C.useRef(null),T=C.useRef(null),G=C.useRef(null),H=C.useRef(null),_=C.useRef(null),W=C.useRef(null),Ee=C.useRef(null),U=C.useRef([]),ie=C.useRef([]);is(" AG Grid Body ",q),is(" AG Pinned Top ",T),is(" AG Sticky Top ",G),is(" AG Middle ",W),is(" AG Pinned Bottom ",Ee);const ee=C.useCallback(Vt=>{if(q.current=Vt,!Vt){U.current=e.destroyBeans(U.current),ie.current.forEach(ye=>ye()),ie.current=[];return}if(!e)return;const No=(ye,lt)=>{ye.appendChild(lt),ie.current.push(()=>ye.removeChild(lt))},Il=ye=>{const lt=e.createBean(new ye);return U.current.push(lt),lt},br=(ye,lt,Rv)=>{No(ye,document.createComment(Rv)),No(ye,Il(lt).getGui())};br(Vt,CR," AG Fake Horizontal Scroll "),br(Vt,vR," AG Overlay Wrapper "),_.current&&br(_.current,wR," AG Fake Vertical Scroll ");const bv={setRowAnimationCssOnBodyViewport:s,setColumnCount:ye=>{q.current&&kS(q.current,ye)},setRowCount:ye=>{q.current&&MS(q.current,ye)},setTopHeight:o,setBottomHeight:l,setStickyTopHeight:c,setStickyTopTop:d,setStickyTopWidth:g,setTopDisplay:b,setBottomDisplay:R,setColumnMovingCss:(ye,lt)=>Y.current.addOrRemoveCssClass(ye,lt),updateLayoutClasses:ue,setAlwaysVerticalScrollClass:L,setPinnedTopBottomOverflowY:O,setCellSelectableCss:(ye,lt)=>Q(lt?ye:null),setBodyViewportWidth:ye=>{W.current&&(W.current.style.width=ye)},registerBodyViewportResizeListener:ye=>{if(W.current){const lt=t.observeResize(W.current,ye);ie.current.push(()=>lt())}},setStickyBottomHeight:w,setStickyBottomBottom:f,setStickyBottomWidth:m},md=e.createBean(new hF);U.current.push(md),md.setComp(bv,Vt,W.current,T.current,Ee.current,G.current,H.current)},[]),Ue=C.useMemo(()=>kt("ag-root","ag-unselectable",Z),[Z]),Qi=C.useMemo(()=>kt("ag-body-viewport",i,Z,E,V),[i,Z,E,V]),oe=C.useMemo(()=>kt("ag-body",Z),[Z]),Fe=C.useMemo(()=>kt("ag-floating-top",V),[V]),Ge=C.useMemo(()=>kt("ag-sticky-top",V),[V]),se=C.useMemo(()=>kt("ag-sticky-bottom",v==="0px"?"ag-hidden":null,V),[V,v]),xe=C.useMemo(()=>kt("ag-floating-bottom",V),[V]),Ne=C.useMemo(()=>({height:r,minHeight:r,display:y,overflowY:A}),[r,y,A]),he=C.useMemo(()=>({height:a,top:u,width:h}),[a,u,h]),Ci=C.useMemo(()=>({height:v,bottom:S,width:p}),[v,S,p]),Al=C.useMemo(()=>({height:n,minHeight:n,display:F,overflowY:A}),[n,F,A]),yv=Vt=>k.createElement(_T,{name:Vt,key:`${Vt}-container`}),yr=({section:Vt,children:No,className:Il,style:br})=>k.createElement("div",{ref:Vt,className:Il,role:"presentation",style:br},No.map(yv));return k.createElement("div",{ref:ee,className:Ue,role:"treegrid"},k.createElement(DT,null),yr({section:T,className:Fe,style:Ne,children:["topLeft","topCenter","topRight","topFullWidth"]}),k.createElement("div",{className:oe,ref:_,role:"presentation"},yr({section:W,className:Qi,children:["left","center","right","fullWidth"]})),yr({section:G,className:Ge,style:he,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),yr({section:H,className:se,style:Ci,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),yr({section:Ee,className:xe,style:Al,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},jT=C.memo(UT),KT=(e,t)=>{const{children:i,eFocusableElement:s,onTabKeyDown:r,gridCtrl:o,forceFocusOutWhenTabGuardsAreEmpty:n}=e,{context:l}=C.useContext(_e),a=C.useRef(null),c=C.useRef(null),u=C.useRef(),d=S=>{const f=S==null?void 0:parseInt(S,10).toString();[a,c].forEach(p=>{var m,y;f===void 0?(m=p.current)==null||m.removeAttribute("tabindex"):(y=p.current)==null||y.setAttribute("tabindex",f)})};C.useImperativeHandle(t,()=>({forceFocusOutOfContainer(S){var f;(f=u.current)==null||f.forceFocusOutOfContainer(S)}}));const h=C.useCallback(()=>{const S=a.current,f=c.current;if(!S&&!f){u.current=l.destroyBean(u.current);return}if(S&&f){const p={setTabIndex:d};u.current=l.createBean(new _m({comp:p,eTopGuard:S,eBottomGuard:f,eFocusableElement:s,onTabKeyDown:r,forceFocusOutWhenTabGuardsAreEmpty:n,focusInnerElement:m=>o.focusInnerElement(m)}))}},[]),g=C.useCallback(S=>{a.current=S,h()},[h]),v=C.useCallback(S=>{c.current=S,h()},[h]),w=S=>{const f=S==="top"?yn.TAB_GUARD_TOP:yn.TAB_GUARD_BOTTOM;return k.createElement("div",{className:`${yn.TAB_GUARD} ${f}`,role:"presentation",ref:S==="top"?g:v})};return k.createElement(k.Fragment,null,w("top"),i,w("bottom"))},$T=C.forwardRef(KT),YT=C.memo($T),QT=({context:e})=>{const[t,i]=C.useState(""),[s,r]=C.useState(""),[o,n]=C.useState(""),[l,a]=C.useState(null),[c,u]=C.useState(null),[d,h]=C.useState(!1),[g,v]=C.useState(),w=C.useRef(),S=C.useRef(null),f=C.useRef(),[p,m]=C.useState(null),y=C.useRef(()=>{}),b=C.useRef(),F=C.useRef([]),R=C.useCallback(()=>{},[]),E=C.useMemo(()=>e.isDestroyed()?null:e.getBeans(),[e]);is(" AG Grid ",S);const L=C.useCallback(Z=>{if(S.current=Z,w.current=Z?e.createBean(new jx):e.destroyBean(w.current),!Z||e.isDestroyed())return;const ue=w.current;y.current=ue.focusInnerElement.bind(ue);const Y={destroyGridUi:()=>{},setRtlClass:i,setGridThemeClass:r,forceFocusOutOfContainer:q=>{var T,G;if(!q&&((T=b.current)!=null&&T.isDisplayed())){b.current.forceFocusOutOfContainer(q);return}(G=f.current)==null||G.forceFocusOutOfContainer(q)},updateLayoutClasses:n,getFocusableContainers:()=>{var G;const q=[],T=(G=S.current)==null?void 0:G.querySelector(".ag-root");return T&&q.push({getGui:()=>T}),F.current.forEach(H=>{H.isDisplayed()&&q.push(H)}),q},setCursor:a,setUserSelect:u};ue.setComp(Y,Z,Z),h(!0)},[]);C.useEffect(()=>{const Z=w.current,ue=S.current;if(!g||!E||!Z||!p||!ue)return;const Y=[],{watermarkSelector:q,paginationSelector:T,sideBarSelector:G,statusBarSelector:H,gridHeaderDropZonesSelector:_}=Z.getOptionalSelectors(),W=[];if(_){const U=e.createBean(new _.component),ie=U.getGui();ue.insertAdjacentElement("afterbegin",ie),W.push(ie),Y.push(U)}if(G){const U=e.createBean(new G.component),ie=U.getGui(),ee=p.querySelector(".ag-tab-guard-bottom");ee&&(ee.insertAdjacentElement("beforebegin",ie),W.push(ie)),Y.push(U),F.current.push(U)}const Ee=U=>{const ie=e.createBean(new U),ee=ie.getGui();return ue.insertAdjacentElement("beforeend",ee),W.push(ee),Y.push(ie),ie};if(H&&Ee(H.component),T){const U=Ee(T.component);b.current=U,F.current.push(U)}return q&&Ee(q.component),()=>{e.destroyBeans(Y),W.forEach(U=>{var ie;(ie=U.parentElement)==null||ie.removeChild(U)})}},[g,p,E]);const A=C.useMemo(()=>kt("ag-root-wrapper",t,s,o),[t,s,o]),O=C.useMemo(()=>kt("ag-root-wrapper-body","ag-focus-managed",o),[o]),V=C.useMemo(()=>({userSelect:c??"",WebkitUserSelect:c??"",cursor:l??""}),[c,l]),Q=C.useCallback(Z=>{f.current=Z,v(Z!==null)},[]);return k.createElement("div",{ref:L,className:A,style:V,role:"presentation"},k.createElement("div",{className:O,ref:m,role:"presentation"},d&&p&&E&&k.createElement(_e.Provider,{value:E},k.createElement(YT,{ref:Q,eFocusableElement:p,onTabKeyDown:R,gridCtrl:w.current,forceFocusOutWhenTabGuardsAreEmpty:!0},k.createElement(jT,null)))))},qT=C.memo(QT),XT=class extends P{wireBeans(e){this.ctrlsService=e.ctrlsService}areHeaderCellsRendered(){return this.ctrlsService.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(t=>t.areCellsRendered()))}},Sv=e=>{var S;const t=C.useRef(),i=C.useRef(null),s=C.useRef(null),r=C.useRef([]),o=C.useRef([]),n=C.useRef(e),l=C.useRef(),a=C.useRef(),c=C.useRef(!1),[u,d]=C.useState(void 0),[,h]=C.useState(0),g=C.useCallback(f=>{if(i.current=f,!f){r.current.forEach(O=>O()),r.current.length=0;return}const p=e.modules||[];s.current||(s.current=new vT(()=>h(O=>O+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),r.current.push(()=>{var O;(O=s.current)==null||O.destroy(),s.current=null}));const m=SS(e.gridOptions,e),y=()=>{if(c.current){const O=()=>{var Q;return(Q=l.current)!=null&&Q.shouldQueueUpdates()?void 0:o.current.shift()};let V=O();for(;V;)V(),V=O()}},b=new tk(y);l.current=b;const F=new XT,R={providedBeanInstances:{frameworkComponentWrapper:new JT(s.current,m.reactiveCustomComponents??CD("reactiveCustomComponents")??!0),renderStatusService:F},modules:p,frameworkOverrides:b},E=O=>{d(O),O.createBean(F),r.current.push(()=>{O.destroy()}),O.getBean("ctrlsService").whenReady({addDestroyFunc:V=>{r.current.push(V)}},()=>{var Q;if(O.isDestroyed())return;const V=t.current;V&&((Q=e.setGridApi)==null||Q.call(e,V))})},L=O=>{O.getBean("ctrlsService").whenReady({addDestroyFunc:V=>{r.current.push(V)}},()=>{o.current.forEach(V=>V()),o.current.length=0,c.current=!0})},A=new SD;m.gridId??(m.gridId=a.current),t.current=A.create(f,m,E,L,R),r.current.push(()=>{t.current=void 0}),t.current&&(a.current=t.current.getGridId())},[]),v=C.useMemo(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),w=C.useCallback(f=>{var p;c.current&&!((p=l.current)!=null&&p.shouldQueueUpdates())?f():o.current.push(f)},[]);return C.useEffect(()=>{const f=ZT(n.current,e);n.current=e,w(()=>{t.current&&yS(f,t.current)})},[e]),k.createElement("div",{style:v,className:e.className,ref:g},u&&!u.isDestroyed()?k.createElement(qT,{context:u}):null,((S=s.current)==null?void 0:S.getPortals())??null)};function ZT(e,t){const i={};return Object.keys(t).forEach(s=>{const r=t[s];e[s]!==r&&(i[s]=r)}),i}var JT=class extends MD{constructor(e,t){super(),this.parent=e,this.reactiveCustomComponents=t}createWrapper(e,t){if(this.reactiveCustomComponents){const r=(o=>{switch(o){case"filter":return aT;case"floatingFilterComponent":return uT;case"dateComponent":return nT;case"dragAndDropImageComponent":return lT;case"loadingOverlayComponent":return dT;case"noRowsOverlayComponent":return gT;case"statusPanel":return pT;case"toolPanel":return fT;case"menuItem":return hT;case"cellRenderer":return oT}})(t.propertyName);if(r)return new r(e,this.parent,t)}else switch(t.propertyName){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":fd();break}const i=!t.cellRenderer&&t.propertyName!=="toolPanel";return new Cv(e,this.parent,t,i)}},ek=C.forwardRef((e,t)=>{const{ctrlsFactory:i,context:s,gos:r,resizeObserverService:o,rowModel:n}=C.useContext(_e),[l,a]=C.useState(()=>new yt),[c,u]=C.useState(()=>new yt),[d,h]=C.useState(),[g,v]=C.useState(),w=C.useRef(),S=C.useRef(null),f=C.useRef(),p=C.useMemo(()=>Kt.__getGridRegisteredModules(e.api.getGridId()),[e]),m=C.useMemo(()=>l.toString()+" ag-details-row",[l]),y=C.useMemo(()=>c.toString()+" ag-details-grid",[c]);t&&C.useImperativeHandle(t,()=>({refresh(){var R;return((R=w.current)==null?void 0:R.refresh())??!1}})),e.template&&D("detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://ag-grid.com/react-data-grid/master-detail-custom-detail/");const b=C.useCallback(R=>{var A;if(S.current=R,!R){w.current=s.destroyBean(w.current),(A=f.current)==null||A.call(f);return}const E={addOrRemoveCssClass:(O,V)=>a(Q=>Q.setClass(O,V)),addOrRemoveDetailGridCssClass:(O,V)=>u(Q=>Q.setClass(O,V)),setDetailGrid:O=>h(O),setRowData:O=>v(O),getGui:()=>S.current},L=i.getInstance("detailCellRenderer");if(L&&(s.createBean(L),L.init(E,e),w.current=L,r.get("detailRowAutoHeight"))){const O=()=>{if(S.current==null)return;const V=S.current.clientHeight;V!=null&&V>0&&setTimeout(()=>{e.node.setRowHeight(V),(ae(r)||Xt(r))&&n.onRowHeightChanged()},0)};f.current=o.observeResize(R,O),O()}},[]),F=C.useCallback(R=>{var E;(E=w.current)==null||E.registerDetailWithMaster(R)},[]);return k.createElement("div",{className:m,ref:b},d&&k.createElement(Sv,{className:y,...d,modules:p,rowData:g,setGridApi:F}))}),tk=class extends Um{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.frameworkComponents={agGroupCellRenderer:rg,agGroupRowRenderer:rg,agDetailCellRenderer:ek},this.wrapIncoming=(t,i)=>i==="ensureVisible"?tT(t):t(),this.renderingEngine="react"}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}getLockOnRefresh(){this.queueUpdates=!0}releaseLockOnRefresh(){this.queueUpdates=!1,this.processQueuedUpdates()}shouldQueueUpdates(){return this.queueUpdates}runWhenReadyAsync(){return eT()}},lk=class extends C.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e,this.apiListeners.forEach(t=>t(e))}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return k.createElement(Sv,{...this.props,setGridApi:this.setGridApi})}};export{lk as A,Tu as r,nk as t};
