@objectql/studio 1.3.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/assets/index-CQ64O3eC.js +416 -0
- package/dist/assets/index-ClGKK4W3.css +1 -0
- package/dist/index.html +2 -2
- package/package.json +13 -2
- package/postcss.config.cjs +6 -0
- package/src/App.tsx +22 -36
- package/src/components/FileEditor.tsx +95 -0
- package/src/components/Sidebar.tsx +97 -0
- package/src/components/ui/button.tsx +60 -0
- package/src/components/ui/card.tsx +76 -0
- package/src/hooks/use-metadata.ts +39 -0
- package/src/index.css +57 -21
- package/src/lib/utils.ts +6 -0
- package/src/pages/Dashboard.tsx +36 -0
- package/src/pages/ObjectView.tsx +179 -0
- package/src/pages/SchemaEditor.tsx +85 -0
- package/tailwind.config.cjs +77 -0
- package/tsconfig.json +5 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/vite.config.ts +6 -0
- package/dist/assets/index-BkeseS5P.js +0 -67
- package/dist/assets/index-YYlEozoH.css +0 -1
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
function ub(e,t){for(var i=0;i<t.length;i++){const s=t[i];if(typeof s!="string"&&!Array.isArray(s)){for(const n in s)if(n!=="default"&&!(n in e)){const r=Object.getOwnPropertyDescriptor(s,n);r&&Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>s[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))s(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function i(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(n){if(n.ep)return;n.ep=!0;const r=i(n);fetch(n.href,r)}})();function Ww(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Uw={exports:{}},Bc={},zw={exports:{}},ce={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var uu=Symbol.for("react.element"),db=Symbol.for("react.portal"),cb=Symbol.for("react.fragment"),hb=Symbol.for("react.strict_mode"),pb=Symbol.for("react.profiler"),gb=Symbol.for("react.provider"),fb=Symbol.for("react.context"),mb=Symbol.for("react.forward_ref"),Cb=Symbol.for("react.suspense"),vb=Symbol.for("react.memo"),yb=Symbol.for("react.lazy"),rv=Symbol.iterator;function wb(e){return e===null||typeof e!="object"?null:(e=rv&&e[rv]||e["@@iterator"],typeof e=="function"?e:null)}var $w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},jw=Object.assign,Kw={};function sl(e,t,i){this.props=e,this.context=t,this.refs=Kw,this.updater=i||$w}sl.prototype.isReactComponent={};sl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};sl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Yw(){}Yw.prototype=sl.prototype;function _f(e,t,i){this.props=e,this.context=t,this.refs=Kw,this.updater=i||$w}var Of=_f.prototype=new Yw;Of.constructor=_f;jw(Of,sl.prototype);Of.isPureReactComponent=!0;var ov=Array.isArray,Qw=Object.prototype.hasOwnProperty,Gf={current:null},qw={key:!0,ref:!0,__self:!0,__source:!0};function Xw(e,t,i){var s,n={},r=null,o=null;if(t!=null)for(s in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(r=""+t.key),t)Qw.call(t,s)&&!qw.hasOwnProperty(s)&&(n[s]=t[s]);var l=arguments.length-2;if(l===1)n.children=i;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}if(e&&e.defaultProps)for(s in l=e.defaultProps,l)n[s]===void 0&&(n[s]=l[s]);return{$$typeof:uu,type:e,key:r,ref:o,props:n,_owner:Gf.current}}function Sb(e,t){return{$$typeof:uu,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function kf(e){return typeof e=="object"&&e!==null&&e.$$typeof===uu}function Eb(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(i){return t[i]})}var lv=/\/+/g;function Qh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Eb(""+e.key):t.toString(36)}function od(e,t,i,s,n){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(r){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case uu:case db:o=!0}}if(o)return o=e,n=n(o),e=s===""?"."+Qh(o,0):s,ov(n)?(i="",e!=null&&(i=e.replace(lv,"$&/")+"/"),od(n,t,i,"",function(u){return u})):n!=null&&(kf(n)&&(n=Sb(n,i+(!n.key||o&&o.key===n.key?"":(""+n.key).replace(lv,"$&/")+"/")+e)),t.push(n)),1;if(o=0,s=s===""?".":s+":",ov(e))for(var l=0;l<e.length;l++){r=e[l];var a=s+Qh(r,l);o+=od(r,t,i,a,n)}else if(a=wb(e),typeof a=="function")for(e=a.call(e),l=0;!(r=e.next()).done;)r=r.value,a=s+Qh(r,l++),o+=od(r,t,i,a,n);else if(r==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Ou(e,t,i){if(e==null)return e;var s=[],n=0;return od(e,s,"","",function(r){return t.call(i,r,n++)}),s}function Rb(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(i){(e._status===0||e._status===-1)&&(e._status=1,e._result=i)},function(i){(e._status===0||e._status===-1)&&(e._status=2,e._result=i)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ut={current:null},ld={transition:null},Tb={ReactCurrentDispatcher:Ut,ReactCurrentBatchConfig:ld,ReactCurrentOwner:Gf};function Zw(){throw Error("act(...) is not supported in production builds of React.")}ce.Children={map:Ou,forEach:function(e,t,i){Ou(e,function(){t.apply(this,arguments)},i)},count:function(e){var t=0;return Ou(e,function(){t++}),t},toArray:function(e){return Ou(e,function(t){return t})||[]},only:function(e){if(!kf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ce.Component=sl;ce.Fragment=cb;ce.Profiler=pb;ce.PureComponent=_f;ce.StrictMode=hb;ce.Suspense=Cb;ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Tb;ce.act=Zw;ce.cloneElement=function(e,t,i){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var s=jw({},e.props),n=e.key,r=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(r=t.ref,o=Gf.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)Qw.call(t,a)&&!qw.hasOwnProperty(a)&&(s[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)s.children=i;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}return{$$typeof:uu,type:e.type,key:n,ref:r,props:s,_owner:o}};ce.createContext=function(e){return e={$$typeof:fb,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:gb,_context:e},e.Consumer=e};ce.createElement=Xw;ce.createFactory=function(e){var t=Xw.bind(null,e);return t.type=e,t};ce.createRef=function(){return{current:null}};ce.forwardRef=function(e){return{$$typeof:mb,render:e}};ce.isValidElement=kf;ce.lazy=function(e){return{$$typeof:yb,_payload:{_status:-1,_result:e},_init:Rb}};ce.memo=function(e,t){return{$$typeof:vb,type:e,compare:t===void 0?null:t}};ce.startTransition=function(e){var t=ld.transition;ld.transition={};try{e()}finally{ld.transition=t}};ce.unstable_act=Zw;ce.useCallback=function(e,t){return Ut.current.useCallback(e,t)};ce.useContext=function(e){return Ut.current.useContext(e)};ce.useDebugValue=function(){};ce.useDeferredValue=function(e){return Ut.current.useDeferredValue(e)};ce.useEffect=function(e,t){return Ut.current.useEffect(e,t)};ce.useId=function(){return Ut.current.useId()};ce.useImperativeHandle=function(e,t,i){return Ut.current.useImperativeHandle(e,t,i)};ce.useInsertionEffect=function(e,t){return Ut.current.useInsertionEffect(e,t)};ce.useLayoutEffect=function(e,t){return Ut.current.useLayoutEffect(e,t)};ce.useMemo=function(e,t){return Ut.current.useMemo(e,t)};ce.useReducer=function(e,t,i){return Ut.current.useReducer(e,t,i)};ce.useRef=function(e){return Ut.current.useRef(e)};ce.useState=function(e){return Ut.current.useState(e)};ce.useSyncExternalStore=function(e,t,i){return Ut.current.useSyncExternalStore(e,t,i)};ce.useTransition=function(){return Ut.current.useTransition()};ce.version="18.3.1";zw.exports=ce;var y=zw.exports;const O=Ww(y),Db=ub({__proto__:null,default:O},[y]);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Pb=y,bb=Symbol.for("react.element"),Fb=Symbol.for("react.fragment"),Ab=Object.prototype.hasOwnProperty,xb=Pb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Lb={key:!0,ref:!0,__self:!0,__source:!0};function Jw(e,t,i){var s,n={},r=null,o=null;i!==void 0&&(r=""+i),t.key!==void 0&&(r=""+t.key),t.ref!==void 0&&(o=t.ref);for(s in t)Ab.call(t,s)&&!Lb.hasOwnProperty(s)&&(n[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)n[s]===void 0&&(n[s]=t[s]);return{$$typeof:bb,type:e,key:r,ref:o,props:n,_owner:xb.current}}Bc.Fragment=Fb;Bc.jsx=Jw;Bc.jsxs=Jw;Uw.exports=Bc;var x=Uw.exports,Xp={},eS={exports:{}},bi={},tS={exports:{}},iS={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(G,H){var W=G.length;G.push(H);e:for(;0<W;){var X=W-1>>>1,ee=G[X];if(0<n(ee,H))G[X]=H,G[W]=ee,W=X;else break e}}function i(G){return G.length===0?null:G[0]}function s(G){if(G.length===0)return null;var H=G[0],W=G.pop();if(W!==H){G[0]=W;e:for(var X=0,ee=G.length,Ee=ee>>>1;X<Ee;){var gt=2*(X+1)-1,Re=G[gt],nt=gt+1,Ke=G[nt];if(0>n(Re,W))nt<ee&&0>n(Ke,Re)?(G[X]=Ke,G[nt]=W,X=nt):(G[X]=Re,G[gt]=W,X=gt);else if(nt<ee&&0>n(Ke,W))G[X]=Ke,G[nt]=W,X=nt;else break e}}return H}function n(G,H){var W=G.sortIndex-H.sortIndex;return W!==0?W:G.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var r=performance;e.unstable_now=function(){return r.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var a=[],u=[],d=1,c=null,p=3,C=!1,v=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(G){for(var H=i(u);H!==null;){if(H.callback===null)s(u);else if(H.startTime<=G)s(u),H.sortIndex=H.expirationTime,t(a,H);else break;H=i(u)}}function T(G){if(S=!1,R(G),!v)if(i(a)!==null)v=!0,fe(P);else{var H=i(u);H!==null&&ge(T,H.startTime-G)}}function P(G,H){v=!1,S&&(S=!1,w(M),M=-1),C=!0;var W=p;try{for(R(H),c=i(a);c!==null&&(!(c.expirationTime>H)||G&&!$());){var X=c.callback;if(typeof X=="function"){c.callback=null,p=c.priorityLevel;var ee=X(c.expirationTime<=H);H=e.unstable_now(),typeof ee=="function"?c.callback=ee:c===i(a)&&s(a),R(H)}else s(a);c=i(a)}if(c!==null)var Ee=!0;else{var gt=i(u);gt!==null&&ge(T,gt.startTime-H),Ee=!1}return Ee}finally{c=null,p=W,C=!1}}var F=!1,b=null,M=-1,N=5,k=-1;function $(){return!(e.unstable_now()-k<N)}function U(){if(b!==null){var G=e.unstable_now();k=G;var H=!0;try{H=b(!0,G)}finally{H?Q():(F=!1,b=null)}}else F=!1}var Q;if(typeof m=="function")Q=function(){m(U)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,we=he.port2;he.port1.onmessage=U,Q=function(){we.postMessage(null)}}else Q=function(){E(U,0)};function fe(G){b=G,F||(F=!0,Q())}function ge(G,H){M=E(function(){G(e.unstable_now())},H)}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(G){G.callback=null},e.unstable_continueExecution=function(){v||C||(v=!0,fe(P))},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return i(a)},e.unstable_next=function(G){switch(p){case 1:case 2:case 3:var H=3;break;default:H=p}var W=p;p=H;try{return G()}finally{p=W}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(G,H){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var W=p;p=G;try{return H()}finally{p=W}},e.unstable_scheduleCallback=function(G,H,W){var X=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?X+W:X):W=X,G){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=W+ee,G={id:d++,callback:H,priorityLevel:G,startTime:W,expirationTime:ee,sortIndex:-1},W>X?(G.sortIndex=W,t(u,G),i(a)===null&&G===i(u)&&(S?(w(M),M=-1):S=!0,ge(T,W-X))):(G.sortIndex=ee,t(a,G),v||C||(v=!0,fe(P))),G},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(G){var H=p;return function(){var W=p;p=H;try{return G.apply(this,arguments)}finally{p=W}}}})(iS);tS.exports=iS;var Mb=tS.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Ib=y,Ti=Mb;function V(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 sS=new Set,da={};function Vr(e,t){Mo(e,t),Mo(e+"Capture",t)}function Mo(e,t){for(da[e]=t,e=0;e<t.length;e++)sS.add(t[e])}var Vs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zp=Object.prototype.hasOwnProperty,Nb=/^[: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]*$/,av={},uv={};function _b(e){return Zp.call(uv,e)?!0:Zp.call(av,e)?!1:Nb.test(e)?uv[e]=!0:(av[e]=!0,!1)}function Ob(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 Gb(e,t,i,s){if(t===null||typeof t>"u"||Ob(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 zt(e,t,i,s,n,r,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=n,this.mustUseProperty=i,this.propertyName=e,this.type=t,this.sanitizeURL=r,this.removeEmptyString=o}var Dt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Dt[e]=new zt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Dt[t]=new zt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Dt[e]=new zt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Dt[e]=new zt(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){Dt[e]=new zt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Dt[e]=new zt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Dt[e]=new zt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Dt[e]=new zt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Dt[e]=new zt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Vf=/[\-:]([a-z])/g;function Hf(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(Vf,Hf);Dt[t]=new zt(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(Vf,Hf);Dt[t]=new zt(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(Vf,Hf);Dt[t]=new zt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Dt[e]=new zt(e,1,!1,e.toLowerCase(),null,!1,!1)});Dt.xlinkHref=new zt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Dt[e]=new zt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Bf(e,t,i,s){var n=Dt.hasOwnProperty(t)?Dt[t]:null;(n!==null?n.type!==0:s||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Gb(t,i,n,s)&&(i=null),s||n===null?_b(t)&&(i===null?e.removeAttribute(t):e.setAttribute(t,""+i)):n.mustUseProperty?e[n.propertyName]=i===null?n.type===3?!1:"":i:(t=n.attributeName,s=n.attributeNamespace,i===null?e.removeAttribute(t):(n=n.type,i=n===3||n===4&&i===!0?"":""+i,s?e.setAttributeNS(s,t,i):e.setAttribute(t,i))))}var Ks=Ib.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Gu=Symbol.for("react.element"),lo=Symbol.for("react.portal"),ao=Symbol.for("react.fragment"),Wf=Symbol.for("react.strict_mode"),Jp=Symbol.for("react.profiler"),nS=Symbol.for("react.provider"),rS=Symbol.for("react.context"),Uf=Symbol.for("react.forward_ref"),eg=Symbol.for("react.suspense"),tg=Symbol.for("react.suspense_list"),zf=Symbol.for("react.memo"),un=Symbol.for("react.lazy"),oS=Symbol.for("react.offscreen"),dv=Symbol.iterator;function bl(e){return e===null||typeof e!="object"?null:(e=dv&&e[dv]||e["@@iterator"],typeof e=="function"?e:null)}var je=Object.assign,qh;function kl(e){if(qh===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);qh=t&&t[1]||""}return`
|
|
34
|
+
`+qh+e}var Xh=!1;function Zh(e,t){if(!e||Xh)return"";Xh=!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(u){var s=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){s=u}e.call(t.prototype)}else{try{throw Error()}catch(u){s=u}e()}}catch(u){if(u&&s&&typeof u.stack=="string"){for(var n=u.stack.split(`
|
|
35
|
+
`),r=s.stack.split(`
|
|
36
|
+
`),o=n.length-1,l=r.length-1;1<=o&&0<=l&&n[o]!==r[l];)l--;for(;1<=o&&0<=l;o--,l--)if(n[o]!==r[l]){if(o!==1||l!==1)do if(o--,l--,0>l||n[o]!==r[l]){var a=`
|
|
37
|
+
`+n[o].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=o&&0<=l);break}}}finally{Xh=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?kl(e):""}function kb(e){switch(e.tag){case 5:return kl(e.type);case 16:return kl("Lazy");case 13:return kl("Suspense");case 19:return kl("SuspenseList");case 0:case 2:case 15:return e=Zh(e.type,!1),e;case 11:return e=Zh(e.type.render,!1),e;case 1:return e=Zh(e.type,!0),e;default:return""}}function ig(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 ao:return"Fragment";case lo:return"Portal";case Jp:return"Profiler";case Wf:return"StrictMode";case eg:return"Suspense";case tg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case rS:return(e.displayName||"Context")+".Consumer";case nS:return(e._context.displayName||"Context")+".Provider";case Uf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zf:return t=e.displayName||null,t!==null?t:ig(e.type)||"Memo";case un:t=e._payload,e=e._init;try{return ig(e(t))}catch{}}return null}function Vb(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 ig(t);case 8:return t===Wf?"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 An(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Hb(e){var t=lS(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 n=i.get,r=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(o){s=""+o,r.call(this,o)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return s},setValue:function(o){s=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ku(e){e._valueTracker||(e._valueTracker=Hb(e))}function aS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=lS(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Gd(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 sg(e,t){var i=t.checked;return je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function cv(e,t){var i=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;i=An(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 uS(e,t){t=t.checked,t!=null&&Bf(e,"checked",t,!1)}function ng(e,t){uS(e,t);var i=An(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")?rg(e,t.type,i):t.hasOwnProperty("defaultValue")&&rg(e,t.type,An(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hv(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 rg(e,t,i){(t!=="number"||Gd(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var Vl=Array.isArray;function Eo(e,t,i,s){if(e=e.options,t){t={};for(var n=0;n<i.length;n++)t["$"+i[n]]=!0;for(i=0;i<e.length;i++)n=t.hasOwnProperty("$"+e[i].value),e[i].selected!==n&&(e[i].selected=n),n&&s&&(e[i].defaultSelected=!0)}else{for(i=""+An(i),t=null,n=0;n<e.length;n++){if(e[n].value===i){e[n].selected=!0,s&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function og(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(V(91));return je({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function pv(e,t){var i=t.value;if(i==null){if(i=t.children,t=t.defaultValue,i!=null){if(t!=null)throw Error(V(92));if(Vl(i)){if(1<i.length)throw Error(V(93));i=i[0]}t=i}t==null&&(t=""),i=t}e._wrapperState={initialValue:An(i)}}function dS(e,t){var i=An(t.value),s=An(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 gv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function cS(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 lg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?cS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Vu,hS=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,i,s,n){MSApp.execUnsafeLocalFunction(function(){return e(t,i,s,n)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Vu=Vu||document.createElement("div"),Vu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Vu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ca(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Zl={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},Bb=["Webkit","ms","Moz","O"];Object.keys(Zl).forEach(function(e){Bb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zl[t]=Zl[e]})});function pS(e,t,i){return t==null||typeof t=="boolean"||t===""?"":i||typeof t!="number"||t===0||Zl.hasOwnProperty(e)&&Zl[e]?(""+t).trim():t+"px"}function gS(e,t){e=e.style;for(var i in t)if(t.hasOwnProperty(i)){var s=i.indexOf("--")===0,n=pS(i,t[i],s);i==="float"&&(i="cssFloat"),s?e.setProperty(i,n):e[i]=n}}var Wb=je({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 ag(e,t){if(t){if(Wb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function ug(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 dg=null;function $f(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cg=null,Ro=null,To=null;function fv(e){if(e=hu(e)){if(typeof cg!="function")throw Error(V(280));var t=e.stateNode;t&&(t=jc(t),cg(e.stateNode,e.type,t))}}function fS(e){Ro?To?To.push(e):To=[e]:Ro=e}function mS(){if(Ro){var e=Ro,t=To;if(To=Ro=null,fv(e),t)for(e=0;e<t.length;e++)fv(t[e])}}function CS(e,t){return e(t)}function vS(){}var Jh=!1;function yS(e,t,i){if(Jh)return e(t,i);Jh=!0;try{return CS(e,t,i)}finally{Jh=!1,(Ro!==null||To!==null)&&(vS(),mS())}}function ha(e,t){var i=e.stateNode;if(i===null)return null;var s=jc(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(V(231,t,typeof i));return i}var hg=!1;if(Vs)try{var Fl={};Object.defineProperty(Fl,"passive",{get:function(){hg=!0}}),window.addEventListener("test",Fl,Fl),window.removeEventListener("test",Fl,Fl)}catch{hg=!1}function Ub(e,t,i,s,n,r,o,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(i,u)}catch(d){this.onError(d)}}var Jl=!1,kd=null,Vd=!1,pg=null,zb={onError:function(e){Jl=!0,kd=e}};function $b(e,t,i,s,n,r,o,l,a){Jl=!1,kd=null,Ub.apply(zb,arguments)}function jb(e,t,i,s,n,r,o,l,a){if($b.apply(this,arguments),Jl){if(Jl){var u=kd;Jl=!1,kd=null}else throw Error(V(198));Vd||(Vd=!0,pg=u)}}function Hr(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 wS(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 mv(e){if(Hr(e)!==e)throw Error(V(188))}function Kb(e){var t=e.alternate;if(!t){if(t=Hr(e),t===null)throw Error(V(188));return t!==e?null:e}for(var i=e,s=t;;){var n=i.return;if(n===null)break;var r=n.alternate;if(r===null){if(s=n.return,s!==null){i=s;continue}break}if(n.child===r.child){for(r=n.child;r;){if(r===i)return mv(n),e;if(r===s)return mv(n),t;r=r.sibling}throw Error(V(188))}if(i.return!==s.return)i=n,s=r;else{for(var o=!1,l=n.child;l;){if(l===i){o=!0,i=n,s=r;break}if(l===s){o=!0,s=n,i=r;break}l=l.sibling}if(!o){for(l=r.child;l;){if(l===i){o=!0,i=r,s=n;break}if(l===s){o=!0,s=r,i=n;break}l=l.sibling}if(!o)throw Error(V(189))}}if(i.alternate!==s)throw Error(V(190))}if(i.tag!==3)throw Error(V(188));return i.stateNode.current===i?e:t}function SS(e){return e=Kb(e),e!==null?ES(e):null}function ES(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ES(e);if(t!==null)return t;e=e.sibling}return null}var RS=Ti.unstable_scheduleCallback,Cv=Ti.unstable_cancelCallback,Yb=Ti.unstable_shouldYield,Qb=Ti.unstable_requestPaint,et=Ti.unstable_now,qb=Ti.unstable_getCurrentPriorityLevel,jf=Ti.unstable_ImmediatePriority,TS=Ti.unstable_UserBlockingPriority,Hd=Ti.unstable_NormalPriority,Xb=Ti.unstable_LowPriority,DS=Ti.unstable_IdlePriority,Wc=null,ws=null;function Zb(e){if(ws&&typeof ws.onCommitFiberRoot=="function")try{ws.onCommitFiberRoot(Wc,e,void 0,(e.current.flags&128)===128)}catch{}}var ss=Math.clz32?Math.clz32:tF,Jb=Math.log,eF=Math.LN2;function tF(e){return e>>>=0,e===0?32:31-(Jb(e)/eF|0)|0}var Hu=64,Bu=4194304;function Hl(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 Bd(e,t){var i=e.pendingLanes;if(i===0)return 0;var s=0,n=e.suspendedLanes,r=e.pingedLanes,o=i&268435455;if(o!==0){var l=o&~n;l!==0?s=Hl(l):(r&=o,r!==0&&(s=Hl(r)))}else o=i&~n,o!==0?s=Hl(o):r!==0&&(s=Hl(r));if(s===0)return 0;if(t!==0&&t!==s&&!(t&n)&&(n=s&-s,r=t&-t,n>=r||n===16&&(r&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-ss(t),n=1<<i,s|=e[i],t&=~n;return s}function iF(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 sF(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,n=e.expirationTimes,r=e.pendingLanes;0<r;){var o=31-ss(r),l=1<<o,a=n[o];a===-1?(!(l&i)||l&s)&&(n[o]=iF(l,t)):a<=t&&(e.expiredLanes|=l),r&=~l}}function gg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function PS(){var e=Hu;return Hu<<=1,!(Hu&4194240)&&(Hu=64),e}function ep(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function du(e,t,i){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ss(t),e[t]=i}function nF(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 n=31-ss(i),r=1<<n;t[n]=0,s[n]=-1,e[n]=-1,i&=~r}}function Kf(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-ss(i),n=1<<s;n&t|e[s]&t&&(e[s]|=t),i&=~n}}var be=0;function bS(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var FS,Yf,AS,xS,LS,fg=!1,Wu=[],yn=null,wn=null,Sn=null,pa=new Map,ga=new Map,cn=[],rF="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 vv(e,t){switch(e){case"focusin":case"focusout":yn=null;break;case"dragenter":case"dragleave":wn=null;break;case"mouseover":case"mouseout":Sn=null;break;case"pointerover":case"pointerout":pa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ga.delete(t.pointerId)}}function Al(e,t,i,s,n,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:r,targetContainers:[n]},t!==null&&(t=hu(t),t!==null&&Yf(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function oF(e,t,i,s,n){switch(t){case"focusin":return yn=Al(yn,e,t,i,s,n),!0;case"dragenter":return wn=Al(wn,e,t,i,s,n),!0;case"mouseover":return Sn=Al(Sn,e,t,i,s,n),!0;case"pointerover":var r=n.pointerId;return pa.set(r,Al(pa.get(r)||null,e,t,i,s,n)),!0;case"gotpointercapture":return r=n.pointerId,ga.set(r,Al(ga.get(r)||null,e,t,i,s,n)),!0}return!1}function MS(e){var t=lr(e.target);if(t!==null){var i=Hr(t);if(i!==null){if(t=i.tag,t===13){if(t=wS(i),t!==null){e.blockedOn=t,LS(e.priority,function(){AS(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 ad(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=mg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);dg=s,i.target.dispatchEvent(s),dg=null}else return t=hu(i),t!==null&&Yf(t),e.blockedOn=i,!1;t.shift()}return!0}function yv(e,t,i){ad(e)&&i.delete(t)}function lF(){fg=!1,yn!==null&&ad(yn)&&(yn=null),wn!==null&&ad(wn)&&(wn=null),Sn!==null&&ad(Sn)&&(Sn=null),pa.forEach(yv),ga.forEach(yv)}function xl(e,t){e.blockedOn===t&&(e.blockedOn=null,fg||(fg=!0,Ti.unstable_scheduleCallback(Ti.unstable_NormalPriority,lF)))}function fa(e){function t(n){return xl(n,e)}if(0<Wu.length){xl(Wu[0],e);for(var i=1;i<Wu.length;i++){var s=Wu[i];s.blockedOn===e&&(s.blockedOn=null)}}for(yn!==null&&xl(yn,e),wn!==null&&xl(wn,e),Sn!==null&&xl(Sn,e),pa.forEach(t),ga.forEach(t),i=0;i<cn.length;i++)s=cn[i],s.blockedOn===e&&(s.blockedOn=null);for(;0<cn.length&&(i=cn[0],i.blockedOn===null);)MS(i),i.blockedOn===null&&cn.shift()}var Do=Ks.ReactCurrentBatchConfig,Wd=!0;function aF(e,t,i,s){var n=be,r=Do.transition;Do.transition=null;try{be=1,Qf(e,t,i,s)}finally{be=n,Do.transition=r}}function uF(e,t,i,s){var n=be,r=Do.transition;Do.transition=null;try{be=4,Qf(e,t,i,s)}finally{be=n,Do.transition=r}}function Qf(e,t,i,s){if(Wd){var n=mg(e,t,i,s);if(n===null)dp(e,t,s,Ud,i),vv(e,s);else if(oF(n,e,t,i,s))s.stopPropagation();else if(vv(e,s),t&4&&-1<rF.indexOf(e)){for(;n!==null;){var r=hu(n);if(r!==null&&FS(r),r=mg(e,t,i,s),r===null&&dp(e,t,s,Ud,i),r===n)break;n=r}n!==null&&s.stopPropagation()}else dp(e,t,s,null,i)}}var Ud=null;function mg(e,t,i,s){if(Ud=null,e=$f(s),e=lr(e),e!==null)if(t=Hr(e),t===null)e=null;else if(i=t.tag,i===13){if(e=wS(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 Ud=e,null}function IS(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(qb()){case jf:return 1;case TS:return 4;case Hd:case Xb:return 16;case DS:return 536870912;default:return 16}default:return 16}}var gn=null,qf=null,ud=null;function NS(){if(ud)return ud;var e,t=qf,i=t.length,s,n="value"in gn?gn.value:gn.textContent,r=n.length;for(e=0;e<i&&t[e]===n[e];e++);var o=i-e;for(s=1;s<=o&&t[i-s]===n[r-s];s++);return ud=n.slice(e,1<s?1-s:void 0)}function dd(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 Uu(){return!0}function wv(){return!1}function Fi(e){function t(i,s,n,r,o){this._reactName=i,this._targetInst=n,this.type=s,this.nativeEvent=r,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(i=e[l],this[l]=i?i(r):r[l]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Uu:wv,this.isPropagationStopped=wv,this}return je(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=Uu)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Uu)},persist:function(){},isPersistent:Uu}),t}var nl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xf=Fi(nl),cu=je({},nl,{view:0,detail:0}),dF=Fi(cu),tp,ip,Ll,Uc=je({},cu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zf,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!==Ll&&(Ll&&e.type==="mousemove"?(tp=e.screenX-Ll.screenX,ip=e.screenY-Ll.screenY):ip=tp=0,Ll=e),tp)},movementY:function(e){return"movementY"in e?e.movementY:ip}}),Sv=Fi(Uc),cF=je({},Uc,{dataTransfer:0}),hF=Fi(cF),pF=je({},cu,{relatedTarget:0}),sp=Fi(pF),gF=je({},nl,{animationName:0,elapsedTime:0,pseudoElement:0}),fF=Fi(gF),mF=je({},nl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),CF=Fi(mF),vF=je({},nl,{data:0}),Ev=Fi(vF),yF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wF={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"},SF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function EF(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=SF[e])?!!t[e]:!1}function Zf(){return EF}var RF=je({},cu,{key:function(e){if(e.key){var t=yF[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=dd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wF[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zf,charCode:function(e){return e.type==="keypress"?dd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?dd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),TF=Fi(RF),DF=je({},Uc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rv=Fi(DF),PF=je({},cu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zf}),bF=Fi(PF),FF=je({},nl,{propertyName:0,elapsedTime:0,pseudoElement:0}),AF=Fi(FF),xF=je({},Uc,{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}),LF=Fi(xF),MF=[9,13,27,32],Jf=Vs&&"CompositionEvent"in window,ea=null;Vs&&"documentMode"in document&&(ea=document.documentMode);var IF=Vs&&"TextEvent"in window&&!ea,_S=Vs&&(!Jf||ea&&8<ea&&11>=ea),Tv=" ",Dv=!1;function OS(e,t){switch(e){case"keyup":return MF.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function GS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var uo=!1;function NF(e,t){switch(e){case"compositionend":return GS(t);case"keypress":return t.which!==32?null:(Dv=!0,Tv);case"textInput":return e=t.data,e===Tv&&Dv?null:e;default:return null}}function _F(e,t){if(uo)return e==="compositionend"||!Jf&&OS(e,t)?(e=NS(),ud=qf=gn=null,uo=!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 _S&&t.locale!=="ko"?null:t.data;default:return null}}var OF={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 Pv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!OF[e.type]:t==="textarea"}function kS(e,t,i,s){fS(s),t=zd(t,"onChange"),0<t.length&&(i=new Xf("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var ta=null,ma=null;function GF(e){QS(e,0)}function zc(e){var t=po(e);if(aS(t))return e}function kF(e,t){if(e==="change")return t}var VS=!1;if(Vs){var np;if(Vs){var rp="oninput"in document;if(!rp){var bv=document.createElement("div");bv.setAttribute("oninput","return;"),rp=typeof bv.oninput=="function"}np=rp}else np=!1;VS=np&&(!document.documentMode||9<document.documentMode)}function Fv(){ta&&(ta.detachEvent("onpropertychange",HS),ma=ta=null)}function HS(e){if(e.propertyName==="value"&&zc(ma)){var t=[];kS(t,ma,e,$f(e)),yS(GF,t)}}function VF(e,t,i){e==="focusin"?(Fv(),ta=t,ma=i,ta.attachEvent("onpropertychange",HS)):e==="focusout"&&Fv()}function HF(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zc(ma)}function BF(e,t){if(e==="click")return zc(t)}function WF(e,t){if(e==="input"||e==="change")return zc(t)}function UF(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var os=typeof Object.is=="function"?Object.is:UF;function Ca(e,t){if(os(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 n=i[s];if(!Zp.call(t,n)||!os(e[n],t[n]))return!1}return!0}function Av(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xv(e,t){var i=Av(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=Av(i)}}function BS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?BS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function WS(){for(var e=window,t=Gd();t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Gd(e.document)}return t}function em(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 zF(e){var t=WS(),i=e.focusedElem,s=e.selectionRange;if(t!==i&&i&&i.ownerDocument&&BS(i.ownerDocument.documentElement,i)){if(s!==null&&em(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 n=i.textContent.length,r=Math.min(s.start,n);s=s.end===void 0?r:Math.min(s.end,n),!e.extend&&r>s&&(n=s,s=r,r=n),n=xv(i,r);var o=xv(i,s);n&&o&&(e.rangeCount!==1||e.anchorNode!==n.node||e.anchorOffset!==n.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),e.removeAllRanges(),r>s?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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 $F=Vs&&"documentMode"in document&&11>=document.documentMode,co=null,Cg=null,ia=null,vg=!1;function Lv(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;vg||co==null||co!==Gd(s)||(s=co,"selectionStart"in s&&em(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}),ia&&Ca(ia,s)||(ia=s,s=zd(Cg,"onSelect"),0<s.length&&(t=new Xf("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=co)))}function zu(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var ho={animationend:zu("Animation","AnimationEnd"),animationiteration:zu("Animation","AnimationIteration"),animationstart:zu("Animation","AnimationStart"),transitionend:zu("Transition","TransitionEnd")},op={},US={};Vs&&(US=document.createElement("div").style,"AnimationEvent"in window||(delete ho.animationend.animation,delete ho.animationiteration.animation,delete ho.animationstart.animation),"TransitionEvent"in window||delete ho.transitionend.transition);function $c(e){if(op[e])return op[e];if(!ho[e])return e;var t=ho[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in US)return op[e]=t[i];return e}var zS=$c("animationend"),$S=$c("animationiteration"),jS=$c("animationstart"),KS=$c("transitionend"),YS=new Map,Mv="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 Gn(e,t){YS.set(e,t),Vr(t,[e])}for(var lp=0;lp<Mv.length;lp++){var ap=Mv[lp],jF=ap.toLowerCase(),KF=ap[0].toUpperCase()+ap.slice(1);Gn(jF,"on"+KF)}Gn(zS,"onAnimationEnd");Gn($S,"onAnimationIteration");Gn(jS,"onAnimationStart");Gn("dblclick","onDoubleClick");Gn("focusin","onFocus");Gn("focusout","onBlur");Gn(KS,"onTransitionEnd");Mo("onMouseEnter",["mouseout","mouseover"]);Mo("onMouseLeave",["mouseout","mouseover"]);Mo("onPointerEnter",["pointerout","pointerover"]);Mo("onPointerLeave",["pointerout","pointerover"]);Vr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Vr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Vr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Vr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Vr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Vr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bl="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(" "),YF=new Set("cancel close invalid load scroll toggle".split(" ").concat(Bl));function Iv(e,t,i){var s=e.type||"unknown-event";e.currentTarget=i,jb(s,t,void 0,e),e.currentTarget=null}function QS(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],n=s.event;s=s.listeners;e:{var r=void 0;if(t)for(var o=s.length-1;0<=o;o--){var l=s[o],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==r&&n.isPropagationStopped())break e;Iv(n,l,u),r=a}else for(o=0;o<s.length;o++){if(l=s[o],a=l.instance,u=l.currentTarget,l=l.listener,a!==r&&n.isPropagationStopped())break e;Iv(n,l,u),r=a}}}if(Vd)throw e=pg,Vd=!1,pg=null,e}function Oe(e,t){var i=t[Rg];i===void 0&&(i=t[Rg]=new Set);var s=e+"__bubble";i.has(s)||(qS(t,e,2,!1),i.add(s))}function up(e,t,i){var s=0;t&&(s|=4),qS(i,e,s,t)}var $u="_reactListening"+Math.random().toString(36).slice(2);function va(e){if(!e[$u]){e[$u]=!0,sS.forEach(function(i){i!=="selectionchange"&&(YF.has(i)||up(i,!1,e),up(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$u]||(t[$u]=!0,up("selectionchange",!1,t))}}function qS(e,t,i,s){switch(IS(t)){case 1:var n=aF;break;case 4:n=uF;break;default:n=Qf}i=n.bind(null,t,i,e),n=void 0,!hg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),s?n!==void 0?e.addEventListener(t,i,{capture:!0,passive:n}):e.addEventListener(t,i,!0):n!==void 0?e.addEventListener(t,i,{passive:n}):e.addEventListener(t,i,!1)}function dp(e,t,i,s,n){var r=s;if(!(t&1)&&!(t&2)&&s!==null)e:for(;;){if(s===null)return;var o=s.tag;if(o===3||o===4){var l=s.stateNode.containerInfo;if(l===n||l.nodeType===8&&l.parentNode===n)break;if(o===4)for(o=s.return;o!==null;){var a=o.tag;if((a===3||a===4)&&(a=o.stateNode.containerInfo,a===n||a.nodeType===8&&a.parentNode===n))return;o=o.return}for(;l!==null;){if(o=lr(l),o===null)return;if(a=o.tag,a===5||a===6){s=r=o;continue e}l=l.parentNode}}s=s.return}yS(function(){var u=r,d=$f(i),c=[];e:{var p=YS.get(e);if(p!==void 0){var C=Xf,v=e;switch(e){case"keypress":if(dd(i)===0)break e;case"keydown":case"keyup":C=TF;break;case"focusin":v="focus",C=sp;break;case"focusout":v="blur",C=sp;break;case"beforeblur":case"afterblur":C=sp;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":C=Sv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":C=hF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":C=bF;break;case zS:case $S:case jS:C=fF;break;case KS:C=AF;break;case"scroll":C=dF;break;case"wheel":C=LF;break;case"copy":case"cut":case"paste":C=CF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":C=Rv}var S=(t&4)!==0,E=!S&&e==="scroll",w=S?p!==null?p+"Capture":null:p;S=[];for(var m=u,R;m!==null;){R=m;var T=R.stateNode;if(R.tag===5&&T!==null&&(R=T,w!==null&&(T=ha(m,w),T!=null&&S.push(ya(m,T,R)))),E)break;m=m.return}0<S.length&&(p=new C(p,v,null,i,d),c.push({event:p,listeners:S}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",C=e==="mouseout"||e==="pointerout",p&&i!==dg&&(v=i.relatedTarget||i.fromElement)&&(lr(v)||v[Hs]))break e;if((C||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,C?(v=i.relatedTarget||i.toElement,C=u,v=v?lr(v):null,v!==null&&(E=Hr(v),v!==E||v.tag!==5&&v.tag!==6)&&(v=null)):(C=null,v=u),C!==v)){if(S=Sv,T="onMouseLeave",w="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(S=Rv,T="onPointerLeave",w="onPointerEnter",m="pointer"),E=C==null?p:po(C),R=v==null?p:po(v),p=new S(T,m+"leave",C,i,d),p.target=E,p.relatedTarget=R,T=null,lr(d)===u&&(S=new S(w,m+"enter",v,i,d),S.target=R,S.relatedTarget=E,T=S),E=T,C&&v)t:{for(S=C,w=v,m=0,R=S;R;R=to(R))m++;for(R=0,T=w;T;T=to(T))R++;for(;0<m-R;)S=to(S),m--;for(;0<R-m;)w=to(w),R--;for(;m--;){if(S===w||w!==null&&S===w.alternate)break t;S=to(S),w=to(w)}S=null}else S=null;C!==null&&Nv(c,p,C,S,!1),v!==null&&E!==null&&Nv(c,E,v,S,!0)}}e:{if(p=u?po(u):window,C=p.nodeName&&p.nodeName.toLowerCase(),C==="select"||C==="input"&&p.type==="file")var P=kF;else if(Pv(p))if(VS)P=WF;else{P=HF;var F=VF}else(C=p.nodeName)&&C.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(P=BF);if(P&&(P=P(e,u))){kS(c,P,i,d);break e}F&&F(e,p,u),e==="focusout"&&(F=p._wrapperState)&&F.controlled&&p.type==="number"&&rg(p,"number",p.value)}switch(F=u?po(u):window,e){case"focusin":(Pv(F)||F.contentEditable==="true")&&(co=F,Cg=u,ia=null);break;case"focusout":ia=Cg=co=null;break;case"mousedown":vg=!0;break;case"contextmenu":case"mouseup":case"dragend":vg=!1,Lv(c,i,d);break;case"selectionchange":if($F)break;case"keydown":case"keyup":Lv(c,i,d)}var b;if(Jf)e:{switch(e){case"compositionstart":var M="onCompositionStart";break e;case"compositionend":M="onCompositionEnd";break e;case"compositionupdate":M="onCompositionUpdate";break e}M=void 0}else uo?OS(e,i)&&(M="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(M="onCompositionStart");M&&(_S&&i.locale!=="ko"&&(uo||M!=="onCompositionStart"?M==="onCompositionEnd"&&uo&&(b=NS()):(gn=d,qf="value"in gn?gn.value:gn.textContent,uo=!0)),F=zd(u,M),0<F.length&&(M=new Ev(M,e,null,i,d),c.push({event:M,listeners:F}),b?M.data=b:(b=GS(i),b!==null&&(M.data=b)))),(b=IF?NF(e,i):_F(e,i))&&(u=zd(u,"onBeforeInput"),0<u.length&&(d=new Ev("onBeforeInput","beforeinput",null,i,d),c.push({event:d,listeners:u}),d.data=b))}QS(c,t)})}function ya(e,t,i){return{instance:e,listener:t,currentTarget:i}}function zd(e,t){for(var i=t+"Capture",s=[];e!==null;){var n=e,r=n.stateNode;n.tag===5&&r!==null&&(n=r,r=ha(e,i),r!=null&&s.unshift(ya(e,r,n)),r=ha(e,t),r!=null&&s.push(ya(e,r,n))),e=e.return}return s}function to(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Nv(e,t,i,s,n){for(var r=t._reactName,o=[];i!==null&&i!==s;){var l=i,a=l.alternate,u=l.stateNode;if(a!==null&&a===s)break;l.tag===5&&u!==null&&(l=u,n?(a=ha(i,r),a!=null&&o.unshift(ya(i,a,l))):n||(a=ha(i,r),a!=null&&o.push(ya(i,a,l)))),i=i.return}o.length!==0&&e.push({event:t,listeners:o})}var QF=/\r\n?/g,qF=/\u0000|\uFFFD/g;function _v(e){return(typeof e=="string"?e:""+e).replace(QF,`
|
|
38
|
+
`).replace(qF,"")}function ju(e,t,i){if(t=_v(t),_v(e)!==t&&i)throw Error(V(425))}function $d(){}var yg=null,wg=null;function Sg(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 Eg=typeof setTimeout=="function"?setTimeout:void 0,XF=typeof clearTimeout=="function"?clearTimeout:void 0,Ov=typeof Promise=="function"?Promise:void 0,ZF=typeof queueMicrotask=="function"?queueMicrotask:typeof Ov<"u"?function(e){return Ov.resolve(null).then(e).catch(JF)}:Eg;function JF(e){setTimeout(function(){throw e})}function cp(e,t){var i=t,s=0;do{var n=i.nextSibling;if(e.removeChild(i),n&&n.nodeType===8)if(i=n.data,i==="/$"){if(s===0){e.removeChild(n),fa(t);return}s--}else i!=="$"&&i!=="$?"&&i!=="$!"||s++;i=n}while(i);fa(t)}function En(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 Gv(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 rl=Math.random().toString(36).slice(2),vs="__reactFiber$"+rl,wa="__reactProps$"+rl,Hs="__reactContainer$"+rl,Rg="__reactEvents$"+rl,eA="__reactListeners$"+rl,tA="__reactHandles$"+rl;function lr(e){var t=e[vs];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Hs]||i[vs]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Gv(e);e!==null;){if(i=e[vs])return i;e=Gv(e)}return t}e=i,i=e.parentNode}return null}function hu(e){return e=e[vs]||e[Hs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function po(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(V(33))}function jc(e){return e[wa]||null}var Tg=[],go=-1;function kn(e){return{current:e}}function ke(e){0>go||(e.current=Tg[go],Tg[go]=null,go--)}function Me(e,t){go++,Tg[go]=e.current,e.current=t}var xn={},Mt=kn(xn),oi=kn(!1),Rr=xn;function Io(e,t){var i=e.type.contextTypes;if(!i)return xn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var n={},r;for(r in i)n[r]=t[r];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function li(e){return e=e.childContextTypes,e!=null}function jd(){ke(oi),ke(Mt)}function kv(e,t,i){if(Mt.current!==xn)throw Error(V(168));Me(Mt,t),Me(oi,i)}function XS(e,t,i){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return i;s=s.getChildContext();for(var n in s)if(!(n in t))throw Error(V(108,Vb(e)||"Unknown",n));return je({},i,s)}function Kd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xn,Rr=Mt.current,Me(Mt,e),Me(oi,oi.current),!0}function Vv(e,t,i){var s=e.stateNode;if(!s)throw Error(V(169));i?(e=XS(e,t,Rr),s.__reactInternalMemoizedMergedChildContext=e,ke(oi),ke(Mt),Me(Mt,e)):ke(oi),Me(oi,i)}var Is=null,Kc=!1,hp=!1;function ZS(e){Is===null?Is=[e]:Is.push(e)}function iA(e){Kc=!0,ZS(e)}function Vn(){if(!hp&&Is!==null){hp=!0;var e=0,t=be;try{var i=Is;for(be=1;e<i.length;e++){var s=i[e];do s=s(!0);while(s!==null)}Is=null,Kc=!1}catch(n){throw Is!==null&&(Is=Is.slice(e+1)),RS(jf,Vn),n}finally{be=t,hp=!1}}return null}var fo=[],mo=0,Yd=null,Qd=0,Li=[],Mi=0,Tr=null,_s=1,Os="";function Zn(e,t){fo[mo++]=Qd,fo[mo++]=Yd,Yd=e,Qd=t}function JS(e,t,i){Li[Mi++]=_s,Li[Mi++]=Os,Li[Mi++]=Tr,Tr=e;var s=_s;e=Os;var n=32-ss(s)-1;s&=~(1<<n),i+=1;var r=32-ss(t)+n;if(30<r){var o=n-n%5;r=(s&(1<<o)-1).toString(32),s>>=o,n-=o,_s=1<<32-ss(t)+n|i<<n|s,Os=r+e}else _s=1<<r|i<<n|s,Os=e}function tm(e){e.return!==null&&(Zn(e,1),JS(e,1,0))}function im(e){for(;e===Yd;)Yd=fo[--mo],fo[mo]=null,Qd=fo[--mo],fo[mo]=null;for(;e===Tr;)Tr=Li[--Mi],Li[Mi]=null,Os=Li[--Mi],Li[Mi]=null,_s=Li[--Mi],Li[Mi]=null}var Ei=null,Si=null,We=!1,Ji=null;function eE(e,t){var i=Ni(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 Hv(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,Ei=e,Si=En(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ei=e,Si=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(i=Tr!==null?{id:_s,overflow:Os}:null,e.memoizedState={dehydrated:t,treeContext:i,retryLane:1073741824},i=Ni(18,null,null,0),i.stateNode=t,i.return=e,e.child=i,Ei=e,Si=null,!0):!1;default:return!1}}function Dg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Pg(e){if(We){var t=Si;if(t){var i=t;if(!Hv(e,t)){if(Dg(e))throw Error(V(418));t=En(i.nextSibling);var s=Ei;t&&Hv(e,t)?eE(s,i):(e.flags=e.flags&-4097|2,We=!1,Ei=e)}}else{if(Dg(e))throw Error(V(418));e.flags=e.flags&-4097|2,We=!1,Ei=e}}}function Bv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ei=e}function Ku(e){if(e!==Ei)return!1;if(!We)return Bv(e),We=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Sg(e.type,e.memoizedProps)),t&&(t=Si)){if(Dg(e))throw tE(),Error(V(418));for(;t;)eE(e,t),t=En(t.nextSibling)}if(Bv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"){if(t===0){Si=En(e.nextSibling);break e}t--}else i!=="$"&&i!=="$!"&&i!=="$?"||t++}e=e.nextSibling}Si=null}}else Si=Ei?En(e.stateNode.nextSibling):null;return!0}function tE(){for(var e=Si;e;)e=En(e.nextSibling)}function No(){Si=Ei=null,We=!1}function sm(e){Ji===null?Ji=[e]:Ji.push(e)}var sA=Ks.ReactCurrentBatchConfig;function Ml(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(V(309));var s=i.stateNode}if(!s)throw Error(V(147,e));var n=s,r=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===r?t.ref:(t=function(o){var l=n.refs;o===null?delete l[r]:l[r]=o},t._stringRef=r,t)}if(typeof e!="string")throw Error(V(284));if(!i._owner)throw Error(V(290,e))}return e}function Yu(e,t){throw e=Object.prototype.toString.call(t),Error(V(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Wv(e){var t=e._init;return t(e._payload)}function iE(e){function t(w,m){if(e){var R=w.deletions;R===null?(w.deletions=[m],w.flags|=16):R.push(m)}}function i(w,m){if(!e)return null;for(;m!==null;)t(w,m),m=m.sibling;return null}function s(w,m){for(w=new Map;m!==null;)m.key!==null?w.set(m.key,m):w.set(m.index,m),m=m.sibling;return w}function n(w,m){return w=Pn(w,m),w.index=0,w.sibling=null,w}function r(w,m,R){return w.index=R,e?(R=w.alternate,R!==null?(R=R.index,R<m?(w.flags|=2,m):R):(w.flags|=2,m)):(w.flags|=1048576,m)}function o(w){return e&&w.alternate===null&&(w.flags|=2),w}function l(w,m,R,T){return m===null||m.tag!==6?(m=yp(R,w.mode,T),m.return=w,m):(m=n(m,R),m.return=w,m)}function a(w,m,R,T){var P=R.type;return P===ao?d(w,m,R.props.children,T,R.key):m!==null&&(m.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===un&&Wv(P)===m.type)?(T=n(m,R.props),T.ref=Ml(w,m,R),T.return=w,T):(T=Cd(R.type,R.key,R.props,null,w.mode,T),T.ref=Ml(w,m,R),T.return=w,T)}function u(w,m,R,T){return m===null||m.tag!==4||m.stateNode.containerInfo!==R.containerInfo||m.stateNode.implementation!==R.implementation?(m=wp(R,w.mode,T),m.return=w,m):(m=n(m,R.children||[]),m.return=w,m)}function d(w,m,R,T,P){return m===null||m.tag!==7?(m=fr(R,w.mode,T,P),m.return=w,m):(m=n(m,R),m.return=w,m)}function c(w,m,R){if(typeof m=="string"&&m!==""||typeof m=="number")return m=yp(""+m,w.mode,R),m.return=w,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Gu:return R=Cd(m.type,m.key,m.props,null,w.mode,R),R.ref=Ml(w,null,m),R.return=w,R;case lo:return m=wp(m,w.mode,R),m.return=w,m;case un:var T=m._init;return c(w,T(m._payload),R)}if(Vl(m)||bl(m))return m=fr(m,w.mode,R,null),m.return=w,m;Yu(w,m)}return null}function p(w,m,R,T){var P=m!==null?m.key:null;if(typeof R=="string"&&R!==""||typeof R=="number")return P!==null?null:l(w,m,""+R,T);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case Gu:return R.key===P?a(w,m,R,T):null;case lo:return R.key===P?u(w,m,R,T):null;case un:return P=R._init,p(w,m,P(R._payload),T)}if(Vl(R)||bl(R))return P!==null?null:d(w,m,R,T,null);Yu(w,R)}return null}function C(w,m,R,T,P){if(typeof T=="string"&&T!==""||typeof T=="number")return w=w.get(R)||null,l(m,w,""+T,P);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Gu:return w=w.get(T.key===null?R:T.key)||null,a(m,w,T,P);case lo:return w=w.get(T.key===null?R:T.key)||null,u(m,w,T,P);case un:var F=T._init;return C(w,m,R,F(T._payload),P)}if(Vl(T)||bl(T))return w=w.get(R)||null,d(m,w,T,P,null);Yu(m,T)}return null}function v(w,m,R,T){for(var P=null,F=null,b=m,M=m=0,N=null;b!==null&&M<R.length;M++){b.index>M?(N=b,b=null):N=b.sibling;var k=p(w,b,R[M],T);if(k===null){b===null&&(b=N);break}e&&b&&k.alternate===null&&t(w,b),m=r(k,m,M),F===null?P=k:F.sibling=k,F=k,b=N}if(M===R.length)return i(w,b),We&&Zn(w,M),P;if(b===null){for(;M<R.length;M++)b=c(w,R[M],T),b!==null&&(m=r(b,m,M),F===null?P=b:F.sibling=b,F=b);return We&&Zn(w,M),P}for(b=s(w,b);M<R.length;M++)N=C(b,w,M,R[M],T),N!==null&&(e&&N.alternate!==null&&b.delete(N.key===null?M:N.key),m=r(N,m,M),F===null?P=N:F.sibling=N,F=N);return e&&b.forEach(function($){return t(w,$)}),We&&Zn(w,M),P}function S(w,m,R,T){var P=bl(R);if(typeof P!="function")throw Error(V(150));if(R=P.call(R),R==null)throw Error(V(151));for(var F=P=null,b=m,M=m=0,N=null,k=R.next();b!==null&&!k.done;M++,k=R.next()){b.index>M?(N=b,b=null):N=b.sibling;var $=p(w,b,k.value,T);if($===null){b===null&&(b=N);break}e&&b&&$.alternate===null&&t(w,b),m=r($,m,M),F===null?P=$:F.sibling=$,F=$,b=N}if(k.done)return i(w,b),We&&Zn(w,M),P;if(b===null){for(;!k.done;M++,k=R.next())k=c(w,k.value,T),k!==null&&(m=r(k,m,M),F===null?P=k:F.sibling=k,F=k);return We&&Zn(w,M),P}for(b=s(w,b);!k.done;M++,k=R.next())k=C(b,w,M,k.value,T),k!==null&&(e&&k.alternate!==null&&b.delete(k.key===null?M:k.key),m=r(k,m,M),F===null?P=k:F.sibling=k,F=k);return e&&b.forEach(function(U){return t(w,U)}),We&&Zn(w,M),P}function E(w,m,R,T){if(typeof R=="object"&&R!==null&&R.type===ao&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case Gu:e:{for(var P=R.key,F=m;F!==null;){if(F.key===P){if(P=R.type,P===ao){if(F.tag===7){i(w,F.sibling),m=n(F,R.props.children),m.return=w,w=m;break e}}else if(F.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===un&&Wv(P)===F.type){i(w,F.sibling),m=n(F,R.props),m.ref=Ml(w,F,R),m.return=w,w=m;break e}i(w,F);break}else t(w,F);F=F.sibling}R.type===ao?(m=fr(R.props.children,w.mode,T,R.key),m.return=w,w=m):(T=Cd(R.type,R.key,R.props,null,w.mode,T),T.ref=Ml(w,m,R),T.return=w,w=T)}return o(w);case lo:e:{for(F=R.key;m!==null;){if(m.key===F)if(m.tag===4&&m.stateNode.containerInfo===R.containerInfo&&m.stateNode.implementation===R.implementation){i(w,m.sibling),m=n(m,R.children||[]),m.return=w,w=m;break e}else{i(w,m);break}else t(w,m);m=m.sibling}m=wp(R,w.mode,T),m.return=w,w=m}return o(w);case un:return F=R._init,E(w,m,F(R._payload),T)}if(Vl(R))return v(w,m,R,T);if(bl(R))return S(w,m,R,T);Yu(w,R)}return typeof R=="string"&&R!==""||typeof R=="number"?(R=""+R,m!==null&&m.tag===6?(i(w,m.sibling),m=n(m,R),m.return=w,w=m):(i(w,m),m=yp(R,w.mode,T),m.return=w,w=m),o(w)):i(w,m)}return E}var _o=iE(!0),sE=iE(!1),qd=kn(null),Xd=null,Co=null,nm=null;function rm(){nm=Co=Xd=null}function om(e){var t=qd.current;ke(qd),e._currentValue=t}function bg(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 Po(e,t){Xd=e,nm=Co=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ti=!0),e.firstContext=null)}function Hi(e){var t=e._currentValue;if(nm!==e)if(e={context:e,memoizedValue:t,next:null},Co===null){if(Xd===null)throw Error(V(308));Co=e,Xd.dependencies={lanes:0,firstContext:e}}else Co=Co.next=e;return t}var ar=null;function lm(e){ar===null?ar=[e]:ar.push(e)}function nE(e,t,i,s){var n=t.interleaved;return n===null?(i.next=i,lm(t)):(i.next=n.next,n.next=i),t.interleaved=i,Bs(e,s)}function Bs(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 dn=!1;function am(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function rE(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 Gs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Rn(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,ye&2){var n=s.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),s.pending=t,Bs(e,i)}return n=s.interleaved,n===null?(t.next=t,lm(s)):(t.next=n.next,n.next=t),s.interleaved=t,Bs(e,i)}function cd(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,Kf(e,i)}}function Uv(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var n=null,r=null;if(i=i.firstBaseUpdate,i!==null){do{var o={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};r===null?n=r=o:r=r.next=o,i=i.next}while(i!==null);r===null?n=r=t:r=r.next=t}else n=r=t;i={baseState:s.baseState,firstBaseUpdate:n,lastBaseUpdate:r,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 Zd(e,t,i,s){var n=e.updateQueue;dn=!1;var r=n.firstBaseUpdate,o=n.lastBaseUpdate,l=n.shared.pending;if(l!==null){n.shared.pending=null;var a=l,u=a.next;a.next=null,o===null?r=u:o.next=u,o=a;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=a))}if(r!==null){var c=n.baseState;o=0,d=u=a=null,l=r;do{var p=l.lane,C=l.eventTime;if((s&p)===p){d!==null&&(d=d.next={eventTime:C,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,S=l;switch(p=t,C=i,S.tag){case 1:if(v=S.payload,typeof v=="function"){c=v.call(C,c,p);break e}c=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=S.payload,p=typeof v=="function"?v.call(C,c,p):v,p==null)break e;c=je({},c,p);break e;case 2:dn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=n.effects,p===null?n.effects=[l]:p.push(l))}else C={eventTime:C,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=C,a=c):d=d.next=C,o|=p;if(l=l.next,l===null){if(l=n.shared.pending,l===null)break;p=l,l=p.next,p.next=null,n.lastBaseUpdate=p,n.shared.pending=null}}while(!0);if(d===null&&(a=c),n.baseState=a,n.firstBaseUpdate=u,n.lastBaseUpdate=d,t=n.shared.interleaved,t!==null){n=t;do o|=n.lane,n=n.next;while(n!==t)}else r===null&&(n.shared.lanes=0);Pr|=o,e.lanes=o,e.memoizedState=c}}function zv(e,t,i){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var s=e[t],n=s.callback;if(n!==null){if(s.callback=null,s=i,typeof n!="function")throw Error(V(191,n));n.call(s)}}}var pu={},Ss=kn(pu),Sa=kn(pu),Ea=kn(pu);function ur(e){if(e===pu)throw Error(V(174));return e}function um(e,t){switch(Me(Ea,t),Me(Sa,e),Me(Ss,pu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:lg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=lg(t,e)}ke(Ss),Me(Ss,t)}function Oo(){ke(Ss),ke(Sa),ke(Ea)}function oE(e){ur(Ea.current);var t=ur(Ss.current),i=lg(t,e.type);t!==i&&(Me(Sa,e),Me(Ss,i))}function dm(e){Sa.current===e&&(ke(Ss),ke(Sa))}var ze=kn(0);function Jd(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 pp=[];function cm(){for(var e=0;e<pp.length;e++)pp[e]._workInProgressVersionPrimary=null;pp.length=0}var hd=Ks.ReactCurrentDispatcher,gp=Ks.ReactCurrentBatchConfig,Dr=0,$e=null,ct=null,mt=null,ec=!1,sa=!1,Ra=0,nA=0;function Ft(){throw Error(V(321))}function hm(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!os(e[i],t[i]))return!1;return!0}function pm(e,t,i,s,n,r){if(Dr=r,$e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,hd.current=e===null||e.memoizedState===null?aA:uA,e=i(s,n),sa){r=0;do{if(sa=!1,Ra=0,25<=r)throw Error(V(301));r+=1,mt=ct=null,t.updateQueue=null,hd.current=dA,e=i(s,n)}while(sa)}if(hd.current=tc,t=ct!==null&&ct.next!==null,Dr=0,mt=ct=$e=null,ec=!1,t)throw Error(V(300));return e}function gm(){var e=Ra!==0;return Ra=0,e}function Cs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?$e.memoizedState=mt=e:mt=mt.next=e,mt}function Bi(){if(ct===null){var e=$e.alternate;e=e!==null?e.memoizedState:null}else e=ct.next;var t=mt===null?$e.memoizedState:mt.next;if(t!==null)mt=t,ct=e;else{if(e===null)throw Error(V(310));ct=e,e={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},mt===null?$e.memoizedState=mt=e:mt=mt.next=e}return mt}function Ta(e,t){return typeof t=="function"?t(e):t}function fp(e){var t=Bi(),i=t.queue;if(i===null)throw Error(V(311));i.lastRenderedReducer=e;var s=ct,n=s.baseQueue,r=i.pending;if(r!==null){if(n!==null){var o=n.next;n.next=r.next,r.next=o}s.baseQueue=n=r,i.pending=null}if(n!==null){r=n.next,s=s.baseState;var l=o=null,a=null,u=r;do{var d=u.lane;if((Dr&d)===d)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),s=u.hasEagerState?u.eagerState:e(s,u.action);else{var c={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=c,o=s):a=a.next=c,$e.lanes|=d,Pr|=d}u=u.next}while(u!==null&&u!==r);a===null?o=s:a.next=l,os(s,t.memoizedState)||(ti=!0),t.memoizedState=s,t.baseState=o,t.baseQueue=a,i.lastRenderedState=s}if(e=i.interleaved,e!==null){n=e;do r=n.lane,$e.lanes|=r,Pr|=r,n=n.next;while(n!==e)}else n===null&&(i.lanes=0);return[t.memoizedState,i.dispatch]}function mp(e){var t=Bi(),i=t.queue;if(i===null)throw Error(V(311));i.lastRenderedReducer=e;var s=i.dispatch,n=i.pending,r=t.memoizedState;if(n!==null){i.pending=null;var o=n=n.next;do r=e(r,o.action),o=o.next;while(o!==n);os(r,t.memoizedState)||(ti=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),i.lastRenderedState=r}return[r,s]}function lE(){}function aE(e,t){var i=$e,s=Bi(),n=t(),r=!os(s.memoizedState,n);if(r&&(s.memoizedState=n,ti=!0),s=s.queue,fm(cE.bind(null,i,s,e),[e]),s.getSnapshot!==t||r||mt!==null&&mt.memoizedState.tag&1){if(i.flags|=2048,Da(9,dE.bind(null,i,s,n,t),void 0,null),vt===null)throw Error(V(349));Dr&30||uE(i,t,n)}return n}function uE(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function dE(e,t,i,s){t.value=i,t.getSnapshot=s,hE(t)&&pE(e)}function cE(e,t,i){return i(function(){hE(t)&&pE(e)})}function hE(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!os(e,i)}catch{return!0}}function pE(e){var t=Bs(e,1);t!==null&&ns(t,e,1,-1)}function $v(e){var t=Cs();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:e},t.queue=e,e=e.dispatch=lA.bind(null,$e,e),[t.memoizedState,e]}function Da(e,t,i,s){return e={tag:e,create:t,destroy:i,deps:s,next:null},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.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 gE(){return Bi().memoizedState}function pd(e,t,i,s){var n=Cs();$e.flags|=e,n.memoizedState=Da(1|t,i,void 0,s===void 0?null:s)}function Yc(e,t,i,s){var n=Bi();s=s===void 0?null:s;var r=void 0;if(ct!==null){var o=ct.memoizedState;if(r=o.destroy,s!==null&&hm(s,o.deps)){n.memoizedState=Da(t,i,r,s);return}}$e.flags|=e,n.memoizedState=Da(1|t,i,r,s)}function jv(e,t){return pd(8390656,8,e,t)}function fm(e,t){return Yc(2048,8,e,t)}function fE(e,t){return Yc(4,2,e,t)}function mE(e,t){return Yc(4,4,e,t)}function CE(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 vE(e,t,i){return i=i!=null?i.concat([e]):null,Yc(4,4,CE.bind(null,t,e),i)}function mm(){}function yE(e,t){var i=Bi();t=t===void 0?null:t;var s=i.memoizedState;return s!==null&&t!==null&&hm(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function wE(e,t){var i=Bi();t=t===void 0?null:t;var s=i.memoizedState;return s!==null&&t!==null&&hm(t,s[1])?s[0]:(e=e(),i.memoizedState=[e,t],e)}function SE(e,t,i){return Dr&21?(os(i,t)||(i=PS(),$e.lanes|=i,Pr|=i,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ti=!0),e.memoizedState=i)}function rA(e,t){var i=be;be=i!==0&&4>i?i:4,e(!0);var s=gp.transition;gp.transition={};try{e(!1),t()}finally{be=i,gp.transition=s}}function EE(){return Bi().memoizedState}function oA(e,t,i){var s=Dn(e);if(i={lane:s,action:i,hasEagerState:!1,eagerState:null,next:null},RE(e))TE(t,i);else if(i=nE(e,t,i,s),i!==null){var n=Vt();ns(i,e,s,n),DE(i,t,s)}}function lA(e,t,i){var s=Dn(e),n={lane:s,action:i,hasEagerState:!1,eagerState:null,next:null};if(RE(e))TE(t,n);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var o=t.lastRenderedState,l=r(o,i);if(n.hasEagerState=!0,n.eagerState=l,os(l,o)){var a=t.interleaved;a===null?(n.next=n,lm(t)):(n.next=a.next,a.next=n),t.interleaved=n;return}}catch{}finally{}i=nE(e,t,n,s),i!==null&&(n=Vt(),ns(i,e,s,n),DE(i,t,s))}}function RE(e){var t=e.alternate;return e===$e||t!==null&&t===$e}function TE(e,t){sa=ec=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function DE(e,t,i){if(i&4194240){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Kf(e,i)}}var tc={readContext:Hi,useCallback:Ft,useContext:Ft,useEffect:Ft,useImperativeHandle:Ft,useInsertionEffect:Ft,useLayoutEffect:Ft,useMemo:Ft,useReducer:Ft,useRef:Ft,useState:Ft,useDebugValue:Ft,useDeferredValue:Ft,useTransition:Ft,useMutableSource:Ft,useSyncExternalStore:Ft,useId:Ft,unstable_isNewReconciler:!1},aA={readContext:Hi,useCallback:function(e,t){return Cs().memoizedState=[e,t===void 0?null:t],e},useContext:Hi,useEffect:jv,useImperativeHandle:function(e,t,i){return i=i!=null?i.concat([e]):null,pd(4194308,4,CE.bind(null,t,e),i)},useLayoutEffect:function(e,t){return pd(4194308,4,e,t)},useInsertionEffect:function(e,t){return pd(4,2,e,t)},useMemo:function(e,t){var i=Cs();return t=t===void 0?null:t,e=e(),i.memoizedState=[e,t],e},useReducer:function(e,t,i){var s=Cs();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=oA.bind(null,$e,e),[s.memoizedState,e]},useRef:function(e){var t=Cs();return e={current:e},t.memoizedState=e},useState:$v,useDebugValue:mm,useDeferredValue:function(e){return Cs().memoizedState=e},useTransition:function(){var e=$v(!1),t=e[0];return e=rA.bind(null,e[1]),Cs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,i){var s=$e,n=Cs();if(We){if(i===void 0)throw Error(V(407));i=i()}else{if(i=t(),vt===null)throw Error(V(349));Dr&30||uE(s,t,i)}n.memoizedState=i;var r={value:i,getSnapshot:t};return n.queue=r,jv(cE.bind(null,s,r,e),[e]),s.flags|=2048,Da(9,dE.bind(null,s,r,i,t),void 0,null),i},useId:function(){var e=Cs(),t=vt.identifierPrefix;if(We){var i=Os,s=_s;i=(s&~(1<<32-ss(s)-1)).toString(32)+i,t=":"+t+"R"+i,i=Ra++,0<i&&(t+="H"+i.toString(32)),t+=":"}else i=nA++,t=":"+t+"r"+i.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},uA={readContext:Hi,useCallback:yE,useContext:Hi,useEffect:fm,useImperativeHandle:vE,useInsertionEffect:fE,useLayoutEffect:mE,useMemo:wE,useReducer:fp,useRef:gE,useState:function(){return fp(Ta)},useDebugValue:mm,useDeferredValue:function(e){var t=Bi();return SE(t,ct.memoizedState,e)},useTransition:function(){var e=fp(Ta)[0],t=Bi().memoizedState;return[e,t]},useMutableSource:lE,useSyncExternalStore:aE,useId:EE,unstable_isNewReconciler:!1},dA={readContext:Hi,useCallback:yE,useContext:Hi,useEffect:fm,useImperativeHandle:vE,useInsertionEffect:fE,useLayoutEffect:mE,useMemo:wE,useReducer:mp,useRef:gE,useState:function(){return mp(Ta)},useDebugValue:mm,useDeferredValue:function(e){var t=Bi();return ct===null?t.memoizedState=e:SE(t,ct.memoizedState,e)},useTransition:function(){var e=mp(Ta)[0],t=Bi().memoizedState;return[e,t]},useMutableSource:lE,useSyncExternalStore:aE,useId:EE,unstable_isNewReconciler:!1};function Qi(e,t){if(e&&e.defaultProps){t=je({},t),e=e.defaultProps;for(var i in e)t[i]===void 0&&(t[i]=e[i]);return t}return t}function Fg(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:je({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Qc={isMounted:function(e){return(e=e._reactInternals)?Hr(e)===e:!1},enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Vt(),n=Dn(e),r=Gs(s,n);r.payload=t,i!=null&&(r.callback=i),t=Rn(e,r,n),t!==null&&(ns(t,e,n,s),cd(t,e,n))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Vt(),n=Dn(e),r=Gs(s,n);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=Rn(e,r,n),t!==null&&(ns(t,e,n,s),cd(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Vt(),s=Dn(e),n=Gs(i,s);n.tag=2,t!=null&&(n.callback=t),t=Rn(e,n,s),t!==null&&(ns(t,e,s,i),cd(t,e,s))}};function Kv(e,t,i,s,n,r,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,r,o):t.prototype&&t.prototype.isPureReactComponent?!Ca(i,s)||!Ca(n,r):!0}function PE(e,t,i){var s=!1,n=xn,r=t.contextType;return typeof r=="object"&&r!==null?r=Hi(r):(n=li(t)?Rr:Mt.current,s=t.contextTypes,r=(s=s!=null)?Io(e,n):xn),t=new t(i,r),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Qc,e.stateNode=t,t._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=r),t}function Yv(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&&Qc.enqueueReplaceState(t,t.state,null)}function Ag(e,t,i,s){var n=e.stateNode;n.props=i,n.state=e.memoizedState,n.refs={},am(e);var r=t.contextType;typeof r=="object"&&r!==null?n.context=Hi(r):(r=li(t)?Rr:Mt.current,n.context=Io(e,r)),n.state=e.memoizedState,r=t.getDerivedStateFromProps,typeof r=="function"&&(Fg(e,t,r,i),n.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(t=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),t!==n.state&&Qc.enqueueReplaceState(n,n.state,null),Zd(e,i,n,s),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function Go(e,t){try{var i="",s=t;do i+=kb(s),s=s.return;while(s);var n=i}catch(r){n=`
|
|
39
|
+
Error generating stack: `+r.message+`
|
|
40
|
+
`+r.stack}return{value:e,source:t,stack:n,digest:null}}function Cp(e,t,i){return{value:e,source:null,stack:i??null,digest:t??null}}function xg(e,t){try{console.error(t.value)}catch(i){setTimeout(function(){throw i})}}var cA=typeof WeakMap=="function"?WeakMap:Map;function bE(e,t,i){i=Gs(-1,i),i.tag=3,i.payload={element:null};var s=t.value;return i.callback=function(){sc||(sc=!0,Hg=s),xg(e,t)},i}function FE(e,t,i){i=Gs(-1,i),i.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var n=t.value;i.payload=function(){return s(n)},i.callback=function(){xg(e,t)}}var r=e.stateNode;return r!==null&&typeof r.componentDidCatch=="function"&&(i.callback=function(){xg(e,t),typeof s!="function"&&(Tn===null?Tn=new Set([this]):Tn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),i}function Qv(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new cA;var n=new Set;s.set(t,n)}else n=s.get(t),n===void 0&&(n=new Set,s.set(t,n));n.has(i)||(n.add(i),e=DA.bind(null,e,t,i),t.then(e,e))}function qv(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 Xv(e,t,i,s,n){return e.mode&1?(e.flags|=65536,e.lanes=n,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=Gs(-1,1),t.tag=2,Rn(i,t,1))),i.lanes|=1),e)}var hA=Ks.ReactCurrentOwner,ti=!1;function Ot(e,t,i,s){t.child=e===null?sE(t,null,i,s):_o(t,e.child,i,s)}function Zv(e,t,i,s,n){i=i.render;var r=t.ref;return Po(t,n),s=pm(e,t,i,s,r,n),i=gm(),e!==null&&!ti?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Ws(e,t,n)):(We&&i&&tm(t),t.flags|=1,Ot(e,t,s,n),t.child)}function Jv(e,t,i,s,n){if(e===null){var r=i.type;return typeof r=="function"&&!Tm(r)&&r.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(t.tag=15,t.type=r,AE(e,t,r,s,n)):(e=Cd(i.type,null,s,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!(e.lanes&n)){var o=r.memoizedProps;if(i=i.compare,i=i!==null?i:Ca,i(o,s)&&e.ref===t.ref)return Ws(e,t,n)}return t.flags|=1,e=Pn(r,s),e.ref=t.ref,e.return=t,t.child=e}function AE(e,t,i,s,n){if(e!==null){var r=e.memoizedProps;if(Ca(r,s)&&e.ref===t.ref)if(ti=!1,t.pendingProps=s=r,(e.lanes&n)!==0)e.flags&131072&&(ti=!0);else return t.lanes=e.lanes,Ws(e,t,n)}return Lg(e,t,i,s,n)}function xE(e,t,i){var s=t.pendingProps,n=s.children,r=e!==null?e.memoizedState:null;if(s.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Me(yo,mi),mi|=i;else{if(!(i&1073741824))return e=r!==null?r.baseLanes|i:i,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Me(yo,mi),mi|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=r!==null?r.baseLanes:i,Me(yo,mi),mi|=s}else r!==null?(s=r.baseLanes|i,t.memoizedState=null):s=i,Me(yo,mi),mi|=s;return Ot(e,t,n,i),t.child}function LE(e,t){var i=t.ref;(e===null&&i!==null||e!==null&&e.ref!==i)&&(t.flags|=512,t.flags|=2097152)}function Lg(e,t,i,s,n){var r=li(i)?Rr:Mt.current;return r=Io(t,r),Po(t,n),i=pm(e,t,i,s,r,n),s=gm(),e!==null&&!ti?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Ws(e,t,n)):(We&&s&&tm(t),t.flags|=1,Ot(e,t,i,n),t.child)}function ey(e,t,i,s,n){if(li(i)){var r=!0;Kd(t)}else r=!1;if(Po(t,n),t.stateNode===null)gd(e,t),PE(t,i,s),Ag(t,i,s,n),s=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var a=o.context,u=i.contextType;typeof u=="object"&&u!==null?u=Hi(u):(u=li(i)?Rr:Mt.current,u=Io(t,u));var d=i.getDerivedStateFromProps,c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==s||a!==u)&&Yv(t,o,s,u),dn=!1;var p=t.memoizedState;o.state=p,Zd(t,s,o,n),a=t.memoizedState,l!==s||p!==a||oi.current||dn?(typeof d=="function"&&(Fg(t,i,d,s),a=t.memoizedState),(l=dn||Kv(t,i,l,s,p,a,u))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=a),o.props=s,o.state=a,o.context=u,s=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{o=t.stateNode,rE(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Qi(t.type,l),o.props=u,c=t.pendingProps,p=o.context,a=i.contextType,typeof a=="object"&&a!==null?a=Hi(a):(a=li(i)?Rr:Mt.current,a=Io(t,a));var C=i.getDerivedStateFromProps;(d=typeof C=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==c||p!==a)&&Yv(t,o,s,a),dn=!1,p=t.memoizedState,o.state=p,Zd(t,s,o,n);var v=t.memoizedState;l!==c||p!==v||oi.current||dn?(typeof C=="function"&&(Fg(t,i,C,s),v=t.memoizedState),(u=dn||Kv(t,i,u,s,p,v,a)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(s,v,a),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(s,v,a)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=v),o.props=s,o.state=v,o.context=a,s=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),s=!1)}return Mg(e,t,i,s,r,n)}function Mg(e,t,i,s,n,r){LE(e,t);var o=(t.flags&128)!==0;if(!s&&!o)return n&&Vv(t,i,!1),Ws(e,t,r);s=t.stateNode,hA.current=t;var l=o&&typeof i.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&o?(t.child=_o(t,e.child,null,r),t.child=_o(t,null,l,r)):Ot(e,t,l,r),t.memoizedState=s.state,n&&Vv(t,i,!0),t.child}function ME(e){var t=e.stateNode;t.pendingContext?kv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&kv(e,t.context,!1),um(e,t.containerInfo)}function ty(e,t,i,s,n){return No(),sm(n),t.flags|=256,Ot(e,t,i,s),t.child}var Ig={dehydrated:null,treeContext:null,retryLane:0};function Ng(e){return{baseLanes:e,cachePool:null,transitions:null}}function IE(e,t,i){var s=t.pendingProps,n=ze.current,r=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(n&2)!==0),l?(r=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(n|=1),Me(ze,n&1),e===null)return Pg(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):(o=s.children,e=s.fallback,r?(s=t.mode,r=t.child,o={mode:"hidden",children:o},!(s&1)&&r!==null?(r.childLanes=0,r.pendingProps=o):r=Zc(o,s,0,null),e=fr(e,s,i,null),r.return=t,e.return=t,r.sibling=e,t.child=r,t.child.memoizedState=Ng(i),t.memoizedState=Ig,e):Cm(t,o));if(n=e.memoizedState,n!==null&&(l=n.dehydrated,l!==null))return pA(e,t,o,s,l,n,i);if(r){r=s.fallback,o=t.mode,n=e.child,l=n.sibling;var a={mode:"hidden",children:s.children};return!(o&1)&&t.child!==n?(s=t.child,s.childLanes=0,s.pendingProps=a,t.deletions=null):(s=Pn(n,a),s.subtreeFlags=n.subtreeFlags&14680064),l!==null?r=Pn(l,r):(r=fr(r,o,i,null),r.flags|=2),r.return=t,s.return=t,s.sibling=r,t.child=s,s=r,r=t.child,o=e.child.memoizedState,o=o===null?Ng(i):{baseLanes:o.baseLanes|i,cachePool:null,transitions:o.transitions},r.memoizedState=o,r.childLanes=e.childLanes&~i,t.memoizedState=Ig,s}return r=e.child,e=r.sibling,s=Pn(r,{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 Cm(e,t){return t=Zc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qu(e,t,i,s){return s!==null&&sm(s),_o(t,e.child,null,i),e=Cm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pA(e,t,i,s,n,r,o){if(i)return t.flags&256?(t.flags&=-257,s=Cp(Error(V(422))),Qu(e,t,o,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(r=s.fallback,n=t.mode,s=Zc({mode:"visible",children:s.children},n,0,null),r=fr(r,n,o,null),r.flags|=2,s.return=t,r.return=t,s.sibling=r,t.child=s,t.mode&1&&_o(t,e.child,null,o),t.child.memoizedState=Ng(o),t.memoizedState=Ig,r);if(!(t.mode&1))return Qu(e,t,o,null);if(n.data==="$!"){if(s=n.nextSibling&&n.nextSibling.dataset,s)var l=s.dgst;return s=l,r=Error(V(419)),s=Cp(r,s,void 0),Qu(e,t,o,s)}if(l=(o&e.childLanes)!==0,ti||l){if(s=vt,s!==null){switch(o&-o){case 4:n=2;break;case 16:n=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:n=32;break;case 536870912:n=268435456;break;default:n=0}n=n&(s.suspendedLanes|o)?0:n,n!==0&&n!==r.retryLane&&(r.retryLane=n,Bs(e,n),ns(s,e,n,-1))}return Rm(),s=Cp(Error(V(421))),Qu(e,t,o,s)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=PA.bind(null,e),n._reactRetry=t,null):(e=r.treeContext,Si=En(n.nextSibling),Ei=t,We=!0,Ji=null,e!==null&&(Li[Mi++]=_s,Li[Mi++]=Os,Li[Mi++]=Tr,_s=e.id,Os=e.overflow,Tr=t),t=Cm(t,s.children),t.flags|=4096,t)}function iy(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),bg(e.return,t,i)}function vp(e,t,i,s,n){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:n}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=s,r.tail=i,r.tailMode=n)}function NE(e,t,i){var s=t.pendingProps,n=s.revealOrder,r=s.tail;if(Ot(e,t,s.children,i),s=ze.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&&iy(e,i,t);else if(e.tag===19)iy(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(Me(ze,s),!(t.mode&1))t.memoizedState=null;else switch(n){case"forwards":for(i=t.child,n=null;i!==null;)e=i.alternate,e!==null&&Jd(e)===null&&(n=i),i=i.sibling;i=n,i===null?(n=t.child,t.child=null):(n=i.sibling,i.sibling=null),vp(t,!1,n,i,r);break;case"backwards":for(i=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Jd(e)===null){t.child=n;break}e=n.sibling,n.sibling=i,i=n,n=e}vp(t,!0,i,null,r);break;case"together":vp(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function gd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ws(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Pr|=t.lanes,!(i&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(V(153));if(t.child!==null){for(e=t.child,i=Pn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Pn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function gA(e,t,i){switch(t.tag){case 3:ME(t),No();break;case 5:oE(t);break;case 1:li(t.type)&&Kd(t);break;case 4:um(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,n=t.memoizedProps.value;Me(qd,s._currentValue),s._currentValue=n;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(Me(ze,ze.current&1),t.flags|=128,null):i&t.child.childLanes?IE(e,t,i):(Me(ze,ze.current&1),e=Ws(e,t,i),e!==null?e.sibling:null);Me(ze,ze.current&1);break;case 19:if(s=(i&t.childLanes)!==0,e.flags&128){if(s)return NE(e,t,i);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Me(ze,ze.current),s)break;return null;case 22:case 23:return t.lanes=0,xE(e,t,i)}return Ws(e,t,i)}var _E,_g,OE,GE;_E=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}};_g=function(){};OE=function(e,t,i,s){var n=e.memoizedProps;if(n!==s){e=t.stateNode,ur(Ss.current);var r=null;switch(i){case"input":n=sg(e,n),s=sg(e,s),r=[];break;case"select":n=je({},n,{value:void 0}),s=je({},s,{value:void 0}),r=[];break;case"textarea":n=og(e,n),s=og(e,s),r=[];break;default:typeof n.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=$d)}ag(i,s);var o;i=null;for(u in n)if(!s.hasOwnProperty(u)&&n.hasOwnProperty(u)&&n[u]!=null)if(u==="style"){var l=n[u];for(o in l)l.hasOwnProperty(o)&&(i||(i={}),i[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(da.hasOwnProperty(u)?r||(r=[]):(r=r||[]).push(u,null));for(u in s){var a=s[u];if(l=n!=null?n[u]:void 0,s.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||a&&a.hasOwnProperty(o)||(i||(i={}),i[o]="");for(o in a)a.hasOwnProperty(o)&&l[o]!==a[o]&&(i||(i={}),i[o]=a[o])}else i||(r||(r=[]),r.push(u,i)),i=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(r=r||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(r=r||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(da.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Oe("scroll",e),r||l===a||(r=[])):(r=r||[]).push(u,a))}i&&(r=r||[]).push("style",i);var u=r;(t.updateQueue=u)&&(t.flags|=4)}};GE=function(e,t,i,s){i!==s&&(t.flags|=4)};function Il(e,t){if(!We)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 At(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var n=e.child;n!==null;)i|=n.lanes|n.childLanes,s|=n.subtreeFlags&14680064,s|=n.flags&14680064,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)i|=n.lanes|n.childLanes,s|=n.subtreeFlags,s|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function fA(e,t,i){var s=t.pendingProps;switch(im(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(t),null;case 1:return li(t.type)&&jd(),At(t),null;case 3:return s=t.stateNode,Oo(),ke(oi),ke(Mt),cm(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Ku(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ji!==null&&(Ug(Ji),Ji=null))),_g(e,t),At(t),null;case 5:dm(t);var n=ur(Ea.current);if(i=t.type,e!==null&&t.stateNode!=null)OE(e,t,i,s,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(t.stateNode===null)throw Error(V(166));return At(t),null}if(e=ur(Ss.current),Ku(t)){s=t.stateNode,i=t.type;var r=t.memoizedProps;switch(s[vs]=t,s[wa]=r,e=(t.mode&1)!==0,i){case"dialog":Oe("cancel",s),Oe("close",s);break;case"iframe":case"object":case"embed":Oe("load",s);break;case"video":case"audio":for(n=0;n<Bl.length;n++)Oe(Bl[n],s);break;case"source":Oe("error",s);break;case"img":case"image":case"link":Oe("error",s),Oe("load",s);break;case"details":Oe("toggle",s);break;case"input":cv(s,r),Oe("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!r.multiple},Oe("invalid",s);break;case"textarea":pv(s,r),Oe("invalid",s)}ag(i,r),n=null;for(var o in r)if(r.hasOwnProperty(o)){var l=r[o];o==="children"?typeof l=="string"?s.textContent!==l&&(r.suppressHydrationWarning!==!0&&ju(s.textContent,l,e),n=["children",l]):typeof l=="number"&&s.textContent!==""+l&&(r.suppressHydrationWarning!==!0&&ju(s.textContent,l,e),n=["children",""+l]):da.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Oe("scroll",s)}switch(i){case"input":ku(s),hv(s,r,!0);break;case"textarea":ku(s),gv(s);break;case"select":case"option":break;default:typeof r.onClick=="function"&&(s.onclick=$d)}s=n,t.updateQueue=s,s!==null&&(t.flags|=4)}else{o=n.nodeType===9?n:n.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=cS(i)),e==="http://www.w3.org/1999/xhtml"?i==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=o.createElement(i,{is:s.is}):(e=o.createElement(i),i==="select"&&(o=e,s.multiple?o.multiple=!0:s.size&&(o.size=s.size))):e=o.createElementNS(e,i),e[vs]=t,e[wa]=s,_E(e,t,!1,!1),t.stateNode=e;e:{switch(o=ug(i,s),i){case"dialog":Oe("cancel",e),Oe("close",e),n=s;break;case"iframe":case"object":case"embed":Oe("load",e),n=s;break;case"video":case"audio":for(n=0;n<Bl.length;n++)Oe(Bl[n],e);n=s;break;case"source":Oe("error",e),n=s;break;case"img":case"image":case"link":Oe("error",e),Oe("load",e),n=s;break;case"details":Oe("toggle",e),n=s;break;case"input":cv(e,s),n=sg(e,s),Oe("invalid",e);break;case"option":n=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},n=je({},s,{value:void 0}),Oe("invalid",e);break;case"textarea":pv(e,s),n=og(e,s),Oe("invalid",e);break;default:n=s}ag(i,n),l=n;for(r in l)if(l.hasOwnProperty(r)){var a=l[r];r==="style"?gS(e,a):r==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&hS(e,a)):r==="children"?typeof a=="string"?(i!=="textarea"||a!=="")&&ca(e,a):typeof a=="number"&&ca(e,""+a):r!=="suppressContentEditableWarning"&&r!=="suppressHydrationWarning"&&r!=="autoFocus"&&(da.hasOwnProperty(r)?a!=null&&r==="onScroll"&&Oe("scroll",e):a!=null&&Bf(e,r,a,o))}switch(i){case"input":ku(e),hv(e,s,!1);break;case"textarea":ku(e),gv(e);break;case"option":s.value!=null&&e.setAttribute("value",""+An(s.value));break;case"select":e.multiple=!!s.multiple,r=s.value,r!=null?Eo(e,!!s.multiple,r,!1):s.defaultValue!=null&&Eo(e,!!s.multiple,s.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=$d)}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 At(t),null;case 6:if(e&&t.stateNode!=null)GE(e,t,e.memoizedProps,s);else{if(typeof s!="string"&&t.stateNode===null)throw Error(V(166));if(i=ur(Ea.current),ur(Ss.current),Ku(t)){if(s=t.stateNode,i=t.memoizedProps,s[vs]=t,(r=s.nodeValue!==i)&&(e=Ei,e!==null))switch(e.tag){case 3:ju(s.nodeValue,i,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ju(s.nodeValue,i,(e.mode&1)!==0)}r&&(t.flags|=4)}else s=(i.nodeType===9?i:i.ownerDocument).createTextNode(s),s[vs]=t,t.stateNode=s}return At(t),null;case 13:if(ke(ze),s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(We&&Si!==null&&t.mode&1&&!(t.flags&128))tE(),No(),t.flags|=98560,r=!1;else if(r=Ku(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(V(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(V(317));r[vs]=t}else No(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;At(t),r=!1}else Ji!==null&&(Ug(Ji),Ji=null),r=!0;if(!r)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||ze.current&1?pt===0&&(pt=3):Rm())),t.updateQueue!==null&&(t.flags|=4),At(t),null);case 4:return Oo(),_g(e,t),e===null&&va(t.stateNode.containerInfo),At(t),null;case 10:return om(t.type._context),At(t),null;case 17:return li(t.type)&&jd(),At(t),null;case 19:if(ke(ze),r=t.memoizedState,r===null)return At(t),null;if(s=(t.flags&128)!==0,o=r.rendering,o===null)if(s)Il(r,!1);else{if(pt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Jd(e),o!==null){for(t.flags|=128,Il(r,!1),s=o.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),t.subtreeFlags=0,s=i,i=t.child;i!==null;)r=i,e=s,r.flags&=14680066,o=r.alternate,o===null?(r.childLanes=0,r.lanes=e,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,e=o.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),i=i.sibling;return Me(ze,ze.current&1|2),t.child}e=e.sibling}r.tail!==null&&et()>ko&&(t.flags|=128,s=!0,Il(r,!1),t.lanes=4194304)}else{if(!s)if(e=Jd(o),e!==null){if(t.flags|=128,s=!0,i=e.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),Il(r,!0),r.tail===null&&r.tailMode==="hidden"&&!o.alternate&&!We)return At(t),null}else 2*et()-r.renderingStartTime>ko&&i!==1073741824&&(t.flags|=128,s=!0,Il(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(i=r.last,i!==null?i.sibling=o:t.child=o,r.last=o)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=et(),t.sibling=null,i=ze.current,Me(ze,s?i&1|2:i&1),t):(At(t),null);case 22:case 23:return Em(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?mi&1073741824&&(At(t),t.subtreeFlags&6&&(t.flags|=8192)):At(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function mA(e,t){switch(im(t),t.tag){case 1:return li(t.type)&&jd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Oo(),ke(oi),ke(Mt),cm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return dm(t),null;case 13:if(ke(ze),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));No()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ke(ze),null;case 4:return Oo(),null;case 10:return om(t.type._context),null;case 22:case 23:return Em(),null;case 24:return null;default:return null}}var qu=!1,xt=!1,CA=typeof WeakSet=="function"?WeakSet:Set,j=null;function vo(e,t){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(s){Qe(e,t,s)}else i.current=null}function Og(e,t,i){try{i()}catch(s){Qe(e,t,s)}}var sy=!1;function vA(e,t){if(yg=Wd,e=WS(),em(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 n=s.anchorOffset,r=s.focusNode;s=s.focusOffset;try{i.nodeType,r.nodeType}catch{i=null;break e}var o=0,l=-1,a=-1,u=0,d=0,c=e,p=null;t:for(;;){for(var C;c!==i||n!==0&&c.nodeType!==3||(l=o+n),c!==r||s!==0&&c.nodeType!==3||(a=o+s),c.nodeType===3&&(o+=c.nodeValue.length),(C=c.firstChild)!==null;)p=c,c=C;for(;;){if(c===e)break t;if(p===i&&++u===n&&(l=o),p===r&&++d===s&&(a=o),(C=c.nextSibling)!==null)break;c=p,p=c.parentNode}c=C}i=l===-1||a===-1?null:{start:l,end:a}}else i=null}i=i||{start:0,end:0}}else i=null;for(wg={focusedElem:e,selectionRange:i},Wd=!1,j=t;j!==null;)if(t=j,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,j=e;else for(;j!==null;){t=j;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 S=v.memoizedProps,E=v.memoizedState,w=t.stateNode,m=w.getSnapshotBeforeUpdate(t.elementType===t.type?S:Qi(t.type,S),E);w.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var R=t.stateNode.containerInfo;R.nodeType===1?R.textContent="":R.nodeType===9&&R.documentElement&&R.removeChild(R.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(V(163))}}catch(T){Qe(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,j=e;break}j=t.return}return v=sy,sy=!1,v}function na(e,t,i){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var n=s=s.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,r!==void 0&&Og(t,i,r)}n=n.next}while(n!==s)}}function qc(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 Gg(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 kE(e){var t=e.alternate;t!==null&&(e.alternate=null,kE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vs],delete t[wa],delete t[Rg],delete t[eA],delete t[tA])),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 VE(e){return e.tag===5||e.tag===3||e.tag===4}function ny(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||VE(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 kg(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=$d));else if(s!==4&&(e=e.child,e!==null))for(kg(e,t,i),e=e.sibling;e!==null;)kg(e,t,i),e=e.sibling}function Vg(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(Vg(e,t,i),e=e.sibling;e!==null;)Vg(e,t,i),e=e.sibling}var St=null,qi=!1;function sn(e,t,i){for(i=i.child;i!==null;)HE(e,t,i),i=i.sibling}function HE(e,t,i){if(ws&&typeof ws.onCommitFiberUnmount=="function")try{ws.onCommitFiberUnmount(Wc,i)}catch{}switch(i.tag){case 5:xt||vo(i,t);case 6:var s=St,n=qi;St=null,sn(e,t,i),St=s,qi=n,St!==null&&(qi?(e=St,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):St.removeChild(i.stateNode));break;case 18:St!==null&&(qi?(e=St,i=i.stateNode,e.nodeType===8?cp(e.parentNode,i):e.nodeType===1&&cp(e,i),fa(e)):cp(St,i.stateNode));break;case 4:s=St,n=qi,St=i.stateNode.containerInfo,qi=!0,sn(e,t,i),St=s,qi=n;break;case 0:case 11:case 14:case 15:if(!xt&&(s=i.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){n=s=s.next;do{var r=n,o=r.destroy;r=r.tag,o!==void 0&&(r&2||r&4)&&Og(i,t,o),n=n.next}while(n!==s)}sn(e,t,i);break;case 1:if(!xt&&(vo(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=i.memoizedProps,s.state=i.memoizedState,s.componentWillUnmount()}catch(l){Qe(i,t,l)}sn(e,t,i);break;case 21:sn(e,t,i);break;case 22:i.mode&1?(xt=(s=xt)||i.memoizedState!==null,sn(e,t,i),xt=s):sn(e,t,i);break;default:sn(e,t,i)}}function ry(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new CA),t.forEach(function(s){var n=bA.bind(null,e,s);i.has(s)||(i.add(s),s.then(n,n))})}}function Yi(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var n=i[s];try{var r=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:St=l.stateNode,qi=!1;break e;case 3:St=l.stateNode.containerInfo,qi=!0;break e;case 4:St=l.stateNode.containerInfo,qi=!0;break e}l=l.return}if(St===null)throw Error(V(160));HE(r,o,n),St=null,qi=!1;var a=n.alternate;a!==null&&(a.return=null),n.return=null}catch(u){Qe(n,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)BE(t,e),t=t.sibling}function BE(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Yi(t,e),cs(e),s&4){try{na(3,e,e.return),qc(3,e)}catch(S){Qe(e,e.return,S)}try{na(5,e,e.return)}catch(S){Qe(e,e.return,S)}}break;case 1:Yi(t,e),cs(e),s&512&&i!==null&&vo(i,i.return);break;case 5:if(Yi(t,e),cs(e),s&512&&i!==null&&vo(i,i.return),e.flags&32){var n=e.stateNode;try{ca(n,"")}catch(S){Qe(e,e.return,S)}}if(s&4&&(n=e.stateNode,n!=null)){var r=e.memoizedProps,o=i!==null?i.memoizedProps:r,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&r.type==="radio"&&r.name!=null&&uS(n,r),ug(l,o);var u=ug(l,r);for(o=0;o<a.length;o+=2){var d=a[o],c=a[o+1];d==="style"?gS(n,c):d==="dangerouslySetInnerHTML"?hS(n,c):d==="children"?ca(n,c):Bf(n,d,c,u)}switch(l){case"input":ng(n,r);break;case"textarea":dS(n,r);break;case"select":var p=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!r.multiple;var C=r.value;C!=null?Eo(n,!!r.multiple,C,!1):p!==!!r.multiple&&(r.defaultValue!=null?Eo(n,!!r.multiple,r.defaultValue,!0):Eo(n,!!r.multiple,r.multiple?[]:"",!1))}n[wa]=r}catch(S){Qe(e,e.return,S)}}break;case 6:if(Yi(t,e),cs(e),s&4){if(e.stateNode===null)throw Error(V(162));n=e.stateNode,r=e.memoizedProps;try{n.nodeValue=r}catch(S){Qe(e,e.return,S)}}break;case 3:if(Yi(t,e),cs(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{fa(t.containerInfo)}catch(S){Qe(e,e.return,S)}break;case 4:Yi(t,e),cs(e);break;case 13:Yi(t,e),cs(e),n=e.child,n.flags&8192&&(r=n.memoizedState!==null,n.stateNode.isHidden=r,!r||n.alternate!==null&&n.alternate.memoizedState!==null||(wm=et())),s&4&&ry(e);break;case 22:if(d=i!==null&&i.memoizedState!==null,e.mode&1?(xt=(u=xt)||d,Yi(t,e),xt=u):Yi(t,e),cs(e),s&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(j=e,d=e.child;d!==null;){for(c=j=d;j!==null;){switch(p=j,C=p.child,p.tag){case 0:case 11:case 14:case 15:na(4,p,p.return);break;case 1:vo(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){s=p,i=p.return;try{t=s,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(S){Qe(s,i,S)}}break;case 5:vo(p,p.return);break;case 22:if(p.memoizedState!==null){ly(c);continue}}C!==null?(C.return=p,j=C):ly(c)}d=d.sibling}e:for(d=null,c=e;;){if(c.tag===5){if(d===null){d=c;try{n=c.stateNode,u?(r=n.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none"):(l=c.stateNode,a=c.memoizedProps.style,o=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=pS("display",o))}catch(S){Qe(e,e.return,S)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(S){Qe(e,e.return,S)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:Yi(t,e),cs(e),s&4&&ry(e);break;case 21:break;default:Yi(t,e),cs(e)}}function cs(e){var t=e.flags;if(t&2){try{e:{for(var i=e.return;i!==null;){if(VE(i)){var s=i;break e}i=i.return}throw Error(V(160))}switch(s.tag){case 5:var n=s.stateNode;s.flags&32&&(ca(n,""),s.flags&=-33);var r=ny(e);Vg(e,r,n);break;case 3:case 4:var o=s.stateNode.containerInfo,l=ny(e);kg(e,l,o);break;default:throw Error(V(161))}}catch(a){Qe(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yA(e,t,i){j=e,WE(e)}function WE(e,t,i){for(var s=(e.mode&1)!==0;j!==null;){var n=j,r=n.child;if(n.tag===22&&s){var o=n.memoizedState!==null||qu;if(!o){var l=n.alternate,a=l!==null&&l.memoizedState!==null||xt;l=qu;var u=xt;if(qu=o,(xt=a)&&!u)for(j=n;j!==null;)o=j,a=o.child,o.tag===22&&o.memoizedState!==null?ay(n):a!==null?(a.return=o,j=a):ay(n);for(;r!==null;)j=r,WE(r),r=r.sibling;j=n,qu=l,xt=u}oy(e)}else n.subtreeFlags&8772&&r!==null?(r.return=n,j=r):oy(e)}}function oy(e){for(;j!==null;){var t=j;if(t.flags&8772){var i=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:xt||qc(5,t);break;case 1:var s=t.stateNode;if(t.flags&4&&!xt)if(i===null)s.componentDidMount();else{var n=t.elementType===t.type?i.memoizedProps:Qi(t.type,i.memoizedProps);s.componentDidUpdate(n,i.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var r=t.updateQueue;r!==null&&zv(t,r,s);break;case 3:var o=t.updateQueue;if(o!==null){if(i=null,t.child!==null)switch(t.child.tag){case 5:i=t.child.stateNode;break;case 1:i=t.child.stateNode}zv(t,o,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 u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&fa(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(V(163))}xt||t.flags&512&&Gg(t)}catch(p){Qe(t,t.return,p)}}if(t===e){j=null;break}if(i=t.sibling,i!==null){i.return=t.return,j=i;break}j=t.return}}function ly(e){for(;j!==null;){var t=j;if(t===e){j=null;break}var i=t.sibling;if(i!==null){i.return=t.return,j=i;break}j=t.return}}function ay(e){for(;j!==null;){var t=j;try{switch(t.tag){case 0:case 11:case 15:var i=t.return;try{qc(4,t)}catch(a){Qe(t,i,a)}break;case 1:var s=t.stateNode;if(typeof s.componentDidMount=="function"){var n=t.return;try{s.componentDidMount()}catch(a){Qe(t,n,a)}}var r=t.return;try{Gg(t)}catch(a){Qe(t,r,a)}break;case 5:var o=t.return;try{Gg(t)}catch(a){Qe(t,o,a)}}}catch(a){Qe(t,t.return,a)}if(t===e){j=null;break}var l=t.sibling;if(l!==null){l.return=t.return,j=l;break}j=t.return}}var wA=Math.ceil,ic=Ks.ReactCurrentDispatcher,vm=Ks.ReactCurrentOwner,Gi=Ks.ReactCurrentBatchConfig,ye=0,vt=null,lt=null,Rt=0,mi=0,yo=kn(0),pt=0,Pa=null,Pr=0,Xc=0,ym=0,ra=null,ei=null,wm=0,ko=1/0,Ms=null,sc=!1,Hg=null,Tn=null,Xu=!1,fn=null,nc=0,oa=0,Bg=null,fd=-1,md=0;function Vt(){return ye&6?et():fd!==-1?fd:fd=et()}function Dn(e){return e.mode&1?ye&2&&Rt!==0?Rt&-Rt:sA.transition!==null?(md===0&&(md=PS()),md):(e=be,e!==0||(e=window.event,e=e===void 0?16:IS(e.type)),e):1}function ns(e,t,i,s){if(50<oa)throw oa=0,Bg=null,Error(V(185));du(e,i,s),(!(ye&2)||e!==vt)&&(e===vt&&(!(ye&2)&&(Xc|=i),pt===4&&hn(e,Rt)),ai(e,s),i===1&&ye===0&&!(t.mode&1)&&(ko=et()+500,Kc&&Vn()))}function ai(e,t){var i=e.callbackNode;sF(e,t);var s=Bd(e,e===vt?Rt:0);if(s===0)i!==null&&Cv(i),e.callbackNode=null,e.callbackPriority=0;else if(t=s&-s,e.callbackPriority!==t){if(i!=null&&Cv(i),t===1)e.tag===0?iA(uy.bind(null,e)):ZS(uy.bind(null,e)),ZF(function(){!(ye&6)&&Vn()}),i=null;else{switch(bS(s)){case 1:i=jf;break;case 4:i=TS;break;case 16:i=Hd;break;case 536870912:i=DS;break;default:i=Hd}i=qE(i,UE.bind(null,e))}e.callbackPriority=t,e.callbackNode=i}}function UE(e,t){if(fd=-1,md=0,ye&6)throw Error(V(327));var i=e.callbackNode;if(bo()&&e.callbackNode!==i)return null;var s=Bd(e,e===vt?Rt:0);if(s===0)return null;if(s&30||s&e.expiredLanes||t)t=rc(e,s);else{t=s;var n=ye;ye|=2;var r=$E();(vt!==e||Rt!==t)&&(Ms=null,ko=et()+500,gr(e,t));do try{RA();break}catch(l){zE(e,l)}while(!0);rm(),ic.current=r,ye=n,lt!==null?t=0:(vt=null,Rt=0,t=pt)}if(t!==0){if(t===2&&(n=gg(e),n!==0&&(s=n,t=Wg(e,n))),t===1)throw i=Pa,gr(e,0),hn(e,s),ai(e,et()),i;if(t===6)hn(e,s);else{if(n=e.current.alternate,!(s&30)&&!SA(n)&&(t=rc(e,s),t===2&&(r=gg(e),r!==0&&(s=r,t=Wg(e,r))),t===1))throw i=Pa,gr(e,0),hn(e,s),ai(e,et()),i;switch(e.finishedWork=n,e.finishedLanes=s,t){case 0:case 1:throw Error(V(345));case 2:Jn(e,ei,Ms);break;case 3:if(hn(e,s),(s&130023424)===s&&(t=wm+500-et(),10<t)){if(Bd(e,0)!==0)break;if(n=e.suspendedLanes,(n&s)!==s){Vt(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=Eg(Jn.bind(null,e,ei,Ms),t);break}Jn(e,ei,Ms);break;case 4:if(hn(e,s),(s&4194240)===s)break;for(t=e.eventTimes,n=-1;0<s;){var o=31-ss(s);r=1<<o,o=t[o],o>n&&(n=o),s&=~r}if(s=n,s=et()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*wA(s/1960))-s,10<s){e.timeoutHandle=Eg(Jn.bind(null,e,ei,Ms),s);break}Jn(e,ei,Ms);break;case 5:Jn(e,ei,Ms);break;default:throw Error(V(329))}}}return ai(e,et()),e.callbackNode===i?UE.bind(null,e):null}function Wg(e,t){var i=ra;return e.current.memoizedState.isDehydrated&&(gr(e,t).flags|=256),e=rc(e,t),e!==2&&(t=ei,ei=i,t!==null&&Ug(t)),e}function Ug(e){ei===null?ei=e:ei.push.apply(ei,e)}function SA(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 n=i[s],r=n.getSnapshot;n=n.value;try{if(!os(r(),n))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 hn(e,t){for(t&=~ym,t&=~Xc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var i=31-ss(t),s=1<<i;e[i]=-1,t&=~s}}function uy(e){if(ye&6)throw Error(V(327));bo();var t=Bd(e,0);if(!(t&1))return ai(e,et()),null;var i=rc(e,t);if(e.tag!==0&&i===2){var s=gg(e);s!==0&&(t=s,i=Wg(e,s))}if(i===1)throw i=Pa,gr(e,0),hn(e,t),ai(e,et()),i;if(i===6)throw Error(V(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Jn(e,ei,Ms),ai(e,et()),null}function Sm(e,t){var i=ye;ye|=1;try{return e(t)}finally{ye=i,ye===0&&(ko=et()+500,Kc&&Vn())}}function br(e){fn!==null&&fn.tag===0&&!(ye&6)&&bo();var t=ye;ye|=1;var i=Gi.transition,s=be;try{if(Gi.transition=null,be=1,e)return e()}finally{be=s,Gi.transition=i,ye=t,!(ye&6)&&Vn()}}function Em(){mi=yo.current,ke(yo)}function gr(e,t){e.finishedWork=null,e.finishedLanes=0;var i=e.timeoutHandle;if(i!==-1&&(e.timeoutHandle=-1,XF(i)),lt!==null)for(i=lt.return;i!==null;){var s=i;switch(im(s),s.tag){case 1:s=s.type.childContextTypes,s!=null&&jd();break;case 3:Oo(),ke(oi),ke(Mt),cm();break;case 5:dm(s);break;case 4:Oo();break;case 13:ke(ze);break;case 19:ke(ze);break;case 10:om(s.type._context);break;case 22:case 23:Em()}i=i.return}if(vt=e,lt=e=Pn(e.current,null),Rt=mi=t,pt=0,Pa=null,ym=Xc=Pr=0,ei=ra=null,ar!==null){for(t=0;t<ar.length;t++)if(i=ar[t],s=i.interleaved,s!==null){i.interleaved=null;var n=s.next,r=i.pending;if(r!==null){var o=r.next;r.next=n,s.next=o}i.pending=s}ar=null}return e}function zE(e,t){do{var i=lt;try{if(rm(),hd.current=tc,ec){for(var s=$e.memoizedState;s!==null;){var n=s.queue;n!==null&&(n.pending=null),s=s.next}ec=!1}if(Dr=0,mt=ct=$e=null,sa=!1,Ra=0,vm.current=null,i===null||i.return===null){pt=1,Pa=t,lt=null;break}e:{var r=e,o=i.return,l=i,a=t;if(t=Rt,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,d=l,c=d.tag;if(!(d.mode&1)&&(c===0||c===11||c===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var C=qv(o);if(C!==null){C.flags&=-257,Xv(C,o,l,r,t),C.mode&1&&Qv(r,u,t),t=C,a=u;var v=t.updateQueue;if(v===null){var S=new Set;S.add(a),t.updateQueue=S}else v.add(a);break e}else{if(!(t&1)){Qv(r,u,t),Rm();break e}a=Error(V(426))}}else if(We&&l.mode&1){var E=qv(o);if(E!==null){!(E.flags&65536)&&(E.flags|=256),Xv(E,o,l,r,t),sm(Go(a,l));break e}}r=a=Go(a,l),pt!==4&&(pt=2),ra===null?ra=[r]:ra.push(r),r=o;do{switch(r.tag){case 3:r.flags|=65536,t&=-t,r.lanes|=t;var w=bE(r,a,t);Uv(r,w);break e;case 1:l=a;var m=r.type,R=r.stateNode;if(!(r.flags&128)&&(typeof m.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(Tn===null||!Tn.has(R)))){r.flags|=65536,t&=-t,r.lanes|=t;var T=FE(r,l,t);Uv(r,T);break e}}r=r.return}while(r!==null)}KE(i)}catch(P){t=P,lt===i&&i!==null&&(lt=i=i.return);continue}break}while(!0)}function $E(){var e=ic.current;return ic.current=tc,e===null?tc:e}function Rm(){(pt===0||pt===3||pt===2)&&(pt=4),vt===null||!(Pr&268435455)&&!(Xc&268435455)||hn(vt,Rt)}function rc(e,t){var i=ye;ye|=2;var s=$E();(vt!==e||Rt!==t)&&(Ms=null,gr(e,t));do try{EA();break}catch(n){zE(e,n)}while(!0);if(rm(),ye=i,ic.current=s,lt!==null)throw Error(V(261));return vt=null,Rt=0,pt}function EA(){for(;lt!==null;)jE(lt)}function RA(){for(;lt!==null&&!Yb();)jE(lt)}function jE(e){var t=QE(e.alternate,e,mi);e.memoizedProps=e.pendingProps,t===null?KE(e):lt=t,vm.current=null}function KE(e){var t=e;do{var i=t.alternate;if(e=t.return,t.flags&32768){if(i=mA(i,t),i!==null){i.flags&=32767,lt=i;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{pt=6,lt=null;return}}else if(i=fA(i,t,mi),i!==null){lt=i;return}if(t=t.sibling,t!==null){lt=t;return}lt=t=e}while(t!==null);pt===0&&(pt=5)}function Jn(e,t,i){var s=be,n=Gi.transition;try{Gi.transition=null,be=1,TA(e,t,i,s)}finally{Gi.transition=n,be=s}return null}function TA(e,t,i,s){do bo();while(fn!==null);if(ye&6)throw Error(V(327));i=e.finishedWork;var n=e.finishedLanes;if(i===null)return null;if(e.finishedWork=null,e.finishedLanes=0,i===e.current)throw Error(V(177));e.callbackNode=null,e.callbackPriority=0;var r=i.lanes|i.childLanes;if(nF(e,r),e===vt&&(lt=vt=null,Rt=0),!(i.subtreeFlags&2064)&&!(i.flags&2064)||Xu||(Xu=!0,qE(Hd,function(){return bo(),null})),r=(i.flags&15990)!==0,i.subtreeFlags&15990||r){r=Gi.transition,Gi.transition=null;var o=be;be=1;var l=ye;ye|=4,vm.current=null,vA(e,i),BE(i,e),zF(wg),Wd=!!yg,wg=yg=null,e.current=i,yA(i),Qb(),ye=l,be=o,Gi.transition=r}else e.current=i;if(Xu&&(Xu=!1,fn=e,nc=n),r=e.pendingLanes,r===0&&(Tn=null),Zb(i.stateNode),ai(e,et()),t!==null)for(s=e.onRecoverableError,i=0;i<t.length;i++)n=t[i],s(n.value,{componentStack:n.stack,digest:n.digest});if(sc)throw sc=!1,e=Hg,Hg=null,e;return nc&1&&e.tag!==0&&bo(),r=e.pendingLanes,r&1?e===Bg?oa++:(oa=0,Bg=e):oa=0,Vn(),null}function bo(){if(fn!==null){var e=bS(nc),t=Gi.transition,i=be;try{if(Gi.transition=null,be=16>e?16:e,fn===null)var s=!1;else{if(e=fn,fn=null,nc=0,ye&6)throw Error(V(331));var n=ye;for(ye|=4,j=e.current;j!==null;){var r=j,o=r.child;if(j.flags&16){var l=r.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(j=u;j!==null;){var d=j;switch(d.tag){case 0:case 11:case 15:na(8,d,r)}var c=d.child;if(c!==null)c.return=d,j=c;else for(;j!==null;){d=j;var p=d.sibling,C=d.return;if(kE(d),d===u){j=null;break}if(p!==null){p.return=C,j=p;break}j=C}}}var v=r.alternate;if(v!==null){var S=v.child;if(S!==null){v.child=null;do{var E=S.sibling;S.sibling=null,S=E}while(S!==null)}}j=r}}if(r.subtreeFlags&2064&&o!==null)o.return=r,j=o;else e:for(;j!==null;){if(r=j,r.flags&2048)switch(r.tag){case 0:case 11:case 15:na(9,r,r.return)}var w=r.sibling;if(w!==null){w.return=r.return,j=w;break e}j=r.return}}var m=e.current;for(j=m;j!==null;){o=j;var R=o.child;if(o.subtreeFlags&2064&&R!==null)R.return=o,j=R;else e:for(o=m;j!==null;){if(l=j,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:qc(9,l)}}catch(P){Qe(l,l.return,P)}if(l===o){j=null;break e}var T=l.sibling;if(T!==null){T.return=l.return,j=T;break e}j=l.return}}if(ye=n,Vn(),ws&&typeof ws.onPostCommitFiberRoot=="function")try{ws.onPostCommitFiberRoot(Wc,e)}catch{}s=!0}return s}finally{be=i,Gi.transition=t}}return!1}function dy(e,t,i){t=Go(i,t),t=bE(e,t,1),e=Rn(e,t,1),t=Vt(),e!==null&&(du(e,1,t),ai(e,t))}function Qe(e,t,i){if(e.tag===3)dy(e,e,i);else for(;t!==null;){if(t.tag===3){dy(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Tn===null||!Tn.has(s))){e=Go(i,e),e=FE(t,e,1),t=Rn(t,e,1),e=Vt(),t!==null&&(du(t,1,e),ai(t,e));break}}t=t.return}}function DA(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),t=Vt(),e.pingedLanes|=e.suspendedLanes&i,vt===e&&(Rt&i)===i&&(pt===4||pt===3&&(Rt&130023424)===Rt&&500>et()-wm?gr(e,0):ym|=i),ai(e,t)}function YE(e,t){t===0&&(e.mode&1?(t=Bu,Bu<<=1,!(Bu&130023424)&&(Bu=4194304)):t=1);var i=Vt();e=Bs(e,t),e!==null&&(du(e,t,i),ai(e,i))}function PA(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),YE(e,i)}function bA(e,t){var i=0;switch(e.tag){case 13:var s=e.stateNode,n=e.memoizedState;n!==null&&(i=n.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(V(314))}s!==null&&s.delete(t),YE(e,i)}var QE;QE=function(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps||oi.current)ti=!0;else{if(!(e.lanes&i)&&!(t.flags&128))return ti=!1,gA(e,t,i);ti=!!(e.flags&131072)}else ti=!1,We&&t.flags&1048576&&JS(t,Qd,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;gd(e,t),e=t.pendingProps;var n=Io(t,Mt.current);Po(t,i),n=pm(null,t,s,e,n,i);var r=gm();return t.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,li(s)?(r=!0,Kd(t)):r=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,am(t),n.updater=Qc,t.stateNode=n,n._reactInternals=t,Ag(t,s,e,i),t=Mg(null,t,s,!0,r,i)):(t.tag=0,We&&r&&tm(t),Ot(null,t,n,i),t=t.child),t;case 16:s=t.elementType;e:{switch(gd(e,t),e=t.pendingProps,n=s._init,s=n(s._payload),t.type=s,n=t.tag=AA(s),e=Qi(s,e),n){case 0:t=Lg(null,t,s,e,i);break e;case 1:t=ey(null,t,s,e,i);break e;case 11:t=Zv(null,t,s,e,i);break e;case 14:t=Jv(null,t,s,Qi(s.type,e),i);break e}throw Error(V(306,s,""))}return t;case 0:return s=t.type,n=t.pendingProps,n=t.elementType===s?n:Qi(s,n),Lg(e,t,s,n,i);case 1:return s=t.type,n=t.pendingProps,n=t.elementType===s?n:Qi(s,n),ey(e,t,s,n,i);case 3:e:{if(ME(t),e===null)throw Error(V(387));s=t.pendingProps,r=t.memoizedState,n=r.element,rE(e,t),Zd(t,s,null,i);var o=t.memoizedState;if(s=o.element,r.isDehydrated)if(r={element:s,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){n=Go(Error(V(423)),t),t=ty(e,t,s,i,n);break e}else if(s!==n){n=Go(Error(V(424)),t),t=ty(e,t,s,i,n);break e}else for(Si=En(t.stateNode.containerInfo.firstChild),Ei=t,We=!0,Ji=null,i=sE(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(No(),s===n){t=Ws(e,t,i);break e}Ot(e,t,s,i)}t=t.child}return t;case 5:return oE(t),e===null&&Pg(t),s=t.type,n=t.pendingProps,r=e!==null?e.memoizedProps:null,o=n.children,Sg(s,n)?o=null:r!==null&&Sg(s,r)&&(t.flags|=32),LE(e,t),Ot(e,t,o,i),t.child;case 6:return e===null&&Pg(t),null;case 13:return IE(e,t,i);case 4:return um(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=_o(t,null,s,i):Ot(e,t,s,i),t.child;case 11:return s=t.type,n=t.pendingProps,n=t.elementType===s?n:Qi(s,n),Zv(e,t,s,n,i);case 7:return Ot(e,t,t.pendingProps,i),t.child;case 8:return Ot(e,t,t.pendingProps.children,i),t.child;case 12:return Ot(e,t,t.pendingProps.children,i),t.child;case 10:e:{if(s=t.type._context,n=t.pendingProps,r=t.memoizedProps,o=n.value,Me(qd,s._currentValue),s._currentValue=o,r!==null)if(os(r.value,o)){if(r.children===n.children&&!oi.current){t=Ws(e,t,i);break e}}else for(r=t.child,r!==null&&(r.return=t);r!==null;){var l=r.dependencies;if(l!==null){o=r.child;for(var a=l.firstContext;a!==null;){if(a.context===s){if(r.tag===1){a=Gs(-1,i&-i),a.tag=2;var u=r.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?a.next=a:(a.next=d.next,d.next=a),u.pending=a}}r.lanes|=i,a=r.alternate,a!==null&&(a.lanes|=i),bg(r.return,i,t),l.lanes|=i;break}a=a.next}}else if(r.tag===10)o=r.type===t.type?null:r.child;else if(r.tag===18){if(o=r.return,o===null)throw Error(V(341));o.lanes|=i,l=o.alternate,l!==null&&(l.lanes|=i),bg(o,i,t),o=r.sibling}else o=r.child;if(o!==null)o.return=r;else for(o=r;o!==null;){if(o===t){o=null;break}if(r=o.sibling,r!==null){r.return=o.return,o=r;break}o=o.return}r=o}Ot(e,t,n.children,i),t=t.child}return t;case 9:return n=t.type,s=t.pendingProps.children,Po(t,i),n=Hi(n),s=s(n),t.flags|=1,Ot(e,t,s,i),t.child;case 14:return s=t.type,n=Qi(s,t.pendingProps),n=Qi(s.type,n),Jv(e,t,s,n,i);case 15:return AE(e,t,t.type,t.pendingProps,i);case 17:return s=t.type,n=t.pendingProps,n=t.elementType===s?n:Qi(s,n),gd(e,t),t.tag=1,li(s)?(e=!0,Kd(t)):e=!1,Po(t,i),PE(t,s,n),Ag(t,s,n,i),Mg(null,t,s,!0,e,i);case 19:return NE(e,t,i);case 22:return xE(e,t,i)}throw Error(V(156,t.tag))};function qE(e,t){return RS(e,t)}function FA(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 Ni(e,t,i,s){return new FA(e,t,i,s)}function Tm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function AA(e){if(typeof e=="function")return Tm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Uf)return 11;if(e===zf)return 14}return 2}function Pn(e,t){var i=e.alternate;return i===null?(i=Ni(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 Cd(e,t,i,s,n,r){var o=2;if(s=e,typeof e=="function")Tm(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ao:return fr(i.children,n,r,t);case Wf:o=8,n|=8;break;case Jp:return e=Ni(12,i,t,n|2),e.elementType=Jp,e.lanes=r,e;case eg:return e=Ni(13,i,t,n),e.elementType=eg,e.lanes=r,e;case tg:return e=Ni(19,i,t,n),e.elementType=tg,e.lanes=r,e;case oS:return Zc(i,n,r,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nS:o=10;break e;case rS:o=9;break e;case Uf:o=11;break e;case zf:o=14;break e;case un:o=16,s=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=Ni(o,i,t,n),t.elementType=e,t.type=s,t.lanes=r,t}function fr(e,t,i,s){return e=Ni(7,e,s,t),e.lanes=i,e}function Zc(e,t,i,s){return e=Ni(22,e,s,t),e.elementType=oS,e.lanes=i,e.stateNode={isHidden:!1},e}function yp(e,t,i){return e=Ni(6,e,null,t),e.lanes=i,e}function wp(e,t,i){return t=Ni(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function xA(e,t,i,s,n){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=ep(0),this.expirationTimes=ep(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ep(0),this.identifierPrefix=s,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function Dm(e,t,i,s,n,r,o,l,a){return e=new xA(e,t,i,l,a),t===1?(t=1,r===!0&&(t|=8)):t=0,r=Ni(3,null,null,t),e.current=r,r.stateNode=e,r.memoizedState={element:s,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},am(r),e}function LA(e,t,i){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:lo,key:s==null?null:""+s,children:e,containerInfo:t,implementation:i}}function XE(e){if(!e)return xn;e=e._reactInternals;e:{if(Hr(e)!==e||e.tag!==1)throw Error(V(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(li(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(V(171))}if(e.tag===1){var i=e.type;if(li(i))return XS(e,i,t)}return t}function ZE(e,t,i,s,n,r,o,l,a){return e=Dm(i,s,!0,e,n,r,o,l,a),e.context=XE(null),i=e.current,s=Vt(),n=Dn(i),r=Gs(s,n),r.callback=t??null,Rn(i,r,n),e.current.lanes=n,du(e,n,s),ai(e,s),e}function Jc(e,t,i,s){var n=t.current,r=Vt(),o=Dn(n);return i=XE(i),t.context===null?t.context=i:t.pendingContext=i,t=Gs(r,o),t.payload={element:e},s=s===void 0?null:s,s!==null&&(t.callback=s),e=Rn(n,t,o),e!==null&&(ns(e,n,o,r),cd(e,n,o)),o}function oc(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 cy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Pm(e,t){cy(e,t),(e=e.alternate)&&cy(e,t)}function MA(){return null}var JE=typeof reportError=="function"?reportError:function(e){console.error(e)};function bm(e){this._internalRoot=e}eh.prototype.render=bm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(V(409));Jc(e,t,null,null)};eh.prototype.unmount=bm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;br(function(){Jc(null,e,null,null)}),t[Hs]=null}};function eh(e){this._internalRoot=e}eh.prototype.unstable_scheduleHydration=function(e){if(e){var t=xS();e={blockedOn:null,target:e,priority:t};for(var i=0;i<cn.length&&t!==0&&t<cn[i].priority;i++);cn.splice(i,0,e),i===0&&MS(e)}};function Fm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function th(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function hy(){}function IA(e,t,i,s,n){if(n){if(typeof s=="function"){var r=s;s=function(){var u=oc(o);r.call(u)}}var o=ZE(t,s,e,0,null,!1,!1,"",hy);return e._reactRootContainer=o,e[Hs]=o.current,va(e.nodeType===8?e.parentNode:e),br(),o}for(;n=e.lastChild;)e.removeChild(n);if(typeof s=="function"){var l=s;s=function(){var u=oc(a);l.call(u)}}var a=Dm(e,0,!1,null,null,!1,!1,"",hy);return e._reactRootContainer=a,e[Hs]=a.current,va(e.nodeType===8?e.parentNode:e),br(function(){Jc(t,a,i,s)}),a}function ih(e,t,i,s,n){var r=i._reactRootContainer;if(r){var o=r;if(typeof n=="function"){var l=n;n=function(){var a=oc(o);l.call(a)}}Jc(t,o,e,n)}else o=IA(i,t,e,n,s);return oc(o)}FS=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var i=Hl(t.pendingLanes);i!==0&&(Kf(t,i|1),ai(t,et()),!(ye&6)&&(ko=et()+500,Vn()))}break;case 13:br(function(){var s=Bs(e,1);if(s!==null){var n=Vt();ns(s,e,1,n)}}),Pm(e,1)}};Yf=function(e){if(e.tag===13){var t=Bs(e,134217728);if(t!==null){var i=Vt();ns(t,e,134217728,i)}Pm(e,134217728)}};AS=function(e){if(e.tag===13){var t=Dn(e),i=Bs(e,t);if(i!==null){var s=Vt();ns(i,e,t,s)}Pm(e,t)}};xS=function(){return be};LS=function(e,t){var i=be;try{return be=e,t()}finally{be=i}};cg=function(e,t,i){switch(t){case"input":if(ng(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 n=jc(s);if(!n)throw Error(V(90));aS(s),ng(s,n)}}}break;case"textarea":dS(e,i);break;case"select":t=i.value,t!=null&&Eo(e,!!i.multiple,t,!1)}};CS=Sm;vS=br;var NA={usingClientEntryPoint:!1,Events:[hu,po,jc,fS,mS,Sm]},Nl={findFiberByHostInstance:lr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_A={bundleType:Nl.bundleType,version:Nl.version,rendererPackageName:Nl.rendererPackageName,rendererConfig:Nl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ks.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=SS(e),e===null?null:e.stateNode},findFiberByHostInstance:Nl.findFiberByHostInstance||MA,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 Zu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zu.isDisabled&&Zu.supportsFiber)try{Wc=Zu.inject(_A),ws=Zu}catch{}}bi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NA;bi.createPortal=function(e,t){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Fm(t))throw Error(V(200));return LA(e,t,null,i)};bi.createRoot=function(e,t){if(!Fm(e))throw Error(V(299));var i=!1,s="",n=JE;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=Dm(e,1,!1,null,null,i,!1,s,n),e[Hs]=t.current,va(e.nodeType===8?e.parentNode:e),new bm(t)};bi.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(V(188)):(e=Object.keys(e).join(","),Error(V(268,e)));return e=SS(t),e=e===null?null:e.stateNode,e};bi.flushSync=function(e){return br(e)};bi.hydrate=function(e,t,i){if(!th(t))throw Error(V(200));return ih(null,e,t,!0,i)};bi.hydrateRoot=function(e,t,i){if(!Fm(e))throw Error(V(405));var s=i!=null&&i.hydratedSources||null,n=!1,r="",o=JE;if(i!=null&&(i.unstable_strictMode===!0&&(n=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onRecoverableError!==void 0&&(o=i.onRecoverableError)),t=ZE(t,null,e,1,i??null,n,!1,r,o),e[Hs]=t.current,va(e),s)for(e=0;e<s.length;e++)i=s[e],n=i._getVersion,n=n(i._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[i,n]:t.mutableSourceEagerHydrationData.push(i,n);return new eh(t)};bi.render=function(e,t,i){if(!th(t))throw Error(V(200));return ih(null,e,t,!1,i)};bi.unmountComponentAtNode=function(e){if(!th(e))throw Error(V(40));return e._reactRootContainer?(br(function(){ih(null,null,e,!1,function(){e._reactRootContainer=null,e[Hs]=null})}),!0):!1};bi.unstable_batchedUpdates=Sm;bi.unstable_renderSubtreeIntoContainer=function(e,t,i,s){if(!th(i))throw Error(V(200));if(e==null||e._reactInternals===void 0)throw Error(V(38));return ih(e,t,i,!1,s)};bi.version="18.3.1-next-f1338f8080-20240426";function eR(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eR)}catch(e){console.error(e)}}eR(),eS.exports=bi;var sh=eS.exports;const zg=Ww(sh);var py=sh;Xp.createRoot=py.createRoot,Xp.hydrateRoot=py.hydrateRoot;/**
|
|
41
|
+
* @remix-run/router v1.23.2
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/function ba(){return ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},ba.apply(this,arguments)}var mn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(mn||(mn={}));const gy="popstate";function OA(e){e===void 0&&(e={});function t(s,n){let{pathname:r,search:o,hash:l}=s.location;return $g("",{pathname:r,search:o,hash:l},n.state&&n.state.usr||null,n.state&&n.state.key||"default")}function i(s,n){return typeof n=="string"?n:lc(n)}return kA(t,i,null,e)}function qe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Am(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function GA(){return Math.random().toString(36).substr(2,8)}function fy(e,t){return{usr:e.state,key:e.key,idx:t}}function $g(e,t,i,s){return i===void 0&&(i=null),ba({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ol(t):t,{state:i,key:t&&t.key||s||GA()})}function lc(e){let{pathname:t="/",search:i="",hash:s=""}=e;return i&&i!=="?"&&(t+=i.charAt(0)==="?"?i:"?"+i),s&&s!=="#"&&(t+=s.charAt(0)==="#"?s:"#"+s),t}function ol(e){let t={};if(e){let i=e.indexOf("#");i>=0&&(t.hash=e.substr(i),e=e.substr(0,i));let s=e.indexOf("?");s>=0&&(t.search=e.substr(s),e=e.substr(0,s)),e&&(t.pathname=e)}return t}function kA(e,t,i,s){s===void 0&&(s={});let{window:n=document.defaultView,v5Compat:r=!1}=s,o=n.history,l=mn.Pop,a=null,u=d();u==null&&(u=0,o.replaceState(ba({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function c(){l=mn.Pop;let E=d(),w=E==null?null:E-u;u=E,a&&a({action:l,location:S.location,delta:w})}function p(E,w){l=mn.Push;let m=$g(S.location,E,w);u=d()+1;let R=fy(m,u),T=S.createHref(m);try{o.pushState(R,"",T)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;n.location.assign(T)}r&&a&&a({action:l,location:S.location,delta:1})}function C(E,w){l=mn.Replace;let m=$g(S.location,E,w);u=d();let R=fy(m,u),T=S.createHref(m);o.replaceState(R,"",T),r&&a&&a({action:l,location:S.location,delta:0})}function v(E){let w=n.location.origin!=="null"?n.location.origin:n.location.href,m=typeof E=="string"?E:lc(E);return m=m.replace(/ $/,"%20"),qe(w,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,w)}let S={get action(){return l},get location(){return e(n,o)},listen(E){if(a)throw new Error("A history only accepts one active listener");return n.addEventListener(gy,c),a=E,()=>{n.removeEventListener(gy,c),a=null}},createHref(E){return t(n,E)},createURL:v,encodeLocation(E){let w=v(E);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:p,replace:C,go(E){return o.go(E)}};return S}var my;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(my||(my={}));function VA(e,t,i){return i===void 0&&(i="/"),HA(e,t,i)}function HA(e,t,i,s){let n=typeof t=="string"?ol(t):t,r=Vo(n.pathname||"/",i);if(r==null)return null;let o=tR(e);BA(o);let l=null;for(let a=0;l==null&&a<o.length;++a){let u=ZA(r);l=qA(o[a],u)}return l}function tR(e,t,i,s){t===void 0&&(t=[]),i===void 0&&(i=[]),s===void 0&&(s="");let n=(r,o,l)=>{let a={relativePath:l===void 0?r.path||"":l,caseSensitive:r.caseSensitive===!0,childrenIndex:o,route:r};a.relativePath.startsWith("/")&&(qe(a.relativePath.startsWith(s),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(s.length));let u=bn([s,a.relativePath]),d=i.concat(a);r.children&&r.children.length>0&&(qe(r.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),tR(r.children,t,d,u)),!(r.path==null&&!r.index)&&t.push({path:u,score:YA(u,r.index),routesMeta:d})};return e.forEach((r,o)=>{var l;if(r.path===""||!((l=r.path)!=null&&l.includes("?")))n(r,o);else for(let a of iR(r.path))n(r,o,a)}),t}function iR(e){let t=e.split("/");if(t.length===0)return[];let[i,...s]=t,n=i.endsWith("?"),r=i.replace(/\?$/,"");if(s.length===0)return n?[r,""]:[r];let o=iR(s.join("/")),l=[];return l.push(...o.map(a=>a===""?r:[r,a].join("/"))),n&&l.push(...o),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function BA(e){e.sort((t,i)=>t.score!==i.score?i.score-t.score:QA(t.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}const WA=/^:[\w-]+$/,UA=3,zA=2,$A=1,jA=10,KA=-2,Cy=e=>e==="*";function YA(e,t){let i=e.split("/"),s=i.length;return i.some(Cy)&&(s+=KA),t&&(s+=zA),i.filter(n=>!Cy(n)).reduce((n,r)=>n+(WA.test(r)?UA:r===""?$A:jA),s)}function QA(e,t){return e.length===t.length&&e.slice(0,-1).every((s,n)=>s===t[n])?e[e.length-1]-t[t.length-1]:0}function qA(e,t,i){let{routesMeta:s}=e,n={},r="/",o=[];for(let l=0;l<s.length;++l){let a=s[l],u=l===s.length-1,d=r==="/"?t:t.slice(r.length)||"/",c=jg({path:a.relativePath,caseSensitive:a.caseSensitive,end:u},d),p=a.route;if(!c)return null;Object.assign(n,c.params),o.push({params:n,pathname:bn([r,c.pathname]),pathnameBase:sx(bn([r,c.pathnameBase])),route:p}),c.pathnameBase!=="/"&&(r=bn([r,c.pathnameBase]))}return o}function jg(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,s]=XA(e.path,e.caseSensitive,e.end),n=t.match(i);if(!n)return null;let r=n[0],o=r.replace(/(.)\/+$/,"$1"),l=n.slice(1);return{params:s.reduce((u,d,c)=>{let{paramName:p,isOptional:C}=d;if(p==="*"){let S=l[c]||"";o=r.slice(0,r.length-S.length).replace(/(.)\/+$/,"$1")}const v=l[c];return C&&!v?u[p]=void 0:u[p]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:r,pathnameBase:o,pattern:e}}function XA(e,t,i){t===void 0&&(t=!1),i===void 0&&(i=!0),Am(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let s=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,a)=>(s.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(s.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),s]}function ZA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Am(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Vo(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let i=t.endsWith("/")?t.length-1:t.length,s=e.charAt(i);return s&&s!=="/"?null:e.slice(i)||"/"}const JA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ex=e=>JA.test(e);function tx(e,t){t===void 0&&(t="/");let{pathname:i,search:s="",hash:n=""}=typeof e=="string"?ol(e):e,r;if(i)if(ex(i))r=i;else{if(i.includes("//")){let o=i;i=i.replace(/\/\/+/g,"/"),Am(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+i))}i.startsWith("/")?r=vy(i.substring(1),"/"):r=vy(i,t)}else r=t;return{pathname:r,search:nx(s),hash:rx(n)}}function vy(e,t){let i=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(n=>{n===".."?i.length>1&&i.pop():n!=="."&&i.push(n)}),i.length>1?i.join("/"):"/"}function Sp(e,t,i,s){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+i+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function ix(e){return e.filter((t,i)=>i===0||t.route.path&&t.route.path.length>0)}function sR(e,t){let i=ix(e);return t?i.map((s,n)=>n===i.length-1?s.pathname:s.pathnameBase):i.map(s=>s.pathnameBase)}function nR(e,t,i,s){s===void 0&&(s=!1);let n;typeof e=="string"?n=ol(e):(n=ba({},e),qe(!n.pathname||!n.pathname.includes("?"),Sp("?","pathname","search",n)),qe(!n.pathname||!n.pathname.includes("#"),Sp("#","pathname","hash",n)),qe(!n.search||!n.search.includes("#"),Sp("#","search","hash",n)));let r=e===""||n.pathname==="",o=r?"/":n.pathname,l;if(o==null)l=i;else{let c=t.length-1;if(!s&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),c-=1;n.pathname=p.join("/")}l=c>=0?t[c]:"/"}let a=tx(n,l),u=o&&o!=="/"&&o.endsWith("/"),d=(r||o===".")&&i.endsWith("/");return!a.pathname.endsWith("/")&&(u||d)&&(a.pathname+="/"),a}const bn=e=>e.join("/").replace(/\/\/+/g,"/"),sx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),nx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function ox(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const rR=["post","put","patch","delete"];new Set(rR);const lx=["get",...rR];new Set(lx);/**
|
|
50
|
+
* React Router v6.30.3
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/function Fa(){return Fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Fa.apply(this,arguments)}const nh=y.createContext(null),oR=y.createContext(null),Hn=y.createContext(null),rh=y.createContext(null),Bn=y.createContext({outlet:null,matches:[],isDataRoute:!1}),lR=y.createContext(null);function ax(e,t){let{relative:i}=t===void 0?{}:t;gu()||qe(!1);let{basename:s,navigator:n}=y.useContext(Hn),{hash:r,pathname:o,search:l}=oh(e,{relative:i}),a=o;return s!=="/"&&(a=o==="/"?s:bn([s,o])),n.createHref({pathname:a,search:l,hash:r})}function gu(){return y.useContext(rh)!=null}function fu(){return gu()||qe(!1),y.useContext(rh).location}function aR(e){y.useContext(Hn).static||y.useLayoutEffect(e)}function ux(){let{isDataRoute:e}=y.useContext(Bn);return e?Rx():dx()}function dx(){gu()||qe(!1);let e=y.useContext(nh),{basename:t,future:i,navigator:s}=y.useContext(Hn),{matches:n}=y.useContext(Bn),{pathname:r}=fu(),o=JSON.stringify(sR(n,i.v7_relativeSplatPath)),l=y.useRef(!1);return aR(()=>{l.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){s.go(u);return}let c=nR(u,JSON.parse(o),r,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:bn([t,c.pathname])),(d.replace?s.replace:s.push)(c,d.state,d)},[t,s,o,r,e])}function cx(){let{matches:e}=y.useContext(Bn),t=e[e.length-1];return t?t.params:{}}function oh(e,t){let{relative:i}=t===void 0?{}:t,{future:s}=y.useContext(Hn),{matches:n}=y.useContext(Bn),{pathname:r}=fu(),o=JSON.stringify(sR(n,s.v7_relativeSplatPath));return y.useMemo(()=>nR(e,JSON.parse(o),r,i==="path"),[e,o,r,i])}function hx(e,t){return px(e,t)}function px(e,t,i,s){gu()||qe(!1);let{navigator:n}=y.useContext(Hn),{matches:r}=y.useContext(Bn),o=r[r.length-1],l=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let u=fu(),d;if(t){var c;let E=typeof t=="string"?ol(t):t;a==="/"||(c=E.pathname)!=null&&c.startsWith(a)||qe(!1),d=E}else d=u;let p=d.pathname||"/",C=p;if(a!=="/"){let E=a.replace(/^\//,"").split("/");C="/"+p.replace(/^\//,"").split("/").slice(E.length).join("/")}let v=VA(e,{pathname:C}),S=vx(v&&v.map(E=>Object.assign({},E,{params:Object.assign({},l,E.params),pathname:bn([a,n.encodeLocation?n.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?a:bn([a,n.encodeLocation?n.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),r,i,s);return t&&S?y.createElement(rh.Provider,{value:{location:Fa({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:mn.Pop}},S):S}function gx(){let e=Ex(),t=ox(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),i?y.createElement("pre",{style:n},i):null,null)}const fx=y.createElement(gx,null);class mx extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,i){return i.location!==t.location||i.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:i.error,location:i.location,revalidation:t.revalidation||i.revalidation}}componentDidCatch(t,i){console.error("React Router caught the following error during render",t,i)}render(){return this.state.error!==void 0?y.createElement(Bn.Provider,{value:this.props.routeContext},y.createElement(lR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Cx(e){let{routeContext:t,match:i,children:s}=e,n=y.useContext(nh);return n&&n.static&&n.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=i.route.id),y.createElement(Bn.Provider,{value:t},s)}function vx(e,t,i,s){var n;if(t===void 0&&(t=[]),i===void 0&&(i=null),s===void 0&&(s=null),e==null){var r;if(!i)return null;if(i.errors)e=i.matches;else if((r=s)!=null&&r.v7_partialHydration&&t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let o=e,l=(n=i)==null?void 0:n.errors;if(l!=null){let d=o.findIndex(c=>c.route.id&&(l==null?void 0:l[c.route.id])!==void 0);d>=0||qe(!1),o=o.slice(0,Math.min(o.length,d+1))}let a=!1,u=-1;if(i&&s&&s.v7_partialHydration)for(let d=0;d<o.length;d++){let c=o[d];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=d),c.route.id){let{loaderData:p,errors:C}=i,v=c.route.loader&&p[c.route.id]===void 0&&(!C||C[c.route.id]===void 0);if(c.route.lazy||v){a=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,c,p)=>{let C,v=!1,S=null,E=null;i&&(C=l&&c.route.id?l[c.route.id]:void 0,S=c.route.errorElement||fx,a&&(u<0&&p===0?(Tx("route-fallback"),v=!0,E=null):u===p&&(v=!0,E=c.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,p+1)),m=()=>{let R;return C?R=S:v?R=E:c.route.Component?R=y.createElement(c.route.Component,null):c.route.element?R=c.route.element:R=d,y.createElement(Cx,{match:c,routeContext:{outlet:d,matches:w,isDataRoute:i!=null},children:R})};return i&&(c.route.ErrorBoundary||c.route.errorElement||p===0)?y.createElement(mx,{location:i.location,revalidation:i.revalidation,component:S,error:C,children:m(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):m()},null)}var uR=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(uR||{}),dR=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(dR||{});function yx(e){let t=y.useContext(nh);return t||qe(!1),t}function wx(e){let t=y.useContext(oR);return t||qe(!1),t}function Sx(e){let t=y.useContext(Bn);return t||qe(!1),t}function cR(e){let t=Sx(),i=t.matches[t.matches.length-1];return i.route.id||qe(!1),i.route.id}function Ex(){var e;let t=y.useContext(lR),i=wx(),s=cR();return t!==void 0?t:(e=i.errors)==null?void 0:e[s]}function Rx(){let{router:e}=yx(uR.UseNavigateStable),t=cR(dR.UseNavigateStable),i=y.useRef(!1);return aR(()=>{i.current=!0}),y.useCallback(function(n,r){r===void 0&&(r={}),i.current&&(typeof n=="number"?e.navigate(n):e.navigate(n,Fa({fromRouteId:t},r)))},[e,t])}const yy={};function Tx(e,t,i){yy[e]||(yy[e]=!0)}function Dx(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function vd(e){qe(!1)}function Px(e){let{basename:t="/",children:i=null,location:s,navigationType:n=mn.Pop,navigator:r,static:o=!1,future:l}=e;gu()&&qe(!1);let a=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:a,navigator:r,static:o,future:Fa({v7_relativeSplatPath:!1},l)}),[a,l,r,o]);typeof s=="string"&&(s=ol(s));let{pathname:d="/",search:c="",hash:p="",state:C=null,key:v="default"}=s,S=y.useMemo(()=>{let E=Vo(d,a);return E==null?null:{location:{pathname:E,search:c,hash:p,state:C,key:v},navigationType:n}},[a,d,c,p,C,v,n]);return S==null?null:y.createElement(Hn.Provider,{value:u},y.createElement(rh.Provider,{children:i,value:S}))}function bx(e){let{children:t,location:i}=e;return hx(Kg(t),i)}new Promise(()=>{});function Kg(e,t){t===void 0&&(t=[]);let i=[];return y.Children.forEach(e,(s,n)=>{if(!y.isValidElement(s))return;let r=[...t,n];if(s.type===y.Fragment){i.push.apply(i,Kg(s.props.children,r));return}s.type!==vd&&qe(!1),!s.props.index||!s.props.children||qe(!1);let o={id:s.props.id||r.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(o.children=Kg(s.props.children,r)),i.push(o)}),i}/**
|
|
59
|
+
* React Router DOM v6.30.3
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Remix Software Inc.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
+
*
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/function ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},ac.apply(this,arguments)}function hR(e,t){if(e==null)return{};var i={},s=Object.keys(e),n,r;for(r=0;r<s.length;r++)n=s[r],!(t.indexOf(n)>=0)&&(i[n]=e[n]);return i}function Fx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ax(e,t){return e.button===0&&(!t||t==="_self")&&!Fx(e)}const xx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Lx=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Mx="6";try{window.__reactRouterVersion=Mx}catch{}const Ix=y.createContext({isTransitioning:!1}),Nx="startTransition",wy=Db[Nx];function _x(e){let{basename:t,children:i,future:s,window:n}=e,r=y.useRef();r.current==null&&(r.current=OA({window:n,v5Compat:!0}));let o=r.current,[l,a]=y.useState({action:o.action,location:o.location}),{v7_startTransition:u}=s||{},d=y.useCallback(c=>{u&&wy?wy(()=>a(c)):a(c)},[a,u]);return y.useLayoutEffect(()=>o.listen(d),[o,d]),y.useEffect(()=>Dx(s),[s]),y.createElement(Px,{basename:t,children:i,location:l.location,navigationType:l.action,navigator:o,future:s})}const Ox=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,kx=y.forwardRef(function(t,i){let{onClick:s,relative:n,reloadDocument:r,replace:o,state:l,target:a,to:u,preventScrollReset:d,viewTransition:c}=t,p=hR(t,xx),{basename:C}=y.useContext(Hn),v,S=!1;if(typeof u=="string"&&Gx.test(u)&&(v=u,Ox))try{let R=new URL(window.location.href),T=u.startsWith("//")?new URL(R.protocol+u):new URL(u),P=Vo(T.pathname,C);T.origin===R.origin&&P!=null?u=P+T.search+T.hash:S=!0}catch{}let E=ax(u,{relative:n}),w=Hx(u,{replace:o,state:l,target:a,preventScrollReset:d,relative:n,viewTransition:c});function m(R){s&&s(R),R.defaultPrevented||w(R)}return y.createElement("a",ac({},p,{href:v||E,onClick:S||r?s:m,ref:i,target:a}))}),Ep=y.forwardRef(function(t,i){let{"aria-current":s="page",caseSensitive:n=!1,className:r="",end:o=!1,style:l,to:a,viewTransition:u,children:d}=t,c=hR(t,Lx),p=oh(a,{relative:c.relative}),C=fu(),v=y.useContext(oR),{navigator:S,basename:E}=y.useContext(Hn),w=v!=null&&Bx(p)&&u===!0,m=S.encodeLocation?S.encodeLocation(p).pathname:p.pathname,R=C.pathname,T=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(R=R.toLowerCase(),T=T?T.toLowerCase():null,m=m.toLowerCase()),T&&E&&(T=Vo(T,E)||T);const P=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let F=R===m||!o&&R.startsWith(m)&&R.charAt(P)==="/",b=T!=null&&(T===m||!o&&T.startsWith(m)&&T.charAt(m.length)==="/"),M={isActive:F,isPending:b,isTransitioning:w},N=F?s:void 0,k;typeof r=="function"?k=r(M):k=[r,F?"active":null,b?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let $=typeof l=="function"?l(M):l;return y.createElement(kx,ac({},c,{"aria-current":N,className:k,ref:i,style:$,to:a,viewTransition:u}),typeof d=="function"?d(M):d)});var Yg;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Yg||(Yg={}));var Sy;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Sy||(Sy={}));function Vx(e){let t=y.useContext(nh);return t||qe(!1),t}function Hx(e,t){let{target:i,replace:s,state:n,preventScrollReset:r,relative:o,viewTransition:l}=t===void 0?{}:t,a=ux(),u=fu(),d=oh(e,{relative:o});return y.useCallback(c=>{if(Ax(c,i)){c.preventDefault();let p=s!==void 0?s:lc(u)===lc(d);a(e,{replace:p,state:n,preventScrollReset:r,relative:o,viewTransition:l})}},[u,a,d,s,n,i,e,r,o,l])}function Bx(e,t){t===void 0&&(t={});let i=y.useContext(Ix);i==null&&qe(!1);let{basename:s}=Vx(Yg.useViewTransitionState),n=oh(e,{relative:t.relative});if(!i.isTransitioning)return!1;let r=Vo(i.currentLocation.pathname,s)||i.currentLocation.pathname,o=Vo(i.nextLocation.pathname,s)||i.nextLocation.pathname;return jg(n.pathname,o)!=null||jg(n.pathname,r)!=null}function pR(){const[e,t]=y.useState([]),[i,s]=y.useState(!0),[n,r]=y.useState(null);return y.useEffect(()=>{fetch("/api/metadata").then(async o=>{if(!o.ok)throw new Error("Failed to fetch metadata");const l=await o.json(),a=Array.isArray(l)?l:l.objects||[];t(a)}).catch(o=>{console.error(o),r(o)}).finally(()=>s(!1))},[]),{objects:e,loading:i,error:n}}/**
|
|
68
|
+
* @license lucide-react v0.300.0 - ISC
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the ISC license.
|
|
71
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/var Wx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
73
|
+
* @license lucide-react v0.300.0 - ISC
|
|
74
|
+
*
|
|
75
|
+
* This source code is licensed under the ISC license.
|
|
76
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
+
*/const Ux=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Ys=(e,t)=>{const i=y.forwardRef(({color:s="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:l="",children:a,...u},d)=>y.createElement("svg",{ref:d,...Wx,width:n,height:n,stroke:s,strokeWidth:o?Number(r)*24/Number(n):r,className:["lucide",`lucide-${Ux(e)}`,l].join(" "),...u},[...t.map(([c,p])=>y.createElement(c,p)),...Array.isArray(a)?a:[a]]));return i.displayName=`${e}`,i};/**
|
|
78
|
+
* @license lucide-react v0.300.0 - ISC
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the ISC license.
|
|
81
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
+
*/const zx=Ys("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
|
|
83
|
+
* @license lucide-react v0.300.0 - ISC
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the ISC license.
|
|
86
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
+
*/const $x=Ys("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
88
|
+
* @license lucide-react v0.300.0 - ISC
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the ISC license.
|
|
91
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
+
*/const xm=Ys("FileCode",[["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",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m10 13-2 2 2 2",key:"17smn8"}],["path",{d:"m14 17 2-2-2-2",key:"14mezr"}]]);/**
|
|
93
|
+
* @license lucide-react v0.300.0 - ISC
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the ISC license.
|
|
96
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/const jx=Ys("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]);/**
|
|
98
|
+
* @license lucide-react v0.300.0 - ISC
|
|
99
|
+
*
|
|
100
|
+
* This source code is licensed under the ISC license.
|
|
101
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
+
*/const Kx=Ys("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
103
|
+
* @license lucide-react v0.300.0 - ISC
|
|
104
|
+
*
|
|
105
|
+
* This source code is licensed under the ISC license.
|
|
106
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
+
*/const Yx=Ys("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
108
|
+
* @license lucide-react v0.300.0 - ISC
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the ISC license.
|
|
111
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/const gR=Ys("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
113
|
+
* @license lucide-react v0.300.0 - ISC
|
|
114
|
+
*
|
|
115
|
+
* This source code is licensed under the ISC license.
|
|
116
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
+
*/const Qx=Ys("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/**
|
|
118
|
+
* @license lucide-react v0.300.0 - ISC
|
|
119
|
+
*
|
|
120
|
+
* This source code is licensed under the ISC license.
|
|
121
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
+
*/const fR=Ys("Table2",[["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",key:"gugj83"}]]);function mR(e){var t,i,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(i=mR(e[t]))&&(s&&(s+=" "),s+=i)}else for(i in e)e[i]&&(s&&(s+=" "),s+=i);return s}function CR(){for(var e,t,i=0,s="",n=arguments.length;i<n;i++)(e=arguments[i])&&(t=mR(e))&&(s&&(s+=" "),s+=t);return s}const Lm="-",qx=e=>{const t=Zx(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:o=>{const l=o.split(Lm);return l[0]===""&&l.length!==1&&l.shift(),vR(l,t)||Xx(o)},getConflictingClassGroupIds:(o,l)=>{const a=i[o]||[];return l&&s[o]?[...a,...s[o]]:a}}},vR=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const i=e[0],s=t.nextPart.get(i),n=s?vR(e.slice(1),s):void 0;if(n)return n;if(t.validators.length===0)return;const r=e.join(Lm);return(o=t.validators.find(({validator:l})=>l(r)))==null?void 0:o.classGroupId},Ey=/^\[(.+)\]$/,Xx=e=>{if(Ey.test(e)){const t=Ey.exec(e)[1],i=t==null?void 0:t.substring(0,t.indexOf(":"));if(i)return"arbitrary.."+i}},Zx=e=>{const{theme:t,prefix:i}=e,s={nextPart:new Map,validators:[]};return eL(Object.entries(e.classGroups),i).forEach(([r,o])=>{Qg(o,s,r,t)}),s},Qg=(e,t,i,s)=>{e.forEach(n=>{if(typeof n=="string"){const r=n===""?t:Ry(t,n);r.classGroupId=i;return}if(typeof n=="function"){if(Jx(n)){Qg(n(s),t,i,s);return}t.validators.push({validator:n,classGroupId:i});return}Object.entries(n).forEach(([r,o])=>{Qg(o,Ry(t,r),i,s)})})},Ry=(e,t)=>{let i=e;return t.split(Lm).forEach(s=>{i.nextPart.has(s)||i.nextPart.set(s,{nextPart:new Map,validators:[]}),i=i.nextPart.get(s)}),i},Jx=e=>e.isThemeGetter,eL=(e,t)=>t?e.map(([i,s])=>{const n=s.map(r=>typeof r=="string"?t+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([o,l])=>[t+o,l])):r);return[i,n]}):e,tL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,i=new Map,s=new Map;const n=(r,o)=>{i.set(r,o),t++,t>e&&(t=0,s=i,i=new Map)};return{get(r){let o=i.get(r);if(o!==void 0)return o;if((o=s.get(r))!==void 0)return n(r,o),o},set(r,o){i.has(r)?i.set(r,o):n(r,o)}}},yR="!",iL=e=>{const{separator:t,experimentalParseClassName:i}=e,s=t.length===1,n=t[0],r=t.length,o=l=>{const a=[];let u=0,d=0,c;for(let E=0;E<l.length;E++){let w=l[E];if(u===0){if(w===n&&(s||l.slice(E,E+r)===t)){a.push(l.slice(d,E)),d=E+r;continue}if(w==="/"){c=E;continue}}w==="["?u++:w==="]"&&u--}const p=a.length===0?l:l.substring(d),C=p.startsWith(yR),v=C?p.substring(1):p,S=c&&c>d?c-d:void 0;return{modifiers:a,hasImportantModifier:C,baseClassName:v,maybePostfixModifierPosition:S}};return i?l=>i({className:l,parseClassName:o}):o},sL=e=>{if(e.length<=1)return e;const t=[];let i=[];return e.forEach(s=>{s[0]==="["?(t.push(...i.sort(),s),i=[]):i.push(s)}),t.push(...i.sort()),t},nL=e=>({cache:tL(e.cacheSize),parseClassName:iL(e),...qx(e)}),rL=/\s+/,oL=(e,t)=>{const{parseClassName:i,getClassGroupId:s,getConflictingClassGroupIds:n}=t,r=[],o=e.trim().split(rL);let l="";for(let a=o.length-1;a>=0;a-=1){const u=o[a],{modifiers:d,hasImportantModifier:c,baseClassName:p,maybePostfixModifierPosition:C}=i(u);let v=!!C,S=s(v?p.substring(0,C):p);if(!S){if(!v){l=u+(l.length>0?" "+l:l);continue}if(S=s(p),!S){l=u+(l.length>0?" "+l:l);continue}v=!1}const E=sL(d).join(":"),w=c?E+yR:E,m=w+S;if(r.includes(m))continue;r.push(m);const R=n(S,v);for(let T=0;T<R.length;++T){const P=R[T];r.push(w+P)}l=u+(l.length>0?" "+l:l)}return l};function lL(){let e=0,t,i,s="";for(;e<arguments.length;)(t=arguments[e++])&&(i=wR(t))&&(s&&(s+=" "),s+=i);return s}const wR=e=>{if(typeof e=="string")return e;let t,i="";for(let s=0;s<e.length;s++)e[s]&&(t=wR(e[s]))&&(i&&(i+=" "),i+=t);return i};function aL(e,...t){let i,s,n,r=o;function o(a){const u=t.reduce((d,c)=>c(d),e());return i=nL(u),s=i.cache.get,n=i.cache.set,r=l,l(a)}function l(a){const u=s(a);if(u)return u;const d=oL(a,i);return n(a,d),d}return function(){return r(lL.apply(null,arguments))}}const _e=e=>{const t=i=>i[e]||[];return t.isThemeGetter=!0,t},SR=/^\[(?:([a-z-]+):)?(.+)\]$/i,uL=/^\d+\/\d+$/,dL=new Set(["px","full","screen"]),cL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hL=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,pL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,gL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xs=e=>Fo(e)||dL.has(e)||uL.test(e),nn=e=>ll(e,"length",RL),Fo=e=>!!e&&!Number.isNaN(Number(e)),Rp=e=>ll(e,"number",Fo),_l=e=>!!e&&Number.isInteger(Number(e)),mL=e=>e.endsWith("%")&&Fo(e.slice(0,-1)),oe=e=>SR.test(e),rn=e=>cL.test(e),CL=new Set(["length","size","percentage"]),vL=e=>ll(e,CL,ER),yL=e=>ll(e,"position",ER),wL=new Set(["image","url"]),SL=e=>ll(e,wL,DL),EL=e=>ll(e,"",TL),Ol=()=>!0,ll=(e,t,i)=>{const s=SR.exec(e);return s?s[1]?typeof t=="string"?s[1]===t:t.has(s[1]):i(s[2]):!1},RL=e=>hL.test(e)&&!pL.test(e),ER=()=>!1,TL=e=>gL.test(e),DL=e=>fL.test(e),PL=()=>{const e=_e("colors"),t=_e("spacing"),i=_e("blur"),s=_e("brightness"),n=_e("borderColor"),r=_e("borderRadius"),o=_e("borderSpacing"),l=_e("borderWidth"),a=_e("contrast"),u=_e("grayscale"),d=_e("hueRotate"),c=_e("invert"),p=_e("gap"),C=_e("gradientColorStops"),v=_e("gradientColorStopPositions"),S=_e("inset"),E=_e("margin"),w=_e("opacity"),m=_e("padding"),R=_e("saturate"),T=_e("scale"),P=_e("sepia"),F=_e("skew"),b=_e("space"),M=_e("translate"),N=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",oe,t],U=()=>[oe,t],Q=()=>["",xs,nn],he=()=>["auto",Fo,oe],we=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],fe=()=>["solid","dashed","dotted","double","none"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",oe],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[Fo,oe];return{cacheSize:500,separator:":",theme:{colors:[Ol],spacing:[xs,nn],blur:["none","",rn,oe],brightness:X(),borderColor:[e],borderRadius:["none","","full",rn,oe],borderSpacing:U(),borderWidth:Q(),contrast:X(),grayscale:H(),hueRotate:X(),invert:H(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[mL,nn],inset:$(),margin:$(),opacity:X(),padding:U(),saturate:X(),scale:X(),sepia:H(),skew:X(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",oe]}],container:["container"],columns:[{columns:[rn]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...we(),oe]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",_l,oe]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",oe]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",_l,oe]}],"grid-cols":[{"grid-cols":[Ol]}],"col-start-end":[{col:["auto",{span:["full",_l,oe]},oe]}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":[Ol]}],"row-start-end":[{row:["auto",{span:[_l,oe]},oe]}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",oe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",oe]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"space-x":[{"space-x":[b]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[b]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",oe,t]}],"min-w":[{"min-w":[oe,t,"min","max","fit"]}],"max-w":[{"max-w":[oe,t,"none","full","min","max","fit","prose",{screen:[rn]},rn]}],h:[{h:[oe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[oe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[oe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[oe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",rn,nn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Rp]}],"font-family":[{font:[Ol]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",oe]}],"line-clamp":[{"line-clamp":["none",Fo,Rp]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xs,oe]}],"list-image":[{"list-image":["none",oe]}],"list-style-type":[{list:["none","disc","decimal",oe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",xs,nn]}],"underline-offset":[{"underline-offset":["auto",xs,oe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...we(),yL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",vL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},SL]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[C]}],"gradient-via":[{via:[C]}],"gradient-to":[{to:[C]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-b":[{"rounded-b":[r]}],"rounded-l":[{"rounded-l":[r]}],"rounded-ss":[{"rounded-ss":[r]}],"rounded-se":[{"rounded-se":[r]}],"rounded-ee":[{"rounded-ee":[r]}],"rounded-es":[{"rounded-es":[r]}],"rounded-tl":[{"rounded-tl":[r]}],"rounded-tr":[{"rounded-tr":[r]}],"rounded-br":[{"rounded-br":[r]}],"rounded-bl":[{"rounded-bl":[r]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...fe(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:fe()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...fe()]}],"outline-offset":[{"outline-offset":[xs,oe]}],"outline-w":[{outline:[xs,nn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[xs,nn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",rn,EL]}],"shadow-color":[{shadow:[Ol]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...ge(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ge()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[s]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",rn,oe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[R]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[R]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",oe]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",oe]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",oe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[_l,oe]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[F]}],"skew-y":[{"skew-y":[F]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",oe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",oe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[xs,nn,Rp]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},bL=aL(PL);function ui(...e){return bL(CR(e))}function FL(){const{objects:e,loading:t,error:i}=pR();return x.jsxs("div",{className:"w-64 border-r bg-card h-screen flex flex-col",children:[x.jsxs("div",{className:"p-6 border-b flex items-center space-x-2",children:[x.jsx($x,{className:"h-6 w-6 text-primary"}),x.jsx("span",{className:"font-bold text-lg",children:"ObjectQL Studio"})]}),x.jsx("div",{className:"flex-1 overflow-auto py-4",children:x.jsxs("nav",{className:"space-y-1 px-2",children:[x.jsxs(Ep,{to:"/",className:({isActive:s})=>ui("flex items-center space-x-2 px-4 py-2 rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground",s&&"bg-accent/50 text-accent-foreground"),end:!0,children:[x.jsx(jx,{className:"h-4 w-4"}),x.jsx("span",{children:"Dashboard"})]}),x.jsx("div",{className:"pt-4 px-4 pb-2",children:x.jsx("h4",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Development"})}),x.jsxs(Ep,{to:"/schema",className:({isActive:s})=>ui("flex items-center space-x-2 px-4 py-2 rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground",s&&"bg-accent/50 text-accent-foreground"),children:[x.jsx(xm,{className:"h-4 w-4"}),x.jsx("span",{children:"Schema Editor"})]}),x.jsxs("a",{href:"/swagger",target:"_blank",rel:"noreferrer",className:"flex items-center space-x-2 px-4 py-2 rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground",children:[x.jsx(zx,{className:"h-4 w-4"}),x.jsx("span",{children:"API Docs"})]}),x.jsx("div",{className:"pt-4 px-4 pb-2",children:x.jsx("h4",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Collections"})}),t&&x.jsxs("div",{className:"px-4 py-2 text-sm text-muted-foreground flex items-center",children:[x.jsx(Kx,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading..."]}),i&&x.jsx("div",{className:"px-4 py-2 text-sm text-red-500",children:"Failed to load"}),!t&&e.map(s=>x.jsxs(Ep,{to:`/object/${s.name}`,className:({isActive:n})=>ui("flex items-center space-x-2 px-4 py-2 rounded-md text-sm transition-colors hover:bg-accent hover:text-accent-foreground",n?"bg-accent text-accent-foreground":"text-muted-foreground"),children:[x.jsx(fR,{className:"h-4 w-4"}),x.jsx("span",{children:s.name})]},s.name))]})}),x.jsx("div",{className:"p-4 border-t text-xs text-center text-muted-foreground",children:"v1.3.1"})]})}const Ho=y.forwardRef(({className:e,...t},i)=>x.jsx("div",{ref:i,className:ui("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Ho.displayName="Card";const Aa=y.forwardRef(({className:e,...t},i)=>x.jsx("div",{ref:i,className:ui("flex flex-col space-y-1.5 p-6",e),...t}));Aa.displayName="CardHeader";const xa=y.forwardRef(({className:e,...t},i)=>x.jsx("h3",{ref:i,className:ui("font-semibold leading-none tracking-tight",e),...t}));xa.displayName="CardTitle";const uc=y.forwardRef(({className:e,...t},i)=>x.jsx("p",{ref:i,className:ui("text-sm text-muted-foreground",e),...t}));uc.displayName="CardDescription";const La=y.forwardRef(({className:e,...t},i)=>x.jsx("div",{ref:i,className:ui("p-6 pt-0",e),...t}));La.displayName="CardContent";const AL=y.forwardRef(({className:e,...t},i)=>x.jsx("div",{ref:i,className:ui("flex items-center p-6 pt-0",e),...t}));AL.displayName="CardFooter";function xL(){const{objects:e}=pR();return x.jsxs("div",{className:"p-8",children:[x.jsx("h1",{className:"text-3xl font-bold mb-6",children:"Dashboard"}),x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[x.jsxs(Ho,{children:[x.jsxs(Aa,{children:[x.jsx(xa,{children:"Total Collections"}),x.jsx(uc,{children:"Registered objects in schema"})]}),x.jsx(La,{children:x.jsx("div",{className:"text-2xl font-bold",children:e.length})})]}),e.map(t=>x.jsxs(Ho,{className:"hover:bg-accent/10 transition-colors",children:[x.jsxs(Aa,{children:[x.jsx(xa,{children:t.name}),x.jsx(uc,{className:"truncate",children:t.description||"No description"})]}),x.jsx(La,{className:"flex justify-between items-center text-sm",children:x.jsxs("span",{className:"text-muted-foreground",children:[Object.keys(t.fields).length," fields"]})})]},t.name))]})]})}var Mm=Object.defineProperty,LL=Object.defineProperties,ML=Object.getOwnPropertyDescriptor,IL=Object.getOwnPropertyDescriptors,dc=Object.getOwnPropertySymbols,RR=Object.prototype.hasOwnProperty,TR=Object.prototype.propertyIsEnumerable,Ty=(e,t,i)=>t in e?Mm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,K=(e,t)=>{for(var i in t||(t={}))RR.call(t,i)&&Ty(e,i,t[i]);if(dc)for(var i of dc(t))TR.call(t,i)&&Ty(e,i,t[i]);return e},Ie=(e,t)=>LL(e,IL(t)),NL=(e,t)=>{var i={};for(var s in e)RR.call(e,s)&&t.indexOf(s)<0&&(i[s]=e[s]);if(e!=null&&dc)for(var s of dc(e))t.indexOf(s)<0&&TR.call(e,s)&&(i[s]=e[s]);return i},wt=(e,t)=>{for(var i in t)Mm(e,i,{get:t[i],enumerable:!0})},h=(e,t,i,s)=>{for(var n=s>1?void 0:s?ML(t,i):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(n=(s?o(t,i,n):o(n))||n);return s&&n&&Mm(t,i,n),n},es=(e,t)=>(i,s)=>t(i,s,e),DR={};wt(DR,{attrToBoolean:()=>cc,attrToNumber:()=>Fn,attrToString:()=>_L,defaultComparator:()=>OL,exists:()=>A,jsonEquals:()=>qg,makeNull:()=>Es,missing:()=>J,missingOrEmpty:()=>Ii,toStringOrNull:()=>Ma,values:()=>mr});function Es(e){return e==null||e===""?null:e}function A(e,t=!1){return e!=null&&(e!==""||t)}function J(e){return!A(e)}function Ii(e){return e==null||e.length===0}function Ma(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Fn(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 cc(e){if(e!==void 0)return e===null||e===""?!1:typeof e=="boolean"?e:/true/i.test(e)}function _L(e){if(!(e==null||e===""))return e}function qg(e,t){const i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function OL(e,t,i=!1){const s=e==null,n=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&n)return 0;if(s)return-1;if(n)return 1;function r(o,l){return o>l?1:o<l?-1:0}if(typeof e!="string"||!i)return r(e,t);try{return e.localeCompare(t)}catch{return r(e,t)}}function mr(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach(i=>t.push(i)),t}return Object.values(e)}var GL=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Ma(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++}}},PR={};wt(PR,{SKIP_JS_BUILTINS:()=>lh,cloneObject:()=>Im,deepCloneDefinition:()=>hc,getAllValuesInObject:()=>Ln,getValueUsingField:()=>Ao,isNonNullObject:()=>pc,iterateObject:()=>Lt,mergeDeep:()=>ii,removeAllReferences:()=>bR});var lh=new Set(["__proto__","constructor","prototype"]);function Lt(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))t(i,s)}}function Im(e){const t={},i=Object.keys(e);for(let s=0;s<i.length;s++){if(lh.has(i[s]))continue;const n=i[s],r=e[n];t[n]=r}return t}function hc(e,t){if(!e)return;const i=e,s={};return Object.keys(i).forEach(n=>{if(t&&t.indexOf(n)>=0||lh.has(n))return;const r=i[n];pc(r)&&r.constructor===Object?s[n]=hc(r):s[n]=r}),s}function Ln(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 ii(e,t,i=!0,s=!1){A(t)&&Lt(t,(n,r)=>{if(lh.has(n))return;let o=e[n];o!==r&&(s&&o==null&&r!=null&&typeof r=="object"&&r.constructor===Object&&(o={},e[n]=o),pc(r)&&pc(o)&&!Array.isArray(o)?ii(o,r,i,s):(i||r!==void 0)&&(e[n]=r))})}function Ao(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let n=e;for(let r=0;r<s.length;r++){if(n==null)return;n=n[s[r]]}return n}function bR(e,t=[],i){Object.keys(e).forEach(o=>{typeof e[o]=="object"&&!t.includes(o)&&(e[o]=void 0)});const s=Object.getPrototypeOf(e),n={},r=o=>`AG Grid: Grid API function ${o}() cannot be called as the grid has been destroyed.
|
|
123
|
+
It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
|
|
124
|
+
To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${i}`;Object.getOwnPropertyNames(s).forEach(o=>{if(typeof s[o]=="function"&&!t.includes(o)){const a=()=>{console.warn(r(o))};n[o]={value:a,writable:!0}}}),Object.defineProperties(e,n)}function pc(e){return typeof e=="object"&&e!==null}var FR={};wt(FR,{compose:()=>kL,debounce:()=>kt,doOnce:()=>Bo,errorOnce:()=>dr,executeAfter:()=>xR,executeInAWhile:()=>AR,executeNextVMTurn:()=>Xg,getFunctionName:()=>ah,isFunction:()=>uh,noop:()=>VL,throttle:()=>Zg,waitUntil:()=>Nm,warnOnce:()=>Y});var Dy={};function Bo(e,t){Dy[t]||(e(),Dy[t]=!0)}function Y(e){Bo(()=>console.warn("AG Grid: "+e),e)}function dr(e){Bo(()=>console.error("AG Grid: "+e),e)}function ah(e){if(e.name)return e.name;const t=/function\s+([^\(]+)/.exec(e.toString());return t&&t.length===2?t[1].trim():null}function uh(e){return!!(e&&e.constructor&&e.call&&e.apply)}function AR(e){xR(e,400)}var Tp=[],Dp=!1;function Xg(e){Tp.push(e),!Dp&&(Dp=!0,window.setTimeout(()=>{const t=Tp.slice();Tp.length=0,Dp=!1,t.forEach(i=>i())},0))}function xR(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(i=>i()),t)}function kt(e,t){let i;return function(...s){const n=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(n,s)},t)}}function Zg(e,t){let i=0;return function(...s){const n=this,r=new Date().getTime();r-i<t||(i=r,e.apply(n,s))}}function Nm(e,t,i=100,s){const n=new Date().getTime();let r=null,o=!1;const l=()=>{const a=new Date().getTime()-n>i;(e()||a)&&(t(),o=!0,r!=null&&(window.clearInterval(r),r=null),a&&s&&console.warn(s))};l(),o||(r=window.setInterval(l,10))}function kL(...e){return t=>e.reduce((i,s)=>s(i),t)}var VL=()=>{},LR=(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))(LR||{}),dh=class Te{static register(t){Te.__register(t,!0,void 0)}static registerModules(t){Te.__registerModules(t,!0,void 0)}static __register(t,i,s){Te.runVersionChecks(t),s!==void 0?(Te.areGridScopedModules=!0,Te.gridModulesMap[s]===void 0&&(Te.gridModulesMap[s]={}),Te.gridModulesMap[s][t.moduleName]=t):Te.globalModulesMap[t.moduleName]=t,Te.setModuleBased(i)}static __unRegisterGridModules(t){delete Te.gridModulesMap[t]}static __registerModules(t,i,s){Te.setModuleBased(i),t&&t.forEach(n=>Te.__register(n,i,s))}static isValidModuleVersion(t){const[i,s]=t.version.split(".")||[],[n,r]=Te.currentModuleVersion.split(".")||[];return i===n&&s===r}static runVersionChecks(t){if(Te.currentModuleVersion||(Te.currentModuleVersion=t.version),t.version?Te.isValidModuleVersion(t)||console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is version ${t.version} but the other modules are version ${this.currentModuleVersion}. Please update all modules to the same version.`):console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is incompatible. Please update all modules to the same version.`),t.validate){const i=t.validate();i.isValid||console.error(`AG Grid: ${i.message}`)}}static setModuleBased(t){Te.moduleBased===void 0?Te.moduleBased=t:Te.moduleBased!==t&&Bo(()=>{console.warn("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."),console.warn("Please see https://www.ag-grid.com/javascript-grid/modules/ for more information.")},"ModulePackageCheck")}static __setIsBundled(){Te.isBundled=!0}static __assertRegistered(t,i,s){var n;if(this.__isRegistered(t,s))return!0;const r=i+t;let o;if(Te.isBundled)o=`AG Grid: unable to use ${i} as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:
|
|
125
|
+
|
|
126
|
+
<script src="https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js"><\/script>
|
|
127
|
+
|
|
128
|
+
For more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`;else if(Te.moduleBased||Te.moduleBased===void 0){let l=(n=Object.entries(LR).find(([a,u])=>u===t))==null?void 0:n[0];o=`AG Grid: unable to use ${i} as the ${l} is not registered${Te.areGridScopedModules?` for gridId: ${s}`:""}. Check if you have registered the module:
|
|
129
|
+
|
|
130
|
+
import { ModuleRegistry } from '@ag-grid-community/core';
|
|
131
|
+
import { ${l} } from '${t}';
|
|
132
|
+
|
|
133
|
+
ModuleRegistry.registerModules([ ${l} ]);
|
|
134
|
+
|
|
135
|
+
For more info see: https://www.ag-grid.com/javascript-grid/modules/`}else o=`AG Grid: unable to use ${i} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:
|
|
136
|
+
|
|
137
|
+
import 'ag-grid-enterprise';`;return Bo(()=>{console.warn(o)},r),!1}static __isRegistered(t,i){var s;return!!Te.globalModulesMap[t]||!!((s=Te.gridModulesMap[i])!=null&&s[t])}static __getRegisteredModules(t){return[...mr(Te.globalModulesMap),...mr(Te.gridModulesMap[t]||{})]}static __getGridRegisteredModules(t){var i;return mr((i=Te.gridModulesMap[t])!=null?i:{})||[]}static __isPackageBased(){return!Te.moduleBased}};dh.globalModulesMap={};dh.gridModulesMap={};dh.areGridScopedModules=!1;var Ce=dh,HL=class{constructor(e,t){if(this.beanWrappers={},this.destroyed=!1,!e||!e.beanClasses)return;this.contextParams=e,this.logger=t,this.logger.log(">> creating ag-Application Context"),this.createBeans();const i=this.getBeanInstances();this.wireBeans(i),this.logger.log(">> ag-Application Context ready - component is alive")}getBeanInstances(){return mr(this.beanWrappers).map(e=>e.beanInstance)}createBean(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],t),e}wireBeans(e,t){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),A(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")}createBeans(){this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),Lt(this.beanWrappers,(t,i)=>{let s;i.bean.__agBeanMetaData&&i.bean.__agBeanMetaData.autowireMethods&&i.bean.__agBeanMetaData.autowireMethods.agConstructor&&(s=i.bean.__agBeanMetaData.autowireMethods.agConstructor);const n=this.getBeansForParameters(s,i.bean.name),r=new(i.bean.bind.apply(i.bean,[null,...n]));i.beanInstance=r});const e=Object.keys(this.beanWrappers).join(", ");this.logger.log(`created beans: ${e}`)}createBeanWrapper(e){const t=e.__agBeanMetaData;if(!t){let s;e.prototype.constructor?s=ah(e.prototype.constructor):s=""+e,console.error(`Context item ${s} is not a bean`);return}const i={bean:e,beanInstance:null,beanName:t.beanName};this.beanWrappers[t.beanName]=i}autoWireBeans(e){e.forEach(t=>{this.forEachMetaDataInHierarchy(t,(i,s)=>{const n=i.agClassAttributes;n&&n.forEach(r=>{const o=this.lookupBeanInstance(s,r.beanName,r.optional);t[r.attributeName]=o})})})}methodWireBeans(e){e.forEach(t=>{this.forEachMetaDataInHierarchy(t,(i,s)=>{Lt(i.autowireMethods,(n,r)=>{if(n==="agConstructor")return;const o=this.getBeansForParameters(r,s);t[n].apply(t,o)})})})}forEachMetaDataInHierarchy(e,t){let i=Object.getPrototypeOf(e);for(;i!=null;){const s=i.constructor;if(s.hasOwnProperty("__agBeanMetaData")){const n=s.__agBeanMetaData,r=this.getBeanName(s);t(n,r)}i=Object.getPrototypeOf(i)}}getBeanName(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;const t=e.toString();return t.substring(9,t.indexOf("("))}getBeansForParameters(e,t){const i=[];return e&&Lt(e,(s,n)=>{const r=this.lookupBeanInstance(t,n);i[Number(s)]=r}),i}lookupBeanInstance(e,t,i=!1){if(this.destroyed)return this.logger.log(`AG Grid: bean reference ${t} is used after the grid is destroyed!`),null;if(t==="context")return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(t))return this.contextParams.providedBeanInstances[t];const s=this.beanWrappers[t];return s?s.beanInstance:(i||console.error(`AG Grid: unable to find bean reference ${t} while initialising ${e}`),null)}callLifeCycleMethods(e,t){e.forEach(i=>this.callLifeCycleMethodsOnBean(i,t))}callLifeCycleMethodsOnBean(e,t,i){const s={};this.forEachMetaDataInHierarchy(e,r=>{const o=r[t];o&&o.forEach(l=>{l!=i&&(s[l]=!0)})}),Object.keys(s).forEach(r=>e[r]())}getBean(e){return this.lookupBeanInstance("getBean",e,!0)}destroy(){if(this.destroyed)return;this.destroyed=!0,this.logger.log(">> Shutting down ag-Application Context");const e=this.getBeanInstances();this.destroyBeans(e),this.contextParams.providedBeanInstances=null,Ce.__unRegisterGridModules(this.contextParams.gridId),this.logger.log(">> ag-Application Context shut down - component is dead")}destroyBean(e){e&&this.destroyBeans([e])}destroyBeans(e){return e?(e.forEach(t=>{this.callLifeCycleMethodsOnBean(t,"preDestroyMethods","destroy");const i=t;typeof i.destroy=="function"&&i.destroy()}),[]):[]}isDestroyed(){return this.destroyed}getGridId(){return this.contextParams.gridId}};function MR(e,t,i){const s=Fr(e.constructor);s.preConstructMethods||(s.preConstructMethods=[]),s.preConstructMethods.push(t)}function I(e,t,i){const s=Fr(e.constructor);s.postConstructMethods||(s.postConstructMethods=[]),s.postConstructMethods.push(t)}function $t(e,t,i){const s=Fr(e.constructor);s.preDestroyMethods||(s.preDestroyMethods=[]),s.preDestroyMethods.push(t)}function B(e){return t=>{const i=Fr(t);i.beanName=e}}function f(e){return(t,i,s)=>{IR(t,e,!1,t,i)}}function Se(e){return(t,i,s)=>{IR(t,e,!0,t,i)}}function IR(e,t,i,s,n,r){if(t===null){console.error("AG Grid: Autowired name should not be null");return}const o=Fr(e.constructor);o.agClassAttributes||(o.agClassAttributes=[]),o.agClassAttributes.push({attributeName:n,beanName:t,optional:i})}function _i(e){return(t,i,s)=>{const n=typeof t=="function"?t:t.constructor;let r;if(typeof s=="number"){let o;i?(r=Fr(n),o=i):(r=Fr(n),o="agConstructor"),r.autowireMethods||(r.autowireMethods={}),r.autowireMethods[o]||(r.autowireMethods[o]={}),r.autowireMethods[o][s]=e}}}function Fr(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}var ls=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={}}setBeans(e,t,i=null,s=null){if(this.frameworkOverrides=t,this.gos=e,i){const n=e.useAsyncEvents();this.addGlobalListener(i,n)}s&&this.addGlobalListener(s,!1)}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let n=s.get(e);return!n&&i&&(n=new Set,s.set(e,n)),n}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){let t=e;this.gos&&this.gos.addGridCommonParams(t),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){var i;const s=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const n=(a,u)=>a.forEach(d=>{if(!u.has(d))return;const c=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>d(e)):()=>d(e);t?this.dispatchAsync(c):c()}),r=(i=this.getListeners(s,t,!1))!=null?i:new Set,o=new Set(r);o.size>0&&n(o,r),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const u=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(s,e)):()=>a(s,e);t?this.dispatchAsync(u):u()})}dispatchAsync(e){this.asyncFunctionsQueue.push(e),this.scheduled||(this.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)}),this.scheduled=!0)}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};h([es(0,_i("gridOptionsService")),es(1,_i("frameworkOverrides")),es(2,_i("globalEventListener")),es(3,_i("globalSyncEventListener"))],ls.prototype,"setBeans",1);ls=h([B("eventService")],ls);var _m=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=i=>{this.frameworkOverrides.wrapOutgoing(()=>e(i))},this.wrappedListeners.set(e,t)),t}wrapGlobal(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=(i,s)=>{this.frameworkOverrides.wrapOutgoing(()=>e(i,s))},this.wrappedGlobalListeners.set(e,t)),t}unwrap(e){var t;return(t=this.wrappedListeners.get(e))!=null?t:e}unwrapGlobal(e){var t;return(t=this.wrappedGlobalListeners.get(e))!=null?t:e}},BL={resizable:!0,sortable:!0},WL=0;function NR(){return WL++}var st=class _R{constructor(t,i,s,n){this.instanceId=NR(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new ls,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=t,this.userProvidedColDef=i,this.colId=s,this.primary=n,this.setState(t)}getInstanceId(){return this.instanceId}setState(t){t.sort!==void 0?(t.sort==="asc"||t.sort==="desc")&&(this.sort=t.sort):(t.initialSort==="asc"||t.initialSort==="desc")&&(this.sort=t.initialSort);const i=t.sortIndex,s=t.initialSortIndex;i!==void 0?i!==null&&(this.sortIndex=i):s!==null&&(this.sortIndex=s);const n=t.hide,r=t.initialHide;n!==void 0?this.visible=!n:this.visible=!r,t.pinned!==void 0?this.setPinned(t.pinned):this.setPinned(t.initialPinned);const o=t.flex,l=t.initialFlex;o!==void 0?this.flex=o:l!==void 0&&(this.flex=l)}setColDef(t,i,s){this.colDef=t,this.userProvidedColDef=i,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged",s))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(t){this.parent=t}getParent(){return this.parent}setOriginalParent(t){this.originalParent=t}getOriginalParent(){return this.originalParent}initialise(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){const t=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=A(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!t,this.tooltipFieldContainsDots=A(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!t}initMinAndMaxWidths(){var t,i;const s=this.colDef;this.minWidth=(t=s.minWidth)!=null?t:this.environment.getMinColWidth(),this.maxWidth=(i=s.maxWidth)!=null?i:Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=A(this.colDef.tooltipField)||A(this.colDef.tooltipValueGetter)||A(this.colDef.tooltipComponent)}resetActualWidth(t){const i=this.calculateColInitialWidth(this.colDef);this.setActualWidth(i,t,!0)}calculateColInitialWidth(t){var i,s;const n=(i=t.minWidth)!=null?i:this.environment.getMinColWidth(),r=(s=t.maxWidth)!=null?s:Number.MAX_SAFE_INTEGER;let o;const l=Fn(t.width),a=Fn(t.initialWidth);return l!=null?o=l:a!=null?o=a:o=200,Math.max(Math.min(o,r),n)}isEmptyGroup(){return!1}isRowGroupDisplayed(t){if(J(this.colDef)||J(this.colDef.showRowGroup))return!1;const i=this.colDef.showRowGroup===!0,s=this.colDef.showRowGroup===t;return i||s}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}addEventListener(t,i){var s,n;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new _m(this.frameworkOverrides));const r=(n=(s=this.frameworkEventListenerService)==null?void 0:s.wrap(i))!=null?n:i;this.eventService.addEventListener(t,r)}removeEventListener(t,i){var s,n;const r=(n=(s=this.frameworkEventListenerService)==null?void 0:s.unwrap(i))!=null?n:i;this.eventService.removeEventListener(t,r)}createColumnFunctionCallbackParams(t){return this.gos.addGridCommonParams({node:t,data:t.data,column:this,colDef:this.colDef})}isSuppressNavigable(t){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){const i=this.createColumnFunctionCallbackParams(t),s=this.colDef.suppressNavigable;return s(i)}return!1}isCellEditable(t){return t.group&&!this.gos.get("enableGroupEdit")?!1:this.isColumnFunc(t,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(t){return this.isColumnFunc(t,this.colDef.rowDrag)}isDndSource(t){return this.isColumnFunc(t,this.colDef.dndSource)}isCellCheckboxSelection(t){return this.isColumnFunc(t,this.colDef.checkboxSelection)}isSuppressPaste(t){return this.isColumnFunc(t,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(t){var i;return(i=this.colDef[t])!=null?i:BL[t]}isColumnFunc(t,i){if(typeof i=="boolean")return i;if(typeof i=="function"){const s=this.createColumnFunctionCallbackParams(t);return i(s)}return!1}setMoving(t,i){this.moving=t,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",i))}createColumnEvent(t,i){return this.gos.addGridCommonParams({type:t,column:this,columns:[this],source:i})}isMoving(){return this.moving}getSort(){return this.sort}setSort(t,i){this.sort!==t&&(this.sort=t,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",i))),this.dispatchStateUpdatedEvent("sort")}setMenuVisible(t,i){this.menuVisible!==t&&(this.menuVisible=t,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",i)))}isMenuVisible(){return this.menuVisible}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return J(this.sort)}isSorting(){return A(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(t){this.sortIndex=t,this.dispatchStateUpdatedEvent("sortIndex")}setAggFunc(t){this.aggFunc=t,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(t,i){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",i)))}isFilterActive(){return this.filterActive}setFilterActive(t,i,s){this.filterActive!==t&&(this.filterActive=t,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",i)));const n=this.createColumnEvent("filterChanged",i);s&&ii(n,s),this.eventService.dispatchEvent(n)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(t){t===!0||t==="left"?this.pinned="left":t==="right"?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(t,i){this.firstRightPinned!==t&&(this.firstRightPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",i)))}setLastLeftPinned(t,i){this.lastLeftPinned!==t&&(this.lastLeftPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",i)))}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(t,i){const s=t===!0;this.visible!==s&&(this.visible=s,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",i))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){const t=this.getColDef();return!t.suppressSpanHeaderHeight&&!t.autoHeaderHeight}getColumnGroupPaddingInfo(){let t=this.getParent();if(!t||!t.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const i=t.getPaddingLevel()+1;let s=!0;for(;t;){if(!t.isPadding()){s=!1;break}t=t.getParent()}return{numberOfParents:i,isSpanningTotal:s}}getColDef(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getDefinition(){return this.colDef}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(t){const i=t!==this.autoHeaderHeight;return this.autoHeaderHeight=t,i}createBaseColDefParams(t){return this.gos.addGridCommonParams({node:t,data:t.data,colDef:this.colDef,column:this})}getColSpan(t){if(J(this.colDef.colSpan))return 1;const i=this.createBaseColDefParams(t),s=this.colDef.colSpan(i);return Math.max(s,1)}getRowSpan(t){if(J(this.colDef.rowSpan))return 1;const i=this.createBaseColDefParams(t),s=this.colDef.rowSpan(i);return Math.max(s,1)}setActualWidth(t,i,s=!1){this.minWidth!=null&&(t=Math.max(t,this.minWidth)),this.maxWidth!=null&&(t=Math.min(t,this.maxWidth)),this.actualWidth!==t&&(this.actualWidth=t,this.flex&&i!=="flex"&&i!=="gridInitializing"&&(this.flex=null),s||this.fireColumnWidthChangedEvent(i)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(t){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",t))}isGreaterThanMax(t){return this.maxWidth!=null?t>this.maxWidth:!1}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(t){this.flex!==t&&(this.flex=t),this.dispatchStateUpdatedEvent("flex")}setMinimum(t){A(this.minWidth)&&this.setActualWidth(this.minWidth,t)}setRowGroupActive(t,i){this.rowGroupActive!==t&&(this.rowGroupActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",i))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(t,i){this.pivotActive!==t&&(this.pivotActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",i))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(t,i){this.aggregationActive!==t&&(this.aggregationActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",i)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}getMenuTabs(t){Y("As of v31.1, 'getMenuTabs' is deprecated. Use 'getColDef().menuTabs ?? defaultValues' instead.");let i=this.getColDef().menuTabs;return i==null&&(i=t),i}dispatchStateUpdatedEvent(t){this.eventService.dispatchEvent({type:_R.EVENT_STATE_UPDATED,key:t})}};st.EVENT_MOVING_CHANGED="movingChanged";st.EVENT_LEFT_CHANGED="leftChanged";st.EVENT_WIDTH_CHANGED="widthChanged";st.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged";st.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged";st.EVENT_VISIBLE_CHANGED="visibleChanged";st.EVENT_FILTER_CHANGED="filterChanged";st.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged";st.EVENT_SORT_CHANGED="sortChanged";st.EVENT_COL_DEF_CHANGED="colDefChanged";st.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged";st.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged";st.EVENT_PIVOT_CHANGED="columnPivotChanged";st.EVENT_VALUE_CHANGED="columnValueChanged";st.EVENT_STATE_UPDATED="columnStateUpdated";h([f("gridOptionsService")],st.prototype,"gos",2);h([f("environment")],st.prototype,"environment",2);h([f("columnHoverService")],st.prototype,"columnHoverService",2);h([f("frameworkOverrides")],st.prototype,"frameworkOverrides",2);h([I],st.prototype,"initialise",1);var Pe=st,ch=class Wl{constructor(t,i,s,n){this.localEventService=new ls,this.expandable=!1,this.instanceId=NR(),this.expandableListenerRemoveCallback=null,this.colGroupDef=t,this.groupId=i,this.expanded=!!t&&!!t.openByDefault,this.padding=s,this.level=n}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)}reset(t,i){this.colGroupDef=t,this.level=i,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(t){this.originalParent=t}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(t=>t.isVisible()):!1}isPadding(){return this.padding}setExpanded(t){this.expanded=t===void 0?!1:t;const i={type:Wl.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(i)}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(t){this.children=t}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const t=[];return this.addLeafColumns(t),t}addLeafColumns(t){this.children&&this.children.forEach(i=>{i instanceof Pe?t.push(i):i instanceof Wl&&i.addLeafColumns(t)})}getColumnGroupShow(){const t=this.colGroupDef;if(t)return t.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const t=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(i=>i.addEventListener("visibleChanged",t)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(i=>i.removeEventListener("visibleChanged",t)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let t=!1,i=!1,s=!1;const n=this.findChildrenRemovingPadding();for(let o=0,l=n.length;o<l;o++){const a=n[o];if(!a.isVisible())continue;const u=a.getColumnGroupShow();u==="open"?(t=!0,s=!0):u==="closed"?(i=!0,s=!0):(t=!0,i=!0)}const r=t&&i&&s;if(this.expandable!==r){this.expandable=r;const o={type:Wl.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(o)}}findChildrenRemovingPadding(){const t=[],i=s=>{s.forEach(n=>{n instanceof Wl&&n.isPadding()?i(n.children):t.push(n)})};return i(this.children),t}onColumnVisibilityChanged(){this.setExpandable()}addEventListener(t,i){this.localEventService.addEventListener(t,i)}removeEventListener(t,i){this.localEventService.removeEventListener(t,i)}};ch.EVENT_EXPANDED_CHANGED="expandedChanged";ch.EVENT_EXPANDABLE_CHANGED="expandableChanged";h([$t],ch.prototype,"destroy",1);var Je=ch,UL={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},OR={};wt(OR,{addSafePassiveEventListener:()=>jR,createEventPath:()=>zR,getCtrlForEventTarget:()=>gc,getEventPath:()=>$R,isElementInEventPath:()=>fc,isEventSupported:()=>Gm,isStopPropagationForAgGrid:()=>rs,stopPropagationForAgGrid:()=>as});var GR={};wt(GR,{areEqual:()=>ys,existsAndNotEmpty:()=>kR,flatten:()=>WR,forEachReverse:()=>KL,includes:()=>Ri,insertArrayIntoArray:()=>Jg,insertIntoArray:()=>Ia,last:()=>pe,moveInArray:()=>ef,pushAll:()=>tf,removeAllFromArray:()=>BR,removeAllFromUnorderedArray:()=>HR,removeFromArray:()=>Jt,removeFromUnorderedArray:()=>Om,removeRepeatsFromArray:()=>$L,shallowCompare:()=>zL,sortNumerically:()=>VR,toStrings:()=>jL});function kR(e){return e!=null&&e.length>0}function pe(e){if(!(!e||!e.length))return e[e.length-1]}function ys(e,t,i){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((s,n)=>i?i(s,t[n]):t[n]===s)}function zL(e,t){return ys(e,t)}function VR(e){return e.sort((t,i)=>t-i)}function $L(e,t){if(e)for(let i=e.length-2;i>=0;i--){const s=e[i]===t,n=e[i+1]===t;s&&n&&e.splice(i+1,1)}}function Om(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function Jt(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function HR(e,t){for(let i=0;i<t.length;i++)Om(e,t[i])}function BR(e,t){for(let i=0;i<t.length;i++)Jt(e,t[i])}function Ia(e,t,i){e.splice(i,0,t)}function Jg(e,t,i){if(!(e==null||t==null))for(let s=t.length-1;s>=0;s--){const n=t[s];Ia(e,n,i)}}function ef(e,t,i){BR(e,t),t.slice().reverse().forEach(s=>Ia(e,s,i))}function Ri(e,t){return e.indexOf(t)>-1}function WR(e){return[].concat.apply([],e)}function tf(e,t){t==null||e==null||t.forEach(i=>e.push(i))}function jL(e){return e.map(Ma)}function KL(e,t){if(e!=null)for(let i=e.length-1;i>=0;i--)t(e[i],i)}var UR="__ag_Grid_Stop_Propagation",YL=["touchstart","touchend","touchmove","touchcancel","scroll"],Pp={};function as(e){e[UR]=!0}function rs(e){return e[UR]===!0}var Gm=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof Pp[i]=="boolean")return Pp[i];const s=document.createElement(e[i]||"div");return i="on"+i,Pp[i]=i in s}})();function gc(e,t,i){let s=t;for(;s;){const n=e.getDomData(s,i);if(n)return n;s=s.parentElement}return null}function fc(e,t){return!t||!e?!1:$R(t).indexOf(e)>=0}function zR(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function $R(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():zR(t)}function jR(e,t,i,s){const r=Ri(YL,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,s,r)}var Qs=class KR{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.lastChangeSetIdLookup={},this.propertyListenerId=0,this.isAlive=()=>!this.destroyed}getFrameworkOverrides(){return this.frameworkOverrides}getContext(){return this.context}destroy(){for(let t=0;t<this.destroyFunctions.length;t++)this.destroyFunctions[t]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:KR.EVENT_DESTROYED})}addEventListener(t,i){this.localEventService||(this.localEventService=new ls),this.localEventService.addEventListener(t,i)}removeEventListener(t,i){this.localEventService&&this.localEventService.removeEventListener(t,i)}dispatchEvent(t){this.localEventService&&this.localEventService.dispatchEvent(t)}addManagedListener(t,i,s){if(this.destroyed)return;t instanceof HTMLElement?jR(this.getFrameworkOverrides(),t,i,s):t.addEventListener(i,s);const n=()=>(t.removeEventListener(i,s),null);return this.destroyFunctions.push(n),()=>(n(),this.destroyFunctions=this.destroyFunctions.filter(r=>r!==n),null)}setupGridOptionListener(t,i){this.gos.addEventListener(t,i);const s=()=>(this.gos.removeEventListener(t,i),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(n=>n!==s),null)}addManagedPropertyListener(t,i){return this.destroyed?()=>null:this.setupGridOptionListener(t,i)}addManagedPropertyListeners(t,i){if(this.destroyed)return;const s=t.join("-")+this.propertyListenerId++,n=r=>{if(r.changeSet){if(r.changeSet&&r.changeSet.id===this.lastChangeSetIdLookup[s])return;this.lastChangeSetIdLookup[s]=r.changeSet.id}const o={type:"gridPropertyChanged",changeSet:r.changeSet,source:r.source};i(o)};t.forEach(r=>this.setupGridOptionListener(r,n))}addDestroyFunc(t){this.isAlive()?this.destroyFunctions.push(t):t()}createManagedBean(t,i){const s=this.createBean(t,i);return this.addDestroyFunc(this.destroyBean.bind(this,t,i)),s}createBean(t,i,s){return(i||this.getContext()).createBean(t,s)}destroyBean(t,i){return(i||this.getContext()).destroyBean(t)}destroyBeans(t,i){if(t)for(let s=0;s<t.length;s++)this.destroyBean(t[s],i);return[]}};Qs.EVENT_DESTROYED="destroyed";h([f("frameworkOverrides")],Qs.prototype,"frameworkOverrides",2);h([f("context")],Qs.prototype,"context",2);h([f("eventService")],Qs.prototype,"eventService",2);h([f("gridOptionsService")],Qs.prototype,"gos",2);h([f("localeService")],Qs.prototype,"localeService",2);h([f("environment")],Qs.prototype,"environment",2);h([$t],Qs.prototype,"destroy",1);var L=Qs,Na=class extends L{setBeans(e){this.logger=e.create("ColumnFactory")}createColumnTree(e,t,i,s){const n=new GL,{existingCols:r,existingGroups:o,existingColKeys:l}=this.extractExistingTreeData(i);n.addExistingKeys(l);const a=this.recursivelyCreateColumns(e,0,t,r,n,o,s),u=this.findMaxDept(a,0);this.logger.log("Number of levels for grouped columns is "+u);const d=this.balanceColumnTree(a,0,u,n);return Ns(null,d,(p,C)=>{p instanceof Je&&p.setupExpandable(),p.setOriginalParent(C)}),{columnTree:d,treeDept:u}}extractExistingTreeData(e){const t=[],i=[],s=[];return e&&Ns(null,e,n=>{if(n instanceof Je){const r=n;i.push(r)}else{const r=n;s.push(r.getId()),t.push(r)}}),{existingCols:t,existingGroups:i,existingColKeys:s}}createForAutoGroups(e,t){return e.map(i=>this.createAutoGroupTreeItem(t,i))}createAutoGroupTreeItem(e,t){const i=this.findDepth(e);let s=t;for(let n=i-1;n>=0;n--){const r=new Je(null,`FAKE_PATH_${t.getId()}}_${n}`,!0,n);this.createBean(r),r.setChildren([s]),s.setOriginalParent(r),s=r}return i===0&&t.setOriginalParent(null),s}findDepth(e){let t=0,i=e;for(;i&&i[0]&&i[0]instanceof Je;)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,s){const n=[];for(let r=0;r<e.length;r++){const o=e[r];if(o instanceof Je){const l=o,a=this.balanceColumnTree(l.getChildren(),t+1,i,s);l.setChildren(a),n.push(l)}else{let l,a;for(let u=i-1;u>=t;u--){const d=s.getUniqueKey(null,null),c=this.createMergedColGroupDef(null),p=new Je(c,d,!0,t);this.createBean(p),a&&a.setChildren([p]),a=p,l||(l=a)}if(l&&a)if(n.push(l),e.some(d=>d instanceof Je)){a.setChildren([o]);continue}else{a.setChildren(e);break}n.push(o)}}return n}findMaxDept(e,t){let i=t;for(let s=0;s<e.length;s++){const n=e[s];if(n instanceof Je){const r=n,o=this.findMaxDept(r.getChildren(),t+1);i<o&&(i=o)}}return i}recursivelyCreateColumns(e,t,i,s,n,r,o){if(!e)return[];const l=new Array(e.length);for(let a=0;a<l.length;a++){const u=e[a];this.isColumnGroup(u)?l[a]=this.createColumnGroup(i,u,t,s,n,r,o):l[a]=this.createColumn(i,u,s,n,o)}return l}createColumnGroup(e,t,i,s,n,r,o){const l=this.createMergedColGroupDef(t),a=n.getUniqueKey(l.groupId||null,null),u=new Je(l,a,!1,i);this.createBean(u);const d=this.findExistingGroup(t,r);d&&r.splice(d.idx,1);let c=d==null?void 0:d.group;c&&u.setExpanded(c.isExpanded());const p=this.recursivelyCreateColumns(l.children,i+1,e,s,n,r,o);return u.setChildren(p),u}createMergedColGroupDef(e){const t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,s,n){const r=this.findExistingColumn(t,i);r&&(i==null||i.splice(r.idx,1));let o=r==null?void 0:r.column;if(o){const l=this.addColumnDefaultAndTypes(t,o.getColId());o.setColDef(l,t,n),this.applyColumnState(o,l,n)}else{const l=s.getUniqueKey(t.colId,t.field),a=this.addColumnDefaultAndTypes(t,l);o=new Pe(a,t,l,e),this.context.createBean(o)}return this.dataTypeService.addColumnListeners(o),o}applyColumnState(e,t,i){const s=Fn(t.flex);if(s!==void 0&&e.setFlex(s),e.getFlex()<=0){const l=Fn(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 r=Fn(t.sortIndex);r!==void 0&&e.setSortIndex(r);const o=cc(t.hide);o!==void 0&&e.setVisible(!o,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 n=t[s];if(n.getColGroupDef()&&n.getId()===e.groupId)return{idx:s,group:n}}}addColumnDefaultAndTypes(e,t){const i={},s=this.gos.get("defaultColDef");ii(i,s,!1,!0);const n=this.dataTypeService.updateColDefAndGetColumnType(i,e,t);n&&this.assignColumnTypes(n,i),ii(i,e,!1,!0);const r=this.gos.get("autoGroupColumnDef"),o=this.gos.isColumnsSortingCoupledToGroup();return e.rowGroup&&r&&o&&ii(i,{sort:r.sort,initialSort:r.initialSort},!1,!0),this.dataTypeService.validateColDef(i),i}assignColumnTypes(e,t){if(!e.length)return;const i=Object.assign({},UL),s=this.gos.get("columnTypes")||{};Lt(s,(n,r)=>{n in i?console.warn(`AG Grid: the column type '${n}' is a default column type and cannot be overridden.`):(r.type&&Y("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[n]=r)}),e.forEach(n=>{const r=i[n.trim()];r?ii(t,r,!1,!0):console.warn("AG Grid: colDef.type '"+n+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return e.children!==void 0}};h([f("dataTypeService")],Na.prototype,"dataTypeService",2);h([es(0,_i("loggerFactory"))],Na.prototype,"setBeans",1);Na=h([B("columnFactory")],Na);function Ns(e,t,i){if(t)for(let s=0;s<t.length;s++){const n=t[s];n instanceof Je&&Ns(n,n.getChildren(),i),i(n,e)}}var hh=class hs{constructor(t,i,s,n){this.displayedChildren=[],this.localEventService=new ls,this.groupId=i,this.partId=s,this.providedColumnGroup=t,this.pinned=n}static createUniqueId(t,i){return t+"_"+i}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(t){this.parent=t}getUniqueId(){return hs.createUniqueId(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const t=this.getProvidedColumnGroup().getLeafColumns();return!t||t.length===0?!1:t.every(i=>i.isMoving())}checkLeft(){if(this.displayedChildren.forEach(t=>{t instanceof hs&&t.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const i=pe(this.displayedChildren).getLeft();this.setLeft(i)}else{const t=this.displayedChildren[0].getLeft();this.setLeft(t)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(t){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(hs.EVENT_LEFT_CHANGED)))}getPinned(){return this.pinned}createAgEvent(t){return{type:t}}addEventListener(t,i){this.localEventService.addEventListener(t,i)}removeEventListener(t,i){this.localEventService.removeEventListener(t,i)}getGroupId(){return this.groupId}getPartId(){return this.partId}isChildInThisGroupDeepSearch(t){let i=!1;return this.children.forEach(s=>{t===s&&(i=!0),s instanceof hs&&s.isChildInThisGroupDeepSearch(t)&&(i=!0)}),i}getActualWidth(){let t=0;return this.displayedChildren&&this.displayedChildren.forEach(i=>{t+=i.getActualWidth()}),t}isResizable(){if(!this.displayedChildren)return!1;let t=!1;return this.displayedChildren.forEach(i=>{i.isResizable()&&(t=!0)}),t}getMinWidth(){let t=0;return this.displayedChildren.forEach(i=>{t+=i.getMinWidth()||0}),t}addChild(t){this.children||(this.children=[]),this.children.push(t)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const t=[];return this.addLeafColumns(t),t}getDisplayedLeafColumns(){const t=[];return this.addDisplayedLeafColumns(t),t}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(t){this.providedColumnGroup.setExpanded(t)}addDisplayedLeafColumns(t){this.displayedChildren.forEach(i=>{i instanceof Pe?t.push(i):i instanceof hs&&i.addDisplayedLeafColumns(t)})}addLeafColumns(t){this.children.forEach(i=>{i instanceof Pe?t.push(i):i instanceof hs&&i.addLeafColumns(t)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const t=this.getParent();return!this.isPadding()||!t||!t.isPadding()?0:1+t.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let t=this;for(;t!=null&&t.isPadding();)t=t.getParent();if(!(t?t.providedColumnGroup.isExpandable():!1)){this.displayedChildren=this.children,this.localEventService.dispatchEvent(this.createAgEvent(hs.EVENT_DISPLAYED_CHILDREN_CHANGED));return}this.children.forEach(s=>{if(s instanceof hs&&(!s.displayedChildren||!s.displayedChildren.length))return;switch(s.getColumnGroupShow()){case"open":t.providedColumnGroup.isExpanded()&&this.displayedChildren.push(s);break;case"closed":t.providedColumnGroup.isExpanded()||this.displayedChildren.push(s);break;default:this.displayedChildren.push(s);break}}),this.localEventService.dispatchEvent(this.createAgEvent(hs.EVENT_DISPLAYED_CHILDREN_CHANGED))}};hh.EVENT_LEFT_CHANGED="leftChanged";hh.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged";h([f("gridOptionsService")],hh.prototype,"gos",2);var ht=hh,g=class{};g.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged";g.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded";g.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged";g.EVENT_PIVOT_MAX_COLUMNS_EXCEEDED="pivotMaxColumnsExceeded";g.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged";g.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll";g.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged";g.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged";g.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged";g.EVENT_COLUMN_MOVED="columnMoved";g.EVENT_COLUMN_VISIBLE="columnVisible";g.EVENT_COLUMN_PINNED="columnPinned";g.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened";g.EVENT_COLUMN_RESIZED="columnResized";g.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged";g.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED="suppressMovableColumns";g.EVENT_SUPPRESS_MENU_HIDE_CHANGED="suppressMenuHide";g.EVENT_SUPPRESS_FIELD_DOT_NOTATION="suppressFieldDotNotation";g.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged";g.EVENT_COLUMN_HEADER_MOUSE_OVER="columnHeaderMouseOver";g.EVENT_COLUMN_HEADER_MOUSE_LEAVE="columnHeaderMouseLeave";g.EVENT_COLUMN_HEADER_CLICKED="columnHeaderClicked";g.EVENT_COLUMN_HEADER_CONTEXT_MENU="columnHeaderContextMenu";g.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed";g.EVENT_ROW_GROUP_OPENED="rowGroupOpened";g.EVENT_ROW_DATA_UPDATED="rowDataUpdated";g.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged";g.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged";g.EVENT_CHART_CREATED="chartCreated";g.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged";g.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged";g.EVENT_CHART_DESTROYED="chartDestroyed";g.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged";g.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged";g.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart";g.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd";g.EVENT_MODEL_UPDATED="modelUpdated";g.EVENT_CUT_START="cutStart";g.EVENT_CUT_END="cutEnd";g.EVENT_PASTE_START="pasteStart";g.EVENT_PASTE_END="pasteEnd";g.EVENT_FILL_START="fillStart";g.EVENT_FILL_END="fillEnd";g.EVENT_RANGE_DELETE_START="rangeDeleteStart";g.EVENT_RANGE_DELETE_END="rangeDeleteEnd";g.EVENT_UNDO_STARTED="undoStarted";g.EVENT_UNDO_ENDED="undoEnded";g.EVENT_REDO_STARTED="redoStarted";g.EVENT_REDO_ENDED="redoEnded";g.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart";g.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd";g.EVENT_CELL_CLICKED="cellClicked";g.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked";g.EVENT_CELL_MOUSE_DOWN="cellMouseDown";g.EVENT_CELL_CONTEXT_MENU="cellContextMenu";g.EVENT_CELL_VALUE_CHANGED="cellValueChanged";g.EVENT_CELL_EDIT_REQUEST="cellEditRequest";g.EVENT_ROW_VALUE_CHANGED="rowValueChanged";g.EVENT_CELL_FOCUSED="cellFocused";g.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared";g.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused";g.EVENT_ROW_SELECTED="rowSelected";g.EVENT_SELECTION_CHANGED="selectionChanged";g.EVENT_TOOLTIP_SHOW="tooltipShow";g.EVENT_TOOLTIP_HIDE="tooltipHide";g.EVENT_CELL_KEY_DOWN="cellKeyDown";g.EVENT_CELL_MOUSE_OVER="cellMouseOver";g.EVENT_CELL_MOUSE_OUT="cellMouseOut";g.EVENT_FILTER_CHANGED="filterChanged";g.EVENT_FILTER_MODIFIED="filterModified";g.EVENT_FILTER_OPENED="filterOpened";g.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED="advancedFilterBuilderVisibleChanged";g.EVENT_SORT_CHANGED="sortChanged";g.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved";g.EVENT_ROW_CLICKED="rowClicked";g.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked";g.EVENT_GRID_READY="gridReady";g.EVENT_GRID_PRE_DESTROYED="gridPreDestroyed";g.EVENT_GRID_SIZE_CHANGED="gridSizeChanged";g.EVENT_VIEWPORT_CHANGED="viewportChanged";g.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged";g.EVENT_FIRST_DATA_RENDERED="firstDataRendered";g.EVENT_DRAG_STARTED="dragStarted";g.EVENT_DRAG_STOPPED="dragStopped";g.EVENT_CHECKBOX_CHANGED="checkboxChanged";g.EVENT_ROW_EDITING_STARTED="rowEditingStarted";g.EVENT_ROW_EDITING_STOPPED="rowEditingStopped";g.EVENT_CELL_EDITING_STARTED="cellEditingStarted";g.EVENT_CELL_EDITING_STOPPED="cellEditingStopped";g.EVENT_BODY_SCROLL="bodyScroll";g.EVENT_BODY_SCROLL_END="bodyScrollEnd";g.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged";g.EVENT_PAGINATION_CHANGED="paginationChanged";g.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged";g.EVENT_STORE_REFRESHED="storeRefreshed";g.EVENT_STATE_UPDATED="stateUpdated";g.EVENT_COLUMN_MENU_VISIBLE_CHANGED="columnMenuVisibleChanged";g.EVENT_CONTEXT_MENU_VISIBLE_CHANGED="contextMenuVisibleChanged";g.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged";g.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED="columnContainerWidthChanged";g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged";g.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged";g.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged";g.EVENT_FLASH_CELLS="flashCells";g.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged";g.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged";g.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged";g.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged";g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged";g.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged";g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged";g.EVENT_ROW_DRAG_ENTER="rowDragEnter";g.EVENT_ROW_DRAG_MOVE="rowDragMove";g.EVENT_ROW_DRAG_LEAVE="rowDragLeave";g.EVENT_ROW_DRAG_END="rowDragEnd";g.EVENT_GRID_STYLES_CHANGED="gridStylesChanged";g.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest";g.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest";g.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest";g.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest";g.EVENT_STORE_UPDATED="storeUpdated";g.EVENT_FILTER_DESTROYED="filterDestroyed";g.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted";g.EVENT_ROW_COUNT_READY="rowCountReady";g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED="advancedFilterEnabledChanged";g.EVENT_DATA_TYPES_INFERRED="dataTypesInferred";g.EVENT_FIELD_VALUE_CHANGED="fieldValueChanged";g.EVENT_FIELD_PICKER_VALUE_SELECTED="fieldPickerValueSelected";g.EVENT_SIDE_BAR_UPDATED="sideBarUpdated";var yd=new Set([g.EVENT_GRID_PRE_DESTROYED,g.EVENT_FILL_START]),YR=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}},Wo="ag-Grid-AutoColumn",_a=class extends L{createAutoGroupColumns(e){const t=[],i=this.gos.get("treeData");let s=this.gos.isGroupMultiAutoColumn();return i&&s&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),s=!1),s?e.forEach((n,r)=>{t.push(this.createOneAutoGroupColumn(n,r))}):t.push(this.createOneAutoGroupColumn()),t}updateAutoGroupColumns(e,t){e.forEach((i,s)=>this.updateOneAutoGroupColumn(i,s,t))}createOneAutoGroupColumn(e,t){let i;e?i=`${Wo}-${e.getId()}`:i=Wo;const s=this.createAutoGroupColDef(i,e,t);s.colId=i;const n=new Pe(s,null,i,!0);return this.context.createBean(n),n}updateOneAutoGroupColumn(e,t,i){const s=e.getColDef(),n=typeof s.showRowGroup=="string"?s.showRowGroup:void 0,r=n!=null?this.columnModel.getPrimaryColumn(n):void 0,o=this.createAutoGroupColDef(e.getId(),r??void 0,t);e.setColDef(o,null,i),this.columnFactory.applyColumnState(e,o,i)}createAutoGroupColDef(e,t,i){let s=this.createBaseColDef(t);const n=this.gos.get("autoGroupColumnDef");ii(s,n),s=this.columnFactory.addColumnDefaultAndTypes(s,e),this.gos.get("treeData")||J(s.field)&&J(s.valueGetter)&&J(s.filterValueGetter)&&s.filter!=="agGroupColumnFilter"&&(s.filter=!1),i&&i>0&&(s.headerCheckboxSelection=!1);const r=this.gos.isColumnsSortingCoupledToGroup(),o=s.valueGetter||s.field!=null;return r&&!o&&(s.sortIndex=void 0,s.initialSort=void 0),s}createBaseColDef(e){const t=this.gos.get("autoGroupColumnDef"),s={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererSelector)||(s.cellRenderer="agGroupCellRenderer"),e){const r=e.getColDef();Object.assign(s,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:r.headerValueGetter}),r.cellRenderer&&Object.assign(s,{cellRendererParams:{innerRenderer:r.cellRenderer,innerRendererParams:r.cellRendererParams}}),s.showRowGroup=e.getColId()}else s.showRowGroup=!0;return s}};h([f("columnModel")],_a.prototype,"columnModel",2);h([f("columnFactory")],_a.prototype,"columnFactory",2);_a=h([B("autoGroupColService")],_a);var QR={};wt(QR,{camelCaseToHumanText:()=>qR,camelCaseToHyphenated:()=>XR,capitalise:()=>ZL,escapeString:()=>tt,utf8_encode:()=>XL});var QL=/[&<>"']/g,qL={"&":"&","<":"<",">":">",'"':""","'":"'"};function XL(e){const t=String.fromCharCode;function i(c){const p=[];if(!c)return[];const C=c.length;let v=0,S,E;for(;v<C;)S=c.charCodeAt(v++),S>=55296&&S<=56319&&v<C?(E=c.charCodeAt(v++),(E&64512)==56320?p.push(((S&1023)<<10)+(E&1023)+65536):(p.push(S),v--)):p.push(S);return p}function s(c){if(c>=55296&&c<=57343)throw Error("Lone surrogate U+"+c.toString(16).toUpperCase()+" is not a scalar value")}function n(c,p){return t(c>>p&63|128)}function r(c){if(c>=0&&c<=31&&c!==10)return`_x${c.toString(16).toUpperCase().padStart(4,"0")}_`;if(!(c&4294967168))return t(c);let p="";return c&4294965248?c&4294901760?c&4292870144||(p=t(c>>18&7|240),p+=n(c,12),p+=n(c,6)):(s(c),p=t(c>>12&15|224),p+=n(c,6)):p=t(c>>6&31|192),p+=t(c&63|128),p}const o=i(e),l=o.length;let a=-1,u,d="";for(;++a<l;)u=o[a],d+=r(u);return d}function ZL(e){return e[0].toUpperCase()+e.substring(1).toLowerCase()}function tt(e,t){if(e==null)return null;const i=e.toString().toString();return t?i:i.replace(QL,s=>qL[s])}function qR(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(n=>n.substring(0,1).toUpperCase()+(n.length>1?n.substring(1,n.length):"")).join(" ")}function XR(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}var ZR={};wt(ZR,{convertToMap:()=>pn,keys:()=>eM,mapById:()=>JL});function pn(e){const t=new Map;return e.forEach(i=>t.set(i[0],i[1])),t}function JL(e,t){const i=new Map;return e.forEach(s=>i.set(t(s),s)),i}function eM(e){const t=[];return e.forEach((i,s)=>t.push(s)),t}var yt=class extends L{constructor(){super(...arguments),this.primaryHeaderRowCount=0,this.secondaryHeaderRowCount=0,this.gridHeaderRowCount=0,this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.displayedColumnsAndGroupsMap={},this.viewportColumns=[],this.viewportColumnsHash="",this.headerViewportColumns=[],this.viewportColumnsCenter=[],this.headerViewportColumnsCenter=[],this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.autoHeightActiveAtLeastOnce=!1,this.rowGroupColumns=[],this.valueColumns=[],this.pivotColumns=[],this.ready=!1,this.changeEventsDispatching=!1,this.autoGroupsNeedBuilding=!1,this.forceRecreateAutoGroups=!1,this.pivotMode=!1,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}init(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation");const e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],t=>this.buildAutoGroupColumns(wo(t.source))),this.addManagedPropertyListener("autoGroupColumnDef",t=>this.onAutoGroupColumnDefChanged(wo(t.source))),this.addManagedPropertyListeners(["defaultColDef","columnTypes","suppressFieldDotNotation"],t=>this.onSharedColDefChanged(wo(t.source))),this.addManagedPropertyListener("pivotMode",t=>this.setPivotMode(this.gos.get("pivotMode"),wo(t.source))),this.addManagedListener(this.eventService,g.EVENT_FIRST_DATA_RENDERED,()=>this.onFirstDataRendered())}buildAutoGroupColumns(e){this.columnDefs&&(this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns(e))}onAutoGroupColumnDefChanged(e){this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e)}onSharedColDefChanged(e){this.gridColumns&&(this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e),this.createColumnsFromColumnDefs(!0,e))}setColumnDefs(e,t){const i=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(i,t)}recreateColumnDefs(e){this.onSharedColDefChanged(e)}destroyOldColumns(e,t){const i={};if(!e)return;Ns(null,e,n=>{i[n.getInstanceId()]=n}),t&&Ns(null,t,n=>{i[n.getInstanceId()]=null});const s=Object.values(i).filter(n=>n!=null);this.destroyBeans(s)}destroyColumns(){this.destroyOldColumns(this.primaryColumnTree),this.destroyOldColumns(this.secondaryBalancedTree),this.destroyOldColumns(this.groupAutoColsBalancedTree)}createColumnsFromColumnDefs(e,t){const i=e?this.compareColumnStatesAndDispatchEvents(t):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;const s=this.primaryColumns,n=this.primaryColumnTree,r=this.columnFactory.createColumnTree(this.columnDefs,!0,n,t);this.destroyOldColumns(this.primaryColumnTree,r.columnTree),this.primaryColumnTree=r.columnTree,this.primaryHeaderRowCount=r.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach(a=>this.primaryColumnsMap[a.getId()]=a),this.extractRowGroupColumns(t,s),this.extractPivotColumns(t,s),this.extractValueColumns(t,s),this.ready=!0;const o=this.gridColsArePrimary===void 0;(this.gridColsArePrimary||o||this.autoGroupsNeedBuilding)&&(this.updateGridColumns(),e&&this.gridColsArePrimary&&!this.gos.get("maintainColumnOrder")&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(t),this.checkViewportColumns()),this.dispatchEverythingChanged(t),this.changeEventsDispatching=!0,i&&i(),this.changeEventsDispatching=!1,this.dispatchNewColumnsLoaded(t)}shouldRowModelIgnoreRefresh(){return this.changeEventsDispatching}dispatchNewColumnsLoaded(e){const t={type:g.EVENT_NEW_COLUMNS_LOADED,source:e};this.eventService.dispatchEvent(t),e==="gridInitializing"&&this.onColumnsReady()}dispatchEverythingChanged(e){const t={type:g.EVENT_COLUMN_EVERYTHING_CHANGED,source:e};this.eventService.dispatchEvent(t)}orderGridColumnsLikePrimary(){const e=this.primaryColumns;if(!e)return;const t=e.filter(s=>this.gridColumns.indexOf(s)>=0),i=this.gridColumns.filter(s=>t.indexOf(s)<0);this.gridColumns=[...i,...t],this.gridColumns=this.placeLockedColumns(this.gridColumns)}getAllDisplayedAutoHeightCols(){return this.displayedAutoHeightCols}setViewport(){this.gos.get("enableRtl")?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)}checkViewportColumns(e=!1){if(this.displayedColumnsCenter==null||!this.extractViewport())return;const i={type:g.EVENT_VIRTUAL_COLUMNS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(i)}setViewportPosition(e,t,i=!1){(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns(i))}isPivotMode(){return this.pivotMode}isPivotSettingAllowed(e){return e&&this.gos.get("treeData")?(Y("Pivot mode not available with treeData."),!1):!0}setPivotMode(e,t){if(e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode)||(this.pivotMode=e,!this.gridColumns))return;this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(t);const i={type:g.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(i)}getSecondaryPivotColumn(e,t){if(J(this.secondaryColumns))return null;const i=this.getPrimaryColumn(t);let s=null;return this.secondaryColumns.forEach(n=>{const r=n.getColDef().pivotKeys,o=n.getColDef().pivotValueColumn;ys(r,e)&&o===i&&(s=n)}),s}setBeans(e){this.logger=e.create("columnModel")}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,i=this.displayedColumnsRight?pe(this.displayedColumnsRight):null):(t=this.displayedColumnsLeft?pe(this.displayedColumnsLeft):null,i=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach(s=>{s.setLastLeftPinned(s===t,e),s.setFirstRightPinned(s===i,e)})}autoSizeColumns(e){if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(()=>this.autoSizeColumns(e));return}const{columns:t,skipHeader:i,skipHeaderGroups:s,stopAtGroup:n,source:r="api"}=e;this.animationFrameService.flushAllFrames();const o=[];let l=-1;const a=i??this.gos.get("skipHeaderOnAutoSize"),u=s??a;for(;l!==0;)l=0,this.actionOnGridColumns(t,d=>{if(o.indexOf(d)>=0)return!1;const c=this.autoWidthCalculator.getPreferredWidthForColumn(d,a);if(c>0){const p=this.normaliseColumnWidth(d,c);d.setActualWidth(p,r),o.push(d),l++}return!0},r);u||this.autoSizeColumnGroupsByColumns(t,r,n),this.dispatchColumnResizedEvent(o,!0,"autosizeColumns")}dispatchColumnResizedEvent(e,t,i,s=null){if(e&&e.length){const n={type:g.EVENT_COLUMN_RESIZED,columns:e,column:e.length===1?e[0]:null,flexColumns:s,finished:t,source:i};this.eventService.dispatchEvent(n)}}dispatchColumnChangedEvent(e,t,i){const s={type:e,columns:t,column:t&&t.length==1?t[0]:null,source:i};this.eventService.dispatchEvent(s)}dispatchColumnMovedEvent(e){const{movedColumns:t,source:i,toIndex:s,finished:n}=e,r={type:g.EVENT_COLUMN_MOVED,columns:t,column:t&&t.length===1?t[0]:null,toIndex:s,finished:n,source:i};this.eventService.dispatchEvent(r)}dispatchColumnPinnedEvent(e,t){if(!e.length)return;const i=e.length===1?e[0]:null,s=this.getCommonValue(e,r=>r.getPinned()),n={type:g.EVENT_COLUMN_PINNED,pinned:s??null,columns:e,column:i,source:t};this.eventService.dispatchEvent(n)}dispatchColumnVisibleEvent(e,t){if(!e.length)return;const i=e.length===1?e[0]:null,s=this.getCommonValue(e,r=>r.isVisible()),n={type:g.EVENT_COLUMN_VISIBLE,visible:s,columns:e,column:i,source:t};this.eventService.dispatchEvent(n)}autoSizeColumn(e,t,i){e&&this.autoSizeColumns({columns:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const s=new Set;this.getGridColumns(e).forEach(l=>{let a=l.getParent();for(;a&&a!=i;)a.isPadding()||s.add(a),a=a.getParent()});let r;const o=[];for(const l of s){for(const a of this.ctrlsService.getHeaderRowContainerCtrls())if(r=a.getHeaderCtrlForColumn(l),r)break;r&&r.resizeLeafColumnsToFit(t)}return o}autoSizeAllColumns(e,t){if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(()=>this.autoSizeAllColumns(e,t));return}const i=this.getAllDisplayedColumns();this.autoSizeColumns({columns:i,skipHeader:t,source:e})}getColumnsFromTree(e){const t=[],i=s=>{for(let n=0;n<s.length;n++){const r=s[n];r instanceof Pe?t.push(r):r instanceof Je&&i(r.getChildren())}};return i(e),t}getAllDisplayedTrees(){return this.displayedTreeLeft&&this.displayedTreeRight&&this.displayedTreeCentre?this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight):null}getPrimaryColumnTree(){return this.primaryColumnTree}getHeaderRowCount(){return this.gridHeaderRowCount}getDisplayedTreeLeft(){return this.displayedTreeLeft}getDisplayedTreeRight(){return this.displayedTreeRight}getDisplayedTreeCentre(){return this.displayedTreeCentre}isColumnDisplayed(e){return this.getAllDisplayedColumns().indexOf(e)>=0}getAllDisplayedColumns(){return this.displayedColumns}getViewportColumns(){return this.viewportColumns}getDisplayedLeftColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft}getDisplayedRightColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight}isColSpanActive(){return this.colSpanActive}getDisplayedColumnsForRow(e,t,i,s){const n=[];let r=null;for(let o=0;o<t.length;o++){const l=t[o],a=t.length-o,u=Math.min(l.getColSpan(e),a),d=[l];if(u>1){const p=u-1;for(let C=1;C<=p;C++)d.push(t[o+C]);o+=p}let c;i?(c=!1,d.forEach(p=>{i(p)&&(c=!0)})):c=!0,c&&(n.length===0&&r&&(s&&s(l))&&n.push(r),n.push(l)),r=l}return n}getViewportCenterColumnsForRow(e){if(!this.colSpanActive)return this.viewportColumnsCenter;const t=s=>{const n=s.getLeft();return A(n)&&n>this.viewportLeft},i=this.isColumnVirtualisationSuppressed()?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,i,t)}isColumnAtEdge(e,t){const i=this.getAllDisplayedColumns();if(!i.length)return!1;const s=t==="first";let n;if(e instanceof ht){const r=e.getDisplayedLeafColumns();if(!r.length)return!1;n=s?r[0]:pe(r)}else n=e;return(s?i[0]:pe(i))===n}getAriaColumnIndex(e){let t;return e instanceof ht?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,i=t+e.getActualWidth(),s=this.viewportLeft-200,n=this.viewportRight+200,r=t<s&&i<s,o=t>n&&i>n;return!r&&!o}getDisplayedColumnsLeftWidth(){return this.getWidthOfColsInList(this.displayedColumnsLeft)}getDisplayedColumnsRightWidth(){return this.getWidthOfColsInList(this.displayedColumnsRight)}updatePrimaryColumnList(e,t,i,s,n,r){if(!e||Ii(e))return;let o=!1;if(e.forEach(a=>{if(!a)return;const u=this.getPrimaryColumn(a);if(u){if(i){if(t.indexOf(u)>=0)return;t.push(u)}else{if(t.indexOf(u)<0)return;Jt(t,u)}s(u),o=!0}}),!o)return;this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(r);const l={type:n,columns:t,column:t.length===1?t[0]:null,source:r};this.eventService.dispatchEvent(l)}setRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,g.EVENT_COLUMN_ROW_GROUP_CHANGED,!0,this.setRowGroupActive.bind(this),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.setColumnsVisible([t],!1,i),!e&&!this.gos.get("suppressMakeColumnVisibleAfterUnGroup")&&this.setColumnsVisible([t],!0,i))}addRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),g.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}removeRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),g.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}addPivotColumns(e,t){this.updatePrimaryColumnList(e,this.pivotColumns,!0,i=>i.setPivotActive(!0,t),g.EVENT_COLUMN_PIVOT_CHANGED,t)}setPivotColumns(e,t){this.setPrimaryColumnList(e,this.pivotColumns,g.EVENT_COLUMN_PIVOT_CHANGED,!0,(i,s)=>{s.setPivotActive(i,t)},t)}removePivotColumns(e,t){this.updatePrimaryColumnList(e,this.pivotColumns,!1,i=>i.setPivotActive(!1,t),g.EVENT_COLUMN_PIVOT_CHANGED,t)}setPrimaryColumnList(e,t,i,s,n,r){if(!this.gridColumns)return;const o=new Map;t.forEach((l,a)=>o.set(l,a)),t.length=0,A(e)&&e.forEach(l=>{const a=this.getPrimaryColumn(l);a&&t.push(a)}),t.forEach((l,a)=>{const u=o.get(l);if(u===void 0){o.set(l,0);return}s&&u!==a||o.delete(l)}),(this.primaryColumns||[]).forEach(l=>{const a=t.indexOf(l)>=0;n(a,l)}),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(r),this.dispatchColumnChangedEvent(i,[...o.keys()],r)}setValueColumns(e,t){this.setPrimaryColumnList(e,this.valueColumns,g.EVENT_COLUMN_VALUE_CHANGED,!1,this.setValueActive.bind(this),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.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),g.EVENT_COLUMN_VALUE_CHANGED,t)}removeValueColumns(e,t){this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),g.EVENT_COLUMN_VALUE_CHANGED,t)}normaliseColumnWidth(e,t){const i=e.getMinWidth();A(i)&&t<i&&(t=i);const s=e.getMaxWidth();return A(s)&&e.isGreaterThanMax(t)&&(t=s),t}getPrimaryOrGridColumn(e){return this.getPrimaryColumn(e)||this.getGridColumn(e)}setColumnWidths(e,t,i,s){const n=[];e.forEach(r=>{const o=this.getPrimaryOrGridColumn(r.key);if(!o)return;if(n.push({width:r.newWidth,ratios:[1],columns:[o]}),this.gos.get("colResizeDefault")==="shift"&&(t=!t),t){const a=this.getDisplayedColAfter(o);if(!a)return;const u=o.getActualWidth()-r.newWidth,d=a.getActualWidth()+u;n.push({width:d,ratios:[1],columns:[a]})}}),n.length!==0&&this.resizeColumnSets({resizeSets:n,finished:i,source:s})}checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let s=0,n=0,r=!0;t.forEach(a=>{const u=a.getMinWidth();s+=u||0;const d=a.getMaxWidth();A(d)&&d>0?n+=d:r=!1});const o=i>=s,l=!r||i<=n;return o&&l}resizeColumnSets(e){const{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every(d=>this.checkMinAndMaxWidthsForSet(d)))){if(i){const d=t&&t.length>0?t[0].columns:null;this.dispatchColumnResizedEvent(d,i,s)}return}const r=[],o=[];t.forEach(d=>{const{width:c,columns:p,ratios:C}=d,v={},S={};p.forEach(m=>o.push(m));let E=!0,w=0;for(;E;){if(w++,w>1e3){console.error("AG Grid: infinite loop in resizeColumnSets");break}E=!1;const m=[];let R=0,T=c;p.forEach((F,b)=>{if(S[F.getId()])T-=v[F.getId()];else{m.push(F);const N=C[b];R+=N}});const P=1/R;m.forEach((F,b)=>{const M=b===m.length-1;let N;M?N=T:(N=Math.round(C[b]*c*P),T-=N);const k=F.getMinWidth(),$=F.getMaxWidth();A(k)&&N<k?(N=k,S[F.getId()]=!0,E=!0):A($)&&$>0&&N>$&&(N=$,S[F.getId()]=!0,E=!0),v[F.getId()]=N})}p.forEach(m=>{const R=v[m.getId()];m.getActualWidth()!==R&&(m.setActualWidth(R,s),r.push(m))})});const l=r.length>0;let a=[];l&&(a=this.refreshFlexedColumns({resizingCols:o,skipSetLeft:!0}),this.setLeftValues(s),this.updateBodyWidths(),this.checkViewportColumns());const u=o.concat(a);(l||i)&&this.dispatchColumnResizedEvent(u,i,s,a)}setColumnAggFunc(e,t,i){if(!e)return;const s=this.getPrimaryColumn(e);s&&(s.setAggFunc(t),this.dispatchColumnChangedEvent(g.EVENT_COLUMN_VALUE_CHANGED,[s],i))}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;const s=this.rowGroupColumns[e],n=this.rowGroupColumns.slice(e,t);this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(t,0,s);const r={type:g.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:n,column:n.length===1?n[0]:null,source:i};this.eventService.dispatchEvent(r)}moveColumns(e,t,i,s=!0){if(!this.gridColumns)return;if(this.columnAnimationService.start(),t>this.gridColumns.length-e.length){console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+t),console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");return}const n=this.getGridColumns(e);this.doesMovePassRules(n,t)&&(ef(this.gridColumns,n,t),this.updateDisplayedColumns(i),this.dispatchColumnMovedEvent({movedColumns:n,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 i=this.gridColumns.slice();return ef(i,e,t),i}sortColumnsLikeGridColumns(e){!e||e.length<=1||e.filter(i=>this.gridColumns.indexOf(i)<0).length>0||e.sort((i,s)=>{const n=this.gridColumns.indexOf(i),r=this.gridColumns.indexOf(s);return n-r})}doesMovePassLockedPositions(e){let t=0,i=!0;const s=n=>n?n===!0||n==="left"?0:2:1;return e.forEach(n=>{const r=s(n.getColDef().lockPosition);r<t&&(i=!1),t=r}),i}doesMovePassMarryChildren(e){let t=!0;return Ns(null,this.gridBalancedTree,i=>{if(!(i instanceof Je))return;const s=i,n=s.getColGroupDef();if(!(n&&n.marryChildren))return;const o=[];s.getLeafColumns().forEach(c=>{const p=e.indexOf(c);o.push(p)});const l=Math.max.apply(Math,o),a=Math.min.apply(Math,o),u=l-a,d=s.getLeafColumns().length-1;u>d&&(t=!1)}),t}moveColumnByIndex(e,t,i){if(!this.gridColumns)return;const s=this.gridColumns[e];this.moveColumns([s],t,i)}getColumnDefs(){if(!this.primaryColumns)return;const e=this.primaryColumns.slice();return this.gridColsArePrimary?e.sort((t,i)=>this.gridColumns.indexOf(t)-this.gridColumns.indexOf(i)):this.lastPrimaryOrder&&e.sort((t,i)=>this.lastPrimaryOrder.indexOf(t)-this.lastPrimaryOrder.indexOf(i)),this.columnDefFactory.buildColumnDefs(e,this.rowGroupColumns,this.pivotColumns)}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}updateBodyWidths(){const e=this.getWidthOfColsInList(this.displayedColumnsCenter),t=this.getWidthOfColsInList(this.displayedColumnsLeft),i=this.getWidthOfColsInList(this.displayedColumnsRight);if(this.bodyWidthDirty=this.bodyWidth!==e,this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i){this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i;const n={type:g.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED};this.eventService.dispatchEvent(n);const r={type:g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(r)}}getValueColumns(){return this.valueColumns?this.valueColumns:[]}getPivotColumns(){return this.pivotColumns?this.pivotColumns:[]}isPivotActive(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode}getRowGroupColumns(){return this.rowGroupColumns?this.rowGroupColumns:[]}getDisplayedCenterColumns(){return this.displayedColumnsCenter}getDisplayedLeftColumns(){return this.displayedColumnsLeft}getDisplayedRightColumns(){return this.displayedColumnsRight}getAllPrimaryColumns(){return this.primaryColumns?this.primaryColumns:null}getSecondaryColumns(){return this.secondaryColumns?this.secondaryColumns:null}getAllColumnsForQuickFilter(){return this.columnsForQuickFilter}getAllGridColumns(){var e;return(e=this.gridColumns)!=null?e:[]}isRowGroupEmpty(){return Ii(this.rowGroupColumns)}setColumnsVisible(e,t=!1,i){this.applyColumnState({state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},i)}setColumnsPinned(e,t,i){if(!this.gridColumns)return;if(this.gos.isDomLayout("print")){console.warn("AG Grid: 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,this.actionOnGridColumns(e,n=>n.getPinned()!==s?(n.setPinned(s),!0):!1,i,()=>({type:g.EVENT_COLUMN_PINNED,pinned:s,column:null,columns:null,source:i})),this.columnAnimationService.finish()}actionOnGridColumns(e,t,i,s){if(Ii(e))return;const n=[];if(e.forEach(r=>{if(!r)return;const o=this.getGridColumn(r);if(!o)return;t(o)!==!1&&n.push(o)}),!!n.length&&(this.updateDisplayedColumns(i),A(s)&&s)){const r=s();r.columns=n,r.column=n.length===1?n[0]:null,this.eventService.dispatchEvent(r)}}getDisplayedColBefore(e){const t=this.getAllDisplayedColumns(),i=t.indexOf(e);return i>0?t[i-1]:null}getDisplayedColAfter(e){const t=this.getAllDisplayedColumns(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}getDisplayedGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),n=t==="After"?pe(s):s[0],r=`getDisplayedCol${t}`;for(;;){const o=this[r](n);if(!o)return null;const l=this.getColumnGroupAtLevel(o,i);if(l!==e)return l}}getColumnGroupAtLevel(e,t){let i=e.getParent(),s,n;for(;s=i.getProvidedColumnGroup().getLevel(),n=i.getPaddingLevel(),!(s+n<=t);)i=i.getParent();return i}isPinningLeft(){return this.displayedColumnsLeft.length>0}isPinningRight(){return this.displayedColumnsRight.length>0}getPrimaryAndSecondaryAndAutoColumns(){return[].concat(this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[])}createStateItemFromColumn(e){const t=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,i=e.isPivotActive()?this.pivotColumns.indexOf(e):null,s=e.isValueActive()?e.getAggFunc():null,n=e.getSort()!=null?e.getSort():null,r=e.getSortIndex()!=null?e.getSortIndex():null,o=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:r,aggFunc:s,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:i,flex:o}}getColumnState(){if(J(this.primaryColumns)||!this.isAlive())return[];const t=this.getPrimaryAndSecondaryAndAutoColumns().map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(t),t}orderColumnStateList(e){const t=pn(this.gridColumns.map((i,s)=>[i.getColId(),s]));e.sort((i,s)=>{const n=t.has(i.colId)?t.get(i.colId):-1,r=t.has(s.colId)?t.get(s.colId):-1;return n-r})}resetColumnState(e){if(Ii(this.primaryColumns))return;const t=this.getColumnsFromTree(this.primaryColumnTree),i=[];let s=1e3,n=1e3,r=[];this.groupAutoColumns&&(r=r.concat(this.groupAutoColumns)),t&&(r=r.concat(t)),r.forEach(o=>{const l=this.getColumnStateFromColDef(o);J(l.rowGroupIndex)&&l.rowGroup&&(l.rowGroupIndex=s++),J(l.pivotIndex)&&l.pivot&&(l.pivotIndex=n++),i.push(l)}),this.applyColumnState({state:i,applyOrder:!0},e)}getColumnStateFromColDef(e){const t=(v,S)=>v??S??null,i=e.getColDef(),s=t(i.sort,i.initialSort),n=t(i.sortIndex,i.initialSortIndex),r=t(i.hide,i.initialHide),o=t(i.pinned,i.initialPinned),l=t(i.width,i.initialWidth),a=t(i.flex,i.initialFlex);let u=t(i.rowGroupIndex,i.initialRowGroupIndex),d=t(i.rowGroup,i.initialRowGroup);u==null&&(d==null||d==!1)&&(u=null,d=null);let c=t(i.pivotIndex,i.initialPivotIndex),p=t(i.pivot,i.initialPivot);c==null&&(p==null||p==!1)&&(c=null,p=null);const C=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:n,hide:r,pinned:o,width:l,flex:a,rowGroup:d,rowGroupIndex:u,pivot:p,pivotIndex:c,aggFunc:C}}applyColumnState(e,t){if(Ii(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: 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 i=(r,o,l)=>{const a=this.compareColumnStatesAndDispatchEvents(t);this.autoGroupsNeedBuilding=!0;const u=o.slice(),d={},c={},p=[],C=[];let v=0;const S=this.rowGroupColumns.slice(),E=this.pivotColumns.slice();r.forEach(T=>{const P=T.colId||"";if(P.startsWith(Wo)){p.push(T),C.push(T);return}const b=l(P);b?(this.syncColumnWithStateItem(b,T,e.defaultState,d,c,!1,t),Jt(u,b)):(C.push(T),v+=1)});const w=T=>this.syncColumnWithStateItem(T,null,e.defaultState,d,c,!1,t);u.forEach(w);const m=(T,P,F,b)=>{const M=T[F.getId()],N=T[b.getId()],k=M!=null,$=N!=null;if(k&&$)return M-N;if(k)return-1;if($)return 1;const U=P.indexOf(F),Q=P.indexOf(b),he=U>=0,we=Q>=0;return he&&we?U-Q:he?-1:1};this.rowGroupColumns.sort(m.bind(this,d,S)),this.pivotColumns.sort(m.bind(this,c,E)),this.updateGridColumns();const R=this.groupAutoColumns?this.groupAutoColumns.slice():[];return p.forEach(T=>{const P=this.getAutoColumn(T.colId);Jt(R,P),this.syncColumnWithStateItem(P,T,e.defaultState,null,null,!0,t)}),R.forEach(w),this.applyOrderAfterApplyState(e),this.updateDisplayedColumns(t),this.dispatchEverythingChanged(t),a(),{unmatchedAndAutoStates:C,unmatchedCount:v}};this.columnAnimationService.start();let{unmatchedAndAutoStates:s,unmatchedCount:n}=i(e.state||[],this.primaryColumns||[],r=>this.getPrimaryColumn(r));return(s.length>0||A(e.defaultState))&&(n=i(s,this.secondaryColumns||[],r=>this.getSecondaryColumn(r)).unmatchedCount),this.columnAnimationService.finish(),n===0}applyOrderAfterApplyState(e){if(!e.applyOrder||!e.state)return;let t=[];const i={};e.state.forEach(n=>{if(!n.colId||i[n.colId])return;const r=this.gridColumnsMap[n.colId];r&&(t.push(r),i[n.colId]=!0)});let s=0;if(this.gridColumns.forEach(n=>{const r=n.getColId();if(i[r]!=null)return;r.startsWith(Wo)?Ia(t,n,s++):t.push(n)}),t=this.placeLockedColumns(t),!this.doesMovePassMarryChildren(t)){console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.gridColumns=t}compareColumnStatesAndDispatchEvents(e){const t={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},i=this.getColumnState(),s={};return i.forEach(n=>{s[n.colId]=n}),()=>{const n=this.getPrimaryAndSecondaryAndAutoColumns(),r=(S,E,w,m)=>{const R=E.map(m),T=w.map(m);if(ys(R,T))return;const F=new Set(E);w.forEach(N=>{F.delete(N)||F.add(N)});const b=[...F],M={type:S,columns:b,column:b.length===1?b[0]:null,source:e};this.eventService.dispatchEvent(M)},o=S=>{const E=[];return n.forEach(w=>{const m=s[w.getColId()];m&&S(m,w)&&E.push(w)}),E},l=S=>S.getColId();r(g.EVENT_COLUMN_ROW_GROUP_CHANGED,t.rowGroupColumns,this.rowGroupColumns,l),r(g.EVENT_COLUMN_PIVOT_CHANGED,t.pivotColumns,this.pivotColumns,l);const u=o((S,E)=>{const w=S.aggFunc!=null,m=w!=E.isValueActive(),R=w&&S.aggFunc!=E.getAggFunc();return m||R});u.length>0&&this.dispatchColumnChangedEvent(g.EVENT_COLUMN_VALUE_CHANGED,u,e);const d=(S,E)=>S.width!=E.getActualWidth();this.dispatchColumnResizedEvent(o(d),!0,e);const c=(S,E)=>S.pinned!=E.getPinned();this.dispatchColumnPinnedEvent(o(c),e);const p=(S,E)=>S.hide==E.isVisible();this.dispatchColumnVisibleEvent(o(p),e);const v=o((S,E)=>S.sort!=E.getSort()||S.sortIndex!=E.getSortIndex());v.length>0&&this.sortController.dispatchSortChangedEvents(e,v),this.normaliseColumnMovedEventForColumnState(i,e)}}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}normaliseColumnMovedEventForColumnState(e,t){const i=this.getColumnState(),s={};i.forEach(a=>s[a.colId]=a);const n={};e.forEach(a=>{s[a.colId]&&(n[a.colId]=!0)});const r=e.filter(a=>n[a.colId]),o=i.filter(a=>n[a.colId]),l=[];o.forEach((a,u)=>{const d=r&&r[u];if(d&&d.colId!==a.colId){const c=this.getGridColumn(d.colId);c&&l.push(c)}}),l.length&&this.dispatchColumnMovedEvent({movedColumns:l,source:t,finished:!0})}syncColumnWithStateItem(e,t,i,s,n,r,o){var l;if(!e)return;const a=(T,P)=>{const F={value1:void 0,value2:void 0};let b=!1;return t&&(t[T]!==void 0&&(F.value1=t[T],b=!0),A(P)&&t[P]!==void 0&&(F.value2=t[P],b=!0)),!b&&i&&(i[T]!==void 0&&(F.value1=i[T]),A(P)&&i[P]!==void 0&&(F.value2=i[P])),F},u=a("hide").value1;u!==void 0&&e.setVisible(!u,o);const d=a("pinned").value1;d!==void 0&&e.setPinned(d);const c=(l=e.getColDef().minWidth)!=null?l:this.environment.getMinColWidth(),p=a("flex").value1;if(p!==void 0&&e.setFlex(p),p==null){const T=a("width").value1;T!=null&&c!=null&&T>=c&&e.setActualWidth(T,o)}const C=a("sort").value1;C!==void 0&&(C==="desc"||C==="asc"?e.setSort(C,o):e.setSort(void 0,o));const v=a("sortIndex").value1;if(v!==void 0&&e.setSortIndex(v),r||!e.isPrimary())return;const S=a("aggFunc").value1;S!==void 0&&(typeof S=="string"?(e.setAggFunc(S),e.isValueActive()||(e.setValueActive(!0,o),this.valueColumns.push(e))):(A(S)&&console.warn("AG Grid: 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,o),Jt(this.valueColumns,e))));const{value1:E,value2:w}=a("rowGroup","rowGroupIndex");(E!==void 0||w!==void 0)&&(typeof w=="number"||E?(e.isRowGroupActive()||(e.setRowGroupActive(!0,o),this.rowGroupColumns.push(e)),s&&typeof w=="number"&&(s[e.getId()]=w)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,o),Jt(this.rowGroupColumns,e)));const{value1:m,value2:R}=a("pivot","pivotIndex");(m!==void 0||R!==void 0)&&(typeof R=="number"||m?(e.isPivotActive()||(e.setPivotActive(!0,o),this.pivotColumns.push(e)),n&&typeof R=="number"&&(n[e.getId()]=R)):e.isPivotActive()&&(e.setPivotActive(!1,o),Jt(this.pivotColumns,e)))}getGridColumns(e){return this.getColumns(e,this.getGridColumn.bind(this))}getColumns(e,t){const i=[];return e&&e.forEach(s=>{const n=t(s);n&&i.push(n)}),i}getColumnWithValidation(e){if(e==null)return null;const t=this.getGridColumn(e);return t||console.warn("AG Grid: could not find column "+e),t}getPrimaryColumn(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null}getGridColumn(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)}lookupGridColumn(e){return this.gridColumnsMap[e]}getSecondaryColumn(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null}getColumn(e,t,i){if(!e||!i)return null;if(typeof e=="string"&&i[e])return i[e];for(let s=0;s<t.length;s++)if(this.columnsMatch(t[s],e))return t[s];return this.getAutoColumn(e)}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;if(t===!0)return this.rowGroupColumns.slice(0);const i=this.getPrimaryColumn(t);return i?[i]:null}getAutoColumn(e){return!this.groupAutoColumns||!A(this.groupAutoColumns)||J(this.groupAutoColumns)?null:this.groupAutoColumns.find(t=>this.columnsMatch(t,e))||null}columnsMatch(e,t){const i=e===t,s=e.getColDef()===t,n=e.getColId()==t;return i||s||n}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,n){const r=e.headerValueGetter;if(r){const o=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:n});return typeof r=="function"?r(o):typeof r=="string"?this.expressionService.evaluate(r,o):(console.warn("AG Grid: headerValueGetter must be a function or a string"),"")}else{if(e.headerName!=null)return e.headerName;if(e.field)return qR(e.field)}return""}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const i=e.getColDef().pivotValueColumn,s=A(i);let n=null,r;if(s){const o=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&this.valueColumns.length===1,l=e.getColDef().pivotTotalColumnIds!==void 0;if(o&&!l)return t;n=i?i.getAggFunc():null,r=!0}else{const o=e.isValueActive(),l=this.pivotMode||!this.isRowGroupEmpty();o&&l?(n=e.getAggFunc(),r=!0):r=!1}if(r){const o=typeof n=="string"?n:"func";return`${this.localeService.getLocaleTextFunc()(o,o)}(${t})`}return t}getColumnGroup(e,t){if(!e)return null;if(e instanceof ht)return e;const i=this.getAllDisplayedTrees(),s=typeof t=="number";let n=null;return er(i,!1,r=>{if(r instanceof ht){const o=r;let l;s?l=e===o.getGroupId()&&t===o.getPartId():l=e===o.getGroupId(),l&&(n=o)}}),n}isReady(){return this.ready}extractValueColumns(e,t){this.valueColumns=this.extractColumns(t,this.valueColumns,(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.valueColumns.forEach(i=>{const s=i.getColDef();s.aggFunc!=null&&s.aggFunc!=""?i.setAggFunc(s.aggFunc):i.getAggFunc()||i.setAggFunc(s.initialAggFunc)})}extractRowGroupColumns(e,t){this.rowGroupColumns=this.extractColumns(t,this.rowGroupColumns,(i,s)=>i.setRowGroupActive(s,e),i=>i.rowGroupIndex,i=>i.initialRowGroupIndex,i=>i.rowGroup,i=>i.initialRowGroup)}extractColumns(e=[],t=[],i,s,n,r,o){const l=[],a=[];(this.primaryColumns||[]).forEach(c=>{const p=e.indexOf(c)<0,C=c.getColDef(),v=cc(r(C)),S=cc(o(C)),E=Fn(s(C)),w=Fn(n(C));let m;v!==void 0?m=v:E!==void 0?E===null?m=!1:m=E>=0:p?S!==void 0?m=S:w!==void 0?m=w!=null&&w>=0:m=!1:m=t.indexOf(c)>=0,m&&((p?E!=null||w!=null:E!=null)?l.push(c):a.push(c))});const u=c=>{const p=s(c.getColDef()),C=n(c.getColDef());return p??C};l.sort((c,p)=>{const C=u(c),v=u(p);return C===v?0:C<v?-1:1});const d=[].concat(l);return t.forEach(c=>{a.indexOf(c)>=0&&d.push(c)}),a.forEach(c=>{d.indexOf(c)<0&&d.push(c)}),t.forEach(c=>{d.indexOf(c)<0&&i(c,!1)}),d.forEach(c=>{t.indexOf(c)<0&&i(c,!0)}),d}extractPivotColumns(e,t){this.pivotColumns=this.extractColumns(t,this.pivotColumns,(i,s)=>i.setPivotActive(s,e),i=>i.pivotIndex,i=>i.initialPivotIndex,i=>i.pivot,i=>i.initialPivot)}resetColumnGroupState(e){if(!this.primaryColumnTree)return;const t=[];Ns(null,this.primaryColumnTree,i=>{if(i instanceof Je){const s=i.getColGroupDef(),n={groupId:i.getGroupId(),open:s?s.openByDefault:void 0};t.push(n)}}),this.setColumnGroupState(t,e)}getColumnGroupState(){const e=[];return Ns(null,this.gridBalancedTree,t=>{t instanceof Je&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})}),e}setColumnGroupState(e,t){if(!this.gridBalancedTree)return;this.columnAnimationService.start();const i=[];if(e.forEach(s=>{const n=s.groupId,r=s.open,o=this.getProvidedColumnGroup(n);o&&o.isExpanded()!==r&&(this.logger.log("columnGroupOpened("+o.getGroupId()+","+r+")"),o.setExpanded(r),i.push(o))}),this.updateGroupsAndDisplayedColumns(t),this.setFirstRightAndLastLeftPinned(t),i.length){const s={type:g.EVENT_COLUMN_GROUP_OPENED,columnGroup:Je.length===1?i[0]:void 0,columnGroups:i};this.eventService.dispatchEvent(s)}this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let s;e instanceof Je?s=e.getId():s=e||"",this.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColumnGroup(e){typeof e!="string"&&console.error("AG Grid: group key must be a string");let t=null;return Ns(null,this.gridBalancedTree,i=>{i instanceof Je&&i.getId()===e&&(t=i)}),t}calculateColumnsForDisplay(){let e;return this.pivotMode&&J(this.secondaryColumns)?e=this.gridColumns.filter(t=>{const i=this.groupAutoColumns&&Ri(this.groupAutoColumns,t),s=this.valueColumns&&Ri(this.valueColumns,t);return i||s}):e=this.gridColumns.filter(t=>this.groupAutoColumns&&Ri(this.groupAutoColumns,t)||t.isVisible()),e}checkColSpanActiveInCols(e){let t=!1;return e.forEach(i=>{A(i.getColDef().colSpan)&&(t=!0)}),t}calculateColumnsForGroupDisplay(){this.groupDisplayColumns=[],this.groupDisplayColumnsMap={};const e=t=>{const i=t.getColDef(),s=i.showRowGroup;i&&A(s)&&(this.groupDisplayColumns.push(t),typeof s=="string"?this.groupDisplayColumnsMap[s]=t:s===!0&&this.getRowGroupColumns().forEach(n=>{this.groupDisplayColumnsMap[n.getId()]=t}))};this.gridColumns.forEach(e)}getGroupDisplayColumns(){return this.groupDisplayColumns}getGroupDisplayColumnForGroup(e){return this.groupDisplayColumnsMap[e]}updateDisplayedColumns(e){const t=this.calculateColumnsForDisplay();this.buildDisplayedTrees(t),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)}isSecondaryColumnsPresent(){return A(this.secondaryColumns)}setSecondaryColumns(e,t){if(!this.gridColumns)return;const i=e;if(!(!i&&J(this.secondaryColumns))){if(i){this.processSecondaryColumnDefinitions(e);const s=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0,t);this.destroyOldColumns(this.secondaryBalancedTree,s.columnTree),this.secondaryBalancedTree=s.columnTree,this.secondaryHeaderRowCount=s.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach(n=>this.secondaryColumnsMap[n.getId()]=n),this.previousSecondaryColumns=null}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(t)}}processSecondaryColumnDefinitions(e){const t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;const s=n=>{n.forEach(r=>{if(A(r.children)){const l=r;i&&i(l),s(l.children)}else t&&t(r)})};e&&s(e)}updateGridColumns(){const e=this.gridBalancedTree;if(this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns,this.createGroupAutoColumnsIfNeeded()){const s=pn(this.groupAutoColumns.map(n=>[n,!0]));this.lastPrimaryOrder&&(this.lastPrimaryOrder=this.lastPrimaryOrder.filter(n=>!s.has(n)),this.lastPrimaryOrder=[...this.groupAutoColumns,...this.lastPrimaryOrder]),this.lastSecondaryOrder&&(this.lastSecondaryOrder=this.lastSecondaryOrder.filter(n=>!s.has(n)),this.lastSecondaryOrder=[...this.groupAutoColumns,...this.lastSecondaryOrder])}let i;if(this.secondaryColumns&&this.secondaryBalancedTree){const s=this.secondaryColumns.some(n=>this.gridColumnsMap[n.getColId()]!==void 0);this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,s&&(i=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,i=this.lastPrimaryOrder);if(this.addAutoGroupToGridColumns(),this.orderGridColsLike(i),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.calculateColumnsForGroupDisplay(),this.refreshQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach(s=>this.gridColumnsMap[s.getId()]=s),this.setAutoHeightActive(),!ys(e,this.gridBalancedTree)){const s={type:g.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(s)}}setAutoHeightActive(){this.autoHeightActive=this.gridColumns.filter(e=>e.isAutoHeight()).length>0,this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,this.gos.isRowModelType("clientSide")||this.gos.isRowModelType("serverSide")||Y("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}orderGridColsLike(e){if(J(e))return;const t=pn(e.map((a,u)=>[a,u]));let i=!0;if(this.gridColumns.forEach(a=>{t.has(a)&&(i=!1)}),i)return;const s=pn(this.gridColumns.map(a=>[a,!0])),n=e.filter(a=>s.has(a)),r=pn(n.map(a=>[a,!0])),o=this.gridColumns.filter(a=>!r.has(a)),l=n.slice();o.forEach(a=>{let u=a.getOriginalParent();if(!u){l.push(a);return}const d=[];for(;!d.length&&u;)u.getLeafColumns().forEach(v=>{const S=l.indexOf(v)>=0,E=d.indexOf(v)<0;S&&E&&d.push(v)}),u=u.getOriginalParent();if(!d.length){l.push(a);return}const c=d.map(C=>l.indexOf(C)),p=Math.max(...c);Ia(l,a,p+1)}),this.gridColumns=l}isPrimaryColumnGroupsPresent(){return this.primaryHeaderRowCount>1}refreshQuickFilterColumns(){var e;let t=(e=this.isPivotMode()&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")?this.secondaryColumns:this.primaryColumns)!=null?e:[];this.groupAutoColumns&&(t=t.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gos.get("includeHiddenColumnsInQuickFilter")?t:t.filter(i=>i.isVisible()||i.isRowGroupActive())}placeLockedColumns(e){const t=[],i=[],s=[];return e.forEach(n=>{const r=n.getColDef().lockPosition;r==="right"?s.push(n):r==="left"||r===!0?t.push(n):i.push(n)}),[...t,...i,...s]}addAutoGroupToGridColumns(){if(J(this.groupAutoColumns)){this.destroyOldColumns(this.groupAutoColsBalancedTree),this.groupAutoColsBalancedTree=null;return}this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;const e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,e),this.groupAutoColsBalancedTree=e,this.gridBalancedTree=e.concat(this.gridBalancedTree)}clearDisplayedAndViewportColumns(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.ariaOrderColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""}updateGroupsAndDisplayedColumns(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();const t={type:g.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(t)}deriveDisplayedColumns(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinColumnsAriaOrder(),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter(t=>t.isAutoHeight())}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}joinColumnsAriaOrder(){const e=this.getAllGridColumns(),t=[],i=[],s=[];for(const n of e){const r=n.getPinned();r?r===!0||r==="left"?t.push(n):s.push(n):i.push(n)}this.ariaOrderColumns=t.concat(i).concat(s)}joinDisplayedColumns(){this.gos.get("enableRtl")?this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)}setLeftValues(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()}setLeftValuesOfColumns(e){if(!this.primaryColumns)return;const t=this.getPrimaryAndSecondaryAndAutoColumns().slice(0),i=this.gos.get("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach(s=>{if(i){let n=this.getWidthOfColsInList(s);s.forEach(r=>{n-=r.getActualWidth(),r.setLeft(n,e)})}else{let n=0;s.forEach(r=>{r.setLeft(n,e),n+=r.getActualWidth()})}HR(t,s)}),t.forEach(s=>{s.setLeft(null,e)})}setLeftValuesOfGroups(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach(e=>{e.forEach(t=>{t instanceof ht&&t.checkLeft()})})}derivedDisplayedColumnsFromDisplayedTree(e,t){t.length=0,er(e,!0,i=>{i instanceof Pe&&t.push(i)})}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}extractViewportColumns(){this.isColumnVirtualisationSuppressed()?(this.viewportColumnsCenter=this.displayedColumnsCenter,this.headerViewportColumnsCenter=this.displayedColumnsCenter):(this.viewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this)),this.headerViewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this))),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight),this.headerViewportColumns=this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight)}getVirtualHeaderGroupRow(e,t){let i;switch(e){case"left":i=this.viewportRowLeft[t];break;case"right":i=this.viewportRowRight[t];break;default:i=this.viewportRowCenter[t];break}return J(i)&&(i=[]),i}calculateHeaderRows(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};const e={};this.headerViewportColumns.forEach(i=>e[i.getId()]=!0);const t=(i,s,n)=>{let r=!1;for(let o=0;o<i.length;o++){const l=i[o];let a=!1;if(l instanceof Pe)a=e[l.getId()]===!0;else{const d=l.getDisplayedChildren();d&&(a=t(d,s,n+1))}a&&(r=!0,s[n]||(s[n]=[]),s[n].push(l))}return r};t(this.displayedTreeLeft,this.viewportRowLeft,0),t(this.displayedTreeRight,this.viewportRowRight,0),t(this.displayedTreeCentre,this.viewportRowCenter,0)}extractViewport(){const e=s=>`${s.getId()}-${s.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.viewportColumns.map(e).join("#"),i=this.viewportColumnsHash!==t;return i&&(this.viewportColumnsHash=t,this.calculateHeaderRows()),i}refreshFlexedColumns(e={}){var t;const i=e.source?e.source:"flex";if(e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];let s=-1;if(e.resizingCols){const p=new Set(e.resizingCols);let C=this.displayedColumnsCenter;for(let v=C.length-1;v>=0;v--)if(p.has(C[v])){s=v;break}}let n=0,r=[],o=0,l=0;for(let p=0;p<this.displayedColumnsCenter.length;p++)this.displayedColumnsCenter[p].getFlex()&&p>s?(r.push(this.displayedColumnsCenter[p]),l+=this.displayedColumnsCenter[p].getFlex(),o+=(t=this.displayedColumnsCenter[p].getMinWidth())!=null?t:0):n+=this.displayedColumnsCenter[p].getActualWidth();if(!r.length)return[];let a=[];n+o>this.flexViewportWidth&&(r.forEach(p=>{var C;return p.setActualWidth((C=p.getMinWidth())!=null?C:0,i)}),a=r,r=[]);const u=[];let d;e:for(;;){d=this.flexViewportWidth-n;const p=d/l;for(let C=0;C<r.length;C++){const v=r[C],S=p*v.getFlex();let E=0;const w=v.getMinWidth(),m=v.getMaxWidth();if(A(w)&&S<w?E=w:A(m)&&S>m&&(E=m),E){v.setActualWidth(E,i),Om(r,v),l-=v.getFlex(),a.push(v),n+=v.getActualWidth();continue e}u[C]=Math.round(S)}break}let c=d;return r.forEach((p,C)=>{p.setActualWidth(Math.min(u[C],c),i),a.push(p),c-=u[C]}),e.skipSetLeft||this.setLeftValues(i),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(a,!0,i,r),r}sizeColumnsToFit(e,t="sizeColumnsToFit",i,s){var n,r,o,l,a;if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(()=>this.sizeColumnsToFit(e,t,i,s));return}const u={};s&&((n=s==null?void 0:s.columnLimits)==null||n.forEach(w=>{var m=w,{key:R}=m,T=NL(m,["key"]);u[typeof R=="string"?R:R.getColId()]=T}));const d=this.getAllDisplayedColumns(),c=e===this.getWidthOfColsInList(d);if(e<=0||!d.length||c)return;const p=[],C=[];d.forEach(w=>{w.getColDef().suppressSizeToFit===!0?C.push(w):p.push(w)});const v=p.slice(0);let S=!1;const E=w=>{Jt(p,w),C.push(w)};for(p.forEach(w=>{var m,R;w.resetActualWidth(t);const T=u==null?void 0:u[w.getId()],P=(m=T==null?void 0:T.minWidth)!=null?m:s==null?void 0:s.defaultMinWidth,F=(R=T==null?void 0:T.maxWidth)!=null?R:s==null?void 0:s.defaultMaxWidth,b=w.getActualWidth();typeof P=="number"&&b<P?w.setActualWidth(P,t,!0):typeof F=="number"&&b>F&&w.setActualWidth(F,t,!0)});!S;){S=!0;const w=e-this.getWidthOfColsInList(C);if(w<=0)p.forEach(m=>{var R,T;const P=(T=(R=u==null?void 0:u[m.getId()])==null?void 0:R.minWidth)!=null?T:s==null?void 0:s.defaultMinWidth;if(typeof P=="number"){m.setActualWidth(P,t,!0);return}m.setMinimum(t)});else{const m=w/this.getWidthOfColsInList(p);let R=w;for(let T=p.length-1;T>=0;T--){const P=p[T],F=u==null?void 0:u[P.getId()],b=(r=F==null?void 0:F.minWidth)!=null?r:s==null?void 0:s.defaultMinWidth,M=(o=F==null?void 0:F.maxWidth)!=null?o:s==null?void 0:s.defaultMaxWidth,N=(l=P.getMinWidth())!=null?l:0,k=(a=P.getMaxWidth())!=null?a:Number.MAX_VALUE,$=typeof b=="number"&&b>N?b:P.getMinWidth(),U=typeof M=="number"&&M<k?M:P.getMaxWidth();let Q=Math.round(P.getActualWidth()*m);A($)&&Q<$?(Q=$,E(P),S=!1):A(U)&&Q>U?(Q=U,E(P),S=!1):T===0&&(Q=R),P.setActualWidth(Q,t,!0),R-=Q}}}v.forEach(w=>{w.fireColumnWidthChangedEvent(t)}),this.setLeftValues(t),this.updateBodyWidths(),!i&&this.dispatchColumnResizedEvent(v,!0,t)}buildDisplayedTrees(e){const t=[],i=[],s=[];e.forEach(r=>{switch(r.getPinned()){case"left":t.push(r);break;case"right":i.push(r);break;default:s.push(r);break}});const n=new YR;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(t,n,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(i,n,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(s,n,null,this.displayedTreeCentre),this.updateDisplayedMap()}updateDisplayedMap(){this.displayedColumnsAndGroupsMap={};const e=t=>{this.displayedColumnsAndGroupsMap[t.getUniqueId()]=t};er(this.displayedTreeCentre,!1,e),er(this.displayedTreeLeft,!1,e),er(this.displayedTreeRight,!1,e)}isDisplayed(e){return this.displayedColumnsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){const e=this.getAllDisplayedTrees();er(e,!1,t=>{t instanceof ht&&t.calculateDisplayedColumns()})}getGroupAutoColumns(){return this.groupAutoColumns}createGroupAutoColumnsIfNeeded(){const e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;const t=this.gos.isGroupUseEntireRow(this.pivotMode),i=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn();if((this.rowGroupColumns.length>0||this.gos.get("treeData"))&&!i&&!t){const r=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns);if(!this.autoColsEqual(r,this.groupAutoColumns)||e)return this.groupAutoColumns=r,!0}else this.groupAutoColumns=null;return!1}isGroupSuppressAutoColumn(){return this.gos.get("groupDisplayType")==="custom"?!0:this.gos.get("treeDataDisplayType")==="custom"}autoColsEqual(e,t){return ys(e,t,(i,s)=>i.getColId()===s.getColId())}getWidthOfColsInList(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}getFirstDisplayedColumn(){const e=this.gos.get("enableRtl"),t=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&t.reverse();for(let i=0;i<t.length;i++){const s=this[t[i]]();if(s.length)return e?pe(s):s[0]}return null}setColumnHeaderHeight(e,t){if(e.setAutoHeaderHeight(t)){const s={type:g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,column:e,columns:[e],source:"autosizeColumnHeaderHeight"};this.eventService.dispatchEvent(s)}}getColumnGroupHeaderRowHeight(){return this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight()}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),t=this.getAllDisplayedColumns().filter(i=>i.isAutoHeaderHeight()).map(i=>i.getAutoHeaderHeight()||0);return Math.max(e,...t)}getHeaderHeight(){var e;return(e=this.gos.get("headerHeight"))!=null?e:this.environment.getFromTheme(25,"headerHeight")}getFloatingFiltersHeight(){var e;return(e=this.gos.get("floatingFiltersHeight"))!=null?e:this.getHeaderHeight()}getGroupHeaderHeight(){var e;return(e=this.gos.get("groupHeaderHeight"))!=null?e:this.getHeaderHeight()}getPivotHeaderHeight(){var e;return(e=this.gos.get("pivotHeaderHeight"))!=null?e:this.getHeaderHeight()}getPivotGroupHeaderHeight(){var e;return(e=this.gos.get("pivotGroupHeaderHeight"))!=null?e:this.getGroupHeaderHeight()}queueResizeOperations(){this.shouldQueueResizeOperations=!0}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}resetColumnDefIntoColumn(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}isColumnGroupingLocked(e){const t=this.gos.get("groupLockGroupColumns");if(!e.isRowGroupActive()||t===0)return!1;if(t===-1)return!0;const i=this.rowGroupColumns.findIndex(s=>s.getColId()===e.getColId());return t>i}generateColumnStateForRowGroupAndPivotIndexes(e,t){let i={};const s=(n,r,o,l,a,u)=>{if(!r.length||!this.primaryColumns)return[];const d=Object.keys(n),c=new Set(d),p=new Set(d),C=new Set(r.map(P=>{const F=P.getColId();return p.delete(F),F}).concat(d)),v=[],S={};let E=0;for(let P=0;P<this.primaryColumns.length;P++){const F=this.primaryColumns[P].getColId();C.has(F)&&(v.push(F),S[F]=E++)}let w=1e3,m=!1,R=0;const T=P=>{const F=S[P];for(let b=R;b<F;b++){const M=v[b];p.has(M)&&(n[M][a]=w++,p.delete(M))}R=F};r.forEach(P=>{const F=P.getColId();if(c.has(F))T(F),n[F][a]=w++;else{const b=P.getColDef();(b[a]===null||b[a]===void 0&&b[u]==null)&&(m||(b[o]||b[o]===void 0&&b[l]?T(F):(p.forEach(k=>{n[k][a]=w+S[k]}),w+=v.length,m=!0)),i[F]||(i[F]={colId:F}),i[F][a]=w++)}})};return s(e,this.rowGroupColumns,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(t,this.pivotColumns,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}onColumnsReady(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:s,defaultMaxWidth:n}=e,r=i==null?void 0:i.map(({colId:o,minWidth:l,maxWidth:a})=>({key:o,minWidth:l,maxWidth:a}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:s,defaultMaxWidth:n,columnLimits:r})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}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.autoSizeColumns({columns:t,skipHeader:i,source:"autosizeColumns"}):this.autoSizeAllColumns("autosizeColumns",i)})}};h([f("expressionService")],yt.prototype,"expressionService",2);h([f("columnFactory")],yt.prototype,"columnFactory",2);h([f("displayedGroupCreator")],yt.prototype,"displayedGroupCreator",2);h([f("ctrlsService")],yt.prototype,"ctrlsService",2);h([f("autoWidthCalculator")],yt.prototype,"autoWidthCalculator",2);h([f("columnAnimationService")],yt.prototype,"columnAnimationService",2);h([f("autoGroupColService")],yt.prototype,"autoGroupColService",2);h([f("valueCache")],yt.prototype,"valueCache",2);h([f("animationFrameService")],yt.prototype,"animationFrameService",2);h([f("sortController")],yt.prototype,"sortController",2);h([f("columnDefFactory")],yt.prototype,"columnDefFactory",2);h([Se("aggFuncService")],yt.prototype,"aggFuncService",2);h([I],yt.prototype,"init",1);h([$t],yt.prototype,"destroyColumns",1);h([es(0,_i("loggerFactory"))],yt.prototype,"setBeans",1);yt=h([B("columnModel")],yt);function wo(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function er(e,t,i){if(e)for(let s=0;s<e.length;s++){const n=e[s];if(n instanceof ht){const r=t?n.getDisplayedChildren():n.getChildren();er(r,t,i)}i(n)}}var sf=class extends L{createDisplayedGroups(e,t,i,s){const n=this.mapOldGroupsById(s),r=[];let o=e;for(;o.length;){const l=o;o=[];let a=0;const u=d=>{const c=a;a=d;const p=l[c],v=(p instanceof ht?p.getProvidedColumnGroup():p).getOriginalParent();if(v==null){for(let E=c;E<d;E++)r.push(l[E]);return}const S=this.createColumnGroup(v,t,n,i);for(let E=c;E<d;E++)S.addChild(l[E]);o.push(S)};for(let d=1;d<l.length;d++){const c=l[d],C=(c instanceof ht?c.getProvidedColumnGroup():c).getOriginalParent(),v=l[a],E=(v instanceof ht?v.getProvidedColumnGroup():v).getOriginalParent();C!==E&&u(d)}a<l.length&&u(l.length)}return this.setupParentsIntoColumns(r,null),r}createColumnGroup(e,t,i,s){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),o=ht.createUniqueId(n,r);let l=i[o];return l&&l.getProvidedColumnGroup()!==e&&(l=null),A(l)?l.reset():(l=new ht(e,n,r,s),this.context.createBean(l)),l}mapOldGroupsById(e){const t={},i=s=>{s.forEach(n=>{if(n instanceof ht){const r=n;t[n.getUniqueId()]=r,i(r.getChildren())}})};return e&&i(e),t}setupParentsIntoColumns(e,t){e.forEach(i=>{if(i.setParent(t),i instanceof ht){const s=i;this.setupParentsIntoColumns(s.getChildren(),s)}})}};sf=h([B("displayedGroupCreator")],sf);var tM={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,excludeHiddenColumnsFromQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,enableChartToolPanelsButton:!0,suppressChartToolPanelsButton:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressParentsInRowNodes:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,suppressAggAtRootLevel:!0,removePivotHeaderRowWhenSingleValueColumn:!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,functionsPassive:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0},ot=class{};ot.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"];ot.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy"];ot.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"];ot.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"];ot.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","suppressParentsInRowNodes","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","excludeHiddenColumnsFromQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterMovesDown","enterMovesDownAfterEdit","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","enableChartToolPanelsButton","suppressChartToolPanelsButton","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideFilterAllLevels","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","maintainColumnOrder","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval"];ot.OTHER_PROPERTIES=["suppressStickyTotalRow"];ot.FUNCTIONAL_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher"];ot.CALLBACK_PROPERTIES=["getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","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"];ot.FUNCTION_PROPERTIES=[...ot.FUNCTIONAL_PROPERTIES,...ot.CALLBACK_PROPERTIES];ot.ALL_PROPERTIES=[...ot.ARRAY_PROPERTIES,...ot.OBJECT_PROPERTIES,...ot.STRING_PROPERTIES,...ot.NUMBER_PROPERTIES,...ot.FUNCTION_PROPERTIES,...ot.BOOLEAN_PROPERTIES,...ot.OTHER_PROPERTIES];var Oa=ot,Tt=class wd{static getCallbackForEvent(t){return!t||t.length<2?t:"on"+t[0].toUpperCase()+t.substring(1)}static getGridOptionKeys(){return this.ALL_PROPERTIES_AND_CALLBACKS}static combineAttributesAndGridOptions(t,i){typeof t!="object"&&(t={});const s=K({},t);return wd.getGridOptionKeys().forEach(r=>{const o=i[r];typeof o<"u"&&o!==wd.VUE_OMITTED_PROPERTY&&(s[r]=o)}),s}static processOnChange(t,i,s){if(!t)return;const n={};let r=!1;if(Object.keys(t).filter(l=>wd.ALL_PROPERTIES_AND_CALLBACKS_SET.has(l)).forEach(l=>{n[l]=t[l],r=!0}),!r)return;i.__internalUpdateGridOptions(n,!0);const o={type:g.EVENT_COMPONENT_STATE_CHANGED};Lt(n,(l,a)=>{o[l]=a}),i.dispatchEvent(o)}};Tt.EVENTS=mr(g);Tt.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY";Tt.EXCLUDED_INTERNAL_EVENTS=[g.EVENT_SCROLLBAR_WIDTH_CHANGED,g.EVENT_CHECKBOX_CHANGED,g.EVENT_HEIGHT_SCALE_CHANGED,g.EVENT_BODY_HEIGHT_CHANGED,g.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,g.EVENT_SCROLL_VISIBILITY_CHANGED,g.EVENT_COLUMN_HOVER_CHANGED,g.EVENT_FLASH_CELLS,g.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,g.EVENT_DISPLAYED_ROWS_CHANGED,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,g.EVENT_STORE_UPDATED,g.EVENT_COLUMN_PANEL_ITEM_DRAG_START,g.EVENT_COLUMN_PANEL_ITEM_DRAG_END,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,g.EVENT_FULL_WIDTH_ROW_FOCUSED,g.EVENT_HEADER_HEIGHT_CHANGED,g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,g.EVENT_CELL_FOCUS_CLEARED,g.EVENT_GRID_STYLES_CHANGED,g.EVENT_FILTER_DESTROYED,g.EVENT_ROW_DATA_UPDATE_STARTED,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,g.EVENT_DATA_TYPES_INFERRED,g.EVENT_FIELD_VALUE_CHANGED,g.EVENT_FIELD_PICKER_VALUE_SELECTED,g.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,g.EVENT_SUPPRESS_MENU_HIDE_CHANGED,g.EVENT_SUPPRESS_FIELD_DOT_NOTATION,g.EVENT_ROW_COUNT_READY,g.EVENT_SIDE_BAR_UPDATED];Tt.PUBLIC_EVENTS=Tt.EVENTS.filter(e=>!Ri(Tt.EXCLUDED_INTERNAL_EVENTS,e));Tt.EVENT_CALLBACKS=Tt.EVENTS.map(e=>Tt.getCallbackForEvent(e));Tt.BOOLEAN_PROPERTIES=Oa.BOOLEAN_PROPERTIES;Tt.ALL_PROPERTIES=Oa.ALL_PROPERTIES;Tt.ALL_PROPERTIES_AND_CALLBACKS=[...Tt.ALL_PROPERTIES,...Tt.EVENT_CALLBACKS];Tt.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(Tt.ALL_PROPERTIES_AND_CALLBACKS);var mc=Tt,nf=class extends L{constructor(){super(...arguments),this.componentsMappedByName={}}setupComponents(e){e&&e.forEach(t=>this.addComponent(t))}addComponent(e){const i=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[i]=e.componentClass}getComponentClass(e){return this.componentsMappedByName[e]}};nf=h([B("agStackComponentsRegistry")],nf);var JR={};wt(JR,{getAriaCheckboxStateName:()=>fh,getAriaLabel:()=>sT,getAriaLevel:()=>iM,getAriaPosInSet:()=>iT,getAriaSortState:()=>tT,removeAriaExpanded:()=>lT,removeAriaSort:()=>pT,setAriaActiveDescendant:()=>Bm,setAriaAtomic:()=>nT,setAriaChecked:()=>nM,setAriaColCount:()=>dT,setAriaColIndex:()=>Um,setAriaColSpan:()=>cT,setAriaControls:()=>zm,setAriaDescribedBy:()=>sM,setAriaDisabled:()=>Hm,setAriaExpanded:()=>Us,setAriaHidden:()=>mu,setAriaLabel:()=>Di,setAriaLabelledBy:()=>Uo,setAriaLevel:()=>oT,setAriaLive:()=>Vm,setAriaMultiSelectable:()=>aT,setAriaPosInSet:()=>gh,setAriaRelevant:()=>rT,setAriaRole:()=>Ue,setAriaRowCount:()=>uT,setAriaRowIndex:()=>Wm,setAriaSelected:()=>zo,setAriaSetSize:()=>ph,setAriaSort:()=>hT});function zi(e,t,i){i==null||typeof i=="string"&&i==""?km(e,t):$i(e,t,i)}function $i(e,t,i){e.setAttribute(eT(t),i.toString())}function km(e,t){e.removeAttribute(eT(t))}function eT(e){return`aria-${e}`}function Ue(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function tT(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function iM(e){return parseInt(e.getAttribute("aria-level"),10)}function iT(e){return parseInt(e.getAttribute("aria-posinset"),10)}function sT(e){return e.getAttribute("aria-label")}function Di(e,t){zi(e,"label",t)}function Uo(e,t){zi(e,"labelledby",t)}function sM(e,t){zi(e,"describedby",t)}function Vm(e,t){zi(e,"live",t)}function nT(e,t){zi(e,"atomic",t)}function rT(e,t){zi(e,"relevant",t)}function oT(e,t){zi(e,"level",t)}function Hm(e,t){zi(e,"disabled",t)}function mu(e,t){zi(e,"hidden",t)}function Bm(e,t){zi(e,"activedescendant",t)}function Us(e,t){$i(e,"expanded",t)}function lT(e){km(e,"expanded")}function ph(e,t){$i(e,"setsize",t)}function gh(e,t){$i(e,"posinset",t)}function aT(e,t){$i(e,"multiselectable",t)}function uT(e,t){$i(e,"rowcount",t)}function Wm(e,t){$i(e,"rowindex",t)}function dT(e,t){$i(e,"colcount",t)}function Um(e,t){$i(e,"colindex",t)}function cT(e,t){$i(e,"colspan",t)}function hT(e,t){$i(e,"sort",t)}function pT(e){km(e,"sort")}function zo(e,t){zi(e,"selected",t)}function nM(e,t){$i(e,"checked",t===void 0?"mixed":t)}function zm(e,t){zi(e,"controls",t.id),Uo(t,e.id)}function fh(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var gT={};wt(gT,{browserSupportsPreventScroll:()=>Ym,getBodyHeight:()=>CT,getBodyWidth:()=>mT,getMaxDivHeight:()=>fT,getSafariVersion:()=>$m,getScrollbarWidth:()=>vT,getTabIndex:()=>Cc,isBrowserChrome:()=>mh,isBrowserFirefox:()=>jm,isBrowserSafari:()=>Ts,isIOSUserAgent:()=>qs,isInvisibleScrollbar:()=>Qm,isMacOsUserAgent:()=>Km});var bp,Ju,Fp,Ap,xp,Lp,rf,of;function Ts(){return bp===void 0&&(bp=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),bp}function $m(){if(Ju===void 0)if(Ts()){const e=navigator.userAgent.match(/version\/(\d+)/i);e&&(Ju=e[1]!=null?parseFloat(e[1]):0)}else Ju=0;return Ju}function mh(){if(Fp===void 0){const e=window;Fp=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return Fp}function jm(){return Ap===void 0&&(Ap=/(firefox)/i.test(navigator.userAgent)),Ap}function Km(){return xp===void 0&&(xp=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),xp}function qs(){return Lp===void 0&&(Lp=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Lp}function Ym(){return!Ts()||$m()>=15}function Cc(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!jm())?null:t.toString()}function fT(){if(!document.body)return-1;let e=1e6;const t=navigator.userAgent.toLowerCase().match(/firefox/)?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),e}function mT(){var e,t,i;return(i=(e=document.body)==null?void 0:e.clientWidth)!=null?i:window.innerHeight||((t=document.documentElement)==null?void 0:t.clientWidth)||-1}function CT(){var e,t,i;return(i=(e=document.body)==null?void 0:e.clientHeight)!=null?i:window.innerHeight||((t=document.documentElement)==null?void 0:t.clientHeight)||-1}function vT(){return of==null&&yT(),of}function yT(){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&&(of=i,rf=i===0)}function Qm(){return rf==null&&yT(),rf}var wT={};wt(wT,{dateToFormattedString:()=>Lo,parseDateTimeFromString:()=>si,serialiseDate:()=>ki});var ST={};wt(ST,{cleanNumber:()=>rM,createArrayOfNumbers:()=>ET,decToHex:()=>oM,formatNumberCommas:()=>qm,formatNumberTwoDecimalPlacesAndCommas:()=>lM,padStartWidthZeros:()=>xo,sum:()=>aM});function xo(e,t){return e.toString().padStart(t,"0")}function ET(e,t){const i=[];for(let s=e;s<=t;s++)i.push(s);return i}function rM(e){return typeof e=="string"&&(e=parseInt(e,10)),typeof e=="number"?Math.floor(e):null}function oM(e,t){let i="";for(let s=0;s<t;s++)i+=String.fromCharCode(e&255),e>>>=8;return i}function lM(e,t,i){return typeof e!="number"?"":qm(Math.round(e*100)/100,t,i)}function qm(e,t,i){return typeof e!="number"?"":e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${t}`)}function aM(e){return e==null?null:e.reduce((t,i)=>t+i,0)}function ki(e,t=!0,i="-"){if(!e)return null;let s=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(n=>xo(n,2)).join(i);return t&&(s+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(n=>xo(n,2)).join(":")),s}var Mp=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 Lo(e,t="YYYY-MM-DD"){const i=xo(e.getFullYear(),4),s=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],r={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:()=>xo(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${Mp(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${Mp(e.getDate())}`,DD:()=>xo(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>n[e.getDay()],ddd:()=>n[e.getDay()].slice(0,3),dd:()=>n[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${Mp(e.getDay())}`,d:()=>`${e.getDay()}`},o=new RegExp(Object.keys(r).join("|"),"g");return t.replace(o,l=>l in r?r[l]():l)}function si(e){if(!e)return null;const[t,i]=e.split(" ");if(!t)return null;const s=t.split("-").map(c=>parseInt(c,10));if(s.filter(c=>!isNaN(c)).length!==3)return null;const[n,r,o]=s,l=new Date(n,r-1,o);if(l.getFullYear()!==n||l.getMonth()!==r-1||l.getDate()!==o)return null;if(!i||i==="00:00:00")return l;const[a,u,d]=i.split(":").map(c=>parseInt(c,10));return a>=0&&a<24&&l.setHours(a),u>=0&&u<60&&l.setMinutes(u),d>=0&&d<60&&l.setSeconds(d),l}var RT={};wt(RT,{FOCUSABLE_EXCLUDE:()=>Xm,FOCUSABLE_SELECTOR:()=>TT,addOrRemoveAttribute:()=>Rs,addStylesToElement:()=>nC,bindCellRendererToHtmlElement:()=>oC,clearElement:()=>Xe,copyNodeList:()=>AT,ensureDomOrder:()=>iC,formatSize:()=>Ch,getAbsoluteHeight:()=>Jm,getAbsoluteWidth:()=>Ga,getElementRectWithOffset:()=>eC,getElementSize:()=>Wn,getInnerHeight:()=>Cu,getInnerWidth:()=>Br,getScrollLeft:()=>Va,insertWithDomOrder:()=>PT,isElementChildOfClass:()=>Cr,isFocusableFormField:()=>Zm,isHorizontalScrollShowing:()=>bT,isInDOM:()=>tC,isNodeOrElement:()=>vu,isRtlNegativeScroll:()=>ka,isVerticalScrollShowing:()=>FT,isVisible:()=>di,iterateNamedNodeMap:()=>xT,loadTemplate:()=>ni,nodeListForEach:()=>rC,radioCssClass:()=>lf,removeFromParent:()=>ts,setDisabled:()=>$o,setDisplayed:()=>ue,setDomChildOrder:()=>sC,setElementHeight:()=>uM,setElementWidth:()=>Ba,setFixedHeight:()=>vr,setFixedWidth:()=>Vi,setScrollLeft:()=>Ha,setVisible:()=>DT});var ed;function lf(e,t,i){const s=e.parentElement;let n=s&&s.firstChild;for(;n;)t&&n.classList.toggle(t,n===e),i&&n.classList.toggle(i,n!==e),n=n.nextSibling}var TT="[tabindex], input, select, button, textarea, [href]",Xm="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Zm(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=t.call(e,"input, select, button, textarea"),n=t.call(e,Xm),r=di(e);return s&&!n&&r}function ue(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||mu(e,!t)}function DT(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||mu(e,!t)}function $o(e,t){const i="disabled",s=t?n=>n.setAttribute(i,""):n=>n.removeAttribute(i);s(e),rC(e.querySelectorAll("input"),n=>s(n))}function Cr(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 Wn(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:n,borderBottomWidth:r,borderLeftWidth:o,paddingTop:l,paddingRight:a,paddingBottom:u,paddingLeft:d,marginTop:c,marginRight:p,marginBottom:C,marginLeft:v,boxSizing:S}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(n||"0"),borderBottomWidth:parseFloat(r||"0"),borderLeftWidth:parseFloat(o||"0"),paddingTop:parseFloat(l||"0"),paddingRight:parseFloat(a||"0"),paddingBottom:parseFloat(u||"0"),paddingLeft:parseFloat(d||"0"),marginTop:parseFloat(c||"0"),marginRight:parseFloat(p||"0"),marginBottom:parseFloat(C||"0"),marginLeft:parseFloat(v||"0"),boxSizing:S}}function Cu(e){const t=Wn(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Br(e){const t=Wn(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function Jm(e){const t=Wn(e),i=t.marginBottom+t.marginTop;return Math.ceil(e.offsetHeight+i)}function Ga(e){const t=Wn(e),i=t.marginLeft+t.marginRight;return Math.ceil(e.offsetWidth+i)}function eC(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:n,borderBottomWidth:r}=Wn(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(n||0),bottom:t.bottom+(r||0)}}function ka(){if(typeof ed=="boolean")return ed;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML=`<div style="width: 2px">
|
|
138
|
+
<span style="display: inline-block; width: 1px"></span>
|
|
139
|
+
<span style="display: inline-block; width: 1px"></span>
|
|
140
|
+
</div>`,document.body.appendChild(e),e.scrollLeft=1,ed=Math.floor(e.scrollLeft)===0,document.body.removeChild(e),ed}function Va(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),mh()&&!ka()&&(i=e.scrollWidth-e.clientWidth-i)),i}function Ha(e,t,i){i&&(ka()?t*=-1:(Ts()||mh())&&(t=e.scrollWidth-e.clientWidth-t)),e.scrollLeft=t}function Xe(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function ts(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function tC(e){return!!e.offsetParent}function di(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!tC(e)||window.getComputedStyle(e).visibility!=="visible")}function ni(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function iC(e,t,i){i&&i.nextSibling===t||(i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t))}function sC(e,t){for(let i=0;i<t.length;i++){const s=t[i],n=e.children[i];n!==s&&e.insertBefore(s,n)}}function PT(e,t,i){i?i.insertAdjacentElement("afterend",t):e.firstChild?e.insertAdjacentElement("afterbegin",t):e.appendChild(t)}function nC(e,t){if(t)for(const[i,s]of Object.entries(t)){if(!i||!i.length||s==null)continue;const n=XR(i),r=s.toString(),o=r.replace(/\s*!important/g,""),l=o.length!=r.length?"important":void 0;e.style.setProperty(n,o,l)}}function bT(e){return e.clientWidth<e.scrollWidth}function FT(e){return e.clientHeight<e.scrollHeight}function Ba(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Vi(e,t)}function Vi(e,t){t=Ch(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function uM(e,t){t==="flex"?(e.style.removeProperty("height"),e.style.removeProperty("minHeight"),e.style.removeProperty("maxHeight"),e.style.flex="1 1 auto"):vr(e,t)}function vr(e,t){t=Ch(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function Ch(e){return typeof e=="number"?`${e}px`:e}function vu(e){return e instanceof Node||e instanceof HTMLElement}function AT(e){if(e==null)return[];const t=[];return rC(e,i=>t.push(i)),t}function xT(e,t){if(e)for(let i=0;i<e.length;i++){const s=e[i];t(s.name,s.value)}}function Rs(e,t,i){i==null?e.removeAttribute(t):e.setAttribute(t,i.toString())}function rC(e,t){if(e!=null)for(let i=0;i<e.length;i++)t(e[i])}function oC(e,t){e.then(i=>{const s=i.getGui();s!=null&&(typeof s=="object"?t.appendChild(s):t.innerHTML=s)})}var LT={};wt(LT,{fuzzyCheckStrings:()=>MT,fuzzySuggestions:()=>yu});function MT(e,t,i){const s={},n=e.filter(r=>!t.some(o=>o===r));return n.length>0&&n.forEach(r=>s[r]=yu(r,i).values),s}function yu(e,t,i,s){let n=t.map((l,a)=>({value:l,relevance:dM(e.toLowerCase(),l.toLocaleLowerCase()),idx:a}));if(n.sort((l,a)=>a.relevance-l.relevance),i&&(n=n.filter(l=>l.relevance!==0)),n.length>0&&s&&s>0){const a=n[0].relevance*s;n=n.filter(u=>a-u.relevance<0)}const r=[],o=[];for(const l of n)r.push(l.value),o.push(l.idx);return{values:r,indices:o}}function dM(e,t){const i=e.replace(/\s/g,""),s=t.replace(/\s/g,"");let n=0,r=-1;for(let o=0;o<i.length;o++){const l=s.indexOf(i[o],r+1);l!==-1&&(r=l,n+=100-r*100/1e4*100)}return n}var IT={};wt(IT,{createIcon:()=>xi,createIconNoSpan:()=>Ve,iconNameClassMap:()=>NT});var NT={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"};function xi(e,t,i){const s=Ve(e,t,i);if(s){const{className:r}=s;if(typeof r=="string"&&r.indexOf("ag-icon")>-1||typeof r=="object"&&r["ag-icon"])return s}const n=document.createElement("span");return n.appendChild(s),n}function Ve(e,t,i,s){let n=null;const r=i&&i.getColDef().icons;if(r&&(n=r[e]),t&&!n){const o=t.get("icons");o&&(n=o[e])}if(n){let o;if(typeof n=="function")o=n();else if(typeof n=="string")o=n;else throw new Error("icon from grid options needs to be a string or a function");if(typeof o=="string")return ni(o);if(vu(o))return o;console.warn("AG Grid: iconRenderer should return back a string or a dom object")}else{const o=document.createElement("span");let l=NT[e];return l||(s?l=e:(console.warn(`AG Grid: Did not find icon ${e}`),l="")),o.setAttribute("class",`ag-icon ag-icon-${l}`),o.setAttribute("unselectable","on"),Ue(o,"presentation"),o}}var _T={};wt(_T,{isDeleteKey:()=>kT,isEventFromPrintableCharacter:()=>vh,isUserSuppressingHeaderKeyboardEvent:()=>OT,isUserSuppressingKeyboardEvent:()=>vc,normaliseQwertyAzerty:()=>GT});var D=class{};D.BACKSPACE="Backspace";D.TAB="Tab";D.ENTER="Enter";D.ESCAPE="Escape";D.SPACE=" ";D.LEFT="ArrowLeft";D.UP="ArrowUp";D.RIGHT="ArrowRight";D.DOWN="ArrowDown";D.DELETE="Delete";D.F2="F2";D.PAGE_UP="PageUp";D.PAGE_DOWN="PageDown";D.PAGE_HOME="Home";D.PAGE_END="End";D.A="KeyA";D.C="KeyC";D.D="KeyD";D.V="KeyV";D.X="KeyX";D.Y="KeyY";D.Z="KeyZ";var cM=65,hM=67,pM=86,gM=68,fM=90,mM=89;function vh(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key.length===1}function vc(e,t,i,s,n){const r=s?s.getColDef().suppressKeyboardEvent:void 0;if(!r)return!1;const o=e.addGridCommonParams({event:t,editing:n,column:s,node:i,data:i.data,colDef:s.getColDef()});return!!(r&&r(o))}function OT(e,t,i,s){const n=s.getDefinition(),r=n&&n.suppressHeaderKeyboardEvent;if(!A(r))return!1;const o=e.addGridCommonParams({colDef:n,column:s,headerRowIndex:i,event:t});return!!r(o)}function GT(e){const{keyCode:t}=e;let i;switch(t){case cM:i=D.A;break;case hM:i=D.C;break;case pM:i=D.V;break;case gM:i=D.D;break;case fM:i=D.Z;break;case mM:i=D.Y;break;default:i=e.code}return i}function kT(e,t=!1){return e===D.DELETE?!0:!t&&e===D.BACKSPACE?Km():!1}var VT={};wt(VT,{areEventsNear:()=>lC});function lC(e,t,i){if(i===0)return!1;const s=Math.abs(e.clientX-t.clientX),n=Math.abs(e.clientY-t.clientY);return Math.max(s,n)<=i}var HT={};wt(HT,{sortRowNodesByOrder:()=>CM});function CM(e,t){if(!e)return!1;const i=(o,l)=>{const a=t[o.id],u=t[l.id],d=a!==void 0,c=u!==void 0,p=d&&c,C=!d&&!c;return p?a-u:C?o.__objectId-l.__objectId:d?1:-1};let s,n,r=!1;for(let o=0;o<e.length-1;o++)if(s=e[o],n=e[o+1],i(s,n)>0){r=!0;break}return r?(e.sort(i),!0):!1}var BT={};wt(BT,{convertToSet:()=>aC});function aC(e){const t=new Set;return e.forEach(i=>t.add(i)),t}var vM=K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K({},JR),GR),gT),wT),RT),OR),FR),LT),DR),IT),_T),ZR),VT),ST),PR),HT),BT),QR),Z=vM,jo=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}},it=class Sd{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(i=>this.onDone(i),i=>this.onReject(i))}static all(t){return new Sd(i=>{let s=t.length;const n=new Array(s);t.forEach((r,o)=>{r.then(l=>{n[o]=l,s--,s===0&&i(n)})})})}static resolve(t=null){return new Sd(i=>i(t))}then(t){return new Sd(i=>{this.status===1?i(t(this.resolution)):this.waiters.push(s=>i(t(s)))})}resolveNow(t,i){return this.status===1?i(this.resolution):t}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(i=>i(t))}onReject(t){console.warn("TBI")}},wu=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(n=>this.addOrRemoveCssClass(n,t));return}}if(this.cssClassStates[e]!==t&&e.length){const s=this.getGui();s&&s.classList.toggle(e,t),this.cssClassStates[e]=t}}},Su=class tr extends L{constructor(t,i,s,n){super(),this.parentComp=t,this.tooltipShowDelayOverride=i,this.tooltipHideDelayOverride=s,this.shouldDisplayTooltip=n,this.SHOW_QUICK_TOOLTIP_DIFF=1e3,this.FADE_OUT_TOOLTIP_TIMEOUT=1e3,this.INTERACTIVE_HIDE_DELAY=100,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}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.addManagedListener(t,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(t,"mouseleave",this.onMouseLeave.bind(this))),this.tooltipTrigger===1&&(this.addManagedListener(t,"focusin",this.onFocusIn.bind(this)),this.addManagedListener(t,"focusout",this.onFocusOut.bind(this))),this.addManagedListener(t,"mousemove",this.onMouseMove.bind(this)),this.interactionEnabled||(this.addManagedListener(t,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(t,"keydown",this.onKeyDown.bind(this)))}getGridOptionsTooltipDelay(t){const i=this.gos.get(t);return i<0&&Y(`${t} should not be lower than 0`),Math.max(200,i)}getTooltipDelay(t){var i,s;return t==="show"?(i=this.tooltipShowDelayOverride)!=null?i:this.getGridOptionsTooltipDelay("tooltipShowDelay"):(s=this.tooltipHideDelayOverride)!=null?s: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()),!qs()&&(tr.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},this.INTERACTIVE_HIDE_DELAY):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 i;const s=t.relatedTarget,n=this.parentComp.getGui(),r=(i=this.tooltipComp)==null?void 0:i.getGui();this.isInteractingWithTooltip||n.contains(s)||this.interactionEnabled&&(r!=null&&r.contains(s))||this.setToDoNothing()}onKeyDown(){this.setToDoNothing()}prepareToShowTooltip(t){if(this.state!=0||tr.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=tr.lastTooltipHideTime;return t-i<this.SHOW_QUICK_TOOLTIP_DIFF}setToDoNothing(){this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const t=K({},this.parentComp.getTooltipParams());if(!A(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){if(!t&&this.isInteractingWithTooltip)return;this.tooltipComp&&(this.destroyTooltipComp(),tr.lastTooltipHideTime=new Date().getTime());const i={type:g.EVENT_TOOLTIP_HIDE,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(i),this.state=0}newTooltipComponentCallback(t,i){if(this.state!==2||this.tooltipInstanceCount!==t){this.getContext().destroyBean(i);return}const n=i.getGui();this.tooltipComp=i,n.classList.contains("ag-tooltip")||n.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&n.classList.add("ag-tooltip-animate"),this.interactionEnabled&&n.classList.add("ag-tooltip-interactive");const r=this.localeService.getLocaleTextFunc(),o=this.popupService.addPopup({eChild:n,ariaLabel:r("ariaLabelTooltip","Tooltip")});o&&(this.tooltipPopupDestroyFunc=o.hideFunc),this.positionTooltip(),this.tooltipTrigger===1&&(this.onBodyScrollEventCallback=this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,this.setToDoNothing.bind(this)),this.onColumnMovedEventCallback=this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,this.setToDoNothing.bind(this))),this.interactionEnabled&&(this.tooltipTrigger===0?(this.tooltipMouseEnterListener=this.addManagedListener(n,"mouseenter",this.onTooltipMouseEnter.bind(this))||null,this.tooltipMouseLeaveListener=this.addManagedListener(n,"mouseleave",this.onTooltipMouseLeave.bind(this))||null):(this.tooltipFocusInListener=this.addManagedListener(n,"focusin",this.onTooltipFocusIn.bind(this))||null,this.tooltipFocusOutListener=this.addManagedListener(n,"focusout",this.onTooltipFocusOut.bind(this))||null));const l={type:g.EVENT_TOOLTIP_SHOW,tooltipGui:n,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(l),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isInteractingWithTooltip=!1,this.lockService()}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}onTooltipFocusOut(t){var i;const s=this.parentComp.getGui(),n=(i=this.tooltipComp)==null?void 0:i.getGui(),r=t.relatedTarget;n!=null&&n.contains(r)||(this.isInteractingWithTooltip=!1,s.contains(r)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const t={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent(Ie(K({},t),{mouseEvent:this.lastMouseEvent})):this.popupService.positionPopupByComponent(Ie(K({},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?this.FADE_OUT_TOOLTIP_TIMEOUT:0;window.setTimeout(()=>{t(),this.getContext().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(){tr.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},this.INTERACTIVE_HIDE_DELAY)}unlockService(){tr.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()}};Su.isLocked=!1;h([f("popupService")],Su.prototype,"popupService",2);h([f("userComponentFactory")],Su.prototype,"userComponentFactory",2);h([I],Su.prototype,"postConstruct",1);var yM=Su,Xs=class extends L{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}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 e,t,i,s;if(this.tooltipManager!=null)return;const n={getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()};this.tooltipManager=this.createBean(new yM(n,(t=(e=this.ctrl).getTooltipShowDelayOverride)==null?void 0:t.call(e),(s=(i=this.ctrl).getTooltipHideDelayOverride)==null?void 0:s.call(i),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(){const e=this.ctrl,t=e.getColumn?e.getColumn():void 0,i=e.getColDef?e.getColDef():void 0,s=e.getRowNode?e.getRowNode():void 0;return{location:e.getLocation(),colDef:i,column:t,rowIndex:e.getRowIndex?e.getRowIndex():void 0,node:s,data:s?s.data:void 0,value:this.getTooltipText(),valueFormatted:e.getValueFormatted?e.getValueFormatted():void 0,hideTooltipCallback:()=>{var n;return(n=this.tooltipManager)==null?void 0:n.hideTooltip(!0)}}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}};h([f("beans")],Xs.prototype,"beans",2);h([I],Xs.prototype,"postConstruct",1);var wM=new jo,Eu=class af extends L{constructor(t){super(),this.displayed=!0,this.visible=!0,this.compId=wM.next(),this.cssClassManager=new wu(()=>this.eGui),t&&this.setTemplate(t)}preConstructOnComponent(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips")}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(t){const{newTooltipText:i,showDelayOverride:s,hideDelayOverride:n,location:r,shouldDisplayTooltip:o}=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 Xs({getTooltipValue:l,getGui:()=>this.getGui(),getLocation:()=>r??"UNKNOWN",getColDef:t==null?void 0:t.getColDef,getColumn:t==null?void 0:t.getColumn,getTooltipShowDelayOverride:s!=null?()=>s:void 0,getTooltipHideDelayOverride:n!=null?()=>n:void 0,shouldDisplayTooltip:o})))}createChildComponentsFromTags(t,i){AT(t.childNodes).forEach(n=>{if(!(n instanceof HTMLElement))return;const r=this.createComponentFromElement(n,o=>{o.getGui()&&this.copyAttributesFromNode(n,o.getGui())},i);if(r){if(r.addItems&&n.children.length){this.createChildComponentsFromTags(n,i);const o=Array.prototype.slice.call(n.children);r.addItems(o)}this.swapComponentForNode(r,t,n)}else n.childNodes&&this.createChildComponentsFromTags(n,i)})}createComponentFromElement(t,i,s){const n=t.nodeName,r=s?s[t.getAttribute("ref")]:void 0,o=this.agStackComponentsRegistry.getComponentClass(n);if(o){af.elementGettingCreated=t;const l=new o(r);return l.setParentComponent(this),this.createBean(l,null,i),l}return null}copyAttributesFromNode(t,i){xT(t.attributes,(s,n)=>i.setAttribute(s,n))}swapComponentForNode(t,i,s){const n=t.getGui();i.replaceChild(n,s),i.insertBefore(document.createComment(s.nodeName),n),this.addDestroyFunc(this.destroyBean.bind(this,t)),this.swapInComponentForQuerySelectors(t,s)}swapInComponentForQuerySelectors(t,i){const s=this;this.iterateOverQuerySelectors(n=>{s[n.attributeName]===i&&(s[n.attributeName]=t)})}iterateOverQuerySelectors(t){let i=Object.getPrototypeOf(this);for(;i!=null;){const s=i.__agComponentMetaData,n=ah(i.constructor);s&&s[n]&&s[n].querySelectors&&s[n].querySelectors.forEach(r=>t(r)),i=Object.getPrototypeOf(i)}}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){const s=ni(t);this.setTemplateFromElement(s,i)}setTemplateFromElement(t,i){this.eGui=t,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),i)}createChildComponentsPreConstruct(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())}wireQuerySelectors(){if(!this.eGui)return;const t=this;this.iterateOverQuerySelectors(i=>{const s=r=>t[i.attributeName]=r;if(i.refSelector&&this.getAttribute("ref")===i.refSelector)s(this.eGui);else{const r=this.eGui.querySelector(i.querySelector);r&&s(r.__agComponent||r)}})}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)}queryForHtmlInputElement(t){return this.eGui.querySelector(t)}appendChild(t,i){if(t!=null)if(i||(i=this.eGui),vu(t))i.appendChild(t);else{const s=t;i.appendChild(s.getGui())}}isDisplayed(){return this.displayed}setVisible(t,i={}){if(t!==this.visible){this.visible=t;const{skipAriaHidden:s}=i;DT(this.eGui,t,{skipAriaHidden:s})}}setDisplayed(t,i={}){if(t!==this.displayed){this.displayed=t;const{skipAriaHidden:s}=i;ue(this.eGui,t,{skipAriaHidden:s});const n={type:af.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(n)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const t=this.eGui;t&&t.__agComponent&&(t.__agComponent=void 0),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)}getAttribute(t){const{eGui:i}=this;return i?i.getAttribute(t):null}getRefElement(t){return this.queryForHtmlElement(`[ref="${t}"]`)}};Eu.EVENT_DISPLAYED_CHANGED="displayedChanged";h([f("agStackComponentsRegistry")],Eu.prototype,"agStackComponentsRegistry",2);h([MR],Eu.prototype,"preConstructOnComponent",1);h([MR],Eu.prototype,"createChildComponentsPreConstruct",1);var te=Eu;function _(e){return SM.bind(this,`[ref=${e}]`,e)}function SM(e,t,i,s,n){if(e===null){console.error("AG Grid: QuerySelector selector should not be null");return}if(typeof n=="number"){console.error("AG Grid: QuerySelector should be on an attribute");return}EM(i,"querySelectors",{attributeName:s,querySelector:e,refSelector:t})}function EM(e,t,i){const s=RM(e,ah(e.constructor));s[t]||(s[t]=[]),s[t].push(i)}function RM(e,t){return e.__agComponentMetaData||(e.__agComponentMetaData={}),e.__agComponentMetaData[t]||(e.__agComponentMetaData[t]={}),e.__agComponentMetaData[t]}var uC=class extends te{constructor(){super(`
|
|
141
|
+
<div class="ag-floating-filter-input" role="presentation">
|
|
142
|
+
<ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>
|
|
143
|
+
</div>`)}destroy(){super.destroy()}init(e){this.params=e;const t=this.columnModel.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)}};h([_("eFloatingFilterText")],uC.prototype,"eFloatingFilterText",2);h([f("columnModel")],uC.prototype,"columnModel",2);var WT=class{constructor(e,t,i,s,n){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),n==null||n(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){ue(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 t,i;let s=!1;(t=this.dateComp)!=null&&t.refresh&&typeof this.dateComp.refresh=="function"&&this.dateComp.refresh(e)!==null&&(s=!0),!s&&((i=this.dateComp)!=null&&i.onParamsUpdated)&&typeof this.dateComp.onParamsUpdated=="function"&&this.dateComp.onParamsUpdated(e)!==null&&Y("Custom date component method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")}setDateCompDisabled(e){this.dateComp!=null&&this.dateComp.setDisabled!=null&&this.dateComp.setDisabled(e)}},UT=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(n=>e[n]!=null)?!0:(console.warn(`AG Grid: 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:console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else console.warn("AG Grid: no filter options for filter")}getDefaultOption(){return this.defaultOption}getCustomOption(e){return this.customFilterOptions[e]}},zT={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"},yh=class $T extends L{constructor(t,i={}){super(),this.eFocusableElement=t,this.callbacks=i,this.callbacks=K({shouldStopEventPropagation:()=>!1,onTabKeyDown:s=>{if(s.defaultPrevented)return;const n=this.focusService.findNextFocusableElement(this.eFocusableElement,!1,s.shiftKey);n&&(n.focus(),s.preventDefault())}},i)}postConstruct(){this.eFocusableElement.classList.add($T.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)}addKeyDownListeners(t){this.addManagedListener(t,"keydown",i=>{if(!(i.defaultPrevented||rs(i))){if(this.callbacks.shouldStopEventPropagation(i)){as(i);return}i.key===D.TAB?this.callbacks.onTabKeyDown(i):this.callbacks.handleKeyDown&&this.callbacks.handleKeyDown(i)}})}};yh.FOCUS_MANAGED_CLASS="ag-focus-managed";h([f("focusService")],yh.prototype,"focusService",2);h([I],yh.prototype,"postConstruct",1);var Un=yh,jT="ag-resizer-wrapper",TM=`<div class="${jT}">
|
|
144
|
+
<div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>
|
|
145
|
+
<div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>
|
|
146
|
+
<div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>
|
|
147
|
+
<div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>
|
|
148
|
+
<div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>
|
|
149
|
+
<div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>
|
|
150
|
+
<div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>
|
|
151
|
+
<div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>
|
|
152
|
+
</div>`,al=class extends L{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)}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:n,height:r,x:o,y:l}=this.config;this.offsetParent||this.setOffsetParent();let a=0,u=0;const d=di(this.element);if(d){const c=this.findBoundaryElement(),p=window.getComputedStyle(c);if(p.minWidth!=null){const C=c.offsetWidth-this.element.offsetWidth;u=parseInt(p.minWidth,10)-C}if(p.minHeight!=null){const C=c.offsetHeight-this.element.offsetHeight;a=parseInt(p.minHeight,10)-C}}if(this.minHeight=n||a,this.minWidth=i||u,s&&this.setWidth(s),r&&this.setHeight(r),(!s||!r)&&this.refreshSize(),e)this.center();else if(o||l)this.offsetElement(o,l);else if(d&&t){let c=this.boundaryEl,p=!0;if(c||(c=this.findBoundaryElement(),p=!1),c){const C=parseFloat(c.style.top),v=parseFloat(c.style.left);p?this.offsetElement(isNaN(v)?0:v,isNaN(C)?0:C):this.setPosition(v,C)}}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],n=this.getResizerElement(t),r={dragStartPixels:0,eElement:n,onDragStart:o=>this.onResizeStart(o,t),onDragging:this.onResize.bind(this),onDragStop:o=>this.onResizeEnd(o,t)};(s||!this.isAlive()&&!s)&&(s?(this.dragService.addDragSource(r),this.resizeListeners.push(r),n.style.pointerEvents="all"):n.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)vr(i,e),e=Jm(i),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const n=this.getAvailableHeight();n&&e>n&&(e=n)}this.getHeight()!==e&&(s?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?vr(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(),n=this.offsetParent.getBoundingClientRect(),r=e?this.position.y:s.top,o=e?0:n.top;let l=0;if(t){const u=this.element.parentElement;if(u){const{bottom:d}=u.getBoundingClientRect();l=d-s.bottom}}return i+o-r-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)Vi(t,e),e=Ga(t),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:n}=this.offsetParent,r=i?this.position.x:this.element.getBoundingClientRect().left;n&&e+r>n&&(e=n-r)}this.getWidth()!==e&&(s?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Vi(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:n,topBuffer:r}=e,o=t.clientX-this.dragStartPosition.x,l=t.clientY-this.dragStartPosition.y,a=this.shouldSkipX(t,!!i,!!n,o)?0:o,u=this.shouldSkipY(t,!!s,r,l)?0:l;return{movementX:a,movementY:u}}shouldSkipX(e,t,i,s){const n=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.x:n.left;let a=l<=0&&r.left>=e.clientX||r.right<=e.clientX&&r.right<=o.right;return a?!0:(t?a=s<0&&e.clientX>l+r.left||s>0&&e.clientX<l+r.left:i?a=s<0&&e.clientX>o.right||s>0&&e.clientX<l+r.left:a=s<0&&e.clientX>o.right||s>0&&e.clientX<o.right,a)}shouldSkipY(e,t,i=0,s){const n=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.y:n.top;let a=l<=0&&r.top>=e.clientY||r.bottom<=e.clientY&&r.bottom<=o.bottom;return a?!0:(t?a=s<0&&e.clientY>l+r.top+i||s>0&&e.clientY<l+r.top:a=s<0&&e.clientY>o.bottom||s>0&&e.clientY<o.bottom,a)}createResizeMap(){const e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[ref=eTopLeftResizer]")},top:{element:e.querySelector("[ref=eTopResizer]")},topRight:{element:e.querySelector("[ref=eTopRightResizer]")},right:{element:e.querySelector("[ref=eRightResizer]")},bottomRight:{element:e.querySelector("[ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[ref=eBottomLeftResizer]")},left:{element:e.querySelector("[ref=eLeftResizer]")}}}addResizers(){if(this.resizersAdded)return;const e=this.element;if(!e)return;const i=new DOMParser().parseFromString(TM,"text/html").body;e.appendChild(i.firstChild),this.createResizeMap(),this.resizersAdded=!0}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${jT}`);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 n=e[s],r=!!n.style.flex&&n.style.flex!=="0 0 auto";if(n===this.element)continue;let o=this.minHeight||0,l=this.minWidth||0;if(r){const a=window.getComputedStyle(n);a.minHeight&&(o=parseInt(a.minHeight,10)),a.minWidth&&(l=parseInt(a.minWidth,10))}else o=n.offsetHeight,l=n.offsetWidth;t+=o,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 n=i[s];n!==t&&(e?n.style.height=`${n.offsetHeight}px`:n.style.width=`${n.offsetWidth}px`,n.style.flex="0 0 auto",n===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:n,isBottom:r,isLeft:o}=this.currentResizer,l=n||o,a=r||s,{movementX:u,movementY:d}=this.calculateMouseMovement({e,isLeft:o,isTop:s}),c=this.position.x,p=this.position.y;let C=0,v=0;if(l&&u){const S=o?-1:1,E=this.getWidth(),w=E+u*S;let m=!1;o&&(C=E-w,(c+C<=0||w<=this.minWidth)&&(m=!0,C=0)),m||this.setWidth(w)}if(a&&d){const S=s?-1:1,E=this.getHeight(),w=E+d*S;let m=!1;s?(v=E-w,(p+v<=0||w<=this.minHeight)&&(m=!0,v=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&E<w&&this.getMinSizeOfSiblings().height+w>this.element.parentElement.offsetHeight&&(m=!0),m||this.setHeight(w)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&C||v)&&this.offsetElement(c+C,p+v)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null;const i={type:"resize"};this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchEvent(i)}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:n,movementY:r}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:s});this.offsetElement(t+n,i+r),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()}};h([f("popupService")],al.prototype,"popupService",2);h([f("resizeObserverService")],al.prototype,"resizeObserverService",2);h([f("dragService")],al.prototype,"dragService",2);var wh=class Ul extends te{constructor(t){super(),this.filterNameKey=t,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.buttonListeners=[]}postConstruct(){this.resetTemplate(),this.createManagedBean(new Un(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new al(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(t){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(t){let i=this.getGui();i&&i.removeEventListener("submit",this.onFormSubmit);const s=`
|
|
153
|
+
<form class="ag-filter-wrapper">
|
|
154
|
+
<div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" ref="eFilterBody">
|
|
155
|
+
${this.createBodyTemplate()}
|
|
156
|
+
</div>
|
|
157
|
+
</form>`;this.setTemplate(s,t),i=this.getGui(),i&&i.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.providedFilterParams.readOnly}init(t){this.setParams(t),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(t){this.providedFilterParams=t,this.applyActive=Ul.isUseApplyButton(t),this.resetButtonsPanel()}updateParams(t){this.providedFilterParams=t,this.applyActive=Ul.isUseApplyButton(t),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(){const{buttons:t}=this.providedFilterParams,i=t&&t.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(Xe(this.eButtonsPanel),this.buttonListeners.forEach(r=>r==null?void 0:r()),this.buttonListeners=[]):i&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!i){this.eButtonsPanel&&ts(this.eButtonsPanel);return}const s=document.createDocumentFragment(),n=r=>{let o,l;switch(r){case"apply":o=this.translate("applyFilter"),l=d=>this.onBtApply(!1,!1,d);break;case"clear":o=this.translate("clearFilter"),l=()=>this.onBtClear();break;case"reset":o=this.translate("resetFilter"),l=()=>this.onBtReset();break;case"cancel":o=this.translate("cancelFilter"),l=d=>{this.onBtCancel(d)};break;default:console.warn("AG Grid: Unknown button type specified");return}const u=ni(`<button
|
|
158
|
+
type="${r==="apply"?"submit":"button"}"
|
|
159
|
+
ref="${r}FilterButton"
|
|
160
|
+
class="ag-button ag-standard-button ag-filter-apply-panel-button"
|
|
161
|
+
>${o}
|
|
162
|
+
</button>`);this.buttonListeners.push(this.addManagedListener(u,"click",l)),s.append(u)};aC(t).forEach(r=>n(r)),this.eButtonsPanel.append(s),this.getGui().appendChild(this.eButtonsPanel)}getDefaultDebounceMs(){return 0}setupOnBtApplyDebounce(){const t=Ul.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),i=kt(this.checkApplyDebounce.bind(this),t);this.onBtApplyDebounce=()=>{this.debouncePending=!0,i()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel?this.appliedModel:null}setModel(t){return(t!=null?this.setModelIntoUi(t):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(t){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(t)})}handleCancelEnd(t){this.providedFilterParams.closeOnApply&&this.close(t)}resetUiToActiveModel(t,i){const s=()=>{this.onUiChanged(!1,"prevent"),i==null||i()};t!=null?this.setModelIntoUi(t).then(s):this.resetUiToDefaults().then(s)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(t="api"){const i=this.getModelFromUi();if(!this.isModelValid(i))return!1;const s=this.appliedModel;return this.appliedModel=i,!this.areModelsEqual(s,i)}isModelValid(t){return!0}onFormSubmit(t){t.preventDefault()}onBtApply(t=!1,i=!1,s){s&&s.preventDefault(),this.applyModel(i?"rowDataUpdated":"ui")&&this.providedFilterParams.filterChangedCallback({afterFloatingFilter:t,afterDataChange:i,source:"columnFilter"});const{closeOnApply:n}=this.providedFilterParams;n&&this.applyActive&&!t&&!i&&this.close(s)}onNewRowsLoaded(){}close(t){if(!this.hidePopup)return;const i=t,s=i&&i.key;let n;(s==="Enter"||s==="Space")&&(n={keyboardEvent:i}),this.hidePopup(n),this.hidePopup=null}onUiChanged(t=!1,i){if(this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const s=this.isModelValid(this.getModelFromUi()),n=this.getRefElement("applyFilterButton");n&&$o(n,!s)}t&&!i||i==="immediately"?this.onBtApply(t):(!this.applyActive&&!i||i==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(t){t&&(this.hidePopup=t.hidePopup),this.refreshFilterResizer(t==null?void 0:t.container)}refreshFilterResizer(t){if(!this.positionableFeature||t==="toolPanel")return;const i=t==="floatingFilter"||t==="columnFilter",{positionableFeature:s,gos:n}=this;i?(s.restoreLastSize(),s.setResizable(n.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)}static getDebounceMs(t,i){return Ul.isUseApplyButton(t)?(t.debounceMs!=null&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):t.debounceMs!=null?t.debounceMs:i}static isUseApplyButton(t){return!!t.buttons&&t.buttons.indexOf("apply")>=0}refresh(t){return this.providedFilterParams=t,!0}destroy(){const t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(t){return this.localeService.getLocaleTextFunc()(t,zT[t])}getCellValue(t){return this.providedFilterParams.getValue(t)}getPositionableElement(){return this.eFilterBody}};h([f("rowModel")],wh.prototype,"rowModel",2);h([_("eFilterBody")],wh.prototype,"eFilterBody",2);h([I],wh.prototype,"postConstruct",1);var yc=wh,dC=class extends te{constructor(e,t){super(t),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:n}=this.config;n!=null&&this.setDisabled(n),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),i!=null&&this.setLabelWidth(i),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()}refreshLabel(){Xe(this.eLabel),typeof this.label=="string"?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),this.label===""?(ue(this.eLabel,!1),Ue(this.eLabel,"presentation")):(ue(this.eLabel,!0),Ue(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:(Ba(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return $o(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}};h([I],dC.prototype,"postConstruct",1);var KT=class extends dC{constructor(e,t,i){super(e,t),this.className=i}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()}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId();sT(e)!==null?Uo(e,""):Uo(e,t??"")}setAriaLabel(e){return Di(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListener(this,g.EVENT_FIELD_VALUE_CHANGED,()=>e(this.getValue())),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Vi(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.dispatchEvent({type:g.EVENT_FIELD_VALUE_CHANGED}),this)}},DM=`
|
|
163
|
+
<div class="ag-picker-field" role="presentation">
|
|
164
|
+
<div ref="eLabel"></div>
|
|
165
|
+
<div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">
|
|
166
|
+
<div ref="eDisplayField" class="ag-picker-field-display"></div>
|
|
167
|
+
<div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
|
|
168
|
+
</div>
|
|
169
|
+
</div>`,Wr=class extends KT{constructor(e){if(super(e,(e==null?void 0:e.template)||DM,e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,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:n,maxPickerWidth:r}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!s,i!=null&&this.setPickerMaxHeight(i),n!=null&&this.setPickerMinWidth(n),r!=null&&this.setPickerMaxWidth(r)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedListener(t,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(this.eLabel,"mousedown",this.onLabelOrWrapperMouseDown.bind(this)),this.addManagedListener(this.eWrapper,"mousedown",this.onLabelOrWrapperMouseDown.bind(this));const{pickerIcon:i,inputWidth:s}=this.config;if(i){const n=Ve(i,this.gos);n&&this.eIcon.appendChild(n)}s!=null&&this.setInputWidth(s)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Us(e,!1),this.ariaRole&&Ue(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 D.UP:case D.DOWN:case D.ENTER:case D.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case D.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.gos.getDocument(),t=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||(this.destroyMouseWheelFunc=this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,()=>{this.hidePicker()}));const i=this.localeService.getLocaleTextFunc(),{pickerAriaLabelKey:s,pickerAriaLabelValue:n,modalPicker:r=!0}=this.config,o={modal:r,eChild:t,closeOnEsc:!0,closedCallback:()=>{const C=this.gos.getActiveDomElement(),v=!C||C===e.body;this.beforeHidePicker(),v&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:i(s,n)},l=this.popupService.addPopup(o),{maxPickerHeight:a,minPickerWidth:u,maxPickerWidth:d,variableWidth:c}=this;c?(u&&(t.style.minWidth=u),t.style.width=Ch(Ga(this.eWrapper)),d&&(t.style.maxWidth=d)):Ba(t,d??Ga(this.eWrapper));const p=a??`${Cu(this.popupService.getPopupParent())}px`;return t.style.setProperty("max-height",p),t.style.position="absolute",this.alignPickerToComponent(),l.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();Us(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 Ba(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()}};h([f("popupService")],Wr.prototype,"popupService",2);h([_("eLabel")],Wr.prototype,"eLabel",2);h([_("eWrapper")],Wr.prototype,"eWrapper",2);h([_("eDisplayField")],Wr.prototype,"eDisplayField",2);h([_("eIcon")],Wr.prototype,"eIcon",2);var Sh=class Ed extends te{constructor(t="default",i=!1){super(`<div class="ag-list ag-${t}-list" role="listbox"></div>`),this.cssIdentifier=t,this.unFocusable=i,this.options=[],this.itemEls=[]}init(){const t=this.getGui();this.addManagedListener(t,"mouseleave",()=>this.clearHighlighted()),!this.unFocusable&&this.addManagedListener(t,"keydown",this.handleKeyDown.bind(this))}handleKeyDown(t){const i=t.key;switch(i){case D.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const s=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(s)}break;case D.DOWN:case D.UP:t.preventDefault(),this.navigate(i);break;case D.PAGE_DOWN:case D.PAGE_UP:case D.PAGE_HOME:case D.PAGE_END:t.preventDefault(),this.navigateToPage(i);break}}navigate(t){const i=t===D.DOWN;let s;if(!this.highlightedEl)s=this.itemEls[i?0:this.itemEls.length-1];else{let r=this.itemEls.indexOf(this.highlightedEl)+(i?1:-1);r=Math.min(Math.max(r,0),this.itemEls.length-1),s=this.itemEls[r]}this.highlightItem(s)}navigateToPage(t){if(!this.highlightedEl||this.itemEls.length===0)return;const i=this.itemEls.indexOf(this.highlightedEl),s=this.options.length-1,n=this.itemEls[0].clientHeight,r=Math.floor(this.getGui().clientHeight/n);let o=-1;t===D.PAGE_HOME?o=0:t===D.PAGE_END?o=s:t===D.PAGE_DOWN?o=Math.min(i+r,s):t===D.PAGE_UP&&(o=Math.max(i-r,0)),o!==-1&&this.highlightItem(this.itemEls[o])}addOptions(t){return t.forEach(i=>this.addOption(i)),this}addOption(t){const{value:i,text:s}=t,n=s||i;return this.options.push({value:i,text:n}),this.renderOption(i,n),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(t=>{ts(t)}),this.itemEls=[]}updateIndices(){const t=this.getGui().querySelectorAll(".ag-list-item");t.forEach((i,s)=>{gh(i,s+1),ph(i,t.length)})}renderOption(t,i){const s=this.gos.getDocument(),n=s.createElement("div");Ue(n,"option"),n.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const r=s.createElement("span");n.appendChild(r),r.textContent=i,this.unFocusable||(n.tabIndex=-1),this.itemEls.push(n),this.addManagedListener(n,"mousemove",()=>this.highlightItem(n)),this.addManagedListener(n,"mousedown",o=>{o.preventDefault(),this.setValue(t)}),this.createManagedBean(new Xs({getTooltipValue:()=>i,getGui:()=>n,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>r.scrollWidth>r.clientWidth})),this.getGui().appendChild(n)}setValue(t,i){if(this.value===t)return this.fireItemSelected(),this;if(t==null)return this.reset(i),this;const s=this.options.findIndex(n=>n.value===t);if(s!==-1){const n=this.options[s];this.value=n.value,this.displayValue=n.text,this.highlightItem(this.itemEls[s]),i||this.fireChangeEvent()}return this}setValueByIndex(t){return this.setValue(this.options[t].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const t=this.options.findIndex(i=>i.value===this.value);t!==-1&&this.highlightItem(this.itemEls[t])}reset(t){this.value=null,this.displayValue=null,this.clearHighlighted(),t||this.fireChangeEvent()}highlightItem(t){if(!di(t))return;this.clearHighlighted(),this.highlightedEl=t,this.highlightedEl.classList.add(Ed.ACTIVE_CLASS),zo(this.highlightedEl,!0);const i=this.getGui(),{scrollTop:s,clientHeight:n}=i,{offsetTop:r,offsetHeight:o}=t;(r+o>s+n||r<s)&&this.highlightedEl.scrollIntoView({block:"nearest"}),this.unFocusable||this.highlightedEl.focus()}clearHighlighted(){!this.highlightedEl||!di(this.highlightedEl)||(this.highlightedEl.classList.remove(Ed.ACTIVE_CLASS),zo(this.highlightedEl,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchEvent({type:g.EVENT_FIELD_VALUE_CHANGED}),this.fireItemSelected()}fireItemSelected(){this.dispatchEvent({type:Ed.EVENT_ITEM_SELECTED})}};Sh.EVENT_ITEM_SELECTED="selectedItem";Sh.ACTIVE_CLASS="ag-active-item";h([I],Sh.prototype,"init",1);var Py=Sh,YT=class QT extends Wr{constructor(t){super(K({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox"},t))}postConstruct(){super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:t,value:i,placeholder:s}=this.config;t!=null&&this.addOptions(t),i!=null&&this.setValue(i,!0),s&&i==null&&(this.eDisplayField.textContent=s),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}onWrapperFocusOut(t){this.eWrapper.contains(t.relatedTarget)||this.hidePicker()}createListComponent(){this.listComponent=this.createBean(new Py("select",!0)),this.listComponent.setParentComponent(this);const t=this.listComponent.getAriaElement(),i=`ag-select-list-${this.listComponent.getCompId()}`;t.setAttribute("id",i),zm(this.getAriaElement(),t),this.listComponent.addManagedListener(this.listComponent,Py.EVENT_ITEM_SELECTED,()=>{this.hidePicker(),this.dispatchEvent({type:QT.EVENT_ITEM_SELECTED})}),this.listComponent.addManagedListener(this.listComponent,g.EVENT_FIELD_VALUE_CHANGED,()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())})}createPickerComponent(){return this.listComponent}onKeyDown(t){var i;const{key:s}=t;switch(s===D.TAB&&this.hidePicker(),s){case D.ENTER:case D.UP:case D.DOWN:case D.PAGE_UP:case D.PAGE_DOWN:case D.PAGE_HOME:case D.PAGE_END:t.preventDefault(),this.isPickerDisplayed?(i=this.listComponent)==null||i.handleKeyDown(t):super.onKeyDown(t);break;case D.ESCAPE:super.onKeyDown(t);break}}showPicker(){this.listComponent&&(super.showPicker(),this.listComponent.refreshHighlighted())}addOptions(t){return t.forEach(i=>this.addOption(i)),this}addOption(t){return this.listComponent.addOption(t),this}clearOptions(){var t;return(t=this.listComponent)==null||t.clearOptions(),this}setValue(t,i,s){if(this.value===t||!this.listComponent)return this;if(s||this.listComponent.setValue(t,!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(t,i)}destroy(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),super.destroy()}};YT.EVENT_ITEM_SELECTED="selectedItem";var Eh=YT,is=class extends KT{constructor(e,t,i="text",s="input"){super(e,`
|
|
170
|
+
<div role="presentation">
|
|
171
|
+
<div ref="eLabel" class="ag-input-field-label"></div>
|
|
172
|
+
<div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
|
|
173
|
+
<${s} ref="eInput" class="ag-input-field-input"></${s}>
|
|
174
|
+
</div>
|
|
175
|
+
</div>`,t),this.inputType=i,this.displayFieldTag=s}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.addManagedListener(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 Ba(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 Rs(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Di(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return $o(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Rs(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Rs(this.eInput,"autocomplete",t)}return this}};h([_("eLabel")],is.prototype,"eLabel",2);h([_("eWrapper")],is.prototype,"eWrapper",2);h([_("eInput")],is.prototype,"eInput",2);var Rh=class extends is{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.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(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.dispatchEvent({type:g.EVENT_FIELD_VALUE_CHANGED,selected:e,previousValue:t,event:i});const s=this.getInputElement(),n={type:g.EVENT_CHECKBOX_CHANGED,id:s.id,name:s.name,selected:e,previousValue:t};this.eventService.dispatchEvent(n)}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)}},qT=class extends Rh{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.addManagedListener(this.eventService,g.EVENT_CHECKBOX_CHANGED,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)}},cC=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;let{conditions:n}=s;if(!n){const{condition1:l,condition2:a}=s;n=[l,a]}const r=n.map(l=>this.getModelAsString(l)),o=s.operator==="AND"?"andCondition":"orCondition";return r.join(` ${i(o,zT[o])} `)}else{if(e.type===Be.BLANK||e.type===Be.NOT_BLANK)return i(e.type,e.type);{const s=e,n=this.optionsFactory.getCustomOption(s.type),{displayKey:r,displayName:o,numberOfInputs:l}=n||{};return r&&o&&l===0?(i(r,o),o):this.conditionToString(s,n)}}}updateParams(e){this.optionsFactory=e.optionsFactory}formatValue(e){var t;return this.valueFormatter?(t=this.valueFormatter(e??null))!=null?t:"":String(e)}},jt=class io extends yc{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(t){const i=this.optionsFactory.getCustomOption(t);if(i){const{numberOfInputs:n}=i;return n??1}const s=[io.EMPTY,io.NOT_BLANK,io.BLANK];return t&&s.indexOf(t)>=0?0:t===io.IN_RANGE?2:1}onFloatingFilterChanged(t,i){this.setTypeFromFloatingFilter(t),this.setValueFromFloatingFilter(i),this.onUiChanged(!0)}setTypeFromFloatingFilter(t){this.eTypes.forEach((i,s)=>{s===0?i.setValue(t,!0):i.setValue(this.optionsFactory.getDefaultOption(),!0)})}getModelFromUi(){const t=this.getUiCompleteConditions();return t.length===0?null:this.maxNumConditions>1&&t.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:t[0],condition2:t[1],conditions:t}:t[0]}getConditionTypes(){return this.eTypes.map(t=>t.getValue())}getConditionType(t){return this.eTypes[t].getValue()}getJoinOperator(){return this.eJoinOperatorsOr.length===0?this.defaultJoinOperator:this.eJoinOperatorsOr[0].getValue()===!0?"OR":"AND"}areModelsEqual(t,i){if(!t&&!i)return!0;if(!t&&i||t&&!i)return!1;const s=!t.operator,n=!i.operator;if(!s&&n||s&&!n)return!1;let o;if(s){const l=t,a=i;o=this.areSimpleModelsEqual(l,a)}else{const l=t,a=i;o=l.operator===a.operator&&ys(l.conditions,a.conditions,(u,d)=>this.areSimpleModelsEqual(u,d))}return o}shouldRefresh(t){var i,s,n;const r=this.getModel(),o=r?(i=r.conditions)!=null?i:[r]:null,l=(n=(s=t.filterOptions)==null?void 0:s.map(u=>typeof u=="string"?u:u.displayKey))!=null?n:this.getDefaultFilterOptions();return!(!(!o||o.every(u=>l.find(d=>d===u.type)!==void 0))||typeof t.maxNumConditions=="number"&&o&&o.length>t.maxNumConditions)}refresh(t){return!this.shouldRefresh(t)||!super.refresh(t)?!1:(this.setParams(t),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0)}setModelIntoUi(t){if(t.operator){let s=t;s.conditions||(s.conditions=[s.condition1,s.condition2]);const n=this.validateAndUpdateConditions(s.conditions),r=this.getNumConditions();if(n<r)this.removeConditionsAndOperators(n);else if(n>r)for(let l=r;l<n;l++)this.createJoinOperatorPanel(),this.createOption();const o=s.operator==="OR";this.eJoinOperatorsAnd.forEach(l=>l.setValue(!o,!0)),this.eJoinOperatorsOr.forEach(l=>l.setValue(o,!0)),s.conditions.forEach((l,a)=>{this.eTypes[a].setValue(l.type,!0),this.setConditionIntoUi(l,a)})}else{const s=t;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(s.type,!0),this.setConditionIntoUi(s,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),it.resolve()}validateAndUpdateConditions(t){let i=t.length;return i>this.maxNumConditions&&(t.splice(this.maxNumConditions),Y('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),i=this.maxNumConditions),i}doesFilterPass(t){var i;const s=this.getModel();if(s==null)return!0;const{operator:n}=s,r=[];if(n){const l=s;r.push(...(i=l.conditions)!=null?i:[])}else r.push(s);return r[n&&n==="OR"?"some":"every"](l=>this.individualConditionPasses(t,l))}setParams(t){super.setParams(t),this.setNumConditions(t),this.defaultJoinOperator=this.getDefaultJoinOperator(t.defaultJoinOperator),this.filterPlaceholder=t.filterPlaceholder,this.optionsFactory=new UT,this.optionsFactory.init(t,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}setNumConditions(t){var i,s;t.suppressAndOrCondition!=null&&Y('Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.'),t.alwaysShowBothConditions!=null&&Y('Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.'),this.maxNumConditions=(i=t.maxNumConditions)!=null?i:t.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(Y('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=(s=t.numAlwaysVisibleConditions)!=null?s:t.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(Y('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(Y('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)}createOption(){const t=this.createManagedBean(new Eh);this.eTypes.push(t),t.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(t.getGui());const i=this.createValueElement();this.eConditionBodies.push(i),this.eFilterBody.appendChild(i),this.putOptionsIntoDropdown(t),this.resetType(t);const s=this.getNumConditions()-1;this.forEachPositionInput(s,n=>this.resetInput(n)),this.addChangedListeners(t,s)}createJoinOperatorPanel(){const t=document.createElement("div");this.eJoinOperatorPanels.push(t),t.classList.add("ag-filter-condition");const i=this.createJoinOperator(this.eJoinOperatorsAnd,t,"and"),s=this.createJoinOperator(this.eJoinOperatorsOr,t,"or");this.eFilterBody.appendChild(t);const n=this.eJoinOperatorPanels.length-1,r=this.joinOperatorId++;this.resetJoinOperatorAnd(i,n,r),this.resetJoinOperatorOr(s,n,r),this.isReadOnly()||(i.onValueChange(this.listener),s.onValueChange(this.listener))}createJoinOperator(t,i,s){const n=this.createManagedBean(new qT);return t.push(n),n.addCssClass("ag-filter-condition-operator"),n.addCssClass(`ag-filter-condition-operator-${s}`),i.appendChild(n.getGui()),n}getDefaultJoinOperator(t){return t==="AND"||t==="OR"?t:"AND"}createFilterListOptions(){const t=this.optionsFactory.getFilterOptions();this.filterListOptions=t.map(i=>typeof i=="string"?this.createBoilerplateListOption(i):this.createCustomListOption(i))}putOptionsIntoDropdown(t){this.filterListOptions.forEach(i=>{t.addOption(i)}),t.setDisabled(this.filterListOptions.length<=1)}createBoilerplateListOption(t){return{value:t,text:this.translate(t)}}createCustomListOption(t){const{displayKey:i}=t,s=this.optionsFactory.getCustomOption(t.displayKey);return{value:i,text:s?this.localeService.getLocaleTextFunc()(s.displayKey,s.displayName):this.translate(i)}}isAllowTwoConditions(){return this.maxNumConditions>=2}createBodyTemplate(){return""}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){const t=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,t)}updateNumConditions(){var t;let i=-1,s=!0;for(let n=0;n<this.getNumConditions();n++)this.isConditionUiComplete(n)?i=n:s=!1;if(this.shouldAddNewConditionAtEnd(s))this.createJoinOperatorPanel(),this.createOption();else{const n=(t=this.lastUiCompletePosition)!=null?t:this.getNumConditions()-2;if(i<n){this.removeConditionsAndOperators(n+1);const r=i+1,o=n-r;o>0&&this.removeConditionsAndOperators(r,o),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=i}updateConditionStatusesAndValues(t,i){this.eTypes.forEach((n,r)=>{const o=this.isConditionDisabled(r,t);n.setDisabled(o||this.filterListOptions.length<=1),r===1&&($o(this.eJoinOperatorPanels[0],o),this.eJoinOperatorsAnd[0].setDisabled(o),this.eJoinOperatorsOr[0].setDisabled(o))}),this.eConditionBodies.forEach((n,r)=>{ue(n,this.isConditionBodyVisible(r))});const s=(i??this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach((n,r)=>{n.setValue(!s,!0)}),this.eJoinOperatorsOr.forEach((n,r)=>{n.setValue(s,!0)}),this.forEachInput((n,r,o,l)=>{this.setElementDisplayed(n,r<l),this.setElementDisabled(n,this.isConditionDisabled(o,t))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(t){return t&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(t,i){if(t>=this.getNumConditions())return;this.removeComponents(this.eTypes,t,i),this.removeElements(this.eConditionBodies,t,i),this.removeValueElements(t,i);const s=Math.max(t-1,0);this.removeElements(this.eJoinOperatorPanels,s,i),this.removeComponents(this.eJoinOperatorsAnd,s,i),this.removeComponents(this.eJoinOperatorsOr,s,i)}removeElements(t,i,s){this.removeItems(t,i,s).forEach(r=>ts(r))}removeComponents(t,i,s){this.removeItems(t,i,s).forEach(r=>{ts(r.getGui()),this.destroyBean(r)})}removeItems(t,i,s){return s==null?t.splice(i):t.splice(i,s)}afterGuiAttached(t){if(super.afterGuiAttached(t),this.resetPlaceholder(),!(t!=null&&t.suppressFocus))if(this.isReadOnly())this.eFilterBody.focus();else{const i=this.getInputs(0)[0];if(!i)return;i instanceof is&&i.getInputElement().focus()}}afterGuiDetached(){super.afterGuiDetached();const t=this.getModel();this.resetUiToActiveModel(t);let i=-1,s=-1,n=!1;const r=this.getJoinOperator();for(let l=this.getNumConditions()-1;l>=0;l--)if(this.isConditionUiComplete(l))i===-1&&(i=l,s=l);else{const a=l>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(l-1),u=l<i;(a||u)&&(this.removeConditionsAndOperators(l,1),n=!0,u&&s--)}let o=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),o=!0),this.shouldAddNewConditionAtEnd(s===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),o=!0),o&&this.updateConditionStatusesAndValues(s,r),n&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=s}getPlaceholderText(t,i){let s=this.translate(t);if(uh(this.filterPlaceholder)){const n=this.filterPlaceholder,r=this.eTypes[i].getValue(),o=this.translate(r);s=n({filterOptionKey:r,filterOption:o,placeholder:s})}else typeof this.filterPlaceholder=="string"&&(s=this.filterPlaceholder);return s}resetPlaceholder(){const t=this.localeService.getLocaleTextFunc();this.forEachInput((i,s,n,r)=>{if(!(i instanceof is))return;const o=s===0&&r>1?"inRangeStart":s===0?"filterOoo":"inRangeEnd",l=s===0&&r>1?t("ariaFilterFromValue","Filter from value"):s===0?t("ariaFilterValue","Filter Value"):t("ariaFilterToValue","Filter to Value");i.setInputPlaceholder(this.getPlaceholderText(o,n)),i.setInputAriaLabel(l)})}setElementValue(t,i,s){t instanceof is&&t.setValue(i!=null?String(i):null,!0)}setElementDisplayed(t,i){t instanceof te&&ue(t.getGui(),i)}setElementDisabled(t,i){t instanceof te&&$o(t.getGui(),i)}attachElementOnChange(t,i){t instanceof is&&t.onValueChange(i)}forEachInput(t){this.getConditionTypes().forEach((i,s)=>{this.forEachPositionTypeInput(s,i,t)})}forEachPositionInput(t,i){const s=this.getConditionType(t);this.forEachPositionTypeInput(t,s,i)}forEachPositionTypeInput(t,i,s){const n=this.getNumberOfInputs(i),r=this.getInputs(t);for(let o=0;o<r.length;o++){const l=r[o];l!=null&&s(l,o,t,n)}}isConditionDisabled(t,i){return this.isReadOnly()?!0:t===0?!1:t>i+1}isConditionBodyVisible(t){const i=this.getConditionType(t);return this.getNumberOfInputs(i)>0}isConditionUiComplete(t){return!(t>=this.getNumConditions()||this.getConditionType(t)===io.EMPTY||this.getValues(t).some(s=>s==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const t=[];for(let i=0;i<this.getNumConditions();i++)this.isConditionUiComplete(i)&&t.push(this.createCondition(i));return t}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let t=this.getNumConditions();t<this.numAlwaysVisibleConditions;t++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(t){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(i=>this.resetType(i)),this.eJoinOperatorsAnd.forEach((i,s)=>this.resetJoinOperatorAnd(i,s,this.joinOperatorId+s)),this.eJoinOperatorsOr.forEach((i,s)=>this.resetJoinOperatorOr(i,s,this.joinOperatorId+s)),this.joinOperatorId++,this.forEachInput(i=>this.resetInput(i)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,t||this.onUiChanged(),it.resolve()}resetType(t){const s=this.localeService.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");t.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(s).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(t,i,s){this.resetJoinOperator(t,i,this.isDefaultOperator("AND"),this.translate("andCondition"),s)}resetJoinOperatorOr(t,i,s){this.resetJoinOperator(t,i,this.isDefaultOperator("OR"),this.translate("orCondition"),s)}resetJoinOperator(t,i,s,n,r){this.updateJoinOperatorDisabled(t.setValue(s,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${r}`).setLabel(n),i)}updateJoinOperatorsDisabled(){this.eJoinOperatorsAnd.forEach((t,i)=>this.updateJoinOperatorDisabled(t,i)),this.eJoinOperatorsOr.forEach((t,i)=>this.updateJoinOperatorDisabled(t,i))}updateJoinOperatorDisabled(t,i){t.setDisabled(this.isReadOnly()||i>0)}resetInput(t){this.setElementValue(t,null),this.setElementDisabled(t,this.isReadOnly())}setConditionIntoUi(t,i){const s=this.mapValuesFromModel(t);this.forEachInput((n,r,o,l)=>{o===i&&this.setElementValue(n,s[r]!=null?s[r]:null)})}setValueFromFloatingFilter(t){this.forEachInput((i,s,n,r)=>{this.setElementValue(i,s===0&&n===0?t:null,!0)})}isDefaultOperator(t){return t===this.defaultJoinOperator}addChangedListeners(t,i){this.isReadOnly()||(t.onValueChange(this.listener),this.forEachPositionInput(i,s=>{this.attachElementOnChange(s,this.listener)}))}individualConditionPasses(t,i){const s=this.getCellValue(t.node),n=this.mapValuesFromModel(i),r=this.optionsFactory.getCustomOption(i.type),o=this.evaluateCustomFilter(r,n,s);return o??(s==null?this.evaluateNullValue(i.type):this.evaluateNonNullValue(n,s,i,t))}evaluateCustomFilter(t,i,s){if(t==null)return;const{predicate:n}=t;if(n!=null&&!i.some(r=>r==null))return n(i,s)}isBlank(t){return t==null||typeof t=="string"&&t.trim().length===0}hasInvalidInputs(){return!1}};jt.EMPTY="empty";jt.BLANK="blank";jt.NOT_BLANK="notBlank";jt.EQUALS="equals";jt.NOT_EQUAL="notEqual";jt.LESS_THAN="lessThan";jt.LESS_THAN_OR_EQUAL="lessThanOrEqual";jt.GREATER_THAN="greaterThan";jt.GREATER_THAN_OR_EQUAL="greaterThanOrEqual";jt.IN_RANGE="inRange";jt.CONTAINS="contains";jt.NOT_CONTAINS="notContains";jt.STARTS_WITH="startsWith";jt.ENDS_WITH="endsWith";var Be=jt,rt=class dt extends Be{setParams(t){super.setParams(t),this.scalarFilterParams=t}evaluateNullValue(t){switch(t){case dt.EQUALS:case dt.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case dt.GREATER_THAN:case dt.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case dt.LESS_THAN:case dt.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case dt.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case dt.BLANK:return!0;case dt.NOT_BLANK:return!1}return!1}evaluateNonNullValue(t,i,s){const n=this.comparator(),r=t[0]!=null?n(t[0],i):0;switch(s.type){case dt.EQUALS:return r===0;case dt.NOT_EQUAL:return r!==0;case dt.GREATER_THAN:return r>0;case dt.GREATER_THAN_OR_EQUAL:return r>=0;case dt.LESS_THAN:return r<0;case dt.LESS_THAN_OR_EQUAL:return r<=0;case dt.IN_RANGE:{const o=n(t[1],i);return this.scalarFilterParams.inRangeInclusive?r>=0&&o<=0:r>0&&o<0}case dt.BLANK:return this.isBlank(i);case dt.NOT_BLANK:return!this.isBlank(i);default:return console.warn('AG Grid: Unexpected type of filter "'+s.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}}},by=1e3,Fy=1/0,XT=class extends cC{constructor(e,t,i){super(t,i),this.dateFilterParams=e}conditionToString(e,t){const{type:i}=e,{numberOfInputs:s}=t||{},n=i==Be.IN_RANGE||s===2,r=si(e.dateFrom),o=si(e.dateTo),l=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(n){const a=r!==null?Lo(r,l):"null",u=o!==null?Lo(o,l):"null";return`${a}-${u}`}return r!=null?Lo(r,l):`${i}`}updateParams(e){super.updateParams(e),this.dateFilterParams=e.dateFilterParams}},hC=class ZT extends rt{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=by,this.maxValidYear=Fy,this.minValidDate=null,this.maxValidDate=null}afterGuiAttached(t){super.afterGuiAttached(t),this.dateConditionFromComps[0].afterGuiAttached(t)}mapValuesFromModel(t){const{dateFrom:i,dateTo:s,type:n}=t||{};return[i&&si(i)||null,s&&si(s)||null].slice(0,this.getNumberOfInputs(n))}comparator(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)}defaultComparator(t,i){const s=i;return i==null||s<t?-1:s>t?1:0}setParams(t){this.dateFilterParams=t,super.setParams(t);const i=(s,n)=>{if(t[s]!=null)if(isNaN(t[s]))console.warn(`AG Grid: DateFilter ${s} is not a number`);else return t[s]==null?n:Number(t[s]);return n};this.minValidYear=i("minValidYear",by),this.maxValidYear=i("maxValidYear",Fy),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),t.minValidDate?this.minValidDate=t.minValidDate instanceof Date?t.minValidDate:si(t.minValidDate):this.minValidDate=null,t.maxValidDate?this.maxValidDate=t.maxValidDate instanceof Date?t.maxValidDate:si(t.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&console.warn("AG Grid: DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new XT(this.dateFilterParams,this.localeService,this.optionsFactory)}createDateCompWrapper(t){const i=new WT(this.getContext(),this.userComponentFactory,{onDateChanged:()=>this.onUiChanged(),filterParams:this.dateFilterParams},t);return this.addDestroyFunc(()=>i.destroy()),i}setElementValue(t,i){t.setDate(i)}setElementDisplayed(t,i){t.setDisplayed(i)}setElementDisabled(t,i){t.setDisabled(i)}getDefaultFilterOptions(){return ZT.DEFAULT_FILTER_OPTIONS}createValueElement(){const i=this.gos.getDocument().createElement("div");return i.classList.add("ag-filter-body"),this.createFromToElement(i,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(i,this.eConditionPanelsTo,this.dateConditionToComps,"to"),i}createFromToElement(t,i,s,n){const o=this.gos.getDocument().createElement("div");o.classList.add(`ag-filter-${n}`),o.classList.add(`ag-filter-date-${n}`),i.push(o),t.appendChild(o),s.push(this.createDateCompWrapper(o))}removeValueElements(t,i){this.removeDateComps(this.dateConditionFromComps,t,i),this.removeDateComps(this.dateConditionToComps,t,i),this.removeItems(this.eConditionPanelsFrom,t,i),this.removeItems(this.eConditionPanelsTo,t,i)}removeDateComps(t,i,s){this.removeItems(t,i,s).forEach(r=>r.destroy())}isValidDateValue(t){if(t===null)return!1;if(this.minValidDate){if(t<this.minValidDate)return!1}else if(t.getUTCFullYear()<this.minValidYear)return!1;if(this.maxValidDate){if(t>this.maxValidDate)return!1}else if(t.getUTCFullYear()>this.maxValidYear)return!1;return!0}isConditionUiComplete(t){if(!super.isConditionUiComplete(t))return!1;let i=!0;return this.forEachInput((s,n,r,o)=>{r!==t||!i||n>=o||(i=i&&this.isValidDateValue(s.getDate()))}),i}areSimpleModelsEqual(t,i){return t.dateFrom===i.dateFrom&&t.dateTo===i.dateTo&&t.type===i.type}getFilterType(){return"date"}createCondition(t){const i=this.getConditionType(t),s={},n=this.getValues(t);return n.length>0&&(s.dateFrom=ki(n[0])),n.length>1&&(s.dateTo=ki(n[1])),K({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:i},s)}resetPlaceholder(){const t=this.localeService.getLocaleTextFunc(),i=this.translate("dateFormatOoo"),s=t("ariaFilterValue","Filter Value");this.forEachInput(n=>{n.setInputPlaceholder(i),n.setInputAriaLabel(s)})}getInputs(t){return t>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[t],this.dateConditionToComps[t]]}getValues(t){const i=[];return this.forEachPositionInput(t,(s,n,r,o)=>{n<o&&i.push(s.getDate())}),i}translate(t){return t===rt.LESS_THAN?super.translate("before"):t===rt.GREATER_THAN?super.translate("after"):super.translate(t)}getModelAsString(t){var i;return(i=this.filterModelFormatter.getModelAsString(t))!=null?i:""}};hC.DEFAULT_FILTER_OPTIONS=[rt.EQUALS,rt.NOT_EQUAL,rt.LESS_THAN,rt.GREATER_THAN,rt.IN_RANGE,rt.BLANK,rt.NOT_BLANK];h([f("userComponentFactory")],hC.prototype,"userComponentFactory",2);var JT=hC,pC=class extends te{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 UT,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=[Be.IN_RANGE,Be.EMPTY,Be.BLANK,Be.NOT_BLANK];return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){const t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();return`${t} ${i("ariaFilterInput","Filter Input")}`}};h([f("columnModel")],pC.prototype,"columnModel",2);var Th=class extends pC{constructor(){super(`
|
|
176
|
+
<div class="ag-floating-filter-input" role="presentation">
|
|
177
|
+
<ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>
|
|
178
|
+
<div ref="eDateWrapper" style="display: flex;"></div>
|
|
179
|
+
</div>`)}getDefaultFilterOptions(){return JT.DEFAULT_FILTER_OPTIONS}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new XT(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(si(i.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){ue(this.eDateWrapper,e),ue(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=ki(e);this.params.parentFilterInstance(i=>{if(i){const s=si(t);i.onFloatingFilterChanged(this.getLastType()||null,s)}})}getDateComponentParams(){const e=yc.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:kt(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}}createDateComponent(){this.dateComp=new WT(this.getContext(),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}};h([f("userComponentFactory")],Th.prototype,"userComponentFactory",2);h([_("eReadOnlyText")],Th.prototype,"eReadOnlyText",2);h([_("eDateWrapper")],Th.prototype,"eDateWrapper",2);var eD=class extends te{constructor(){super(`
|
|
180
|
+
<div class="ag-filter-filter">
|
|
181
|
+
<ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>
|
|
182
|
+
</div>`)}destroy(){super.destroy()}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListener(t,"mousedown",()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus()}),this.addManagedListener(t,"input",i=>{i.target===this.gos.getActiveDomElement()&&(this.eDateInput.isDisabled()||this.params.onDateChanged())})}setParams(e){const t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&Ts(),t.type=i?"date":"text";const{minValidYear:s,maxValidYear:n,minValidDate:r,maxValidDate:o}=e.filterParams||{};if(r&&s&&Y("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),o&&n&&Y("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),r&&o){const[l,a]=[r,o].map(u=>u instanceof Date?u:si(u));l&&a&&l.getTime()>a.getTime()&&Y("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}r?r instanceof Date?t.min=Lo(r):t.min=r:s&&(t.min=`${s}-01-01`),o?o instanceof Date?t.max=Lo(o):t.max=o:n&&(t.max=`${n}-12-31`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}getDate(){return si(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(ki(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:mh()||jm()||Ts()&&$m()>=14.1}};h([_("eDateInput")],eD.prototype,"eDateInput",2);var Ur=class extends is{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=A(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=i=>{vh(i)&&i.key&&!e.test(i.key)&&i.preventDefault()};this.addManagedListener(this.eInput,"keydown",t),this.addManagedListener(this.eInput,"paste",i=>{var s;const n=(s=i.clipboardData)==null?void 0:s.getData("text");n&&n.split("").some(r=>!e.test(r))&&i.preventDefault()})}},gC=class extends Ur{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"blur",()=>{const n=parseFloat(this.eInput.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)}),this.addManagedListener(this.eInput,"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){this.gos.getActiveDomElement()===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,Rs(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Rs(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Rs(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(A(i)){let s=this.isScientificNotation(i);if(s&&this.eInput.validity.valid)return e(i);if(!s){i=this.adjustPrecision(i);const n=this.normalizeValue(i);s=i!=n}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")}},tD=class extends cC{conditionToString(e,t){const{numberOfInputs:i}=t||{};return e.type==Be.IN_RANGE||i===2?`${this.formatValue(e.filter)}-${this.formatValue(e.filterTo)}`:e.filter!=null?this.formatValue(e.filter):`${e.type}`}};function uf(e){const{allowedCharPattern:t}=e??{};return t??null}var iD=class sD extends rt{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[]}refresh(t){return this.numberFilterParams.allowedCharPattern!==t.allowedCharPattern?!1:super.refresh(t)}mapValuesFromModel(t){const{filter:i,filterTo:s,type:n}=t||{};return[this.processValue(i),this.processValue(s)].slice(0,this.getNumberOfInputs(n))}getDefaultDebounceMs(){return 500}comparator(){return(t,i)=>t===i?0:t<i?1:-1}setParams(t){this.numberFilterParams=t,super.setParams(t),this.filterModelFormatter=new tD(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)}getDefaultFilterOptions(){return sD.DEFAULT_FILTER_OPTIONS}setElementValue(t,i,s){const n=!s&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(i??null):i;super.setElementValue(t,n)}createValueElement(){const t=uf(this.numberFilterParams),i=document.createElement("div");return i.classList.add("ag-filter-body"),Ue(i,"presentation"),this.createFromToElement(i,this.eValuesFrom,"from",t),this.createFromToElement(i,this.eValuesTo,"to",t),i}createFromToElement(t,i,s,n){const r=this.createManagedBean(n?new Ur({allowedCharPattern:n}):new gC);r.addCssClass(`ag-filter-${s}`),r.addCssClass("ag-filter-filter"),i.push(r),t.appendChild(r.getGui())}removeValueElements(t,i){this.removeComponents(this.eValuesFrom,t,i),this.removeComponents(this.eValuesTo,t,i)}getValues(t){const i=[];return this.forEachPositionInput(t,(s,n,r,o)=>{n<o&&i.push(this.processValue(this.stringToFloat(s.getValue())))}),i}areSimpleModelsEqual(t,i){return t.filter===i.filter&&t.filterTo===i.filterTo&&t.type===i.type}getFilterType(){return"number"}processValue(t){return t==null||isNaN(t)?null:t}stringToFloat(t){if(typeof t=="number")return t;let i=Es(t);return i!=null&&i.trim()===""&&(i=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(i):i==null||i.trim()==="-"?null:parseFloat(i)}createCondition(t){const i=this.getConditionType(t),s={filterType:this.getFilterType(),type:i},n=this.getValues(t);return n.length>0&&(s.filter=n[0]),n.length>1&&(s.filterTo=n[1]),s}getInputs(t){return t>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[t],this.eValuesTo[t]]}getModelAsString(t){var i;return(i=this.filterModelFormatter.getModelAsString(t))!=null?i:""}hasInvalidInputs(){let t=!1;return this.forEachInput(i=>{if(!i.getInputElement().validity.valid){t=!0;return}}),t}};iD.DEFAULT_FILTER_OPTIONS=[rt.EQUALS,rt.NOT_EQUAL,rt.GREATER_THAN,rt.GREATER_THAN_OR_EQUAL,rt.LESS_THAN,rt.LESS_THAN_OR_EQUAL,rt.IN_RANGE,rt.BLANK,rt.NOT_BLANK];var nD=iD,rD=class extends cC{conditionToString(e,t){const{numberOfInputs:i}=t||{};return e.type==Be.IN_RANGE||i===2?`${e.filter}-${e.filterTo}`:e.filter!=null?`${e.filter}`:`${e.type}`}},Xi=class so extends Be{constructor(){super("textFilter"),this.eValuesFrom=[],this.eValuesTo=[]}static trimInput(t){const i=t&&t.trim();return i===""?t:i}getDefaultDebounceMs(){return 500}setParams(t){this.textFilterParams=t,super.setParams(t),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?so.DEFAULT_FORMATTER:so.DEFAULT_LOWERCASE_FORMATTER),this.filterModelFormatter=new rD(this.localeService,this.optionsFactory)}getTextMatcher(){const t=this.textFilterParams.textCustomComparator;return t?(Z.warnOnce("textCustomComparator is deprecated, use textMatcher instead."),({filterOption:i,value:s,filterText:n})=>t(i,s,n)):this.textFilterParams.textMatcher||so.DEFAULT_MATCHER}createCondition(t){const i=this.getConditionType(t),s={filterType:this.getFilterType(),type:i},n=this.getValuesWithSideEffects(t,!0);return n.length>0&&(s.filter=n[0]),n.length>1&&(s.filterTo=n[1]),s}getFilterType(){return"text"}areSimpleModelsEqual(t,i){return t.filter===i.filter&&t.filterTo===i.filterTo&&t.type===i.type}getInputs(t){return t>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[t],this.eValuesTo[t]]}getValues(t){return this.getValuesWithSideEffects(t,!1)}getValuesWithSideEffects(t,i){const s=[];return this.forEachPositionInput(t,(n,r,o,l)=>{var a;if(r<l){let u=Es(n.getValue());i&&this.textFilterParams.trimInput&&(u=(a=so.trimInput(u))!=null?a:null,n.setValue(u,!0)),s.push(u)}}),s}getDefaultFilterOptions(){return so.DEFAULT_FILTER_OPTIONS}createValueElement(){const t=document.createElement("div");return t.classList.add("ag-filter-body"),Ue(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from"),this.createFromToElement(t,this.eValuesTo,"to"),t}createFromToElement(t,i,s){const n=this.createManagedBean(new Ur);n.addCssClass(`ag-filter-${s}`),n.addCssClass("ag-filter-filter"),i.push(n),t.appendChild(n.getGui())}removeValueElements(t,i){this.removeComponents(this.eValuesFrom,t,i),this.removeComponents(this.eValuesTo,t,i)}mapValuesFromModel(t){const{filter:i,filterTo:s,type:n}=t||{};return[i||null,s||null].slice(0,this.getNumberOfInputs(n))}evaluateNullValue(t){const i=[Be.NOT_EQUAL,Be.NOT_CONTAINS,Be.BLANK];return t?i.indexOf(t)>=0:!1}evaluateNonNullValue(t,i,s,n){const r=t.map(v=>this.formatter(v))||[],o=this.formatter(i),{api:l,colDef:a,column:u,columnApi:d,context:c,textFormatter:p}=this.textFilterParams;if(s.type===Be.BLANK)return this.isBlank(i);if(s.type===Be.NOT_BLANK)return!this.isBlank(i);const C={api:l,colDef:a,column:u,columnApi:d,context:c,node:n.node,data:n.data,filterOption:s.type,value:o,textFormatter:p};return r.some(v=>this.matcher(Ie(K({},C),{filterText:v})))}getModelAsString(t){var i;return(i=this.filterModelFormatter.getModelAsString(t))!=null?i:""}};Xi.DEFAULT_FILTER_OPTIONS=[Be.CONTAINS,Be.NOT_CONTAINS,Be.EQUALS,Be.NOT_EQUAL,Be.STARTS_WITH,Be.ENDS_WITH,Be.BLANK,Be.NOT_BLANK];Xi.DEFAULT_FORMATTER=e=>e;Xi.DEFAULT_LOWERCASE_FORMATTER=e=>e==null?null:e.toString().toLowerCase();Xi.DEFAULT_MATCHER=({filterOption:e,value:t,filterText:i})=>{if(i==null)return!1;switch(e){case Xi.CONTAINS:return t.indexOf(i)>=0;case Xi.NOT_CONTAINS:return t.indexOf(i)<0;case Xi.EQUALS:return t===i;case Xi.NOT_EQUAL:return t!=i;case Xi.STARTS_WITH:return t.indexOf(i)===0;case Xi.ENDS_WITH:const s=t.lastIndexOf(i);return s>=0&&s===t.length-i.length;default:return!1}};var fC=Xi,oD=class extends L{constructor(e){super(),this.params=e,this.valueChangedListener=()=>{}}setupGui(e){var t;this.eFloatingFilterTextInput=this.createManagedBean(new Ur((t=this.params)==null?void 0:t.config));const i=this.eFloatingFilterTextInput.getGui();e.appendChild(i),this.addManagedListener(i,"input",s=>this.valueChangedListener(s)),this.addManagedListener(i,"keydown",s=>this.valueChangedListener(s))}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)}},Dh=class extends pC{postConstruct(){this.setTemplate(`
|
|
183
|
+
<div class="ag-floating-filter-input" role="presentation" ref="eFloatingFilterInputContainer"></div>
|
|
184
|
+
`)}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){var t;this.params=e;const i=(t=e.browserAutoComplete)!=null?t:!1;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:i}),this.applyActive=yc.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){const s=yc.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),n=kt(this.syncUpWithParentFilter.bind(this),s);this.floatingFilterInputService.setValueChangedListener(n)}}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const t=this.floatingFilterInputService.getValue();Xe(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(t,!0)}syncUpWithParentFilter(e){const t=e.key===D.ENTER;if(this.applyActive&&!t)return;let i=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(i=fC.trimInput(i),this.floatingFilterInputService.setValue(i,!0)),this.params.parentFilterInstance(s=>{s&&s.onFloatingFilterChanged(this.getLastType()||null,i||null)})}setEditable(e){this.floatingFilterInputService.setEditable(e)}};h([_("eFloatingFilterInputContainer")],Dh.prototype,"eFloatingFilterInputContainer",2);h([I],Dh.prototype,"postConstruct",1);var PM=class extends L{constructor(){super(...arguments),this.valueChangedListener=()=>{},this.numberInputActive=!0}setupGui(e){this.eFloatingFilterNumberInput=this.createManagedBean(new gC),this.eFloatingFilterTextInput=this.createManagedBean(new Ur),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.addManagedListener(e,"input",t),this.addManagedListener(e,"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)}},bM=class extends Dh{init(e){var t;super.init(e),this.filterModelFormatter=new tD(this.localeService,this.optionsFactory,(t=e.filterParams)==null?void 0:t.numberFormatter)}onParamsUpdated(e){this.refresh(e)}refresh(e){uf(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return nD.DEFAULT_FILTER_OPTIONS}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(e){return this.allowedCharPattern=uf(e.filterParams),this.allowedCharPattern?this.createManagedBean(new oD({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new PM)}},FM=class extends Dh{init(e){super.init(e),this.filterModelFormatter=new rD(this.localeService,this.optionsFactory)}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return fC.DEFAULT_FILTER_OPTIONS}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(){return this.createManagedBean(new oD)}},Ru=class zl{constructor(t,i=!1){this.destroyFuncs=[],this.touching=!1,this.eventService=new ls,this.eElement=t,this.preventMouseClick=i;const s=this.onTouchStart.bind(this),n=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",s,{passive:!0}),this.eElement.addEventListener("touchmove",n,{passive:!0}),this.eElement.addEventListener("touchend",r,{passive:!1}),this.destroyFuncs.push(()=>{this.eElement.removeEventListener("touchstart",s,{passive:!0}),this.eElement.removeEventListener("touchmove",n,{passive:!0}),this.eElement.removeEventListener("touchend",r,{passive:!1})})}getActiveTouch(t){for(let i=0;i<t.length;i++)if(t[i].identifier===this.touchStart.identifier)return t[i];return null}addEventListener(t,i){this.eventService.addEventListener(t,i)}removeEventListener(t,i){this.eventService.removeEventListener(t,i)}onTouchStart(t){if(this.touching)return;this.touchStart=t.touches[0],this.touching=!0,this.moved=!1;const i=this.touchStart;window.setTimeout(()=>{const s=this.touchStart===i;if(this.touching&&s&&!this.moved){this.moved=!0;const n={type:zl.EVENT_LONG_TAP,touchStart:this.touchStart,touchEvent:t};this.eventService.dispatchEvent(n)}},500)}onTouchMove(t){if(!this.touching)return;const i=this.getActiveTouch(t.touches);if(!i)return;!lC(i,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(t){if(this.touching){if(!this.moved){const i={type:zl.EVENT_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(i),this.checkForDoubleTap()}this.preventMouseClick&&t.cancelable&&t.preventDefault(),this.touching=!1}}checkForDoubleTap(){const t=new Date().getTime();if(this.lastTapTime&&this.lastTapTime>0)if(t-this.lastTapTime>zl.DOUBLE_TAP_MILLIS){const s={type:zl.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(s),this.lastTapTime=null}else this.lastTapTime=t;else this.lastTapTime=t}destroy(){this.destroyFuncs.forEach(t=>t())}};Ru.EVENT_TAP="tap";Ru.EVENT_DOUBLE_TAP="doubleTap";Ru.EVENT_LONG_TAP="longTap";Ru.DOUBLE_TAP_MILLIS=500;var Ct=Ru,Zs=class lD extends te{constructor(t){super(),t||this.setTemplate(lD.TEMPLATE)}attachCustomElements(t,i,s,n,r){this.eSortOrder=t,this.eSortAsc=i,this.eSortDesc=s,this.eSortMixed=n,this.eSortNone=r}setupSort(t,i=!1){this.column=t,this.suppressOrder=i,this.setupMultiSortIndicator(),!(!this.column.isSortable()&&!this.column.getColDef().showRowGroup)&&(this.addInIcon("sortAscending",this.eSortAsc,t),this.addInIcon("sortDescending",this.eSortDesc,t),this.addInIcon("sortUnSort",this.eSortNone,t),this.addManagedPropertyListener("unSortIcon",()=>this.updateIcons()),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.updateIcons()),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,()=>this.onSortChanged()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onSortChanged()),this.onSortChanged())}addInIcon(t,i,s){if(i==null)return;const n=Ve(t,this.gos,s);n&&i.appendChild(n)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const t=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){const i=t==="asc";ue(this.eSortAsc,i,{skipAriaHidden:!0})}if(this.eSortDesc){const i=t==="desc";ue(this.eSortDesc,i,{skipAriaHidden:!0})}if(this.eSortNone){const i=!this.column.getColDef().unSortIcon&&!this.gos.get("unSortIcon"),s=t==null;ue(this.eSortNone,!i&&s,{skipAriaHidden:!0})}}setupMultiSortIndicator(){this.addInIcon("sortUnSort",this.eSortMixed,this.column);const t=this.column.getColDef().showRowGroup;this.gos.isColumnsSortingCoupledToGroup()&&t&&(this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,()=>this.updateMultiSortIndicator()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateMultiSortIndicator()),this.updateMultiSortIndicator())}updateMultiSortIndicator(){if(this.eSortMixed){const t=this.sortController.getDisplaySortForColumn(this.column)==="mixed";ue(this.eSortMixed,t,{skipAriaHidden:!0})}}updateSortOrder(){var t;if(!this.eSortOrder)return;const i=this.sortController.getColumnsWithSortingOrdered(),s=(t=this.sortController.getDisplaySortIndexForColumn(this.column))!=null?t:-1,n=i.some(o=>{var l;return(l=this.sortController.getDisplaySortIndexForColumn(o))!=null?l:!1}),r=s>=0&&n;ue(this.eSortOrder,r,{skipAriaHidden:!0}),s>=0?this.eSortOrder.textContent=(s+1).toString():Xe(this.eSortOrder)}};Zs.TEMPLATE=`<span class="ag-sort-indicator-container">
|
|
185
|
+
<span ref="eSortOrder" class="ag-sort-indicator-icon ag-sort-order ag-hidden" aria-hidden="true"></span>
|
|
186
|
+
<span ref="eSortAsc" class="ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden" aria-hidden="true"></span>
|
|
187
|
+
<span ref="eSortDesc" class="ag-sort-indicator-icon ag-sort-descending-icon ag-hidden" aria-hidden="true"></span>
|
|
188
|
+
<span ref="eSortMixed" class="ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden" aria-hidden="true"></span>
|
|
189
|
+
<span ref="eSortNone" class="ag-sort-indicator-icon ag-sort-none-icon ag-hidden" aria-hidden="true"></span>
|
|
190
|
+
</span>`;h([_("eSortOrder")],Zs.prototype,"eSortOrder",2);h([_("eSortAsc")],Zs.prototype,"eSortAsc",2);h([_("eSortDesc")],Zs.prototype,"eSortDesc",2);h([_("eSortMixed")],Zs.prototype,"eSortMixed",2);h([_("eSortNone")],Zs.prototype,"eSortNone",2);h([f("columnModel")],Zs.prototype,"columnModel",2);h([f("sortController")],Zs.prototype,"sortController",2);var mC=Zs,Nt=class aD extends te{constructor(){super(...arguments),this.lastMovingChanged=0}destroy(){super.destroy()}refresh(t){const i=this.params;return this.params=t,this.workOutTemplate()!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||this.workOutSort()!=this.currentSort||this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||i.enableFilterButton!=t.enableFilterButton||i.enableFilterIcon!=t.enableFilterIcon?!1:(this.setDisplayName(t),!0)}workOutTemplate(){var t;let i=(t=this.params.template)!=null?t:aD.TEMPLATE;return i=i&&i.trim?i.trim():i,i}init(t){this.params=t,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate),this.setupTap(),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setupFilterButton(),this.setDisplayName(t)}setDisplayName(t){if(this.currentDisplayName!=t.displayName){this.currentDisplayName=t.displayName;const i=tt(this.currentDisplayName,!0);this.eText&&(this.eText.textContent=i)}}addInIcon(t,i,s){if(i==null)return;const n=Ve(t,this.gos,s);n&&i.appendChild(n)}setupTap(){const{gos:t}=this;if(t.get("suppressTouch"))return;const i=new Ct(this.getGui(),!0),s=this.shouldSuppressMenuHide(),n=s&&A(this.eMenu),r=n?new Ct(this.eMenu,!0):i;if(this.params.enableMenu){const o=n?"EVENT_TAP":"EVENT_LONG_TAP",l=a=>this.params.showColumnMenuAfterMouseClick(a.touchStart);this.addManagedListener(r,Ct[o],l)}if(this.params.enableSorting){const o=l=>{var a,u;const d=l.touchStart.target;s&&((a=this.eMenu)!=null&&a.contains(d)||(u=this.eFilterButton)!=null&&u.contains(d))||this.sortController.progressSort(this.params.column,!1,"uiColumnSorted")};this.addManagedListener(i,Ct.EVENT_TAP,o)}if(this.params.enableFilterButton){const o=new Ct(this.eFilterButton,!0);this.addManagedListener(o,"tap",()=>this.params.showFilter(this.eFilterButton)),this.addDestroyFunc(()=>o.destroy())}this.addDestroyFunc(()=>i.destroy()),n&&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){ts(this.eMenu),this.eMenu=void 0;return}const t=this.menuService.isLegacyMenuEnabled();this.addInIcon(t?"menu":"menuAlt",this.eMenu,this.params.column),this.eMenu.classList.toggle("ag-header-menu-icon",!t),this.currentSuppressMenuHide=this.shouldSuppressMenuHide(),this.addManagedListener(this.eMenu,"click",()=>this.params.showColumnMenu(this.eMenu)),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide)}onMenuKeyboardShortcut(t){var i,s,n,r;const{column:o}=this.params,l=this.menuService.isLegacyMenuEnabled();if(t&&!l){if(this.menuService.isFilterMenuInHeaderEnabled(o))return this.params.showFilter((s=(i=this.eFilterButton)!=null?i:this.eMenu)!=null?s:this.getGui()),!0}else if(this.params.enableMenu)return this.params.showColumnMenu((r=(n=this.eMenu)!=null?n:this.eFilterButton)!=null?r:this.getGui()),!0;return!1}workOutSort(){return this.params.enableSorting}setupSort(){if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new mC(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!this.currentSort)return;this.addManagedListener(this.params.column,Pe.EVENT_MOVING_CHANGED,()=>{this.lastMovingChanged=new Date().getTime()}),this.eLabel&&this.addManagedListener(this.eLabel,"click",i=>{const s=this.params.column.isMoving(),r=new Date().getTime()-this.lastMovingChanged<50;if(!(s||r)){const a=this.gos.get("multiSortKey")==="ctrl"?i.ctrlKey||i.metaKey:i.shiftKey;this.params.progressSort(a)}});const t=()=>{if(this.addOrRemoveCssClass("ag-header-cell-sorted-asc",this.params.column.isSortAscending()),this.addOrRemoveCssClass("ag-header-cell-sorted-desc",this.params.column.isSortDescending()),this.addOrRemoveCssClass("ag-header-cell-sorted-none",this.params.column.isSortNone()),this.params.column.getColDef().showRowGroup){const i=this.columnModel.getSourceColumnsForGroupColumn(this.params.column),n=!(i==null?void 0:i.every(r=>this.params.column.getSort()==r.getSort()));this.addOrRemoveCssClass("ag-header-cell-sorted-mixed",n)}};this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,t),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}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.addManagedListener(this.eFilterButton,"click",()=>this.params.showFilter(this.eFilterButton)):this.eFilterButton=void 0}configureFilter(t,i,s){if(!t)return ts(i),!1;const{column:n}=this.params;return this.addInIcon("filter",i,n),this.addManagedListener(n,Pe.EVENT_FILTER_CHANGED,s),s(),!0}onFilterChangedIcon(){const t=this.params.column.isFilterActive();ue(this.eFilter,t,{skipAriaHidden:!0})}onFilterChangedButton(){const t=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",t)}getAnchorElementForMenu(t){var i,s,n,r;return t?(s=(i=this.eFilterButton)!=null?i:this.eMenu)!=null?s:this.getGui():(r=(n=this.eMenu)!=null?n:this.eFilterButton)!=null?r:this.getGui()}};Nt.TEMPLATE=`<div class="ag-cell-label-container" role="presentation">
|
|
191
|
+
<span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>
|
|
192
|
+
<span ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>
|
|
193
|
+
<div ref="eLabel" class="ag-header-cell-label" role="presentation">
|
|
194
|
+
<span ref="eText" class="ag-header-cell-text"></span>
|
|
195
|
+
<span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>
|
|
196
|
+
<ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>
|
|
197
|
+
</div>
|
|
198
|
+
</div>`;h([f("sortController")],Nt.prototype,"sortController",2);h([f("menuService")],Nt.prototype,"menuService",2);h([f("columnModel")],Nt.prototype,"columnModel",2);h([_("eFilter")],Nt.prototype,"eFilter",2);h([_("eFilterButton")],Nt.prototype,"eFilterButton",2);h([_("eSortIndicator")],Nt.prototype,"eSortIndicator",2);h([_("eMenu")],Nt.prototype,"eMenu",2);h([_("eLabel")],Nt.prototype,"eLabel",2);h([_("eText")],Nt.prototype,"eText",2);h([_("eSortOrder")],Nt.prototype,"eSortOrder",2);h([_("eSortAsc")],Nt.prototype,"eSortAsc",2);h([_("eSortDesc")],Nt.prototype,"eSortDesc",2);h([_("eSortMixed")],Nt.prototype,"eSortMixed",2);h([_("eSortNone")],Nt.prototype,"eSortNone",2);var df=Nt,Tu=class uD extends te{constructor(){super(uD.TEMPLATE)}destroy(){super.destroy()}init(t){this.params=t,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()}checkWarnings(){this.params.template&&Y("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")}setupExpandIcons(){this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");const t=n=>{if(rs(n))return;const r=!this.params.columnGroup.isExpanded();this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(),r,"uiColumnExpanded")};this.addTouchAndClickListeners(this.eCloseIcon,t),this.addTouchAndClickListeners(this.eOpenIcon,t);const i=n=>{as(n)};this.addManagedListener(this.eCloseIcon,"dblclick",i),this.addManagedListener(this.eOpenIcon,"dblclick",i),this.addManagedListener(this.getGui(),"dblclick",t),this.updateIconVisibility();const s=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(s,Je.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(s,Je.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))}addTouchAndClickListeners(t,i){const s=new Ct(t,!0);this.addManagedListener(s,Ct.EVENT_TAP,i),this.addDestroyFunc(()=>s.destroy()),this.addManagedListener(t,"click",i)}updateIconVisibility(){if(this.params.columnGroup.isExpandable()){const i=this.params.columnGroup.isExpanded();ue(this.eOpenIcon,i),ue(this.eCloseIcon,!i)}else ue(this.eOpenIcon,!1),ue(this.eCloseIcon,!1)}addInIcon(t,i){const s=Ve(t,this.gos,null);s&&this.getRefElement(i).appendChild(s)}addGroupExpandIcon(){if(!this.params.columnGroup.isExpandable()){ue(this.eOpenIcon,!1),ue(this.eCloseIcon,!1);return}}setupLabel(){var t;const{displayName:i,columnGroup:s}=this.params;if(A(i)){const n=tt(i,!0);this.getRefElement("agLabel").textContent=n}this.addOrRemoveCssClass("ag-sticky-label",!((t=s.getColGroupDef())!=null&&t.suppressStickyLabel))}};Tu.TEMPLATE=`<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">
|
|
199
|
+
<span ref="agLabel" class="ag-header-group-text" role="presentation"></span>
|
|
200
|
+
<span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>
|
|
201
|
+
<span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>
|
|
202
|
+
</div>`;h([f("columnModel")],Tu.prototype,"columnModel",2);h([_("agOpened")],Tu.prototype,"eOpenIcon",2);h([_("agClosed")],Tu.prototype,"eCloseIcon",2);var AM=Tu,zr=class extends te{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()}},CC=class dD extends zr{constructor(){super(dD.TEMPLATE)}init(t){this.params=t,this.focusAfterAttached=t.cellStartedEdit,this.eTextArea.setMaxLength(t.maxLength||200).setCols(t.cols||60).setRows(t.rows||10),A(t.value,!0)&&this.eTextArea.setValue(t.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(t){const i=t.key;(i===D.LEFT||i===D.UP||i===D.RIGHT||i===D.DOWN||t.shiftKey&&i===D.ENTER)&&t.stopPropagation()}afterGuiAttached(){const t=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(t("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()}getValue(){const t=this.eTextArea.getValue();return!A(t)&&!A(this.params.value)?this.params.value:this.params.parseValue(t)}};CC.TEMPLATE=`<div class="ag-large-text">
|
|
203
|
+
<ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>
|
|
204
|
+
</div>`;h([_("eTextArea")],CC.prototype,"eTextArea",2);var xM=CC,vC=class extends zr{constructor(){super(`<div class="ag-cell-edit-wrapper">
|
|
205
|
+
<ag-select class="ag-cell-editor" ref="eSelect"></ag-select>
|
|
206
|
+
</div>`),this.startedByEnter=!1}init(e){this.focusAfterAttached=e.cellStartedEdit;const{eSelect:t,valueService:i,gos:s}=this,{values:n,value:r,eventKey:o}=e;if(J(n)){console.warn("AG Grid: no values found for select cellEditor");return}this.startedByEnter=o!=null?o===D.ENTER:!1;let l=!1;n.forEach(c=>{const p={value:c},C=i.formatValue(e.column,null,c),v=C!=null;p.text=v?C:c,t.addOption(p),l=l||r===c}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:a,valueListMaxWidth:u,valueListMaxHeight:d}=e;a!=null&&t.setPickerGap(a),d!=null&&t.setPickerMaxHeight(d),u!=null&&t.setPickerMaxWidth(u),s.get("editType")!=="fullRow"&&this.addManagedListener(this.eSelect,Eh.EVENT_ITEM_SELECTED,()=>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}};h([f("valueService")],vC.prototype,"valueService",2);h([_("eSelect")],vC.prototype,"eSelect",2);var Du=class extends zr{constructor(e){super(`
|
|
207
|
+
<div class="ag-cell-edit-wrapper">
|
|
208
|
+
${e.getTemplate()}
|
|
209
|
+
</div>`),this.cellEditorInput=e}init(e){this.params=e;const t=this.eInput;this.cellEditorInput.init(t,e);let i;if(e.cellStartedEdit){this.focusAfterAttached=!0;const s=e.eventKey;s===D.BACKSPACE||e.eventKey===D.DELETE?i="":s&&s.length===1?i=s:(i=this.cellEditorInput.getStartValue(),s!==D.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,i=this.cellEditorInput.getStartValue();i!=null&&t.setStartValue(i),this.addManagedListener(t.getGui(),"keydown",s=>{const{key:n}=s;(n===D.PAGE_UP||n===D.PAGE_DOWN)&&s.preventDefault()})}afterGuiAttached(){var e,t;const i=this.localeService.getLocaleTextFunc(),s=this.eInput;if(s.setInputAriaLabel(i("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Ts()||s.getFocusableElement().focus();const n=s.getInputElement();this.highlightAllOnFocus?n.select():(t=(e=this.cellEditorInput).setCaret)==null||t.call(e)}focusIn(){const e=this.eInput,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}};h([_("eInput")],Du.prototype,"eInput",2);var LM=class{getTemplate(){return'<ag-input-text-field class="ag-cell-editor" ref="eInput"></ag-input-text-field>'}init(e,t){this.eInput=e,this.params=t,t.maxLength!=null&&e.setMaxLength(t.maxLength)}getValue(){const e=this.eInput.getValue();return!A(e)&&!A(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=A(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t)}},Ay=class extends Du{constructor(){super(new LM)}},MM="↑",IM="↓",cD=class extends te{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)}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),n=A(s)?s:i,r=t>=0;r?this.eDelta.textContent=MM+n:this.eDelta.textContent=IM+n,this.eDelta.classList.toggle("ag-value-change-delta-up",r),this.eDelta.classList.toggle("ag-value-change-delta-down",!r)}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"),Xe(this.eDelta)}refresh(e,t=!1){const i=e.value;if(i===this.lastValue||(A(e.valueFormatted)?this.eValue.textContent=e.valueFormatted:A(e.value)?this.eValue.textContent=i:Xe(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering()))return!1;if(typeof i=="number"&&typeof this.lastValue=="number"){const s=i-this.lastValue;this.showDelta(e,s)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0}};h([f("filterManager")],cD.prototype,"filterManager",2);var hD=class extends te{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")}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){let i=e.value;return J(i)&&(i=""),i===this.lastValue||this.filterManager.isSuppressFlashingCellsBecauseFiltering()?!1:(t||this.addSlideAnimation(),this.lastValue=i,A(e.valueFormatted)?this.eCurrent.textContent=e.valueFormatted:A(e.value)?this.eCurrent.textContent=i:Xe(this.eCurrent),!0)}};h([f("filterManager")],hD.prototype,"filterManager",2);var Ne=class Fe{constructor(t){this.rowIndex=null,this.key=null,this.childrenMapped={},this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Fe.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){const s=this.data;this.data=t,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(t,s,i);this.dispatchLocalEvent(n)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(t,i,s){return{type:Fe.EVENT_DATA_CHANGED,node:this,oldData:i,newData:t,update:s}}createLocalRowEvent(t){return{type:t,node:this}}getRowIndexString(){return this.rowPinned==="top"?"t-"+this.rowIndex:this.rowPinned==="bottom"?"b-"+this.rowIndex:this.rowIndex.toString()}createDaemonNode(){const t=new Fe(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){const s=A(this.id)?this.createDaemonNode():null,n=this.data;this.data=t,this.updateDataOnDetailNode(),this.setId(i),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,s);const r=this.createDataChangedEvent(t,n,!1);this.dispatchLocalEvent(r)}checkRowSelectable(){const t=this.beans.gos.get("isRowSelectable");this.setRowSelectable(t?t(this):!0)}setRowSelectable(t,i){if(this.selectable!==t){if(this.selectable=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_SELECTABLE_CHANGED)),i)return;if(this.beans.gos.get("groupSelectsChildren")){const n=this.calculateSelectedFromChildren();this.setSelectedParams({newValue:n??!1,source:"selectableChanged"});return}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"})}}setId(t){const i=this.beans.gos.getCallback("getRowId");if(i)if(this.data){const s=this.getGroupKeys(!0);this.id=i({data:this.data,parentKeys:s.length>0?s:void 0,level:this.level}),this.id!==null&&typeof this.id=="string"&&this.id.startsWith(Fe.ID_PREFIX_ROW_GROUP)&&console.error(`AG Grid: Row IDs cannot start with ${Fe.ID_PREFIX_ROW_GROUP}, this is a reserved prefix for AG Grid's row grouping feature.`),this.id!==null&&typeof this.id!="string"&&(this.id=""+this.id)}else this.id=void 0;else this.id=t}getGroupKeys(t=!1){const i=[];let s=this;for(t&&(s=s.parent);s&&s.level>=0;)i.push(s.key),s=s.parent;return i.reverse(),i}isPixelInRange(t){return!A(this.rowTop)||!A(this.rowHeight)?!1:t>=this.rowTop&&t<this.rowTop+this.rowHeight}setFirstChild(t){this.firstChild!==t&&(this.firstChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_FIRST_CHILD_CHANGED)))}setLastChild(t){this.lastChild!==t&&(this.lastChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_LAST_CHILD_CHANGED)))}setChildIndex(t){this.childIndex!==t&&(this.childIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_CHILD_INDEX_CHANGED)))}setRowTop(t){this.oldRowTop=this.rowTop,this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_TOP_CHANGED)),this.setDisplayed(t!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setDisplayed(t){this.displayed!==t&&(this.displayed=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_DISPLAYED_CHANGED)))}setDragging(t){this.dragging!==t&&(this.dragging=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_DRAGGING_CHANGED)))}setHighlighted(t){t!==this.highlighted&&(this.highlighted=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_HIGHLIGHT_CHANGED)))}setHovered(t){this.hovered!==t&&(this.hovered=t)}isHovered(){return this.hovered}setAllChildrenCount(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_ALL_CHILDREN_COUNT_CHANGED)))}setMaster(t){this.master!==t&&(this.master&&!t&&(this.expanded=!1),this.master=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_MASTER_CHANGED)))}setGroup(t){this.group!==t&&(this.group&&!t&&(this.expanded=!1),this.group=t,this.updateHasChildren(),this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_GROUP_CHANGED)))}setRowHeight(t,i=!1){this.rowHeight=t,this.rowHeightEstimated=i,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_HEIGHT_CHANGED))}setRowAutoHeight(t,i){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[i.getId()]=t,t!=null&&(this.checkAutoHeightsDebounced==null&&(this.checkAutoHeightsDebounced=kt(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())}checkAutoHeights(){let t=!1,i=!0,s=0;const n=this.__autoHeights;if(n==null||(this.beans.columnModel.getAllDisplayedAutoHeightCols().forEach(l=>{let a=n[l.getId()];if(a==null)if(this.beans.columnModel.isColSpanActive()){let u=[];switch(l.getPinned()){case"left":u=this.beans.columnModel.getDisplayedLeftColumnsForRow(this);break;case"right":u=this.beans.columnModel.getDisplayedRightColumnsForRow(this);break;case null:u=this.beans.columnModel.getViewportCenterColumnsForRow(this);break}if(u.includes(l)){t=!0;return}a=-1}else{t=!0;return}else i=!1;a>s&&(s=a)}),t)||((i||s<10)&&(s=this.beans.gos.getRowHeightForNode(this).height),s==this.rowHeight))return;this.setRowHeight(s);const o=this.beans.rowModel;o.onRowHeightChangedDebounced&&o.onRowHeightChangedDebounced()}setRowIndex(t){this.rowIndex!==t&&(this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_ROW_INDEX_CHANGED)))}setUiLevel(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_UI_LEVEL_CHANGED)))}setExpanded(t,i,s){if(this.expanded===t)return;this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_EXPANDED_CHANGED));const n=Object.assign({},this.createGlobalRowEvent(g.EVENT_ROW_GROUP_OPENED),{expanded:t,event:i||null});this.beans.rowNodeEventThrottle.dispatchExpanded(n,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})}dispatchLocalEvent(t){this.eventService&&this.eventService.dispatchEvent(t)}setDataValue(t,i,s){const r=(()=>{var a;return typeof t!="string"?t:(a=this.beans.columnModel.getGridColumn(t))!=null?a:this.beans.columnModel.getPrimaryColumn(t)})(),o=this.getValueFromValueService(r);if(this.beans.gos.get("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(r,o,i,s),!1;const l=this.beans.valueService.setValue(this,r,i,s);return this.dispatchCellChangedEvent(r,i,o),this.checkRowSelectable(),l}getValueFromValueService(t){var i,s;const n=this.leafGroup&&this.beans.columnModel.isPivotMode(),r=this.group&&this.expanded&&!this.footer&&!n;let o=!1;const l=(i=this.beans.gos.get("groupTotalRow"))!=null?i:this.beans.gos.get("groupIncludeFooter");typeof l!="function"?o=!!l:o=!!((s=this.beans.gos.getCallback("groupTotalRow"))!=null?s:this.beans.gos.getCallback("groupIncludeFooter"))({node:this});const a=this.beans.gos.get("groupSuppressBlankHeader"),u=r&&o&&!a;return this.beans.valueService.getValue(t,this,!1,u)}dispatchEventForSaveValueReadOnly(t,i,s,n){const r=this.beans.gos.addGridCommonParams({type:g.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:t,colDef:t.getColDef(),data:this.data,node:this,oldValue:i,newValue:s,value:s,source:n});this.beans.eventService.dispatchEvent(r)}setGroupValue(t,i){const s=this.beans.columnModel.getGridColumn(t);J(this.groupData)&&(this.groupData={});const n=s.getColId(),r=this.groupData[n];r!==i&&(this.groupData[n]=i,this.dispatchCellChangedEvent(s,i,r))}setAggData(t){const i=this.aggData;if(this.aggData=t,this.eventService){const s=n=>{const r=this.aggData?this.aggData[n]:void 0,o=i?i[n]:void 0;if(r===o)return;const l=this.beans.columnModel.lookupGridColumn(n);l&&this.dispatchCellChangedEvent(l,r,o)};for(const n in this.aggData)s(n);for(const n in t)n in this.aggData||s(n)}}updateHasChildren(){let t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(this.beans.gos.isRowModelType("serverSide")){const s=this.beans.gos.get("treeData"),n=this.beans.gos.get("isServerSideGroup");t=!this.stub&&!this.footer&&(s?!!n&&n(this.data):!!this.group)}t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(Fe.EVENT_HAS_CHILDREN_CHANGED)))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}isEmptyRowGroupNode(){return this.group&&Ii(this.childrenAfterGroup)}dispatchCellChangedEvent(t,i,s){const n={type:Fe.EVENT_CELL_CHANGED,node:this,column:t,newValue:i,oldValue:s};this.dispatchLocalEvent(n)}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 t;let i=!1,s=!1,n=!1;if(!((t=this.childrenAfterGroup)!=null&&t.length))return this.selectable?this.selected:null;for(let r=0;r<this.childrenAfterGroup.length;r++){const o=this.childrenAfterGroup[r];let l=o.isSelected();if(!o.selectable){const a=o.calculateSelectedFromChildren();if(a===null)continue;l=a}switch(l){case!0:i=!0;break;case!1:s=!0;break;default:n=!0;break}}if(!(n||i&&s))return i?!0:s?!1:this.selectable?this.selected:null}setSelectedInitialValue(t){this.selected=t}selectThisNode(t,i,s="api"){const n=!this.selectable&&t,r=this.selected===t;if(n||r)return!1;this.selected=t,this.eventService&&this.dispatchLocalEvent(this.createLocalRowEvent(Fe.EVENT_ROW_SELECTED));const o=this.sibling;o&&o.footer&&o.eventService&&o.dispatchLocalEvent(o.createLocalRowEvent(Fe.EVENT_ROW_SELECTED));const l=Ie(K({},this.createGlobalRowEvent(g.EVENT_ROW_SELECTED)),{event:i||null,source:s});return this.beans.eventService.dispatchEvent(l),!0}setSelected(t,i=!1,s="api"){if(typeof s=="boolean"){console.warn("AG Grid: 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?(console.warn("AG Grid: cannot select pinned rows"),0):this.id===void 0?(console.warn("AG Grid: cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected(Ie(K({},t),{nodes:[this.footer?this.sibling:this]}))}isRowPinned(){return this.rowPinned==="top"||this.rowPinned==="bottom"}isParentOfNode(t){let i=this.parent;for(;i;){if(i===t)return!0;i=i.parent}return!1}addEventListener(t,i){var s,n;this.eventService||(this.eventService=new ls),this.beans.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.beans.frameworkOverrides),this.frameworkEventListenerService=new _m(this.beans.frameworkOverrides));const r=(n=(s=this.frameworkEventListenerService)==null?void 0:s.wrap(i))!=null?n:i;this.eventService.addEventListener(t,r)}removeEventListener(t,i){var s,n;if(!this.eventService)return;const r=(n=(s=this.frameworkEventListenerService)==null?void 0:s.unwrap(i))!=null?n:i;this.eventService.removeEventListener(t,r),this.eventService.noRegisteredListenersExist()&&(this.eventService=null)}onMouseEnter(){this.dispatchLocalEvent(this.createLocalRowEvent(Fe.EVENT_MOUSE_ENTER))}onMouseLeave(){this.dispatchLocalEvent(this.createLocalRowEvent(Fe.EVENT_MOUSE_LEAVE))}getFirstChildOfFirstChild(t){let i=this,s=!0,n=!1,r=null;for(;s&&!n;){const o=i.parent;A(o)&&i.firstChild?o.rowGroupColumn===t&&(n=!0,r=o):s=!1,i=o}return n?r:null}isFullWidthCell(){if(this.detail)return!0;const t=this.beans.gos.getCallback("isFullWidthRow");return t?t({rowNode:this}):!1}getRoute(){if(this.key==null)return;const t=[];let i=this;for(;i.key!=null;)t.push(i.key),i=i.parent;return t.reverse()}createFooter(){if(this.sibling)return;const t=new Set(["eventService","__objectId","sticky"]),i=new Fe(this.beans);Object.keys(this).forEach(s=>{t.has(s)||(i[s]=this[s])}),i.footer=!0,i.setRowTop(null),i.setRowIndex(null),i.oldRowTop=null,i.id="rowGroupFooter_"+this.id,i.sibling=this,this.sibling=i}destroyFooter(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0)}};Ne.ID_PREFIX_ROW_GROUP="row-group-";Ne.ID_PREFIX_TOP_PINNED="t-";Ne.ID_PREFIX_BOTTOM_PINNED="b-";Ne.OBJECT_ID_SEQUENCE=0;Ne.EVENT_ROW_SELECTED="rowSelected";Ne.EVENT_DATA_CHANGED="dataChanged";Ne.EVENT_CELL_CHANGED="cellChanged";Ne.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged";Ne.EVENT_MASTER_CHANGED="masterChanged";Ne.EVENT_GROUP_CHANGED="groupChanged";Ne.EVENT_MOUSE_ENTER="mouseEnter";Ne.EVENT_MOUSE_LEAVE="mouseLeave";Ne.EVENT_HEIGHT_CHANGED="heightChanged";Ne.EVENT_TOP_CHANGED="topChanged";Ne.EVENT_DISPLAYED_CHANGED="displayedChanged";Ne.EVENT_FIRST_CHILD_CHANGED="firstChildChanged";Ne.EVENT_LAST_CHILD_CHANGED="lastChildChanged";Ne.EVENT_CHILD_INDEX_CHANGED="childIndexChanged";Ne.EVENT_ROW_INDEX_CHANGED="rowIndexChanged";Ne.EVENT_EXPANDED_CHANGED="expandedChanged";Ne.EVENT_HAS_CHILDREN_CHANGED="hasChildrenChanged";Ne.EVENT_SELECTABLE_CHANGED="selectableChanged";Ne.EVENT_UI_LEVEL_CHANGED="uiLevelChanged";Ne.EVENT_HIGHLIGHT_CHANGED="rowHighlightChanged";Ne.EVENT_DRAGGING_CHANGED="draggingChanged";var ne=Ne,Ph=class extends te{constructor(){super(`
|
|
210
|
+
<div class="ag-selection-checkbox" role="presentation">
|
|
211
|
+
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
|
|
212
|
+
</div>`)}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=fh(e,t),[s,n]=this.rowNode.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],r=e(s,n);this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel(`${r} (${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.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",s=>{as(s)}),this.addManagedListener(this.eCheckbox.getInputElement(),"click",s=>{as(s);const n=this.gos.get("groupSelectsFiltered"),r=this.eCheckbox.getValue();this.shouldHandleIndeterminateState(r,n)?this.onClicked(!0,n,s||{})===0&&this.onClicked(!1,n,s):r?this.onClicked(!1,n,s):this.onClicked(!0,n,s||{})}),this.addManagedListener(this.rowNode,ne.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.gos.get("isRowSelectable")||typeof this.getIsVisible()=="function"){const s=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,s),this.addManagedListener(this.rowNode,ne.EVENT_DATA_CHANGED,s),this.addManagedListener(this.rowNode,ne.EVENT_CELL_CHANGED,s),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}shouldHandleIndeterminateState(e,t){return t&&(this.eCheckbox.getPreviousValue()===void 0||e===void 0)&&this.gos.isRowModelType("clientSide")}showOrHideSelect(){var e,t,i;let s=this.rowNode.selectable;const n=this.getIsVisible();if(s)if(typeof n=="function"){const o=(e=this.overrides)==null?void 0:e.callbackParams;if(!this.column)s=n(Ie(K({},o),{node:this.rowNode,data:this.rowNode.data}));else{const l=this.column.createColumnFunctionCallbackParams(this.rowNode);s=n(K(K({},o),l))}}else s=n??!1;if((t=this.column)==null?void 0:t.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!s),this.setVisible(!0),this.setDisplayed(!0);return}if((i=this.overrides)!=null&&i.removeHidden){this.setDisplayed(s);return}this.setVisible(s)}getIsVisible(){var e,t;return this.overrides?this.overrides.isVisible:(t=(e=this.column)==null?void 0:e.getColDef())==null?void 0:t.checkboxSelection}};h([_("eCheckbox")],Ph.prototype,"eCheckbox",2);h([I],Ph.prototype,"postConstruct",1);var pD=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e))(pD||{}),ie=class extends L{constructor(){super(...arguments),this.dragSourceAndParamsList=[],this.dropTargets=[]}init(){this.ePinnedIcon=xi("columnMovePin",this.gos,null),this.eHideIcon=xi("columnMoveHide",this.gos,null),this.eMoveIcon=xi("columnMoveMove",this.gos,null),this.eLeftIcon=xi("columnMoveLeft",this.gos,null),this.eRightIcon=xi("columnMoveRight",this.gos,null),this.eGroupIcon=xi("columnMoveGroup",this.gos,null),this.eAggregateIcon=xi("columnMoveValue",this.gos,null),this.ePivotIcon=xi("columnMovePivot",this.gos,null),this.eDropNotAllowedIcon=xi("dropNotAllowed",this.gos,null)}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),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragService.addDragSource(i)}removeDragSource(e){const t=this.dragSourceAndParamsList.find(i=>i.dragSource===e);t&&(this.dragService.removeDragSource(t.params),Jt(this.dragSourceAndParamsList,t))}clearDragSourceParamsList(){this.dragSourceAndParamsList.forEach(e=>this.dragService.removeDragSource(e.params)),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=void 0,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()}onDragStop(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){const t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()}onDragging(e,t){var i,s,n,r;const o=this.getHorizontalDirection(e),l=this.getVerticalDirection(e);this.eventLastTime=e,this.positionGhost(e);const a=this.dropTargets.filter(d=>this.isMouseOnDropTarget(e,d)),u=this.findCurrentDropTarget(e,a);if(u!==this.lastDropTarget)this.leaveLastTargetIfExists(e,o,l,t),this.lastDropTarget!==null&&u===null&&((s=(i=this.dragSource).onGridExit)==null||s.call(i,this.dragItem)),this.lastDropTarget===null&&u!==null&&((r=(n=this.dragSource).onGridEnter)==null||r.call(n,this.dragItem)),this.enterDragTargetIfExists(u,e,o,l,t),this.lastDropTarget=u;else if(u&&u.onDragging){const d=this.createDropTargetEvent(u,e,o,l,t);u.onDragging(d)}}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 s=i.getBoundingClientRect();if(s.width===0||s.height===0)return!1;const n=e.clientX>=s.left&&e.clientX<s.right,r=e.clientY>=s.top&&e.clientY<s.bottom;if(!n||!r)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}return t.targetContainsSource&&!t.getContainer().contains(this.dragSource.eElement)?!1:s&&t.isInterestedIn(this.dragSource.type,this.dragSource.eElement)}findCurrentDropTarget(e,t){const i=t.length;if(i===0)return null;if(i===1)return t[0];const n=this.gos.getRootNode().elementsFromPoint(e.clientX,e.clientY);for(const r of n)for(const o of t)if(WR(this.getAllContainersFromDropTarget(o)).indexOf(r)!==-1)return o;return null}enterDragTargetIfExists(e,t,i,s,n){if(e){if(e.onDragEnter){const r=this.createDropTargetEvent(e,t,i,s,n);e.onDragEnter(r)}this.setGhostIcon(e.getIconName?e.getIconName():null)}}leaveLastTargetIfExists(e,t,i,s){if(this.lastDropTarget){if(this.lastDropTarget.onDragLeave){const n=this.createDropTargetEvent(this.lastDropTarget,e,t,i,s);this.lastDropTarget.onDragLeave(n)}this.setGhostIcon(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}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,n){const r=e.getContainer(),o=r.getBoundingClientRect(),{gridApi:l,columnApi:a,dragItem:u,dragSource:d}=this,c=t.clientX-o.left,p=t.clientY-o.top;return{event:t,x:c,y:p,vDirection:s,hDirection:i,dragSource:d,fromNudge:n,dragItem:u,api:l,columnApi:a,dropZoneTarget:r}}positionGhost(e){const t=this.eGhost;if(!t)return;const s=t.getBoundingClientRect().height,n=mT()-2,r=CT()-2,o=eC(t.offsetParent),{clientY:l,clientX:a}=e;let u=l-o.top-s/2,d=a-o.left-10;const c=this.gos.getDocument(),p=c.defaultView||window,C=p.pageYOffset||c.documentElement.scrollTop,v=p.pageXOffset||c.documentElement.scrollLeft;n>0&&d+t.clientWidth>n+v&&(d=n+v-t.clientWidth),d<0&&(d=0),r>0&&u+t.clientHeight>r+C&&(u=r+C-t.clientHeight),u<0&&(u=0),t.style.left=`${d}px`,t.style.top=`${u}px`}removeGhost(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null}createGhost(){this.eGhost=ni(ie.GHOST_TEMPLATE),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);const{theme:e}=this.environment.getTheme();e&&this.eGhost.classList.add(e),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);const t=this.eGhost.querySelector(".ag-dnd-ghost-label");let i=this.dragSource.dragItemName;uh(i)&&(i=i()),t.innerHTML=tt(i)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";const s=this.gos.getDocument();let n=null,r=null;try{n=s.fullscreenElement}catch{}finally{n||(n=this.gos.getRootNode());const o=n.querySelector("body");o?r=o:n instanceof ShadowRoot?r=n:n instanceof Document?r=n==null?void 0:n.documentElement:r=n}this.eGhostParent=r,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns")}setGhostIcon(e,t=!1){Xe(this.eGhostIcon);let i=null;switch(e||(e=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():ie.ICON_NOT_ALLOWED),e){case ie.ICON_PINNED:i=this.ePinnedIcon;break;case ie.ICON_MOVE:i=this.eMoveIcon;break;case ie.ICON_LEFT:i=this.eLeftIcon;break;case ie.ICON_RIGHT:i=this.eRightIcon;break;case ie.ICON_GROUP:i=this.eGroupIcon;break;case ie.ICON_AGGREGATE:i=this.eAggregateIcon;break;case ie.ICON_PIVOT:i=this.ePivotIcon;break;case ie.ICON_NOT_ALLOWED:i=this.eDropNotAllowedIcon;break;case ie.ICON_HIDE:i=this.eHideIcon;break}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",t),!(i===this.eHideIcon&&this.gos.get("suppressDragLeaveHidesColumns"))&&i&&this.eGhostIcon.appendChild(i)}};ie.ICON_PINNED="pinned";ie.ICON_MOVE="move";ie.ICON_LEFT="left";ie.ICON_RIGHT="right";ie.ICON_GROUP="group";ie.ICON_AGGREGATE="aggregate";ie.ICON_PIVOT="pivot";ie.ICON_NOT_ALLOWED="notAllowed";ie.ICON_HIDE="hide";ie.GHOST_TEMPLATE=`<div class="ag-dnd-ghost ag-unselectable">
|
|
213
|
+
<span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>
|
|
214
|
+
<div class="ag-dnd-ghost-label"></div>
|
|
215
|
+
</div>`;h([f("dragService")],ie.prototype,"dragService",2);h([f("mouseEventService")],ie.prototype,"mouseEventService",2);h([f("columnApi")],ie.prototype,"columnApi",2);h([f("gridApi")],ie.prototype,"gridApi",2);h([I],ie.prototype,"init",1);h([$t],ie.prototype,"clearDragSourceParamsList",1);ie=h([B("dragAndDropService")],ie);var Ar=class extends te{constructor(e,t,i,s,n,r){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=s,this.dragStartPixels=n,this.suppressVisibilityChange=r,this.dragSource=null}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(Ve("rowDrag",this.gos,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){const e=this.gos.get("rowDragManaged")?new mD(this,this.beans,this.rowNode,this.column):new fD(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}}setDragElement(e,t){this.setTemplateFromElement(e),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&&Y("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.localeService.getLocaleTextFunc();this.dragSource={type:2,eElement:this.getGui(),dragItemName:()=>{var i;const s=this.getDragItem(),n=((i=s.rowNodes)==null?void 0:i.length)||1,r=this.getRowDragText(this.column);return r?r(s,n):n===1?this.cellValueFn():`${n} ${t("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)}removeDragSource(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null}};h([f("beans")],Ar.prototype,"beans",2);h([I],Ar.prototype,"postConstruct",1);h([$t],Ar.prototype,"removeDragSource",1);var gD=class extends L{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=uh(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))}}},fD=class extends gD{constructor(e,t,i,s){super(e,i,s),this.beans=t}postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e)}};h([I],fD.prototype,"postConstruct",1);var mD=class extends gD{constructor(e,t,i,s){super(e,i,s),this.beans=t}postConstruct(){this.addManagedListener(this.beans.eventService,g.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),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"),n=this.beans.dragAndDropService.hasExternalDropZones(),r=i&&!n||s;this.setDisplayedOrVisible(r)}};h([I],mD.prototype,"postConstruct",1);var $r=class extends L{init(e,t,i,s,n,r,o){var l,a,u,d;this.params=o,this.eGui=t,this.eCheckbox=i,this.eExpanded=s,this.eContracted=n,this.comp=e,this.compClass=r;const{node:c,value:p,colDef:C}=o,v=this.isTopLevelFooter();if(!v){if(this.isEmbeddedRowMismatch())return;if(c.footer&&this.gos.get("groupHideOpenParents")){const E=C&&C.showRowGroup,w=c.rowGroupColumn&&c.rowGroupColumn.getColId();if(E!==w)return}}if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!v){const S=o.node.footer&&o.node.rowGroupIndex===this.columnModel.getRowGroupColumns().findIndex(F=>{var b;return F.getColId()===((b=o.colDef)==null?void 0:b.showRowGroup)}),w=this.gos.get("groupDisplayType")!="multipleColumns"||this.gos.get("treeData")||this.gos.get("showOpenedGroup")&&!o.node.footer&&(!o.node.group||o.node.rowGroupIndex!=null&&o.node.rowGroupIndex>this.columnModel.getRowGroupColumns().findIndex(F=>{var b;return F.getColId()===((b=o.colDef)==null?void 0:b.showRowGroup)})),m=!c.group&&(((l=this.params.colDef)==null?void 0:l.field)||((a=this.params.colDef)==null?void 0:a.valueGetter)),R=this.isExpandable(),T=this.columnModel.isPivotMode()&&c.leafGroup&&((u=c.rowGroupColumn)==null?void 0:u.getColId())===((d=o.column)==null?void 0:d.getColDef().showRowGroup);if(!this.showingValueForOpenedParent&&!R&&!m&&!w&&!S&&!T)return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()}getCellAriaRole(){var e,t;const i=(e=this.params.colDef)==null?void 0:e.cellAriaRole,s=(t=this.params.column)==null?void 0:t.getColDef().cellAriaRole;return i||s||"gridcell"}destroy(){super.destroy(),this.expandListener=null}refreshAriaExpanded(){const{node:e,eGridCell:t}=this.params;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable()){lT(t);return}const i=()=>{Us(t,!!e.expanded)};this.expandListener=this.addManagedListener(e,ne.EVENT_EXPANDED_CHANGED,i)||null,i()}isTopLevelFooter(){if(!this.gos.getGrandTotalRow()||this.params.value!=null||this.params.node.level!=-1)return!1;const t=this.params.colDef;if(t==null||t.showRowGroup===!0)return!0;const s=this.columnModel.getRowGroupColumns();return!s||s.length===0?!0:s[0].getId()===t.showRowGroup}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;const e=this.params.pinned==="left",t=this.params.pinned==="right",i=!e&&!t;return this.gos.get("enableRtl")?this.columnModel.isPinningLeft()?!t:!i:this.columnModel.isPinningLeft()?!e:!i}findDisplayedGroupNode(){const e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent){let i=t.parent;for(;i!=null;){if(i.rowGroupColumn&&e.isRowGroupDisplayed(i.rowGroupColumn.getId())){this.displayedGroupNode=i;break}i=i.parent}}J(this.displayedGroupNode)&&(this.displayedGroupNode=t)}setupShowingValueForOpenedParent(){const e=this.params.node,t=this.params.column;if(!this.gos.get("groupHideOpenParents")){this.showingValueForOpenedParent=!1;return}if(!e.groupData){this.showingValueForOpenedParent=!1;return}if(e.rowGroupColumn!=null){const n=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(n)){this.showingValueForOpenedParent=!1;return}}const s=e.groupData[t.getId()]!=null;this.showingValueForOpenedParent=s}addValueElement(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())}addGroupValue(){var e;const t=this.adjustParamsWithDetailsFromRelatedColumn(),i=this.getInnerCompDetails(t),{valueFormatted:s,value:n}=t;let r=s;if(r==null){const o=this.displayedGroupNode.rowGroupColumn&&((e=this.params.column)==null?void 0:e.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId()));this.displayedGroupNode.key===""&&this.displayedGroupNode.group&&o?r=this.localeService.getLocaleTextFunc()("blanks","(Blanks)"):r=n??null}this.comp.setInnerRenderer(i,r)}adjustParamsWithDetailsFromRelatedColumn(){const e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e)return this.params;if(t!=null&&!t.isRowGroupDisplayed(e.getId()))return this.params;const s=this.params,{value:n,node:r}=this.params,o=this.valueService.formatValue(e,r,n);return Ie(K({},s),{valueFormatted:o})}addFooterValue(){let e=this.params.totalValueGetter;if(!e){const s=this.params.footerValueGetter;s&&(e=s,Y("As of v31.3, footerValueGetter is deprecated. Use `totalValueGetter` instead."))}let t="";if(e){const s=Im(this.params);s.value=this.params.value,typeof e=="function"?t=e(s):typeof e=="string"?t=this.expressionService.evaluate(e,s):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else t=this.localeService.getLocaleTextFunc()("footerTotal","Total")+" "+(this.params.value!=null?this.params.value:"");const i=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(i,t)}getInnerCompDetails(e){if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gos.get("groupRowRendererParams"),e);const t=this.userComponentFactory.getInnerRendererDetails(e,e),i=o=>o&&o.componentClass==this.compClass;if(t&&!i(t))return t;const s=this.displayedGroupNode.rowGroupColumn,n=s?s.getColDef():void 0;if(!n)return;const r=this.userComponentFactory.getCellRendererDetails(n,e);if(r&&!i(r))return r;if(i(r)&&n.cellRendererParams&&n.cellRendererParams.innerRenderer)return this.userComponentFactory.getInnerRendererDetails(n.cellRendererParams,e)}addChildCount(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,ne.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())}updateChildCount(){const e=this.displayedGroupNode.allChildrenCount,s=this.isShowRowGroupForThisRow()&&e!=null&&e>=0?`(${e})`:"";this.comp.setChildCount(s)}isShowRowGroupForThisRow(){if(this.gos.get("treeData"))return!0;const e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;const t=this.params.column;return t==null||t.isRowGroupDisplayed(e.getId())}addExpandAndContract(){var e;const t=this.params,i=Ve("groupExpanded",this.gos,null),s=Ve("groupContracted",this.gos,null);i&&this.eExpanded.appendChild(i),s&&this.eContracted.appendChild(s);const n=t.eGridCell;!(((e=this.params.column)==null?void 0:e.isCellEditable(t.node))&&this.gos.get("enableGroupEdit"))&&this.isExpandable()&&!t.suppressDoubleClickExpand&&this.addManagedListener(n,"dblclick",this.onCellDblClicked.bind(this)),this.addManagedListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addManagedListener(n,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(t.node,ne.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();const o=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,ne.EVENT_ALL_CHILDREN_COUNT_CHANGED,o),this.addManagedListener(this.displayedGroupNode,ne.EVENT_MASTER_CHANGED,o),this.addManagedListener(this.displayedGroupNode,ne.EVENT_GROUP_CHANGED,o),this.addManagedListener(this.displayedGroupNode,ne.EVENT_HAS_CHILDREN_CHANGED,o)}onExpandClicked(e){rs(e)||(as(e),this.onExpandOrContract(e))}onExpandOrContract(e){const t=this.displayedGroupNode,i=!t.expanded;!i&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(i,e)}scrollToStickyNode(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)}isExpandable(){if(this.showingValueForOpenedParent)return!0;const e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!(e.isExpandable()&&!e.footer&&!t))return!1;const s=this.params.column;return s!=null&&typeof s.getColDef().showRowGroup=="string"?this.isShowRowGroupForThisRow():!0}showExpandAndContractIcons(){const{params:e,displayedGroupNode:t,columnModel:i}=this,{node:s}=e,n=this.isExpandable();if(n){const u=this.showingValueForOpenedParent?!0:s.expanded;this.comp.setExpandedDisplayed(u),this.comp.setContractedDisplayed(!u)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);const r=i.isPivotMode(),o=r&&t.leafGroup,l=n&&!o,a=s.footer&&s.level===-1;this.comp.addOrRemoveCssClass("ag-cell-expandable",l),this.comp.addOrRemoveCssClass("ag-row-group",l),r?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",o):a||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!l)}onRowNodeIsExpandableChanged(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()}setupIndent(){const e=this.params.node;this.params.suppressPadding||(this.addManagedListener(e,ne.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())}setIndent(){if(this.gos.get("groupHideOpenParents"))return;const e=this.params,t=e.node,i=!!e.colDef,s=this.gos.get("treeData"),r=!i||s||e.colDef.showRowGroup===!0?t.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+r,this.comp.addOrRemoveCssClass(this.indentClass,!0)}addFullWidthRowDraggerIfNeeded(){if(!this.params.fullWidth||!this.params.rowDrag)return;const e=new Ar(()=>this.params.value,this.params.node);this.createManagedBean(e,this.context),this.eGui.insertAdjacentElement("afterbegin",e.getGui())}isUserWantsSelected(){const e=this.params.checkbox;return typeof e=="function"||e===!0}addCheckboxIfNeeded(){const e=this.displayedGroupNode,t=this.isUserWantsSelected()&&!e.footer&&!e.rowPinned&&!e.detail;if(t){const i=new Ph;this.getContext().createBean(i),i.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(i.getGui()),this.addDestroyFunc(()=>this.getContext().destroyBean(i))}this.comp.setCheckboxVisible(t)}onKeyDown(e){!(e.key===D.ENTER)||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){if(rs(e))return;fc(this.eExpanded,e)||fc(this.eContracted,e)||this.onExpandOrContract(e)}};h([f("expressionService")],$r.prototype,"expressionService",2);h([f("valueService")],$r.prototype,"valueService",2);h([f("columnModel")],$r.prototype,"columnModel",2);h([f("userComponentFactory")],$r.prototype,"userComponentFactory",2);h([f("ctrlsService")],$r.prototype,"ctrlsService",2);var jr=class CD extends te{constructor(){super(CD.TEMPLATE)}init(t){const i={setInnerRenderer:(o,l)=>this.setRenderDetails(o,l),setChildCount:o=>this.eChildCount.textContent=o,addOrRemoveCssClass:(o,l)=>this.addOrRemoveCssClass(o,l),setContractedDisplayed:o=>ue(this.eContracted,o),setExpandedDisplayed:o=>ue(this.eExpanded,o),setCheckboxVisible:o=>this.eCheckbox.classList.toggle("ag-invisible",!o)},s=this.createManagedBean(new $r),n=!t.colDef,r=this.getGui();s.init(i,r,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,t),n&&Ue(r,s.getCellAriaRole())}setRenderDetails(t,i){if(t){const s=t.newAgStackInstance();if(!s)return;s.then(n=>{if(!n)return;const r=()=>this.context.destroyBean(n);this.isAlive()?(this.eValue.appendChild(n.getGui()),this.addDestroyFunc(r)):r()})}else this.eValue.innerText=i}destroy(){this.getContext().destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}};jr.TEMPLATE=`<span class="ag-cell-wrapper">
|
|
216
|
+
<span class="ag-group-expanded" ref="eExpanded"></span>
|
|
217
|
+
<span class="ag-group-contracted" ref="eContracted"></span>
|
|
218
|
+
<span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>
|
|
219
|
+
<span class="ag-group-value" ref="eValue"></span>
|
|
220
|
+
<span class="ag-group-child-count" ref="eChildCount"></span>
|
|
221
|
+
</span>`;h([_("eExpanded")],jr.prototype,"eExpanded",2);h([_("eContracted")],jr.prototype,"eContracted",2);h([_("eCheckbox")],jr.prototype,"eCheckbox",2);h([_("eValue")],jr.prototype,"eValue",2);h([_("eChildCount")],jr.prototype,"eChildCount",2);var xy=jr,bh=class vD extends te{constructor(){super(vD.TEMPLATE)}init(t){t.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingError","ERR")}setupLoading(){const t=Ve("groupLoading",this.gos,null);t&&this.eLoadingIcon.appendChild(t);const i=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=i("loadingOoo","Loading")}refresh(t){return!1}destroy(){super.destroy()}};bh.TEMPLATE=`<div class="ag-loading">
|
|
222
|
+
<span class="ag-loading-icon" ref="eLoadingIcon"></span>
|
|
223
|
+
<span class="ag-loading-text" ref="eLoadingText"></span>
|
|
224
|
+
</div>`;h([_("eLoadingIcon")],bh.prototype,"eLoadingIcon",2);h([_("eLoadingText")],bh.prototype,"eLoadingText",2);var NM=bh,yD=class wD extends te{constructor(){super(wD.TEMPLATE)}init(t){const i=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",i),this.addDestroyFunc(()=>Uo(t.eParentOfValue)),Uo(t.eParentOfValue,i),t.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const t=this.localeService.getLocaleTextFunc();this.getGui().innerText=t("loadingError","ERR");const i=t("ariaSkeletonCellLoadingFailed","Row failed to load");Di(this.getGui(),i)}setupLoading(){const i=this.gos.getDocument().createElement("div");i.classList.add("ag-skeleton-effect"),this.getGui().appendChild(i);const n=this.localeService.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");Di(this.getGui(),n)}refresh(t){return!1}destroy(){super.destroy()}};yD.TEMPLATE='<div class="ag-skeleton-container"></div>';var _M=yD,SD=class ED extends te{constructor(){super()}destroy(){super.destroy()}init(t){const i=this.gos.get("overlayLoadingTemplate");if(this.setTemplate(i??ED.DEFAULT_LOADING_OVERLAY_TEMPLATE),!i){const s=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=s("loadingOoo","Loading...")})}}};SD.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>';var OM=SD,RD=class TD extends te{constructor(){super()}destroy(){super.destroy()}init(t){const i=this.gos.get("overlayNoRowsTemplate");if(this.setTemplate(i??TD.DEFAULT_NO_ROWS_TEMPLATE),!i){const s=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=s("noRowsToShow","No Rows To Show")})}}};RD.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center"></span>';var GM=RD,kM=class extends zr{constructor(){super('<div class="ag-tooltip"></div>')}init(e){const{value:t}=e;this.getGui().textContent=tt(t,!0)}},VM=class{getTemplate(){return'<ag-input-number-field class="ag-cell-editor" ref="eInput"></ag-input-number-field>'}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.addManagedListener(i,"keydown",this.preventStepping):t.showStepperButtons&&i.classList.add("ag-number-field-input-stepper")}preventStepping(e){(e.key===D.UP||e.key===D.DOWN)&&e.preventDefault()}getValue(){const e=this.eInput.getValue();if(!A(e)&&!A(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}},HM=class extends Du{constructor(){super(new VM)}},BM=class{getTemplate(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'}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!A(e)&&!A(this.params.value)?this.params.value:e??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return ki(e,!1)}},WM=class extends Du{constructor(){super(new BM)}},UM=class{constructor(e){this.getDataTypeService=e}getTemplate(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'}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!A(e)&&!A(this.params.value)?this.params.value:this.params.parseValue(e??"")}getStartValue(){var e,t;return ki((t=this.parseDate((e=this.params.value)!=null?e:void 0))!=null?t:null,!1)}parseDate(e){return this.getDataTypeService().getDateParserFunction(this.params.column)(e)}formatDate(e){return this.getDataTypeService().getDateFormatterFunction(this.params.column)(e)}},DD=class extends Du{constructor(){super(new UM(()=>this.dataTypeService))}};h([f("dataTypeService")],DD.prototype,"dataTypeService",2);var yC=class PD extends te{constructor(){super(PD.TEMPLATE)}init(t){this.params=t,this.updateCheckbox(t);const i=this.eCheckbox.getInputElement();i.setAttribute("tabindex","-1"),Vm(i,"polite"),this.addManagedListener(i,"click",s=>{if(as(s),this.eCheckbox.isDisabled())return;const n=this.eCheckbox.getValue();this.onCheckboxChanged(n)}),this.addManagedListener(i,"dblclick",s=>{as(s)}),this.addManagedListener(this.params.eGridCell,"keydown",s=>{if(s.key===D.SPACE&&!this.eCheckbox.isDisabled()){this.params.eGridCell===this.gos.getActiveDomElement()&&this.eCheckbox.toggle();const n=this.eCheckbox.getValue();this.onCheckboxChanged(n),s.preventDefault()}})}refresh(t){return this.params=t,this.updateCheckbox(t),!0}updateCheckbox(t){var i,s,n;let r,o=!0;if(t.node.group&&t.column){const c=t.column.getColId();c.startsWith(Wo)?r=t.value==null||t.value===""?void 0:t.value==="true":t.node.aggData&&t.node.aggData[c]!==void 0?r=(i=t.value)!=null?i:void 0:o=!1}else r=(s=t.value)!=null?s:void 0;if(!o){this.eCheckbox.setDisplayed(!1);return}this.eCheckbox.setValue(r);const l=t.disabled!=null?t.disabled:!((n=t.column)!=null&&n.isCellEditable(t.node));this.eCheckbox.setDisabled(l);const a=this.localeService.getLocaleTextFunc(),u=fh(a,r),d=l?u:`${a("ariaToggleCellValue","Press SPACE to toggle cell value")} (${u})`;this.eCheckbox.setInputAriaLabel(d)}onCheckboxChanged(t){const{column:i,node:s,rowIndex:n,value:r}=this.params,o={type:g.EVENT_CELL_EDITING_STARTED,column:i,colDef:i==null?void 0:i.getColDef(),data:s.data,node:s,rowIndex:n,rowPinned:s.rowPinned,value:r};this.eventService.dispatchEvent(o);const l=this.params.node.setDataValue(this.params.column,t,"edit"),a={type:g.EVENT_CELL_EDITING_STOPPED,column:i,colDef:i==null?void 0:i.getColDef(),data:s.data,node:s,rowIndex:n,rowPinned:s.rowPinned,value:r,oldValue:r,newValue:t,valueChanged:l};this.eventService.dispatchEvent(a)}};yC.TEMPLATE=`
|
|
225
|
+
<div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">
|
|
226
|
+
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
|
|
227
|
+
</div>`;h([_("eCheckbox")],yC.prototype,"eCheckbox",2);var zM=yC,bD=class extends zr{constructor(){super(`
|
|
228
|
+
<div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">
|
|
229
|
+
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
|
|
230
|
+
</div>`)}init(e){var t;this.params=e;const i=(t=e.value)!=null?t:void 0;this.eCheckbox.setValue(i),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(i),this.addManagedListener(this.eCheckbox,g.EVENT_FIELD_VALUE_CHANGED,n=>this.setAriaLabel(n.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=fh(t,e),s=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${s} (${i})`)}};h([_("eCheckbox")],bD.prototype,"eCheckbox",2);var $M=class extends te{constructor(){super(),this.setTemplate("<div></div>")}init(e){var t;this.params=e,this.cssClassPrefix=(t=this.params.cssClassPrefix)!=null?t:"ag-menu-option",this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addIcon(){if(this.params.isCompact)return;const e=ni(`<span ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`);this.params.checked?e.appendChild(Ve("check",this.gos)):this.params.icon&&(vu(this.params.icon)?e.appendChild(this.params.icon):typeof this.params.icon=="string"?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e)}addName(){const e=ni(`<span ref="eName" class="${this.getClassName("part")} ${this.getClassName("text")}">${this.params.name||""}</span>`);this.getGui().appendChild(e)}addShortcut(){if(this.params.isCompact)return;const e=ni(`<span ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(e)}addSubMenu(){const e=ni(`<span ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),t=this.getGui();if(this.params.subMenu){const i=this.gos.get("enableRtl")?"smallLeft":"smallRight";Us(t,!1),e.appendChild(Ve(i,this.gos))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}destroy(){super.destroy()}},wc=class extends L{constructor(){super(...arguments),this.agGridDefaults={agDateInput:eD,agColumnHeader:df,agColumnGroupHeader:AM,agSortIndicator:mC,agTextColumnFloatingFilter:FM,agNumberColumnFloatingFilter:bM,agDateColumnFloatingFilter:Th,agReadOnlyFloatingFilter:uC,agAnimateShowChangeCellRenderer:cD,agAnimateSlideCellRenderer:hD,agGroupCellRenderer:xy,agGroupRowRenderer:xy,agLoadingCellRenderer:NM,agSkeletonCellRenderer:_M,agCheckboxCellRenderer:zM,agCellEditor:Ay,agTextCellEditor:Ay,agNumberCellEditor:HM,agDateCellEditor:WM,agDateStringCellEditor:DD,agSelectCellEditor:vC,agLargeTextCellEditor:xM,agCheckboxCellEditor:bD,agTextColumnFilter:fC,agNumberColumnFilter:nD,agDateColumnFilter:JT,agLoadingOverlay:OM,agNoRowsOverlay:GM,agTooltipComponent:kM,agMenuItem:$M},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",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={}}init(){const e=this.gos.get("components");e!=null&&Lt(e,(t,i)=>this.registerJsComponent(t,i))}registerDefaultComponent(e,t){if(this.agGridDefaults[e]){console.error("Trying to overwrite a default component. You should call registerComponent");return}this.agGridDefaults[e]=t}registerJsComponent(e,t){this.jsComps[e]=t}retrieve(e,t){const i=(l,a)=>({componentFromFramework:a,component:l}),s=this.getFrameworkOverrides().frameworkComponent(t,this.gos.get("components"));if(s!=null)return i(s,!0);const n=this.jsComps[t];if(n){const l=this.getFrameworkOverrides().isFrameworkComponent(n);return i(n,l)}const r=this.agGridDefaults[t];if(r)return i(r,!1);const o=this.enterpriseAgDefaultCompsModule[t];return o?Ce.__assertRegistered(o,`AG Grid '${e}' component: ${t}`,this.context.getGridId()):Bo(()=>{this.warnAboutMissingComponent(e,t)},"MissingComp"+t),null}warnAboutMissingComponent(e,t){const i=[...Object.keys(this.agGridDefaults).filter(n=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(n)),...Object.keys(this.jsComps)],s=yu(t,i,!0,.8).values;console.warn(`AG Grid: 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&&console.warn(` Did you mean: [${s.slice(0,3)}]?`),console.warn(`If using a custom component check it has been registered as described in: ${this.getFrameworkOverrides().getDocLink("components/")}`)}};h([I],wc.prototype,"init",1);wc=h([B("userComponentRegistry")],wc);var jM={propertyName:"dateComponent",cellRenderer:!1},KM={propertyName:"headerComponent",cellRenderer:!1},YM={propertyName:"headerGroupComponent",cellRenderer:!1},Ly={propertyName:"cellRenderer",cellRenderer:!0},QM={propertyName:"loadingCellRenderer",cellRenderer:!0},qM={propertyName:"cellEditor",cellRenderer:!1},My={propertyName:"innerRenderer",cellRenderer:!0},XM={propertyName:"loadingOverlayComponent",cellRenderer:!1},ZM={propertyName:"noRowsOverlayComponent",cellRenderer:!1},JM={propertyName:"tooltipComponent",cellRenderer:!1},cf={propertyName:"filter",cellRenderer:!1},eI={propertyName:"floatingFilterComponent",cellRenderer:!1},tI={propertyName:"toolPanel",cellRenderer:!1},iI={propertyName:"statusPanel",cellRenderer:!1},sI={propertyName:"fullWidthCellRenderer",cellRenderer:!0},nI={propertyName:"loadingCellRenderer",cellRenderer:!0},rI={propertyName:"groupRowRenderer",cellRenderer:!0},oI={propertyName:"detailCellRenderer",cellRenderer:!0},lI={propertyName:"menuItem",cellRenderer:!1},FD=class{static getFloatingFilterType(e){return this.filterToFloatingFilterMapping[e]}};FD.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"};var Mn=class extends L{getHeaderCompDetails(e,t){return this.getCompDetails(e,KM,"agColumnHeader",t)}getHeaderGroupCompDetails(e){const t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,YM,"agColumnGroupHeader",e)}getFullWidthCellRendererDetails(e){return this.getCompDetails(this.gridOptions,sI,null,e,!0)}getFullWidthLoadingCellRendererDetails(e){return this.getCompDetails(this.gridOptions,nI,"agLoadingCellRenderer",e,!0)}getFullWidthGroupCellRendererDetails(e){return this.getCompDetails(this.gridOptions,rI,"agGroupRowRenderer",e,!0)}getFullWidthDetailCellRendererDetails(e){return this.getCompDetails(this.gridOptions,oI,"agDetailCellRenderer",e,!0)}getInnerRendererDetails(e,t){return this.getCompDetails(e,My,null,t)}getFullWidthGroupRowInnerCellRenderer(e,t){return this.getCompDetails(e,My,null,t)}getCellRendererDetails(e,t){return this.getCompDetails(e,Ly,null,t)}getLoadingCellRendererDetails(e,t){return this.getCompDetails(e,QM,"agSkeletonCellRenderer",t,!0)}getCellEditorDetails(e,t){return this.getCompDetails(e,qM,"agCellEditor",t,!0)}getFilterDetails(e,t,i){return this.getCompDetails(e,cf,i,t,!0)}getDateCompDetails(e){return this.getCompDetails(this.gridOptions,jM,"agDateInput",e,!0)}getLoadingOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,XM,"agLoadingOverlay",e,!0)}getNoRowsOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,ZM,"agNoRowsOverlay",e,!0)}getTooltipCompDetails(e){return this.getCompDetails(e.colDef,JM,"agTooltipComponent",e,!0)}getSetFilterCellRendererDetails(e,t){return this.getCompDetails(e,Ly,null,t)}getFloatingFilterCompDetails(e,t,i){return this.getCompDetails(e,eI,i,t)}getToolPanelCompDetails(e,t){return this.getCompDetails(e,tI,null,t,!0)}getStatusPanelCompDetails(e,t){return this.getCompDetails(e,iI,null,t,!0)}getMenuItemCompDetails(e,t){return this.getCompDetails(e,lI,"agMenuItem",t,!0)}getCompDetails(e,t,i,s,n=!1){const{propertyName:r,cellRenderer:o}=t;let{compName:l,jsComp:a,fwComp:u,paramsFromSelector:d,popupFromSelector:c,popupPositionFromSelector:p}=this.getCompKeys(e,t,s);const C=w=>{const m=this.userComponentRegistry.retrieve(r,w);m&&(a=m.componentFromFramework?void 0:m.component,u=m.componentFromFramework?m.component:void 0)};if(l!=null&&C(l),a==null&&u==null&&i!=null&&C(i),a&&o&&!this.agComponentUtils.doesImplementIComponent(a)&&(a=this.agComponentUtils.adaptFunction(r,a)),!a&&!u){n&&console.error(`AG Grid: Could not find component ${l}, did you forget to configure this component?`);return}const v=this.mergeParamsWithApplicationProvidedParams(e,t,s,d),S=a==null,E=a||u;return{componentFromFramework:S,componentClass:E,params:v,type:t,popupFromSelector:c,popupPositionFromSelector:p,newAgStackInstance:()=>this.newAgStackInstance(E,S,v,t)}}getCompKeys(e,t,i){const{propertyName:s}=t;let n,r,o,l,a,u;if(e){const d=e,c=d[s+"Selector"],p=c?c(i):null,C=v=>{typeof v=="string"?n=v:v!=null&&v!==!0&&(this.getFrameworkOverrides().isFrameworkComponent(v)?o=v:r=v)};p?(C(p.component),l=p.params,a=p.popup,u=p.popupPosition):C(d[s])}return{compName:n,jsComp:r,fwComp:o,paramsFromSelector:l,popupFromSelector:a,popupPositionFromSelector:u}}newAgStackInstance(e,t,i,s){const n=s.propertyName,r=!t;let o;if(r)o=new e;else{const a=this.componentMetadataProvider.retrieve(n);o=this.frameworkComponentWrapper.wrap(e,a.mandatoryMethodList,a.optionalMethodList,s)}const l=this.initComponent(o,i);return l==null?it.resolve(o):l.then(()=>o)}mergeParamsWithApplicationProvidedParams(e,t,i,s=null){const n=this.gos.getGridCommonParams();ii(n,i);const r=e,o=r&&r[t.propertyName+"Params"];if(typeof o=="function"){const l=o(i);ii(n,l)}else typeof o=="object"&&ii(n,o);return ii(n,s),n}initComponent(e,t){if(this.context.createBean(e),e.init!=null)return e.init(t)}getDefaultFloatingFilterType(e,t){if(e==null)return null;let i=null,{compName:s,jsComp:n,fwComp:r}=this.getCompKeys(e,cf);return s?i=FD.getFloatingFilterType(s):n==null&&r==null&&e.filter===!0&&(i=t()),i}};h([f("gridOptions")],Mn.prototype,"gridOptions",2);h([f("agComponentUtils")],Mn.prototype,"agComponentUtils",2);h([f("componentMetadataProvider")],Mn.prototype,"componentMetadataProvider",2);h([f("userComponentRegistry")],Mn.prototype,"userComponentRegistry",2);h([Se("frameworkComponentWrapper")],Mn.prototype,"frameworkComponentWrapper",2);Mn=h([B("userComponentFactory")],Mn);var AD=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(),n=this.scrollByTick;this.tickLeft=e.clientX<s.left+n,this.tickRight=e.clientX>s.right-n,this.tickUp=e.clientY<s.top+n&&!i,this.tickDown=e.clientY>s.bottom-n&&!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++;let e;if(e=this.tickCount>20?200:this.tickCount>10?80:40,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)}},Ai=class extends L{constructor(e){super(),this.eContainer=e}postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(e=>{const t=e.gridBodyCtrl;this.autoScrollService=new AD({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()?ie.ICON_NOT_ALLOWED:ie.ICON_MOVE}shouldPreventRowMove(){return!!(this.columnModel.getRowGroupColumns().length||this.filterManager.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((n,r)=>n.rowIndex==null||r.rowIndex==null?0:this.getRowIndexNumber(n)-this.getRowIndexNumber(r));if(s.indexOf(t)!==-1)return s}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent(g.EVENT_ROW_DRAG_ENTER,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()}isDropZoneWithinThisGrid(e){const i=this.ctrlsService.getGridBodyCtrl().getGui(),{dropZoneTarget:s}=e;return!i.contains(s)}onEnterOrDragging(e){this.dispatchGridEvent(g.EVENT_ROW_DRAG_MOVE,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"),n=e.dragItem.rowNodes;s&&this.shouldPreventRowMove()||(this.gos.get("suppressMoveWhenRowDragging")||!i?this.isDropZoneWithinThisGrid(e)||this.clientSideRowModel.highlightRowAtPixel(n[0],t):this.moveRows(n,t))}getRowIndexNumber(e){return parseInt(pe(e.getRowIndexString().split("-")),10)}moveRowAndClearHighlight(e){const t=this.clientSideRowModel.getLastHighlightedRowNode(),i=t&&t.highlighted===1,s=this.mouseEventService.getNormalisedPosition(e).y,n=e.dragItem.rowNodes;let r=i?1:0;if(this.isFromThisGrid(e))n.forEach(o=>{o.rowTop<s&&(r-=1)}),this.moveRows(n,s,r);else{const o=this.gos.getCallback("getRowId");let l=this.clientSideRowModel.getRowIndexAtPixel(s)+1;this.clientSideRowModel.getHighlightPosition(s)===0&&l--,this.clientSideRowModel.updateRowData({add:n.map(a=>a.data).filter(a=>!this.clientSideRowModel.getRowNode(o?o({data:a,level:0}):a.id)),addIndex:l})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t,i=0){var s;this.clientSideRowModel.ensureRowsAtPixel(e,t,i)&&(this.focusService.clearFocusedCell(),(s=this.rangeService)==null||s.removeAllCellRanges())}addRowDropZone(e){if(!e.getContainer()){Y("addRowDropZone - A container target needs to be provided");return}if(this.dragAndDropService.findExternalZone(e)){console.warn("AG Grid: 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=i=>{e.onDragEnter(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_ENTER,i))}),e.onDragLeave&&(t.onDragLeave=i=>{e.onDragLeave(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_LEAVE,i))}),e.onDragging&&(t.onDragging=i=>{e.onDragging(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_MOVE,i))}),e.onDragStop&&(t.onDragStop=i=>{e.onDragStop(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_END,i))})),this.dragAndDropService.addDropTarget(K({isInterestedIn:i=>i===2,getIconName:()=>ie.ICON_MOVE,external:!0},t))}getRowDropZone(e){const t=this.getContainer.bind(this),i=this.onDragEnter.bind(this),s=this.onDragLeave.bind(this),n=this.onDragging.bind(this),r=this.onDragStop.bind(this);return e?{getContainer:t,onDragEnter:e.onDragEnter?o=>{i(o),e.onDragEnter(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_ENTER,o))}:i,onDragLeave:e.onDragLeave?o=>{s(o),e.onDragLeave(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_LEAVE,o))}:s,onDragging:e.onDragging?o=>{n(o),e.onDragging(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_MOVE,o))}:n,onDragStop:e.onDragStop?o=>{r(o),e.onDragStop(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_END,o))}:r,fromGrid:!0}:{getContainer:t,onDragEnter:i,onDragLeave:s,onDragging:n,onDragStop:r,fromGrid:!0}}draggingToRowDragEvent(e,t){const i=this.mouseEventService.getNormalisedPosition(t).y,s=i>this.paginationProxy.getCurrentPageHeight();let n=-1,r;s||(n=this.rowModel.getRowIndexAtPixel(i),r=this.rowModel.getRow(n));let o;switch(t.vDirection){case 1:o="down";break;case 0:o="up";break;default:o=null;break}return this.gos.addGridCommonParams({type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:n,overNode:r,y:i,vDirection:o})}dispatchGridEvent(e,t){const i=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent(g.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent(g.EVENT_ROW_DRAG_END,e),this.stopDragging(e),this.gos.get("rowDragManaged")&&(this.gos.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&!this.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(t=>{t.setDragging(!1)})}};h([f("dragAndDropService")],Ai.prototype,"dragAndDropService",2);h([f("rowModel")],Ai.prototype,"rowModel",2);h([f("paginationProxy")],Ai.prototype,"paginationProxy",2);h([f("columnModel")],Ai.prototype,"columnModel",2);h([f("focusService")],Ai.prototype,"focusService",2);h([f("sortController")],Ai.prototype,"sortController",2);h([f("filterManager")],Ai.prototype,"filterManager",2);h([f("selectionService")],Ai.prototype,"selectionService",2);h([f("mouseEventService")],Ai.prototype,"mouseEventService",2);h([f("ctrlsService")],Ai.prototype,"ctrlsService",2);h([Se("rangeService")],Ai.prototype,"rangeService",2);h([I],Ai.prototype,"postConstruct",1);var Wa=class extends L{constructor(){super(...arguments),this.dragEndFunctions=[],this.dragSources=[]}removeAllListeners(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0}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),Jt(this.dragSources,t))}isDragging(){return this.dragging}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:i,includeTouch:s,stopPropagationForTouch:n}=e;i.addEventListener("mousedown",t);let r=null;const o=this.gos.get("suppressTouch");s&&!o&&(r=l=>{Zm(l.target)||(l.cancelable&&(l.preventDefault(),n&&l.stopPropagation()),this.onTouchStart(e,l))},i.addEventListener("touchstart",r,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:r,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),n=a=>this.onTouchUp(a,e.eElement),r=a=>{a.cancelable&&a.preventDefault()},o=t.target,l=[{target:this.gos.getRootNode(),type:"touchmove",listener:r,options:{passive:!1}},{target:o,type:"touchmove",listener:s,options:{passive:!0}},{target:o,type:"touchend",listener:n,options:{passive:!0}},{target:o,type:"touchcancel",listener:n,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=a=>this.onMouseMove(a,e.eElement),n=a=>this.onMouseUp(a,e.eElement),r=a=>a.preventDefault(),o=this.gos.getRootNode(),l=[{target:o,type:"mousemove",listener:s},{target:o,type:"mouseup",listener:n},{target:o,type:"contextmenu",listener:r}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:i,type:s,listener:n,options:r}=t;i.addEventListener(s,n,r)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:i,type:s,listener:n,options:r}=t;i.removeEventListener(s,n,r)})})}isEventNearStartEvent(e,t){const{dragStartPixels:i}=this.currentDragParams,s=A(i)?i:4;return lC(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){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,t))return;this.dragging=!0;const s={type:g.EVENT_DRAG_STARTED,target:i};this.eventService.dispatchEvent(s),this.currentDragParams.onDragStart(t),this.currentDragParams.onDragging(t)}this.currentDragParams.onDragging(e)}onTouchMove(e,t){const i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t)}onMouseMove(e,t){var i;Ts()&&((i=this.gos.getDocument().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){if(this.dragging){this.dragging=!1,this.currentDragParams.onDragStop(e);const i={type:g.EVENT_DRAG_STOPPED,target:t};this.eventService.dispatchEvent(i)}this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach(i=>i()),this.dragEndFunctions.length=0}};h([f("mouseEventService")],Wa.prototype,"mouseEventService",2);h([$t],Wa.prototype,"removeAllListeners",1);Wa=h([B("dragService")],Wa);var Ip="ag-list-item-hovered",xD=class extends L{constructor(e,t,i){super(),this.comp=e,this.virtualList=t,this.params=i,this.currentDragValue=null,this.lastHoveredListItem=null}postConstruct(){this.addManagedListener(this.params.eventSource,this.params.listItemDragStartEvent,this.listItemDragStart.bind(this)),this.addManagedListener(this.params.eventSource,this.params.listItemDragEndEvent,this.listItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService()}listItemDragStart(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){const e={isInterestedIn:t=>t===this.params.dragSourceType,getIconName:()=>this.moveBlocked?ie.ICON_PINNED:ie.ICON_MOVE,getContainer:()=>this.comp.getGui(),onDragging:t=>this.onDragging(t),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave()};this.dragAndDropService.addDropTarget(e)}createAutoScrollService(){const e=this.virtualList.getGui();this.autoScrollService=new AD({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;const t=this.getListDragItem(e),i=this.virtualList.getComponentAt(t.rowIndex);if(!i)return;const s=i.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,lf(s,Ip),lf(s,`ag-item-highlight-${t.position}`))}getListDragItem(e){const t=this.virtualList.getGui(),i=parseFloat(window.getComputedStyle(t).paddingTop),s=this.virtualList.getRowHeight(),n=this.virtualList.getScrollTop(),r=Math.max(0,(e.y-i+n)/s),o=this.params.getNumRows(this.comp)-1,l=Math.min(o,r)|0;return{rowIndex:l,position:Math.round(r)>r||r>o?"bottom":"top",component:this.virtualList.getComponentAt(l)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearHoveredItems(),this.autoScrollService.ensureCleared())}onDragLeave(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${Ip}`).forEach(t=>{[Ip,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(i=>{t.classList.remove(i)})}),this.lastHoveredListItem=null}};h([f("dragAndDropService")],xD.prototype,"dragAndDropService",2);h([I],xD.prototype,"postConstruct",1);function cr(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var le=class{constructor(){this.detailGridInfoMap={},this.destroyCalled=!1}init(){switch(this.rowModel.getType()){case"clientSide":this.clientSideRowModel=this.rowModel;break;case"infinite":this.infiniteRowModel=this.rowModel;break;case"serverSide":this.serverSideRowModel=this.rowModel;break}this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl})}__getAlignedGridService(){return this.alignedGridsService}getGridId(){return this.context.getGridId()}addDetailGridInfo(e,t){this.detailGridInfoMap[e]=t}removeDetailGridInfo(e){delete this.detailGridInfoMap[e]}getDetailGridInfo(e){return this.detailGridInfoMap[e]}forEachDetailGridInfo(e){let t=0;Lt(this.detailGridInfoMap,(i,s)=>{A(s)&&(e(s,t),t++)})}getDataAsCsv(e){if(Ce.__assertRegistered("@ag-grid-community/csv-export","api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(e)}exportDataAsCsv(e){Ce.__assertRegistered("@ag-grid-community/csv-export","api.exportDataAsCsv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(e)}assertNotExcelMultiSheet(e,t){return Ce.__assertRegistered("@ag-grid-enterprise/excel-export","api."+e,this.context.getGridId())?this.excelCreator.getFactoryMode()===1?(console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),!1):!0:!1}getDataAsExcel(e){if(this.assertNotExcelMultiSheet("getDataAsExcel",e))return this.excelCreator.getDataAsExcel(e)}exportDataAsExcel(e){this.assertNotExcelMultiSheet("exportDataAsExcel",e)&&this.excelCreator.exportDataAsExcel(e)}getSheetDataForExcel(e){if(Ce.__assertRegistered("@ag-grid-enterprise/excel-export","api.getSheetDataForExcel",this.context.getGridId()))return this.excelCreator.setFactoryMode(1),this.excelCreator.getSheetDataForExcel(e)}getMultipleSheetsAsExcel(e){if(Ce.__assertRegistered("@ag-grid-enterprise/excel-export","api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(e)}exportMultipleSheetsAsExcel(e){Ce.__assertRegistered("@ag-grid-enterprise/excel-export","api.exportMultipleSheetsAsExcel",this.context.getGridId())&&this.excelCreator.exportMultipleSheetsAsExcel(e)}setGridAriaProperty(e,t){if(!e)return;const i=this.ctrlsService.getGridBodyCtrl().getGui(),s=`aria-${e}`;t===null?i.removeAttribute(s):i.setAttribute(s,t)}logMissingRowModel(e,...t){console.error(`AG Grid: api.${e} can only be called when gridOptions.rowModelType is ${t.join(" or ")}`)}logDeprecation(e,t,i,s){Y(`Since ${e} api.${t} is deprecated. Please use ${i} instead. ${s??""}`)}getPinnedTopRowCount(){return this.pinnedRowModel.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.pinnedRowModel.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.pinnedRowModel.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.pinnedRowModel.getPinnedBottomRow(e)}expireValueCache(){this.valueCache.expire()}getVerticalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getVScrollPosition()}getHorizontalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getHScrollPosition()}refreshCells(e={}){this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.refreshCells(e))}flashCells(e={}){const t=i=>Y(`Since v31.1 api.flashCells parameter '${i}Delay' is deprecated. Please use '${i}Duration' instead.`);A(e.fadeDelay)&&t("fade"),A(e.flashDelay)&&t("flash"),this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.flashCells(e))}redrawRows(e={}){const t=e?e.rowNodes:void 0;this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.redrawRows(t))}refreshHeader(){this.frameworkOverrides.wrapIncoming(()=>this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}isAnyFilterPresent(){return this.filterManager.isAnyFilterPresent()}isColumnFilterPresent(){return this.filterManager.isColumnFilterPresent()||this.filterManager.isAggregateFilterPresent()}isQuickFilterPresent(){return this.filterManager.isQuickFilterPresent()}getModel(){return Y("Since v31.1 getModel() is deprecated. Please use the appropriate grid API methods instead."),this.rowModel}setRowNodeExpanded(e,t,i,s){this.expansionService.setRowNodeExpanded(e,t,i,s)}onGroupExpandedOrCollapsed(){if(J(this.clientSideRowModel)){this.logMissingRowModel("onGroupExpandedOrCollapsed","clientSide");return}this.expansionService.onGroupExpandedOrCollapsed()}refreshClientSideRowModel(e){if(J(this.clientSideRowModel)){this.logMissingRowModel("refreshClientSideRowModel","clientSide");return}this.clientSideRowModel.refreshModel(e)}isAnimationFrameQueueEmpty(){return this.animationFrameService.isQueueEmpty()}flushAllAnimationFrames(){this.animationFrameService.flushAllFrames()}getRowNode(e){return this.rowModel.getRowNode(e)}getSizesForCurrentTheme(){return{rowHeight:this.gos.getRowHeightAsNumber(),headerHeight:this.columnModel.getHeaderHeight()}}expandAll(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!0):this.logMissingRowModel("expandAll","clientSide","serverSide")}collapseAll(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!1):this.logMissingRowModel("collapseAll","clientSide","serverSide")}addRenderedRowListener(e,t,i){this.rowRenderer.addRenderedRowListener(e,t,i)}getQuickFilter(){return this.gos.get("quickFilterText")}getAdvancedFilterModel(){return Ce.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.getAdvancedFilterModel",this.context.getGridId())?this.filterManager.getAdvancedFilterModel():null}setAdvancedFilterModel(e){this.filterManager.setAdvancedFilterModel(e)}showAdvancedFilterBuilder(){Ce.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.setAdvancedFilterModel",this.context.getGridId())&&this.filterManager.showAdvancedFilterBuilder("api")}setNodesSelected(e){if(!e.nodes.every(o=>o.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),!1):o.id===void 0?(console.warn("AG Grid: cannot select node until id for node is known"),!1):!0))return;const{nodes:i,source:s,newValue:n}=e,r=i;this.selectionService.setNodesSelected({nodes:r,source:s??"api",newValue:n})}selectAll(e="apiSelectAll"){this.selectionService.selectAllRowNodes({source:e})}deselectAll(e="apiSelectAll"){this.selectionService.deselectAllRowNodes({source:e})}selectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.selectAllRowNodes({source:e,justFiltered:!0})}deselectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.deselectAllRowNodes({source:e,justFiltered:!0})}getServerSideSelectionState(){return J(this.serverSideRowModel)?(this.logMissingRowModel("getServerSideSelectionState","serverSide"),null):this.selectionService.getSelectionState()}setServerSideSelectionState(e){if(J(this.serverSideRowModel)){this.logMissingRowModel("setServerSideSelectionState","serverSide");return}this.selectionService.setSelectionState(e,"api")}selectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.selectAllRowNodes({source:e,justCurrentPage:!0})}deselectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.deselectAllRowNodes({source:e,justCurrentPage:!0})}showLoadingOverlay(){this.overlayService.showLoadingOverlay()}showNoRowsOverlay(){this.overlayService.showNoRowsOverlay()}hideOverlay(){this.overlayService.hideOverlay()}getSelectedNodes(){return this.selectionService.getSelectedNodes()}getSelectedRows(){return this.selectionService.getSelectedRows()}getBestCostNodeSelection(){if(J(this.clientSideRowModel)){this.logMissingRowModel("getBestCostNodeSelection","clientSide");return}return this.selectionService.getBestCostNodeSelection()}getRenderedNodes(){return this.rowRenderer.getRenderedNodes()}ensureColumnVisible(e,t="auto"){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(e,t),"ensureVisible")}ensureIndexVisible(e,t){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(e,t),"ensureVisible")}ensureNodeVisible(e,t=null){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(e,t),"ensureVisible")}forEachLeafNode(e){if(J(this.clientSideRowModel)){this.logMissingRowModel("forEachLeafNode","clientSide");return}this.clientSideRowModel.forEachLeafNode(e)}forEachNode(e,t){this.rowModel.forEachNode(e,t)}forEachNodeAfterFilter(e){if(J(this.clientSideRowModel)){this.logMissingRowModel("forEachNodeAfterFilter","clientSide");return}this.clientSideRowModel.forEachNodeAfterFilter(e)}forEachNodeAfterFilterAndSort(e){if(J(this.clientSideRowModel)){this.logMissingRowModel("forEachNodeAfterFilterAndSort","clientSide");return}this.clientSideRowModel.forEachNodeAfterFilterAndSort(e)}getFilterInstance(e,t){return Y("'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."),this.filterManager.getFilterInstance(e,t)}getColumnFilterInstance(e){return this.filterManager.getColumnFilterInstance(e)}destroyFilter(e){const t=this.columnModel.getPrimaryColumn(e);if(t)return this.filterManager.destroyFilter(t,"api")}getStatusPanel(e){if(!Ce.__assertRegistered("@ag-grid-enterprise/status-bar","api.getStatusPanel",this.context.getGridId()))return;const t=this.statusBarService.getStatusPanel(e);return cr(t)}getColumnDef(e){const t=this.columnModel.getPrimaryColumn(e);return t?t.getColDef():null}getColumnDefs(){return this.columnModel.getColumnDefs()}onFilterChanged(e="api"){this.filterManager.onFilterChanged({source:e})}onSortChanged(){this.sortController.onSortChanged("api")}setFilterModel(e){this.frameworkOverrides.wrapIncoming(()=>this.filterManager.setFilterModel(e))}getFilterModel(){return this.filterManager.getFilterModel()}getColumnFilterModel(e){return this.filterManager.getColumnFilterModel(e)}setColumnFilterModel(e,t){return this.filterManager.setColumnFilterModel(e,t)}getFocusedCell(){return this.focusService.getFocusedCell()}clearFocusedCell(){return this.focusService.clearFocusedCell()}setFocusedCell(e,t,i){this.focusService.setFocusedCell({rowIndex:e,column:t,rowPinned:i,forceBrowserFocus:!0})}addRowDropZone(e){this.gridBodyCtrl.getRowDragFeature().addRowDropZone(e)}removeRowDropZone(e){const t=this.dragAndDropService.findExternalZone(e);t&&this.dragAndDropService.removeDropTarget(t)}getRowDropZoneParams(e){return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(e)}assertSideBarLoaded(e){return Ce.__assertRegistered("@ag-grid-enterprise/side-bar","api."+e,this.context.getGridId())}isSideBarVisible(){return this.assertSideBarLoaded("isSideBarVisible")&&this.sideBarService.getSideBarComp().isDisplayed()}setSideBarVisible(e){this.assertSideBarLoaded("setSideBarVisible")&&this.sideBarService.getSideBarComp().setDisplayed(e)}setSideBarPosition(e){this.assertSideBarLoaded("setSideBarPosition")&&this.sideBarService.getSideBarComp().setSideBarPosition(e)}openToolPanel(e){this.assertSideBarLoaded("openToolPanel")&&this.sideBarService.getSideBarComp().openToolPanel(e,"api")}closeToolPanel(){this.assertSideBarLoaded("closeToolPanel")&&this.sideBarService.getSideBarComp().close("api")}getOpenedToolPanel(){return this.assertSideBarLoaded("getOpenedToolPanel")?this.sideBarService.getSideBarComp().openedItem():null}refreshToolPanel(){this.assertSideBarLoaded("refreshToolPanel")&&this.sideBarService.getSideBarComp().refresh()}isToolPanelShowing(){return this.assertSideBarLoaded("isToolPanelShowing")&&this.sideBarService.getSideBarComp().isToolPanelShowing()}getToolPanelInstance(e){if(this.assertSideBarLoaded("getToolPanelInstance")){const t=this.sideBarService.getSideBarComp().getToolPanelInstance(e);return cr(t)}}getSideBar(){if(this.assertSideBarLoaded("getSideBar"))return this.sideBarService.getSideBarComp().getDef()}resetRowHeights(){if(A(this.clientSideRowModel)){if(this.columnModel.isAutoRowHeightActive()){console.warn("AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");return}this.clientSideRowModel.resetRowHeights()}}setRowCount(e,t){if(this.serverSideRowModel){if(this.columnModel.isRowGroupEmpty()){this.serverSideRowModel.setRowCount(e,t);return}console.error("AG Grid: setRowCount cannot be used while using row grouping.");return}if(this.infiniteRowModel){this.infiniteRowModel.setRowCount(e,t);return}this.logMissingRowModel("setRowCount","infinite","serverSide")}onRowHeightChanged(){this.clientSideRowModel?this.clientSideRowModel.onRowHeightChanged():this.serverSideRowModel&&this.serverSideRowModel.onRowHeightChanged()}getValue(e,t){return this.logDeprecation("31.3","getValue","getCellValue"),this.getCellValue({colKey:e,rowNode:t})}getCellValue(e){var t;const{colKey:i,rowNode:s,useFormatter:n}=e;let r=(t=this.columnModel.getPrimaryColumn(i))!=null?t:this.columnModel.getGridColumn(i);if(J(r))return null;const o=this.valueService.getValue(r,s);if(n){const l=this.valueService.formatValue(r,s,o);return l??tt(o,!0)}return o}addEventListener(e,t){this.apiEventService.addEventListener(e,t)}addGlobalListener(e){this.apiEventService.addGlobalListener(e)}removeEventListener(e,t){this.apiEventService.removeEventListener(e,t)}removeGlobalListener(e){this.apiEventService.removeGlobalListener(e)}dispatchEvent(e){this.eventService.dispatchEvent(e)}destroy(){var e;const t=`See ${this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}`;if(this.destroyCalled)return;const i={type:g.EVENT_GRID_PRE_DESTROYED,state:this.getState()};this.dispatchEvent(i),this.destroyCalled=!0,(e=this.ctrlsService.get("gridCtrl"))==null||e.destroyGridUi(),this.context.destroy(),this.detailGridInfoMap={},bR(this,["isDestroyed"],t)}isDestroyed(){return this.destroyCalled}resetQuickFilter(){this.filterManager.resetQuickFilterCache()}getCellRanges(){return this.rangeService?this.rangeService.getCellRanges():(Ce.__assertRegistered("@ag-grid-enterprise/range-selection","api.getCellRanges",this.context.getGridId()),null)}addCellRange(e){if(this.rangeService){this.rangeService.addCellRange(e);return}Ce.__assertRegistered("@ag-grid-enterprise/range-selection","api.addCellRange",this.context.getGridId())}clearRangeSelection(){this.rangeService&&this.rangeService.removeAllCellRanges(),Ce.__assertRegistered("@ag-grid-enterprise/range-selection","gridApi.clearRangeSelection",this.context.getGridId())}undoCellEditing(){this.undoRedoService.undo("api")}redoCellEditing(){this.undoRedoService.redo("api")}getCurrentUndoSize(){return this.undoRedoService.getCurrentUndoStackSize()}getCurrentRedoSize(){return this.undoRedoService.getCurrentRedoStackSize()}assertChart(e,t){if(Ce.__assertRegistered("@ag-grid-enterprise/charts","api."+e,this.context.getGridId()))return this.frameworkOverrides.wrapIncoming(()=>t())}getChartModels(){return this.assertChart("getChartModels",()=>this.chartService.getChartModels())}getChartRef(e){return this.assertChart("getChartRef",()=>this.chartService.getChartRef(e))}getChartImageDataURL(e){return this.assertChart("getChartImageDataURL",()=>this.chartService.getChartImageDataURL(e))}downloadChart(e){return this.assertChart("downloadChart",()=>this.chartService.downloadChart(e))}openChartToolPanel(e){return this.assertChart("openChartToolPanel",()=>this.chartService.openChartToolPanel(e))}closeChartToolPanel(e){return this.assertChart("closeChartToolPanel",()=>this.chartService.closeChartToolPanel(e.chartId))}createRangeChart(e){return this.assertChart("createRangeChart",()=>this.chartService.createRangeChart(e))}createPivotChart(e){return this.assertChart("createPivotChart",()=>this.chartService.createPivotChart(e))}createCrossFilterChart(e){return this.assertChart("createCrossFilterChart",()=>this.chartService.createCrossFilterChart(e))}updateChart(e){return this.assertChart("updateChart",()=>this.chartService.updateChart(e))}restoreChart(e,t){return this.assertChart("restoreChart",()=>this.chartService.restoreChart(e,t))}assertClipboard(e,t){Ce.__assertRegistered("@ag-grid-enterprise/clipboard","api"+e,this.context.getGridId())&&t()}copyToClipboard(e){this.assertClipboard("copyToClipboard",()=>this.clipboardService.copyToClipboard(e))}cutToClipboard(e){this.assertClipboard("cutToClipboard",()=>this.clipboardService.cutToClipboard(e))}copySelectedRowsToClipboard(e){this.assertClipboard("copySelectedRowsToClipboard",()=>this.clipboardService.copySelectedRowsToClipboard(e))}copySelectedRangeToClipboard(e){this.assertClipboard("copySelectedRangeToClipboard",()=>this.clipboardService.copySelectedRangeToClipboard(e))}copySelectedRangeDown(){this.assertClipboard("copySelectedRangeDown",()=>this.clipboardService.copyRangeDown())}pasteFromClipboard(){this.assertClipboard("pasteFromClipboard",()=>this.clipboardService.pasteFromClipboard())}showColumnMenuAfterButtonClick(e,t){Y("'showColumnMenuAfterButtonClick' is deprecated. Use 'IHeaderParams.showColumnMenu' within a header component, or 'api.showColumnMenu' elsewhere.");const i=this.columnModel.getGridColumn(e);this.menuService.showColumnMenu({column:i,buttonElement:t,positionBy:"button"})}showColumnMenuAfterMouseClick(e,t){Y("'showColumnMenuAfterMouseClick' is deprecated. Use 'IHeaderParams.showColumnMenuAfterMouseClick' within a header component, or 'api.showColumnMenu' elsewhere.");let i=this.columnModel.getGridColumn(e);if(i||(i=this.columnModel.getPrimaryColumn(e)),!i){console.error(`AG Grid: column '${e}' not found`);return}this.menuService.showColumnMenu({column:i,mouseEvent:t,positionBy:"mouse"})}showContextMenu(e){const{rowNode:t,column:i,value:s,x:n,y:r}=e||{};let{x:o,y:l}=this.menuService.getContextMenuPosition(t,i);n!=null&&(o=n),r!=null&&(l=r),this.menuService.showContextMenu({mouseEvent:new MouseEvent("mousedown",{clientX:o,clientY:l}),rowNode:t,column:i,value:s})}showColumnChooser(e){this.menuService.showColumnChooser({chooserParams:e})}showColumnFilter(e){const t=this.columnModel.getGridColumn(e);if(!t){console.error(`AG Grid: column '${e}' not found`);return}this.menuService.showFilterMenu({column:t,containerType:"columnFilter",positionBy:"auto"})}showColumnMenu(e){const t=this.columnModel.getGridColumn(e);if(!t){console.error(`AG Grid: column '${e}' not found`);return}this.menuService.showColumnMenu({column:t,positionBy:"auto"})}hidePopupMenu(){this.menuService.hidePopupMenu()}hideColumnChooser(){this.menuService.hideColumnChooser()}tabToNextCell(e){return this.navigationService.tabToNextCell(!1,e)}tabToPreviousCell(e){return this.navigationService.tabToNextCell(!0,e)}getCellRendererInstances(e={}){return this.rowRenderer.getCellRendererInstances(e).map(cr)}getCellEditorInstances(e={}){return this.rowRenderer.getCellEditorInstances(e).map(cr)}getEditingCells(){return this.rowRenderer.getEditingCells()}stopEditing(e=!1){this.rowRenderer.stopEditing(e)}startEditingCell(e){const t=this.columnModel.getGridColumn(e.colKey);if(!t){console.warn(`AG Grid: no column found for ${e.colKey}`);return}const i={rowIndex:e.rowIndex,rowPinned:e.rowPinned||null,column:t};e.rowPinned==null&&this.ensureIndexVisible(e.rowIndex),this.ensureColumnVisible(e.colKey);const n=this.navigationService.getCellByPosition(i);n&&(this.focusService.isCellFocused(i)||this.focusService.setFocusedCell(i),n.startRowOrCellEdit(e.key))}addAggFunc(e,t){this.logDeprecation("v31.1","addAggFunc(key, func)","addAggFuncs({ key: func })"),this.aggFuncService&&this.aggFuncService.addAggFuncs({key:t})}addAggFuncs(e){this.aggFuncService&&this.aggFuncService.addAggFuncs(e)}clearAggFuncs(){this.aggFuncService&&this.aggFuncService.clear()}applyServerSideTransaction(e){if(!this.serverSideTransactionManager){this.logMissingRowModel("applyServerSideTransaction","serverSide");return}return this.serverSideTransactionManager.applyTransaction(e)}applyServerSideTransactionAsync(e,t){if(!this.serverSideTransactionManager){this.logMissingRowModel("applyServerSideTransactionAsync","serverSide");return}return this.serverSideTransactionManager.applyTransactionAsync(e,t)}applyServerSideRowData(e){var t,i;const s=(t=e.startRow)!=null?t:0,n=(i=e.route)!=null?i:[];if(s<0){console.warn(`AG Grid: invalid value ${e.startRow} for startRow, the value should be >= 0`);return}this.serverSideRowModel?this.serverSideRowModel.applyRowData(e.successParams,s,n):this.logMissingRowModel("setServerSideDatasource","serverSide")}retryServerSideLoads(){if(!this.serverSideRowModel){this.logMissingRowModel("retryServerSideLoads","serverSide");return}this.serverSideRowModel.retryLoads()}flushServerSideAsyncTransactions(){if(!this.serverSideTransactionManager){this.logMissingRowModel("flushServerSideAsyncTransactions","serverSide");return}return this.serverSideTransactionManager.flushAsyncTransactions()}applyTransaction(e){if(!this.clientSideRowModel){this.logMissingRowModel("applyTransaction","clientSide");return}return this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.updateRowData(e))}applyTransactionAsync(e,t){if(!this.clientSideRowModel){this.logMissingRowModel("applyTransactionAsync","clientSide");return}this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.batchUpdateRowData(e,t))}flushAsyncTransactions(){if(!this.clientSideRowModel){this.logMissingRowModel("flushAsyncTransactions","clientSide");return}this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.flushAsyncTransactions())}refreshInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.refreshCache():this.logMissingRowModel("refreshInfiniteCache","infinite")}purgeInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.purgeCache():this.logMissingRowModel("purgeInfiniteCache","infinite")}refreshServerSide(e){if(!this.serverSideRowModel){this.logMissingRowModel("refreshServerSide","serverSide");return}this.serverSideRowModel.refreshStore(e)}getServerSideGroupLevelState(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(this.logMissingRowModel("getServerSideGroupLevelState","serverSide"),[])}getInfiniteRowCount(){if(this.infiniteRowModel)return this.infiniteRowModel.getRowCount();this.logMissingRowModel("getInfiniteRowCount","infinite")}isLastRowIndexKnown(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();this.logMissingRowModel("isLastRowIndexKnown","infinite")}getCacheBlockState(){return this.rowNodeBlockLoader.getBlockState()}getFirstDisplayedRow(){return this.logDeprecation("v31.1","getFirstDisplayedRow","getFirstDisplayedRowIndex"),this.getFirstDisplayedRowIndex()}getFirstDisplayedRowIndex(){return this.rowRenderer.getFirstVirtualRenderedRow()}getLastDisplayedRow(){return this.logDeprecation("v31.1","getLastDisplayedRow","getLastDisplayedRowIndex"),this.getLastDisplayedRowIndex()}getLastDisplayedRowIndex(){return this.rowRenderer.getLastVirtualRenderedRow()}getDisplayedRowAtIndex(e){return this.rowModel.getRow(e)}getDisplayedRowCount(){return this.rowModel.getRowCount()}paginationIsLastPageFound(){return this.paginationProxy.isLastPageFound()}paginationGetPageSize(){return this.paginationProxy.getPageSize()}paginationGetCurrentPage(){return this.paginationProxy.getCurrentPage()}paginationGetTotalPages(){return this.paginationProxy.getTotalPages()}paginationGetRowCount(){return this.paginationProxy.getMasterRowCount()}paginationGoToNextPage(){this.paginationProxy.goToNextPage()}paginationGoToPreviousPage(){this.paginationProxy.goToPreviousPage()}paginationGoToFirstPage(){this.paginationProxy.goToFirstPage()}paginationGoToLastPage(){this.paginationProxy.goToLastPage()}paginationGoToPage(e){this.paginationProxy.goToPage(e)}sizeColumnsToFit(e){typeof e=="number"?this.columnModel.sizeColumnsToFit(e,"api"):this.gridBodyCtrl.sizeColumnsToFit(e)}setColumnGroupOpened(e,t){this.columnModel.setColumnGroupOpened(e,t,"api")}getColumnGroup(e,t){return this.columnModel.getColumnGroup(e,t)}getProvidedColumnGroup(e){return this.columnModel.getProvidedColumnGroup(e)}getDisplayNameForColumn(e,t){return this.columnModel.getDisplayNameForColumn(e,t)||""}getDisplayNameForColumnGroup(e,t){return this.columnModel.getDisplayNameForColumnGroup(e,t)||""}getColumn(e){return this.columnModel.getPrimaryColumn(e)}getColumns(){return this.columnModel.getAllPrimaryColumns()}applyColumnState(e){return this.columnModel.applyColumnState(e,"api")}getColumnState(){return this.columnModel.getColumnState()}resetColumnState(){this.columnModel.resetColumnState("api")}getColumnGroupState(){return this.columnModel.getColumnGroupState()}setColumnGroupState(e){this.columnModel.setColumnGroupState(e,"api")}resetColumnGroupState(){this.columnModel.resetColumnGroupState("api")}isPinning(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight()}isPinningLeft(){return this.columnModel.isPinningLeft()}isPinningRight(){return this.columnModel.isPinningRight()}getDisplayedColAfter(e){return this.columnModel.getDisplayedColAfter(e)}getDisplayedColBefore(e){return this.columnModel.getDisplayedColBefore(e)}setColumnVisible(e,t){this.logDeprecation("v31.1","setColumnVisible(key,visible)","setColumnsVisible([key],visible)"),this.columnModel.setColumnsVisible([e],t,"api")}setColumnsVisible(e,t){this.columnModel.setColumnsVisible(e,t,"api")}setColumnPinned(e,t){this.logDeprecation("v31.1","setColumnPinned(key,pinned)","setColumnsPinned([key],pinned)"),this.columnModel.setColumnsPinned([e],t,"api")}setColumnsPinned(e,t){this.columnModel.setColumnsPinned(e,t,"api")}getAllGridColumns(){return this.columnModel.getAllGridColumns()}getDisplayedLeftColumns(){return this.columnModel.getDisplayedLeftColumns()}getDisplayedCenterColumns(){return this.columnModel.getDisplayedCenterColumns()}getDisplayedRightColumns(){return this.columnModel.getDisplayedRightColumns()}getAllDisplayedColumns(){return this.columnModel.getAllDisplayedColumns()}getAllDisplayedVirtualColumns(){return this.columnModel.getViewportColumns()}moveColumn(e,t){this.logDeprecation("v31.1","moveColumn(key, toIndex)","moveColumns([key], toIndex)"),this.columnModel.moveColumns([e],t,"api")}moveColumnByIndex(e,t){this.columnModel.moveColumnByIndex(e,t,"api")}moveColumns(e,t){this.columnModel.moveColumns(e,t,"api")}moveRowGroupColumn(e,t){this.columnModel.moveRowGroupColumn(e,t,"api")}setColumnAggFunc(e,t){this.columnModel.setColumnAggFunc(e,t,"api")}setColumnWidth(e,t,i=!0,s="api"){this.logDeprecation("v31.1","setColumnWidth(col, width)","setColumnWidths([{key: col, newWidth: width}])"),this.columnModel.setColumnWidths([{key:e,newWidth:t}],!1,i,s)}setColumnWidths(e,t=!0,i="api"){this.columnModel.setColumnWidths(e,!1,t,i)}isPivotMode(){return this.columnModel.isPivotMode()}getPivotResultColumn(e,t){return this.columnModel.getSecondaryPivotColumn(e,t)}setValueColumns(e){this.columnModel.setValueColumns(e,"api")}getValueColumns(){return this.columnModel.getValueColumns()}removeValueColumn(e){this.logDeprecation("v31.1","removeValueColumn(colKey)","removeValueColumns([colKey])"),this.columnModel.removeValueColumns([e],"api")}removeValueColumns(e){this.columnModel.removeValueColumns(e,"api")}addValueColumn(e){this.logDeprecation("v31.1","addValueColumn(colKey)","addValueColumns([colKey])"),this.columnModel.addValueColumns([e],"api")}addValueColumns(e){this.columnModel.addValueColumns(e,"api")}setRowGroupColumns(e){this.columnModel.setRowGroupColumns(e,"api")}removeRowGroupColumn(e){this.logDeprecation("v31.1","removeRowGroupColumn(colKey)","removeRowGroupColumns([colKey])"),this.columnModel.removeRowGroupColumns([e],"api")}removeRowGroupColumns(e){this.columnModel.removeRowGroupColumns(e,"api")}addRowGroupColumn(e){this.logDeprecation("v31.1","addRowGroupColumn(colKey)","addRowGroupColumns([colKey])"),this.columnModel.addRowGroupColumns([e],"api")}addRowGroupColumns(e){this.columnModel.addRowGroupColumns(e,"api")}getRowGroupColumns(){return this.columnModel.getRowGroupColumns()}setPivotColumns(e){this.columnModel.setPivotColumns(e,"api")}removePivotColumn(e){this.logDeprecation("v31.1","removePivotColumn(colKey)","removePivotColumns([colKey])"),this.columnModel.removePivotColumns([e],"api")}removePivotColumns(e){this.columnModel.removePivotColumns(e,"api")}addPivotColumn(e){this.logDeprecation("v31.1","addPivotColumn(colKey)","addPivotColumns([colKey])"),this.columnModel.addPivotColumns([e],"api")}addPivotColumns(e){this.columnModel.addPivotColumns(e,"api")}getPivotColumns(){return this.columnModel.getPivotColumns()}getLeftDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeLeft()}getCenterDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeCentre()}getRightDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeRight()}getAllDisplayedColumnGroups(){return this.columnModel.getAllDisplayedTrees()}autoSizeColumn(e,t){return this.logDeprecation("v31.1","autoSizeColumn(key, skipHeader)","autoSizeColumns([key], skipHeader)"),this.columnModel.autoSizeColumns({columns:[e],skipHeader:t,source:"api"})}autoSizeColumns(e,t){this.columnModel.autoSizeColumns({columns:e,skipHeader:t,source:"api"})}autoSizeAllColumns(e){this.columnModel.autoSizeAllColumns("api",e)}setPivotResultColumns(e){this.columnModel.setSecondaryColumns(e,"api")}getPivotResultColumns(){return this.columnModel.getSecondaryColumns()}getState(){return this.stateService.getState()}getGridOption(e){return this.gos.get(e)}setGridOption(e,t){this.updateGridOptions({[e]:t})}updateGridOptions(e){this.gos.updateGridOptions({options:e})}__internalUpdateGridOptions(e,t){this.gos.updateGridOptions({options:e,force:t,source:"gridOptionsUpdated"})}deprecatedUpdateGridOption(e,t){Y(`set${e.charAt(0).toUpperCase()}${e.slice(1,e.length)} is deprecated. Please use 'api.setGridOption('${e}', newValue)' or 'api.updateGridOptions({ ${e}: newValue })' instead.`),this.setGridOption(e,t)}setPivotMode(e){this.deprecatedUpdateGridOption("pivotMode",e)}setPinnedTopRowData(e){this.deprecatedUpdateGridOption("pinnedTopRowData",e)}setPinnedBottomRowData(e){this.deprecatedUpdateGridOption("pinnedBottomRowData",e)}setPopupParent(e){this.deprecatedUpdateGridOption("popupParent",e)}setSuppressModelUpdateAfterUpdateTransaction(e){this.deprecatedUpdateGridOption("suppressModelUpdateAfterUpdateTransaction",e)}setDataTypeDefinitions(e){this.deprecatedUpdateGridOption("dataTypeDefinitions",e)}setPagination(e){this.deprecatedUpdateGridOption("pagination",e)}paginationSetPageSize(e){this.deprecatedUpdateGridOption("paginationPageSize",e)}setSideBar(e){this.deprecatedUpdateGridOption("sideBar",e)}setSuppressClipboardPaste(e){this.deprecatedUpdateGridOption("suppressClipboardPaste",e)}setGroupRemoveSingleChildren(e){this.deprecatedUpdateGridOption("groupRemoveSingleChildren",e)}setGroupRemoveLowestSingleChildren(e){this.deprecatedUpdateGridOption("groupRemoveLowestSingleChildren",e)}setGroupDisplayType(e){this.deprecatedUpdateGridOption("groupDisplayType",e)}setGroupIncludeFooter(e){this.deprecatedUpdateGridOption("groupIncludeFooter",e)}setGroupIncludeTotalFooter(e){this.deprecatedUpdateGridOption("groupIncludeTotalFooter",e)}setRowClass(e){this.deprecatedUpdateGridOption("rowClass",e)}setDeltaSort(e){this.deprecatedUpdateGridOption("deltaSort",e)}setSuppressRowDrag(e){this.deprecatedUpdateGridOption("suppressRowDrag",e)}setSuppressMoveWhenRowDragging(e){this.deprecatedUpdateGridOption("suppressMoveWhenRowDragging",e)}setSuppressRowClickSelection(e){this.deprecatedUpdateGridOption("suppressRowClickSelection",e)}setEnableAdvancedFilter(e){this.deprecatedUpdateGridOption("enableAdvancedFilter",e)}setIncludeHiddenColumnsInAdvancedFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInAdvancedFilter",e)}setAdvancedFilterParent(e){this.deprecatedUpdateGridOption("advancedFilterParent",e)}setAdvancedFilterBuilderParams(e){this.deprecatedUpdateGridOption("advancedFilterBuilderParams",e)}setQuickFilter(e){Y("setQuickFilter is deprecated. Please use 'api.setGridOption('quickFilterText', newValue)' or 'api.updateGridOptions({ quickFilterText: newValue })' instead."),this.gos.updateGridOptions({options:{quickFilterText:e}})}setExcludeHiddenColumnsFromQuickFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",!e)}setIncludeHiddenColumnsInQuickFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",e)}setQuickFilterParser(e){this.deprecatedUpdateGridOption("quickFilterParser",e)}setQuickFilterMatcher(e){this.deprecatedUpdateGridOption("quickFilterMatcher",e)}setAlwaysShowHorizontalScroll(e){this.deprecatedUpdateGridOption("alwaysShowHorizontalScroll",e)}setAlwaysShowVerticalScroll(e){this.deprecatedUpdateGridOption("alwaysShowVerticalScroll",e)}setFunctionsReadOnly(e){this.deprecatedUpdateGridOption("functionsReadOnly",e)}setColumnDefs(e,t="api"){Y("setColumnDefs is deprecated. Please use 'api.setGridOption('columnDefs', newValue)' or 'api.updateGridOptions({ columnDefs: newValue })' instead."),this.gos.updateGridOptions({options:{columnDefs:e},source:t})}setAutoGroupColumnDef(e,t="api"){Y("setAutoGroupColumnDef is deprecated. Please use 'api.setGridOption('autoGroupColumnDef', newValue)' or 'api.updateGridOptions({ autoGroupColumnDef: newValue })' instead."),this.gos.updateGridOptions({options:{autoGroupColumnDef:e},source:t})}setDefaultColDef(e,t="api"){Y("setDefaultColDef is deprecated. Please use 'api.setGridOption('defaultColDef', newValue)' or 'api.updateGridOptions({ defaultColDef: newValue })' instead."),this.gos.updateGridOptions({options:{defaultColDef:e},source:t})}setColumnTypes(e,t="api"){Y("setColumnTypes is deprecated. Please use 'api.setGridOption('columnTypes', newValue)' or 'api.updateGridOptions({ columnTypes: newValue })' instead."),this.gos.updateGridOptions({options:{columnTypes:e},source:t})}setTreeData(e){this.deprecatedUpdateGridOption("treeData",e)}setServerSideDatasource(e){this.deprecatedUpdateGridOption("serverSideDatasource",e)}setCacheBlockSize(e){this.deprecatedUpdateGridOption("cacheBlockSize",e)}setDatasource(e){this.deprecatedUpdateGridOption("datasource",e)}setViewportDatasource(e){this.deprecatedUpdateGridOption("viewportDatasource",e)}setRowData(e){this.deprecatedUpdateGridOption("rowData",e)}setEnableCellTextSelection(e){this.deprecatedUpdateGridOption("enableCellTextSelection",e)}setHeaderHeight(e){this.deprecatedUpdateGridOption("headerHeight",e)}setDomLayout(e){this.deprecatedUpdateGridOption("domLayout",e)}setFillHandleDirection(e){this.deprecatedUpdateGridOption("fillHandleDirection",e)}setGroupHeaderHeight(e){this.deprecatedUpdateGridOption("groupHeaderHeight",e)}setFloatingFiltersHeight(e){this.deprecatedUpdateGridOption("floatingFiltersHeight",e)}setPivotHeaderHeight(e){this.deprecatedUpdateGridOption("pivotHeaderHeight",e)}setPivotGroupHeaderHeight(e){this.deprecatedUpdateGridOption("pivotGroupHeaderHeight",e)}setAnimateRows(e){this.deprecatedUpdateGridOption("animateRows",e)}setIsExternalFilterPresent(e){this.deprecatedUpdateGridOption("isExternalFilterPresent",e)}setDoesExternalFilterPass(e){this.deprecatedUpdateGridOption("doesExternalFilterPass",e)}setNavigateToNextCell(e){this.deprecatedUpdateGridOption("navigateToNextCell",e)}setTabToNextCell(e){this.deprecatedUpdateGridOption("tabToNextCell",e)}setTabToNextHeader(e){this.deprecatedUpdateGridOption("tabToNextHeader",e)}setNavigateToNextHeader(e){this.deprecatedUpdateGridOption("navigateToNextHeader",e)}setRowGroupPanelShow(e){this.deprecatedUpdateGridOption("rowGroupPanelShow",e)}setGetGroupRowAgg(e){this.deprecatedUpdateGridOption("getGroupRowAgg",e)}setGetBusinessKeyForNode(e){this.deprecatedUpdateGridOption("getBusinessKeyForNode",e)}setGetChildCount(e){this.deprecatedUpdateGridOption("getChildCount",e)}setProcessRowPostCreate(e){this.deprecatedUpdateGridOption("processRowPostCreate",e)}setGetRowId(e){Y("getRowId is a static property and can no longer be updated.")}setGetRowClass(e){this.deprecatedUpdateGridOption("getRowClass",e)}setIsFullWidthRow(e){this.deprecatedUpdateGridOption("isFullWidthRow",e)}setIsRowSelectable(e){this.deprecatedUpdateGridOption("isRowSelectable",e)}setIsRowMaster(e){this.deprecatedUpdateGridOption("isRowMaster",e)}setPostSortRows(e){this.deprecatedUpdateGridOption("postSortRows",e)}setGetDocument(e){this.deprecatedUpdateGridOption("getDocument",e)}setGetContextMenuItems(e){this.deprecatedUpdateGridOption("getContextMenuItems",e)}setGetMainMenuItems(e){this.deprecatedUpdateGridOption("getMainMenuItems",e)}setProcessCellForClipboard(e){this.deprecatedUpdateGridOption("processCellForClipboard",e)}setSendToClipboard(e){this.deprecatedUpdateGridOption("sendToClipboard",e)}setProcessCellFromClipboard(e){this.deprecatedUpdateGridOption("processCellFromClipboard",e)}setProcessPivotResultColDef(e){this.deprecatedUpdateGridOption("processPivotResultColDef",e)}setProcessPivotResultColGroupDef(e){this.deprecatedUpdateGridOption("processPivotResultColGroupDef",e)}setPostProcessPopup(e){this.deprecatedUpdateGridOption("postProcessPopup",e)}setInitialGroupOrderComparator(e){this.deprecatedUpdateGridOption("initialGroupOrderComparator",e)}setGetChartToolbarItems(e){this.deprecatedUpdateGridOption("getChartToolbarItems",e)}setPaginationNumberFormatter(e){this.deprecatedUpdateGridOption("paginationNumberFormatter",e)}setGetServerSideGroupLevelParams(e){this.deprecatedUpdateGridOption("getServerSideGroupLevelParams",e)}setIsServerSideGroupOpenByDefault(e){this.deprecatedUpdateGridOption("isServerSideGroupOpenByDefault",e)}setIsApplyServerSideTransaction(e){this.deprecatedUpdateGridOption("isApplyServerSideTransaction",e)}setIsServerSideGroup(e){this.deprecatedUpdateGridOption("isServerSideGroup",e)}setGetServerSideGroupKey(e){this.deprecatedUpdateGridOption("getServerSideGroupKey",e)}setGetRowStyle(e){this.deprecatedUpdateGridOption("getRowStyle",e)}setGetRowHeight(e){this.deprecatedUpdateGridOption("getRowHeight",e)}};h([f("rowRenderer")],le.prototype,"rowRenderer",2);h([f("navigationService")],le.prototype,"navigationService",2);h([f("filterManager")],le.prototype,"filterManager",2);h([f("columnModel")],le.prototype,"columnModel",2);h([f("selectionService")],le.prototype,"selectionService",2);h([f("gridOptionsService")],le.prototype,"gos",2);h([f("valueService")],le.prototype,"valueService",2);h([f("alignedGridsService")],le.prototype,"alignedGridsService",2);h([f("eventService")],le.prototype,"eventService",2);h([f("pinnedRowModel")],le.prototype,"pinnedRowModel",2);h([f("context")],le.prototype,"context",2);h([f("rowModel")],le.prototype,"rowModel",2);h([f("sortController")],le.prototype,"sortController",2);h([f("paginationProxy")],le.prototype,"paginationProxy",2);h([f("focusService")],le.prototype,"focusService",2);h([f("dragAndDropService")],le.prototype,"dragAndDropService",2);h([f("menuService")],le.prototype,"menuService",2);h([f("valueCache")],le.prototype,"valueCache",2);h([f("animationFrameService")],le.prototype,"animationFrameService",2);h([f("ctrlsService")],le.prototype,"ctrlsService",2);h([f("overlayService")],le.prototype,"overlayService",2);h([f("stateService")],le.prototype,"stateService",2);h([f("expansionService")],le.prototype,"expansionService",2);h([f("apiEventService")],le.prototype,"apiEventService",2);h([f("frameworkOverrides")],le.prototype,"frameworkOverrides",2);h([f("undoRedoService")],le.prototype,"undoRedoService",2);h([f("rowNodeBlockLoader")],le.prototype,"rowNodeBlockLoader",2);h([Se("csvCreator")],le.prototype,"csvCreator",2);h([Se("excelCreator")],le.prototype,"excelCreator",2);h([Se("rangeService")],le.prototype,"rangeService",2);h([Se("clipboardService")],le.prototype,"clipboardService",2);h([Se("aggFuncService")],le.prototype,"aggFuncService",2);h([Se("statusBarService")],le.prototype,"statusBarService",2);h([Se("chartService")],le.prototype,"chartService",2);h([Se("ssrmTransactionManager")],le.prototype,"serverSideTransactionManager",2);h([Se("sideBarService")],le.prototype,"sideBarService",2);h([I],le.prototype,"init",1);le=h([B("gridApi")],le);var ri=class extends L{constructor(){super(...arguments),this.quickFilter=null,this.quickFilterParts=null}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,()=>{this.gos.get("includeHiddenColumnsInQuickFilter")||this.resetQuickFilterCache()}),this.addManagedPropertyListener("quickFilterText",e=>this.setQuickFilter(e.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())}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 A(e)?this.gos.isRowModelType("clientSide")?e.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null}setQuickFilter(e){if(e!=null&&typeof e!="string"){console.warn(`AG Grid - 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.dispatchEvent({type:ri.EVENT_QUICK_FILTER_CHANGED}))}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.dispatchEvent({type:ri.EVENT_QUICK_FILTER_CHANGED}))}onQuickFilterColumnConfigChanged(){this.columnModel.refreshQuickFilterColumns(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchEvent({type:ri.EVENT_QUICK_FILTER_CHANGED})}doesRowPassQuickFilterNoCache(e,t){return this.columnModel.getAllColumnsForQuickFilter().some(s=>{const n=this.getQuickFilterTextForColumn(s,e);return A(n)&&n.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:n}=this;return n(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 n=this.gos.addGridCommonParams({value:i,node:t,data:t.data,column:e,colDef:s});i=s.getQuickFilterText(n)}return A(i)?i.toString().toUpperCase():null}getQuickFilterAggregateText(e){const t=[];return this.columnModel.getAllColumnsForQuickFilter().forEach(s=>{const n=this.getQuickFilterTextForColumn(s,e);A(n)&&t.push(n)}),t.join(ri.QUICK_FILTER_SEPARATOR)}};ri.EVENT_QUICK_FILTER_CHANGED="quickFilterChanged";ri.QUICK_FILTER_SEPARATOR=`
|
|
231
|
+
`;h([f("valueService")],ri.prototype,"valueService",2);h([f("columnModel")],ri.prototype,"columnModel",2);h([f("rowModel")],ri.prototype,"rowModel",2);h([I],ri.prototype,"postConstruct",1);ri=h([B("quickFilterService")],ri);var Wi=class extends L{constructor(){super(...arguments),this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue=[]}init(){var e,t,i;this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,()=>this.onColumnsChanged()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,g.EVENT_ROW_DATA_UPDATED,()=>this.onNewRowsLoaded("rowDataUpdated")),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.addManagedPropertyListener("advancedFilterModel",s=>this.setAdvancedFilterModel(s.currentValue)),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,({enabled:s})=>this.onAdvancedFilterEnabledChanged(s)),this.addManagedListener(this.eventService,g.EVENT_DATA_TYPES_INFERRED,()=>this.processFilterModelUpdateQueue()),this.addManagedListener(this.quickFilterService,ri.EVENT_QUICK_FILTER_CHANGED,()=>this.onFilterChanged({source:"quickFilter"})),this.initialFilterModel=K({},(i=(t=(e=this.gos.get("initialState"))==null?void 0:e.filter)==null?void 0:t.filterModel)!=null?i:{})}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"){if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}if(this.dataTypeService.isPendingInference()){this.filterModelUpdateQueue.push({model:e,source:t});return}const i=[],s=this.getFilterModel();if(e){const n=aC(Object.keys(e));this.allColumnFilters.forEach((r,o)=>{const l=e[o];i.push(this.setModelOnFilterWrapper(r.filterPromise,l)),n.delete(o)}),n.forEach(r=>{const o=this.columnModel.getPrimaryColumn(r)||this.columnModel.getGridColumn(r);if(!o){console.warn("AG Grid: setFilterModel() - no column found for colId: "+r);return}if(!o.isFilterAllowed()){console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+r);return}const l=this.getOrCreateFilterWrapper(o,"NO_UI");if(!l){console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+r);return}i.push(this.setModelOnFilterWrapper(l.filterPromise,e[r]))})}else this.allColumnFilters.forEach(n=>{i.push(this.setModelOnFilterWrapper(n.filterPromise,null))});it.all(i).then(()=>{const n=this.getFilterModel(),r=[];this.allColumnFilters.forEach((o,l)=>{const a=s?s[l]:null,u=n?n[l]:null;Z.jsonEquals(a,u)||r.push(o.column)}),r.length>0&&this.onFilterChanged({columns:r,source:t})})}setModelOnFilterWrapper(e,t){return new it(i=>{e.then(s=>{typeof s.setModel!="function"&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),i()),(s.setModel(t)||it.resolve()).then(()=>i())})})}getFilterModel(){const e={};return this.allColumnFilters.forEach((t,i)=>{const s=this.getModelFromFilterWrapper(t);A(s)&&(e[i]=s)}),e}getModelFromFilterWrapper(e){var t;const s=e.filterPromise.resolveNow(null,n=>n);return s==null?(t=this.initialFilterModel[e.column.getColId()])!=null?t:null:typeof s.getModel!="function"?(console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel"),null):s.getModel()}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}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;e?this.allColumnFilters.size&&(this.allColumnFilters.forEach(i=>this.disposeFilterWrapper(i,"advancedFilterEnabled")),this.onFilterChanged({source:"advancedFilter"})):(t=this.advancedFilterService)!=null&&t.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()}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;const e=s=>s?s.isFilterActive?s.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1):!1,t=!!this.gos.getGroupAggFiltering(),i=s=>{if(!s.isPrimary())return!0;const r=!this.columnModel.isPivotActive();return!s.isValueActive()||!r?!1:this.columnModel.isPivotMode()?!0:t};this.allColumnFilters.forEach(s=>{if(s.filterPromise.resolveNow(!1,e)){const n=s.filterPromise.resolveNow(null,r=>r);i(s.column)?this.activeAggregateFilters.push(n):this.activeColumnFilters.push(n)}})}updateFilterFlagInColumns(e,t){this.allColumnFilters.forEach(i=>{const s=i.filterPromise.resolveNow(!1,n=>n.isFilterActive());i.column.setFilterActive(s,e,t)})}isAnyFilterPresent(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}doColumnFiltersPass(e,t,i){const{data:s,aggData:n}=e,r=i?this.activeAggregateFilters:this.activeColumnFilters,o=i?n:s;for(let l=0;l<r.length;l++){const a=r[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:o}))return!1}}return!0}resetQuickFilterCache(){this.quickFilterService.resetQuickFilterCache()}refreshFiltersForAggregations(){this.gos.getGroupAggFiltering()&&this.onFilterChanged()}callOnFilterChangedOutsideRenderCycle(e){const t=()=>this.onFilterChanged(e);this.rowRenderer.isRefreshInProgress()?setTimeout(t,0):t()}onFilterChanged(e={}){const{source:t,filterInstance:i,additionalEventAttributes:s,columns:n}=e;this.updateDependantFilters(),this.updateActiveFilters(),this.updateFilterFlagInColumns("filterChanged",s),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.allColumnFilters.forEach(o=>{o.filterPromise&&o.filterPromise.then(l=>{l&&l!==i&&l.onAnyFilterChanged&&l.onAnyFilterChanged()})});const r={source:t,type:g.EVENT_FILTER_CHANGED,columns:n||[]};s&&ii(r,s),this.processingFilterChange=!0,this.eventService.dispatchEvent(r),this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){var e;return!((e=this.gos.get("allowShowChangeAfterFilter"))!=null?e:!1)&&this.processingFilterChange}isQuickFilterPresent(){return this.quickFilterService.isQuickFilterPresent()}updateAggFiltering(){this.aggFiltering=!!this.gos.getGroupAggFiltering()}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.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))}doesRowPassFilter(e){return!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isExternalFilterPresent()&&!this.doesExternalFilterPass(e.rowNode)||this.isColumnFilterPresent()&&!this.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip)||this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(e.rowNode))}onNewRowsLoaded(e){this.allColumnFilters.forEach(t=>{t.filterPromise.then(i=>{i.onNewRowsLoaded&&i.onNewRowsLoaded()})}),this.updateFilterFlagInColumns(e,{afterDataChange:!0}),this.updateActiveFilters()}createValueGetter(e){return({node:t})=>this.valueService.getValue(e,t,!0)}createGetValue(e){return(t,i)=>{const s=i?this.columnModel.getGridColumn(i):e;return s?this.valueService.getValue(s,t,!0):void 0}}getFilterComponent(e,t,i=!0){var s;if(i)return((s=this.getOrCreateFilterWrapper(e,t))==null?void 0:s.filterPromise)||null;const n=this.cachedFilter(e);return n?n.filterPromise:null}isFilterActive(e){const t=this.cachedFilter(e);return!!t&&t.filterPromise.resolveNow(!1,i=>i.isFilterActive())}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return null;let i=this.cachedFilter(e);return i||(i=this.createFilterWrapper(e,t),this.setColumnFilterWrapper(e,i)),i}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t;if(Ce.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))t="agSetColumnFilter";else{const i=this.dataTypeService.getBaseDataType(e);i==="number"?t="agNumberColumnFilter":i==="date"||i==="dateString"?t="agDateColumnFilter":t="agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t;if(Ce.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))t="agSetColumnFloatingFilter";else{const i=this.dataTypeService.getBaseDataType(e);i==="number"?t="agNumberColumnFloatingFilter":i==="date"||i==="dateString"?t="agDateColumnFloatingFilter":t="agTextColumnFloatingFilter"}return t}createFilterInstance(e){const t=this.getDefaultFilter(e),i=e.getColDef();let s;const n=Ie(K({},this.createFilterParams(e,i)),{filterModifiedCallback:()=>this.filterModifiedCallbackFactory(s,e)(),filterChangedCallback:o=>this.filterChangedCallbackFactory(s,e)(o),doesRowPassOtherFilter:o=>this.doesRowPassOtherFilters(s,o)}),r=this.userComponentFactory.getFilterDetails(i,n,t);return r?{filterPromise:()=>{const o=r.newAgStackInstance();return o&&o.then(l=>s=l),o},compDetails:r}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return this.gos.addGridCommonParams({column:e,colDef:Im(t),rowModel:this.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},valueGetter:this.createValueGetter(e),getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e,t){var i;const s={column:e,filterPromise:null,compiledElement:null,compDetails:null},{filterPromise:n,compDetails:r}=this.createFilterInstance(e);return s.filterPromise=(i=n==null?void 0:n())!=null?i:null,s.compDetails=r,s}onColumnsChanged(){const e=[];this.allColumnFilters.forEach((t,i)=>{let s;t.column.isPrimary()?s=this.columnModel.getPrimaryColumn(i):s=this.columnModel.getGridColumn(i),!(s&&s===t.column)&&(e.push(t.column),this.disposeFilterWrapper(t,"columnChanged"),this.disposeColumnListener(i))}),e.length>0?this.onFilterChanged({columns:e,source:"api"}):this.updateDependantFilters()}updateDependantFilters(){const e=this.columnModel.getGroupAutoColumns();e==null||e.forEach(t=>{t.getColDef().filter==="agGroupColumnFilter"&&this.getOrCreateFilterWrapper(t,"NO_UI")})}isFilterAllowed(e){var t,i;if(this.isAdvancedFilterEnabled()||!e.isFilterAllowed())return!1;const n=this.allColumnFilters.get(e.getColId());return(i=(t=n==null?void 0:n.filterPromise)==null?void 0:t.resolveNow(!0,r=>typeof(r==null?void 0:r.isFilterAllowed)=="function"?r==null?void 0:r.isFilterAllowed():!0))!=null?i:!0}getFloatingFilterCompDetails(e,t){const i=a=>{const u=this.getFilterComponent(e,"NO_UI");u!=null&&u.then(d=>{a(cr(d))})},s=e.getColDef(),n=Ie(K({},this.createFilterParams(e,s)),{filterChangedCallback:()=>i(a=>this.filterChangedCallbackFactory(a,e)())}),r=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(s,cf,n);let o=this.userComponentFactory.getDefaultFloatingFilterType(s,()=>this.getDefaultFloatingFilter(e));o==null&&(o="agReadOnlyFloatingFilter");const l={column:e,filterParams:r,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:i,showParentFilter:t,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(s,l,o)}getCurrentFloatingFilterParentModel(e){const t=this.getFilterComponent(e,"NO_UI",!1);return t?t.resolveNow(null,i=>i&&i.getModel()):null}destroyFilter(e,t="api"){const i=e.getColId(),s=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialFilterModel[i],s&&(this.disposeFilterWrapper(s,t),this.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.getContext().destroyBean(i),e.column.setFilterActive(!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId());const s={type:g.EVENT_FILTER_DESTROYED,source:t,column:e.column};this.eventService.dispatchEvent(s)})}filterModifiedCallbackFactory(e,t){return()=>{const i={type:g.EVENT_FILTER_MODIFIED,column:t,filterInstance:e};this.eventService.dispatchEvent(i)}}filterChangedCallbackFactory(e,t){return i=>{var s;const n=(s=i==null?void 0:i.source)!=null?s:"api",r={filter:e,additionalEventAttributes:i,columns:[t],source:n};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 n=i.getColDef().filterParams;if(!t.filterPromise){this.destroyFilter(i,"paramsUpdated");return}t.filterPromise.then(r=>{(r!=null&&r.refresh?r.refresh(K(Ie(K({},this.createFilterParams(i,i.getColDef())),{filterModifiedCallback:this.filterModifiedCallbackFactory(r,i),filterChangedCallback:this.filterChangedCallbackFactory(r,i),doesRowPassOtherFilter:l=>this.doesRowPassOtherFilters(r,l)}),n)):!0)===!1&&this.destroyFilter(i,"paramsUpdated")})}setColumnFilterWrapper(e,t){const i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListener(e,Pe.EVENT_COL_DEF_CHANGED,()=>this.checkDestroyFilter(i)))}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)}getAdvancedFilterModel(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null}setAdvancedFilterModel(e){if(this.isAdvancedFilterEnabled()){if(this.dataTypeService.isPendingInference()){this.advancedFilterModelUpdateQueue.push(e);return}this.advancedFilterService.setModel(e??null),this.onFilterChanged({source:"advancedFilter"})}}showAdvancedFilterBuilder(e){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder(e,!0)}updateAdvancedFilterColumns(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvancedFilterEnabled()?!1:this.columnModel.getAllGridColumns().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e,t){if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}const i=this.getFilterInstanceImpl(e,n=>{if(!t)return;const r=cr(n);t(r)});return cr(i)}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstance(e,i=>{t(i)})})}getFilterInstanceImpl(e,t){const i=this.columnModel.getPrimaryColumn(e);if(!i)return;const s=this.getFilterComponent(i,"NO_UI"),n=s&&s.resolveNow(null,r=>r);return n?setTimeout(t,0,n):s&&s.then(r=>{t(r)}),n}warnAdvancedFilters(){Y("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.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=[],this.advancedFilterModelUpdateQueue.forEach(e=>this.setAdvancedFilterModel(e)),this.advancedFilterModelUpdateQueue=[]}getColumnFilterModel(e){const t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){if(this.isAdvancedFilterEnabled())return this.warnAdvancedFilters(),Promise.resolve();if(this.dataTypeService.isPendingInference()){let r=()=>{};const o=new Promise(l=>{r=l});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:r}),o}const i=this.columnModel.getPrimaryColumn(e),s=i?this.getOrCreateFilterWrapper(i,"NO_UI"):null;return s?(r=>new Promise(o=>{r.then(l=>o(l))}))(this.setModelOnFilterWrapper(s.filterPromise,t)):Promise.resolve()}getFilterWrapper(e){var t;const i=this.columnModel.getPrimaryColumn(e);return i&&(t=this.cachedFilter(i))!=null?t:null}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}};h([f("valueService")],Wi.prototype,"valueService",2);h([f("columnModel")],Wi.prototype,"columnModel",2);h([f("rowModel")],Wi.prototype,"rowModel",2);h([f("userComponentFactory")],Wi.prototype,"userComponentFactory",2);h([f("rowRenderer")],Wi.prototype,"rowRenderer",2);h([f("dataTypeService")],Wi.prototype,"dataTypeService",2);h([f("quickFilterService")],Wi.prototype,"quickFilterService",2);h([Se("advancedFilterService")],Wi.prototype,"advancedFilterService",2);h([I],Wi.prototype,"init",1);Wi=h([B("filterManager")],Wi);var Fh=class extends te{constructor(e,t){super('<div class="ag-filter"></div>'),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedListener(this.eventService,g.EVENT_FILTER_DESTROYED,this.onFilterDestroyed.bind(this))}hasFilter(){return!!this.filterWrapper}getFilter(){var e,t;return(t=(e=this.filterWrapper)==null?void 0:e.filterPromise)!=null?t:null}afterInit(){var e,t,i;return(i=(t=(e=this.filterWrapper)==null?void 0:e.filterPromise)==null?void 0:t.then(()=>{}))!=null?i:it.resolve()}afterGuiAttached(e){var t,i;(i=(t=this.filterWrapper)==null?void 0:t.filterPromise)==null||i.then(s=>{var n;(n=s==null?void 0:s.afterGuiAttached)==null||n.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 t;const{column:i,source:s}=this;this.filterWrapper=this.filterManager.getOrCreateFilterWrapper(i,s),(t=this.filterWrapper)!=null&&t.filterPromise&&this.filterWrapper.filterPromise.then(n=>{let r=n.getGui();if(A(r)||console.warn(`AG Grid: getGui method from filter returned ${r}, it should be a DOM element or an HTML template string.`),typeof r=="string"&&(r=ni(r)),this.appendChild(r),e){const o={type:g.EVENT_FILTER_OPENED,column:i,source:s,eGui:this.getGui()};this.eventService.dispatchEvent(o)}})}onFilterDestroyed(e){(e.source==="api"||e.source==="paramsUpdated")&&e.column.getId()===this.column.getId()&&this.columnModel.getPrimaryColumn(this.column)&&(Xe(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}};h([f("filterManager")],Fh.prototype,"filterManager",2);h([f("columnModel")],Fh.prototype,"columnModel",2);h([I],Fh.prototype,"postConstruct",1);var wC=class extends te{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},Kr=class LD extends wC{constructor(t){super(LD.TEMPLATE,t)}postConstruct(){const t=this.getGui(),i={addOrRemoveCssClass:(s,n)=>this.addOrRemoveCssClass(s,n),addOrRemoveBodyCssClass:(s,n)=>this.eFloatingFilterBody.classList.toggle(s,n),setButtonWrapperDisplayed:s=>ue(this.eButtonWrapper,s),setCompDetails:s=>this.setCompDetails(s),getFloatingFilterComp:()=>this.compPromise,setWidth:s=>t.style.width=s,setMenuIcon:s=>this.eButtonShowMainFilter.appendChild(s)};this.ctrl.setComp(i,t,this.eButtonShowMainFilter,this.eFloatingFilterBody)}setCompDetails(t){if(!t){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=t.newAgStackInstance(),this.compPromise.then(i=>this.afterCompCreated(i))}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(t){if(t){if(!this.isAlive()){this.destroyBean(t);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=t,this.eFloatingFilterBody.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached()}}};Kr.TEMPLATE=`<div class="ag-header-cell ag-floating-filter" role="gridcell">
|
|
232
|
+
<div ref="eFloatingFilterBody" role="presentation"></div>
|
|
233
|
+
<div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">
|
|
234
|
+
<button type="button" class="ag-button ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>
|
|
235
|
+
</div>
|
|
236
|
+
</div>`;h([_("eFloatingFilterBody")],Kr.prototype,"eFloatingFilterBody",2);h([_("eButtonWrapper")],Kr.prototype,"eButtonWrapper",2);h([_("eButtonShowMainFilter")],Kr.prototype,"eButtonShowMainFilter",2);h([I],Kr.prototype,"postConstruct",1);h([$t],Kr.prototype,"destroyFloatingFilterComp",1);var aI=Kr,Ah=class extends L{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(){var e;const t=(e=this.gos.get("domLayout"))!=null?e:"normal";return["normal","print","autoHeight"].indexOf(t)===-1?(Y(`${t} is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.`),"normal"):t}};h([I],Ah.prototype,"postConstruct",1);var Js=class extends L{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=kt(()=>this.lastScrollSource[1]=null,500),this.resetLastVScrollDebounced=kt(()=>this.lastScrollSource[0]=null,500)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady(e=>{this.centerRowsCtrl=e.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}addScrollListener(){const{fakeHScrollComp:e,fakeVScrollComp:t}=this.ctrlsService.getParams();this.addManagedListener(this.centerRowsCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));const i=this.gos.get("debounceVerticalScrollbar"),s=i?kt(this.onVScroll.bind(this),100):this.onVScroll.bind(this),n=i?kt(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",s),t.onScrollCallback(n)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){if(this.centerRowsCtrl==null)return;e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft());const i=this.enableRtl?e:-e,{topCenter:s,stickyTopCenter:n,stickyBottomCenter:r,centerHeader:o,bottomCenter:l,fakeHScrollComp:a}=this.ctrlsService.getParams();o.setHorizontalScroll(-i),l.setContainerTranslateX(i),s.setContainerTranslateX(i),n.setContainerTranslateX(i),r.setContainerTranslateX(i);const u=this.centerRowsCtrl.getViewportElement(),d=this.lastScrollSource[1]===0;e=Math.abs(e),d?a.setScrollPosition(e):Ha(u,e,this.enableRtl)}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(this.lastScrollSource[t]=e,!0):this.lastScrollSource[t]===e}onFakeHScroll(){this.isControllingScroll(1,1)&&this.onHScrollCommon(1)}onHScroll(){this.isControllingScroll(0,1)&&this.onHScrollCommon(0)}onHScrollCommon(e){const t=this.centerRowsCtrl.getViewportElement(),{scrollLeft:i}=t;if(this.shouldBlockScrollUpdate(1,i,!0))return;let s;e===0?s=Va(t,this.enableRtl):s=this.ctrlsService.get("fakeHScrollComp").getScrollPosition(),this.doHorizontalScroll(Math.round(s)),this.resetLastHScrollDebounced()}onFakeVScroll(){this.isControllingScroll(1,0)&&this.onVScrollCommon(1)}onVScroll(){this.isControllingScroll(0,0)&&this.onVScrollCommon(0)}onVScrollCommon(e){let t;e===0?t=this.eBodyViewport.scrollTop:t=this.ctrlsService.get("fakeVScrollComp").getScrollPosition(),!this.shouldBlockScrollUpdate(0,t,!0)&&(this.animationFrameService.setScrollTop(t),this.nextScrollTop=t,e===0?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:g.EVENT_BODY_SCROLL,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(()=>{const i=Ie(K({},t),{type:g.EVENT_BODY_SCROLL_END});this.eventService.dispatchEvent(i)},100)}shouldBlockScrollUpdate(e,t,i=!1){return i&&!qs()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Cu(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&&ka()){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.onHScrollCommon(0)}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&&ka()?e=e>0?0:s:e=Math.min(Math.max(e,0),s)),Ha(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 n=0;n<i;n++){const r=this.rowModel.getRow(n);if(typeof e=="function"){if(r&&e(r)){s=n;break}}else if(e===r||e===r.data){s=n;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t){if(this.gos.isDomLayout("print"))return;const i=this.paginationProxy.getRowCount();if(typeof e!="number"||e<0||e>=i){console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);return}const n=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.getFrameworkOverrides().wrapIncoming(()=>{n||this.paginationProxy.goToPageWithIndex(e);const r=this.ctrlsService.getGridBodyCtrl(),o=r.getStickyTopHeight(),l=r.getStickyBottomHeight(),a=this.paginationProxy.getRow(e);let u;do{const d=a.rowTop,c=a.rowHeight,p=this.paginationProxy.getPixelOffset(),C=a.rowTop-p,v=C+a.rowHeight,S=this.getVScrollPosition(),E=this.heightScaler.getDivStretchOffset(),w=S.top+E,m=S.bottom+E,R=m-w,T=this.heightScaler.getScrollPositionForPixel(C),P=this.heightScaler.getScrollPositionForPixel(v-R),F=Math.min((T+P)/2,C),b=w+o>C,M=m-l<v;let N=null;t==="top"?N=T:t==="bottom"?N=P:t==="middle"?N=F:b?N=T-o:M&&(N=P+l),N!==null&&(this.setVerticalScrollPosition(N),this.rowRenderer.redraw({afterScroll:!0})),u=d!==a.rowTop||c!==a.rowHeight}while(u);this.animationFrameService.flushAllFrames()})}ensureColumnVisible(e,t="auto"){const i=this.columnModel.getGridColumn(e);if(!i||i.isPinned()||!this.columnModel.isColumnDisplayed(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),n=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),r=this.centerRowsCtrl.getCenterWidth(),o=this.enableRtl;let l=(o?i:s)||n,a=o?s:i;t!=="auto"&&(l=t==="start",a=t==="end");const u=t==="middle";if(l||a||u){const{colLeft:d,colMiddle:c,colRight:p}=this.getColumnBounds(e);return u?c-r/2:l?o?p:d:o?d-r:p-r}return null}isColumnOutsideViewport(e){const{start:t,end:i}=this.getViewportBounds(),{colLeft:s,colRight:n}=this.getColumnBounds(e),r=this.enableRtl,o=r?t>n:i<n,l=r?i<s:t>s;return{columnBeforeStart:o,columnAfterEnd:l}}getColumnBounds(e){const t=this.enableRtl,i=this.columnModel.getBodyContainerWidth(),s=e.getActualWidth(),n=e.getLeft(),r=t?-1:1,o=t?i-n:n,l=o+s*r,a=o+s/2*r;return{colLeft:o,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}}};h([f("ctrlsService")],Js.prototype,"ctrlsService",2);h([f("animationFrameService")],Js.prototype,"animationFrameService",2);h([f("paginationProxy")],Js.prototype,"paginationProxy",2);h([f("rowModel")],Js.prototype,"rowModel",2);h([f("rowContainerHeightService")],Js.prototype,"heightScaler",2);h([f("rowRenderer")],Js.prototype,"rowRenderer",2);h([f("columnModel")],Js.prototype,"columnModel",2);h([I],Js.prototype,"postConstruct",1);var MD="ag-force-vertical-scroll",uI="ag-selectable",dI="ag-column-moving",_t=class extends L{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}getScrollFeature(){return this.bodyScrollFeature}getBodyViewportElement(){return this.eBodyViewport}setComp(e,t,i,s,n,r,o){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=s,this.eBottom=n,this.eStickyTop=r,this.eStickyBottom=o,this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",l=>this.setCellTextSelection(l.currentValue)),this.createManagedBean(new Ah(this.comp)),this.bodyScrollFeature=this.createManagedBean(new Js(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,i,n,r,o]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.filterManager.setupAdvancedFilterHeaderComp(s),this.ctrlsService.register("gridBodyCtrl",this)}getComp(){return this.comp}addEventListeners(){this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}addFocusListeners(e){e.forEach(t=>{this.addManagedListener(t,"focusin",i=>{const{target:s}=i,n=Cr(s,"ag-root",t);t.classList.toggle("ag-has-focus",!n)}),this.addManagedListener(t,"focusout",i=>{const{target:s,relatedTarget:n}=i,r=t.contains(n),o=Cr(n,"ag-root",t);Cr(s,"ag-root",t)||(!r||o)&&t.classList.remove("ag-has-focus")})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(dI,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(uI,e)}onScrollVisibilityChanged(){const e=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(e),this.setStickyWidth(e),this.setStickyBottomOffsetBottom();const t=e&&this.gos.getScrollbarWidth()||0,i=Qm()?16:0,s=`calc(100% + ${t+i}px)`;this.animationFrameService.requestAnimationFrame(()=>this.comp.setBodyViewportWidth(s))}onGridColumnsChanged(){const e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e.length)}disableBrowserDragging(){this.addManagedListener(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(Cc(s)===null){this.rowRenderer.stopEditing();return}let n=t.some(r=>r.contains(s))&&this.mouseEventService.isElementInThisGrid(s);if(!n){const r=this.popupService;n=r.getActivePopups().some(o=>o.contains(s))||r.isElementWithinCustomPopup(s)}n||this.rowRenderer.stopEditing()},t=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom];t.forEach(i=>this.addManagedListener(i,"focusout",e))}updateRowCount(){const e=this.headerNavigationService.getHeaderRowCount()+this.filterManager.getHeaderRowCount(),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?MD:null,i=this.gos.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||i&&FT(this.eBodyViewport)}setupRowAnimationCssClass(){const e=()=>{const t=this.gos.isAnimateRows()&&!this.rowContainerHeightService.isStretching(),i=t?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(i,t)};e(),this.addManagedListener(this.eventService,g.EVENT_HEIGHT_SCALE_CHANGED,e),this.addManagedPropertyListener("animateRows",e)}getGridBodyElement(){return this.eGridBody}addBodyViewportListener(){const e=this.onBodyViewportContextMenu.bind(this);this.addManagedListener(this.eBodyViewport,"contextmenu",e),this.mockContextMenuForIPad(e),this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this)),this.addManagedListener(this.eStickyTop,"wheel",this.onStickyWheel.bind(this)),this.addManagedListener(this.eStickyBottom,"wheel",this.onStickyWheel.bind(this)),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){const e=this.eBodyViewport.querySelector(".ag-full-width-container"),t=this.eBodyViewport.querySelector(".ag-center-cols-viewport");e&&t&&this.addManagedListener(e,"wheel",i=>this.onFullWidthContainerWheel(i,t))}onFullWidthContainerWheel(e,t){!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX)||!this.mouseEventService.isEventFromThisGrid(e)||(e.preventDefault(),t.scrollBy({left:e.deltaX}))}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(!qs())return;const t=new Ct(this.eBodyViewport),i=s=>{e(void 0,s.touchStart,s.touchEvent)};this.addManagedListener(t,Ct.EVENT_LONG_TAP,i),this.addDestroyFunc(()=>t.destroy())}onBodyViewportWheel(e){this.gos.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()}onStickyWheel(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)}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 Ai(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)}getRowDragFeature(){return this.rowDragFeature}onPinnedRowDataChanged(){this.setFloatingHeights()}setFloatingHeights(){const{pinnedRowModel:e}=this;let 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.gos.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}onHeaderHeightChanged(){this.setStickyTopOffsetTop()}setStickyTopOffsetTop(){const t=this.ctrlsService.get("gridHeaderCtrl").getHeaderHeight()+this.filterManager.getHeaderHeight(),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.gos.getScrollbarWidth()||0,s=e+i;this.comp.setStickyBottomBottom(`${s}px`)}sizeColumnsToFit(e,t){const s=this.isVerticalScrollShowing()?this.gos.getScrollbarWidth():0,r=Br(this.eGridBody)-s;if(r>0){this.columnModel.sizeColumnsToFit(r,"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):console.warn("AG Grid: 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)}};h([f("animationFrameService")],_t.prototype,"animationFrameService",2);h([f("rowContainerHeightService")],_t.prototype,"rowContainerHeightService",2);h([f("ctrlsService")],_t.prototype,"ctrlsService",2);h([f("columnModel")],_t.prototype,"columnModel",2);h([f("scrollVisibleService")],_t.prototype,"scrollVisibleService",2);h([f("menuService")],_t.prototype,"menuService",2);h([f("headerNavigationService")],_t.prototype,"headerNavigationService",2);h([f("dragAndDropService")],_t.prototype,"dragAndDropService",2);h([f("pinnedRowModel")],_t.prototype,"pinnedRowModel",2);h([f("rowRenderer")],_t.prototype,"rowRenderer",2);h([f("popupService")],_t.prototype,"popupService",2);h([f("mouseEventService")],_t.prototype,"mouseEventService",2);h([f("rowModel")],_t.prototype,"rowModel",2);h([f("filterManager")],_t.prototype,"filterManager",2);var Gl="ag-cell-range-selected",cI="ag-cell-range-chart",hI="ag-cell-range-single-cell",pI="ag-cell-range-chart-category",gI="ag-cell-range-handle",fI="ag-cell-range-top",mI="ag-cell-range-right",CI="ag-cell-range-bottom",vI="ag-cell-range-left",yI=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.onRangeSelectionChanged()}onRangeSelectionChanged(){this.cellComp&&(this.rangeCount=this.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(Gl,this.rangeCount!==0),this.cellComp.addOrRemoveCssClass(`${Gl}-1`,this.rangeCount===1),this.cellComp.addOrRemoveCssClass(`${Gl}-2`,this.rangeCount===2),this.cellComp.addOrRemoveCssClass(`${Gl}-3`,this.rangeCount===3),this.cellComp.addOrRemoveCssClass(`${Gl}-4`,this.rangeCount>=4),this.cellComp.addOrRemoveCssClass(cI,this.hasChartRange),zo(this.eGui,this.rangeCount>0?!0:void 0),this.cellComp.addOrRemoveCssClass(hI,this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())}updateRangeBorders(){const e=this.getRangeBorders(),t=this.isSingleCell(),i=!t&&e.top,s=!t&&e.right,n=!t&&e.bottom,r=!t&&e.left;this.cellComp.addOrRemoveCssClass(fI,i),this.cellComp.addOrRemoveCssClass(mI,s),this.cellComp.addOrRemoveCssClass(CI,n),this.cellComp.addOrRemoveCssClass(vI,r)}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=>Ri([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,n=!1;const r=this.cellCtrl.getCellPosition().column,o=this.beans.columnModel;let l,a;e?(l=o.getDisplayedColAfter(r),a=o.getDisplayedColBefore(r)):(l=o.getDisplayedColBefore(r),a=o.getDisplayedColAfter(r));const u=this.rangeService.getCellRanges().filter(d=>this.rangeService.isCellInSpecificRange(this.cellCtrl.getCellPosition(),d));l||(n=!0),a||(i=!0);for(let d=0;d<u.length&&!(t&&i&&s&&n);d++){const c=u[d],p=this.rangeService.getRangeStartRow(c),C=this.rangeService.getRangeEndRow(c);!t&&this.beans.rowPositionUtils.sameRow(p,this.cellCtrl.getCellPosition())&&(t=!0),!s&&this.beans.rowPositionUtils.sameRow(C,this.cellCtrl.getCellPosition())&&(s=!0),!n&&l&&c.columns.indexOf(l)<0&&(n=!0),!i&&a&&c.columns.indexOf(a)<0&&(i=!0)}return{top:t,right:i,bottom:s,left:n}}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(gI,!!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=pe(t),n=this.cellCtrl.getCellPosition(),r=e.get("enableFillHandle")&&!this.cellCtrl.isSuppressFillHandle(),o=e.get("enableRangeHandle");let l=i===1&&!this.cellCtrl.isEditing()&&(r||o);if(this.hasChartRange){const u=t[0].type===1&&this.rangeService.isCellInSpecificRange(n,t[0]);this.cellComp.addOrRemoveCssClass(pI,u),l=s.type===0}return l&&s.endRow!=null&&this.rangeService.isContiguousRange(s)&&this.rangeService.isBottomRightCell(s,n)}addSelectionHandle(){const e=this.beans.gos,t=pe(this.rangeService.getCellRanges()).type,s=e.get("enableFillHandle")&&J(t)?0:1;this.selectionHandle&&this.selectionHandle.getType()!==s&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.selectionHandleFactory.createSelectionHandle(s)),this.selectionHandle.refresh(this.cellCtrl)}destroy(){this.beans.context.destroyBean(this.selectionHandle)}},wI=class extends L{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.addManagedListener(this.beans.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>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();ys(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListener(this.beans.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,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 n=0;i&&n<e&&(t.push(i),i=this.beans.columnModel.getDisplayedColAfter(i),!(!i||J(i)||s!==i.getPinned()));n++);}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=pe(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.isPrintLayout()||this.column.getPinned()==="left")return e;const t=this.beans.columnModel.getDisplayedColumnsLeftWidth();if(this.column.getPinned()==="right"){const i=this.beans.columnModel.getBodyContainerWidth();return t+i+(e||0)}return t+(e||0)}applyRowSpan(e){if(this.rowSpan===1&&!e)return;const i=this.beans.gos.getRowHeightAsNumber()*this.rowSpan;this.eGui.style.height=`${i}px`,this.eGui.style.zIndex="1"}destroy(){super.destroy()}},SI=class extends L{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()}},se=class{postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gos.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)}};h([f("resizeObserverService")],se.prototype,"resizeObserverService",2);h([f("paginationProxy")],se.prototype,"paginationProxy",2);h([f("context")],se.prototype,"context",2);h([f("gridOptionsService")],se.prototype,"gos",2);h([f("environment")],se.prototype,"environment",2);h([f("rowRenderer")],se.prototype,"rowRenderer",2);h([f("valueService")],se.prototype,"valueService",2);h([f("eventService")],se.prototype,"eventService",2);h([f("columnModel")],se.prototype,"columnModel",2);h([f("headerNavigationService")],se.prototype,"headerNavigationService",2);h([f("navigationService")],se.prototype,"navigationService",2);h([f("columnAnimationService")],se.prototype,"columnAnimationService",2);h([f("focusService")],se.prototype,"focusService",2);h([f("popupService")],se.prototype,"popupService",2);h([f("stylingService")],se.prototype,"stylingService",2);h([f("columnHoverService")],se.prototype,"columnHoverService",2);h([f("userComponentFactory")],se.prototype,"userComponentFactory",2);h([f("userComponentRegistry")],se.prototype,"userComponentRegistry",2);h([f("animationFrameService")],se.prototype,"animationFrameService",2);h([f("dragService")],se.prototype,"dragService",2);h([f("dragAndDropService")],se.prototype,"dragAndDropService",2);h([f("sortController")],se.prototype,"sortController",2);h([f("filterManager")],se.prototype,"filterManager",2);h([f("rowContainerHeightService")],se.prototype,"rowContainerHeightService",2);h([f("frameworkOverrides")],se.prototype,"frameworkOverrides",2);h([f("cellPositionUtils")],se.prototype,"cellPositionUtils",2);h([f("rowPositionUtils")],se.prototype,"rowPositionUtils",2);h([f("selectionService")],se.prototype,"selectionService",2);h([f("rowCssClassCalculator")],se.prototype,"rowCssClassCalculator",2);h([f("rowModel")],se.prototype,"rowModel",2);h([f("ctrlsService")],se.prototype,"ctrlsService",2);h([f("ctrlsFactory")],se.prototype,"ctrlsFactory",2);h([f("agStackComponentsRegistry")],se.prototype,"agStackComponentsRegistry",2);h([f("valueCache")],se.prototype,"valueCache",2);h([f("rowNodeEventThrottle")],se.prototype,"rowNodeEventThrottle",2);h([f("localeService")],se.prototype,"localeService",2);h([f("syncService")],se.prototype,"syncService",2);h([f("ariaAnnouncementService")],se.prototype,"ariaAnnouncementService",2);h([Se("rangeService")],se.prototype,"rangeService",2);h([Se("selectionHandleFactory")],se.prototype,"selectionHandleFactory",2);h([I],se.prototype,"postConstruct",1);se=h([B("beans")],se);var EI=class extends se{constructor(e,t,i){super(),this.cellCtrl=e,this.beans=t,this.column=i}onMouseEvent(e,t){if(!rs(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,n=e.ctrlKey||e.metaKey;i&&n&&i.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&i.intersectLastRange(!0);const r=this.cellCtrl.createEvent(e,g.EVENT_CELL_CLICKED);t.dispatchEvent(r);const o=this.column.getColDef();o.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{o.onCellClicked(r)})},0),(s.get("singleClickEdit")||o.singleClickEdit)&&!s.get("suppressClickEdit")&&!(e.shiftKey&&(i==null?void 0:i.getCellRanges().length)!=0)&&this.cellCtrl.startRowOrCellEdit()}isDoubleClickOnIPad(){if(!qs()||Gm("dblclick"))return!1;const e=new Date().getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t}onCellDoubleClicked(e){const t=this.column.getColDef(),i=this.cellCtrl.createEvent(e,g.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(i),typeof t.onCellDoubleClicked=="function"&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{t.onCellDoubleClicked(i)})},0),!this.beans.gos.get("singleClickEdit")&&!this.beans.gos.get("suppressClickEdit")&&this.cellCtrl.startRowOrCellEdit(null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:i,shiftKey:s}=e,n=e.target,{cellCtrl:r,beans:o}=this,{eventService:l,rangeService:a,focusService:u}=o;if(this.isRightClickInExistingRange(e))return;const d=a&&a.getCellRanges().length!=0;if(!s||!d){const c=Ts()&&!r.isEditing()&&!Zm(n);r.focusCell(c)}if(s&&d&&!u.isCellFocused(r.getCellPosition())){e.preventDefault();const c=u.getFocusedCell();if(c){const{column:p,rowIndex:C,rowPinned:v}=c,S=o.rowRenderer.getRowByPosition({rowIndex:C,rowPinned:v}),E=S==null?void 0:S.getCellCtrl(p);E!=null&&E.isEditing()&&E.stopEditing(),u.setFocusedCell({column:p,rowIndex:C,rowPinned:v,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(n)){if(a){const c=this.cellCtrl.getCellPosition();if(s)a.extendLatestRangeToCell(c);else{const p=t||i;a.setRangeToCell(c,p)}}l.dispatchEvent(this.cellCtrl.createEvent(e,g.EVENT_CELL_MOUSE_DOWN))}}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 Cr(e,"ag-selection-checkbox",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const t=this.cellCtrl.createEvent(e,g.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const t=this.cellCtrl.createEvent(e,g.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t),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(){}},RI=class extends L{constructor(e,t,i,s,n){super(),this.cellCtrl=e,this.beans=t,this.rowNode=s,this.rowCtrl=n}setComp(e){this.eGui=e}onKeyDown(e){const t=e.key;switch(t){case D.ENTER:this.onEnterKeyDown(e);break;case D.F2:this.onF2KeyDown(e);break;case D.ESCAPE:this.onEscapeKeyDown(e);break;case D.TAB:this.onTabKeyDown(e);break;case D.BACKSPACE:case D.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case D.DOWN:case D.UP:case D.RIGHT:case D.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){var i;const{cellCtrl:s,beans:n,rowNode:r}=this,{gos:o,rangeService:l,eventService:a}=n;if(!s.isEditing()){if(a.dispatchEvent({type:g.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),kT(e,o.get("enableCellEditingOnBackspace"))){if(l&&o.get("enableRangeSelection"))l.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(s.isCellEditable()){const u=s.getColumn(),d=(i=this.beans.valueService.parseValue(u,r,"",r.getValueFromValueService(u)))!=null?i:null;r.setDataValue(u,d,"cellClear")}}else s.startRowOrCellEdit(e,t);a.dispatchEvent({type:g.EVENT_KEY_SHORTCUT_CHANGED_CELL_END})}}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?D.UP:D.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(D.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()}onF2KeyDown(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(D.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()&&t.isRowSelection()){const i=this.rowNode.isSelected(),s=!i;if(s||!t.get("suppressRowDeselection")){const n=this.beans.gos.get("groupSelectsFiltered"),r=this.rowNode.setSelectedParams({newValue:s,rangeSelect:e.shiftKey,groupSelectsFiltered:n,event:e,source:"spaceKey"});i===void 0&&r===0&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:n,event:e,source:"spaceKey"})}}e.preventDefault()}destroy(){super.destroy()}},ID=class extends te{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(Ve("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)}};h([I],ID.prototype,"postConstruct",1);var TI="ag-column-first",DI="ag-column-last",xh=class{static getHeaderClassesFromColDef(e,t,i,s){return J(e)?[]:this.getColumnClassesFromCollDef(e.headerClass,e,t,i,s)}static getToolPanelClassesFromColDef(e,t,i,s){return J(e)?[]:this.getColumnClassesFromCollDef(e.toolPanelClass,e,t,i,s)}static refreshFirstAndLastStyles(e,t,i){e.addOrRemoveCssClass(TI,i.isColumnAtEdge(t,"first")),e.addOrRemoveCssClass(DI,i.isColumnAtEdge(t,"last"))}static getClassParams(e,t,i,s){return t.addGridCommonParams({colDef:e,column:i,columnGroup:s})}static getColumnClassesFromCollDef(e,t,i,s,n){if(J(e))return[];let r;if(typeof e=="function"){const o=this.getClassParams(t,i,s,n);r=e(o)}else r=e;return typeof r=="string"?[r]:Array.isArray(r)?[...r]:[]}},PI="ag-cell",bI="ag-cell-auto-height",FI="ag-cell-normal-height",AI="ag-cell-focus",xI="ag-cell-first-right-pinned",LI="ag-cell-last-left-pinned",MI="ag-cell-not-inline-editing",II="ag-column-hover",NI="ag-cell-wrap-text",_I=0,ND=class hf extends L{constructor(t,i,s,n){super(),this.cellRangeFeature=null,this.cellPositionFeature=null,this.cellCustomStyleFeature=null,this.tooltipFeature=null,this.cellMouseListenerFeature=null,this.cellKeyboardListenerFeature=null,this.suppressRefreshCell=!1,this.onCellCompAttachedFuncs=[],this.column=t,this.rowNode=i,this.beans=s,this.rowCtrl=n,this.instanceId=t.getId()+"-"+_I++,this.colIdSanitised=tt(this.column.getId()),s.gos.get("suppressCellFocus")||(this.tabIndex=-1),this.createCellPosition(),this.addFeatures(),this.updateAndFormatValue(!1)}shouldRestoreFocus(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)}addFeatures(){this.cellPositionFeature=new wI(this,this.beans),this.addDestroyFunc(()=>{var i;(i=this.cellPositionFeature)==null||i.destroy(),this.cellPositionFeature=null}),this.cellCustomStyleFeature=new SI(this,this.beans),this.addDestroyFunc(()=>{var i;(i=this.cellCustomStyleFeature)==null||i.destroy(),this.cellCustomStyleFeature=null}),this.cellMouseListenerFeature=new EI(this,this.beans,this.column),this.addDestroyFunc(()=>{var i;(i=this.cellMouseListenerFeature)==null||i.destroy(),this.cellMouseListenerFeature=null}),this.cellKeyboardListenerFeature=new RI(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.addDestroyFunc(()=>{var i;(i=this.cellKeyboardListenerFeature)==null||i.destroy(),this.cellKeyboardListenerFeature=null}),this.column.isTooltipEnabled()&&(this.enableTooltipFeature(),this.addDestroyFunc(()=>{this.disableTooltipFeature()})),this.beans.rangeService&&this.beans.gos.get("enableRangeSelection")&&(this.cellRangeFeature=new yI(this.beans,this),this.addDestroyFunc(()=>{var i;(i=this.cellRangeFeature)==null||i.destroy(),this.cellRangeFeature=null}))}enableTooltipFeature(t,i){const s=()=>{const o=this.column.getColDef(),l=this.rowNode.data;if(o.tooltipField&&A(l))return Ao(l,o.tooltipField,this.column.isTooltipFieldContainsDots());const a=o.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},n=this.beans.gos.get("tooltipShowMode")==="whenTruncated";!i&&n&&!this.isCellRenderer()&&(i=()=>{const o=this.getGui(),l=o.children.length===0?o:o.querySelector(".ag-cell-value");return l?l.scrollWidth>l.clientWidth:!0});const r={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 Xs(r,this.beans)}disableTooltipFeature(){this.tooltipFeature&&(this.tooltipFeature.destroy(),this.tooltipFeature=null)}setComp(t,i,s,n,r){var o,l,a,u;this.cellComp=t,this.eGui=i,this.printLayout=n,this.addDomData(),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(s),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),(o=this.cellPositionFeature)==null||o.setComp(i),(l=this.cellCustomStyleFeature)==null||l.setComp(t),(a=this.tooltipFeature)==null||a.refreshToolTip(),(u=this.cellKeyboardListenerFeature)==null||u.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(t,i),r&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach(d=>d()),this.onCellCompAttachedFuncs=[])}setupAutoHeight(t){if(this.isAutoHeight=this.column.isAutoHeight(),!this.isAutoHeight||!t)return;const i=t.parentElement,s=this.beans.gos.getRowHeightForNode(this.rowNode).height,n=l=>{if(this.editing||!this.isAlive())return;const{paddingTop:a,paddingBottom:u,borderBottomWidth:d,borderTopWidth:c}=Wn(i),p=a+u+d+c,v=t.offsetHeight+p;if(l<5){const E=this.beans.gos.getDocument(),w=!E||!E.contains(t),m=v==0;if(w||m){window.setTimeout(()=>n(l+1),0);return}}const S=Math.max(v,s);this.rowNode.setRowAutoHeight(S,this.column)},r=()=>n(0);r();const o=this.beans.resizeObserverService.observeResize(t,r);this.addDestroyFunc(()=>{o(),this.rowNode.setRowAutoHeight(void 0,this.column)})}getCellAriaRole(){var t;return(t=this.column.getColDef().cellAriaRole)!=null?t:"gridcell"}getInstanceId(){return this.instanceId}getColumnIdSanitised(){return this.colIdSanitised}getTabIndex(){return this.tabIndex}isCellRenderer(){const t=this.column.getColDef();return t.cellRenderer!=null||t.cellRendererSelector!=null}getValueToDisplay(){var t;return(t=this.valueFormatted)!=null?t:this.value}showValue(t=!1){var i;const s=this.getValueToDisplay();let n;if(this.rowNode.stub){const r=this.createCellRendererParams();n=this.beans.userComponentFactory.getLoadingCellRendererDetails(this.column.getColDef(),r)}else if(this.isCellRenderer()){const r=this.createCellRendererParams();n=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),r)}this.cellComp.setRenderDetails(n,s,t),(i=this.cellRangeFeature)==null||i.refreshHandle()}setupControlComps(){const t=this.column.getColDef();this.includeSelection=this.isIncludeControl(t.checkboxSelection),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}refreshShouldDestroy(){const t=this.column.getColDef(),i=this.includeSelection!=this.isIncludeControl(t.checkboxSelection),s=this.includeRowDrag!=this.isIncludeControl(t.rowDrag),n=this.includeDndSource!=this.isIncludeControl(t.dndSource),r=this.isAutoHeight!=this.column.isAutoHeight();return i||s||n||r}startEditing(t=null,i=!1,s=null){if(!this.isCellEditable()||this.editing)return;if(!this.cellComp){this.onCellCompAttachedFuncs.push(()=>{this.startEditing(t,i,s)});return}const n=this.createCellEditorParams(t,i),r=this.column.getColDef(),o=this.beans.userComponentFactory.getCellEditorDetails(r,n);this.editCompDetails=o;const l=(o==null?void 0:o.popupFromSelector)!=null?o.popupFromSelector:!!r.cellEditorPopup,a=(o==null?void 0:o.popupPositionFromSelector)!=null?o.popupPositionFromSelector:r.cellEditorPopupPosition;this.setEditing(!0),this.cellComp.setEditDetails(o,l,a,this.beans.gos.get("reactiveCustomComponents"));const u=this.createEvent(s,g.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(u)}setEditing(t){var i;this.editing!==t&&(this.editing=t,(i=this.cellRangeFeature)==null||i.refreshHandle())}stopRowOrCellEdit(t=!1){this.beans.gos.get("editType")==="fullRow"?this.rowCtrl.stopEditing(t):this.stopEditing(t)}onPopupEditorClosed(){this.isEditing()&&this.stopEditingAndFocus()}takeValueFromCellEditor(t){const i={newValueExists:!1};if(t)return i;const s=this.cellComp.getCellEditor();return!s||s.isCancelAfterEnd&&s.isCancelAfterEnd()?i:{newValue:s.getValue(),newValueExists:!0}}saveNewValue(t,i){if(i===t)return!1;this.suppressRefreshCell=!0;const s=this.rowNode.setDataValue(this.column,i,"edit");return this.suppressRefreshCell=!1,s}stopEditing(t=!1){if(!this.editing)return!1;const{newValue:i,newValueExists:s}=this.takeValueFromCellEditor(t),n=this.rowNode.getValueFromValueService(this.column);let r=!1;return s&&(r=this.saveNewValue(n,i)),this.setEditing(!1),this.cellComp.setEditDetails(),this.editCompDetails=void 0,this.updateAndFormatValue(!1),this.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.dispatchEditingStoppedEvent(n,i,!t&&!!r),r}dispatchEditingStoppedEvent(t,i,s){const n=Ie(K({},this.createEvent(null,g.EVENT_CELL_EDITING_STOPPED)),{oldValue:t,newValue:i,valueChanged:s});this.beans.eventService.dispatchEvent(n)}createCellEditorParams(t,i){return this.beans.gos.addGridCommonParams({value:this.rowNode.getValueFromValueService(this.column),eventKey:t,column:this.column,colDef:this.column.getColDef(),rowIndex:this.getCellPosition().rowIndex,node:this.rowNode,data:this.rowNode.data,cellStartedEdit:i,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)})}createCellRendererParams(){return this.beans.gos.addGridCommonParams({value:this.value,valueFormatted:this.valueFormatted,getValue:()=>this.rowNode.getValueFromValueService(this.column),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,rowIndex:this.getCellPosition().rowIndex,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:(i,s,n,r)=>this.registerRowDragger(i,s,r),setTooltip:(i,s)=>{var n;this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(i,s),(n=this.tooltipFeature)==null||n.refreshToolTip()}})}parseValue(t){return this.beans.valueService.parseValue(this.column,this.rowNode,t,this.getValue())}setFocusOutOnEditor(){if(!this.editing)return;const t=this.cellComp.getCellEditor();t&&t.focusOut&&t.focusOut()}setFocusInOnEditor(){if(!this.editing)return;const t=this.cellComp.getCellEditor();t&&t.focusIn?t.focusIn():this.focusCell(!0)}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 i,s,n,r;if(this.suppressRefreshCell||this.editing)return;const o=this.column.getColDef(),l=t!=null&&!!t.newData,a=t!=null&&!!t.suppressFlash||!!o.suppressCellFlash,u=o.field==null&&o.valueGetter==null&&o.showRowGroup==null,d=t&&t.forceRefresh||u||l,c=!!this.cellComp,p=this.updateAndFormatValue(c),C=d||p;if(c){if(C){this.showValue(l);const v=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();!a&&!v&&(this.beans.gos.get("enableCellChangeFlash")||o.enableCellChangeFlash)&&this.flashCell(),(i=this.cellCustomStyleFeature)==null||i.applyUserStyles(),(s=this.cellCustomStyleFeature)==null||s.applyClassesFromColDef()}(n=this.tooltipFeature)==null||n.refreshToolTip(),(r=this.cellCustomStyleFeature)==null||r.applyCellClassRules()}}stopEditingAndFocus(t=!1,i=!1){this.stopRowOrCellEdit(),this.focusCell(!0),t||this.navigateAfterEdit(i)}navigateAfterEdit(t){if(this.beans.gos.get("enterNavigatesVerticallyAfterEdit")){const s=t?D.UP:D.DOWN;this.beans.navigationService.navigateToNextCell(null,s,this.getCellPosition(),!1)}}flashCell(t){var i,s;const n=(i=t==null?void 0:t.flashDuration)!=null?i:t==null?void 0:t.flashDelay,r=(s=t==null?void 0:t.fadeDuration)!=null?s:t==null?void 0:t.fadeDelay;this.animateCell("data-changed",n,r)}animateCell(t,i,s){if(!this.cellComp)return;const n=`ag-cell-${t}`,r=`ag-cell-${t}-animation`,{gos:o}=this.beans;i||(i=o.get("cellFlashDuration")),A(s)||(s=o.get("cellFadeDuration")),this.cellComp.addOrRemoveCssClass(n,!0),this.cellComp.addOrRemoveCssClass(r,!1),this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(n,!1),this.cellComp.addOrRemoveCssClass(r,!0),this.eGui.style.transition=`background-color ${s}ms`,window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(r,!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){var i;return(i=this.callValueFormatter(t))!=null?i: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.rowNode.getValueFromValueService(this.column),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(){const t=this.getGui();this.beans.gos.setDomData(t,hf.DOM_DATA_KEY_CELL_CTRL,this),this.addDestroyFunc(()=>this.beans.gos.setDomData(t,hf.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;xh.refreshFirstAndLastStyles(t,i,s.columnModel)}refreshAriaColIndex(){const t=this.beans.columnModel.getAriaColumnIndex(this.column);Um(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){if(!this.cellComp){this.onCellCompAttachedFuncs.push(()=>{this.startRowOrCellEdit(t,i)});return}this.beans.gos.get("editType")==="fullRow"?this.rowCtrl.startRowEditing(t,this):this.startEditing(t,!0,i)}getRowCtrl(){return this.rowCtrl}getRowPosition(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}}updateRangeBordersIfRangeCount(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()}onRangeSelectionChanged(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}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.onRangeSelectionChanged()}onFirstRightPinnedChanged(){if(!this.cellComp)return;const t=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass(xI,t)}onLastLeftPinnedChanged(){if(!this.cellComp)return;const t=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass(LI,t)}onCellFocused(t){if(this.beans.gos.get("suppressCellFocus"))return;const i=this.beans.focusService.isCellFocused(this.cellPosition);if(!this.cellComp){i&&(t!=null&&t.forceBrowserFocus)&&(this.focusEventToRestore=t);return}this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass(AI,i),i&&t&&t.forceBrowserFocus&&this.cellComp.getFocusableElement().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:Es(this.rowNode.rowPinned),column:this.column}}applyStaticCssClasses(){this.cellComp.addOrRemoveCssClass(PI,!0),this.cellComp.addOrRemoveCssClass(MI,!0);const t=this.column.isAutoHeight()==!0;this.cellComp.addOrRemoveCssClass(bI,t),this.cellComp.addOrRemoveCssClass(FI,!t)}onColumnHover(){if(!this.cellComp||!this.beans.gos.get("columnHoverHighlight"))return;const t=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass(II,t)}onColDefChanged(){if(!this.cellComp)return;if(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),!this.editing)this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0});else{const i=this.getCellEditor();if(i!=null&&i.refresh){const{eventKey:s,cellStartedEdit:n}=this.editCompDetails.params,r=this.createCellEditorParams(s,n),o=this.column.getColDef(),l=this.beans.userComponentFactory.getCellEditorDetails(o,r);i.refresh(l.params)}}}setWrapText(){const t=this.column.getColDef().wrapText==!0;this.cellComp.addOrRemoveCssClass(NI,t)}dispatchCellContextMenuEvent(t){const i=this.column.getColDef(),s=this.createEvent(t,g.EVENT_CELL_CONTEXT_MENU);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=[],super.destroy()}createSelectionCheckbox(){const t=new Ph;return this.beans.context.createBean(t),t.init({rowNode:this.rowNode,column:this.column}),t}createDndSource(){const t=new ID(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 n=this.createRowDragComp(t,i,s);n&&(this.customRowDragComp=n,this.addDestroyFunc(()=>{this.beans.context.destroyBean(n),this.customRowDragComp=null}))}createRowDragComp(t,i,s){const n=this.beans.gos.get("pagination"),r=this.beans.gos.get("rowDragManaged"),o=this.beans.gos.isRowModelType("clientSide");if(r){if(!o){Y("managed row dragging is only allowed in the Client Side Row Model");return}if(n){Y("managed row dragging is not possible when doing pagination");return}}const l=new Ar(()=>this.value,this.rowNode,this.column,t,i,s);return this.beans.context.createBean(l),l}};ND.DOM_DATA_KEY_CELL_CTRL="cellCtrl";var yr=ND,OI=0,_D=class pf extends L{constructor(t,i,s,n,r){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=i.paginationProxy.getCurrentPage(),this.useAnimationFrameForCreate=n,this.printLayout=r,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=t.id+"-"+OI++,this.rowId=tt(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.isFullWidth()&&!this.gos.get("suppressCellFocus")&&(this.tabIndex=-1),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=tt(t)}getRowId(){return this.rowId}getRowStyles(){return this.rowStyles}getTabIndex(){return this.tabIndex}isSticky(){return this.rowNode.sticky}getInstanceId(){return this.instanceId}setComp(t,i,s){const n={rowComp:t,element:i,containerType:s};this.allRowGuis.push(n),s==="left"?this.leftGui=n:s==="right"?this.rightGui=n:s==="fullWidth"?this.fullWidthGui=n:this.centerGui=n,this.initialiseRowComp(n),this.rowType!=="FullWidthLoading"&&!this.rowNode.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(t){switch(this.allRowGuis=this.allRowGuis.filter(i=>i.containerType!==t),t){case"left":this.leftGui=void 0;break;case"right":this.rightGui=void 0;break;case"fullWidth":this.fullWidthGui=void 0;break;case"center":this.centerGui=void 0;break}}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.listenOnDomOrder(t),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(t),this.updateRowIndexes(t),this.setFocusedClasses(t),this.setStylesFromGridOptions(!1,t),i.isRowSelection()&&this.rowNode.selectable&&this.onRowSelected(t),this.updateColumnLists(!this.useAnimationFrameForCreate);const s=t.rowComp;this.getInitialRowClasses(t.containerType).forEach(r=>s.addOrRemoveCssClass(r,!0)),this.executeSlideAndFadeAnimations(t),this.rowNode.group&&Us(t.element,this.rowNode.expanded==!0),this.setRowCompRowId(s),this.setRowCompRowBusinessKey(s),i.setDomData(t.element,pf.DOM_DATA_KEY_ROW_CTRL,this),this.addDestroyFunc(()=>i.setDomData(t.element,pf.DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,t.element),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(t.element),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=tt(this.rowNode.id),this.rowId!=null&&t.setRowId(this.rowId)}executeSlideAndFadeAnimations(t){const{containerType:i}=t;this.slideInAnimation[i]&&(Xg(()=>{this.onTopChanged()}),this.slideInAnimation[i]=!1),this.fadeInAnimation[i]&&(Xg(()=>{t.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[i]=!1)}addRowDraggerToRow(t){if(this.gos.get("enableRangeSelection")){Y("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`");return}const i=this.beans.localeService.getLocaleTextFunc(),s=new Ar(()=>`1 ${i("rowDragRow","row")}`,this.rowNode,void 0,t.element,void 0,!0),n=this.createBean(s,this.beans.context);this.rowDragComps.push(n)}setupFullWidth(t){const i=this.getPinnedForContainer(t.containerType);if(this.rowType=="FullWidthDetail"&&!Ce.__assertRegistered("@ag-grid-enterprise/master-detail","cell renderer 'agDetailCellRenderer' (for master detail)",this.beans.context.getGridId()))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 n;return(n=s==null?void 0:s.rowComp)==null?void 0:n.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.columnModel.isPinningLeft(),i=!!this.centerGui,s=!!this.rightGui||!this.beans.columnModel.isPinningRight();return t&&i&&s}setRowType(){const t=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow"),i=this.rowNode.isFullWidthCell(),s=this.gos.get("masterDetail")&&this.rowNode.detail,n=this.beans.columnModel.isPivotMode(),o=!!this.rowNode.group&&!this.rowNode.footer&&this.gos.isGroupUseEntireRow(n);t?this.rowType="FullWidthLoading":s?this.rowType="FullWidthDetail":i?this.rowType="FullWidth":o?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 n={list:[],map:{}},r=(o,l)=>{n.list.push(l),n.map[o]=l};return i.forEach(o=>{const l=o.getInstanceId();let a=t.map[l];a||(a=new yr(o,this.rowNode,this.beans,this)),r(l,a)}),t.list.forEach(o=>{if(n.map[o.getColumn().getInstanceId()]!=null)return;if(!this.isCellEligibleToBeRemoved(o,s)){r(o.getColumn().getInstanceId(),o);return}o.destroy()}),n}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;default:const i=t;throw new Error(`Unhandled case: ${i}`)}}createAllCellCtrls(){const t=this.beans.columnModel;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.getAllDisplayedColumns()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const i=t.getViewportCenterColumnsForRow(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i);const s=t.getDisplayedLeftColumnsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,s,"left");const n=t.getDisplayedRightColumnsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,n,"right")}}isCellEligibleToBeRemoved(t,i){if(t.getColumn().getPinned()!=i)return!0;const o=t.isEditing(),l=this.beans.focusService.isCellFocused(t.getCellPosition());if(o||l){const u=t.getColumn();return!(this.beans.columnModel.getAllDisplayedColumns().indexOf(u)>=0)}return!0}getDomOrder(){return this.gos.get("ensureDomOrder")||this.gos.isDomLayout("print")}listenOnDomOrder(t){const i=()=>{t.rowComp.setDomOrder(this.getDomOrder())};this.addManagedPropertyListener("domLayout",i),this.addManagedPropertyListener("ensureDomOrder",i)}setAnimateFlags(t){if(this.isSticky()||!t)return;const i=A(this.rowNode.oldRowTop),s=this.beans.columnModel.isPinningLeft(),n=this.beans.columnModel.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=n}else{if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){this.fadeInAnimation.fullWidth=!0;return}this.fadeInAnimation.center=!0,this.fadeInAnimation.left=s,this.fadeInAnimation.right=n}}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),n=t(this.leftGui,"left"),r=t(this.rightGui,"right");return i&&s&&n&&r}addListeners(){this.addManagedListener(this.rowNode,ne.EVENT_HEIGHT_CHANGED,()=>this.onRowHeightChanged()),this.addManagedListener(this.rowNode,ne.EVENT_ROW_SELECTED,()=>this.onRowSelected()),this.addManagedListener(this.rowNode,ne.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.rowNode.detail&&this.addManagedListener(this.rowNode.parent,ne.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_CELL_CHANGED,this.postProcessCss.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_DRAGGING_CHANGED,this.postProcessRowDragging.bind(this)),this.addManagedListener(this.rowNode,ne.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));const t=this.beans.eventService;this.addManagedListener(t,g.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(t,g.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(t,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(t,g.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(t,g.EVENT_CELL_FOCUSED,this.onCellFocusChanged.bind(this)),this.addManagedListener(t,g.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusChanged.bind(this)),this.addManagedListener(t,g.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(t,g.EVENT_MODEL_UPDATED,this.refreshFirstAndLastRowStyles.bind(this)),this.addManagedListener(t,g.EVENT_COLUMN_MOVED,this.updateColumnLists.bind(this)),this.addDestroyFunc(()=>{this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context))}),this.addManagedPropertyListeners(["rowDragEntireRow"],()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(s=>{this.addRowDraggerToRow(s)});return}this.destroyBeans(this.rowDragComps,this.beans.context),this.rowDragComps=[]}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListener(this.rowNode,ne.EVENT_ROW_INDEX_CHANGED,()=>{this.getAllCellCtrls().forEach(t=>t.onRowIndexChanged())}),this.addManagedListener(this.rowNode,ne.EVENT_CELL_CHANGED,t=>{this.getAllCellCtrls().forEach(i=>i.onCellChanged(t))})}onRowNodeDataChanged(t){if(this.isFullWidth()!==!!this.rowNode.isFullWidthCell()){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,n=t===1;i.rowComp.addOrRemoveCssClass("ag-row-highlight-above",s),i.rowComp.addOrRemoveCssClass("ag-row-highlight-below",n)})}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),Us(s.element,t&&i)})}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Es(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(t){const i=this.allRowGuis.find(a=>a.element.contains(t.target));if(!((i?i.element:null)===t.target))return;const r=this.rowNode,o=this.beans.focusService.getFocusedCell(),l={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:o&&o.column};this.beans.navigationService.navigateToNextCell(t,t.key,l,!0),t.preventDefault()}onTabKeyDown(t){if(t.defaultPrevented||rs(t))return;const i=this.allRowGuis.find(o=>o.element.contains(t.target)),s=i?i.element:null,n=s===t.target;let r=null;n||(r=this.beans.focusService.findNextFocusableElement(s,!1,t.shiftKey)),(this.isFullWidth()&&n||!r)&&this.beans.navigationService.onTabKeyDown(this,t)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var t;const i=(t=this.allRowGuis.find(s=>di(s.element)))==null?void 0:t.element;return i?i.getBoundingClientRect().top:0}onFullWidthRowFocused(t){var i;const s=this.rowNode,n=t?this.isFullWidth()&&t.rowIndex===s.rowIndex&&t.rowPinned==s.rowPinned:!1,r=this.fullWidthGui?this.fullWidthGui.element:(i=this.centerGui)==null?void 0:i.element;r&&(r.classList.toggle("ag-full-width-focus",n),n&&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(n=>{n!==i&&(s.list.push(n),s.map[n.getColumn().getInstanceId()]=n)}),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){if(rs(t))return;const i=this.createRowEventWithSource(g.EVENT_ROW_DOUBLE_CLICKED,t);this.beans.eventService.dispatchEvent(i)}onRowMouseDown(t){if(this.lastMouseDownOnDragger=Cr(t.target,"ag-row-drag",3),!this.isFullWidth())return;const i=this.rowNode,s=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:i.rowIndex,column:s.getAllDisplayedColumns()[0],rowPinned:i.rowPinned,forceBrowserFocus:!0})}onRowClick(t){if(rs(t)||this.lastMouseDownOnDragger)return;const s=this.createRowEventWithSource(g.EVENT_ROW_CLICKED,t);this.beans.eventService.dispatchEvent(s);const n=t.ctrlKey||t.metaKey,r=t.shiftKey;if(this.gos.get("groupSelectsChildren")&&this.rowNode.group||this.isRowSelectionBlocked()||this.gos.get("suppressRowClickSelection"))return;const l=this.gos.get("rowMultiSelectWithClick"),a=!this.gos.get("suppressRowDeselection"),u="rowClicked";if(this.rowNode.isSelected())l?this.rowNode.setSelectedParams({newValue:!1,event:t,source:u}):n?a&&this.rowNode.setSelectedParams({newValue:!1,event:t,source:u}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!r,rangeSelect:r,event:t,source:u});else{const d=l?!1:!n;this.rowNode.setSelectedParams({newValue:!0,clearSelection:d,rangeSelect:r,event:t,source:u})}}isRowSelectionBlocked(){return!this.rowNode.selectable||!!this.rowNode.rowPinned||!this.gos.isRowSelection()}setupDetailRowAutoHeight(t){if(this.rowType!=="FullWidthDetail"||!this.gos.get("detailRowAutoHeight"))return;const i=()=>{const n=t.clientHeight;if(n!=null&&n>0){const r=()=>{this.rowNode.setRowHeight(n),this.beans.clientSideRowModel?this.beans.clientSideRowModel.onRowHeightChanged():this.beans.serverSideRowModel&&this.beans.serverSideRowModel.onRowHeightChanged()};window.setTimeout(r,0)}},s=this.beans.resizeObserverService.observeResize(t,i);this.addDestroyFunc(s),i()}createFullWidthCompDetails(t,i){const s=this.gos.addGridCommonParams({fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,rowIndex:this.rowNode.rowIndex,eGridCell:t,eParentOfValue:t,pinned:i,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(n,r,o,l)=>this.addFullWidthRowDragging(n,r,o,l),setTooltip:(n,r)=>this.refreshRowTooltip(n,r)});switch(this.rowType){case"FullWidthDetail":return this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(s);case"FullWidthGroup":return this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(s);case"FullWidthLoading":return this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(s);default:return this.beans.userComponentFactory.getFullWidthCellRendererDetails(s)}}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 Xs(s,this.beans))}addFullWidthRowDragging(t,i,s="",n){if(!this.isFullWidth())return;const r=new Ar(()=>s,this.rowNode,void 0,t,i,n);this.createBean(r,this.beans.context),this.addDestroyFunc(()=>{this.destroyBean(r,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(n=>{n.rowComp.addOrRemoveCssClass(i,!0),n.rowComp.addOrRemoveCssClass(s,!1)})}this.rowLevel=t}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()}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){if(this.stoppingRowEdit)return;const i=this.getAllCellCtrls(),s=this.editingRow;this.stoppingRowEdit=!0;let n=!1;for(const r of i){const o=r.stopEditing(t);s&&!t&&!n&&o&&(n=!0)}if(n){const r=this.createRowEvent(g.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(r)}s&&this.setEditingRow(!1),this.stoppingRowEdit=!1}setInlineEditingCss(t){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,this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-row-editing",t));const i=t?this.createRowEvent(g.EVENT_ROW_EDITING_STARTED):this.createRowEvent(g.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(i)}startRowEditing(t=null,i=null,s=null){if(this.editingRow)return;this.getAllCellCtrls().reduce((r,o)=>{const l=o===i;return l?o.startEditing(t,l,s):o.startEditing(null,l,s),r?!0:o.isEditing()},!1)&&this.setEditingRow(!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"?"left":t==="right"?"right":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"){console.warn("AG Grid: 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 n={data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex};s=i(n)}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),zo(s.element,i),s.element.contains(this.beans.gos.getActiveDomElement())&&(s===this.centerGui||s===this.fullWidthGui)&&this.announceDescription()})}announceDescription(){if(this.isRowSelectionBlocked())return;const t=this.rowNode.isSelected();if(t&&this.beans.gos.get("suppressRowDeselection"))return;const s=this.beans.localeService.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row.`);this.beans.ariaAnnouncementService.announceValue(s)}addHoverFunctionality(t){this.active&&(this.addManagedListener(t,"mouseenter",()=>this.rowNode.onMouseEnter()),this.addManagedListener(t,"mouseleave",()=>this.rowNode.onMouseLeave()),this.addManagedListener(this.rowNode,ne.EVENT_MOUSE_ENTER,()=>{!this.beans.dragService.isDragging()&&!this.gos.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),this.rowNode.setHovered(!0))}),this.addManagedListener(this.rowNode,ne.EVENT_MOUSE_LEAVE,()=>{t.classList.remove("ag-row-hover"),this.rowNode.setHovered(!1)}))}roundRowTopToBounds(t){const i=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().getApproximateVScollPosition(),s=this.applyPaginationOffset(i.top,!0)-100,n=this.applyPaginationOffset(i.bottom,!0)+100;return Math.min(Math.max(s,t),n)}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(),r=this.gos.isGetRowHeightFunction()?this.gos.getRowHeightForNode(this.rowNode).height:void 0,o=r?`${Math.min(s,r)-2}px`:void 0;this.forEachGui(t,l=>{l.element.style.height=`${i}px`,o&&l.element.style.setProperty("--ag-line-height",o)})}addEventListener(t,i){super.addEventListener(t,i)}removeEventListener(t,i){super.removeEventListener(t,i)}destroyFirstPass(t=!1){if(this.active=!1,!t&&this.gos.isAnimateRows()&&!this.isSticky())if(this.rowNode.rowTop!=null){const n=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(n)}else this.allRowGuis.forEach(n=>n.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.rowNode.setHovered(!1);const i=this.createRowEvent(g.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(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(){const t=this.beans.paginationProxy.getCurrentPage();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.paginationProxy.getPixelOffset();return t+s*(i?1:-1)}setRowTop(t){if(!this.printLayout&&A(t)){const i=this.applyPaginationOffset(t),r=`${this.rowNode.isRowPinned()||this.rowNode.sticky?i:this.beans.rowContainerHeightService.getRealPixelPosition(i)}px`;this.setRowTopStyle(r)}}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"";let i;if(this.isSticky())i=this.rowNode.stickyRowTop;else{const s=this.slideInAnimation[t]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,n=this.applyPaginationOffset(s);i=this.rowNode.isRowPinned()?n:this.beans.rowContainerHeightService.getRealPixelPosition(n)}return i+"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){const i=this.rowNode.getRowIndexString(),s=this.beans.headerNavigationService.getHeaderRowCount()+this.beans.filterManager.getHeaderRowCount(),n=this.rowNode.rowIndex%2===0,r=s+this.rowNode.rowIndex+1;this.forEachGui(t,o=>{o.rowComp.setRowIndex(i),o.rowComp.addOrRemoveCssClass("ag-row-even",n),o.rowComp.addOrRemoveCssClass("ag-row-odd",!n),Wm(o.element,r)})}};_D.DOM_DATA_KEY_ROW_CTRL="renderedRow";var wr=_D,ci=class extends L{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,t)}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",Gm("touchstart")?"touchstart":"mousedown"].forEach(i=>{const s=this.processMouseEvent.bind(this,i);this.addManagedListener(this.element,i,s)})}processMouseEvent(e,t){if(!this.mouseEventService.isEventFromThisGrid(t)||rs(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(!qs())return;const e=new Ct(this.element),t=i=>{const s=this.getRowForEvent(i.touchEvent),n=this.mouseEventService.getRenderedCellForEvent(i.touchEvent);this.handleContextMenuMouseEvent(void 0,i.touchEvent,s,n)};this.addManagedListener(e,Ct.EVENT_LONG_TAP,t),this.addDestroyFunc(()=>e.destroy())}getRowForEvent(e){let t=e.target;for(;t;){const i=this.gos.getDomData(t,wr.DOM_DATA_KEY_ROW_CTRL);if(i)return i;t=t.parentElement}return null}handleContextMenuMouseEvent(e,t,i,s){const n=i?i.getRowNode():null,r=s?s.getColumn():null;let o=null;if(r){const u=e||t;s.dispatchCellContextMenuEvent(u??null),o=this.valueService.getValue(r,n)}const l=this.ctrlsService.getGridBodyCtrl(),a=s?s.getGui():l.getGridBodyElement();this.menuService.showContextMenu({mouseEvent:e,touchEvent:t,rowNode:n,column:r,value:o,anchorToElement:a})}getControlsForEventTarget(e){return{cellCtrl:gc(this.gos,e,yr.DOM_DATA_KEY_CELL_CTRL),rowCtrl:gc(this.gos,e,wr.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(),n=e.getColumn(),r=e.isEditing();if(!vc(this.gos,i,s,n,r)&&t==="keydown"&&(!r&&this.navigationService.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,e.isEditing()),vh(i)&&e.processCharacter(i)),t==="keydown"){const l=e.createEvent(i,g.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(l)}}processFullWidthRowKeyboardEvent(e,t,i){const s=e.getRowNode(),n=this.focusService.getFocusedCell(),r=n&&n.column;if(!vc(this.gos,i,s,r,!1)){const l=i.key;if(t==="keydown")switch(l){case D.PAGE_HOME:case D.PAGE_END:case D.PAGE_UP:case D.PAGE_DOWN:this.navigationService.handlePageScrollingKey(i,!0);break;case D.UP:case D.DOWN:e.onKeyboardNavigate(i);break;case D.TAB:e.onTabKeyDown(i);break}}if(t==="keydown"){const l=e.createRowEvent(g.EVENT_CELL_KEY_DOWN,i);this.eventService.dispatchEvent(l)}}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!this.mouseEventService.isEventFromThisGrid(e))return;const i=GT(e);if(i===D.A)return this.onCtrlAndA(e);if(i===D.C)return this.onCtrlAndC(e);if(i===D.D)return this.onCtrlAndD(e);if(i===D.V)return this.onCtrlAndV(e);if(i===D.X)return this.onCtrlAndX(e);if(i===D.Y)return this.onCtrlAndY();if(i===D.Z)return this.onCtrlAndZ(e)}onCtrlAndA(e){const{pinnedRowModel:t,paginationProxy:i,rangeService:s}=this;if(s&&i.isRowsToRender()){const[n,r]=[t.isEmpty("top"),t.isEmpty("bottom")],o=n?null:"top";let l,a;r?(l=null,a=this.paginationProxy.getRowCount()-1):(l="bottom",a=t.getPinnedBottomRowData().length-1);const u=this.columnModel.getAllDisplayedColumns();if(Ii(u))return;s.setCellRange({rowStartIndex:0,rowStartPinned:o,rowEndIndex:a,rowEndPinned:l,columnStart:u[0],columnEnd:pe(u)})}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")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))}onCtrlAndY(){this.undoRedoService.redo("ui")}};h([f("mouseEventService")],ci.prototype,"mouseEventService",2);h([f("valueService")],ci.prototype,"valueService",2);h([f("menuService")],ci.prototype,"menuService",2);h([f("ctrlsService")],ci.prototype,"ctrlsService",2);h([f("navigationService")],ci.prototype,"navigationService",2);h([f("focusService")],ci.prototype,"focusService",2);h([f("undoRedoService")],ci.prototype,"undoRedoService",2);h([f("columnModel")],ci.prototype,"columnModel",2);h([f("paginationProxy")],ci.prototype,"paginationProxy",2);h([f("pinnedRowModel")],ci.prototype,"pinnedRowModel",2);h([Se("rangeService")],ci.prototype,"rangeService",2);h([Se("clipboardService")],ci.prototype,"clipboardService",2);h([I],ci.prototype,"postConstruct",1);var ul=class extends L{constructor(e){super(),this.centerContainerCtrl=e}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedListener(this.eventService,g.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this)),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const e=()=>this.onCenterViewportResized();this.centerContainerCtrl.registerViewportResizeListener(e),this.gridBodyCtrl.registerBodyViewportResizeListener(e)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.centerContainerCtrl.isViewportInTheDOMTree()){this.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.getBodyViewportElement(),t=Br(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.setColumnsPinned(i,null,"viewportSizeFeature"))}getPinnedColumnsOverflowingViewport(e){const t=this.pinnedWidthService.getPinnedRightWidth(),i=this.pinnedWidthService.getPinnedLeftWidth(),s=t+i;if(s<e)return[];const n=[...this.columnModel.getDisplayedLeftColumns()],r=[...this.columnModel.getDisplayedRightColumns()];let o=0,l=0,a=0;const u=[];let d=s-a-e;for(;(l<n.length||o<r.length)&&d>0;){if(o<r.length){const c=r[o++];d-=c.getActualWidth(),u.push(c)}if(l<n.length&&d>0){const c=n[l++];d-=c.getActualWidth(),u.push(c)}}return u}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.getBodyViewportElement(),t=Cu(e);if(this.bodyHeight!==t){this.bodyHeight=t;const i={type:g.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(i)}}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.columnModel.setViewportPosition(e,t)}};h([f("ctrlsService")],ul.prototype,"ctrlsService",2);h([f("pinnedWidthService")],ul.prototype,"pinnedWidthService",2);h([f("columnModel")],ul.prototype,"columnModel",2);h([f("scrollVisibleService")],ul.prototype,"scrollVisibleService",2);h([I],ul.prototype,"postConstruct",1);var SC=class extends L{constructor(e){super(),this.element=e}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))}onPinnedLeftWidthChanged(){const e=this.pinnedWidthService.getPinnedLeftWidth(),t=e>0;ue(this.element,t),Vi(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedLeftWidth()}};h([f("pinnedWidthService")],SC.prototype,"pinnedWidthService",2);h([I],SC.prototype,"postConstruct",1);var EC=class extends L{constructor(e){super(),this.element=e}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))}onPinnedRightWidthChanged(){const e=this.pinnedWidthService.getPinnedRightWidth(),t=e>0;ue(this.element,t),Vi(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedRightWidth()}};h([f("pinnedWidthService")],EC.prototype,"pinnedWidthService",2);h([I],EC.prototype,"postConstruct",1);var Lh=class extends L{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,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)}};h([f("rowContainerHeightService")],Lh.prototype,"maxDivHeightScaler",2);h([I],Lh.prototype,"postConstruct",1);var Mh=class extends L{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.addManagedPropertyListener("enableRangeSelection",t=>{if(t.currentValue){this.enableFeature();return}this.disableFeature()}),this.addDestroyFunc(()=>this.disableFeature()),this.gos.get("enableRangeSelection")&&this.enableFeature()}enableFeature(){this.dragService.addDragSource(this.params)}disableFeature(){this.dragService.removeDragSource(this.params)}};h([f("dragService")],Mh.prototype,"dragService",2);h([Se("rangeService")],Mh.prototype,"rangeService",2);h([I],Mh.prototype,"postConstruct",1);var dl=class extends L{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,g.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth()}setWidth(){const{columnModel:e}=this,t=this.gos.isDomLayout("print"),i=e.getBodyContainerWidth(),s=e.getDisplayedColumnsLeftWidth(),n=e.getDisplayedColumnsRightWidth();let r;t?r=i+s+n:(r=i,this.addSpacer&&(this.gos.get("enableRtl")?s:n)===0&&this.scrollVisibleService.isVerticalScrollShowing()&&(r+=this.gos.getScrollbarWidth())),this.callback(r)}};h([f("columnModel")],dl.prototype,"columnModel",2);h([f("scrollVisibleService")],dl.prototype,"scrollVisibleService",2);h([I],dl.prototype,"postConstruct",1);var Ae=(e=>(e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.FULL_WIDTH="fullWidth",e.TOP_LEFT="topLeft",e.TOP_RIGHT="topRight",e.TOP_CENTER="topCenter",e.TOP_FULL_WIDTH="topFullWidth",e.STICKY_TOP_LEFT="stickyTopLeft",e.STICKY_TOP_RIGHT="stickyTopRight",e.STICKY_TOP_CENTER="stickyTopCenter",e.STICKY_TOP_FULL_WIDTH="stickyTopFullWidth",e.STICKY_BOTTOM_LEFT="stickyBottomLeft",e.STICKY_BOTTOM_RIGHT="stickyBottomRight",e.STICKY_BOTTOM_CENTER="stickyBottomCenter",e.STICKY_BOTTOM_FULL_WIDTH="stickyBottomFullWidth",e.BOTTOM_LEFT="bottomLeft",e.BOTTOM_RIGHT="bottomRight",e.BOTTOM_CENTER="bottomCenter",e.BOTTOM_FULL_WIDTH="bottomFullWidth",e))(Ae||{});function OD(e){switch(e){case"center":case"topCenter":case"stickyTopCenter":case"bottomCenter":case"stickyBottomCenter":return"center";case"left":case"topLeft":case"stickyTopLeft":case"bottomLeft":case"stickyBottomLeft":return"left";case"right":case"topRight":case"stickyTopRight":case"bottomRight":case"stickyBottomRight":return"right";case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":case"stickyBottomFullWidth":return"fullWidth";default:throw Error("Invalid Row Container Type")}}var GI=pn([["center","ag-center-cols-container"],["left","ag-pinned-left-cols-container"],["right","ag-pinned-right-cols-container"],["fullWidth","ag-full-width-container"],["topCenter","ag-floating-top-container"],["topLeft","ag-pinned-left-floating-top"],["topRight","ag-pinned-right-floating-top"],["topFullWidth","ag-floating-top-full-width-container"],["stickyTopCenter","ag-sticky-top-container"],["stickyTopLeft","ag-pinned-left-sticky-top"],["stickyTopRight","ag-pinned-right-sticky-top"],["stickyTopFullWidth","ag-sticky-top-full-width-container"],["stickyBottomCenter","ag-sticky-bottom-container"],["stickyBottomLeft","ag-pinned-left-sticky-bottom"],["stickyBottomRight","ag-pinned-right-sticky-bottom"],["stickyBottomFullWidth","ag-sticky-bottom-full-width-container"],["bottomCenter","ag-floating-bottom-container"],["bottomLeft","ag-pinned-left-floating-bottom"],["bottomRight","ag-pinned-right-floating-bottom"],["bottomFullWidth","ag-floating-bottom-full-width-container"]]),kI=pn([["center","ag-center-cols-viewport"],["topCenter","ag-floating-top-viewport"],["stickyTopCenter","ag-sticky-top-viewport"],["bottomCenter","ag-floating-bottom-viewport"],["stickyBottomCenter","ag-sticky-bottom-viewport"]]),Yr=class GD extends L{constructor(t){super(),this.visible=!0,this.EMPTY_CTRLS=[],this.name=t,this.isFullWithContainer=this.name==="topFullWidth"||this.name==="stickyTopFullWidth"||this.name==="stickyBottomFullWidth"||this.name==="bottomFullWidth"||this.name==="fullWidth"}static getRowContainerCssClasses(t){const i=GI.get(t),s=kI.get(t);return{container:i,viewport:s}}static getPinned(t){switch(t){case"bottomLeft":case"topLeft":case"stickyTopLeft":case"stickyBottomLeft":case"left":return"left";case"bottomRight":case"topRight":case"stickyTopRight":case"stickyBottomRight":case"right":return"right";default:return null}}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>this.viewportSizeFeature=this.createManagedBean(new ul(this)))}registerWithCtrlsService(){switch(this.name){case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":case"stickyBottomFullWidth":return;default:this.ctrlsService.register(this.name,this)}}forContainers(t,i){t.indexOf(this.name)>=0&&i()}getContainerElement(){return this.eContainer}getViewportSizeFeature(){return this.viewportSizeFeature}setComp(t,i,s){this.comp=t,this.eContainer=i,this.eViewport=s,this.createManagedBean(new ci(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();const n=["topCenter","topLeft","topRight"],r=["stickyTopCenter","stickyTopLeft","stickyTopRight"],o=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],l=["bottomCenter","bottomLeft","bottomRight"],a=["center","left","right"],u=[...n,...l,...a,...r,...o],d=["center","left","right","fullWidth"],c=["center","topCenter","stickyTopCenter","bottomCenter","stickyBottomCenter"],p=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],C=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"];this.forContainers(p,()=>{this.pinnedWidthFeature=this.createManagedBean(new SC(this.eContainer)),this.addManagedListener(this.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,()=>this.onPinnedWidthChanged())}),this.forContainers(C,()=>{this.pinnedWidthFeature=this.createManagedBean(new EC(this.eContainer)),this.addManagedListener(this.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,()=>this.onPinnedWidthChanged())}),this.forContainers(d,()=>this.createManagedBean(new Lh(this.eContainer,this.name==="center"?s:void 0))),this.forContainers(u,()=>this.createManagedBean(new Mh(this.eContainer))),this.forContainers(c,()=>this.createManagedBean(new dl(v=>this.comp.setContainerWidth(`${v}px`)))),this.addListeners(),this.registerWithCtrlsService()}addListeners(){this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>this.onDisplayedColumnsChanged()),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>this.onDisplayedColumnsWidthChanged()),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_ROWS_CHANGED,t=>this.onDisplayedRowsChanged(t.afterScroll)),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()}listenOnDomOrder(){if(["stickyTopCenter","stickyTopLeft","stickyTopRight","stickyTopFullWidth","stickyBottomCenter","stickyBottomLeft","stickyBottomRight","stickyBottomFullWidth"].indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const s=()=>{const n=this.gos.get("ensureDomOrder"),r=this.gos.isDomLayout("print");this.comp.setDomOrder(n||r)};this.addManagedPropertyListener("domLayout",s),s()}stopHScrollOnPinnedRows(){this.forContainers(["topCenter","stickyTopCenter","bottomCenter","stickyBottomCenter"],()=>{const t=()=>this.eViewport.scrollLeft=0;this.addManagedListener(this.eViewport,"scroll",t)})}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}onDisplayedColumnsWidthChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const t=i=>{this.dragService.isDragging()&&i.cancelable&&i.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(t=!1){const i=this.getCenterWidth(),s=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(i,s,t)}getCenterWidth(){return Br(this.eViewport)}getCenterViewportScrollLeft(){return Va(this.eViewport,this.enableRtl)}registerViewportResizeListener(t){const i=this.resizeObserverService.observeResize(this.eViewport,t);this.addDestroyFunc(()=>i())}isViewportInTheDOMTree(){return tC(this.eViewport)}getViewportScrollLeft(){return Va(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||bT(this.eViewport)}getViewportElement(){return this.eViewport}setContainerTranslateX(t){this.eContainer.style.transform=`translateX(${t}px)`}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(t){Ha(this.eViewport,t,this.enableRtl)}isContainerVisible(){return!GD.getPinned(this.name)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const t=this.isContainerVisible();this.visible!=t&&(this.visible=t,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(t=!1){const i=this.getRowCtrls();if(!this.visible||i.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const s=this.gos.isDomLayout("print"),r=this.gos.get("embedFullWidthRows")||s,o=i.filter(l=>{const a=l.isFullWidth();return this.isFullWithContainer?!r&&a:r||!a});this.comp.setRowCtrls({rowCtrls:o,useFlushSync:t})}getRowCtrls(){switch(this.name){case"topCenter":case"topLeft":case"topRight":case"topFullWidth":return this.rowRenderer.getTopRowCtrls();case"stickyTopCenter":case"stickyTopLeft":case"stickyTopRight":case"stickyTopFullWidth":return this.rowRenderer.getStickyTopRowCtrls();case"stickyBottomCenter":case"stickyBottomLeft":case"stickyBottomRight":case"stickyBottomFullWidth":return this.rowRenderer.getStickyBottomRowCtrls();case"bottomCenter":case"bottomLeft":case"bottomRight":case"bottomFullWidth":return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getCentreRowCtrls()}}};h([f("dragService")],Yr.prototype,"dragService",2);h([f("ctrlsService")],Yr.prototype,"ctrlsService",2);h([f("columnModel")],Yr.prototype,"columnModel",2);h([f("resizeObserverService")],Yr.prototype,"resizeObserverService",2);h([f("rowRenderer")],Yr.prototype,"rowRenderer",2);h([I],Yr.prototype,"postConstruct",1);var Sc=Yr,VI=`<div class="ag-root ag-unselectable" role="treegrid">
|
|
237
|
+
<ag-header-root ref="gridHeader"></ag-header-root>
|
|
238
|
+
<div class="ag-floating-top" ref="eTop" role="presentation">
|
|
239
|
+
<ag-row-container ref="topLeftContainer" name="topLeft"></ag-row-container>
|
|
240
|
+
<ag-row-container ref="topCenterContainer" name="topCenter"></ag-row-container>
|
|
241
|
+
<ag-row-container ref="topRightContainer" name="topRight"></ag-row-container>
|
|
242
|
+
<ag-row-container ref="topFullWidthContainer" name="topFullWidth"></ag-row-container>
|
|
243
|
+
</div>
|
|
244
|
+
<div class="ag-body" ref="eBody" role="presentation">
|
|
245
|
+
<div class="ag-body-viewport" ref="eBodyViewport" role="presentation">
|
|
246
|
+
<ag-row-container ref="leftContainer" name="left"></ag-row-container>
|
|
247
|
+
<ag-row-container ref="centerContainer" name="center"></ag-row-container>
|
|
248
|
+
<ag-row-container ref="rightContainer" name="right"></ag-row-container>
|
|
249
|
+
<ag-row-container ref="fullWidthContainer" name="fullWidth"></ag-row-container>
|
|
250
|
+
</div>
|
|
251
|
+
<ag-fake-vertical-scroll></ag-fake-vertical-scroll>
|
|
252
|
+
</div>
|
|
253
|
+
<div class="ag-sticky-top" ref="eStickyTop" role="presentation">
|
|
254
|
+
<ag-row-container ref="stickyTopLeftContainer" name="stickyTopLeft"></ag-row-container>
|
|
255
|
+
<ag-row-container ref="stickyTopCenterContainer" name="stickyTopCenter"></ag-row-container>
|
|
256
|
+
<ag-row-container ref="stickyTopRightContainer" name="stickyTopRight"></ag-row-container>
|
|
257
|
+
<ag-row-container ref="stickyTopFullWidthContainer" name="stickyTopFullWidth"></ag-row-container>
|
|
258
|
+
</div>
|
|
259
|
+
<div class="ag-sticky-bottom" ref="eStickyBottom" role="presentation">
|
|
260
|
+
<ag-row-container ref="stickyBottomLeftContainer" name="stickyBottomLeft"></ag-row-container>
|
|
261
|
+
<ag-row-container ref="stickyBottomCenterContainer" name="stickyBottomCenter"></ag-row-container>
|
|
262
|
+
<ag-row-container ref="stickyBottomRightContainer" name="stickyBottomRight"></ag-row-container>
|
|
263
|
+
<ag-row-container ref="stickyBottomFullWidthContainer" name="stickyBottomFullWidth"></ag-row-container>
|
|
264
|
+
</div>
|
|
265
|
+
<div class="ag-floating-bottom" ref="eBottom" role="presentation">
|
|
266
|
+
<ag-row-container ref="bottomLeftContainer" name="bottomLeft"></ag-row-container>
|
|
267
|
+
<ag-row-container ref="bottomCenterContainer" name="bottomCenter"></ag-row-container>
|
|
268
|
+
<ag-row-container ref="bottomRightContainer" name="bottomRight"></ag-row-container>
|
|
269
|
+
<ag-row-container ref="bottomFullWidthContainer" name="bottomFullWidth"></ag-row-container>
|
|
270
|
+
</div>
|
|
271
|
+
<ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>
|
|
272
|
+
<ag-overlay-wrapper></ag-overlay-wrapper>
|
|
273
|
+
</div>`,us=class extends te{constructor(){super(VI)}init(){const t=(s,n)=>{const r=`${s}px`;n.style.minHeight=r,n.style.height=r},i={setRowAnimationCssOnBodyViewport:(s,n)=>this.setRowAnimationCssOnBodyViewport(s,n),setColumnCount:s=>dT(this.getGui(),s),setRowCount:s=>uT(this.getGui(),s),setTopHeight:s=>t(s,this.eTop),setBottomHeight:s=>t(s,this.eBottom),setTopDisplay:s=>this.eTop.style.display=s,setBottomDisplay:s=>this.eBottom.style.display=s,setStickyTopHeight:s=>this.eStickyTop.style.height=s,setStickyTopTop:s=>this.eStickyTop.style.top=s,setStickyTopWidth:s=>this.eStickyTop.style.width=s,setStickyBottomHeight:s=>this.eStickyBottom.style.height=s,setStickyBottomBottom:s=>this.eStickyBottom.style.bottom=s,setStickyBottomWidth:s=>this.eStickyBottom.style.width=s,setColumnMovingCss:(s,n)=>this.addOrRemoveCssClass(s,n),updateLayoutClasses:(s,n)=>{[this.eBodyViewport.classList,this.eBody.classList].forEach(o=>{o.toggle("ag-layout-auto-height",n.autoHeight),o.toggle("ag-layout-normal",n.normal),o.toggle("ag-layout-print",n.print)}),this.addOrRemoveCssClass("ag-layout-auto-height",n.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",n.normal),this.addOrRemoveCssClass("ag-layout-print",n.print)},setAlwaysVerticalScrollClass:(s,n)=>this.eBodyViewport.classList.toggle(MD,n),registerBodyViewportResizeListener:s=>{const n=this.resizeObserverService.observeResize(this.eBodyViewport,s);this.addDestroyFunc(()=>n())},setPinnedTopBottomOverflowY:s=>this.eTop.style.overflowY=this.eBottom.style.overflowY=s,setCellSelectableCss:(s,n)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(r=>r.classList.toggle(s,n))},setBodyViewportWidth:s=>this.eBodyViewport.style.width=s};this.ctrl=this.createManagedBean(new _t),this.ctrl.setComp(i,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(this.rangeService&&this.gos.get("enableRangeSelection")||this.gos.get("rowSelection")==="multiple")&&aT(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(t,i){const s=this.eBodyViewport.classList;s.toggle("ag-row-animation",i),s.toggle("ag-row-no-animation",!i)}getFloatingTopBottom(){return[this.eTop,this.eBottom]}};h([f("resizeObserverService")],us.prototype,"resizeObserverService",2);h([Se("rangeService")],us.prototype,"rangeService",2);h([_("eBodyViewport")],us.prototype,"eBodyViewport",2);h([_("eStickyTop")],us.prototype,"eStickyTop",2);h([_("eStickyBottom")],us.prototype,"eStickyBottom",2);h([_("eTop")],us.prototype,"eTop",2);h([_("eBottom")],us.prototype,"eBottom",2);h([_("gridHeader")],us.prototype,"headerRootComp",2);h([_("eBody")],us.prototype,"eBody",2);h([I],us.prototype,"init",1);var Ko=class extends L{postConstruct(){this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))}onDisplayedColumnsChanged(){this.update()}onDisplayedColumnsWidthChanged(){this.update()}update(){this.columnAnimationService.isActive()?this.columnAnimationService.executeLaterVMTurn(()=>{this.columnAnimationService.executeLaterVMTurn(()=>this.updateImpl())}):this.updateImpl()}updateImpl(){const e=this.ctrlsService.get("center");if(!e||this.columnAnimationService.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t)}setScrollsVisible(e){if(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;const i={type:g.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(i)}}isHorizontalScrollShowing(){return this.horizontalScrollShowing}isVerticalScrollShowing(){return this.verticalScrollShowing}};h([f("ctrlsService")],Ko.prototype,"ctrlsService",2);h([f("columnAnimationService")],Ko.prototype,"columnAnimationService",2);h([I],Ko.prototype,"postConstruct",1);Ko=h([B("scrollVisibleService")],Ko);var ks=class extends L{constructor(){super(...arguments),this.gridInstanceId=ks.gridInstanceSequence.next()}stampTopLevelGridCompWithGridInstance(e){e[ks.GRID_DOM_KEY]=this.gridInstanceId}getRenderedCellForEvent(e){return gc(this.gos,e.target,yr.DOM_DATA_KEY_CELL_CTRL)}isEventFromThisGrid(e){return this.isElementInThisGrid(e.target)}isElementInThisGrid(e){let t=e;for(;t;){const i=t[ks.GRID_DOM_KEY];if(A(i))return i===this.gridInstanceId;t=t.parentElement}return!1}getCellPositionForEvent(e){const t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null}getNormalisedPosition(e){const t=this.gos.isDomLayout("normal"),i=e;let s,n;if(i.clientX!=null||i.clientY!=null?(s=i.clientX,n=i.clientY):(s=i.x,n=i.y),t){const r=this.ctrlsService.getGridBodyCtrl(),o=r.getScrollFeature().getVScrollPosition(),l=r.getScrollFeature().getHScrollPosition();s+=l.left,n+=o.top}return{x:s,y:n}}};ks.gridInstanceSequence=new jo;ks.GRID_DOM_KEY="__ag_grid_instance";h([f("ctrlsService")],ks.prototype,"ctrlsService",2);ks=h([B("mouseEventService")],ks);var It=class extends L{constructor(){super(),this.onPageDown=Zg(this.onPageDown,100),this.onPageUp=Zg(this.onPageUp,100)}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const i=e.key,s=e.altKey,n=e.ctrlKey||e.metaKey,r=!!this.rangeService&&e.shiftKey,o=this.mouseEventService.getCellPositionForEvent(e);let l=!1;switch(i){case D.PAGE_HOME:case D.PAGE_END:!n&&!s&&(this.onHomeOrEndKey(i),l=!0);break;case D.LEFT:case D.RIGHT:case D.UP:case D.DOWN:if(!o)return!1;n&&!s&&!r&&(this.onCtrlUpDownLeftRight(i,o),l=!0);break;case D.PAGE_DOWN:case D.PAGE_UP:!n&&!s&&(l=this.handlePageUpDown(i,o,t));break}return l&&e.preventDefault(),l}handlePageUpDown(e,t,i){return i&&(t=this.focusService.getFocusedCell()),t?(e===D.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo(e){var t;const{scrollIndex:i,scrollType:s,scrollColumn:n,focusIndex:r,focusColumn:o}=e;A(n)&&!n.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(n),A(i)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(i,s),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(r),this.focusService.setFocusedCell({rowIndex:r,column:o,rowPinned:null,forceBrowserFocus:!0}),(t=this.rangeService)==null||t.setRangeToCell({rowIndex:r,rowPinned:null,column:o})}onPageDown(e){const i=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),s=this.getViewportHeight(),n=this.paginationProxy.getPixelOffset(),r=i.top+s,o=this.paginationProxy.getRowIndexAtPixel(r+n);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,o):this.navigateToNextPage(e,o)}onPageUp(e){const i=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),s=this.paginationProxy.getPixelOffset(),n=i.top,r=this.paginationProxy.getRowIndexAtPixel(n+s);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,r,!0):this.navigateToNextPage(e,r,!0)}navigateToNextPage(e,t,i=!1){const s=this.getViewportHeight(),n=this.paginationProxy.getPageFirstRow(),r=this.paginationProxy.getPageLastRow(),o=this.paginationProxy.getPixelOffset(),l=this.paginationProxy.getRow(e.rowIndex),a=i?(l==null?void 0:l.rowHeight)-s-o:s-o,u=(l==null?void 0:l.rowTop)+a;let d=this.paginationProxy.getRowIndexAtPixel(u+o);if(d===e.rowIndex){const p=i?-1:1;t=d=e.rowIndex+p}let c;i?(c="bottom",d<n&&(d=n),t<n&&(t=n)):(c="top",d>r&&(d=r),t>r&&(t=r)),this.isRowTallerThanView(d)&&(t=d,c="top"),this.navigateTo({scrollIndex:t,scrollType:c,scrollColumn:null,focusIndex:d,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){var i;const s=t?-1:1,n=this.getViewportHeight(),r=this.paginationProxy.getPageLastRow();let o=0,l=e.rowIndex;for(;l>=0&&l<=r;){const a=this.paginationProxy.getRow(l);if(a){const u=(i=a.rowHeight)!=null?i:0;if(o+u>n)break;o+=u}l+=s}return Math.max(0,Math.min(l,r))}getViewportHeight(){const{gridBodyCtrl:e,center:t}=this.ctrlsService.getParams(),i=e.getScrollFeature().getVScrollPosition(),s=this.gos.getScrollbarWidth();let n=i.bottom-i.top;return t.isHorizontalScrollShowing()&&(n-=s),n}isRowTallerThanView(e){const t=this.paginationProxy.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,column:n}=i;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:n,focusIndex:s,focusColumn:n})}onHomeOrEndKey(e){const t=e===D.PAGE_HOME,i=this.columnModel.getAllDisplayedColumns(),s=t?i[0]:pe(i),n=t?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:s,focusIndex:n,focusColumn:s})}onTabKeyDown(e,t){const i=t.shiftKey,s=this.tabToNextCellCommon(e,i,t);if(s!==!1){s&&t.preventDefault();return}if(i){const{rowIndex:n,rowPinned:r}=e.getRowPosition();(r?n===0:n===this.paginationProxy.getPageFirstRow())&&(this.gos.get("headerHeight")===0||this.gos.get("suppressHeaderFocus")?this.focusService.focusNextGridCoreContainer(!0,!0):(t.preventDefault(),this.focusService.focusPreviousFromFirstCell(t)))}else e instanceof yr&&e.focusCell(!0),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 yr){const o=e.getRowCtrl();o&&(s=o.isEditing())}let n;return s?this.gos.get("editType")==="fullRow"?n=this.moveToNextEditingRow(e,t,i):n=this.moveToNextEditingCell(e,t,i):n=this.moveToNextCellNotEditing(e,t),n===null?n:n||!!this.focusService.getFocusedHeader()}moveToNextEditingCell(e,t,i=null){const s=e.getCellPosition();e.getGui().focus(),e.stopEditing();const n=this.findNextCellToFocusOn(s,t,!0);return n===!1?null:n==null?!1:(n.startEditing(null,!0,i),n.focusCell(!1),!0)}moveToNextEditingRow(e,t,i=null){const s=e.getCellPosition(),n=this.findNextCellToFocusOn(s,t,!0);if(n===!1)return null;if(n==null)return!1;const r=n.getCellPosition(),o=this.isCellEditable(s),l=this.isCellEditable(r),a=r&&s.rowIndex===r.rowIndex&&s.rowPinned===r.rowPinned;return o&&e.setFocusOutOnEditor(),a||(e.getRowCtrl().stopEditing(),n.getRowCtrl().startRowEditing(void 0,void 0,i)),l?(n.setFocusInOnEditor(),n.focusCell()):n.focusCell(!0),!0}moveToNextCellNotEditing(e,t){const i=this.columnModel.getAllDisplayedColumns();let s;e instanceof wr?s=Ie(K({},e.getRowPosition()),{column:t?i[0]:pe(i)}):s=e.getCellPosition();const n=this.findNextCellToFocusOn(s,t,!1);if(n===!1)return null;if(n instanceof yr)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n.getRowPosition(),t);return A(n)}findNextCellToFocusOn(e,t,i){var s;let n=e;for(;;){e!==n&&(e=n),t||(n=this.getLastCellOfColSpan(n)),n=this.cellNavigationService.getNextTabbedCell(n,t);const r=this.gos.getCallback("tabToNextCell");if(A(r)){const u=r({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:n||null});if(u===!0||u===null)u===null&&Y("Returning `null` from tabToNextCell is deprecated. Return `true` to stay on the current cell, or `false` to let the browser handle the tab behaviour."),n=e;else{if(u===!1)return!1;u.floating&&(Y("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),u.rowPinned=u.floating),n={rowIndex:u.rowIndex,column:u.column,rowPinned:u.rowPinned}}}if(!n)return null;if(n.rowIndex<0){const a=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a+n.rowIndex,column:n.column},fromCell:!0}),null}const o=this.gos.get("editType")==="fullRow";if(i&&!o&&!this.isCellEditable(n))continue;this.ensureCellVisible(n);const l=this.getCellByPosition(n);if(!l){const a=this.rowRenderer.getRowByPosition(n);if(!a||!a.isFullWidth()||i)continue;return a}if(!l.isSuppressNavigable())return(s=this.rangeService)==null||s.setRangeToCell(n),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.paginationProxy.getRow(e.rowIndex)}navigateToNextCell(e,t,i,s){let n=i,r=!1;for(;n&&(n===i||!this.isValidNavigateCell(n));)this.gos.get("enableRtl")?t===D.LEFT&&(n=this.getLastCellOfColSpan(n)):t===D.RIGHT&&(n=this.getLastCellOfColSpan(n)),n=this.cellNavigationService.getNextCellToFocus(t,n),r=J(n);if(r&&e&&e.key===D.UP&&(n={rowIndex:-1,rowPinned:null,column:i.column}),s){const l=this.gos.getCallback("navigateToNextCell");if(A(l)){const u=l({key:t,previousCellPosition:i,nextCellPosition:n||null,event:e});A(u)?(u.floating&&(Y("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),u.rowPinned=u.floating),n={rowPinned:u.rowPinned,rowIndex:u.rowIndex,column:u.column}):n=null}}if(!n)return;if(n.rowIndex<0){const l=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l+n.rowIndex,column:i.column},event:e||void 0,fromCell:!0});return}const o=this.getNormalisedPosition(n);o?this.focusPosition(o):this.tryToFocusFullWidthRow(n)}getNormalisedPosition(e){this.ensureCellVisible(e);const t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t=!1){const i=this.columnModel.getAllDisplayedColumns(),s=this.rowRenderer.getRowByPosition(e);if(!s||!s.isFullWidth())return!1;const n=this.focusService.getFocusedCell(),r={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?pe(i):i[0])};this.focusPosition(r);const o=n!=null?this.rowPositionUtils.before(r,n):!1,l={type:g.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:r.column,isFullWidthCell:!0,floating:r.rowPinned,fromBelow:o};return this.eventService.dispatchEvent(l),!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:pe(i),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=this.gos.isGroupRowsSticky(),i=this.rowModel.getRow(e.rowIndex);!(t&&(i==null?void 0:i.sticky))&&J(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)}};h([f("mouseEventService")],It.prototype,"mouseEventService",2);h([f("paginationProxy")],It.prototype,"paginationProxy",2);h([f("focusService")],It.prototype,"focusService",2);h([f("columnModel")],It.prototype,"columnModel",2);h([f("rowModel")],It.prototype,"rowModel",2);h([f("ctrlsService")],It.prototype,"ctrlsService",2);h([f("rowRenderer")],It.prototype,"rowRenderer",2);h([f("headerNavigationService")],It.prototype,"headerNavigationService",2);h([f("rowPositionUtils")],It.prototype,"rowPositionUtils",2);h([f("cellNavigationService")],It.prototype,"cellNavigationService",2);h([f("pinnedRowModel")],It.prototype,"pinnedRowModel",2);h([Se("rangeService")],It.prototype,"rangeService",2);h([I],It.prototype,"postConstruct",1);It=h([B("navigationService")],It);var RC=class kD extends zr{constructor(t){super('<div class="ag-popup-editor" tabindex="-1"/>'),this.params=t}postConstruct(){this.gos.setDomData(this.getGui(),kD.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()}addKeyDownListener(){const t=this.getGui(),i=this.params,s=n=>{vc(this.gos,n,i.node,i.column,!0)||i.onKeyDown(n)};this.addManagedListener(t,"keydown",s)}};RC.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper";h([I],RC.prototype,"postConstruct",1);var VD=RC,HI=class extends te{constructor(t,i,s,n,r){super(),this.rendererVersion=0,this.editorVersion=0,this.beans=t,this.column=i.getColumn(),this.rowNode=i.getRowNode(),this.rowCtrl=i.getRowCtrl(),this.eRow=n,this.cellCtrl=i;const o=document.createElement("div");o.setAttribute("comp-id",`${this.getCompId()}`),this.setTemplateFromElement(o);const l=this.getGui();this.forceWrapper=i.isForceWrapper(),this.refreshWrapper(!1);const a=(c,p)=>{p!=null&&p!=""?l.setAttribute(c,p):l.removeAttribute(c)};Ue(l,i.getCellAriaRole()),a("col-id",i.getColumnIdSanitised());const u=i.getTabIndex();u!==void 0&&a("tabindex",u.toString());const d={addOrRemoveCssClass:(c,p)=>this.addOrRemoveCssClass(c,p),setUserStyles:c=>nC(l,c),getFocusableElement:()=>this.getFocusableElement(),setIncludeSelection:c=>this.includeSelection=c,setIncludeRowDrag:c=>this.includeRowDrag=c,setIncludeDndSource:c=>this.includeDndSource=c,setRenderDetails:(c,p,C)=>this.setRenderDetails(c,p,C),setEditDetails:(c,p,C)=>this.setEditDetails(c,p,C),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};i.setComp(d,this.getGui(),this.eCellWrapper,s,r)}getParentOfValue(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()}setRenderDetails(t,i,s){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const r=this.refreshWrapper(!1);this.refreshEditStyles(!1),t?!(s||r)&&this.refreshCellRenderer(t)||(this.destroyRenderer(),this.createCellRendererInstance(t)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(i))}setEditDetails(t,i,s){t?this.createCellEditorInstance(t,i,s):this.destroyEditor()}removeControls(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)}refreshWrapper(t){const i=this.includeRowDrag||this.includeDndSource||this.includeSelection,s=i||this.forceWrapper,n=s&&this.eCellWrapper==null;if(n){const d=document.createElement("div");d.setAttribute("role","presentation"),d.setAttribute("class","ag-cell-wrapper"),this.eCellWrapper=d,this.getGui().appendChild(this.eCellWrapper)}const r=!s&&this.eCellWrapper!=null;r&&(ts(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!s);const o=!t&&s,l=o&&this.eCellValue==null;if(l){const d=document.createElement("span");d.setAttribute("role","presentation"),d.setAttribute("class","ag-cell-value"),this.eCellValue=d,this.eCellWrapper.appendChild(this.eCellValue)}const a=!o&&this.eCellValue!=null;a&&(ts(this.eCellValue),this.eCellValue=void 0);const u=n||r||l||a;return u&&this.removeControls(),t||i&&this.addControls(),u}addControls(){this.includeRowDrag&&this.rowDraggingComp==null&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&this.dndSourceComp==null&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))}createCellEditorInstance(t,i,s){const n=this.editorVersion,r=t.newAgStackInstance();if(!r)return;const{params:o}=t;r.then(a=>this.afterCellEditorCreated(n,a,o,i,s)),J(this.cellEditor)&&o.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(t){const i=this.getParentOfValue();Xe(i);const s=t!=null?tt(t,!0):null;s!=null&&(i.textContent=s)}destroyEditorAndRenderer(){this.destroyRenderer(),this.destroyEditor()}destroyRenderer(){const{context:t}=this.beans;this.cellRenderer=t.destroyBean(this.cellRenderer),ts(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:t}=this.beans;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=t.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=t.destroyBean(this.cellEditorPopupWrapper),ts(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(t){if(this.cellRenderer==null||this.cellRenderer.refresh==null||this.cellRendererClass!==t.componentClass)return!1;const i=this.cellRenderer.refresh(t.params);return i===!0||i===void 0}createCellRendererInstance(t){const s=!this.beans.gos.get("suppressAnimationFrame"),n=this.rendererVersion,{componentClass:r}=t,o=()=>{if(this.rendererVersion!==n||!this.isAlive())return;const a=t.newAgStackInstance(),u=this.afterCellRendererCreated.bind(this,n,r);a&&a.then(u)};s&&this.firstRender?this.beans.animationFrameService.createTask(o,this.rowNode.rowIndex,"createTasksP2"):o()}getCtrl(){return this.cellCtrl}getRowCtrl(){return this.rowCtrl}getCellRenderer(){return this.cellRenderer}getCellEditor(){return this.cellEditor}afterCellRendererCreated(t,i,s){if(!this.isAlive()||t!==this.rendererVersion){this.beans.context.destroyBean(s);return}if(this.cellRenderer=s,this.cellRendererClass=i,this.cellRendererGui=this.cellRenderer.getGui(),this.cellRendererGui!=null){const r=this.getParentOfValue();Xe(r),r.appendChild(this.cellRendererGui)}}afterCellEditorCreated(t,i,s,n,r){if(t!==this.editorVersion){this.beans.context.destroyBean(i);return}if(i.isCancelBeforeStart&&i.isCancelBeforeStart()){this.beans.context.destroyBean(i),this.cellCtrl.stopEditing(!0);return}if(!i.getGui){console.warn(`AG Grid: cellEditor for column ${this.column.getId()} is missing getGui() method`),this.beans.context.destroyBean(i);return}this.cellEditor=i,this.cellEditorGui=i.getGui();const a=n||i.isPopup!==void 0&&i.isPopup();a?this.addPopupCellEditor(s,r):this.addInCellEditor(),this.refreshEditStyles(!0,a),i.afterGuiAttached&&i.afterGuiAttached()}refreshEditStyles(t,i){var s;this.addOrRemoveCssClass("ag-cell-inline-editing",t&&!i),this.addOrRemoveCssClass("ag-cell-popup-editing",t&&!!i),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!t||!!i),(s=this.rowCtrl)==null||s.setInlineEditingCss(t)}addInCellEditor(){const t=this.getGui();t.contains(this.beans.gos.getActiveDomElement())&&t.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(t,i){this.beans.gos.get("editType")==="fullRow"&&console.warn("AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");const s=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new VD(t));const n=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&n.appendChild(this.cellEditorGui);const r=this.beans.popupService,o=this.beans.gos.get("stopEditingWhenCellsLoseFocus"),l=i??(s.getPopupPosition?s.getPopupPosition():"over"),a=this.beans.gos.get("enableRtl"),u={ePopup:n,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:l,alignSide:a?"right":"left",keepWithinBounds:!0},d=r.positionPopupByComponent.bind(r,u),c=this.beans.localeService.getLocaleTextFunc(),p=r.addPopup({modal:o,eChild:n,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:d,ariaLabel:c("ariaLabelCellEditor","Cell Editor")});p&&(this.hideEditorPopup=p.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),super.destroy()}clearParentOfValue(){const t=this.getGui();t.contains(this.beans.gos.getActiveDomElement())&&Ym()&&t.focus({preventScroll:!0}),Xe(this.getParentOfValue())}},BI=class extends te{constructor(t,i,s){super(),this.cellComps={},this.beans=i,this.rowCtrl=t;const n=document.createElement("div");n.setAttribute("comp-id",`${this.getCompId()}`),n.setAttribute("style",this.getInitialStyle(s)),this.setTemplateFromElement(n);const r=this.getGui(),o=r.style;this.domOrder=this.rowCtrl.getDomOrder(),Ue(r,"row");const l=this.rowCtrl.getTabIndex();l!=null&&r.setAttribute("tabindex",l.toString());const a={setDomOrder:u=>this.domOrder=u,setCellCtrls:u=>this.setCellCtrls(u),showFullWidth:u=>this.showFullWidth(u),getFullWidthCellRenderer:()=>this.getFullWidthCellRenderer(),addOrRemoveCssClass:(u,d)=>this.addOrRemoveCssClass(u,d),setUserStyles:u=>nC(r,u),setTop:u=>o.top=u,setTransform:u=>o.transform=u,setRowIndex:u=>r.setAttribute("row-index",u),setRowId:u=>r.setAttribute("row-id",u),setRowBusinessKey:u=>r.setAttribute("row-business-key",u),refreshFullWidth:u=>this.refreshFullWidth(u)};t.setComp(a,this.getGui(),s),this.addDestroyFunc(()=>{t.unsetComp(s)})}getInitialStyle(t){const i=this.rowCtrl.getInitialTransform(t);return i?`transform: ${i}`:`top: ${this.rowCtrl.getInitialRowTop(t)}`}showFullWidth(t){const i=n=>{if(this.isAlive()){const r=n.getGui();this.getGui().appendChild(r),this.rowCtrl.setupDetailRowAutoHeight(r),this.setFullWidthRowComp(n)}else this.beans.context.destroyBean(n)},s=t.newAgStackInstance();s&&s.then(i)}setCellCtrls(t){const i=Object.assign({},this.cellComps);t.forEach(n=>{const r=n.getInstanceId();this.cellComps[r]==null?this.newCellComp(n):i[r]=null});const s=Ln(i).filter(n=>n!=null);this.destroyCells(s),this.ensureDomOrder(t)}ensureDomOrder(t){if(!this.domOrder)return;const i=[];t.forEach(s=>{const n=this.cellComps[s.getInstanceId()];n&&i.push(n.getGui())}),sC(this.getGui(),i)}newCellComp(t){const i=new HI(this.beans,t,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[t.getInstanceId()]=i,this.getGui().appendChild(i.getGui())}destroy(){super.destroy(),this.destroyAllCells()}destroyAllCells(){const t=Ln(this.cellComps).filter(i=>i!=null);this.destroyCells(t)}setFullWidthRowComp(t){this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=t,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}getFullWidthCellRenderer(){return this.fullWidthCellRenderer}destroyCells(t){t.forEach(i=>{if(!i)return;const s=i.getCtrl().getInstanceId();this.cellComps[s]===i&&(i.detach(),i.destroy(),this.cellComps[s]=null)})}refreshFullWidth(t){const{fullWidthCellRenderer:i}=this;if(!i||!i.refresh)return!1;const s=t();return i.refresh(s)}};function WI(){const e=te.elementGettingCreated.getAttribute("name"),t=Sc.getRowContainerCssClasses(e);let i;return e==="center"||e==="topCenter"||e==="stickyTopCenter"||e==="bottomCenter"||e==="stickyBottomCenter"?i=`<div class="${t.viewport}" ref="eViewport" role="presentation">
|
|
274
|
+
<div class="${t.container}" ref="eContainer"></div>
|
|
275
|
+
</div>`:i=`<div class="${t.container}" ref="eContainer"></div>`,i}var cl=class extends te{constructor(){super(WI()),this.rowComps={},this.name=te.elementGettingCreated.getAttribute("name"),this.type=OD(this.name)}postConstruct(){const t={setViewportHeight:s=>this.eViewport.style.height=s,setRowCtrls:({rowCtrls:s})=>this.setRowCtrls(s),setDomOrder:s=>{this.domOrder=s},setContainerWidth:s=>this.eContainer.style.width=s};this.createManagedBean(new Sc(this.name)).setComp(t,this.eContainer,this.eViewport)}preDestroy(){this.setRowCtrls([])}setRowCtrls(t){const i=K({},this.rowComps);this.rowComps={},this.lastPlacedElement=null;const s=n=>{const r=n.getInstanceId(),o=i[r];if(o)this.rowComps[r]=o,delete i[r],this.ensureDomOrder(o.getGui());else{if(!n.getRowNode().displayed)return;const l=new BI(n,this.beans,this.type);this.rowComps[r]=l,this.appendRow(l.getGui())}};t.forEach(s),Ln(i).forEach(n=>{this.eContainer.removeChild(n.getGui()),n.destroy()}),Ue(this.eContainer,"rowgroup")}appendRow(t){this.domOrder?PT(this.eContainer,t,this.lastPlacedElement):this.eContainer.appendChild(t),this.lastPlacedElement=t}ensureDomOrder(t){this.domOrder&&(iC(this.eContainer,t,this.lastPlacedElement),this.lastPlacedElement=t)}};h([f("beans")],cl.prototype,"beans",2);h([_("eViewport")],cl.prototype,"eViewport",2);h([_("eContainer")],cl.prototype,"eContainer",2);h([I],cl.prototype,"postConstruct",1);h([$t],cl.prototype,"preDestroy",1);var TC=class{constructor(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}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?ie.ICON_PINNED:ie.ICON_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.columnModel.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnModel.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnModel.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")}};h([f("columnModel")],TC.prototype,"columnModel",2);h([f("gridOptionsService")],TC.prototype,"gos",2);var Sr=class{static attemptMoveColumns(e){const{isFromHeader:t,hDirection:i,xPosition:s,fromEnter:n,fakeEvent:r,pinned:o,gos:l,columnModel:a}=e,u=i===0,d=i===1;let{allMovingColumns:c}=e;if(t){let T=[];c.forEach(P=>{var F;let b=null,M=P.getParent();for(;M!=null&&M.getDisplayedLeafColumns().length===1;)b=M,M=M.getParent();b!=null?(!!((F=b.getColGroupDef())!=null&&F.marryChildren)?b.getProvidedColumnGroup().getLeafColumns():b.getLeafColumns()).forEach($=>{T.includes($)||T.push($)}):T.includes(P)||T.push(P)}),c=T}const p=c.slice();a.sortColumnsLikeGridColumns(p);const C=this.calculateValidMoves({movingCols:p,draggingRight:d,xPosition:s,pinned:o,gos:l,columnModel:a}),v=this.calculateOldIndex(p,a);if(C.length===0)return;const S=C[0];let E=v!==null&&!n;if(t&&(E=v!==null),E&&!r&&(u&&S>=v||d&&S<=v))return;const w=a.getAllDisplayedColumns();let m=[],R=null;for(let T=0;T<C.length;T++){const P=C[T],F=a.getProposedColumnOrder(p,P);if(!a.doesOrderPassRules(F))continue;const b=F.filter(N=>w.includes(N));if(R===null)R=b;else if(!ys(b,R))break;const M=this.groupFragCount(F);m.push({move:P,fragCount:M})}if(m.length!==0)return m.sort((T,P)=>T.fragCount-P.fragCount),this.moveColumns(c,m[0].move,"uiColumnMoved",!1,a)}static moveColumns(e,t,i,s,n){return n.moveColumns(e,t,i,s),s?null:{columns:e,toIndex:t}}static calculateOldIndex(e,t){const i=t.getAllGridColumns(),s=VR(e.map(a=>i.indexOf(a))),n=s[0];return pe(s)-n!==s.length-1?null:n}static groupFragCount(e){function t(s){let n=[],r=s.getOriginalParent();for(;r!=null;)n.push(r),r=r.getOriginalParent();return n}let i=0;for(let s=0;s<e.length-1;s++){let n=t(e[s]),r=t(e[s+1]);[n,r]=n.length>r.length?[n,r]:[r,n],n.forEach(o=>{r.indexOf(o)===-1&&i++})}return i}static getDisplayedColumns(e,t){switch(t){case"left":return e.getDisplayedLeftColumns();case"right":return e.getDisplayedRightColumns();default:return e.getDisplayedCenterColumns()}}static calculateValidMoves(e){const{movingCols:t,draggingRight:i,xPosition:s,pinned:n,gos:r,columnModel:o}=e;if(r.get("suppressMovableColumns")||t.some(m=>m.getColDef().suppressMovable))return[];const a=this.getDisplayedColumns(o,n),u=o.getAllGridColumns(),d=a.filter(m=>Ri(t,m)),c=a.filter(m=>!Ri(t,m)),p=u.filter(m=>!Ri(t,m));let C=0,v=s;if(i){let m=0;d.forEach(R=>m+=R.getActualWidth()),v-=m}if(v>0){for(let m=0;m<c.length;m++){const R=c[m];if(v-=R.getActualWidth(),v<0)break;C++}i&&C++}let S;if(C>0){const m=c[C-1];S=p.indexOf(m)+1}else S=p.indexOf(c[0]),S===-1&&(S=0);const E=[S],w=(m,R)=>m-R;if(i){let m=S+1;const R=u.length-1;for(;m<=R;)E.push(m),m++;E.sort(w)}else{let m=S;const R=u.length-1;let T=u[m];for(;m<=R&&a.indexOf(T)<0;)m++,E.push(m),T=u[m];m=S-1;const P=0;for(;m>=P;)E.push(m),m--;E.sort(w).reverse()}return E}static normaliseX(e,t,i,s,n){const r=n.getHeaderRowContainerCtrl(t).getViewport();return i&&(e-=r.getBoundingClientRect().left),s.get("enableRtl")&&(e=r.clientWidth-e),t==null&&(e+=n.get("center").getCenterViewportScrollLeft()),e}},hl=class{constructor(e){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.isCenterContainer=!A(e)}init(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){return this.pinned?ie.ICON_PINNED:ie.ICON_MOVE}onDragEnter(e){const t=e.dragItem.columns;if(e.dragSource.type===0)this.setColumnsVisible(t,!0,"uiColumnDragged");else{const s=e.dragItem.visibleState,n=(t||[]).filter(r=>s[r.getId()]);this.setColumnsVisible(n,!0,"uiColumnDragged")}this.setColumnsPinned(t,this.pinned,"uiColumnDragged"),this.onDragging(e,!0,!0)}onDragLeave(){this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){if(e){const s=e.filter(n=>!n.getColDef().lockVisible);this.columnModel.setColumnsVisible(s,t,i)}}setColumnsPinned(e,t,i){if(e){const s=e.filter(n=>!n.getColDef().lockPinned);this.columnModel.setColumnsPinned(s,t,i)}}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}checkCenterForScrolling(e){if(this.isCenterContainer){const t=this.ctrlsService.get("center"),i=t.getCenterViewportScrollLeft(),s=i+t.getCenterWidth();this.gos.get("enableRtl")?(this.needToMoveRight=e<i+50,this.needToMoveLeft=e>s-50):(this.needToMoveLeft=e<i+50,this.needToMoveRight=e>s-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,s=!1){var n;if(s){if(this.lastMovedInfo){const{columns:d,toIndex:c}=this.lastMovedInfo;Sr.moveColumns(d,c,"uiColumnMoved",!0,this.columnModel)}return}if(this.lastDraggingEvent=e,J(e.hDirection))return;const r=Sr.normaliseX(e.x,this.pinned,!1,this.gos,this.ctrlsService);t||this.checkCenterForScrolling(r);const o=this.normaliseDirection(e.hDirection),l=e.dragSource.type,a=((n=e.dragSource.getDragItem().columns)==null?void 0:n.filter(d=>d.getColDef().lockPinned?d.getPinned()==this.pinned:!0))||[],u=Sr.attemptMoveColumns({allMovingColumns:a,isFromHeader:l===1,hDirection:o,xPosition:r,pinned:this.pinned,fromEnter:t,fakeEvent:i,gos:this.gos,columnModel:this.columnModel});u&&(this.lastMovedInfo=u)}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case 0:return 1;case 1:return 0;default:console.error(`AG Grid: Unknown direction ${e}`)}else return e}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(ie.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(ie.ICON_RIGHT,!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(ie.ICON_MOVE))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*5,e>100&&(e=100);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{this.failedMoveAttempts++;const n=this.lastDraggingEvent.dragItem.columns.filter(r=>!r.getColDef().lockPinned);if(n.length>0&&(this.dragAndDropService.setGhostIcon(ie.ICON_PINNED),this.failedMoveAttempts>7)){const r=this.needToMoveLeft?"left":"right";this.setColumnsPinned(n,r,"uiColumnDragged"),this.dragAndDropService.nudge()}}}};h([f("columnModel")],hl.prototype,"columnModel",2);h([f("dragAndDropService")],hl.prototype,"dragAndDropService",2);h([f("gridOptionsService")],hl.prototype,"gos",2);h([f("ctrlsService")],hl.prototype,"ctrlsService",2);h([I],hl.prototype,"init",1);var pl=class extends L{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){this.ctrlsService.whenReady(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}})}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}init(){this.moveColumnFeature=this.createManagedBean(new hl(this.pinned)),this.bodyDropPivotTarget=this.createManagedBean(new TC(this.pinned)),this.dragAndDropService.addDropTarget(this)}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)}};h([f("dragAndDropService")],pl.prototype,"dragAndDropService",2);h([f("columnModel")],pl.prototype,"columnModel",2);h([f("ctrlsService")],pl.prototype,"ctrlsService",2);h([I],pl.prototype,"postConstruct",1);h([I],pl.prototype,"init",1);var gl=class HD extends wC{constructor(t){super(HD.TEMPLATE,t),this.headerCompVersion=0,this.column=t.getColumnGroupChild(),this.pinned=t.getPinned()}postConstruct(){const t=this.getGui();((r,o)=>{o!=null&&o!=""?t.setAttribute(r,o):t.removeAttribute(r)})("col-id",this.column.getColId());const s={setWidth:r=>t.style.width=r,addOrRemoveCssClass:(r,o)=>this.addOrRemoveCssClass(r,o),setAriaSort:r=>r?hT(t,r):pT(t),setUserCompDetails:r=>this.setUserCompDetails(r),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(s,this.getGui(),this.eResize,this.eHeaderCompWrapper);const n=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",n)}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(t){this.headerCompVersion++;const i=this.headerCompVersion;t.newAgStackInstance().then(s=>this.afterCompCreated(i,s))}afterCompCreated(t,i){if(t!=this.headerCompVersion||!this.isAlive()){this.destroyBean(i);return}this.destroyHeaderComp(),this.headerComp=i,this.headerCompGui=i.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}};gl.TEMPLATE=`<div class="ag-header-cell" role="columnheader">
|
|
276
|
+
<div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
|
|
277
|
+
<div ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
|
|
278
|
+
</div>`;h([_("eResize")],gl.prototype,"eResize",2);h([_("eHeaderCompWrapper")],gl.prototype,"eHeaderCompWrapper",2);h([I],gl.prototype,"postConstruct",1);h([$t],gl.prototype,"destroyHeaderComp",1);var UI=gl,Ih=class BD extends wC{constructor(t){super(BD.TEMPLATE,t)}postConstruct(){const t=this.getGui(),i=(n,r)=>r!=null?t.setAttribute(n,r):t.removeAttribute(n);t.setAttribute("col-id",this.ctrl.getColId());const s={addOrRemoveCssClass:(n,r)=>this.addOrRemoveCssClass(n,r),setResizableDisplayed:n=>ue(this.eResize,n),setWidth:n=>t.style.width=n,setAriaExpanded:n=>i("aria-expanded",n),setUserCompDetails:n=>this.setUserCompDetails(n),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(s,t,this.eResize)}setUserCompDetails(t){t.newAgStackInstance().then(i=>this.afterHeaderCompCreated(i))}afterHeaderCompCreated(t){const i=()=>this.destroyBean(t);if(!this.isAlive()){i();return}const s=this.getGui(),n=t.getGui();s.appendChild(n),this.addDestroyFunc(i),this.headerGroupComp=t,this.ctrl.setDragSource(s)}};Ih.TEMPLATE=`<div class="ag-header-group-cell" role="columnheader">
|
|
279
|
+
<div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
|
|
280
|
+
</div>`;h([_("eResize")],Ih.prototype,"eResize",2);h([I],Ih.prototype,"postConstruct",1);var zI=Ih,gf=(e=>(e.COLUMN_GROUP="group",e.COLUMN="column",e.FLOATING_FILTER="filter",e))(gf||{}),DC=class extends te{constructor(t){super(),this.headerComps={},this.ctrl=t,this.setTemplate(`<div class="${this.ctrl.getHeaderRowClass()}" role="row"></div>`)}init(){Wm(this.getGui(),this.ctrl.getAriaRowIndex());const t={setHeight:i=>this.getGui().style.height=i,setTop:i=>this.getGui().style.top=i,setHeaderCtrls:(i,s)=>this.setHeaderCtrls(i,s),setWidth:i=>this.getGui().style.width=i};this.ctrl.setComp(t)}destroyHeaderCtrls(){this.setHeaderCtrls([],!1)}setHeaderCtrls(t,i){if(!this.isAlive())return;const s=this.headerComps;if(this.headerComps={},t.forEach(n=>{const r=n.getInstanceId();let o=s[r];delete s[r],o==null&&(o=this.createHeaderComp(n),this.getGui().appendChild(o.getGui())),this.headerComps[r]=o}),Lt(s,(n,r)=>{this.getGui().removeChild(r.getGui()),this.destroyBean(r)}),i){const n=Ln(this.headerComps);n.sort((o,l)=>{const a=o.getCtrl().getColumnGroupChild().getLeft(),u=l.getCtrl().getColumnGroupChild().getLeft();return a-u});const r=n.map(o=>o.getGui());sC(this.getGui(),r)}}createHeaderComp(t){let i;switch(this.ctrl.getType()){case"group":i=new zI(t);break;case"filter":i=new aI(t);break;default:i=new UI(t);break}return this.createBean(i),i.setParentComponent(this),i}};h([I],DC.prototype,"init",1);h([$t],DC.prototype,"destroyHeaderCtrls",1);var $I=0,en=class WD extends L{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()+"-"+$I++}postConstruct(){this.addManagedPropertyListeners(["suppressHeaderFocus"],()=>this.refreshTabIndex())}shouldStopEventPropagation(t){const{headerRowIndex:i,column:s}=this.focusService.getFocusedHeader();return OT(this.gos,t,i,s)}getWrapperHasFocus(){return this.gos.getActiveDomElement()===this.eGui}setGui(t){this.eGui=t,this.addDomData(),this.addManagedListener(this.beans.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}onDisplayedColumnsChanged(){!this.comp||!this.column||(this.refreshFirstAndLastStyles(),this.refreshAriaColIndex())}refreshFirstAndLastStyles(){const{comp:t,column:i,beans:s}=this;xh.refreshFirstAndLastStyles(t,i,s.columnModel)}refreshAriaColIndex(){const{beans:t,column:i}=this,s=t.columnModel.getAriaColumnIndex(i);Um(this.eGui,s)}addResizeAndMoveKeyboardListeners(){this.resizeFeature&&(this.addManagedListener(this.eGui,"keydown",this.onGuiKeyDown.bind(this)),this.addManagedListener(this.eGui,"keyup",this.onGuiKeyUp.bind(this)))}refreshTabIndex(){this.gos.get("suppressHeaderFocus")?this.eGui.removeAttribute("tabindex"):this.eGui.setAttribute("tabindex","-1")}onGuiKeyDown(t){var i;const s=this.gos.getActiveDomElement(),n=t.key===D.LEFT||t.key===D.RIGHT;if(this.isResizing&&(t.preventDefault(),t.stopImmediatePropagation()),s!==this.eGui||!t.shiftKey&&!t.altKey||((this.isResizing||n)&&(t.preventDefault(),t.stopImmediatePropagation()),!n))return;const r=t.key===D.LEFT!==this.gos.get("enableRtl"),o=pD[r?"Left":"Right"];if(t.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const l=this.getViewportAdjustedResizeDiff(t);this.resizeHeader(l,t.shiftKey),(i=this.resizeFeature)==null||i.toggleColumnResizing(!0)}else this.moveHeader(o)}getViewportAdjustedResizeDiff(t){let i=this.getResizeDiff(t);if(this.column.getPinned()){const n=this.pinnedWidthService.getPinnedLeftWidth(),r=this.pinnedWidthService.getPinnedRightWidth(),o=Br(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(n+r+i>o)if(o>n+r)i=o-n-r;else return 0}return i}getResizeDiff(t){let i=t.key===D.LEFT!==this.gos.get("enableRtl");const s=this.column.getPinned(),n=this.gos.get("enableRtl");return s&&n!==(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=setTimeout(()=>{var t;(t=this.resizeFeature)==null||t.toggleColumnResizing(!1)},150))}handleKeyDown(t){const i=this.getWrapperHasFocus();switch(t.key){case D.PAGE_DOWN:case D.PAGE_UP:case D.PAGE_HOME:case D.PAGE_END:i&&t.preventDefault()}}addDomData(){const t=WD.DOM_DATA_KEY_HEADER_CTRL;this.gos.setDomData(this.eGui,t,this),this.addDestroyFunc(()=>this.gos.setDomData(this.eGui,t,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()}getInstanceId(){return this.instanceId}getColumnGroupChild(){return this.columnGroupChild}removeDragSource(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(t,i,s){const n=t??i;this.gos.get("preventDefaultOnContextMenu")&&n.preventDefault();const r=s instanceof Pe?s:void 0;this.menuService.isHeaderContextMenuEnabled(r)&&this.menuService.showHeaderContextMenu(r,t,i),this.dispatchColumnMouseEvent(g.EVENT_COLUMN_HEADER_CONTEXT_MENU,s)}dispatchColumnMouseEvent(t,i){const s={type:t,column:i};this.eventService.dispatchEvent(s)}destroy(){super.destroy(),this.removeDragSource(),this.comp=null,this.column=null,this.resizeFeature=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null,this.eGui=null}};en.DOM_DATA_KEY_HEADER_CTRL="headerCtrl";h([f("pinnedWidthService")],en.prototype,"pinnedWidthService",2);h([f("focusService")],en.prototype,"focusService",2);h([f("userComponentFactory")],en.prototype,"userComponentFactory",2);h([f("ctrlsService")],en.prototype,"ctrlsService",2);h([f("dragAndDropService")],en.prototype,"dragAndDropService",2);h([f("menuService")],en.prototype,"menuService",2);h([I],en.prototype,"postConstruct",1);var Nh=en,_h=class extends L{constructor(e,t,i,s){super(),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?pe(this.colsSpanning):this.columnOrGroup}postConstruct(){this.addManagedListener(this.columnOrGroup,Pe.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this))}setLeftFirstTime(){const e=this.beans.gos.get("suppressColumnMoveAnimation"),t=A(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),n=this.modifyLeftForPrintLayout(e,t);this.setLeft(s),this.actualLeft=n,this.beans.columnAnimationService.executeNextVMTurn(()=>{this.actualLeft===n&&this.setLeft(n)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){if(!this.beans.gos.isDomLayout("print")||e.getPinned()==="left")return t;const s=this.beans.columnModel.getDisplayedColumnsLeftWidth();if(e.getPinned()==="right"){const n=this.beans.columnModel.getBodyContainerWidth();return s+n+t}return s+t}setLeft(e){if(A(e)&&(this.eCell.style.left=`${e}px`),this.columnOrGroup instanceof Pe)this.columnOrGroup;else{const i=this.columnOrGroup.getLeafColumns();if(!i.length)return;i.length>1&&cT(this.ariaEl,i.length),i[0]}}};h([I],_h.prototype,"postConstruct",1);var Pu=class extends L{constructor(e,t){super(),this.columns=e,this.element=t}postConstruct(){this.gos.get("columnHoverHighlight")&&this.addMouseHoverListeners()}addMouseHoverListeners(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))}onMouseOut(){this.columnHoverService.clearMouseOver()}onMouseOver(){this.columnHoverService.setMouseOver(this.columns)}};h([f("columnHoverService")],Pu.prototype,"columnHoverService",2);h([I],Pu.prototype,"postConstruct",1);var jI=class extends Nh{constructor(e,t,i){super(e,t,i),this.iconCreated=!1,this.column=e}setComp(e,t,i,s){this.comp=e,this.eButtonShowMainFilter=i,this.eFloatingFilterBody=s,this.setGui(t),this.setupActive(),this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this)),this.setupFilterChangedListener(),this.addManagedListener(this.column,Pe.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))}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=Ve("filter",this.gos,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(){this.createManagedBean(new Un(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();Di(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){if(this.gos.getActiveDomElement()===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 n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.columnModel;let i=this.column;do if(i=e?t.getDisplayedColBefore(i):t.getDisplayedColAfter(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 D.UP:case D.DOWN:t||e.preventDefault();case D.LEFT:case D.RIGHT:if(t)return;e.stopPropagation();case D.ENTER:t&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case D.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&&Cr(e.relatedTarget,"ag-floating-filter");if(i&&s&&e.target===this.eGui){const r=this.lastFocusEvent,o=!!(r&&r.key===D.TAB);if(r&&o){const l=r.shiftKey;this.focusService.focusInto(this.eGui,l)}}const n=this.getRowIndex();this.beans.focusService.setFocusedHeader(n,this.column)}setupHover(){this.createManagedBean(new Pu([this.column],this.eGui));const e=()=>{if(!this.gos.get("columnHoverHighlight"))return;const t=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",t)};this.addManagedListener(this.eventService,g.EVENT_COLUMN_HOVER_CHANGED,e),e()}setupLeft(){const e=new _h(this.column,this.eGui,this.beans);this.createManagedBean(e)}setupFilterButton(){this.suppressFilterButton=!this.menuService.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!this.menuService.isLegacyMenuEnabled()}setupUserComp(){if(!this.active)return;const e=this.beans.filterManager.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(){if(!this.active)return;const{filterManager:e}=this.beans,t=i=>{if((i==null?void 0:i.source)==="filterDestroyed"&&this.context.isDestroyed())return;const s=this.comp.getFloatingFilterComp();s&&s.then(n=>{var r;if(n){const o=e.getCurrentFloatingFilterParentModel(this.column);n.onParentModelChanged(o,i?this.gos.addGridCommonParams({columns:(r=i.columns)!=null?r:[],type:g.EVENT_FILTER_CHANGED,source:i.source==="api"?"api":"columnFilter"}):null)}})};this.destroySyncListener=this.addManagedListener(this.column,Pe.EVENT_FILTER_CHANGED,t),e.isFilterActive(this.column)&&t(null)}setupWidth(){const e=()=>{const t=`${this.column.getActualWidth()}px`;this.comp.setWidth(t)};this.addManagedListener(this.column,Pe.EVENT_WIDTH_CHANGED,e),e()}setupFilterChangedListener(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,Pe.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this)),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=this.beans.filterManager.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(){var e,t;const i=this.active;this.setupActive();const s=!i&&this.active;i&&!this.active&&((e=this.destroySyncListener)==null||e.call(this),(t=this.destroyFilterChangedListener)==null||t.call(this));const n=this.active?this.beans.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();!r||!n?this.updateCompDetails(n,s):r.then(o=>{var l;!o||this.beans.filterManager.areFilterCompsDifferent((l=this.userCompDetails)!=null?l:null,n)?this.updateCompDetails(n,s):this.updateFloatingFilterParams(n)})}updateCompDetails(e,t){this.isAlive()&&(this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),t&&(this.setupSyncWithFilter(),this.setupFilterChangedListener()))}updateFloatingFilterParams(e){var t;if(!e)return;const i=e.params;(t=this.comp.getFloatingFilterComp())==null||t.then(s=>{let n=!1;s!=null&&s.refresh&&typeof s.refresh=="function"&&s.refresh(i)!==null&&(n=!0),!n&&(s!=null&&s.onParamsUpdated)&&typeof s.onParamsUpdated=="function"&&s.onParamsUpdated(i)!==null&&Y("Custom floating filter method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")})}destroy(){super.destroy(),this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.destroySyncListener=null,this.destroyFilterChangedListener=null}},fl=class extends L{constructor(e,t,i,s,n){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=s,this.ctrl=n}postConstruct(){const e=[];let t,i;const s=()=>{if(ue(this.eResize,t),!t)return;const o=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(o),i){const l=this.gos.get("skipHeaderOnAutoSize"),a=()=>{this.columnModel.autoSizeColumn(this.column,"uiColumnResized",l)};this.eResize.addEventListener("dblclick",a);const u=new Ct(this.eResize);u.addEventListener(Ct.EVENT_DOUBLE_TAP,a),e.push(()=>{this.eResize.removeEventListener("dblclick",a),u.removeEventListener(Ct.EVENT_DOUBLE_TAP,a),u.destroy()})}},n=()=>{e.forEach(o=>o()),e.length=0},r=()=>{const o=this.column.isResizable(),l=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(o!==t||l!==i)&&(t=o,i=l,n(),s())};r(),this.addDestroyFunc(n),this.ctrl.addRefreshFunction(r)}onResizing(e,t){const{column:i,lastResizeAmount:s,resizeStartWidth:n}=this,r=this.normaliseResizeAmount(t),o=n+r,l=[{key:i,newWidth:o}];if(this.column.getPinned()){const a=this.pinnedWidthService.getPinnedLeftWidth(),u=this.pinnedWidthService.getPinnedRightWidth(),d=Br(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(a+u+(r-s)>d)return}this.lastResizeAmount=r,this.columnModel.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}};h([f("horizontalResizeService")],fl.prototype,"horizontalResizeService",2);h([f("pinnedWidthService")],fl.prototype,"pinnedWidthService",2);h([f("ctrlsService")],fl.prototype,"ctrlsService",2);h([f("columnModel")],fl.prototype,"columnModel",2);h([I],fl.prototype,"postConstruct",1);var PC=class extends L{constructor(e){super(),this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1,this.column=e}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(this.gos.getActiveDomElement())&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new Rh),this.cbSelectAll.addCssClass("ag-header-select-all"),Ue(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,g.EVENT_FIELD_VALUE_CHANGED,this.onCbSelectAll.bind(this)),mu(this.cbSelectAll.getGui(),!0),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,{skipAriaHidden:!0}),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(`${s} (${i})`),this.headerCellCtrl.announceAriaDescription()}checkSelectionType(e){return this.gos.get("rowSelection")==="multiple"?!0:(console.warn(`AG Grid: ${e} is only available if using 'multiple' rowSelection.`),!1)}checkRightRowModelType(e){const t=this.rowModel.getType();return t==="clientSide"||t==="serverSide"?!0:(console.warn(`AG Grid: ${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`),!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 n={source:s,justFiltered:t,justCurrentPage:i};e?this.selectionService.selectAllRowNodes(n):this.selectionService.deselectAllRowNodes(n)}isCheckboxSelection(){let e=this.column.getColDef().headerCheckboxSelection;if(typeof e=="function"){const t=e,i=this.gos.addGridCommonParams({column:this.column,colDef:this.column.getColDef()});e=t(i)}return e?this.checkRightRowModelType("headerCheckboxSelection")&&this.checkSelectionType("headerCheckboxSelection"):!1}isFilteredOnly(){return!!this.column.getColDef().headerCheckboxSelectionFilteredOnly}isCurrentPageOnly(){return!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly}};h([f("rowModel")],PC.prototype,"rowModel",2);h([f("selectionService")],PC.prototype,"selectionService",2);var KI=class extends Nh{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){this.comp=e,this.setGui(t),this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(s),this.addColumnHoverListener(),this.setupFilterClass(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.resizeFeature=this.createManagedBean(new fl(this.getPinned(),this.column,i,e,this)),this.createManagedBean(new Pu([this.column],t)),this.createManagedBean(new _h(this.column,t,this.beans)),this.createManagedBean(new Un(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(),this.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],this.refresh.bind(this)),this.addManagedListener(this.column,Pe.EVENT_COL_DEF_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}resizeHeader(e,t){var i,s;if(!this.column.isResizable())return;const n=this.column.getActualWidth(),r=(i=this.column.getMinWidth())!=null?i:0,o=(s=this.column.getMaxWidth())!=null?s:Number.MAX_SAFE_INTEGER,l=Math.min(Math.max(n+e,r),o);this.beans.columnModel.setColumnWidths([{key:this.column,newWidth:l}],t,!0,"uiColumnResized")}moveHeader(e){const{eGui:t,column:i,gos:s,ctrlsService:n}=this,r=this.getPinned(),o=t.getBoundingClientRect().left,l=i.getActualWidth(),a=s.get("enableRtl"),u=e===0!==a,d=Sr.normaliseX(u?o-20:o+l+20,r,!0,s,n);Sr.attemptMoveColumns({allMovingColumns:[i],isFromHeader:!0,hDirection:e,xPosition:d,pinned:r,fromEnter:!1,fakeEvent:!1,gos:s,columnModel:this.beans.columnModel}),n.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(i,"auto")}setupUserComp(){const e=this.lookupUserCompDetails();this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(t,e)}createParams(){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:t=>{this.menuService.showColumnMenu({column:this.column,buttonElement:t,positionBy:"button"})},showColumnMenuAfterMouseClick:t=>{this.menuService.showColumnMenu({column:this.column,mouseEvent:t,positionBy:"mouse"})},showFilter:t=>{this.menuService.showFilterMenu({column:this.column,buttonElement:t,containerType:"columnFilter",positionBy:"button"})},progressSort:t=>{this.beans.sortController.progressSort(this.column,!!t,"uiColumnSorted")},setSort:(t,i)=>{this.beans.sortController.setSortForColumn(this.column,t,!!i,"uiColumnSorted")},eGridHeader:this.getGui(),setTooltip:(t,i)=>{this.setupTooltip(t,i)}})}setupSelectAll(){this.selectAllFeature=this.createManagedBean(new PC(this.column)),this.selectAllFeature.setComp(this)}getSelectAllGui(){return this.selectAllFeature.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===D.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===D.ENTER&&this.onEnterKeyDown(e),e.key===D.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 df)||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){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const i=this.gos.get("tooltipShowMode")==="whenTruncated",s=this.eGui,n=this.column.getColDef();!t&&i&&!n.headerComponent&&(t=()=>{const l=s.querySelector(".ag-header-cell-text");return l?l.scrollWidth>l.clientWidth:!0});const r={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getGui:()=>s,getLocation:()=>"header",getTooltipValue:()=>e??this.column.getColDef().headerTooltip,shouldDisplayTooltip:t},o=this.createManagedBean(new Xs(r));this.refreshFunctions.push(()=>o.refreshToolTip())}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),i=xh.getHeaderClassesFromColDef(t,this.gos,this.column,null),s=this.userHeaderClasses;this.userHeaderClasses=new Set(i),i.forEach(n=>{s.has(n)?s.delete(n):this.comp.addOrRemoveCssClass(n,!0)}),s.forEach(n=>this.comp.addOrRemoveCssClass(n,!1))};this.refreshFunctions.push(e),e()}setDragSource(e){if(this.dragSourceElement=e,this.removeDragSource(),!e||!this.draggable)return;const{column:t,beans:i,displayName:s,dragAndDropService:n,gos:r}=this,{columnModel:o}=i;let l=!this.gos.get("suppressDragLeaveHidesColumns");const a=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>l?ie.ICON_HIDE:ie.ICON_NOT_ALLOWED,getDragItem:()=>this.createDragItem(t),dragItemName:s,onDragStarted:()=>{l=!r.get("suppressDragLeaveHidesColumns"),t.setMoving(!0,"uiColumnMoved")},onDragStopped:()=>t.setMoving(!1,"uiColumnMoved"),onGridEnter:u=>{var d;if(l){const c=((d=u==null?void 0:u.columns)==null?void 0:d.filter(p=>!p.getColDef().lockVisible))||[];o.setColumnsVisible(c,!0,"uiColumnMoved")}},onGridExit:u=>{var d;if(l){const c=((d=u==null?void 0:u.columns)==null?void 0:d.filter(p=>!p.getColDef().lockVisible))||[];o.setColumnsVisible(c,!1,"uiColumnMoved")}}};n.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()}addRefreshFunction(e){this.refreshFunctions.push(e)}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.columnModel.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}onColumnRowGroupChanged(){this.checkDisplayName()}onColumnPivotChanged(){this.checkDisplayName()}onColumnValueChanged(){this.checkDisplayName()}setupWidth(){const e=()=>{const t=this.column.getActualWidth();this.comp.setWidth(`${t}px`)};this.addManagedListener(this.column,Pe.EVENT_WIDTH_CHANGED,e),e()}setupMovingCss(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};this.addManagedListener(this.column,Pe.EVENT_MOVING_CHANGED,e),e()}setupMenuClass(){const e=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};this.addManagedListener(this.column,Pe.EVENT_MENU_VISIBLE_CHANGED,e),e()}setupSortableClass(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};e(),this.addRefreshFunction(e),this.addManagedListener(this.eventService,Pe.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))}setupFilterClass(){const e=()=>{const t=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",t),this.refreshAria()};this.addManagedListener(this.column,Pe.EVENT_FILTER_ACTIVE_CHANGED,e),e()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};e(),this.addRefreshFunction(e)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:i,beans:s}=this;if(!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:r}=this.column.getColumnGroupPaddingInfo();i.addOrRemoveCssClass("ag-header-span-height",n>0);const{columnModel:o}=s,l=o.getColumnHeaderRowHeight();if(n===0){i.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}i.addOrRemoveCssClass("ag-header-span-total",r);const u=o.isPivotMode()?o.getPivotGroupHeaderHeight():o.getGroupHeaderHeight(),d=n*u;e.style.setProperty("top",`${-d}px`),e.style.setProperty("height",`${l+d}px`)}setupAutoHeight(e){const{columnModel:t,resizeObserverService:i}=this.beans,s=u=>{if(!this.isAlive())return;const{paddingTop:d,paddingBottom:c,borderBottomWidth:p,borderTopWidth:C}=Wn(this.getGui()),v=d+c+p+C,E=e.offsetHeight+v;if(u<5){const w=this.beans.gos.getDocument(),m=!w||!w.contains(e),R=E==0;if(m||R){window.setTimeout(()=>s(u+1),0);return}}t.setColumnHeaderHeight(this.column,E)};let n=!1,r;const o=()=>{const u=this.column.isAutoHeaderHeight();u&&!n&&l(),!u&&n&&a()},l=()=>{n=!0,s(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),r=i.observeResize(e,()=>s(0))},a=()=>{n=!1,r&&r(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),r=void 0};o(),this.addDestroyFunc(()=>a()),this.addManagedListener(this.column,Pe.EVENT_WIDTH_CHANGED,()=>n&&s(0)),this.addManagedListener(this.eventService,Pe.EVENT_SORT_CHANGED,()=>{n&&window.setTimeout(()=>s(0))}),this.addRefreshFunction(o)}refreshAriaSort(){if(this.sortable){const e=this.localeService.getLocaleTextFunc(),t=this.beans.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(tT(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(this.beans.gos.getActiveDomElement()))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)}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(){const e=()=>{if(!this.gos.get("columnHoverHighlight"))return;const t=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",t)};this.addManagedListener(this.eventService,g.EVENT_COLUMN_HOVER_CHANGED,e),e()}getColId(){return this.column.getColId()}addActiveHeaderMouseListeners(){const e=s=>this.handleMouseOverChange(s.type==="mouseenter"),t=()=>this.dispatchColumnMouseEvent(g.EVENT_COLUMN_HEADER_CLICKED,this.column),i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column);this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e),this.addManagedListener(this.getGui(),"click",t),this.addManagedListener(this.getGui(),"contextmenu",i)}handleMouseOverChange(e){this.setActiveHeader(e);const i={type:e?g.EVENT_COLUMN_HEADER_MOUSE_OVER:g.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column};this.eventService.dispatchEvent(i)}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return t instanceof df?t.getAnchorElementForMenu(e):this.getGui()}destroy(){super.destroy(),this.refreshFunctions=null,this.selectAllFeature=null,this.dragSourceElement=null,this.userCompDetails=null,this.userHeaderClasses=null,this.ariaDescriptionProperties=null}},bu=class extends L{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(n=>{n.getColDef().suppressAutoSize||i.push(n.getColId())}),i.length>0&&this.columnModel.autoSizeColumns({columns: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),n=this.resizeStartWidth+s;this.resizeColumnsFromLocalValues(n,i,e)}getInitialValues(e){const t=this.getColumnsToResize(),i=this.getInitialSizeOfColumns(t),s=this.getSizeRatiosOfColumns(t,i),n={columnsToResize:t,resizeStartWidth:i,resizeRatios:s};let r=null;if(e&&(r=this.columnModel.getDisplayedGroupAtDirection(this.columnGroup,"After")),r){const o=r.getDisplayedLeafColumns(),l=n.groupAfterColumns=o.filter(u=>u.isResizable()),a=n.groupAfterStartWidth=this.getInitialSizeOfColumns(l);n.groupAfterRatios=this.getSizeRatiosOfColumns(l,a)}else n.groupAfterColumns=void 0,n.groupAfterStartWidth=void 0,n.groupAfterRatios=void 0;return n}storeLocalValues(e){const{columnsToResize:t,resizeStartWidth:i,resizeRatios:s,groupAfterColumns:n,groupAfterStartWidth:r,groupAfterRatios:o}=e;this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=s,this.resizeTakeFromCols=n,this.resizeTakeFromStartWidth=r,this.resizeTakeFromRatios=o}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){var s,n,r;if(!this.resizeCols||!this.resizeRatios)return;const o={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:(s=this.resizeTakeFromCols)!=null?s:void 0,groupAfterStartWidth:(n=this.resizeTakeFromStartWidth)!=null?n:void 0,groupAfterRatios:(r=this.resizeTakeFromRatios)!=null?r:void 0};this.resizeColumns(o,e,t,i)}resizeColumns(e,t,i,s=!0){const{columnsToResize:n,resizeStartWidth:r,resizeRatios:o,groupAfterColumns:l,groupAfterStartWidth:a,groupAfterRatios:u}=e,d=[];if(d.push({columns:n,ratios:o,width:t}),l){const c=t-r;d.push({columns:l,ratios:u,width:a-c})}this.columnModel.resizeColumnSets({resizeSets:d,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()}};h([f("horizontalResizeService")],bu.prototype,"horizontalResizeService",2);h([f("autoWidthCalculator")],bu.prototype,"autoWidthCalculator",2);h([f("columnModel")],bu.prototype,"columnModel",2);h([I],bu.prototype,"postConstruct",1);var UD=class extends L{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,ht.EVENT_DISPLAYED_CHILDREN_CHANGED,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)}};h([I],UD.prototype,"postConstruct",1);var YI=class extends Nh{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){this.comp=e,this.setGui(t),this.displayName=this.beans.columnModel.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.addDestroyFunc(()=>{this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature))}),this.setupUserComp(),this.addHeaderMouseListeners();const s=this.getParentRowCtrl().getPinned(),n=this.column.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new Pu(n,t)),this.createManagedBean(new _h(this.column,t,this.beans)),this.createManagedBean(new UD(e,this.column)),this.resizeFeature=this.createManagedBean(new bu(e,i,s,this.column)),this.createManagedBean(new Un(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addManagedPropertyListener(g.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners()}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,gos:n,ctrlsService:r}=this,o=n.get("enableRtl"),l=e===0,a=this.getPinned(),u=i.getBoundingClientRect(),d=u.left,c=u.width,p=Sr.normaliseX(l!==o?d-20:d+c+20,a,!0,n,r),C=s.getGroupId(),v=this.focusService.getFocusedHeader();Sr.attemptMoveColumns({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,hDirection:e,xPosition:p,pinned:a,fromEnter:!1,fakeEvent:!1,gos:n,columnModel:t.columnModel});const S=s.getDisplayedLeafColumns(),E=l?S[0]:pe(S);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(E,"auto"),!this.isAlive()&&v&&this.restoreFocus(C,s,v)}restoreFocus(e,t,i){const s=t.getLeafColumns();if(!s.length)return;const n=s[0].getParent();if(!n)return;const r=this.findGroupWidthId(n,e);r&&this.focusService.focusHeaderPosition({headerPosition:Ie(K({},i),{column:r})})}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(){const e=this.gos.addGridCommonParams({displayName:this.displayName,columnGroup:this.column,setExpanded:i=>{this.beans.columnModel.setColumnGroupOpened(this.column.getProvidedColumnGroup(),i,"gridInitializing")},setTooltip:(i,s)=>{this.setupTooltip(i,s)}}),t=this.userComponentFactory.getHeaderGroupCompDetails(e);this.comp.setUserCompDetails(t)}addHeaderMouseListeners(){const e=s=>this.handleMouseOverChange(s.type==="mouseenter"),t=()=>this.dispatchColumnMouseEvent(g.EVENT_COLUMN_HEADER_CLICKED,this.column.getProvidedColumnGroup()),i=s=>this.handleContextMenuMouseEvent(s,void 0,this.column.getProvidedColumnGroup());this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e),this.addManagedListener(this.getGui(),"click",t),this.addManagedListener(this.getGui(),"contextmenu",i)}handleMouseOverChange(e){const i={type:e?g.EVENT_COLUMN_HEADER_MOUSE_OVER:g.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column.getProvidedColumnGroup()};this.eventService.dispatchEvent(i)}setupTooltip(e,t){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const i=this.column.getColGroupDef(),s=this.gos.get("tooltipShowMode")==="whenTruncated",n=this.eGui;!t&&s&&!(i!=null&&i.headerGroupComponent)&&(t=()=>{const o=n.querySelector(".ag-header-group-text");return o?o.scrollWidth>o.clientWidth:!0});const r={getColumn:()=>this.column,getGui:()=>n,getLocation:()=>"headerGroup",getTooltipValue:()=>e??(i&&i.headerTooltip),shouldDisplayTooltip:t};i&&(r.getColDef=()=>i),this.createBean(new Xs(r))}setupExpandable(){const e=this.column.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,Je.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,Je.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))}refreshExpanded(){const e=this.column;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=xh.getHeaderClassesFromColDef(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"),t.forEach(i=>this.comp.addOrRemoveCssClass(i,!0))}setupMovingCss(){const t=this.column.getProvidedColumnGroup().getLeafColumns(),i=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving());t.forEach(s=>{this.addManagedListener(s,Pe.EVENT_MOVING_CHANGED,i)}),i()}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===D.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:n,dragAndDropService:r}=this,{columnModel:o}=t,l=i.getProvidedColumnGroup().getLeafColumns();let a=!n.get("suppressDragLeaveHidesColumns");const u=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>a?ie.ICON_HIDE:ie.ICON_NOT_ALLOWED,dragItemName:s,getDragItem:()=>this.getDragItemForGroup(i),onDragStarted:()=>{a=!n.get("suppressDragLeaveHidesColumns"),l.forEach(d=>d.setMoving(!0,"uiColumnDragged"))},onDragStopped:()=>l.forEach(d=>d.setMoving(!1,"uiColumnDragged")),onGridEnter:d=>{var c;if(a){const p=((c=d==null?void 0:d.columns)==null?void 0:c.filter(C=>!C.getColDef().lockVisible))||[];o.setColumnsVisible(p,!0,"uiColumnMoved")}},onGridExit:d=>{var c;if(a){const p=((c=d==null?void 0:d.columns)==null?void 0:c.filter(C=>!C.getColDef().lockVisible))||[];o.setColumnsVisible(p,!1,"uiColumnMoved")}}};r.addDragSource(u,!0)}getDragItemForGroup(e){const t=e.getProvidedColumnGroup().getLeafColumns(),i={};t.forEach(n=>i[n.getId()]=n.isVisible());const s=[];return this.beans.columnModel.getAllDisplayedColumns().forEach(n=>{t.indexOf(n)>=0&&(s.push(n),Jt(t,n))}),t.forEach(n=>s.push(n)),{columns:s,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")}},QI=0,la=class extends L{constructor(e,t,i){super(),this.instanceId=QI++,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}`}postConstruct(){this.isPrintLayout=this.gos.isDomLayout("print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}getInstanceId(){return this.instanceId}setComp(e,t=!0){this.comp=e,t&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners()}getHeaderRowClass(){return this.headerRowClass}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(){this.addManagedListener(this.eventService,g.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_VIRTUAL_COLUMNS_CHANGED,e=>this.onVirtualColumnsChanged(e.afterScroll)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("ensureDomOrder",e=>this.isEnsureDomOrder=e.currentValue),this.addManagedPropertyListener("headerHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("groupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotGroupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("floatingFiltersHeight",this.onRowHeightChanged.bind(this))}getHeaderCellCtrl(e){if(this.headerCellCtrls)return mr(this.headerCellCtrls).find(t=>t.getColumnGroupChild()===e)}onDisplayedColumnsChanged(){this.isPrintLayout=this.gos.isDomLayout("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{columnModel:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){var{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{columnModel:e,filterManager:t}=this.beans;let i=e.getHeaderRowCount();const s=[];let n=0;t.hasFloatingFilters()&&(i++,n=1);const r=e.getColumnGroupHeaderRowHeight(),o=e.getColumnHeaderRowHeight(),l=1+n,a=i-l;for(let c=0;c<a;c++)s.push(r);s.push(o);for(let c=0;c<n;c++)s.push(e.getFloatingFiltersHeight());let u=0;for(let c=0;c<this.rowIndex;c++)u+=s[c];const d=s[this.rowIndex];return{topOffset:u,rowHeight:d}}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 n of t)this.recycleAndCreateHeaderCtrls(n,e);const i=n=>{const{focusService:r,columnModel:o}=this.beans;return r.isHeaderWrapperFocused(n)?o.isDisplayed(n.getColumnGroupChild()):!1};if(e)for(const[n,r]of e)i(r)?this.headerCellCtrls.set(n,r):this.destroyBean(r);return Array.from(this.headerCellCtrls.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(new jI(e,this.beans,this));break;case"group":s=this.createBean(new YI(e,this.beans,this));break;default:s=this.createBean(new KI(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(),{columnModel:i}=this.beans;return["left",null,"right"].forEach(s=>{const n=i.getVirtualHeaderGroupRow(s,t);e=e.concat(n)}),e}getActualDepth(){return this.type=="filter"?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.columnModel.getVirtualHeaderGroupRow(this.pinned,this.getActualDepth())}focusHeader(e,t){if(!this.headerCellCtrls)return!1;const s=Array.from(this.headerCellCtrls.values()).find(n=>n.getColumnGroupChild()==e);return s?s.focus(t):!1}destroy(){this.headerCellCtrls&&this.headerCellCtrls.forEach(e=>{this.destroyBean(e)}),this.headerCellCtrls=void 0,super.destroy()}};h([f("beans")],la.prototype,"beans",2);h([I],la.prototype,"postConstruct",1);var zn=class extends L{constructor(e){super(),this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[],this.pinned=e}setComp(e,t){this.comp=e,this.eViewport=t,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport),this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.ctrlsService.registerHeaderContainer(this,this.pinned),this.columnModel.isReady()&&this.refresh()}setupDragAndDrop(e){const t=new pl(this.pinned,e);this.createManagedBean(t)}refresh(e=!1){const t=new jo,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 u=this.createBean(new la(t.next(),this.pinned,"group"));this.groupsRowCtrls.push(u)}},n=()=>{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 la(l,this.pinned,"column")))},r=()=>{this.includeFloatingFilter=this.filterManager.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 la(a,this.pinned,"filter")))};s(),n(),r();const o=this.getAllCtrls();this.comp.setCtrls(o),this.restoreFocusOnHeader(i)}restoreFocusOnHeader(e){e==null||e.column.getPinned()!=this.pinned||this.focusService.focusHeaderPosition({headerPosition:e})}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(){const e=this.filterManager.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==e&&this.refresh(!0)}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new dl(e=>this.comp.setCenterWidth(`${e}px`),!0))}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}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 n=s==0,r=this.hidden!==n,o=this.gos.get("enableRtl"),l=this.gos.getScrollbarWidth(),u=this.scrollVisibleService.isVerticalScrollShowing()&&(o&&e||!o&&t)?s+l:s;this.comp.setPinnedContainerWidth(`${u}px`),this.comp.setDisplayed(!n),r&&(this.hidden=n,this.refresh())};this.addManagedListener(this.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,i),this.addManagedListener(this.eventService,g.EVENT_SCROLLBAR_WIDTH_CHANGED,i)}getHeaderCtrlForColumn(e){if(e instanceof Pe)return this.columnsRowCtrl?this.columnsRowCtrl.getHeaderCellCtrl(e):void 0;if(this.groupsRowCtrls.length!==0)for(let t=0;t<this.groupsRowCtrls.length;t++){const i=this.groupsRowCtrls[t].getHeaderCellCtrl(e);if(i)return i}}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 n=this.getAllCtrls()[e];return n?n.focusHeader(t,i):!1}getViewport(){return this.eViewport}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}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()}};h([f("ctrlsService")],zn.prototype,"ctrlsService",2);h([f("scrollVisibleService")],zn.prototype,"scrollVisibleService",2);h([f("pinnedWidthService")],zn.prototype,"pinnedWidthService",2);h([f("columnModel")],zn.prototype,"columnModel",2);h([f("focusService")],zn.prototype,"focusService",2);h([f("filterManager")],zn.prototype,"filterManager",2);var Qr=class Rd extends te{constructor(t){super(),this.headerRowComps={},this.rowCompsList=[],this.pinned=t}init(){this.selectAndSetTemplate();const t={setDisplayed:s=>this.setDisplayed(s),setCtrls:s=>this.setCtrls(s),setCenterWidth:s=>this.eCenterContainer.style.width=s,setViewportScrollLeft:s=>this.getGui().scrollLeft=s,setPinnedContainerWidth:s=>{const n=this.getGui();n.style.width=s,n.style.maxWidth=s,n.style.minWidth=s}};this.createManagedBean(new zn(this.pinned)).setComp(t,this.getGui())}selectAndSetTemplate(){const t=this.pinned=="left",i=this.pinned=="right",s=t?Rd.PINNED_LEFT_TEMPLATE:i?Rd.PINNED_RIGHT_TEMPLATE:Rd.CENTER_TEMPLATE;this.setTemplate(s),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()}destroyRowComps(){this.setCtrls([])}destroyRowComp(t){this.destroyBean(t),this.eRowContainer.removeChild(t.getGui())}setCtrls(t){const i=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let s;const n=r=>{const o=r.getGui();o.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(o),s&&iC(this.eRowContainer,o,s),s=o};t.forEach(r=>{const o=r.getInstanceId(),l=i[o];delete i[o];const a=l||this.createBean(new DC(r));this.headerRowComps[o]=a,this.rowCompsList.push(a),n(a)}),Ln(i).forEach(r=>this.destroyRowComp(r))}};Qr.PINNED_LEFT_TEMPLATE='<div class="ag-pinned-left-header" role="rowgroup"></div>';Qr.PINNED_RIGHT_TEMPLATE='<div class="ag-pinned-right-header" role="rowgroup"></div>';Qr.CENTER_TEMPLATE=`<div class="ag-header-viewport" role="presentation">
|
|
281
|
+
<div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>
|
|
282
|
+
</div>`;h([_("eCenterContainer")],Qr.prototype,"eCenterContainer",2);h([I],Qr.prototype,"init",1);h([$t],Qr.prototype,"destroyRowComps",1);var Np=Qr,xr=class extends L{constructor(){super(...arguments),this.currentHeaderRowWithoutSpan=-1}postConstruct(){this.ctrlsService.whenReady(t=>{this.gridBodyCon=t.gridBodyCtrl});const e=this.gos.getDocument();this.addManagedListener(e,"mousedown",()=>this.setCurrentHeaderRowWithoutSpan(-1))}getHeaderRowCount(){const e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0}navigateVertically(e,t,i){if(t||(t=this.focusService.getFocusedHeader()),!t)return!1;const{headerRowIndex:s,column:n}=t,r=this.getHeaderRowCount(),o=e===0;let{headerRowIndex:l,column:a,headerRowIndexWithoutSpan:u}=o?this.headerPositionUtils.getColumnVisibleParent(n,s):this.headerPositionUtils.getColumnVisibleChild(n,s),d=!1;return l<0&&(l=0,a=n,d=!0),l>=r?(l=-1,this.setCurrentHeaderRowWithoutSpan(-1)):u!==void 0&&(this.currentHeaderRowWithoutSpan=u),!d&&!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(),n=e===2,r=this.gos.get("enableRtl");let o,l;if(this.currentHeaderRowWithoutSpan!==-1?s.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=s.headerRowIndex,n!==r?(l="Before",o=this.headerPositionUtils.findHeader(s,l)):(l="After",o=this.headerPositionUtils.findHeader(s,l)),o||!t)return this.focusService.focusHeaderPosition({headerPosition:o,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:o,direction:l})}return this.focusNextHeaderRow(s,l,i)}focusNextHeaderRow(e,t,i){const s=e.headerRowIndex;let n=null,r;if(t==="Before"?s>0&&(r=s-1,this.currentHeaderRowWithoutSpan-=1,n=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"end")):(r=s+1,this.currentHeaderRowWithoutSpan<this.getHeaderRowCount()?this.currentHeaderRowWithoutSpan+=1:this.setCurrentHeaderRowWithoutSpan(-1),n=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"start")),!n)return!1;const{column:o,headerRowIndex:l}=this.headerPositionUtils.getHeaderIndexToFocus(n.column,n==null?void 0:n.headerRowIndex);return this.focusService.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){if(e.getPinned())return;let i;if(e instanceof ht){const s=e.getDisplayedLeafColumns();i=t==="Before"?pe(s):s[0]}else i=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(i)}};h([f("focusService")],xr.prototype,"focusService",2);h([f("headerPositionUtils")],xr.prototype,"headerPositionUtils",2);h([f("ctrlsService")],xr.prototype,"ctrlsService",2);h([I],xr.prototype,"postConstruct",1);xr=h([B("headerNavigationService")],xr);var $n=class extends L{setComp(e,t,i){this.comp=e,this.eGui=t,this.createManagedBean(new Un(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight();const s=this.onHeaderContextMenu.bind(this);this.addManagedListener(this.eGui,"contextmenu",s),this.mockContextMenuForIPad(s),this.ctrlsService.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("pivotHeaderHeight",e),this.addManagedPropertyListener("groupHeaderHeight",e),this.addManagedPropertyListener("pivotGroupHeaderHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,e)}getHeaderHeight(){return this.headerHeight}setHeaderHeight(){const{columnModel:e}=this;let t=0,i=e.getHeaderRowCount(),s;this.filterManager.hasFloatingFilters()&&(i++,t=1);const r=this.columnModel.getColumnGroupHeaderRowHeight(),o=this.columnModel.getColumnHeaderRowHeight(),l=1+t,a=i-l;if(s=t*e.getFloatingFiltersHeight(),s+=a*r,s+=o,this.headerHeight===s)return;this.headerHeight=s;const u=`${s+1}px`;this.comp.setHeightAndMinHeight(u),this.eventService.dispatchEvent({type:g.EVENT_HEADER_HEIGHT_CHANGED})}onPivotModeChanged(){const e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)}onDisplayedColumnsChanged(){const t=this.columnModel.getAllDisplayedColumns().some(i=>i.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",t)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),i=e.shiftKey!==t?2:3;(this.headerNavigationService.navigateHorizontally(i,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()}handleKeyDown(e){let t=null;switch(e.key){case D.LEFT:t=2;case D.RIGHT:A(t)||(t=3),this.headerNavigationService.navigateHorizontally(t,!1,e);break;case D.UP:t=0;case D.DOWN:A(t)||(t=1),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break;default:return}}onFocusOut(e){const{relatedTarget:t}=e;!t&&this.eGui.contains(this.gos.getActiveDomElement())||this.eGui.contains(t)||this.focusService.clearFocusedHeader()}onHeaderContextMenu(e,t,i){if(!e&&!i||!this.menuService.isHeaderContextMenuEnabled())return;const{target:s}=e??t;(s===this.eGui||s===this.ctrlsService.getHeaderRowContainerCtrl().getViewport())&&this.menuService.showHeaderContextMenu(void 0,e,i)}mockContextMenuForIPad(e){if(!qs())return;const t=new Ct(this.eGui),i=s=>{e(void 0,s.touchStart,s.touchEvent)};this.addManagedListener(t,Ct.EVENT_LONG_TAP,i),this.addDestroyFunc(()=>t.destroy())}};h([f("headerNavigationService")],$n.prototype,"headerNavigationService",2);h([f("focusService")],$n.prototype,"focusService",2);h([f("columnModel")],$n.prototype,"columnModel",2);h([f("ctrlsService")],$n.prototype,"ctrlsService",2);h([f("filterManager")],$n.prototype,"filterManager",2);h([f("menuService")],$n.prototype,"menuService",2);var bC=class zD extends te{constructor(){super(zD.TEMPLATE)}postConstruct(){const t={addOrRemoveCssClass:(n,r)=>this.addOrRemoveCssClass(n,r),setHeightAndMinHeight:n=>{this.getGui().style.height=n,this.getGui().style.minHeight=n}};this.createManagedBean(new $n).setComp(t,this.getGui(),this.getFocusableElement());const s=n=>{this.createManagedBean(n),this.appendChild(n)};s(new Np("left")),s(new Np(null)),s(new Np("right"))}};bC.TEMPLATE='<div class="ag-header" role="presentation"/>';h([I],bC.prototype,"postConstruct",1);var qI=bC,Ua=class extends L{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),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,t){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)}};h([f("dragService")],Ua.prototype,"dragService",2);h([f("ctrlsService")],Ua.prototype,"ctrlsService",2);Ua=h([B("horizontalResizeService")],Ua);var In=class extends L{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,n="left";const r=this.menuService.isLegacyMenuEnabled();!r&&this.gos.get("enableRtl")&&(s=1,n="right");let o=r?void 0:4*s,l=r?void 0:4;this.showPopup(e,a=>{this.popupService.positionPopupByComponent({type:i,eventSource:t,ePopup:a,nudgeX:o,nudgeY:l,alignSide:n,keepWithinBounds:!0,position:"under",column:e})},i,t,r)}showPopup(e,t,i,s,n){const r=e?this.createBean(new Fh(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!(r!=null&&r.hasFilter())||!e)throw new Error("AG Grid - unable to show popup filter, filter instantiation failed");const o=document.createElement("div");Ue(o,"presentation"),o.classList.add("ag-menu"),n||o.classList.add("ag-filter-menu"),this.tabListener=this.addManagedListener(o,"keydown",v=>this.trapFocusWithin(v,o)),o.appendChild(r==null?void 0:r.getGui());let l;const a=()=>r==null?void 0:r.afterGuiDetached(),u=this.menuService.isColumnMenuAnchoringEnabled()?s??this.ctrlsService.getGridBodyCtrl().getGui():void 0,d=v=>{e.setMenuVisible(!1,"contextMenu");const S=v instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),S&&s&&di(s)){const E=this.focusService.findTabbableParent(s);E&&E.focus()}a(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e)},c=this.localeService.getLocaleTextFunc(),p=n&&i!=="columnFilter"?c("ariaLabelColumnMenu","Column Menu"):c("ariaLabelColumnFilter","Column Filter"),C=this.popupService.addPopup({modal:!0,eChild:o,closeOnEsc:!0,closedCallback:d,positionCallback:()=>t(o),anchorToElement:u,ariaLabel:p});C&&(this.hidePopup=l=C.hideFunc),r.afterInit().then(()=>{t(o),r.afterGuiAttached({container:i,hidePopup:l})}),e.setMenuVisible(!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e)}trapFocusWithin(e,t){e.key!==D.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,i){const s={type:g.EVENT_COLUMN_MENU_VISIBLE_CHANGED,visible:e,switchingTab:!1,key:t,column:i??null};this.eventService.dispatchEvent(s)}isMenuEnabled(e){var t;return e.isFilterAllowed()&&((t=e.getColDef().menuTabs)!=null?t:["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}};h([f("filterManager")],In.prototype,"filterManager",2);h([f("popupService")],In.prototype,"popupService",2);h([f("focusService")],In.prototype,"focusService",2);h([f("ctrlsService")],In.prototype,"ctrlsService",2);h([f("menuService")],In.prototype,"menuService",2);In=h([B("filterMenuFactory")],In);var Td=(e=>(e.TAB_GUARD="ag-tab-guard",e.TAB_GUARD_TOP="ag-tab-guard-top",e.TAB_GUARD_BOTTOM="ag-tab-guard-bottom",e))(Td||{}),Oh=class extends L{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1;const{comp:t,eTopGuard:i,eBottomGuard:s,focusTrapActive:n,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:o,onFocusIn:l,onFocusOut:a,shouldStopEventPropagation:u,onTabKeyDown:d,handleKeyDown:c,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=i,this.eBottomGuard=s,this.providedFocusInnerElement=o,this.eFocusableElement=p,this.focusTrapActive=!!n,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.providedFocusIn=l,this.providedFocusOut=a,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=d,this.providedHandleKeyDown=c}postConstruct(){this.createManagedBean(new Un(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.addManagedListener(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.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}const t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}findNextElementOutsideAndFocus(e){const t=this.gos.getDocument(),i=this.focusService.findFocusableElements(t.body,null,!0),s=i.indexOf(e?this.eTopGuard:this.eBottomGuard);if(s===-1)return;let n,r;e?(n=0,r=s):(n=s+1,r=i.length);const o=i.slice(n,r),l=this.gos.get("tabIndex");o.sort((a,u)=>{const d=parseInt(a.getAttribute("tabindex")||"0"),c=parseInt(u.getAttribute("tabindex")||"0");return c===l?1:d===l?-1:d===0?1:c===0?-1:d-c}),o[e?o.length-1:0].focus()}onFocusIn(e){this.focusTrapActive||(this.providedFocusIn&&this.providedFocusIn(e),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){return e===this.eTopGuard||e===this.eBottomGuard}};h([f("focusService")],Oh.prototype,"focusService",2);h([I],Oh.prototype,"postConstruct",1);var Fu=class extends te{initialiseTabGuard(t){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.getFocusableElement();const i=[this.eTopGuard,this.eBottomGuard],s={setTabIndex:n=>{i.forEach(r=>n!=null?r.setAttribute("tabindex",n):r.removeAttribute("tabindex"))}};this.addTabGuards(this.eTopGuard,this.eBottomGuard),this.tabGuardCtrl=this.createManagedBean(new Oh({comp:s,focusTrapActive:!!t.focusTrapActive,eTopGuard:this.eTopGuard,eBottomGuard:this.eBottomGuard,eFocusableElement:this.eFocusableElement,onFocusIn:t.onFocusIn,onFocusOut:t.onFocusOut,focusInnerElement:t.focusInnerElement,handleKeyDown:t.handleKeyDown,onTabKeyDown:t.onTabKeyDown,shouldStopEventPropagation:t.shouldStopEventPropagation,forceFocusOutWhenTabGuardsAreEmpty:t.forceFocusOutWhenTabGuardsAreEmpty}))}createTabGuard(t){const i=document.createElement("div"),s=t==="top"?"ag-tab-guard-top":"ag-tab-guard-bottom";return i.classList.add("ag-tab-guard",s),Ue(i,"presentation"),i}addTabGuards(t,i){this.eFocusableElement.insertAdjacentElement("afterbegin",t),this.eFocusableElement.insertAdjacentElement("beforeend",i)}removeAllChildrenExceptTabGuards(){const t=[this.eTopGuard,this.eBottomGuard];Xe(this.getFocusableElement()),this.addTabGuards(...t)}forceFocusOutOfContainer(t=!1){this.tabGuardCtrl.forceFocusOutOfContainer(t)}appendChild(t,i){vu(t)||(t=t.getGui());const{eBottomGuard:s}=this;s?s.insertAdjacentElement("beforebegin",t):super.appendChild(t,i)}},Gh=class $D extends Fu{constructor(t){super($D.getTemplate(t.cssClass)),this.items=[],this.tabbedItemScrollMap=new Map,this.params=t}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEach(t=>this.addItem(t)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>{var t,i,s;return(s=(i=(t=this.activeItem)==null?void 0:t.tabbedItem)==null?void 0:i.afterDetachedCallback)==null?void 0:s.call(i)})}static getTemplate(t){return`<div class="ag-tabs ${t}">
|
|
283
|
+
<div ref="eHeader"></div>
|
|
284
|
+
<div ref="eBody" role="presentation" class="ag-tabs-body ${t?`${t}-body`:""}"></div>
|
|
285
|
+
</div>`}setupHeader(){const{enableCloseButton:t,cssClass:i}=this.params,s=(n,r)=>{n.classList.add(`ag-tabs-${r}`),i&&n.classList.add(`${i}-${r}`)};t?(this.setupCloseButton(s),this.eTabHeader=this.gos.getDocument().createElement("div"),s(this.eHeader,"header-wrapper"),Ue(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,Ue(this.eTabHeader,"tablist"),s(this.eTabHeader,"header")}setupCloseButton(t){const i=this.gos.getDocument(),s=i.createElement("button");t(s,"close-button");const n=Ve("close",this.gos,void 0,!0);Di(s,this.params.closeButtonAriaLabel),s.appendChild(n),this.addManagedListener(s,"click",()=>{var o,l;return(l=(o=this.params).onCloseClicked)==null?void 0:l.call(o)});const r=i.createElement("div");t(r,"close-button-wrapper"),Ue(r,"presentation"),r.appendChild(s),this.eHeader.appendChild(r),this.eCloseButton=s}handleKeyDown(t){switch(t.key){case D.RIGHT:case D.LEFT:if(!this.eTabHeader.contains(this.gos.getActiveDomElement()))return;const i=t.key===D.RIGHT,s=this.gos.get("enableRtl"),n=this.items.indexOf(this.activeItem),r=i!==s?Math.min(n+1,this.items.length-1):Math.max(n-1,0);if(n===r)return;t.preventDefault();const o=this.items[r];this.showItemWrapper(o),o.eHeaderButton.focus();break;case D.UP:case D.DOWN:t.stopPropagation();break}}onTabKeyDown(t){var i,s,n,r;if(t.defaultPrevented)return;const{focusService:o,eHeader:l,eBody:a,activeItem:u,params:d}=this,{suppressTrapFocus:c,enableCloseButton:p}=d,C=this.gos.getActiveDomElement(),v=t.target,S=t.shiftKey;if(l.contains(C)){t.preventDefault(),p&&S&&!((i=this.eCloseButton)!=null&&i.contains(C))?(s=this.eCloseButton)==null||s.focus():c&&S?(n=this.focusService.findFocusableElementBeforeTabGuard(this.gos.getDocument().body,v))==null||n.focus():this.focusBody(t.shiftKey);return}let E=null;if(o.isTargetUnderManagedComponent(a,v)&&(S&&(E=this.focusService.findFocusableElementBeforeTabGuard(a,v)),!E&&!c&&(E=u.eHeaderButton)),!E&&a.contains(C)&&(E=o.findNextFocusableElement(a,!1,S),!E)){t.preventDefault(),c&&!S?this.forceFocusOutOfContainer(S):p&&!S?(r=this.eCloseButton)==null||r.focus():this.focusHeader();return}E&&(t.preventDefault(),E.focus())}focusInnerElement(t){t?this.focusHeader():this.focusBody(!0)}focusHeader(t){this.activeItem.eHeaderButton.focus({preventScroll:t})}focusBody(t){this.focusService.focusInto(this.eBody,t)}setAfterAttachedParams(t){this.afterAttachedParams=t}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0])}addItem(t){const i=document.createElement("span");Ue(i,"tab"),i.setAttribute("tabindex","-1"),i.appendChild(t.title),i.classList.add("ag-tab"),this.eTabHeader.appendChild(i),Di(i,t.titleLabel);const s={tabbedItem:t,eHeaderButton:i};this.items.push(s),i.addEventListener("click",this.showItemWrapper.bind(this,s))}showItem(t){const i=this.items.find(s=>s.tabbedItem===t);i&&this.showItemWrapper(i)}showItemWrapper(t){var i,s,n,r,o,l;const{tabbedItem:a,eHeaderButton:u}=t;if((s=(i=this.params).onItemClicked)==null||s.call(i,{item:a}),this.activeItem===t){(r=(n=this.params).onActiveItemClicked)==null||r.call(n);return}this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),Xe(this.eBody),a.bodyPromise.then(d=>{this.eBody.appendChild(d);const c=!this.focusService.isKeyboardMode();if(this.params.suppressFocusBodyOnOpen||this.focusService.focusInto(this.eBody,!1,c),a.afterAttachedCallback&&a.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){const p=a.getScrollableContainer&&a.getScrollableContainer()||d;this.lastScrollListener=this.addManagedListener(p,"scroll",()=>{this.tabbedItemScrollMap.set(a.name,p.scrollTop)});const C=this.tabbedItemScrollMap.get(a.name);C!==void 0&&setTimeout(()=>{p.scrollTop=C},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),(l=(o=this.activeItem.tabbedItem).afterDetachedCallback)==null||l.call(o)),u.classList.add("ag-tab-selected"),this.activeItem=t}};h([f("focusService")],Gh.prototype,"focusService",2);h([_("eHeader")],Gh.prototype,"eHeader",2);h([_("eBody")],Gh.prototype,"eBody",2);h([I],Gh.prototype,"postConstruct",1);var XI=50,ff=class extends L{constructor(){super(...arguments),this.polyfillFunctions=[]}observeResize(e,t){const i=this.gos.getWindow(),s=()=>{const l=new i.ResizeObserver(t);return l.observe(e),()=>l.disconnect()},n=()=>{var l,a;let u=(l=e==null?void 0:e.clientWidth)!=null?l:0,d=(a=e==null?void 0:e.clientHeight)!=null?a:0,c=!0;const p=()=>{var C,v;if(c){const S=(C=e==null?void 0:e.clientWidth)!=null?C:0,E=(v=e==null?void 0:e.clientHeight)!=null?v:0;(S!==u||E!==d)&&(u=S,d=E,t()),this.doNextPolyfillTurn(p)}};return p(),()=>c=!1},r=this.gos.get("suppressBrowserResizeObserver");return!!i.ResizeObserver&&!r?s():this.getFrameworkOverrides().wrapIncoming(()=>n(),"resize-observer")}doNextPolyfillTurn(e){this.polyfillFunctions.push(e),this.schedulePolyfill()}schedulePolyfill(){if(this.polyfillScheduled)return;const e=()=>{const t=this.polyfillFunctions;this.polyfillScheduled=!1,this.polyfillFunctions=[],t.forEach(i=>i())};this.polyfillScheduled=!0,window.setTimeout(e,XI)}};ff=h([B("resizeObserverService")],ff);var Yo=class extends L{constructor(){super(...arguments),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}setScrollTop(e){const t=this.gos.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,t&&e===0){const i=this.paginationProxy.getCurrentPage();i!==this.lastPage&&(this.lastPage=i,this.scrollGoingDown=!0)}this.lastScrollTop=e}init(){this.useAnimationFrame=!this.gos.get("suppressAnimationFrame")}isOn(){return this.useAnimationFrame}verifyAnimationFrameOn(e){this.useAnimationFrame===!1&&console.warn(`AG Grid: 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,n=s.list,r=this.destroyTasks,o=new Date().getTime();let l=new Date().getTime()-o;const a=e<=0,u=this.ctrlsService.getGridBodyCtrl();for(;a||l<e;){if(!u.getScrollFeature().scrollGridIfNeeded()){let c;if(i.length)this.sortTaskList(t),c=i.pop().task;else if(n.length)this.sortTaskList(s),c=n.pop().task;else if(r.length)c=r.pop();else{this.cancelledTasks.clear();break}this.cancelledTasks.has(c)||c()}l=new Date().getTime()-o}i.length||n.length||r.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=this.gos.getWindow();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()}))}}};h([f("ctrlsService")],Yo.prototype,"ctrlsService",2);h([f("paginationProxy")],Yo.prototype,"paginationProxy",2);h([I],Yo.prototype,"init",1);Yo=h([B("animationFrameService")],Yo);var za=class extends L{postConstruct(){this.isClientSideRowModel=this.rowModel.getType()==="clientSide"}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"})}};h([f("rowModel")],za.prototype,"rowModel",2);h([I],za.prototype,"postConstruct",1);za=h([B("expansionService")],za);var Ui=class extends L{postConstruct(){var e;this.activeMenuFactory=(e=this.enterpriseMenuFactory)!=null?e: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 n=s.getBoundingClientRect();return{x:n.x+n.width/2,y:n.y+n.height/2}}showContextMenu(e){var t,i,s;const{column:n,rowNode:r}=e;let{anchorToElement:o,value:l}=e;r&&n&&l==null&&(l=r.getValueFromValueService(n)),o==null&&(o=this.getContextMenuAnchorElement(r,n)),(s=this.contextMenuFactory)==null||s.onContextMenu((t=e.mouseEvent)!=null?t:null,(i=e.touchEvent)!=null?i:null,r??null,n??null,l,o)}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){return!e.getColDef().suppressHeaderFilterButton&&this.filterManager.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e!=null&&e.getColDef().suppressHeaderContextMenu)&&this.getColumnMenuType()==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(qs()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!this.isLegacyMenuEnabled()&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return this.filterManager.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 t;const i=e.getColDef(),s=(t=i.floatingFilterComponentParams)==null?void 0:t.suppressFilterButton;return s!=null&&Y("As of v31.1, 'colDef.floatingFilterComponentParams.suppressFilterButton' is deprecated. Use 'colDef.suppressFloatingFilterButton' instead."),i.suppressFloatingFilterButton==null?!s:!i.suppressFloatingFilterButton}getColumnMenuType(){var e;return(e=this.gos.get("columnMenu"))!=null?e:"legacy"}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos.get("suppressMenuHide");return this.isLegacyMenuEnabled()||this.gos.exists("suppressMenuHide")?e:!0}showColumnMenuCommon(e,t,i,s){const{column:n,positionBy:r}=t;if(r==="button"){const{buttonElement:o}=t;e.showMenuAfterButtonClick(n,o,i,s)}else if(r==="mouse"){const{mouseEvent:o}=t;e.showMenuAfterMouseEvent(n,o,i,s)}else n&&(this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(n,"auto"),this.animationFrameService.requestAnimationFrame(()=>{const o=this.ctrlsService.getHeaderRowContainerCtrl(n.getPinned()).getHeaderCtrlForColumn(n);e.showMenuAfterButtonClick(n,o.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 n=this.getCellGui(s,t);return n||(s.isFullWidth()?s.getFullWidthElement():i)}};h([f("filterMenuFactory")],Ui.prototype,"filterMenuFactory",2);h([f("ctrlsService")],Ui.prototype,"ctrlsService",2);h([f("animationFrameService")],Ui.prototype,"animationFrameService",2);h([f("filterManager")],Ui.prototype,"filterManager",2);h([f("rowRenderer")],Ui.prototype,"rowRenderer",2);h([Se("columnChooserFactory")],Ui.prototype,"columnChooserFactory",2);h([Se("contextMenuFactory")],Ui.prototype,"contextMenuFactory",2);h([Se("enterpriseMenuFactory")],Ui.prototype,"enterpriseMenuFactory",2);h([I],Ui.prototype,"postConstruct",1);Ui=h([B("menuService")],Ui);var Lr=class extends L{postConstruct(){this.ctrlsService.whenReady(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(r=>this.cloneItemIntoDummy(r,t)),i.appendChild(t);const s=t.offsetWidth;i.removeChild(t);const n=this.getAutoSizePadding();return s+n}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"),n=s.classList;["ag-header-cell","ag-header-group-cell"].some(l=>i.classList.contains(l))?(n.add("ag-header","ag-header-row"),s.style.position="static"):n.add("ag-row");let o=e.parentElement;for(;o;){if(["ag-header-row","ag-row"].some(a=>o.classList.contains(a))){for(let a=0;a<o.classList.length;a++){const u=o.classList[a];u!="ag-row-position-absolute"&&n.add(u)}break}o=o.parentElement}s.appendChild(i),t.appendChild(s)}};h([f("rowRenderer")],Lr.prototype,"rowRenderer",2);h([f("ctrlsService")],Lr.prototype,"ctrlsService",2);h([f("rowCssClassCalculator")],Lr.prototype,"rowCssClassCalculator",2);h([I],Lr.prototype,"postConstruct",1);Lr=h([B("autoWidthCalculator")],Lr);var Au=class extends L{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.topContainerHeight=0,this.bottomContainerHeight=0}postConstruct(){this.isClientSide=this.rowModel.getType()==="clientSide",this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl})}getStickyTopRowCtrls(){return this.stickyTopRowCtrls}getStickyBottomRowCtrls(){return this.stickyBottomRowCtrls}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,s,n;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 o=(t=e.childStore)==null?void 0:t.getStoreBounds();return e.footer&&(o=(i=e.sibling.childStore)==null?void 0:i.getStoreBounds()),((s=o==null?void 0:o.heightPx)!=null?s:0)+((n=o==null?void 0:o.topPx)!=null?n: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){const t=e.footer&&e.rowIndex===0,i=!e.sibling||Math.abs(e.sibling.rowIndex-e.rowIndex)===1;if(t||i){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=pe(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.rowRenderer.getLastVisibleVerticalPixel(),n=new Set,r=u=>{if(n.add(u),t){const d=this.getLastPixelOfGroup(u),c=s+i+u.rowHeight;d<c?u.stickyRowTop=i+(d-c):u.stickyRowTop=i}else{const d=this.getFirstPixelOfGroup(u),c=s-(i+u.rowHeight);d>c?u.stickyRowTop=i-(d-c):u.stickyRowTop=i}i=0,n.forEach(d=>{const c=d.stickyRowTop+d.rowHeight;i<c&&(i=c)})},o=this.areFooterRowsStickySuppressed(),l=this.gos.get("suppressGroupRowsSticky"),a=u=>u.displayed?u.footer?o===!0||o==="grand"&&u.level===-1||o==="group"&&u.level>-1?!1:!n.has(u):u.isExpandable()?l===!0?!1:!n.has(u)&&u.expanded:!1:!1;for(let u=0;u<100;u++){let d=s+i;t||(d=s-i);const c=this.rowModel.getRowIndexAtPixel(d),p=this.rowModel.getRow(c);if(p==null)break;const v=this.getStickyAncestors(p).find(E=>(t?E.rowIndex<c:E.rowIndex>c)&&a(E));if(v){r(v);continue}if((t?p.rowTop<d:p.rowTop+p.rowHeight>d)&&a(p)){r(p);continue}break}return t||n.forEach(u=>{u.stickyRowTop=i-(u.stickyRowTop+u.rowHeight)}),this.refreshNodesAndContainerHeight(e,n,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=this.gos.isGroupRowsSticky(),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.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",n=s?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,r={},o=[];for(let c=0;c<n.length;c++){const p=n[c].getRowNode();if(!t.has(p)){r[p.id]=n[c],p.sticky=!1;continue}o.push(n[c])}const l=new Set;for(let c=0;c<o.length;c++)l.add(o[c].getRowNode());const a=[];t.forEach(c=>{l.has(c)||(c.sticky=!0,a.push(this.createRowCon(c,!1,!1)))});let u=!!a.length||o.length!==n.length;s?this.topContainerHeight!==i&&(this.topContainerHeight=i,this.gridBodyCtrl.setStickyTopHeight(i),u=!0):this.bottomContainerHeight!==i&&(this.bottomContainerHeight=i,this.gridBodyCtrl.setStickyBottomHeight(i),u=!0),this.destroyRowCtrls(r,!1);const d=[...o,...a];return d.sort((c,p)=>p.getRowNode().rowIndex-c.getRowNode().rowIndex),s||d.reverse(),d.forEach(c=>c.setRowTop(c.getRowNode().stickyRowTop)),u?(s?this.stickyTopRowCtrls=d:this.stickyBottomRowCtrls=d,!0):!1}};h([f("rowModel")],Au.prototype,"rowModel",2);h([f("rowRenderer")],Au.prototype,"rowRenderer",2);h([f("ctrlsService")],Au.prototype,"ctrlsService",2);h([I],Au.prototype,"postConstruct",1);var Pi=class extends L{constructor(){super(...arguments),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(r=>r.onRangeSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(r=>r.updateRangeBordersIfRangeCount())},i=()=>{this.eventService.addEventListener(g.EVENT_RANGE_SELECTION_CHANGED,e),this.eventService.addEventListener(g.EVENT_COLUMN_MOVED,t),this.eventService.addEventListener(g.EVENT_COLUMN_PINNED,t),this.eventService.addEventListener(g.EVENT_COLUMN_VISIBLE,t)},s=()=>{this.eventService.removeEventListener(g.EVENT_RANGE_SELECTION_CHANGED,e),this.eventService.removeEventListener(g.EVENT_COLUMN_MOVED,t),this.eventService.removeEventListener(g.EVENT_COLUMN_PINNED,t),this.eventService.removeEventListener(g.EVENT_COLUMN_VISIBLE,t)};this.addDestroyFunc(()=>s()),this.addManagedPropertyListener("enableRangeSelection",r=>{r.currentValue?i():s()}),this.gos.get("enableRangeSelection")&&i()}}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){if(this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addManagedListener(this.eventService,g.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,this.onBodyScroll.bind(this)),this.addManagedListener(this.eventService,g.EVENT_BODY_HEIGHT_CHANGED,this.redraw.bind(this)),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListeners(["suppressCellFocus","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.gos.isGroupRowsSticky()){const e=this.rowModel.getType();(e==="clientSide"||e==="serverSide")&&(this.stickyRowFeature=this.createManagedBean(new Au(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this))))}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=this.gos.isDomLayout("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 ZI(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyTopRowCtrls():[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyBottomRowCtrls():[]}updateAllRowCtrls(){const e=Ln(this.rowCtrlsByRowIndex),t=Ln(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))}registerCellEventListeners(){this.addManagedListener(this.eventService,g.EVENT_CELL_FOCUSED,e=>{this.onCellFocusChanged(e)}),this.addManagedListener(this.eventService,g.EVENT_CELL_FOCUS_CLEARED,()=>{this.onCellFocusChanged()}),this.addManagedListener(this.eventService,g.EVENT_FLASH_CELLS,e=>{this.getAllCellCtrls().forEach(t=>t.onFlashCells(e))}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_HOVER_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())}),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())}),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,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.getAllGridColumns().forEach(t=>{const i=a=>{this.getAllCellCtrls().forEach(u=>{u.getColumn()===t&&a(u)})},s=()=>{i(a=>a.onLeftChanged())},n=()=>{i(a=>a.onWidthChanged())},r=()=>{i(a=>a.onFirstRightPinnedChanged())},o=()=>{i(a=>a.onLastLeftPinnedChanged())},l=()=>{i(a=>a.onColDefChanged())};t.addEventListener("leftChanged",s),t.addEventListener("widthChanged",n),t.addEventListener("firstRightPinnedChanged",r),t.addEventListener("lastLeftPinnedChanged",o),t.addEventListener("colDefChanged",l),this.destroyFuncsForColumnListeners.push(()=>{t.removeEventListener("leftChanged",s),t.removeEventListener("widthChanged",n),t.removeEventListener("firstRightPinnedChanged",r),t.removeEventListener("lastLeftPinnedChanged",o),t.removeEventListener("colDefChanged",l)})})}onDomLayoutChanged(){const e=this.gos.isDomLayout("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,this.pinnedRowModel.getPinnedTopRowData()),this.refreshFloatingRows(this.bottomRowCtrls,this.pinnedRowModel.getPinnedBottomRowData())}getTopRowCtrls(){return this.topRowCtrls}getCentreRowCtrls(){return this.allRowCtrls}getBottomRowCtrls(){return this.bottomRowCtrls}refreshFloatingRows(e,t){e.forEach(i=>{i.destroyFirstPass(),i.destroySecondPass()}),e.length=0,t&&t.forEach(i=>{const s=new wr(i,this.beans,!1,!1,this.printLayout);e.push(s)})}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=n=>{const r=n[e.rowIndex];r&&r.getRowNode()===e&&(r.destroyFirstPass(),r.destroySecondPass(),n[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=this.gos.getActiveDomElement(),s=this.gos.getDomData(i,yr.DOM_DATA_KEY_CELL_CTRL),n=this.gos.getDomData(i,wr.DOM_DATA_KEY_ROW_CTRL);return s||n?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&&this.gos.isAnimateRows(),n=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature&&this.stickyRowFeature.checkStickyRows(),this.recycleRows(n,s),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&this.gridBodyCtrl.getScrollFeature().scrollToTop()}updateContainerHeights(){if(this.printLayout){this.rowContainerHeightService.setModelHeight(null);return}let e=this.paginationProxy.getCurrentPageHeight();e===0&&(e=1),this.rowContainerHeightService.setModelHeight(e)}getLockOnRefresh(){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}releaseLockOnRefresh(){this.refreshInProgress=!1}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){e&&(this.focusService.setRestoreFocusedCell(e),this.onCellFocusChanged(this.beans.gos.addGridCommonParams({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"mock"})))}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 n=t[s].getAllCellCtrls(),r=n.length;for(let o=0;o<r;o++)e.push(n[o])}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};this.getCellCtrls(e.rowNodes,e.columns).forEach(i=>i.refreshOrDestroyCell(t)),e.rowNodes&&(this.getRowCtrls(e.rowNodes).forEach(i=>{if(!i.isFullWidth())return;i.refreshFullWidth()||this.redrawRow(i.getRowNode(),!0)}),this.dispatchDisplayedRowsChanged(!1))}getCellRendererInstances(e){var t;const i=this.getCellCtrls(e.rowNodes,e.columns).map(r=>r.getCellRenderer()).filter(r=>r!=null);if((t=e.columns)!=null&&t.length)return i;const s=[],n=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach(r=>{if(n&&!this.isRowInMap(r.getRowNode(),n)||!r.isFullWidth())return;const o=r.getFullWidthCellRenderers();for(let l=0;l<o.length;l++){const a=o[l];a!=null&&s.push(a)}}),[...s,...i]}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 n=s.getRowNode();return this.isRowInMap(n,t)})}getCellCtrls(e,t){let i;A(t)&&(i={},t.forEach(n=>{const r=this.columnModel.getGridColumn(n);A(r)&&(i[r.getId()]=!0)}));const s=[];return this.getRowCtrls(e).forEach(n=>{n.getAllCellCtrls().forEach(r=>{const o=r.getColumn().getId();i&&!i[o]||s.push(r)})}),s}destroy(){this.removeAllRowComps(),super.destroy()}removeAllRowComps(){const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e),this.stickyRowFeature&&this.stickyRowFeature.destroyStickyCtrls()}getRowsToRecycle(){const e=[];Lt(this.rowCtrlsByRowIndex,(i,s)=>{s.getRowNode().id==null&&e.push(i)}),this.removeRowCtrls(e);const t={};return Lt(this.rowCtrlsByRowIndex,(i,s)=>{const n=s.getRowNode();t[n.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&&Ym()&&(i=this.getCellToRestoreFocusToAfterRefresh()||void 0);const s=this.firstRenderedRow,n=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let r=!1;this.stickyRowFeature&&(r=this.stickyRowFeature.checkStickyRows());const o=this.firstRenderedRow!==s||this.lastRenderedRow!==n;if(!(t&&!r&&!o)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,t),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(t&&!r),i!=null)){const l=this.getCellToRestoreFocusToAfterRefresh();i!=null&&l==null&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(i))}}removeRowCompsNotToDraw(e,t){const i={};e.forEach(r=>i[r]=!0);const n=Object.keys(this.rowCtrlsByRowIndex).filter(r=>!i[r]);this.removeRowCtrls(n,t)}calculateIndexesToDraw(e){let t=ET(this.firstRenderedRow,this.lastRenderedRow);const i=(n,r)=>{const o=r.getRowNode().rowIndex;o!=null&&(o<this.firstRenderedRow||o>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(o)};Lt(this.rowCtrlsByRowIndex,i),Lt(e,i),t.sort((n,r)=>n-r);const s=[];for(let n=0;n<t.length;n++){const r=t[n],o=this.paginationProxy.getRow(r);o&&!o.sticky&&s.push(r)}return s}recycleRows(e,t=!1,i=!1){const s=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(s,!t),s.forEach(n=>{this.createOrUpdateRowCtrl(n,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){const t={type:g.EVENT_DISPLAYED_ROWS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(t)}onDisplayedColumnsChanged(){const e=this.columnModel.isPinningLeft(),t=this.columnModel.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 n,r=this.rowCtrlsByRowIndex[e];if(r||(n=this.paginationProxy.getRow(e),A(n)&&A(t)&&t[n.id]&&n.alreadyRendered&&(r=t[n.id],t[n.id]=null)),!r)if(n||(n=this.paginationProxy.getRow(e)),A(n))r=this.createRowCon(n,i,s);else return;return n&&(n.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=r,r}destroyRowCtrls(e,t){const i=[];Lt(e,(s,n)=>{if(n){if(this.cachedRowCtrls&&n.isCacheable()){this.cachedRowCtrls.addRow(n);return}n.destroyFirstPass(!t),t?(this.zombieRowCtrls[n.getInstanceId()]=n,i.push(()=>{n.destroySecondPass(),delete this.zombieRowCtrls[n.getInstanceId()]})):n.destroySecondPass()}}),t&&(i.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),AR(i))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=this.gos.getRowHeightAsNumber();return e*t}workOutFirstAndLastRowsToRender(){this.rowContainerHeightService.updateOffset();let e,t;if(!this.paginationProxy.isRowsToRender())e=0,t=-1;else if(this.printLayout)this.environment.refreshRowHeightVariable(),e=this.paginationProxy.getPageFirstRow(),t=this.paginationProxy.getPageLastRow();else{const l=this.getRowBufferInPixels(),a=this.ctrlsService.getGridBodyCtrl(),u=this.gos.get("suppressRowVirtualisation");let d=!1,c,p;do{const w=this.paginationProxy.getPixelOffset(),{pageFirstPixel:m,pageLastPixel:R}=this.paginationProxy.getCurrentPagePixelRange(),T=this.rowContainerHeightService.getDivStretchOffset(),P=a.getScrollFeature().getVScrollPosition(),F=P.top,b=P.bottom;u?(c=m+T,p=R+T):(c=Math.max(F+w-l,m)+T,p=Math.min(b+w+l,R)+T),this.firstVisibleVPixel=Math.max(F+w,m)+T,this.lastVisibleVPixel=Math.min(b+w,R)+T,d=this.ensureAllRowsInRangeHaveHeightsCalculated(c,p)}while(d);let C=this.paginationProxy.getRowIndexAtPixel(c),v=this.paginationProxy.getRowIndexAtPixel(p);const S=this.paginationProxy.getPageFirstRow(),E=this.paginationProxy.getPageLastRow();C<S&&(C=S),v>E&&(v=E),e=C,t=v}const i=this.gos.isDomLayout("normal"),s=this.gos.get("suppressMaxRenderedRowRestriction"),n=Math.max(this.getRowBuffer(),500);i&&!s&&t-e>n&&(t=e+n);const r=e!==this.firstRenderedRow,o=t!==this.lastRenderedRow;if(r||o){this.firstRenderedRow=e,this.lastRenderedRow=t;const l={type:g.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:t};this.eventService.dispatchEvent(l)}}dispatchFirstDataRenderedEvent(){if(this.dataFirstRenderedFired)return;this.dataFirstRenderedFired=!0;const e={type:g.EVENT_FIRST_DATA_RENDERED,firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow};window.requestAnimationFrame(()=>{this.beans.eventService.dispatchEvent(e)})}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const i=this.paginationProxy.ensureRowHeightsValid(e,t,-1,-1);return i&&this.updateContainerHeights(),i}getFirstVisibleVerticalPixel(){return this.firstVisibleVPixel}getLastVisibleVerticalPixel(){return this.lastVisibleVPixel}getFirstVirtualRenderedRow(){return this.firstRenderedRow}getLastVirtualRenderedRow(){return this.lastRenderedRow}doNotUnVirtualiseRow(e){const s=e.getRowNode(),n=this.focusService.isRowNodeFocused(s),r=e.isEditing(),o=s.detail;return n||r||o?!!this.paginationProxy.isRowPresent(s):!1}createRowCon(e,t,i){const s=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(s)return s;const n=this.gos.get("suppressAnimationFrame"),r=i&&!n&&!this.printLayout;return new wr(e,this.beans,t,r,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}};h([f("animationFrameService")],Pi.prototype,"animationFrameService",2);h([f("paginationProxy")],Pi.prototype,"paginationProxy",2);h([f("columnModel")],Pi.prototype,"columnModel",2);h([f("pinnedRowModel")],Pi.prototype,"pinnedRowModel",2);h([f("rowModel")],Pi.prototype,"rowModel",2);h([f("focusService")],Pi.prototype,"focusService",2);h([f("beans")],Pi.prototype,"beans",2);h([f("rowContainerHeightService")],Pi.prototype,"rowContainerHeightService",2);h([f("ctrlsService")],Pi.prototype,"ctrlsService",2);h([I],Pi.prototype,"postConstruct",1);Pi=h([B("rowRenderer")],Pi);var ZI=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],Jt(this.entriesList,i)}removeFromCache(e){const t=e.getRowNode().id;delete this.entriesMap[t],Jt(this.entriesList,e)}getEntries(){return this.entriesList}},$a=class extends L{init(){this.setPinnedTopRowData(),this.setPinnedBottomRowData(),this.addManagedPropertyListener("pinnedTopRowData",()=>this.setPinnedTopRowData()),this.addManagedPropertyListener("pinnedBottomRowData",()=>this.setPinnedBottomRowData())}isEmpty(e){const t=e==="top"?this.pinnedTopRows:this.pinnedBottomRows;return Ii(t)}isRowsToRender(e){return!this.isEmpty(e)}getRowAtPixel(e,t){const i=t==="top"?this.pinnedTopRows:this.pinnedBottomRows;if(Ii(i))return 0;for(let s=0;s<i.length;s++){const n=i[s];if(n.rowTop+n.rowHeight-1>=e)return s}return i.length-1}setPinnedTopRowData(){const e=this.gos.get("pinnedTopRowData");this.pinnedTopRows=this.createNodesFromData(e,!0);const t={type:g.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)}setPinnedBottomRowData(){const e=this.gos.get("pinnedBottomRowData");this.pinnedBottomRows=this.createNodesFromData(e,!1);const t={type:g.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)}createNodesFromData(e,t){const i=[];if(e){let s=0;e.forEach((n,r)=>{const o=new ne(this.beans);o.data=n;const l=t?ne.ID_PREFIX_TOP_PINNED:ne.ID_PREFIX_BOTTOM_PINNED;o.id=l+r,o.rowPinned=t?"top":"bottom",o.setRowTop(s),o.setRowHeight(this.gos.getRowHeightForNode(o).height),o.setRowIndex(r),s+=o.rowHeight,i.push(o)})}return i}getPinnedTopRowData(){return this.pinnedTopRows}getPinnedBottomRowData(){return this.pinnedBottomRows}getPinnedTopTotalHeight(){return this.getTotalHeight(this.pinnedTopRows)}getPinnedTopRowCount(){return this.pinnedTopRows?this.pinnedTopRows.length:0}getPinnedBottomRowCount(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0}getPinnedTopRow(e){return this.pinnedTopRows[e]}getPinnedBottomRow(e){return this.pinnedBottomRows[e]}forEachPinnedTopRow(e){Ii(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)}forEachPinnedBottomRow(e){Ii(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)}getPinnedBottomTotalHeight(){return this.getTotalHeight(this.pinnedBottomRows)}getTotalHeight(e){if(!e||e.length===0)return 0;const t=pe(e);return t.rowTop+t.rowHeight}};h([f("beans")],$a.prototype,"beans",2);h([I],$a.prototype,"init",1);$a=h([B("pinnedRowModel")],$a);var kh=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 n=e.childrenAfterGroup[s];n.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[s],t,i):i&&t(n)}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 n=this.mapToItems[i.id],r=this.mapToItems[i.parent.id];r.children||(r.children=[]),r.children.push(n),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(n=>i[n.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const i=this.nodeIdsToColumns[e.id];return t.filter(n=>!i[n.getId()])}},ml=class ir extends L{constructor(t){super(),this.state=ir.STATE_WAITING_TO_LOAD,this.version=0,this.id=t}getId(){return this.id}load(){this.state=ir.STATE_LOADING,this.loadFromDatasource()}getVersion(){return this.version}setStateWaitingToLoad(){this.version++,this.state=ir.STATE_WAITING_TO_LOAD}getState(){return this.state}pageLoadFailed(t){this.isRequestMostRecentAndLive(t)&&(this.state=ir.STATE_FAILED,this.processServerFail()),this.dispatchLoadCompleted(!1)}success(t,i){this.successCommon(t,i)}pageLoaded(t,i,s){this.successCommon(t,{rowData:i,rowCount:s})}isRequestMostRecentAndLive(t){const i=t===this.version,s=this.isAlive();return i&&s}successCommon(t,i){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(t)&&(this.state=ir.STATE_LOADED,this.processServerResult(i))}dispatchLoadCompleted(t=!0){const i={type:ir.EVENT_LOAD_COMPLETE,success:t,block:this};this.dispatchEvent(i)}};ml.EVENT_LOAD_COMPLETE="loadComplete";ml.STATE_WAITING_TO_LOAD="needsLoading";ml.STATE_LOADING="loading";ml.STATE_LOADED="loaded";ml.STATE_FAILED="failed";var mf=ml,Ds=class extends L{constructor(){super(...arguments),this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Z.debounce(this.performCheckBlocksToLoad.bind(this),e))}setBeans(e){this.logger=e.create("RowNodeBlockLoader")}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(mf.EVENT_LOAD_COMPLETE,this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Z.removeFromArray(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchEvent({type:Ds.BLOCK_LOADED_EVENT}),this.activeBlockLoadsCount==0&&this.dispatchEvent({type:Ds.BLOCK_LOADER_FINISHED_EVENT})}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){this.logger.log("checkBlockToLoad: max loads exceeded");return}const e=this.getAvailableLoadingCount(),t=this.blocks.filter(i=>i.getState()===mf.STATE_WAITING_TO_LOAD).slice(0,e);this.registerLoads(t.length),t.forEach(i=>i.load()),this.printCacheStatus()}getBlockState(){if(this.gos.isRowModelType("serverSide"))return this.rowModel.getBlockStates();const e={};return this.blocks.forEach(t=>{const{id:i,state:s}=t.getBlockStateJson();e[i]=s}),e}printCacheStatus(){this.logger.isLogging()&&this.logger.log(`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}};Ds.BLOCK_LOADED_EVENT="blockLoaded";Ds.BLOCK_LOADER_FINISHED_EVENT="blockLoaderFinished";h([f("rowModel")],Ds.prototype,"rowModel",2);h([I],Ds.prototype,"postConstruct",1);h([es(0,_i("loggerFactory"))],Ds.prototype,"setBeans",1);Ds=h([B("rowNodeBlockLoader")],Ds);var ja=class extends L{constructor(){super(...arguments),this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.pixelOffset=0,this.masterRowCount=0}postConstruct(){this.active=this.gos.get("pagination"),this.pageSizeFromGridOptions=this.gos.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedListener(this.eventService,g.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this)),this.onModelUpdated()}ensureRowHeightsValid(e,t,i,s){const n=this.rowModel.ensureRowHeightsValid(e,t,this.getPageFirstRow(),this.getPageLastRow());return n&&this.calculatePages(),n}isPaginateChildRows(){return this.gos.get("groupRemoveSingleChildren")||this.gos.get("groupRemoveLowestSingleChildren")?!0:this.gos.get("paginateChildRows")}onModelUpdated(e){this.calculatePages();const t={type:g.EVENT_PAGINATION_CHANGED,animate:e?e.animate:!1,newData:e?e.newData:!1,newPage:e?e.newPage:!1,newPageSize:e?e.newPageSize:!1,keepRenderedRows:e?e.keepRenderedRows:!1};this.eventService.dispatchEvent(t)}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages();const e={type:g.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!1,keepRenderedRows:!0};this.eventService.dispatchEvent(e)}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){if(!this.active||this.currentPage===e||typeof this.currentPage!="number")return;this.currentPage=e,this.calculatePages();const t={type:g.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!0,newPageSize:!1,keepRenderedRows:!1};this.eventService.dispatchEvent(t)}getPixelOffset(){return this.pixelOffset}getRow(e){return this.rowModel.getRow(e)}getRowNode(e){return this.rowModel.getRowNode(e)}getRowIndexAtPixel(e){return this.rowModel.getRowIndexAtPixel(e)}getCurrentPageHeight(){return J(this.topRowBounds)||J(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}}isRowPresent(e){return this.rowModel.isRowPresent(e)?e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex:!1}isEmpty(){return this.rowModel.isEmpty()}isRowsToRender(){return this.rowModel.isRowsToRender()}forEachNode(e){return this.rowModel.forEachNode(e)}forEachNodeOnPage(e){const t=this.getPageFirstRow(),i=this.getPageLastRow();for(let s=t;s<=i;s++){const n=this.getRow(s);n&&e(n)}}getType(){return this.rowModel.getType()}getRowBounds(e){const t=this.rowModel.getRowBounds(e);return t.rowIndex=e,t}getPageFirstRow(){return this.topRowBounds?this.topRowBounds.rowIndex:-1}getPageLastRow(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1}getRowCount(){return this.rowModel.getRowCount()}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}isLastPageFound(){return this.rowModel.isLastRowIndexKnown()}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 A(this.pageSizeAutoCalculated)?this.pageSizeAutoCalculated:A(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:A(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:A(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;if(this.pageSizeAutoCalculated=void 0,this.pageSize===e)return;this.calculatePages();const t={type:g.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!0,keepRenderedRows:!1};this.eventService.dispatchEvent(t)}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}if(i!==this.pageSize){this.calculatePages();const s={type:g.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!0,keepRenderedRows:!0};this.eventService.dispatchEvent(s)}}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.topRowBounds=this.rowModel.getRowBounds(this.topDisplayedRowIndex),this.topRowBounds&&(this.topRowBounds.rowIndex=this.topDisplayedRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomDisplayedRowIndex),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=this.bottomDisplayedRowIndex),this.setPixelOffset(A(this.topRowBounds)?this.topRowBounds.rowTop:0)}setPixelOffset(e){this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:g.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED}))}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}};h([f("rowModel")],ja.prototype,"rowModel",2);h([I],ja.prototype,"postConstruct",1);ja=h([B("paginationProxy")],ja);var Ec=class extends L{processAllCellClasses(e,t,i,s){this.processClassRules(void 0,e.cellClassRules,t,i,s),this.processStaticCellClasses(e,t,i)}processClassRules(e,t,i,s,n){if(t==null&&e==null)return;const r={},o={},l=(a,u)=>{a.split(" ").forEach(d=>{d.trim()!=""&&u(d)})};if(t){const a=Object.keys(t);for(let u=0;u<a.length;u++){const d=a[u],c=t[d];let p;typeof c=="string"?p=this.expressionService.evaluate(c,i):typeof c=="function"&&(p=c(i)),l(d,C=>{p?r[C]=!0:o[C]=!0})}}e&&n&&Object.keys(e).forEach(a=>l(a,u=>{r[u]||(o[u]=!0)})),n&&Object.keys(o).forEach(n),Object.keys(r).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(n=>{i(n)})}};h([f("expressionService")],Ec.prototype,"expressionService",2);Ec=h([B("stylingService")],Ec);var jD=class extends Rh{constructor(e){super(e,"ag-toggle-button")}setValue(e,t){return super.setValue(e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}},JI=class extends is{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}},eN=class extends Ur{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this));const e=Ts();this.addManagedListener(this.eInput,"mousedown",()=>{this.isDisabled()||e||this.eInput.focus()}),this.eInput.step="any"}onWheel(e){this.gos.getActiveDomElement()===this.eInput&&e.preventDefault()}setMin(e){var t;const i=e instanceof Date?(t=ki(e??null,!1))!=null?t:void 0:e;return this.min===i?this:(this.min=i,Rs(this.eInput,"min",i),this)}setMax(e){var t;const i=e instanceof Date?(t=ki(e??null,!1))!=null?t:void 0:e;return this.max===i?this:(this.max=i,Rs(this.eInput,"max",i),this)}setStep(e){return this.step===e?this:(this.step=e,Rs(this.eInput,"step",e),this)}getDate(){var e;if(this.eInput.validity.valid)return(e=si(this.getValue()))!=null?e:void 0}setDate(e,t){this.setValue(ki(e??null,!1),t)}},tN=class extends is{constructor(e){super(e,"ag-range-field","range")}postConstruct(){super.postConstruct();const{min:e,max:t,step:i}=this.config;e!=null&&this.setMinValue(e),t!=null&&this.setMaxValue(t),this.setStep(i||1)}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>{const t=e.target.value;this.setValue(t)})}setMinValue(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this}setMaxValue(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this}setStep(e){return this.eInput.setAttribute("step",e.toString()),this}setValue(e,t){this.min!=null&&(e=Math.max(parseFloat(e),this.min).toString()),this.max!=null&&(e=Math.min(parseFloat(e),this.max).toString());const i=super.setValue(e,t);return this.eInput.value=e,i}},FC=class extends te{constructor(e,t){super('<div class="ag-rich-select-row" role="presentation"></div>'),this.params=e,this.wrapperEl=t}postConstruct(){this.addManagedListener(this.getGui(),"click",this.onClick.bind(this))}setState(e){let t="";this.params.valueFormatter&&(t=this.params.valueFormatter(e)),this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.value=e}highlightString(e){const{parsedValue:t}=this;if(this.params.cellRenderer||!A(t))return;let i=A(e);if(i){const s=t==null?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(s>=0){const n=s+e.length,r=tt(t.slice(0,s),!0),o=tt(t.slice(s,n),!0),l=tt(t.slice(n));this.renderValueWithoutRenderer(`${r}<span class="ag-rich-select-row-text-highlight">${o}</span>${l}`)}else i=!1}i||this.renderValueWithoutRenderer(t)}updateHighlighted(e){var t;const i=this.getGui(),s=`ag-rich-select-row-${this.getCompId()}`;if((t=i.parentElement)==null||t.setAttribute("id",s),e){const n=this.getParentComponent().getAriaElement();Bm(n,s),this.wrapperEl.setAttribute("data-active-option",s)}zo(i.parentElement,e),this.addOrRemoveCssClass("ag-rich-select-row-selected",e)}populateWithoutRenderer(e,t){const i=this.gos.getDocument(),s=this.getGui(),n=i.createElement("span");n.style.overflow="hidden",n.style.textOverflow="ellipsis";const r=tt(A(t)?t:e,!0);this.parsedValue=A(r)?r:null,s.appendChild(n),this.renderValueWithoutRenderer(r),this.setTooltip({newTooltipText:this.parsedValue,shouldDisplayTooltip:()=>n.scrollWidth>n.clientWidth})}renderValueWithoutRenderer(e){const t=this.getGui().querySelector("span");t&&(t.innerHTML=A(e)?e:" ")}populateWithRenderer(e,t){let i,s;return this.params.cellRenderer&&(s=this.userComponentFactory.getCellRendererDetails(this.params,{value:e,valueFormatted:t,setTooltip:(n,r)=>{this.setTooltip({newTooltipText:n,shouldDisplayTooltip:r})}})),s&&(i=s.newAgStackInstance()),i&&oC(i,this.getGui()),i?(i.then(n=>{this.addDestroyFunc(()=>{this.getContext().destroyBean(n)})}),!0):!1}onClick(){const e=this.getParentComponent(),t={type:g.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:!1,value:this.value};e==null||e.dispatchEvent(t)}};h([f("userComponentFactory")],FC.prototype,"userComponentFactory",2);h([I],FC.prototype,"postConstruct",1);var xu=class KD extends Fu{constructor(t){super(KD.getTemplate((t==null?void 0:t.cssIdentifier)||"default")),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0;const{cssIdentifier:i="default",ariaRole:s="listbox",listName:n}=t||{};this.cssIdentifier=i,this.ariaRole=s,this.listName=n}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:t=>this.onFocusIn(t),onFocusOut:t=>this.onFocusOut(t),focusInnerElement:t=>this.focusInnerElement(t),onTabKeyDown:t=>this.onTabKeyDown(t),handleKeyDown:t=>this.handleKeyDown(t)}),this.setAriaProperties(),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanged.bind(this))}onGridStylesChanged(){this.rowHeight=this.getItemHeight(),this.refresh()}setAriaProperties(){const i=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),s=this.eContainer;Ue(s,this.ariaRole),Di(s,i)}addResizeObserver(){const t=()=>this.animationFrameService.requestAnimationFrame(()=>this.drawVirtualRows()),i=this.resizeObserverService.observeResize(this.getGui(),t);this.addDestroyFunc(i)}focusInnerElement(t){this.focusRow(t?this.model.getRowCount()-1:0)}onFocusIn(t){const i=t.target;i.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=iT(i)-1)}onFocusOut(t){this.getFocusableElement().contains(t.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(t){switch(t.key){case D.UP:case D.DOWN:this.navigate(t.key===D.UP)&&t.preventDefault();break;case D.PAGE_HOME:case D.PAGE_END:case D.PAGE_UP:case D.PAGE_DOWN:this.navigateToPage(t.key)!==null&&t.preventDefault();break}}onTabKeyDown(t){this.navigate(t.shiftKey)?t.preventDefault():(as(t),this.forceFocusOutOfContainer(t.shiftKey))}navigate(t){if(this.lastFocusedRowIndex==null)return!1;const i=this.lastFocusedRowIndex+(t?-1:1);return i<0||i>=this.model.getRowCount()?!1:(this.focusRow(i),!0)}navigateToPage(t,i="focused"){let s=!1;i==="focused"&&(i=this.getLastFocusedRow(),s=!0);const n=this.model.getRowCount()-1;let r=-1;return t===D.PAGE_HOME?r=0:t===D.PAGE_END?r=n:t===D.PAGE_DOWN?r=Math.min(i+this.pageSize,n):t===D.PAGE_UP&&(r=Math.max(i-this.pageSize,0)),r===-1?null:(s?this.focusRow(r):this.ensureIndexVisible(r),r)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(t){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(t),this.animationFrameService.requestAnimationFrame(()=>{if(this.isScrolling=!1,!this.isAlive())return;const i=this.renderedRows.get(t);i&&i.eDiv.focus()}))}getComponentAt(t){const i=this.renderedRows.get(t);return i&&i.rowComponent}forEachRenderedRow(t){this.renderedRows.forEach((i,s)=>t(i.rowComponent,s))}static getTemplate(t){return`<div class="ag-virtual-list-viewport ag-${t}-virtual-list-viewport" role="presentation">
|
|
286
|
+
<div class="ag-virtual-list-container ag-${t}-virtual-list-container" ref="eContainer"></div>
|
|
287
|
+
</div>`}getItemHeight(){return this.isHeightFromTheme?this.environment.getListItemHeight():this.rowHeight}ensureIndexVisible(t,i=!0){const s=this.model.getRowCount();if(typeof t!="number"||t<0||t>=s)return console.warn("AG Grid: invalid row index for ensureIndexVisible: "+t),!1;const n=t*this.rowHeight,r=n+this.rowHeight,o=this.getGui(),l=o.scrollTop,a=o.offsetHeight,u=l+a,d=i?0:this.rowHeight,c=l>n+d,p=u<r-d;if(c)return o.scrollTop=n,!0;if(p){const C=r-a;return o.scrollTop=C,!0}return!1}setComponentCreator(t){this.componentCreator=t}setComponentUpdater(t){this.componentUpdater=t}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(t){this.isHeightFromTheme=!1,this.rowHeight=t,this.refresh()}refresh(t){if(this.model==null||!this.isAlive())return;const i=this.model.getRowCount();this.eContainer.style.height=`${i*this.rowHeight}px`,Nm(()=>this.eContainer.clientHeight>=i*this.rowHeight,()=>{this.isAlive()&&(this.canSoftRefresh(t)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}canSoftRefresh(t){return!!(t&&this.renderedRows.size&&typeof this.model.areRowsEqual=="function"&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((t,i)=>this.removeRow(i))}drawVirtualRows(t){if(!this.isAlive()||!this.model)return;const i=this.getGui(),s=i.scrollTop,n=s+i.offsetHeight,r=Math.floor(s/this.rowHeight),o=Math.floor(n/this.rowHeight);this.pageSize=Math.floor((n-s)/this.rowHeight),this.ensureRowsRendered(r,o,t)}ensureRowsRendered(t,i,s){this.renderedRows.forEach((n,r)=>{(r<t||r>i)&&r!==this.lastFocusedRowIndex&&this.removeRow(r)}),s&&this.refreshRows();for(let n=t;n<=i;n++)this.renderedRows.has(n)||n<this.model.getRowCount()&&this.insertRow(n)}insertRow(t){const i=this.model.getRow(t),s=document.createElement("div");s.classList.add("ag-virtual-list-item",`ag-${this.cssIdentifier}-virtual-list-item`),Ue(s,this.ariaRole==="tree"?"treeitem":"option"),ph(s,this.model.getRowCount()),gh(s,t+1),s.setAttribute("tabindex","-1"),s.style.height=`${this.rowHeight}px`,s.style.top=`${this.rowHeight*t}px`;const n=this.componentCreator(i,s);n.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=t),s.appendChild(n.getGui()),this.renderedRows.has(t-1)?this.renderedRows.get(t-1).eDiv.insertAdjacentElement("afterend",s):this.renderedRows.has(t+1)?this.renderedRows.get(t+1).eDiv.insertAdjacentElement("beforebegin",s):this.eContainer.appendChild(s),this.renderedRows.set(t,{rowComponent:n,eDiv:s,value:i})}removeRow(t){const i=this.renderedRows.get(t);this.eContainer.removeChild(i.eDiv),this.destroyBean(i.rowComponent),this.renderedRows.delete(t)}refreshRows(){const t=this.model.getRowCount();this.renderedRows.forEach((i,s)=>{var n,r;if(s>=t)this.removeRow(s);else{const o=this.model.getRow(s);(r=(n=this.model).areRowsEqual)!=null&&r.call(n,i.value,o)?this.componentUpdater(o,i.rowComponent):this.removeRow(s)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(t){this.model=t}getAriaElement(){return this.eContainer}destroy(){this.isAlive()&&(this.clearVirtualRows(),super.destroy())}};h([f("resizeObserverService")],xu.prototype,"resizeObserverService",2);h([f("animationFrameService")],xu.prototype,"animationFrameService",2);h([_("eContainer")],xu.prototype,"eContainer",2);h([I],xu.prototype,"postConstruct",1);var YD=xu,iN=`
|
|
288
|
+
<div class="ag-picker-field" role="presentation">
|
|
289
|
+
<div ref="eLabel"></div>
|
|
290
|
+
<div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">
|
|
291
|
+
<div ref="eDisplayField" class="ag-picker-field-display"></div>
|
|
292
|
+
<ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
|
|
293
|
+
<div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
|
|
294
|
+
</div>
|
|
295
|
+
</div>`,Vh=class extends Wr{constructor(e){var t,i;super(Ie(K({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:(t=e==null?void 0:e.template)!=null?t:iN,modalPicker:!1},e),{maxPickerHeight:(i=e==null?void 0:e.maxPickerHeight)!=null?i:"calc(var(--ag-row-height) * 6.5)"})),this.searchString="",this.highlightedItem=-1,this.lastRowHovered=-1,this.searchStringCreator=null;const{cellRowHeight:s,value:n,valueList:r,searchStringCreator:o}=e||{};s!=null&&(this.cellRowHeight=s),n!==void 0&&(this.value=n),r!=null&&(this.values=r),o&&(this.searchStringCreator=o)}postConstruct(){super.postConstruct(),this.createLoadingElement(),this.createListComponent();const{allowTyping:e,placeholder:t}=this.config;e?(this.eInput.setAutoComplete(!1).setInputPlaceholder(t),this.eDisplayField.classList.add("ag-hidden")):this.eInput.setDisplayed(!1),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{searchDebounceDelay:i=300}=this.config;this.clearSearchString=kt(this.clearSearchString,i),this.renderSelectedValue(),e&&(this.eInput.onValueChange(s=>this.searchTextFromString(s)),this.addManagedListener(this.eWrapper,"focus",this.onWrapperFocus.bind(this))),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}createLoadingElement(){const e=this.gos.getDocument(),t=this.localeService.getLocaleTextFunc(),i=e.createElement("div");i.classList.add("ag-loading-text"),i.innerText=t("loadingOoo","Loading..."),this.eLoading=i}createListComponent(){this.listComponent=this.createBean(new YD({cssIdentifier:"rich-select"})),this.listComponent.setComponentCreator(this.createRowComponent.bind(this));const e=(l,a)=>{};this.listComponent.setComponentUpdater(e),this.listComponent.setParentComponent(this),this.addManagedListener(this.listComponent,g.EVENT_FIELD_PICKER_VALUE_SELECTED,l=>{this.onListValueSelected(l.value,l.fromEnterKey)});const{cellRowHeight:t}=this;t&&this.listComponent.setRowHeight(t);const i=this.listComponent.getGui(),s=this.listComponent.getAriaElement();this.addManagedListener(i,"mousemove",this.onPickerMouseMove.bind(this)),this.addManagedListener(i,"mousedown",l=>l.preventDefault()),i.classList.add("ag-rich-select-list");const n=`ag-rich-select-list-${this.listComponent.getCompId()}`;s.setAttribute("id",n);const o=this.localeService.getLocaleTextFunc()(this.config.pickerAriaLabelKey,this.config.pickerAriaLabelValue);Di(s,o),zm(this.eWrapper,s)}renderSelectedValue(){const{value:e,eDisplayField:t,config:i}=this,{allowTyping:s,initialInputValue:n}=this.config,r=this.config.valueFormatter?this.config.valueFormatter(e):e;if(s){this.eInput.setValue(n??r);return}let o;i.cellRenderer&&(o=this.userComponentFactory.getCellRendererDetails(this.config,{value:e,valueFormatted:r}));let l;if(o&&(l=o.newAgStackInstance()),l)Xe(t),oC(l,t),l.then(a=>{this.addDestroyFunc(()=>this.getContext().destroyBean(a))});else{if(A(this.value))t.innerText=r,t.classList.remove("ag-display-as-placeholder");else{const{placeholder:a}=i;A(a)?(t.innerHTML=`${tt(a)}`,t.classList.add("ag-display-as-placeholder")):Xe(t)}this.setTooltip({newTooltipText:r??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth})}}getCurrentValueIndex(){const{currentList:e,value:t}=this;if(t==null||!e)return-1;for(let i=0;i<e.length;i++)if(e[i]===t)return i;return-1}highlightFilterMatch(){var e;(e=this.listComponent)==null||e.forEachRenderedRow((t,i)=>{t.highlightString(this.searchString)})}highlightSelectedValue(e){var t;e==null&&(e=this.getCurrentValueIndex()),this.highlightedItem=e,(t=this.listComponent)==null||t.forEachRenderedRow((i,s)=>{const n=e===-1?!1:this.highlightedItem===s;i.updateHighlighted(n)})}setRowHeight(e){e!==this.cellRowHeight&&(this.cellRowHeight=e),this.listComponent&&this.listComponent.setRowHeight(e)}createPickerComponent(){const{values:e}=this;return e&&this.setValueList({valueList:e}),this.listComponent}setSearchStringCreator(e){this.searchStringCreator=e}setValueList(e){const{valueList:t,refresh:i}=e;this.listComponent&&this.currentList!==t&&(this.currentList=t,this.listComponent.setModel({getRowCount:()=>t.length,getRow:s=>t[s],areRowsEqual:(s,n)=>s===n}),i&&(this.values?this.listComponent.refresh(!0):(this.values=t,this.isPickerDisplayed&&this.showCurrentValueInPicker())))}showPicker(){super.showPicker(),this.showCurrentValueInPicker(),this.displayOrHidePicker()}showCurrentValueInPicker(){var e,t;if(!this.listComponent)return;if(!this.currentList){this.isPickerDisplayed&&this.eLoading&&this.listComponent.appendChild(this.eLoading);return}(e=this.eLoading)!=null&&e.offsetParent&&((t=this.eLoading.parentElement)==null||t.removeChild(this.eLoading));const i=this.getCurrentValueIndex();i!==-1?(this.listComponent.refresh(),this.listComponent.ensureIndexVisible(i),this.listComponent.refresh(!0),this.highlightSelectedValue(i)):this.listComponent.refresh()}beforeHidePicker(){this.highlightedItem=-1,super.beforeHidePicker()}onWrapperFocus(){if(!this.eInput)return;const e=this.eInput.getFocusableElement();e.focus(),e.select()}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}buildSearchStringFromKeyboardEvent(e){let{key:t}=e;if(t===D.BACKSPACE)this.searchString=this.searchString.slice(0,-1),t="";else if(!vh(e))return;e.preventDefault(),this.searchTextFromCharacter(t)}searchTextFromCharacter(e){this.searchString+=e,this.runSearch(),this.clearSearchString()}searchTextFromString(e){e==null&&(e=""),this.searchString=e,this.runSearch()}buildSearchStrings(e){const{valueFormatter:t=s=>s}=this.config;let i;return typeof e[0]=="number"||typeof e[0]=="string"?i=e.map(s=>t(s)):typeof e[0]=="object"&&this.searchStringCreator&&(i=this.searchStringCreator(e)),i}getSuggestionsAndFilteredValues(e,t){let i=[],s=[];if(!e.length)return{suggestions:i,filteredValues:s};const{searchType:n="fuzzy",filterList:r}=this.config;if(n==="fuzzy"){const o=yu(this.searchString,t,!0);i=o.values;const l=o.indices;if(r&&l.length)for(let a=0;a<l.length;a++)s.push(this.values[l[a]])}else i=t.filter((o,l)=>{const a=o.toLocaleLowerCase(),u=this.searchString.toLocaleLowerCase(),d=n==="match"?a.startsWith(u):a.indexOf(u)!==-1;return r&&d&&s.push(this.values[l]),d});return{suggestions:i,filteredValues:s}}filterListModel(e){const{filterList:t}=this.config;t&&(this.setValueList({valueList:e,refresh:!0}),this.alignPickerToComponent())}runSearch(){var e,t;const{values:i}=this,s=this.buildSearchStrings(i);if(!s){this.highlightSelectedValue(-1);return}const{suggestions:n,filteredValues:r}=this.getSuggestionsAndFilteredValues(this.searchString,s),{filterList:o,highlightMatch:l,searchType:a="fuzzy"}=this.config,u=r.length,d=!!(o&&this.searchString!=="");if(this.filterListModel(d?r:i),n.length){const c=d?0:s.indexOf(n[0]);this.selectListItem(c)}else if(this.highlightSelectedValue(-1),!d||u)(e=this.listComponent)==null||e.ensureIndexVisible(0);else if(d){this.getAriaElement().removeAttribute("data-active-option");const c=(t=this.listComponent)==null?void 0:t.getAriaElement();c&&Bm(c,null)}l&&a!=="fuzzy"&&this.highlightFilterMatch(),this.displayOrHidePicker()}displayOrHidePicker(){var e;const t=(e=this.listComponent)==null?void 0:e.getGui(),i=this.currentList?this.currentList.length===0:!1;t==null||t.classList.toggle("ag-hidden",i)}clearSearchString(){this.searchString=""}selectListItem(e,t){if(!this.isPickerDisplayed||!this.currentList||!this.listComponent||e<0||e>=this.currentList.length)return;this.listComponent.ensureIndexVisible(e,!t)&&!t&&this.listComponent.refresh(!0),this.highlightSelectedValue(e)}setValue(e,t,i){const s=this.currentList?this.currentList.indexOf(e):-1;return s===-1?this:(this.value=e,i||this.selectListItem(s),this.renderSelectedValue(),super.setValue(e,t))}createRowComponent(e){const t=new FC(this.config,this.eWrapper);t.setParentComponent(this.listComponent),this.getContext().createBean(t),t.setState(e);const{highlightMatch:i,searchType:s="fuzzy"}=this.config;return i&&s!=="fuzzy"&&t.highlightString(this.searchString),t}getRowForMouseEvent(e){const{listComponent:t}=this;if(!t)return-1;const s=(t==null?void 0:t.getGui()).getBoundingClientRect(),n=t.getScrollTop(),r=e.clientY-s.top+n;return Math.floor(r/t.getRowHeight())}onPickerMouseMove(e){if(!this.listComponent)return;const t=this.getRowForMouseEvent(e);t!==-1&&t!=this.lastRowHovered&&(this.lastRowHovered=t,this.selectListItem(t,!0))}onNavigationKeyDown(e,t){e.preventDefault();const i=t===D.DOWN;if(!this.isPickerDisplayed&&i){this.showPicker();return}const s=this.highlightedItem,r=s===-1?0:s+(i?1:-1);this.selectListItem(r)}onPageNavigation(e){var t;if(!this.isPickerDisplayed)return;const i=(t=this.listComponent)==null?void 0:t.navigateToPage(e,this.highlightedItem);i!=null&&this.animationFrameService.requestAnimationFrame(()=>{if(!this.isAlive())return null;this.highlightSelectedValue(i)})}onEnterKeyDown(e){this.isPickerDisplayed&&(e.preventDefault(),this.currentList&&this.onListValueSelected(this.currentList[this.highlightedItem],!0))}onTabKeyDown(){!this.isPickerDisplayed||!this.currentList||this.setValue(this.currentList[this.highlightedItem],!1,!0)}onListValueSelected(e,t){this.setValue(e,!1,!0),this.dispatchPickerEvent(e,t),this.hidePicker()}dispatchPickerEvent(e,t){const i={type:g.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:t,value:e};this.dispatchEvent(i)}getFocusableElement(){const{allowTyping:e}=this.config;return e?this.eInput.getFocusableElement():super.getFocusableElement()}onKeyDown(e){const t=e.key,{allowTyping:i}=this.config;switch(t){case D.LEFT:case D.RIGHT:i||e.preventDefault();break;case D.PAGE_HOME:case D.PAGE_END:if(i){e.preventDefault();const s=this.eInput.getInputElement(),n=t===D.PAGE_HOME?0:s.value.length;s.setSelectionRange(n,n);break}case D.PAGE_UP:case D.PAGE_DOWN:e.preventDefault(),this.onPageNavigation(t);break;case D.DOWN:case D.UP:this.onNavigationKeyDown(e,t);break;case D.ESCAPE:this.isPickerDisplayed&&(di(this.listComponent.getGui())&&(e.preventDefault(),as(e)),this.hidePicker());break;case D.ENTER:this.onEnterKeyDown(e);break;case D.TAB:this.onTabKeyDown();break;default:i||this.buildSearchStringFromKeyboardEvent(e)}}destroy(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),this.eLoading=void 0,super.destroy()}};h([f("userComponentFactory")],Vh.prototype,"userComponentFactory",2);h([f("animationFrameService")],Vh.prototype,"animationFrameService",2);h([_("eInput")],Vh.prototype,"eInput",2);var Cl=class QD extends dC{constructor(t){super(t,QD.TEMPLATE),this.labelAlignment="top"}init(){this.eSlider.addCssClass("ag-slider-field");const{minValue:t,maxValue:i,textFieldWidth:s,step:n,value:r,onValueChange:o}=this.config;t!=null&&this.setMinValue(t),i!=null&&this.setMaxValue(i),s!=null&&this.setTextFieldWidth(s),n!=null&&this.setStep(n),r!=null&&this.setValue(r),o!=null&&this.onValueChange(o)}onValueChange(t){const i=g.EVENT_FIELD_VALUE_CHANGED;return this.addManagedListener(this.eText,i,()=>{const s=parseFloat(this.eText.getValue());this.eSlider.setValue(s.toString(),!0),t(s||0)}),this.addManagedListener(this.eSlider,i,()=>{const s=this.eSlider.getValue();this.eText.setValue(s,!0),t(parseFloat(s))}),this}setSliderWidth(t){return this.eSlider.setWidth(t),this}setTextFieldWidth(t){return this.eText.setWidth(t),this}setMinValue(t){return this.eSlider.setMinValue(t),this.eText.setMin(t),this}setMaxValue(t){return this.eSlider.setMaxValue(t),this.eText.setMax(t),this}getValue(){return this.eText.getValue()}setValue(t,i){return this.getValue()===t?this:(this.eText.setValue(t,!0),this.eSlider.setValue(t,!0),i||this.dispatchEvent({type:g.EVENT_FIELD_VALUE_CHANGED}),this)}setStep(t){return this.eSlider.setStep(t),this.eText.setStep(t),this}};Cl.TEMPLATE=`<div class="ag-slider">
|
|
296
|
+
<label ref="eLabel"></label>
|
|
297
|
+
<div class="ag-wrapper ag-slider-wrapper">
|
|
298
|
+
<ag-input-range ref="eSlider"></ag-input-range>
|
|
299
|
+
<ag-input-number-field ref="eText"></ag-input-number-field>
|
|
300
|
+
</div>
|
|
301
|
+
</div>`;h([_("eLabel")],Cl.prototype,"eLabel",2);h([_("eSlider")],Cl.prototype,"eSlider",2);h([_("eText")],Cl.prototype,"eText",2);h([I],Cl.prototype,"init",1);var sN=Cl,jn=class no extends te{constructor(t={}){super(no.getTemplate(t)),this.params=t,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1;const{enabled:i,items:s,suppressEnabledCheckbox:n,expanded:r,suppressToggleExpandOnEnableChange:o,useToggle:l}=t;this.cssIdentifier=t.cssIdentifier||"default",this.enabled=i??!0,this.items=s||[],this.useToggle=l??!1,this.alignItems=t.alignItems||"center",this.expanded=r??!0,n!=null&&(this.suppressEnabledCheckbox=n),o!=null&&(this.suppressToggleExpandOnEnableChange=o)}static getTemplate(t){const i=t.cssIdentifier||"default",s=t.direction||"vertical";return`
|
|
302
|
+
<div class="ag-group ag-${i}-group" role="presentation">
|
|
303
|
+
<div ref="eToolbar" class="ag-group-toolbar ag-${i}-group-toolbar">
|
|
304
|
+
<ag-checkbox ref="cbGroupEnabled"></ag-checkbox>
|
|
305
|
+
</div>
|
|
306
|
+
<div ref="eContainer" class="ag-group-container ag-group-container-${s} ag-${i}-group-container"></div>
|
|
307
|
+
</div>
|
|
308
|
+
`}postConstruct(){if(this.setupTitleBar(),this.items.length){const n=this.items;this.items=[],this.addItems(n)}const t=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(t("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);const{onEnableChange:i,suppressOpenCloseIcons:s}=this.params;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(s??!1),this.refreshChildDisplay(),ue(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange(n=>{this.setEnabled(n,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent(n)}),i!=null&&this.onEnableChange(i)}refreshChildDisplay(){var t;ue(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),(t=this.eTitleBar)==null||t.refreshOnExpand(this.expanded)}isExpanded(){return this.expanded}setAlignItems(t){this.alignItems!==t&&this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`),this.alignItems=t;const i=`ag-group-item-alignment-${this.alignItems}`;return this.addCssClass(i),this}toggleGroupExpand(t){var i;let s=!1;if((i=this.eTitleBar)!=null&&i.isSuppressCollapse()&&!this.useToggle)t=!0,s=!0;else if(t=t??!this.expanded,this.expanded===t)return this;return this.expanded=t,this.refreshChildDisplay(),ue(this.eContainer,t),s||this.dispatchEvent({type:t?no.EVENT_EXPANDED:no.EVENT_COLLAPSED}),this}addItems(t){t.forEach(i=>this.addItem(i))}prependItem(t){this.insertItem(t,!0)}addItem(t){this.insertItem(t,!1)}insertItem(t,i){const s=this.eContainer,n=t instanceof te?t.getGui():t;n.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),i?(s.insertAdjacentElement("afterbegin",n),this.items.unshift(n)):(s.appendChild(n),this.items.push(n))}hideItem(t,i){const s=this.items[i];ue(s,!t)}getItemIndex(t){const i=t instanceof te?t.getGui():t;return this.items.indexOf(i)}setTitle(t){var i;return(i=this.eTitleBar)==null||i.setTitle(t),this}addTitleBarWidget(t){var i;return(i=this.eTitleBar)==null||i.addWidget(t),this}addCssClassToTitleBar(t){var i;(i=this.eTitleBar)==null||i.addCssClass(t)}dispatchEnableChangeEvent(t){const i={type:no.EVENT_ENABLE_CHANGE,enabled:t};this.dispatchEvent(i)}setEnabled(t,i,s){var n;return this.enabled=t,this.refreshDisabledStyles(),s||this.toggleGroupExpand(t),i||(this.cbGroupEnabled.setValue(t),(n=this.eToggle)==null||n.setValue(t)),this}isEnabled(){return this.enabled}onEnableChange(t){return this.addManagedListener(this,no.EVENT_ENABLE_CHANGE,i=>t(i.enabled)),this}hideEnabledCheckbox(t){return this.suppressEnabledCheckbox=t,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(t){var i;return(i=this.eTitleBar)==null||i.hideOpenCloseIcons(t),this}refreshDisabledStyles(){var t;const i=!this.enabled;this.eContainer.classList.toggle("ag-disabled",i),(t=this.eTitleBar)==null||t.refreshDisabledStyles(this.suppressEnabledCheckbox&&i),this.eContainer.classList.toggle("ag-disabled-group-container",i)}setupTitleBar(){const t=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",t.getGui())}createDefaultTitleBar(){const t=this.createManagedBean(new Iy(this.params));return this.eTitleBar=t,t.refreshOnExpand(this.expanded),this.addManagedListener(t,Iy.EVENT_EXPAND_CHANGED,i=>this.toggleGroupExpand(i.expanded)),t}createToggleTitleBar(){var t;const i=this.createManagedBean(new jD({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:s=>{this.setEnabled(s,!0),this.dispatchEnableChangeEvent(s)}}));return i.addCssClass("ag-group-title-bar"),i.addCssClass(`ag-${(t=this.params.cssIdentifier)!=null?t:"default"}-group-title-bar ag-unselectable`),this.eToggle=i,this.toggleGroupExpand(this.enabled),i}};jn.EVENT_EXPANDED="expanded";jn.EVENT_COLLAPSED="collapsed";jn.EVENT_ENABLE_CHANGE="enableChange";h([_("eToolbar")],jn.prototype,"eToolbar",2);h([_("cbGroupEnabled")],jn.prototype,"cbGroupEnabled",2);h([_("eContainer")],jn.prototype,"eContainer",2);h([I],jn.prototype,"postConstruct",1);var nN=jn,_p="ag-disabled-group-title-bar",vl=class Cf extends te{constructor(t={}){super(Cf.getTemplate(t)),this.suppressOpenCloseIcons=!1;const{title:i,suppressOpenCloseIcons:s}=t;i&&i.length>0&&(this.title=i),s!=null&&(this.suppressOpenCloseIcons=s)}static getTemplate(t){var i;const s=(i=t.cssIdentifier)!=null?i:"default";return`
|
|
309
|
+
<div class="ag-group-title-bar ag-${s}-group-title-bar ag-unselectable" role="button">
|
|
310
|
+
<span class="ag-group-title-bar-icon ag-${s}-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>
|
|
311
|
+
<span class="ag-group-title-bar-icon ag-${s}-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>
|
|
312
|
+
<span ref="eTitle" class="ag-group-title ag-${s}-group-title"></span>
|
|
313
|
+
</div>
|
|
314
|
+
`}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}setupExpandContract(){this.eGroupClosedIcon.appendChild(xi("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(xi("columnSelectOpen",this.gos,null)),this.addManagedListener(this.getGui(),"click",()=>this.dispatchExpandChanged()),this.addManagedListener(this.getGui(),"keydown",t=>{switch(t.key){case D.ENTER:case D.SPACE:t.preventDefault(),this.dispatchExpandChanged();break;case D.RIGHT:case D.LEFT:t.preventDefault(),this.dispatchExpandChanged(t.key===D.RIGHT);break}})}refreshOnExpand(t){this.refreshAriaStatus(t),this.refreshOpenCloseIcons(t)}refreshAriaStatus(t){this.suppressOpenCloseIcons||Us(this.getGui(),t)}refreshOpenCloseIcons(t){const i=!this.suppressOpenCloseIcons;ue(this.eGroupOpenedIcon,i&&t),ue(this.eGroupClosedIcon,i&&!t)}isSuppressCollapse(){return this.suppressOpenCloseIcons}dispatchExpandChanged(t){const i={type:Cf.EVENT_EXPAND_CHANGED,expanded:t};this.dispatchEvent(i)}setTitle(t){const i=this.getGui(),s=!!t&&t.length>0;t=s?t:void 0,this.eTitle.textContent=t??"",ue(i,s),t!==this.title&&(this.title=t);const n=i.classList.contains(_p);return this.refreshDisabledStyles(n),this}addWidget(t){return this.getGui().appendChild(t),this}hideOpenCloseIcons(t){return this.suppressOpenCloseIcons=t,t&&this.dispatchExpandChanged(!0),this}refreshDisabledStyles(t){const i=this.getGui();t?(i.classList.add(_p),i.removeAttribute("tabindex")):(i.classList.remove(_p),typeof this.title=="string"?i.setAttribute("tabindex","0"):i.removeAttribute("tabindex"))}};vl.EVENT_EXPAND_CHANGED="expandedChanged";h([_("eGroupOpenedIcon")],vl.prototype,"eGroupOpenedIcon",2);h([_("eGroupClosedIcon")],vl.prototype,"eGroupClosedIcon",2);h([_("eTitle")],vl.prototype,"eTitle",2);h([I],vl.prototype,"postConstruct",1);var Iy=vl,AC=class extends Fu{constructor(e=0,t){super('<div class="ag-menu-list" role="tree"></div>'),this.level=e,this.menuItems=[],this.params=t??{column:null,node:null,value:null}}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.handleFocusIn(e),onFocusOut:e=>this.handleFocusOut(e)})}onTabKeyDown(e){const t=this.getParentComponent(),i=t&&t.getGui();i&&i.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case D.UP:case D.RIGHT:case D.DOWN:case D.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case D.ESCAPE:this.closeIfIsChild()&&as(e);break}}handleFocusIn(e){var t,i;const s=e.relatedTarget;!this.tabGuardCtrl.isTabGuard(s)&&(this.getGui().contains(s)||(i=(t=this.activeMenuItem)==null?void 0:t.getSubMenuGui())!=null&&i.contains(s))||(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(e){var t;const i=e.relatedTarget;!this.activeMenuItem||this.getGui().contains(i)||(t=this.activeMenuItem.getSubMenuGui())!=null&&t.contains(i)||this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate()}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){e!=null&&it.all(e.map(t=>t==="separator"?it.resolve({eGui:this.createSeparator()}):typeof t=="string"?(console.warn(`AG Grid: unrecognised menu item ${t}`),it.resolve({eGui:null})):this.addItem(t))).then(t=>{t.forEach(i=>{i!=null&&i.eGui&&(this.appendChild(i.eGui),i.comp&&this.menuItems.push(i.comp))})})}addItem(e){const t=this.createManagedBean(new td);return t.init({menuItemDef:e,isAnotherSubMenuOpen:()=>this.menuItems.some(i=>i.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(t.setParentComponent(this),this.addManagedListener(t,td.EVENT_CLOSE_MENU,i=>{this.dispatchEvent(i)}),this.addManagedListener(t,td.EVENT_MENU_ITEM_ACTIVATED,i=>{this.activeMenuItem&&this.activeMenuItem!==i.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=i.menuItem}),{comp:t,eGui:t.getGui()}))}activateFirstItem(){const e=this.menuItems.filter(t=>!t.isDisabled())[0];e&&e.activate()}createSeparator(){return ni(`
|
|
315
|
+
<div class="ag-menu-separator" aria-hidden="true">
|
|
316
|
+
<div class="ag-menu-separator-part"></div>
|
|
317
|
+
<div class="ag-menu-separator-part"></div>
|
|
318
|
+
<div class="ag-menu-separator-part"></div>
|
|
319
|
+
<div class="ag-menu-separator-part"></div>
|
|
320
|
+
</div>`)}handleNavKey(e){switch(e){case D.UP:case D.DOWN:const i=this.findNextItem(e===D.UP);i&&i!==this.activeMenuItem&&i.activate();return}const t=this.gos.get("enableRtl")?D.RIGHT:D.LEFT;e===t?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){const t=this.getParentComponent();return t&&t instanceof td?(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0):!1}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){const t=this.menuItems.filter(n=>!n.isDisabled());if(!t.length)return;if(!this.activeMenuItem)return e?pe(t):t[0];e&&t.reverse();let i,s=!1;for(let n=0;n<t.length;n++){const r=t[n];if(!s){r===this.activeMenuItem&&(s=!0);continue}i=r;break}return s&&!i?t[0]:i||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}};h([f("focusService")],AC.prototype,"focusService",2);h([I],AC.prototype,"postConstruct",1);var qD=class extends Fu{constructor(e){super(),this.wrappedComponent=e,this.setTemplateFromElement(e.getGui())}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)})}handleKeyDown(e){e.key===D.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){const e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>e.getGui().focus(),0)}};h([I],qD.prototype,"postConstruct",1);var yl=class ro extends L{constructor(){super(...arguments),this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0}init(t){var i,s;const{menuItemDef:n,isAnotherSubMenuOpen:r,level:o,childComponent:l,contextParams:a}=t;return this.params=t.menuItemDef,this.level=o,this.isAnotherSubMenuOpen=r,this.childComponent=l,this.contextParams=a,this.cssClassPrefix=(s=(i=this.params.menuItemParams)==null?void 0:i.cssClassPrefix)!=null?s:"ag-menu-option",this.userComponentFactory.getMenuItemCompDetails(this.params,Ie(K({},n),{level:o,isAnotherSubMenuOpen:r,openSubMenu:d=>this.openSubMenu(d),closeSubMenu:()=>this.closeSubMenu(),closeMenu:d=>this.closeMenu(d),updateTooltip:(d,c)=>this.refreshTooltip(d,c),onItemActivated:()=>this.onItemActivated()})).newAgStackInstance().then(d=>{var c;this.menuItemComp=d;const p=(c=d.configureDefaults)==null?void 0:c.call(d);p&&this.configureDefaults(p===!0?void 0:p)})}addListeners(t,i){i!=null&&i.suppressClick||this.addManagedListener(t,"click",s=>this.onItemSelected(s)),i!=null&&i.suppressKeyboardSelect||this.addManagedListener(t,"keydown",s=>{(s.key===D.ENTER||s.key===D.SPACE)&&(s.preventDefault(),this.onItemSelected(s))}),i!=null&&i.suppressMouseDown||this.addManagedListener(t,"mousedown",s=>{s.stopPropagation(),s.preventDefault()}),i!=null&&i.suppressMouseOver||(this.addManagedListener(t,"mouseenter",()=>this.onMouseEnter()),this.addManagedListener(t,"mouseleave",()=>this.onMouseLeave()))}isDisabled(){return!!this.params.disabled}openSubMenu(t=!1){var i,s;if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;const n=ni('<div class="ag-menu" role="presentation"></div>');this.eSubMenuGui=n;let r,o=()=>{this.subMenuIsOpening=!1};if(this.childComponent){const d=this.createBean(new qD(this.childComponent));d.setParentComponent(this);const c=d.getGui(),p="mouseenter",C=()=>this.cancelDeactivate();c.addEventListener(p,C),r=()=>c.removeEventListener(p,C),n.appendChild(c),this.childComponent.afterGuiAttached&&(o=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){const d=this.createBean(new AC(this.level+1,this.contextParams));d.setParentComponent(this),d.addMenuItems(this.params.subMenu),n.appendChild(d.getGui()),this.addManagedListener(d,ro.EVENT_CLOSE_MENU,c=>this.dispatchEvent(c)),d.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),r=()=>this.destroyBean(d),t&&(o=()=>{d.activateFirstItem(),this.subMenuIsOpening=!1})}const l=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:this.eGui,ePopup:n}),a=this.localeService.getLocaleTextFunc(),u=this.popupService.addPopup({modal:!0,eChild:n,positionCallback:l,anchorToElement:this.eGui,ariaLabel:a("ariaLabelSubMenu","SubMenu"),afterGuiAttached:o});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{var d,c;u&&u.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),r(),(c=(d=this.menuItemComp).setExpanded)==null||c.call(d,!1),this.eSubMenuGui=void 0},(s=(i=this.menuItemComp).setExpanded)==null||s.call(i,!0)}setAriaExpanded(t){this.suppressAria||Us(this.eGui,t)}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(t){var i,s;this.cancelActivate(),!this.params.disabled&&(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),(s=(i=this.menuItemComp).setActive)==null||s.call(i,!0),this.suppressFocus||this.eGui.focus({preventScroll:!0}),t&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){var t,i;this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),(i=(t=this.menuItemComp).setActive)==null||i.call(t,!1),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(t){this.parentComponent=t}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(t){var i,s;(s=(i=this.menuItemComp).select)==null||s.call(i),this.params.action?this.getFrameworkOverrides().wrapOutgoing(()=>this.params.action(this.gos.addGridCommonParams(K({},this.contextParams)))):this.openSubMenu(t&&t.type==="keydown"),!(this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect)&&this.closeMenu(t)}closeMenu(t){const i={type:ro.EVENT_CLOSE_MENU};t&&(t instanceof MouseEvent?i.mouseEvent=t:i.keyboardEvent=t),this.dispatchEvent(i)}onItemActivated(){const t={type:ro.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(t)}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),ro.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),ro.ACTIVATION_DELAY):this.deactivate()}configureDefaults(t){var i,s,n;if(!this.menuItemComp){setTimeout(()=>this.configureDefaults(t));return}let r=this.menuItemComp.getGui();const o=(s=(i=this.menuItemComp).getRootElement)==null?void 0:s.call(i);o&&(t!=null&&t.suppressRootStyles||r.classList.add("ag-menu-option-custom"),r=o),this.eGui=r,this.suppressRootStyles=!!(t!=null&&t.suppressRootStyles),this.suppressRootStyles||(r.classList.add(this.cssClassPrefix),(n=this.params.cssClasses)==null||n.forEach(l=>r.classList.add(l)),this.params.disabled&&r.classList.add(`${this.cssClassPrefix}-disabled`)),t!=null&&t.suppressTooltip||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!(t!=null&&t.suppressAria),this.suppressAria||(Ue(r,"treeitem"),oT(r,this.level+1),this.params.disabled&&Hm(r,!0)),t!=null&&t.suppressTabIndex||r.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(r,t),this.suppressFocus=!!(t!=null&&t.suppressFocus)}refreshTooltip(t,i){this.tooltip=t,this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),!(!t||!this.menuItemComp)&&(this.tooltipFeature=this.createBean(new Xs({getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:i})))}destroy(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}};yl.EVENT_CLOSE_MENU="closeMenu";yl.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated";yl.ACTIVATION_DELAY=80;h([f("popupService")],yl.prototype,"popupService",2);h([f("userComponentFactory")],yl.prototype,"userComponentFactory",2);var td=yl,qr=class vf extends te{constructor(t){super(vf.getTemplate(t)),this.config=t,this.closable=!0}static getTemplate(t){const i=t.cssIdentifier||"default";return`<div class="ag-panel ag-${i}-panel" tabindex="-1">
|
|
321
|
+
<div ref="eTitleBar" class="ag-panel-title-bar ag-${i}-panel-title-bar ag-unselectable">
|
|
322
|
+
<span ref="eTitle" class="ag-panel-title-bar-title ag-${i}-panel-title-bar-title"></span>
|
|
323
|
+
<div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-${i}-panel-title-bar-buttons"></div>
|
|
324
|
+
</div>
|
|
325
|
+
<div ref="eContentWrapper" class="ag-panel-content-wrapper ag-${i}-panel-content-wrapper"></div>
|
|
326
|
+
</div>`}postConstruct(){const{component:t,closable:i,hideTitleBar:s,title:n,minWidth:r=250,width:o,minHeight:l=250,height:a,centered:u,popup:d,x:c,y:p}=this.config;this.positionableFeature=new al(this.getGui(),{minWidth:r,width:o,minHeight:l,height:a,centered:u,x:c,y:p,popup:d,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);const C=this.getGui();t&&this.setBodyComponent(t),s?ue(this.eTitleBar,!1):(n&&this.setTitle(n),this.setClosable(i??this.closable)),this.addManagedListener(this.eTitleBar,"mousedown",v=>{if(C.contains(v.relatedTarget)||C.contains(this.gos.getActiveDomElement())||this.eTitleBarButtons.contains(v.target)){v.preventDefault();return}const S=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");S&&S.focus()}),!(d&&this.positionableFeature.isPositioned())&&(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){const t=this.getGui();t.focus(),this.close=()=>{t.parentElement.removeChild(t),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(t){this.positionableFeature.setHeight(t)}getWidth(){return this.positionableFeature.getWidth()}setWidth(t){this.positionableFeature.setWidth(t)}setClosable(t){if(t!==this.closable&&(this.closable=t),t){const i=this.closeButtonComp=new te(vf.CLOSE_BTN_TEMPLATE);this.getContext().createBean(i);const s=i.getGui(),n=Ve("close",this.gos);n.classList.add("ag-panel-title-bar-button-icon"),s.appendChild(n),this.addTitleBarButton(i),i.addManagedListener(s,"click",this.onBtClose.bind(this))}else if(this.closeButtonComp){const i=this.closeButtonComp.getGui();i.parentElement.removeChild(i),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}setBodyComponent(t){t.setParentComponent(this),this.eContentWrapper.appendChild(t.getGui())}addTitleBarButton(t,i){const s=this.eTitleBarButtons,n=s.children,r=n.length;i==null&&(i=r),i=Math.max(0,Math.min(i,r)),t.addCssClass("ag-panel-title-bar-button");const o=t.getGui();i===0?s.insertAdjacentElement("afterbegin",o):i===r?s.insertAdjacentElement("beforeend",o):n[i-1].insertAdjacentElement("afterend",o),t.setParentComponent(this)}getBodyHeight(){return Cu(this.eContentWrapper)}getBodyWidth(){return Br(this.eContentWrapper)}setTitle(t){this.eTitle.innerText=t}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));const t=this.getGui();t&&di(t)&&this.close(),super.destroy()}};qr.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>';h([_("eContentWrapper")],qr.prototype,"eContentWrapper",2);h([_("eTitleBar")],qr.prototype,"eTitleBar",2);h([_("eTitleBarButtons")],qr.prototype,"eTitleBarButtons",2);h([_("eTitle")],qr.prototype,"eTitle",2);h([I],qr.prototype,"postConstruct",1);var rN=qr,oN=class extends rN{constructor(e){super(Ie(K({},e),{popup:!0})),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}postConstruct(){const e=this.getGui(),{movable:t,resizable:i,maximizable:s}=this.config;this.addCssClass("ag-dialog"),super.postConstruct(),this.addManagedListener(e,"focusin",n=>{this.popupService.bringPopupToFront(e)}),t&&this.setMovable(t),s&&this.setMaximizable(s),i&&this.setResizable(i)}renderComponent(){const e=this.getGui(),{alwaysOnTop:t,modal:i,title:s,afterGuiAttached:n}=this.config,r=this.localeService.getLocaleTextFunc(),o=this.popupService.addPopup({modal:i,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:t,ariaLabel:s||r("ariaLabelDialog","Dialog"),afterGuiAttached:n});o&&(this.close=o.hideFunc)}onClosed(e){var t,i;this.destroy(),(i=(t=this.config).closedCallback)==null||i.call(t,e)}toggleMaximize(){const e=this.positionableFeature.getPosition();if(this.isMaximized){const{x:t,y:i,width:s,height:n}=this.lastPosition;this.setWidth(s),this.setHeight(n),this.positionableFeature.offsetElement(t,i)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){ue(this.maximizeIcon,!this.isMaximized),ue(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEach(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(e){this.positionableFeature.setResizable(e)}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar)}setMaximizable(e){if(!e){this.clearMaximizebleListeners(),this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0);return}const t=this.eTitleBar;if(!t||e===this.isMaximizable)return;const i=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),i.addManagedListener(i.getGui(),"click",this.toggleMaximize.bind(this)),this.addTitleBarButton(i,0),this.maximizeListeners.push(this.addManagedListener(t,"dblclick",this.toggleMaximize.bind(this))),this.resizeListenerDestroy=this.addManagedListener(this,"resize",()=>{this.isMaximized=!1,this.refreshMaximizeIcon()})}buildMaximizeAndMinimizeElements(){const e=this.maximizeButtonComp=this.createBean(new te('<div class="ag-dialog-button"></span>')),t=e.getGui();return this.maximizeIcon=Ve("maximize",this.gos),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=Ve("minimize",this.gos),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}};h([f("popupService")],oN.prototype,"popupService",2);var lN=0,zs=class extends L{constructor(){super(...arguments),this.popupList=[]}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridCtrl=e.gridCtrl}),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,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 C=this.popupList[s];C.alignedToElement=t}const n=t.getBoundingClientRect(),r=this.getParentRect(),o=this.keepXYWithinBounds(i,n.top-r.top,0),l=i.clientWidth>0?i.clientWidth:200;i.style.minWidth=`${l}px`;const u=r.right-r.left-l;let d;this.gos.get("enableRtl")?(d=p(),d<0&&(d=c(),this.setAlignedStyles(i,"left")),d>u&&(d=0,this.setAlignedStyles(i,"right"))):(d=c(),d>u&&(d=p(),this.setAlignedStyles(i,"right")),d<0&&(d=0,this.setAlignedStyles(i,"left"))),i.style.left=`${d}px`,i.style.top=`${o}px`;function c(){return n.right-r.left-2}function p(){return n.left-r.left-l}}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:i,nudgeY:s,skipObserver:n}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:!0,skipObserver:n,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:n,eventSource:r,alignSide:o="left",position:l="over",column:a,rowNode:u,type:d}=e,c=r.getBoundingClientRect(),p=this.getParentRect(),C=this.getPopupIndex(t);if(C!==-1){const S=this.popupList[C];S.alignedToElement=r}const v=()=>{let S=c.left-p.left;o==="right"&&(S-=t.offsetWidth-c.width);let E;return l==="over"?(E=c.top-p.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,c,p,e.nudgeY||0)==="under"?E=c.top-p.top+c.height:E=c.top-t.offsetHeight-(s||0)*2-p.top),{x:S,y:E}};this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:n,updatePosition:v,postProcessCallback:()=>this.callPostProcessPopup(d,t,r,null,a,u)})}shouldRenderUnderOrAbove(e,t,i,s){const n=i.bottom-t.bottom,r=t.top-i.top,o=e.offsetHeight+s;return n>o?"under":r>o||r>n?"above":"under"}setAlignedStyles(e,t){const i=this.getPopupIndex(e);if(i===-1)return;const s=this.popupList[i],{alignedToElement:n}=s;!n||(["right","left","over","above","under"].forEach(o=>{n.classList.remove(`ag-has-popup-positioned-${o}`),e.classList.remove(`ag-popup-positioned-${o}`)}),!t)||(n.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}callPostProcessPopup(e,t,i,s,n,r){const o=this.gos.getCallback("postProcessPopup");o&&o({column:n,rowNode:r,ePopup:t,type:e,eventSource:i,mouseEvent:s})}positionPopup(e){const{ePopup:t,keepWithinBounds:i,nudgeX:s,nudgeY:n,skipObserver:r,updatePosition:o}=e,l={width:0,height:0},a=(u=!1)=>{let{x:d,y:c}=o();u&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,s&&(d+=s),n&&(c+=n),i&&(d=this.keepXYWithinBounds(t,d,1),c=this.keepXYWithinBounds(t,c,0)),t.style.left=`${d}px`,t.style.top=`${c}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!r){const u=this.resizeObserverService.observeResize(t,()=>a(!0));setTimeout(()=>u(),zs.WAIT_FOR_POPUP_CONTENT_RESIZE)}}getActivePopups(){return this.popupList.map(e=>e.element)}getPopupList(){return this.popupList}getParentRect(){const e=this.gos.getDocument();let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),eC(t)}keepXYWithinBounds(e,t,i){const s=i===0,n=s?"clientHeight":"clientWidth",r=s?"top":"left",o=s?"offsetHeight":"offsetWidth",l=s?"scrollTop":"scrollLeft",a=this.gos.getDocument(),u=a.documentElement,d=this.getPopupParent(),c=d.getBoundingClientRect(),p=a.documentElement.getBoundingClientRect(),C=d===a.body,v=e[o];let E=C?(s?Jm:Ga)(u)+u[l]:d[n];C&&(E-=Math.abs(p[r]-c[r]));const w=E-v;return Math.min(Math.max(t,0),Math.abs(w))}addPopup(e){const t=this.gos.getDocument(),{eChild:i,ariaLabel:s,alwaysOnTop:n,positionCallback:r,anchorToElement:o}=e;if(!t)return console.warn("AG Grid: 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,!!n),u=this.addEventListenersToPopup(Ie(K({},e),{wrapperEl:a}));return r&&r(),this.addPopupToPopupList(i,a,u,o),{hideFunc:u}}initialisePopupPosition(e){const i=this.getPopupParent().getBoundingClientRect();A(e.style.top)||(e.style.top=`${i.top*-1}px`),A(e.style.left)||(e.style.left=`${i.left*-1}px`)}createPopupWrapper(e,t,i){const s=this.getPopupParent(),n=document.createElement("div"),{allThemes:r}=this.environment.getTheme();return r.length&&n.classList.add(...r),n.classList.add("ag-popup"),e.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Ue(e,"dialog"),Di(e,t),n.appendChild(e),s.appendChild(n),i?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),n}handleThemeChange(){const{allThemes:e}=this.environment.getTheme();for(const t of this.popupList){for(const i of Array.from(t.wrapper.classList))i.startsWith("ag-theme-")&&t.wrapper.classList.remove(i);e.length&&t.wrapper.classList.add(...e)}}addEventListenersToPopup(e){const t=this.gos.getDocument(),i=this.getPopupParent(),{wrapperEl:s,eChild:n,closedCallback:r,afterGuiAttached:o,closeOnEsc:l,modal:a}=e;let u=!1;const d=v=>{if(!s.contains(this.gos.getActiveDomElement()))return;v.key===D.ESCAPE&&!rs(v)&&C({keyboardEvent:v})},c=v=>C({mouseEvent:v}),p=v=>C({touchEvent:v}),C=(v={})=>{const{mouseEvent:S,touchEvent:E,keyboardEvent:w,forceHide:m}=v;!m&&(this.isEventFromCurrentPopup({mouseEvent:S,touchEvent:E},n)||u)||(u=!0,i.removeChild(s),t.removeEventListener("keydown",d),t.removeEventListener("mousedown",c),t.removeEventListener("touchstart",p),t.removeEventListener("contextmenu",c),this.eventService.removeEventListener(g.EVENT_DRAG_STARTED,c),r&&r(S||E||w),this.removePopupFromPopupList(n))};return o&&o({hidePopup:C}),window.setTimeout(()=>{l&&t.addEventListener("keydown",d),a&&(t.addEventListener("mousedown",c),this.eventService.addEventListener(g.EVENT_DRAG_STARTED,c),t.addEventListener("touchstart",p),t.addEventListener("contextmenu",c))},0),C}addPopupToPopupList(e,t,i,s){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:lN++,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(r=>r&&r()),s.stopAnchoringPromise=void 0,s.isAnchored=!1,!t)return;const n=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:s.hideFunc});return s.stopAnchoringPromise=n,s.isAnchored=!0,n}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:n}=e,r=s.getBoundingClientRect(),o=i.top-r.top,l=i.left-r.left;let a=o,u=l;const d=n.style.top,c=parseInt(d.substring(0,d.length-1),10),p=n.style.left,C=parseInt(p.substring(0,p.length-1),10);return new it(v=>{this.getFrameworkOverrides().setInterval(()=>{const S=t.getBoundingClientRect(),E=s.getBoundingClientRect();if(E.top==0&&E.left==0&&E.height==0&&E.width==0){e.hidePopup();return}const m=S.top-E.top;if(m!=a){const T=this.keepXYWithinBounds(n,c+o-m,0);n.style.top=`${T}px`}a=m;const R=S.left-E.left;if(R!=u){const T=this.keepXYWithinBounds(n,C+l-R,1);n.style.left=`${T}px`}u=R},200).then(S=>{v(()=>{S!=null&&window.clearInterval(S)})})})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:i,touchEvent:s}=e,n=i||s;if(!n)return!1;const r=this.getPopupIndex(t);if(r===-1)return!1;for(let o=r;o<this.popupList.length;o++){const l=this.popupList[o];if(fc(l.element,n))return!0}return this.isElementWithinCustomPopup(n.target)}isElementWithinCustomPopup(e){const t=this.gos.getDocument();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,n=Array.prototype.slice.call(t.querySelectorAll(".ag-popup.ag-always-on-top")),r=n.length,o=this.getWrapper(e);if(!o||s<=1||!t.contains(e))return;const l=i.indexOf(o),a=o.querySelectorAll("div"),u=[];for(a.forEach(d=>{d.scrollTop!==0&&u.push([d,d.scrollTop])}),r?o.classList.contains("ag-always-on-top")?l!==s-1&&pe(n).insertAdjacentElement("afterend",o):l!==s-r-1&&n[0].insertAdjacentElement("beforebegin",o):l!==s-1&&pe(i).insertAdjacentElement("afterend",o);u.length;){const d=u.pop();d[0].scrollTop=d[1]}}};zs.WAIT_FOR_POPUP_CONTENT_RESIZE=200;h([f("focusService")],zs.prototype,"focusService",2);h([f("ctrlsService")],zs.prototype,"ctrlsService",2);h([f("resizeObserverService")],zs.prototype,"resizeObserverService",2);h([I],zs.prototype,"postConstruct",1);zs=h([B("popupService")],zs);var aN=class extends te{constructor(){super(`
|
|
327
|
+
<div class="ag-autocomplete-row" role="presentation">
|
|
328
|
+
<div class="ag-autocomplete-row-label"></div>
|
|
329
|
+
</div>`),this.hasHighlighting=!1}setState(e,t){this.value=e,this.render(),this.updateSelected(t)}updateSelected(e){this.addOrRemoveCssClass("ag-autocomplete-row-selected",e)}setSearchString(e){var t;let i=!1;if(A(e)){const s=(t=this.value)==null?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(s>=0){i=!0,this.hasHighlighting=!0;const n=s+e.length,r=tt(this.value.slice(0,s)),o=tt(this.value.slice(s,n)),l=tt(this.value.slice(n));this.getGui().lastElementChild.innerHTML=`${r}<b>${o}</b>${l}`}}!i&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())}render(){var e;this.getGui().lastElementChild.innerHTML=(e=tt(this.value))!=null?e:" "}},Hh=class XD extends zr{constructor(t){super(XD.TEMPLATE),this.params=t,this.searchString=""}destroy(){super.destroy()}init(){this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new YD({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.autocompleteEntries.length,getRow:i=>this.autocompleteEntries[i]});const t=this.virtualList.getGui();this.addManagedListener(t,"click",()=>this.params.onConfirmed()),this.addManagedListener(t,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(t,"mousedown",i=>i.preventDefault()),this.setSelectedValue(0)}onNavigationKeyDown(t,i){t.preventDefault();const s=this.autocompleteEntries.indexOf(this.selectedValue),n=i===D.UP?s-1:s+1;this.checkSetSelectedValue(n)}setSearch(t){this.searchString=t,A(t)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()}runContainsSearch(t,i){let s,n=!1;const r=t.toLocaleLowerCase(),o=i.filter(l=>{const u=l.toLocaleLowerCase().indexOf(r),d=u===0,c=u>=0;return c&&(!s||!n&&d||n===d&&l.length<s.length)&&(s=l,n=d),c});return!s&&o.length&&(s=o[0]),{topMatch:s,allMatches:o}}runSearch(){var t,i;const{autocompleteEntries:s}=this.params,n=s.map(u=>{var d;return(d=u.displayValue)!=null?d:u.key});let r,o;if(this.params.useFuzzySearch)r=yu(this.searchString,n,!0).values,o=r.length?r[0]:void 0;else{const u=this.runContainsSearch(this.searchString,n);r=u.allMatches,o=u.topMatch}let l=s.filter(({key:u,displayValue:d})=>r.includes(d??u));if(!l.length&&this.selectedValue&&((i=(t=this.params)==null?void 0:t.forceLastSelection)!=null&&i.call(t,this.selectedValue,this.searchString))&&(l=[this.selectedValue]),this.autocompleteEntries=l,this.virtualList.refresh(),!o)return;const a=r.indexOf(o);this.checkSetSelectedValue(a)}updateSearchInList(){this.virtualList.forEachRenderedRow(t=>t.setSearchString(this.searchString))}checkSetSelectedValue(t){t>=0&&t<this.autocompleteEntries.length&&this.setSelectedValue(t)}setSelectedValue(t){const i=this.autocompleteEntries[t];this.selectedValue!==i&&(this.selectedValue=i,this.virtualList.ensureIndexVisible(t),this.virtualList.forEachRenderedRow((s,n)=>{s.updateSelected(t===n)}))}createRowComponent(t){var i;const s=new aN;return this.getContext().createBean(s),s.setState((i=t.displayValue)!=null?i:t.key,t===this.selectedValue),s}onMouseMove(t){const i=this.virtualList.getGui().getBoundingClientRect(),s=this.virtualList.getScrollTop(),n=t.clientY-i.top+s,r=Math.floor(n/this.virtualList.getRowHeight());this.checkSetSelectedValue(r)}afterGuiAttached(){this.virtualList.refresh()}getSelectedValue(){var t;return this.autocompleteEntries.length&&(t=this.selectedValue)!=null?t:null}};Hh.TEMPLATE=`<div class="ag-autocomplete-list-popup">
|
|
330
|
+
<div ref="eList" class="ag-autocomplete-list"></div>
|
|
331
|
+
<div>`;h([_("eList")],Hh.prototype,"eList",2);h([I],Hh.prototype,"init",1);var uN=Hh,Kn=class $l extends te{constructor(){super(`
|
|
332
|
+
<div class="ag-autocomplete" role="presentation">
|
|
333
|
+
<ag-input-text-field ref="eAutocompleteInput"></ag-input-text-field>
|
|
334
|
+
</div>`),this.isListOpen=!1,this.lastPosition=0,this.valid=!0}postConstruct(){this.eAutocompleteInput.onValueChange(t=>this.onValueChanged(t)),this.eAutocompleteInput.getInputElement().setAttribute("autocomplete","off"),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.addGuiEventListener("click",this.updatePositionAndList.bind(this)),this.addDestroyFunc(()=>{this.destroyBean(this.autocompleteList)}),this.addGuiEventListener("focusout",()=>this.onFocusOut())}onValueChanged(t){const i=Es(t);this.updateValue(i),this.updateAutocompleteList(i)}updateValue(t){this.updateLastPosition(),this.dispatchEvent({type:$l.EVENT_VALUE_CHANGED,value:t}),this.validate(t)}updateAutocompleteList(t){var i,s,n,r;const o=(s=(i=this.listGenerator)==null?void 0:i.call(this,t,this.lastPosition))!=null?s:{enabled:!1};if((!o.type||o.type!==((n=this.autocompleteListParams)==null?void 0:n.type))&&this.isListOpen&&this.closeList(),this.autocompleteListParams=o,(r=this.autocompleteListParams)!=null&&r.enabled){this.isListOpen||this.openList();const{searchString:l}=this.autocompleteListParams;this.autocompleteList.setSearch(l??"")}else this.isListOpen&&this.closeList()}onKeyDown(t){const i=t.key;switch(this.updateLastPosition(),i){case D.ENTER:this.onEnterKeyDown(t);break;case D.TAB:this.onTabKeyDown(t);break;case D.DOWN:case D.UP:this.onUpDownKeyDown(t,i);break;case D.LEFT:case D.RIGHT:case D.PAGE_HOME:case D.PAGE_END:setTimeout(()=>{this.updatePositionAndList()});break;case D.ESCAPE:this.onEscapeKeyDown(t);break;case D.SPACE:t.ctrlKey&&!this.isListOpen&&(t.preventDefault(),this.forceOpenList());break}}confirmSelection(){var t;const i=(t=this.autocompleteList)==null?void 0:t.getSelectedValue();i&&(this.closeList(),this.dispatchEvent({type:$l.EVENT_OPTION_SELECTED,value:this.getValue(),position:this.lastPosition,updateEntry:i,autocompleteType:this.autocompleteListParams.type}))}onTabKeyDown(t){this.isListOpen&&(t.preventDefault(),t.stopPropagation(),this.confirmSelection())}onEnterKeyDown(t){t.preventDefault(),this.isListOpen?this.confirmSelection():this.onCompleted()}onUpDownKeyDown(t,i){var s;t.preventDefault(),this.isListOpen?(s=this.autocompleteList)==null||s.onNavigationKeyDown(t,i):this.forceOpenList()}onEscapeKeyDown(t){this.isListOpen&&(t.preventDefault(),t.stopPropagation(),this.closeList(),this.setCaret(this.lastPosition,!0))}onFocusOut(){this.isListOpen&&this.closeList()}updatePositionAndList(){var t;this.updateLastPosition(),this.updateAutocompleteList((t=this.eAutocompleteInput.getValue())!=null?t:null)}setCaret(t,i){const s=this.gos.getDocument(),n=this.gos.getActiveDomElement();i&&(!n||n===s.body)&&this.eAutocompleteInput.getFocusableElement().focus();const r=this.eAutocompleteInput.getInputElement();r.setSelectionRange(t,t),t===r.value.length&&(r.scrollLeft=r.scrollWidth)}forceOpenList(){this.onValueChanged(this.eAutocompleteInput.getValue())}updateLastPosition(){var t;this.lastPosition=(t=this.eAutocompleteInput.getInputElement().selectionStart)!=null?t:0}validate(t){var i;this.validator&&(this.validationMessage=this.validator(t),this.eAutocompleteInput.getInputElement().setCustomValidity((i=this.validationMessage)!=null?i:""),this.valid=!this.validationMessage,this.dispatchEvent({type:$l.EVENT_VALID_CHANGED,isValid:this.valid,validationMessage:this.validationMessage}))}openList(){this.isListOpen=!0,this.autocompleteList=this.createBean(new uN({autocompleteEntries:this.autocompleteListParams.entries,onConfirmed:()=>this.confirmSelection(),forceLastSelection:this.forceLastSelection}));const t=this.autocompleteList.getGui(),i={ePopup:t,type:"autocomplete",eventSource:this.getGui(),position:"under",alignSide:this.gos.get("enableRtl")?"right":"left",keepWithinBounds:!0},s=this.popupService.addPopup({eChild:t,anchorToElement:this.getGui(),positionCallback:()=>this.popupService.positionPopupByComponent(i),ariaLabel:this.listAriaLabel});this.hidePopup=s.hideFunc,this.autocompleteList.afterGuiAttached()}closeList(){this.isListOpen=!1,this.hidePopup(),this.destroyBean(this.autocompleteList),this.autocompleteList=null}onCompleted(){this.isListOpen&&this.closeList(),this.dispatchEvent({type:$l.EVENT_VALUE_CONFIRMED,value:this.getValue(),isValid:this.isValid()})}getValue(){return Es(this.eAutocompleteInput.getValue())}setInputPlaceholder(t){return this.eAutocompleteInput.setInputPlaceholder(t),this}setInputAriaLabel(t){return this.eAutocompleteInput.setInputAriaLabel(t),this}setListAriaLabel(t){return this.listAriaLabel=t,this}setListGenerator(t){return this.listGenerator=t,this}setValidator(t){return this.validator=t,this}isValid(){return this.valid}setValue(t){const{value:i,position:s,silent:n,updateListOnlyIfOpen:r,restoreFocus:o}=t;this.eAutocompleteInput.setValue(i,!0),this.setCaret(s??this.lastPosition,o),n||this.updateValue(i),(!r||this.isListOpen)&&this.updateAutocompleteList(i)}setForceLastSelection(t){return this.forceLastSelection=t,this}setInputDisabled(t){return this.eAutocompleteInput.setDisabled(t),this}};Kn.EVENT_VALUE_CHANGED="eventValueChanged";Kn.EVENT_VALUE_CONFIRMED="eventValueConfirmed";Kn.EVENT_OPTION_SELECTED="eventOptionSelected";Kn.EVENT_VALID_CHANGED="eventValidChanged";h([f("popupService")],Kn.prototype,"popupService",2);h([_("eAutocompleteInput")],Kn.prototype,"eAutocompleteInput",2);h([I],Kn.prototype,"postConstruct",1);var dN=Kn,Yn=class Dd extends te{constructor(t,i,s,n){super(),this.dragSourceDropTarget=t,this.ghost=i,this.horizontal=s,this.template=n}init(){var t;this.setTemplate((t=this.template)!=null?t:Dd.TEMPLATE);const i=this.getGui();this.addElementClasses(i),this.addElementClasses(this.eDragHandle,"drag-handle"),this.addElementClasses(this.eText,"text"),this.addElementClasses(this.eButton,"button"),this.eDragHandle.appendChild(Ve("columnDrag",this.gos)),this.eButton.appendChild(Ve("cancel",this.gos)),this.setupComponents(),!this.ghost&&this.isDraggable()&&this.addDragSource(),this.setupAria(),this.setupTooltip(),this.activateTabIndex(),this.refreshDraggable()}isDraggable(){return!0}refreshDraggable(){this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!this.isDraggable())}setupAria(){const t=this.localeService.getLocaleTextFunc(),i=[this.getAriaDisplayName()];this.addAdditionalAriaInstructions(i,t),Di(this.getGui(),i.join(". "))}addAdditionalAriaInstructions(t,i){if(this.isRemovable()){const s=i("ariaDropZoneColumnComponentDescription","Press DELETE to remove");t.push(s)}}setupTooltip(){const t=()=>{const i=this.getTooltip();this.setTooltip({newTooltipText:i})};t(),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,t)}getDragSourceId(){}getDefaultIconName(){return ie.ICON_NOT_ALLOWED}addDragSource(){const{dragAndDropService:t,eDragHandle:i}=this,s=this.createGetDragItem(),n=this.getDefaultIconName(),r={type:this.getDragSourceType(),sourceId:this.getDragSourceId(),eElement:i,getDefaultIconName:()=>n,getDragItem:s,dragItemName:this.getDisplayName()};t.addDragSource(r,!0),this.addDestroyFunc(()=>t.removeDragSource(r))}setupComponents(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost")}isRemovable(){return!0}refreshRemove(){ue(this.eButton,this.isRemovable())}setupRemove(){this.refreshRemove();const t={type:Dd.EVENT_COLUMN_REMOVE};this.addGuiEventListener("keydown",s=>this.onKeyDown(s)),this.addManagedListener(this.eButton,"click",s=>{this.dispatchEvent(t),s.stopPropagation()});const i=new Ct(this.eButton);this.addManagedListener(i,Ct.EVENT_TAP,()=>{this.dispatchEvent(t)}),this.addDestroyFunc(i.destroy.bind(i))}onKeyDown(t){t.key===D.DELETE&&this.isRemovable()&&(t.preventDefault(),this.dispatchEvent({type:Dd.EVENT_COLUMN_REMOVE}))}getDisplayValue(){return this.getDisplayName()}setTextValue(){const t=this.getDisplayValue(),i=tt(t);this.eText.innerHTML=i}addElementClasses(t,i){i=i?`-${i}`:"";const s=this.horizontal?"horizontal":"vertical";t.classList.add(`ag-column-drop-cell${i}`,`ag-column-drop-${s}-cell${i}`)}destroy(){super.destroy(),this.dragSourceDropTarget=null}};Yn.EVENT_COLUMN_REMOVE="columnRemove";Yn.TEMPLATE=`<span role="option">
|
|
335
|
+
<span ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>
|
|
336
|
+
<span ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>
|
|
337
|
+
<span ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>
|
|
338
|
+
</span>`;h([f("dragAndDropService")],Yn.prototype,"dragAndDropService",2);h([_("eText")],Yn.prototype,"eText",2);h([_("eDragHandle")],Yn.prototype,"eDragHandle",2);h([_("eButton")],Yn.prototype,"eButton",2);h([I],Yn.prototype,"init",1);var cN=Yn,Lu=class ps extends te{constructor(t){super('<div class="ag-unselectable" role="presentation"></div>'),this.horizontal=t,this.state=ps.STATE_NOT_DRAGGING,this.guiDestroyFunctions=[],this.childPillComponents=[],this.resizeEnabled=!1,this.addElementClasses(this.getGui()),this.ePillDropList=document.createElement("div"),this.addElementClasses(this.ePillDropList,"list"),Ue(this.ePillDropList,"listbox")}isHorizontal(){return this.horizontal}toggleResizable(t){this.positionableFeature.setResizable(t?{bottom:!0}:!1),this.resizeEnabled=t}isSourceEventFromTarget(t){const{dropZoneTarget:i,dragSource:s}=t;return i.contains(s.eElement)}destroy(){this.destroyGui(),super.destroy()}destroyGui(){this.guiDestroyFunctions.forEach(t=>t()),this.guiDestroyFunctions.length=0,this.childPillComponents.length=0,Xe(this.getGui()),Xe(this.ePillDropList)}init(t){this.params=t??{},this.createManagedBean(new Un(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.setupDropTarget(),this.positionableFeature=new al(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature),this.refreshGui(),Di(this.ePillDropList,this.getAriaLabel())}handleKeyDown(t){const i=!this.horizontal;let s=t.key===D.DOWN,n=t.key===D.UP;if(!i){const o=this.gos.get("enableRtl");s=!o&&t.key===D.RIGHT||o&&t.key===D.LEFT,n=!o&&t.key===D.LEFT||o&&t.key===D.RIGHT}if(!s&&!n)return;const r=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,n);r&&(t.preventDefault(),r.focus())}addElementClasses(t,i){i=i?`-${i}`:"";const s=this.horizontal?"horizontal":"vertical";t.classList.add(`ag-column-drop${i}`,`ag-column-drop-${s}${i}`)}setupDropTarget(){this.dropTarget={getContainer:this.getGui.bind(this),getIconName:this.getIconName.bind(this),onDragging:this.onDragging.bind(this),onDragEnter:this.onDragEnter.bind(this),onDragLeave:this.onDragLeave.bind(this),onDragStop:this.onDragStop.bind(this),isInterestedIn:this.isInterestedIn.bind(this)},this.dragAndDropService.addDropTarget(this.dropTarget)}minimumAllowedNewInsertIndex(){return 0}checkInsertIndex(t){const i=this.getNewInsertIndex(t);if(i<0)return!1;const s=this.minimumAllowedNewInsertIndex(),n=Math.max(s,i),r=n!==this.insertIndex;return r&&(this.insertIndex=n),r}getNewInsertIndex(t){const i=t.event,s=this.horizontal?i.clientX:i.clientY,n=this.childPillComponents.map(o=>o.getGui().getBoundingClientRect()),r=n.findIndex(o=>this.horizontal?o.right>s&&o.left<s:o.top<s&&o.bottom>s);if(r===-1){const o=this.gos.get("enableRtl");return n.every(u=>s>(this.horizontal?u.right:u.bottom))?o&&this.horizontal?0:this.childPillComponents.length:n.every(u=>s<(this.horizontal?u.left:u.top))?o&&this.horizontal?this.childPillComponents.length:0:this.insertIndex}return this.insertIndex<=r?r+1:r}checkDragStartedBySelf(t){this.state===ps.STATE_NOT_DRAGGING&&(this.state=ps.STATE_REARRANGE_ITEMS,this.potentialDndItems=this.getItems(t.dragSource.getDragItem()),this.refreshGui(),this.checkInsertIndex(t),this.refreshGui())}onDragging(t){this.checkDragStartedBySelf(t),this.checkInsertIndex(t)&&this.refreshGui()}handleDragEnterEnd(t){}onDragEnter(t){const i=this.getItems(t.dragSource.getDragItem());this.state=ps.STATE_NEW_ITEMS_IN;const s=i.filter(r=>this.isItemDroppable(r,t)),n=s.every(r=>this.childPillComponents.map(o=>o.getItem()).indexOf(r)!==-1);if(s.length!==0){if(this.potentialDndItems=s,n){this.state=ps.STATE_NOT_DRAGGING;return}this.handleDragEnterEnd(t),this.checkInsertIndex(t),this.refreshGui()}}isPotentialDndItems(){return kR(this.potentialDndItems)}handleDragLeaveEnd(t){}onDragLeave(t){if(this.state===ps.STATE_REARRANGE_ITEMS){const i=this.getItems(t.dragSource.getDragItem());this.removeItems(i)}this.isPotentialDndItems()&&(this.handleDragLeaveEnd(t),this.potentialDndItems=[],this.refreshGui()),this.state=ps.STATE_NOT_DRAGGING}refreshOnDragStop(){return!0}onDragStop(){if(this.isPotentialDndItems()){let t=!1;this.state===ps.STATE_NEW_ITEMS_IN?(this.addItems(this.potentialDndItems),t=!0):t=this.rearrangeItems(this.potentialDndItems),this.potentialDndItems=[],(this.refreshOnDragStop()||!t)&&this.refreshGui()}this.state=ps.STATE_NOT_DRAGGING}removeItems(t){const i=this.getExistingItems().filter(s=>!Ri(t,s));this.updateItems(i)}addItems(t){if(!t)return;const i=this.getExistingItems().slice(),s=t.filter(n=>i.indexOf(n)<0);Jg(i,s,this.insertIndex),this.updateItems(i)}addItem(t){this.insertIndex=this.getExistingItems().length,this.addItems([t]),this.refreshGui()}rearrangeItems(t){const i=this.getNonGhostItems().slice();return Jg(i,t,this.insertIndex),ys(i,this.getExistingItems())?!1:(this.updateItems(i),!0)}refreshGui(){const t=this.ePillDropList.scrollTop,i=this.resizeEnabled,s=this.getFocusedItem();let n=this.focusService.findNextFocusableElement();n||(n=this.focusService.findNextFocusableElement(void 0,!1,!0)),this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addItemsToGui(),this.isHorizontal()||(this.ePillDropList.scrollTop=t),i&&this.toggleResizable(i),this.focusService.isKeyboardMode()&&this.restoreFocus(s,n)}getFocusedItem(){const t=this.getGui(),i=this.gos.getActiveDomElement();return t.contains(i)?Array.from(t.querySelectorAll(".ag-column-drop-cell")).indexOf(i):-1}restoreFocus(t,i){const s=this.getGui(),n=Array.from(s.querySelectorAll(".ag-column-drop-cell"));if(t===-1)return;n.length===0&&i.focus();const r=Math.min(n.length-1,t),o=n[r];o&&o.focus()}focusList(t){const i=t?this.childPillComponents.length-1:0;this.restoreFocus(i,this.getFocusableElement())}getNonGhostItems(){const t=this.getExistingItems();return this.isPotentialDndItems()?t.filter(i=>!Ri(this.potentialDndItems,i)):t}addItemsToGui(){const i=this.getNonGhostItems().map(s=>this.createItemComponent(s,!1));if(this.isPotentialDndItems()){const s=this.potentialDndItems.map(n=>this.createItemComponent(n,!0));this.insertIndex>=i.length?i.push(...s):i.splice(this.insertIndex,0,...s)}this.appendChild(this.ePillDropList),i.forEach((s,n)=>{n>0&&this.addArrow(this.ePillDropList),this.ePillDropList.appendChild(s.getGui())}),this.addAriaLabelsToComponents()}addAriaLabelsToComponents(){this.childPillComponents.forEach((t,i)=>{const s=t.getGui();gh(s,i+1),ph(s,this.childPillComponents.length)})}createItemComponent(t,i){const s=this.createPillComponent(t,this.dropTarget,i,this.horizontal);return s.addEventListener(cN.EVENT_COLUMN_REMOVE,this.removeItems.bind(this,[t])),this.context.createBean(s),this.guiDestroyFunctions.push(()=>this.destroyBean(s)),i||this.childPillComponents.push(s),s}addIconAndTitleToGui(){const{title:t,icon:i}=this.params;if(!t||!i)return;const s=document.createElement("div");if(mu(s,!0),this.addElementClasses(s,"title-bar"),this.addElementClasses(i,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingItemsEmpty()),s.appendChild(i),!this.horizontal){const n=document.createElement("span");this.addElementClasses(n,"title"),n.innerHTML=t,s.appendChild(n)}this.appendChild(s)}isExistingItemsEmpty(){return this.getExistingItems().length===0}addEmptyMessageToGui(){const{emptyMessage:t}=this.params;if(!t||!this.isExistingItemsEmpty()||this.isPotentialDndItems())return;const i=document.createElement("span");i.innerHTML=t,this.addElementClasses(i,"empty-message"),this.ePillDropList.appendChild(i)}addArrow(t){if(this.horizontal){const i=this.gos.get("enableRtl"),s=Ve(i?"smallLeft":"smallRight",this.gos);this.addElementClasses(s,"cell-separator"),t.appendChild(s)}}};Lu.STATE_NOT_DRAGGING="notDragging";Lu.STATE_NEW_ITEMS_IN="newItemsIn";Lu.STATE_REARRANGE_ITEMS="rearrangeItems";h([f("focusService")],Lu.prototype,"focusService",2);h([f("dragAndDropService")],Lu.prototype,"dragAndDropService",2);var hN=["touchstart","touchend","touchmove","touchcancel"],ZD=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t()}setInterval(e,t){return new it(i=>{i(window.setInterval(e,t))})}addEventListener(e,t,i,s){const n=Ri(hN,t);e.addEventListener(t,i,{capture:!!s,passive:n})}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}`:""}`}},Nn=class extends L{getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const i=e===D.UP,s=e===D.DOWN,n=e===D.LEFT;let r,o;if(i||s)o=i?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow(),r=t.column;else{const l=this.columnModel.getAllDisplayedColumns(),a=this.gos.get("enableRtl");o=t.rowIndex,r=n!==a?l[0]:pe(l)}return{rowIndex:o,rowPinned:null,column:r}}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,s=!1;for(;!s;){switch(e){case D.UP:i=this.getCellAbove(i);break;case D.DOWN:i=this.getCellBelow(i);break;case D.RIGHT:this.gos.get("enableRtl")?i=this.getCellToLeft(i):i=this.getCellToRight(i);break;case D.LEFT:this.gos.get("enableRtl")?i=this.getCellToRight(i):i=this.getCellToLeft(i);break;default:i=null,console.warn("AG Grid: 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.columnModel.getDisplayedColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.columnModel.getDisplayedColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getRowBelow(e){const t=e.rowIndex,i=e.rowPinned;if(this.isLastRowInContainer(e))switch(i){case"bottom":return null;case"top":return this.rowModel.isRowsToRender()?{rowIndex:this.paginationProxy.getPageFirstRow(),rowPinned:null}:this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;default:return this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null}const s=this.rowModel.getRow(e.rowIndex),n=this.getNextStickyPosition(s);return n||{rowIndex:t+1,rowPinned:i}}getNextStickyPosition(e,t){if(!this.gos.isGroupRowsSticky()||!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 n=t?-1:1,r=s.findIndex(l=>l.getRowNode().rowIndex===e.rowIndex),o=s[r+n];if(o)return{rowIndex:o.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.getPinnedTopRowData().length-1<=i:t==="bottom"?this.pinnedRowModel.getPinnedBottomRowData().length-1<=i:this.paginationProxy.getPageLastRow()<=i}getRowAbove(e){const t=e.rowIndex,i=e.rowPinned;if(i?t===0:t===this.paginationProxy.getPageFirstRow())return i==="top"?null:i?this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null:this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;const n=this.rowModel.getRow(e.rowIndex),r=this.getNextStickyPosition(n,!0);return r||{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.paginationProxy.getPageLastRow(),rowPinned:null}}getLastFloatingTopRow(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowData().length-1,rowPinned:"top"}}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const t=this.columnModel.getAllDisplayedColumns();let i=e.rowIndex,s=e.rowPinned,n=this.columnModel.getDisplayedColAfter(e.column);if(!n){n=t[0];const r=this.getRowBelow(e);if(J(r)||!r.rowPinned&&!this.paginationProxy.isRowInPage(r))return null;i=r?r.rowIndex:null,s=r?r.rowPinned:null}return{rowIndex:i,column:n,rowPinned:s}}getNextTabbedCellBackwards(e){const t=this.columnModel.getAllDisplayedColumns();let i=e.rowIndex,s=e.rowPinned,n=this.columnModel.getDisplayedColBefore(e.column);if(!n){n=pe(t);const r=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(J(r)||!r.rowPinned&&!this.paginationProxy.isRowInPage(r))return null;i=r?r.rowIndex:null,s=r?r.rowPinned:null}return{rowIndex:i,column:n,rowPinned:s}}};h([f("columnModel")],Nn.prototype,"columnModel",2);h([f("rowModel")],Nn.prototype,"rowModel",2);h([f("rowRenderer")],Nn.prototype,"rowRenderer",2);h([f("pinnedRowModel")],Nn.prototype,"pinnedRowModel",2);h([f("paginationProxy")],Nn.prototype,"paginationProxy",2);Nn=h([B("cellNavigationService")],Nn);var Mr=class extends L{constructor(){super(...arguments),this.consuming=!1}setBeans(e){this.logger=e.create("AlignedGridsService")}getAlignedGridApis(){var e;let t=(e=this.gos.get("alignedGrids"))!=null?e:[];const i=typeof t=="function";typeof t=="function"&&(t=t());const s=()=>`See ${this.getFrameworkOverrides().getDocLink("aligned-grids")}`;return t.map(r=>{var o;if(!r){dr("alignedGrids contains an undefined option."),i||dr(`You may want to configure via a callback to avoid setup race conditions:
|
|
339
|
+
"alignedGrids: () => [linkedGrid]"`),dr(s());return}if(r instanceof le)return r;const l=r;return"current"in l?(o=l.current)==null?void 0:o.api:(l.api||dr(`alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ${s()}`),l.api)}).filter(r=>!!r&&!r.isDestroyed())}init(){this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{if(t.isDestroyed())return;const i=t.__getAlignedGridService();e(i)})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent(t=>{t.onColumnEvent(e)})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent(t=>{t.onScrollEvent(e)})}onScrollEvent(e){this.onEvent(()=>{this.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}getMasterColumns(e){const t=[];return e.columns?e.columns.forEach(i=>{t.push(i)}):e.column&&t.push(e.column),t}getColumnIds(e){const t=[];return e.columns?e.columns.forEach(i=>{t.push(i.getColId())}):e.column&&t.push(e.column.getColId()),t}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case g.EVENT_COLUMN_MOVED:case g.EVENT_COLUMN_VISIBLE:case g.EVENT_COLUMN_PINNED:case g.EVENT_COLUMN_RESIZED:const t=e;this.processColumnEvent(t);break;case g.EVENT_COLUMN_GROUP_OPENED:const i=e;this.processGroupOpenedEvent(i);break;case g.EVENT_COLUMN_PIVOT_CHANGED:console.warn("AG Grid: pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.");break}})}processGroupOpenedEvent(e){e.columnGroups.forEach(t=>{let i=null;if(t){const s=t.getGroupId();i=this.columnModel.getProvidedColumnGroup(s)}t&&!i||(this.logger.log("onColumnEvent-> processing "+e+" expanded = "+t.isExpanded()),this.columnModel.setColumnGroupOpened(i,t.isExpanded(),"alignedGridChanged"))})}processColumnEvent(e){var t;const i=e.column;let s=null;if(i&&(s=this.columnModel.getPrimaryColumn(i.getColId())),i&&!s)return;const n=this.getMasterColumns(e);switch(e.type){case g.EVENT_COLUMN_MOVED:{const u=e,c=e.api.getColumnState().map(p=>({colId:p.colId}));this.columnModel.applyColumnState({state:c,applyOrder:!0},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} toIndex = ${u.toIndex}`)}break;case g.EVENT_COLUMN_VISIBLE:{const u=e,c=e.api.getColumnState().map(p=>({colId:p.colId,hide:p.hide}));this.columnModel.applyColumnState({state:c},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} visible = ${u.visible}`)}break;case g.EVENT_COLUMN_PINNED:{const u=e,c=e.api.getColumnState().map(p=>({colId:p.colId,pinned:p.pinned}));this.columnModel.applyColumnState({state:c},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} pinned = ${u.pinned}`)}break;case g.EVENT_COLUMN_RESIZED:const l=e,a={};n.forEach(u=>{this.logger.log(`onColumnEvent-> processing ${e.type} actualWidth = ${u.getActualWidth()}`),a[u.getId()]={key:u.getColId(),newWidth:u.getActualWidth()}}),(t=l.flexColumns)==null||t.forEach(u=>{a[u.getId()]&&delete a[u.getId()]}),this.columnModel.setColumnWidths(Object.values(a),!1,l.finished,"alignedGridChanged");break}const o=this.ctrlsService.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(l=>{l.setGridOption("alwaysShowVerticalScroll",o)})}};h([f("columnModel")],Mr.prototype,"columnModel",2);h([f("ctrlsService")],Mr.prototype,"ctrlsService",2);h([es(0,_i("loggerFactory"))],Mr.prototype,"setBeans",1);h([I],Mr.prototype,"init",1);Mr=h([B("alignedGridsService")],Mr);var Ir=class extends L{constructor(){super(...arguments),this.selectedNodes=new Map,this.lastRowNode=null}init(){this.rowSelection=this.gos.get("rowSelection"),this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.rowSelection=this.gos.get("rowSelection"),this.deselectAllRowNodes({source:"api"})}),this.addManagedListener(this.eventService,g.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))}destroy(){super.destroy(),this.resetNodes(),this.lastRowNode=null}isMultiselect(){return this.rowSelection==="multiple"}setNodesSelected(e){var t;const{newValue:i,clearSelection:s,suppressFinishActions:n,rangeSelect:r,nodes:o,event:l,source:a="api"}=e;if(o.length===0)return 0;if(o.length>1&&!this.isMultiselect())return console.warn("AG Grid: cannot multi select while rowSelection='single'"),0;const u=this.groupSelectsChildren&&e.groupSelectsFiltered===!0,d=o.map(p=>p.footer?p.sibling:p);if(r){if(o.length>1)return console.warn("AG Grid: cannot range select while selecting multiple rows"),0;let p=null;if(a==="checkboxSelected"&&i===!1&&this.lastRowNode&&(this.lastRowNode.id?p=this.lastRowNode:this.lastRowNode=null),p==null&&(p=this.getLastSelectedNode()),p){const C=d[0];if(C!==p&&this.isMultiselect())return this.selectRange(C,p,i,a)}}this.lastRowNode=i?null:d[0];let c=0;for(let p=0;p<d.length;p++){const C=d[p];u&&C.group||C.selectThisNode(i,l,a)&&c++,this.groupSelectsChildren&&((t=C.childrenAfterGroup)!=null&&t.length)&&(c+=this.selectChildren(C,i,u,a))}if(!n&&(i&&(s||!this.isMultiselect())&&(c+=this.clearOtherNodes(d[0],a)),c>0)){this.updateGroupsFromChildrenSelections(a);const C={type:g.EVENT_SELECTION_CHANGED,source:a};this.eventService.dispatchEvent(C)}return c}selectRange(e,t,i=!0,s){const n=this.rowModel.getNodesInRangeForSelection(e,t);let r=0;n.forEach(l=>{if(l.group&&this.groupSelectsChildren)return;l.selectThisNode(i,void 0,s)&&r++}),this.updateGroupsFromChildrenSelections(s);const o={type:g.EVENT_SELECTION_CHANGED,source:s};return this.eventService.dispatchEvent(o),r}selectChildren(e,t,i,s){const n=i?e.childrenAfterAggFilter:e.childrenAfterGroup;return J(n)?0:this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:i,source:s,nodes:n})}getLastSelectedNode(){const e=Array.from(this.selectedNodes.keys());if(e.length==0)return null;const t=this.selectedNodes.get(pe(e));return t||null}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||this.rowModel.getType()!=="clientSide")return!1;const s=this.rowModel.getRootNode();t||(t=new kh(!0,s),t.setInactive());let n=!1;return t.forEachChangedNodeDepthFirst(r=>{if(r!==s){const o=r.calculateSelectedFromChildren();n=r.selectThisNode(o===null?!1:o,void 0,e)||n}}),n}clearOtherNodes(e,t){const i=new Map;let s=0;return this.selectedNodes.forEach(n=>{if(n&&n.id!==e.id){const r=this.selectedNodes.get(n.id);s+=r.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:t}),this.groupSelectsChildren&&n.parent&&i.set(n.parent.id,n.parent)}}),i.forEach(n=>{const r=n.calculateSelectedFromChildren();n.selectThisNode(r===null?!1:r,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(A(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();if(this.resetNodes(),t){const i={type:g.EVENT_SELECTION_CHANGED,source:e};this.eventService.dispatchEvent(i)}}resetNodes(){var e;(e=this.selectedNodes)==null||e.clear()}getBestCostNodeSelection(){if(this.rowModel.getType()!=="clientSide")return;const t=this.rowModel.getTopLevelNodes();if(t===null)return;const i=[];function s(n){for(let r=0,o=n.length;r<o;r++){const l=n[r];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=l=>l.selectThisNode(!1,void 0,s),i=this.rowModel.getType()==="clientSide",{source:s,justFiltered:n,justCurrentPage:r}=e;if(r||n){if(!i){console.error("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'");return}this.getNodesToSelect(n,r).forEach(t)}else this.selectedNodes.forEach(l=>{l&&t(l)}),this.reset(s);i&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(s);const o={type:g.EVENT_SELECTION_CHANGED,source:s};this.eventService.dispatchEvent(o)}getSelectedCounts(e,t){let i=0,s=0;const n=r=>{this.groupSelectsChildren&&r.group||(r.isSelected()?i++:r.selectable&&s++)};return this.getNodesToSelect(e,t).forEach(n),{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){if(this.rowModel.getType()!=="clientSide")throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);const i=[];if(t)return this.paginationProxy.forEachNodeOnPage(n=>{if(!n.group){i.push(n);return}if(!n.expanded){const r=o=>{var l;i.push(o),(l=o.childrenAfterFilter)!=null&&l.length&&o.childrenAfterFilter.forEach(r)};r(n);return}this.groupSelectsChildren||i.push(n)}),i;const s=this.rowModel;return e?(s.forEachNodeAfterFilter(n=>{i.push(n)}),i):(s.forEachNode(n=>{i.push(n)}),i)}selectAllRowNodes(e){if(this.rowModel.getType()!=="clientSide")throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);const{source:t,justFiltered:i,justCurrentPage:s}=e,n=o=>o.selectThisNode(!0,void 0,t);this.getNodesToSelect(i,s).forEach(n),this.rowModel.getType()==="clientSide"&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(t);const r={type:g.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(r)}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;const i=new Set(e),s=[];this.rowModel.forEachNode(n=>{i.has(n.id)&&s.push(n)}),this.setNodesSelected({newValue:!0,nodes:s,source:t})}};h([f("rowModel")],Ir.prototype,"rowModel",2);h([f("paginationProxy")],Ir.prototype,"paginationProxy",2);h([I],Ir.prototype,"init",1);Ir=h([B("selectionService")],Ir);var Qo=class{constructor(e){this.viaApi=(t,...i)=>(Y(`Since v31, 'columnApi.${t}' is deprecated and moved to 'api.${t}'.`),this.api[t](...i)),this.api=e}sizeColumnsToFit(e){this.viaApi("sizeColumnsToFit",e)}setColumnGroupOpened(e,t){this.viaApi("setColumnGroupOpened",e,t)}getColumnGroup(e,t){return this.viaApi("getColumnGroup",e,t)}getProvidedColumnGroup(e){return this.viaApi("getProvidedColumnGroup",e)}getDisplayNameForColumn(e,t){return this.viaApi("getDisplayNameForColumn",e,t)}getDisplayNameForColumnGroup(e,t){return this.viaApi("getDisplayNameForColumnGroup",e,t)}getColumn(e){return this.viaApi("getColumn",e)}getColumns(){return this.viaApi("getColumns")}applyColumnState(e){return this.viaApi("applyColumnState",e)}getColumnState(){return this.viaApi("getColumnState")}resetColumnState(){this.viaApi("resetColumnState")}getColumnGroupState(){return this.viaApi("getColumnGroupState")}setColumnGroupState(e){this.viaApi("setColumnGroupState",e)}resetColumnGroupState(){this.viaApi("resetColumnGroupState")}isPinning(){return this.viaApi("isPinning")}isPinningLeft(){return this.viaApi("isPinningLeft")}isPinningRight(){return this.viaApi("isPinningRight")}getDisplayedColAfter(e){return this.viaApi("getDisplayedColAfter",e)}getDisplayedColBefore(e){return this.viaApi("getDisplayedColBefore",e)}setColumnVisible(e,t){this.viaApi("setColumnVisible",e,t)}setColumnsVisible(e,t){this.viaApi("setColumnsVisible",e,t)}setColumnPinned(e,t){this.viaApi("setColumnPinned",e,t)}setColumnsPinned(e,t){this.viaApi("setColumnsPinned",e,t)}getAllGridColumns(){return this.viaApi("getAllGridColumns")}getDisplayedLeftColumns(){return this.viaApi("getDisplayedLeftColumns")}getDisplayedCenterColumns(){return this.viaApi("getDisplayedCenterColumns")}getDisplayedRightColumns(){return this.viaApi("getDisplayedRightColumns")}getAllDisplayedColumns(){return this.viaApi("getAllDisplayedColumns")}getAllDisplayedVirtualColumns(){return this.viaApi("getAllDisplayedVirtualColumns")}moveColumn(e,t){this.viaApi("moveColumn",e,t)}moveColumnByIndex(e,t){this.viaApi("moveColumnByIndex",e,t)}moveColumns(e,t){this.viaApi("moveColumns",e,t)}moveRowGroupColumn(e,t){this.viaApi("moveRowGroupColumn",e,t)}setColumnAggFunc(e,t){this.viaApi("setColumnAggFunc",e,t)}setColumnWidth(e,t,i=!0,s){this.viaApi("setColumnWidth",e,t,i,s)}setColumnWidths(e,t=!0,i){this.viaApi("setColumnWidths",e,t,i)}setPivotMode(e){this.viaApi("setPivotMode",e)}isPivotMode(){return this.viaApi("isPivotMode")}getPivotResultColumn(e,t){return this.viaApi("getPivotResultColumn",e,t)}setValueColumns(e){this.viaApi("setValueColumns",e)}getValueColumns(){return this.viaApi("getValueColumns")}removeValueColumn(e){this.viaApi("removeValueColumn",e)}removeValueColumns(e){this.viaApi("removeValueColumns",e)}addValueColumn(e){this.viaApi("addValueColumn",e)}addValueColumns(e){this.viaApi("addValueColumns",e)}setRowGroupColumns(e){this.viaApi("setRowGroupColumns",e)}removeRowGroupColumn(e){this.viaApi("removeRowGroupColumn",e)}removeRowGroupColumns(e){this.viaApi("removeRowGroupColumns",e)}addRowGroupColumn(e){this.viaApi("addRowGroupColumn",e)}addRowGroupColumns(e){this.viaApi("addRowGroupColumns",e)}getRowGroupColumns(){return this.viaApi("getRowGroupColumns")}setPivotColumns(e){this.viaApi("setPivotColumns",e)}removePivotColumn(e){this.viaApi("removePivotColumn",e)}removePivotColumns(e){this.viaApi("removePivotColumns",e)}addPivotColumn(e){this.viaApi("addPivotColumn",e)}addPivotColumns(e){this.viaApi("addPivotColumns",e)}getPivotColumns(){return this.viaApi("getPivotColumns")}getLeftDisplayedColumnGroups(){return this.viaApi("getLeftDisplayedColumnGroups")}getCenterDisplayedColumnGroups(){return this.viaApi("getCenterDisplayedColumnGroups")}getRightDisplayedColumnGroups(){return this.viaApi("getRightDisplayedColumnGroups")}getAllDisplayedColumnGroups(){return this.viaApi("getAllDisplayedColumnGroups")}autoSizeColumn(e,t){return this.viaApi("autoSizeColumn",e,t)}autoSizeColumns(e,t){this.viaApi("autoSizeColumns",e,t)}autoSizeAllColumns(e){this.viaApi("autoSizeAllColumns",e)}setPivotResultColumns(e){this.viaApi("setPivotResultColumns",e)}getPivotResultColumns(){return this.viaApi("getPivotResultColumns")}};h([f("gridApi")],Qo.prototype,"api",2);Qo=h([B("columnApi")],Qo);var _n=class extends L{constructor(){super(...arguments),this.initialised=!1,this.isSsrm=!1}init(){this.isSsrm=this.gos.isRowModelType("serverSide"),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=i=>this.callColumnCellValueChangedHandler(i),t=this.gos.useAsyncEvents();this.eventService.addEventListener(g.EVENT_CELL_VALUE_CHANGED,e,t),this.addDestroyFunc(()=>this.eventService.removeEventListener(g.EVENT_CELL_VALUE_CHANGED,e,t)),this.addManagedPropertyListener("treeData",i=>this.isTreeData=i.currentValue)}getValue(e,t,i=!1,s=!1){if(this.initialised||this.init(),!t)return;const n=e.getColDef(),r=n.field,o=e.getColId(),l=t.data;let a;const u=t.groupData&&t.groupData[o]!==void 0,d=!s&&t.aggData&&t.aggData[o]!==void 0,c=this.isSsrm&&s&&!!e.getColDef().aggFunc,p=this.isSsrm&&t.footer&&t.field&&(e.getColDef().showRowGroup===!0||e.getColDef().showRowGroup===t.field);if(i&&n.filterValueGetter?a=this.executeFilterValueGetter(n.filterValueGetter,l,e,t):this.isTreeData&&d?a=t.aggData[o]:this.isTreeData&&n.valueGetter?a=this.executeValueGetter(n.valueGetter,l,e,t):this.isTreeData&&r&&l?a=Ao(l,r,e.isFieldContainsDots()):u?a=t.groupData[o]:d?a=t.aggData[o]:n.valueGetter?a=this.executeValueGetter(n.valueGetter,l,e,t):p?a=Ao(l,t.field,e.isFieldContainsDots()):r&&l&&!c&&(a=Ao(l,r,e.isFieldContainsDots())),this.cellExpressions&&typeof a=="string"&&a.indexOf("=")===0){const C=a.substring(1);a=this.executeValueGetter(C,l,e,t)}if(a==null){const C=this.getOpenedGroup(t,e);if(C!=null)return C}return a}parseValue(e,t,i,s){const n=e.getColDef(),r=this.gos.addGridCommonParams({node:t,data:t==null?void 0:t.data,oldValue:s,newValue:i,colDef:n,column:e}),o=n.valueParser;return A(o)?typeof o=="function"?o(r):this.expressionService.evaluate(o,r):i}formatValue(e,t,i,s,n=!0){let r=null,o;const l=e.getColDef();if(s?o=s:n&&(o=l.valueFormatter),o){const a=this.gos.addGridCommonParams({value:i,node:t,data:t?t.data:null,colDef:l,column:e});typeof o=="function"?r=o(a):r=this.expressionService.evaluate(o,a)}else if(l.refData)return l.refData[i]||"";return r==null&&Array.isArray(i)&&(r=i.join(", ")),r}getOpenedGroup(e,t){if(!this.gos.get("showOpenedGroup")||!t.getColDef().showRowGroup)return;const s=t.getColDef().showRowGroup;let n=e.parent;for(;n!=null;){if(n.rowGroupColumn&&(s===!0||s===n.rowGroupColumn.getColId()))return n.key;n=n.parent}}setValue(e,t,i,s){const n=this.columnModel.getPrimaryColumn(t);if(!e||!n)return!1;J(e.data)&&(e.data={});const{field:r,valueSetter:o}=n.getColDef();if(J(r)&&J(o))return console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work"),!1;if(!this.dataTypeService.checkType(n,i))return console.warn("AG Grid: 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(n,e),newValue:i,colDef:n.getColDef(),column:n});l.newValue=i;let a;if(A(o)?typeof o=="function"?a=o(l):a=this.expressionService.evaluate(o,l):a=this.setValueUsingField(e.data,r,i,n.isFieldContainsDots()),a===void 0&&(a=!0),!a)return!1;e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),l.newValue=this.getValue(n,e);const u={type:g.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:l.column,api:l.api,columnApi:l.columnApi,colDef:l.colDef,context:l.context,data:e.data,node:e,oldValue:l.oldValue,newValue:l.newValue,value:l.newValue,source:s};return this.eventService.dispatchEvent(u),!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,columnApi:e.columnApi,context:e.context})})}setValueUsingField(e,t,i,s){if(!t)return!1;let n=!1;if(!s)n=e[t]===i,n||(e[t]=i);else{const r=t.split(".");let o=e;for(;r.length>0&&o;){const l=r.shift();r.length===0?(n=o[l]===i,n||(o[l]=i)):o=o[l]}}return!n}executeFilterValueGetter(e,t,i,s){const n=this.gos.addGridCommonParams({data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});return typeof e=="function"?e(n):this.expressionService.evaluate(e,n)}executeValueGetter(e,t,i,s){const n=i.getColId(),r=this.valueCache.getValue(s,n);if(r!==void 0)return r;const o=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(o):l=this.expressionService.evaluate(e,o),this.valueCache.setValue(s,n,l),l}getValueCallback(e,t){const i=this.columnModel.getPrimaryColumn(t);return i?this.getValue(i,e):null}getKeyForNode(e,t){const i=this.getValue(e,t),s=e.getColDef().keyCreator;let n=i;if(s){const r=this.gos.addGridCommonParams({value:i,colDef:e.getColDef(),column:e,node:t,data:t.data});n=s(r)}return typeof n=="string"||n==null||(n=String(n),n==="[object Object]"&&Y("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")),n}};h([f("expressionService")],_n.prototype,"expressionService",2);h([f("columnModel")],_n.prototype,"columnModel",2);h([f("valueCache")],_n.prototype,"valueCache",2);h([f("dataTypeService")],_n.prototype,"dataTypeService",2);h([I],_n.prototype,"init",1);_n=h([B("valueService")],_n);var Rc=class extends L{constructor(){super(...arguments),this.expressionToFunctionCache={}}setBeans(e){this.logger=e.create("ExpressionService")}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);console.error("AG Grid: 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.columnApi,t.getValue,t.column,t.columnGroup)}catch(i){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Params =",t),console.log("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, columnApi, getValue, column, columnGroup",t);return this.expressionToFunctionCache[e]=i,i}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}};h([es(0,_i("loggerFactory"))],Rc.prototype,"setBeans",1);Rc=h([B("expressionService")],Rc);var Tc=class extends L{setBeans(e){this.logging=e.get("debug")}create(e){return new xC(e,this.isLogging.bind(this))}isLogging(){return this.logging}};h([es(0,_i("gridOptionsService"))],Tc.prototype,"setBeans",1);Tc=h([B("loggerFactory")],Tc);var xC=class{constructor(e,t){this.name=e,this.isLoggingFunc=t}isLogging(){return this.isLoggingFunc()}log(e){this.isLoggingFunc()&&console.log("AG Grid."+this.name+": "+e)}},Qn=class extends L{setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.context.getGridId()),this.dragAndDropService.addDropTarget({getContainer:()=>this.eGui,isInterestedIn:n=>n===1||n===0,getIconName:()=>ie.ICON_NOT_ALLOWED}),this.mouseEventService.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new Ah(this.view)),this.addRtlSupport();const s=this.resizeObserverService.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>s()),this.ctrlsService.register("gridCtrl",this)}isDetailGrid(){var e;const t=this.focusService.findTabbableParent(this.getGui());return((e=t==null?void 0:t.getAttribute("row-id"))==null?void 0:e.startsWith("detail"))||!1}showDropZones(){return Ce.__isRegistered("@ag-grid-enterprise/row-grouping",this.context.getGridId())}showSideBar(){return Ce.__isRegistered("@ag-grid-enterprise/side-bar",this.context.getGridId())}showStatusBar(){return Ce.__isRegistered("@ag-grid-enterprise/status-bar",this.context.getGridId())}showWatermark(){return Ce.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId())}onGridSizeChanged(){const e={type:g.EVENT_GRID_SIZE_CHANGED,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight};this.eventService.dispatchEvent(e)}addRtlSupport(){const e=this.gos.get("enableRtl")?"ag-rtl":"ag-ltr";this.view.setRtlClass(e)}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.view.getFocusableContainers(),i=this.gos.getActiveDomElement(),n=t.findIndex(r=>r.contains(i))+(e?-1:1);return n<=0||n>=t.length?!1:this.focusService.focusInto(t[n])}focusInnerElement(e){const t=this.view.getFocusableContainers(),i=this.columnModel.getAllDisplayedColumns();if(e){if(t.length>1)return this.focusService.focusInto(pe(t),!0);const s=pe(i);if(this.focusService.focusGridView(s,!0))return!0}if(this.gos.get("headerHeight")===0||this.gos.get("suppressHeaderFocus")){if(this.focusService.focusGridView(i[0]))return!0;for(let s=1;s<t.length;s++)if(this.focusService.focusInto(t[s]))return!0;return!1}return this.focusService.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}};h([f("focusService")],Qn.prototype,"focusService",2);h([f("resizeObserverService")],Qn.prototype,"resizeObserverService",2);h([f("columnModel")],Qn.prototype,"columnModel",2);h([f("ctrlsService")],Qn.prototype,"ctrlsService",2);h([f("mouseEventService")],Qn.prototype,"mouseEventService",2);h([f("dragAndDropService")],Qn.prototype,"dragAndDropService",2);var Mu=class extends Fu{constructor(t){super(),this.eGridDiv=t}postConstruct(){this.logger=this.loggerFactory.create("GridComp");const t={destroyGridUi:()=>this.destroyBean(this),setRtlClass:s=>this.addCssClass(s),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:s=>{this.getGui().style.userSelect=s??"",this.getGui().style.webkitUserSelect=s??""},setCursor:s=>{this.getGui().style.cursor=s??""}};this.ctrl=this.createManagedBean(new Qn);const i=this.createTemplate();this.setTemplate(i),this.ctrl.setComp(t,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:s=>this.ctrl.focusInnerElement(s),forceFocusOutWhenTabGuardsAreEmpty:!0})}insertGridIntoDom(){const t=this.getGui();this.eGridDiv.appendChild(t),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(t),this.logger.log("Grid removed from DOM")})}updateLayoutClasses(t,i){const s=this.eRootWrapperBody.classList;s.toggle("ag-layout-auto-height",i.autoHeight),s.toggle("ag-layout-normal",i.normal),s.toggle("ag-layout-print",i.print),this.addOrRemoveCssClass("ag-layout-auto-height",i.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",i.normal),this.addOrRemoveCssClass("ag-layout-print",i.print)}createTemplate(){const t=this.ctrl.showDropZones()?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"",i=this.ctrl.showSideBar()?'<ag-side-bar ref="sideBar"></ag-side-bar>':"",s=this.ctrl.showStatusBar()?'<ag-status-bar ref="statusBar"></ag-status-bar>':"",n=this.ctrl.showWatermark()?"<ag-watermark></ag-watermark>":"";return`<div class="ag-root-wrapper" role="presentation">
|
|
340
|
+
${t}
|
|
341
|
+
<div class="ag-root-wrapper-body" ref="rootWrapperBody" role="presentation">
|
|
342
|
+
<ag-grid-body ref="gridBody"></ag-grid-body>
|
|
343
|
+
${i}
|
|
344
|
+
</div>
|
|
345
|
+
${s}
|
|
346
|
+
<ag-pagination></ag-pagination>
|
|
347
|
+
${n}
|
|
348
|
+
</div>`}getFocusableElement(){return this.eRootWrapperBody}getFocusableContainers(){const t=[this.gridBodyComp.getGui()];return this.sideBarComp&&t.push(this.sideBarComp.getGui()),t.filter(i=>di(i))}};h([f("loggerFactory")],Mu.prototype,"loggerFactory",2);h([_("gridBody")],Mu.prototype,"gridBodyComp",2);h([_("sideBar")],Mu.prototype,"sideBarComp",2);h([_("rootWrapperBody")],Mu.prototype,"eRootWrapperBody",2);h([I],Mu.prototype,"postConstruct",1);var Nr=class extends L{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 n=this.gos.isColumnsSortingCoupledToGroup();let r=[e];if(n&&e.getColDef().showRowGroup){const a=this.columnModel.getSourceColumnsForGroupColumn(e),u=a==null?void 0:a.filter(d=>d.isSortable());u&&(r=[e,...u])}r.forEach(a=>a.setSort(t,s));const o=(i||this.gos.get("alwaysMultiSort"))&&!this.gos.get("suppressMultiSort"),l=[];if(!o){const a=this.clearSortBarTheseColumns(r,s);l.push(...a)}this.updateSortIndex(e),l.push(...r),this.dispatchSortChangedEvents(s,l)}updateSortIndex(e){const t=this.gos.isColumnsSortingCoupledToGroup(),i=this.columnModel.getGroupDisplayColumnForGroup(e.getId()),s=t&&i||e,n=this.getColumnsWithSortingOrdered();this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(l=>l.setSortIndex(null));const r=n.filter(l=>t&&l.getColDef().showRowGroup?!1:l!==s);(s.getSort()?[...r,s]:r).forEach((l,a)=>{l.setSortIndex(a)})}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){const t=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(i=>!!i.getSort());return t&&t.length>0}dispatchSortChangedEvents(e,t){const i={type:g.EVENT_SORT_CHANGED,source:e};t&&(i.columns=t),this.eventService.dispatchEvent(i)}clearSortBarTheseColumns(e,t){const i=[];return this.columnModel.getPrimaryAndSecondaryAndAutoColumns().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=Nr.DEFAULT_SORTING_ORDER,!Array.isArray(t)||t.length<=0)return console.warn(`AG Grid: sortingOrder must be an array with at least one element, currently it's ${t}`),null;const i=t.indexOf(e.getSort()),s=i<0,n=i==t.length-1;let r;return s||n?r=t[0]:r=t[i+1],Nr.DEFAULT_SORTING_ORDER.indexOf(r)<0?(console.warn("AG Grid: invalid sort type "+r),null):r}getIndexedSortMap(){let e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(r=>!!r.getSort());if(this.columnModel.isPivotMode()){const r=this.gos.isColumnsSortingCoupledToGroup();e=e.filter(o=>{const l=!!o.getAggFunc(),a=!o.isPrimary(),u=r?this.columnModel.getGroupDisplayColumnForGroup(o.getId()):o.getColDef().showRowGroup;return l||a||u})}const t=this.columnModel.getRowGroupColumns().filter(r=>!!r.getSort()),i={};e.forEach((r,o)=>i[r.getId()]=o),e.sort((r,o)=>{const l=r.getSortIndex(),a=o.getSortIndex();if(l!=null&&a!=null)return l-a;if(l==null&&a==null){const u=i[r.getId()],d=i[o.getId()];return u>d?1:-1}else return a==null?-1:1});const s=this.gos.isColumnsSortingCoupledToGroup()&&!!t.length;s&&(e=[...new Set(e.map(r=>{var o;return(o=this.columnModel.getGroupDisplayColumnForGroup(r.getId()))!=null?o:r}))]);const n=new Map;return e.forEach((r,o)=>n.set(r,o)),s&&t.forEach(r=>{const o=this.columnModel.getGroupDisplayColumnForGroup(r.getId());n.set(r,n.get(o))}),n}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=this.gos.isColumnsSortingCoupledToGroup(),i=!!e.getColDef().showRowGroup;return t&&i}getDisplaySortForColumn(e){const t=this.columnModel.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,n=s[0].getSort();return s.every(o=>o.getSort()==n)?n:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}};Nr.DEFAULT_SORTING_ORDER=["asc","desc",null];h([f("columnModel")],Nr.prototype,"columnModel",2);Nr=h([B("sortController")],Nr);var De=class extends L{static addKeyboardModeEvents(e){this.instanceCount>0||(e.addEventListener("keydown",De.toggleKeyboardMode),e.addEventListener("mousedown",De.toggleKeyboardMode))}static removeKeyboardModeEvents(e){this.instanceCount>0||(e.addEventListener("keydown",De.toggleKeyboardMode),e.addEventListener("mousedown",De.toggleKeyboardMode))}static toggleKeyboardMode(e){const t=De.keyboardModeActive,i=e.type==="keydown";i&&(e.ctrlKey||e.metaKey||e.altKey)||t!==i&&(De.keyboardModeActive=i)}static unregisterGridCompController(e){De.removeKeyboardModeEvents(e)}init(){const e=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,e),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady(t=>{this.gridCtrl=t.gridCtrl})}registerKeyboardFocusEvents(){const e=this.gos.getDocument();De.addKeyboardModeEvents(e),De.instanceCount++,this.addDestroyFunc(()=>{De.instanceCount--,De.unregisterGridCompController(e)})}onColumnEverythingChanged(){if(!this.focusedCellPosition)return;const e=this.focusedCellPosition.column,t=this.columnModel.getGridColumn(e.getId());e!==t&&this.clearFocusedCell()}isKeyboardMode(){return De.keyboardModeActive}getFocusCellToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),wr.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),Nh.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition}isDomDataMissingInHierarchy(e,t){let i=e;for(;i;){if(this.gos.getDomData(i,t))return!1;i=i.parentNode}return!0}getFocusedCell(){return this.focusedCellPosition}shouldRestoreFocus(e){return this.isCellRestoreFocused(e)?(setTimeout(()=>{this.restoredFocusedCellPosition=null},0),!0):!1}isCellRestoreFocused(e){return this.restoredFocusedCellPosition==null?!1:this.cellPositionUtils.equals(e,this.restoredFocusedCellPosition)}setRestoreFocusedCell(e){this.getFrameworkOverrides().renderingEngine==="react"&&(this.restoredFocusedCellPosition=e)}getFocusEventParams(){const{rowIndex:e,rowPinned:t,column:i}=this.focusedCellPosition,s={rowIndex:e,rowPinned:t,column:i,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:e,rowPinned:t});return n&&(s.isFullWidthCell=n.isFullWidth()),s}clearFocusedCell(){if(this.restoredFocusedCellPosition=null,this.focusedCellPosition==null)return;const e=K({type:g.EVENT_CELL_FOCUS_CLEARED},this.getFocusEventParams());this.focusedCellPosition=null,this.eventService.dispatchEvent(e)}setFocusedCell(e){const{column:t,rowIndex:i,rowPinned:s,forceBrowserFocus:n=!1,preventScrollOnBrowserFocus:r=!1}=e,o=this.columnModel.getGridColumn(t);if(!o){this.focusedCellPosition=null;return}this.focusedCellPosition=o?{rowIndex:i,rowPinned:Es(s),column:o}:null;const l=Ie(K({type:g.EVENT_CELL_FOCUSED},this.getFocusEventParams()),{forceBrowserFocus:n,preventScrollOnBrowserFocus:r,floating:null});this.eventService.dispatchEvent(l)}isCellFocused(e){return this.focusedCellPosition==null?!1:this.cellPositionUtils.equals(e,this.focusedCellPosition)}isRowNodeFocused(e){return this.isRowFocused(e.rowIndex,e.rowPinned)}isHeaderWrapperFocused(e){if(this.focusedHeaderPosition==null)return!1;const t=e.getColumnGroupChild(),i=e.getRowIndex(),s=e.getPinned(),{column:n,headerRowIndex:r}=this.focusedHeaderPosition;return t===n&&i===r&&s==n.getPinned()}clearFocusedHeader(){this.focusedHeaderPosition=null}getFocusedHeader(){return this.focusedHeaderPosition}setFocusedHeader(e,t){this.focusedHeaderPosition={headerRowIndex:e,column:t}}focusHeaderPosition(e){if(this.gos.get("suppressHeaderFocus"))return!1;const{direction:t,fromTab:i,allowUserOverride:s,event:n,fromCell:r,rowWithoutSpanValue:o}=e;let{headerPosition:l}=e;if(r&&this.filterManager.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(l);if(s){const a=this.getFocusedHeader(),u=this.headerNavigationService.getHeaderRowCount();if(i){const d=this.gos.getCallback("tabToNextHeader");d&&(l=this.getHeaderPositionFromUserFunc({userFunc:d,direction:t,currentPosition:a,headerPosition:l,headerRowCount:u}))}else{const d=this.gos.getCallback("navigateToNextHeader");if(d&&n){const c={key:n.key,previousHeaderPosition:a,nextHeaderPosition:l,headerRowCount:u,event:n};l=d(c)}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:n,fromCell:r,rowWithoutSpanValue:o}):!1}focusHeaderPositionFromUserFunc(e){if(this.gos.get("suppressHeaderFocus"))return!1;const{userFunc:t,headerPosition:i,direction:s,event:n}=e,r=this.getFocusedHeader(),o=this.headerNavigationService.getHeaderRowCount(),l=this.getHeaderPositionFromUserFunc({userFunc:t,direction:s,currentPosition:r,headerPosition:i,headerRowCount:o});return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:s,event:n})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:i,currentPosition:s,headerPosition:n,headerRowCount:r}=e,l=t({backwards:i==="Before",previousHeaderPosition:s,nextHeaderPosition:n,headerRowCount:r});return l===!0||l===null?(l===null&&Y("Returning `null` from tabToNextHeader is deprecated. Return `true` to stay on the current header, or `false` to let the browser handle the tab behaviour."),s):l===!1?null:l}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:i,fromCell:s,rowWithoutSpanValue:n,event:r}=e;if(t.headerRowIndex===-1)return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView(t.column);this.headerNavigationService.scrollToColumn(t.column,i);const l=this.ctrlsService.getHeaderRowContainerCtrl(t.column.getPinned()).focusHeader(t.headerRowIndex,t.column,r);return l&&(n!=null||s)&&this.headerNavigationService.setCurrentHeaderRowWithoutSpan(n??-1),l}focusFirstHeader(){let e=this.columnModel.getAllDisplayedColumns()[0];if(!e)return!1;e.getParent()&&(e=this.columnModel.getColumnGroupAtLevel(e,0));const t=this.headerPositionUtils.getHeaderIndexToFocus(e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){const t=this.headerNavigationService.getHeaderRowCount()-1,i=pe(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCellPosition}isRowFocused(e,t){return this.focusedCellPosition==null?!1:this.focusedCellPosition.rowIndex===e&&this.focusedCellPosition.rowPinned===Es(t)}findFocusableElements(e,t,i=!1){const s=TT;let n=Xm;t&&(n+=", "+t),i&&(n+=', [tabindex="-1"]');const r=Array.prototype.slice.apply(e.querySelectorAll(s)).filter(a=>di(a)),o=Array.prototype.slice.apply(e.querySelectorAll(n));return o.length?((a,u)=>a.filter(d=>u.indexOf(d)===-1))(r,o):r}focusInto(e,t=!1,i=!1){const s=this.findFocusableElements(e,null,i),n=t?pe(s):s[0];return n?(n.focus({preventScroll:!0}),!0):!1}findFocusableElementBeforeTabGuard(e,t){if(!t)return null;const i=this.findFocusableElements(e),s=i.indexOf(t);if(s===-1)return null;let n=-1;for(let r=s-1;r>=0;r--)if(i[r].classList.contains("ag-tab-guard-top")){n=r;break}return n<=0?null:i[n-1]}findNextFocusableElement(e=this.eGridDiv,t,i){const s=this.findFocusableElements(e,t?':not([tabindex="-1"])':null),n=this.gos.getActiveDomElement();let r;t?r=s.findIndex(l=>l.contains(n)):r=s.indexOf(n);const o=r+(i?-1:1);return o<0||o>=s.length?null:s[o]}isTargetUnderManagedComponent(e,t){if(!t)return!1;const i=e.querySelectorAll(`.${Un.FOCUS_MANAGED_CLASS}`);if(!i.length)return!1;for(let s=0;s<i.length;s++)if(i[s].contains(t))return!0;return!1}findTabbableParent(e,t=5){let i=0;for(;e&&Cc(e)===null&&++i<=t;)e=e.parentElement;return Cc(e)===null?null:e}focusGridView(e,t){var i;if(this.gos.get("suppressCellFocus"))return t?this.gos.get("suppressHeaderFocus")?this.focusNextGridCoreContainer(!0,!0):this.focusLastHeader():this.focusNextGridCoreContainer(!1);const s=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(!s)return!1;const{rowIndex:n,rowPinned:r}=s,o=this.getFocusedHeader();return!e&&o&&(e=o.column),n==null||!e?!1:(this.navigationService.ensureCellVisible({rowIndex:n,column:e,rowPinned:r}),this.setFocusedCell({rowIndex:n,column:e,rowPinned:Es(r),forceBrowserFocus:!0}),(i=this.rangeService)==null||i.setRangeToCell({rowIndex:n,rowPinned:r,column:e}),!0)}focusNextGridCoreContainer(e,t=!1){return!t&&this.gridCtrl.focusNextInnerContainer(e)?!0:((t||!e&&!this.gridCtrl.isDetailGrid())&&this.gridCtrl.forceFocusOutOfContainer(e),!1)}focusAdvancedFilter(e){var t,i;return this.advancedFilterFocusColumn=e==null?void 0:e.column,(i=(t=this.advancedFilterService)==null?void 0:t.getCtrl().focusHeaderComp())!=null?i:!1}focusNextFromAdvancedFilter(e,t){var i,s;const n=(s=t?void 0:this.advancedFilterFocusColumn)!=null?s:(i=this.columnModel.getAllDisplayedColumns())==null?void 0:i[0];return e?this.focusHeaderPosition({headerPosition:{column:n,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(n)}clearAdvancedFilterColumn(){this.advancedFilterFocusColumn=void 0}};De.keyboardModeActive=!1;De.instanceCount=0;h([f("eGridDiv")],De.prototype,"eGridDiv",2);h([f("columnModel")],De.prototype,"columnModel",2);h([f("headerNavigationService")],De.prototype,"headerNavigationService",2);h([f("headerPositionUtils")],De.prototype,"headerPositionUtils",2);h([f("rowRenderer")],De.prototype,"rowRenderer",2);h([f("rowPositionUtils")],De.prototype,"rowPositionUtils",2);h([f("cellPositionUtils")],De.prototype,"cellPositionUtils",2);h([f("navigationService")],De.prototype,"navigationService",2);h([f("ctrlsService")],De.prototype,"ctrlsService",2);h([f("filterManager")],De.prototype,"filterManager",2);h([Se("rangeService")],De.prototype,"rangeService",2);h([Se("advancedFilterService")],De.prototype,"advancedFilterService",2);h([I],De.prototype,"init",1);De=h([B("focusService")],De);var yf=class extends L{setMouseOver(e){this.selectedColumns=e;const t={type:g.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(t)}clearMouseOver(){this.selectedColumns=null;const e={type:g.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(e)}isHovered(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0}};yf=h([B("columnHoverService")],yf);var Ka=class extends L{constructor(){super(...arguments),this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.ctrlsService.whenReady(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)}finish(){this.active&&this.flush(()=>{this.active=!1})}executeNextVMTurn(e){this.active?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){if(this.executeNextFuncs.length===0&&this.executeLaterFuncs.length===0){e();return}const t=i=>{for(;i.length;){const s=i.pop();s&&s()}};this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>t(this.executeNextFuncs),0),window.setTimeout(()=>{e(),t(this.executeLaterFuncs)},200)})}};h([f("ctrlsService")],Ka.prototype,"ctrlsService",2);h([I],Ka.prototype,"postConstruct",1);Ka=h([B("columnAnimationService")],Ka);var qo=class extends L{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowsCtrl=e.center,this.addManagedListener(this.eventService,g.EVENT_BODY_HEIGHT_CHANGED,this.checkPageSize.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,this.checkPageSize.bind(this)),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.paginationProxy.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.getViewportSizeFeature().getBodyHeight();if(e>0){const t=()=>{const i=this.gos.getRowHeightAsNumber(),s=Math.floor(e/i);this.paginationProxy.setPageSize(s,"autoCalculated")};this.isBodyRendered?kt(()=>t(),50)():(t(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};h([f("ctrlsService")],qo.prototype,"ctrlsService",2);h([f("paginationProxy")],qo.prototype,"paginationProxy",2);h([I],qo.prototype,"postConstruct",1);qo=h([B("paginationAutoPageSizeService")],qo);var Dc=class extends L{constructor(){super(...arguments),this.cacheVersion=0}init(){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]}};h([I],Dc.prototype,"init",1);Dc=h([B("valueCache")],Dc);var pN="paste",Xo=class extends L{init(){this.rowModel.getType()==="clientSide"&&(this.clientSideRowModel=this.rowModel),this.addManagedListener(this.eventService,g.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))}onCellValueChanged(e){e.source!==pN&&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"),n=new kh(s,this.clientSideRowModel.getRootNode());n.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(n),n.forEachChangedNodeDepthFirst(r=>{i.push(r)})}this.rowRenderer.refreshCells({rowNodes:i})}};h([f("rowModel")],Xo.prototype,"rowModel",2);h([f("rowRenderer")],Xo.prototype,"rowRenderer",2);h([I],Xo.prototype,"init",1);Xo=h([B("changeDetectionService")],Xo);var Pc=class extends L{adaptFunction(e,t){const i=this.componentMetadataProvider.retrieve(e);return i&&i.functionAdapter?i.functionAdapter(t):null}adaptCellRendererFunction(e){class t{refresh(s){return!1}getGui(){return this.eGui}init(s){const n=e(s),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=ni("<span>"+n+"</span>");return}if(n==null){this.eGui=ni("<span></span>");return}this.eGui=n}}return t}doesImplementIComponent(e){return e?e.prototype&&"getGui"in e.prototype:!1}};h([f("componentMetadataProvider")],Pc.prototype,"componentMetadataProvider",2);Pc=h([B("agComponentUtils")],Pc);var Ya=class extends L{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)},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]}};h([f("agComponentUtils")],Ya.prototype,"agComponentUtils",2);h([I],Ya.prototype,"postConstruct",1);Ya=h([B("componentMetadataProvider")],Ya);var gN=25,Ny=10,Op=8,fN=4,Gp=4,kp=6,mN=16,_y=14,Vp=8,CN={"ag-theme-custom":{headerHeight:25,headerCellMinWidth:24,listItemHeight:fN*5,rowHeight:25,chartMenuPanelWidth:220},"ag-theme-material":{headerHeight:Op*7,headerCellMinWidth:48,listItemHeight:Op*4,rowHeight:Op*6,chartMenuPanelWidth:240},"ag-theme-balham":{headerHeight:Gp*8,headerCellMinWidth:24,listItemHeight:Gp*6,rowHeight:Gp*7,chartMenuPanelWidth:220},"ag-theme-alpine":{headerHeight:kp*8,headerCellMinWidth:36,listItemHeight:kp*4,rowHeight:kp*7,chartMenuPanelWidth:240},"ag-theme-quartz":{headerHeight:_y+Vp*4.25,headerCellMinWidth:36,listItemHeight:mN+Vp,rowHeight:_y+Vp*3.5,chartMenuPanelWidth:260}},Oy={headerHeight:["ag-header-row"],headerCellMinWidth:["ag-header-cell"],listItemHeight:["ag-virtual-list-item"],rowHeight:["ag-row"],chartMenuPanelWidth:["ag-chart-docked-container"]},Qa=class extends L{constructor(){super(...arguments),this.calculatedSizes={},this.calculatedTheme=null}postConstruct(){var e;const t=(e=this.getTheme().el)!=null?e:this.eGridDiv;this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.mutationObserver=new MutationObserver(()=>{this.calculatedSizes={},this.calculatedTheme=null,this.calculatedTheme=this.getTheme(),this.fireGridStylesChangedEvent()}),this.mutationObserver.observe(t||this.eGridDiv,{attributes:!0,attributeFilter:["class"]})}fireGridStylesChangedEvent(){const e={type:g.EVENT_GRID_STYLES_CHANGED};this.eventService.dispatchEvent(e)}getSassVariable(e){const{themeFamily:t,el:i}=this.getTheme();if(!t||t.indexOf("ag-theme")!==0)return;this.calculatedSizes||(this.calculatedSizes={}),this.calculatedSizes[t]||(this.calculatedSizes[t]={});const s=this.calculatedSizes[t][e];return s??(this.calculatedSizes[t][e]=this.calculateValueForSassProperty(e,t,i),this.calculatedSizes[t][e])}calculateValueForSassProperty(e,t,i){const s="ag-theme-"+(t.match("material")?"material":t.match("balham")?"balham":t.match("alpine")?"alpine":"custom"),n=CN[s][e],r=this.gos.getDocument();if(i||(i=this.eGridDiv),!Oy[e])return n;const o=Oy[e],l=r.createElement("div"),a=Array.from(i.classList);l.classList.add(t,...a),l.style.position="absolute";const u=o.reduce((c,p)=>{const C=r.createElement("div");return C.style.position="static",C.classList.add(p),c.appendChild(C),C},l);let d=0;if(r.body){r.body.appendChild(l);const c=e.toLowerCase().indexOf("height")!==-1?"height":"width";d=parseInt(window.getComputedStyle(u)[c],10),r.body.removeChild(l)}return d||n}isThemeDark(){const{theme:e}=this.getTheme();return!!e&&e.indexOf("dark")>=0}chartMenuPanelWidth(){return this.getSassVariable("chartMenuPanelWidth")}getTheme(){if(this.calculatedTheme)return this.calculatedTheme;const e=/\bag-(material|(?:theme-([\w\-]*)))\b/g;let t=this.eGridDiv,i=null,s=[];for(;t;)if(i=e.exec(t.className),!i)t=t.parentElement||void 0;else{const r=t.className.match(e);r&&(s=r);break}if(!i)return{allThemes:s};const n=i[0];return this.calculatedTheme={theme:n,el:t,themeFamily:n.replace(/-dark$/,""),allThemes:s},this.calculatedTheme}getFromTheme(e,t){var i;return(i=this.getSassVariable(t))!=null?i:e}getDefaultRowHeight(){return this.getFromTheme(gN,"rowHeight")}getListItemHeight(){return this.getFromTheme(20,"listItemHeight")}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}getMinColWidth(){const e=this.getFromTheme(null,"headerCellMinWidth");return A(e)?Math.max(e,Ny):Ny}destroy(){this.calculatedSizes=null,this.mutationObserver&&this.mutationObserver.disconnect(),super.destroy()}};h([f("eGridDiv")],Qa.prototype,"eGridDiv",2);h([I],Qa.prototype,"postConstruct",1);Qa=h([B("environment")],Qa);var Zo=class extends L{constructor(){super(...arguments),this.scrollY=0,this.uiBodyHeight=0}agWire(e){this.logger=e.create("RowContainerHeightService")}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.maxDivHeight=fT(),this.logger.log("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.logger.log(`Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED}))}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:g.EVENT_HEIGHT_SCALE_CHANGED}))}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}};h([f("ctrlsService")],Zo.prototype,"ctrlsService",2);h([es(0,_i("loggerFactory"))],Zo.prototype,"agWire",1);h([I],Zo.prototype,"postConstruct",1);Zo=h([B("rowContainerHeightService")],Zo);var Jo=class extends L{init(){this.addManagedPropertyListener("isRowSelectable",()=>this.updateSelectable())}updateSelectableAfterGrouping(){this.updateSelectable(!0)}updateSelectable(e=!1){const t=!!this.gos.get("rowSelection"),i=this.gos.get("isRowSelectable");if(!t||!i)return;const s=this.gos.get("groupSelectsChildren"),n=this.rowModel.getType()==="clientSide"&&s,r=[],o=l=>{if(e&&!l.group)return;if(n&&l.group){const u=l.childrenAfterGroup.some(d=>d.selectable===!0);l.setRowSelectable(u,!0);return}const a=i?i(l):!0;l.setRowSelectable(a,!0),!a&&l.isSelected()&&r.push(l)};if(n){const l=this.rowModel;new kh(!1,l.getRootNode()).forEachChangedNodeDepthFirst(o,!0,!0)}else this.rowModel.forEachNode(o);r.length&&this.selectionService.setNodesSelected({nodes:r,newValue:!1,source:"selectableChanged"}),n&&this.selectionService instanceof Ir&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged")}};h([f("rowModel")],Jo.prototype,"rowModel",2);h([f("selectionService")],Jo.prototype,"selectionService",2);h([I],Jo.prototype,"init",1);Jo=h([B("selectableService")],Jo);var hi=class extends te{constructor(){super(),this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate());const{btFirst:t,btPrevious:i,btNext:s,btLast:n,pageSizeComp:r}=this;this.activateTabIndex([t,i,s,n]),t.insertAdjacentElement("afterbegin",Ve(e?"last":"first",this.gos)),i.insertAdjacentElement("afterbegin",Ve(e?"next":"previous",this.gos)),s.insertAdjacentElement("afterbegin",Ve(e?"previous":"next",this.gos)),n.insertAdjacentElement("afterbegin",Ve(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.onPaginationChanged()}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,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.addManagedListener(t,"click",i),this.addManagedListener(t,"keydown",s=>{(s.key===D.ENTER||s.key===D.SPACE)&&(s.preventDefault(),i())})}),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToFirstPage()}setCurrentPageLabel(){const e=this.paginationProxy.getTotalPages()>0,t=this.paginationProxy.getCurrentPage(),i=e?t+1:0;this.lbCurrent.textContent=this.formatNumber(i)}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");if(t)return t({value:e});const i=this.localeService.getLocaleTextFunc(),s=i("thousandSeparator",","),n=i("decimalSeparator",".");return qm(e,s,n)}getTemplate(){const e=this.localeService.getLocaleTextFunc(),t=e("page","Page"),i=e("to","to"),s=e("of","of"),n=e("firstPage","First Page"),r=e("previousPage","Previous Page"),o=e("nextPage","Next Page"),l=e("lastPage","Last Page"),a=this.getCompId();return`<div class="ag-paging-panel ag-unselectable" id="ag-${a}">
|
|
349
|
+
<ag-page-size-selector ref="pageSizeComp"></ag-page-size-selector>
|
|
350
|
+
<span class="ag-paging-row-summary-panel" role="status">
|
|
351
|
+
<span id="ag-${a}-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>
|
|
352
|
+
<span id="ag-${a}-to">${i}</span>
|
|
353
|
+
<span id="ag-${a}-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>
|
|
354
|
+
<span id="ag-${a}-of">${s}</span>
|
|
355
|
+
<span id="ag-${a}-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>
|
|
356
|
+
</span>
|
|
357
|
+
<span class="ag-paging-page-summary-panel" role="presentation">
|
|
358
|
+
<div ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${n}"></div>
|
|
359
|
+
<div ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>
|
|
360
|
+
<span class="ag-paging-description" role="status">
|
|
361
|
+
<span id="ag-${a}-start-page">${t}</span>
|
|
362
|
+
<span id="ag-${a}-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>
|
|
363
|
+
<span id="ag-${a}-of-page">${s}</span>
|
|
364
|
+
<span id="ag-${a}-of-page-number" ref="lbTotal" class="ag-paging-number"></span>
|
|
365
|
+
</span>
|
|
366
|
+
<div ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>
|
|
367
|
+
<div ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${l}"></div>
|
|
368
|
+
</span>
|
|
369
|
+
</div>`}onBtNext(){this.nextButtonDisabled||this.paginationProxy.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.paginationProxy.goToLastPage()}enableOrDisableButtons(){const e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.isLastPageFound(),i=this.paginationProxy.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const s=this.isZeroPagesToDisplay(),n=e===i-1;this.nextButtonDisabled=n||s,this.lastButtonDisabled=!t||s||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Hm(e,t),e.classList.toggle("ag-disabled",t)}updateRowLabels(){const e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.getPageSize(),i=this.paginationProxy.isLastPageFound(),s=this.paginationProxy.isLastPageFound()?this.paginationProxy.getMasterRowCount():null;let n,r;if(this.isZeroPagesToDisplay()?n=r=0:(n=t*e+1,r=n+t-1,i&&r>s&&(r=s)),this.lbFirstRowOnPage.textContent=this.formatNumber(n),this.rowNodeBlockLoader.isLoading()){const o=this.localeService.getLocaleTextFunc();this.lbLastRowOnPage.innerHTML=o("pageLastRowUnknown","?")}else this.lbLastRowOnPage.textContent=this.formatNumber(r)}isZeroPagesToDisplay(){const e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages();return e&&t===0}setTotalLabels(){const e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages(),i=e?this.paginationProxy.getMasterRowCount():null;if(i===1){const s=this.paginationProxy.getRow(0);if(s&&s.group&&!(s.groupData||s.aggData)){this.setTotalLabelsToZero();return}}if(e)this.lbTotal.textContent=this.formatNumber(t),this.lbRecordCount.textContent=this.formatNumber(i);else{const s=this.localeService.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=s,this.lbRecordCount.innerHTML=s}}setTotalLabelsToZero(){this.lbFirstRowOnPage.textContent=this.formatNumber(0),this.lbCurrent.textContent=this.formatNumber(0),this.lbLastRowOnPage.textContent=this.formatNumber(0),this.lbTotal.textContent=this.formatNumber(0),this.lbRecordCount.textContent=this.formatNumber(0)}};h([f("paginationProxy")],hi.prototype,"paginationProxy",2);h([f("rowNodeBlockLoader")],hi.prototype,"rowNodeBlockLoader",2);h([_("btFirst")],hi.prototype,"btFirst",2);h([_("btPrevious")],hi.prototype,"btPrevious",2);h([_("btNext")],hi.prototype,"btNext",2);h([_("btLast")],hi.prototype,"btLast",2);h([_("lbRecordCount")],hi.prototype,"lbRecordCount",2);h([_("lbFirstRowOnPage")],hi.prototype,"lbFirstRowOnPage",2);h([_("lbLastRowOnPage")],hi.prototype,"lbLastRowOnPage",2);h([_("lbCurrent")],hi.prototype,"lbCurrent",2);h([_("lbTotal")],hi.prototype,"lbTotal",2);h([_("pageSizeComp")],hi.prototype,"pageSizeComp",2);h([I],hi.prototype,"postConstruct",1);var Iu=class JD extends te{constructor(){super(JD.TEMPLATE),this.inProgress=!1,this.destroyRequested=!1}updateLayoutClasses(t,i){const s=this.eOverlayWrapper.classList;s.toggle("ag-layout-auto-height",i.autoHeight),s.toggle("ag-layout-normal",i.normal),s.toggle("ag-layout-print",i.print)}postConstruct(){this.createManagedBean(new Ah(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.registerOverlayWrapperComp(this)}setWrapperTypeClass(t){const i=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&i.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=t,i.toggle(t,!0)}showOverlay(t,i,s){this.inProgress||(this.setWrapperTypeClass(i),this.destroyActiveOverlay(),this.inProgress=!0,t&&t.then(n=>{this.inProgress=!1,this.eOverlayWrapper.appendChild(n.getGui()),this.activeOverlay=n,this.updateListenerDestroyFunc=s,this.destroyRequested&&(this.destroyRequested=!1,this.destroyActiveOverlay())}),this.setDisplayed(!0,{skipAriaHidden:!0}))}destroyActiveOverlay(){var t;if(this.inProgress){this.destroyRequested=!0;return}this.activeOverlay&&(this.activeOverlay=this.getContext().destroyBean(this.activeOverlay),(t=this.updateListenerDestroyFunc)==null||t.call(this),Xe(this.eOverlayWrapper))}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}destroy(){this.destroyActiveOverlay(),super.destroy()}};Iu.TEMPLATE=`
|
|
370
|
+
<div class="ag-overlay" role="presentation">
|
|
371
|
+
<div class="ag-overlay-panel" role="presentation">
|
|
372
|
+
<div class="ag-overlay-wrapper" ref="eOverlayWrapper" role="presentation"></div>
|
|
373
|
+
</div>
|
|
374
|
+
</div>`;h([f("overlayService")],Iu.prototype,"overlayService",2);h([_("eOverlayWrapper")],Iu.prototype,"eOverlayWrapper",2);h([I],Iu.prototype,"postConstruct",1);var vN=Iu,el=class extends L{getFirstRow(){let e=0,t;return this.pinnedRowModel.getPinnedTopRowCount()?t="top":this.rowModel.getRowCount()?(t=null,e=this.paginationProxy.getPageFirstRow()):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.paginationProxy.getPageLastRow()):s&&(t="top",e=s-1),e===void 0?null:{rowIndex:e,rowPinned:t}}getRowNode(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[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(A(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}};h([f("rowModel")],el.prototype,"rowModel",2);h([f("pinnedRowModel")],el.prototype,"pinnedRowModel",2);h([f("paginationProxy")],el.prototype,"paginationProxy",2);el=h([B("rowPositionUtils")],el);var wf=class extends L{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,n=e.rowIndex===t.rowIndex;return i&&s&&n}};wf=h([B("cellPositionUtils")],wf);var jl=class{constructor(e){this.cellValueChanges=e}},Hp=class extends jl{constructor(e,t,i,s){super(e),this.initialRange=t,this.finalRange=i,this.ranges=s}},eP=class tP{constructor(t){this.actionStack=[],this.maxStackSize=t||tP.DEFAULT_STACK_SIZE,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(t){t.cellValueChanges&&t.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(t))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}};eP.DEFAULT_STACK_SIZE=10;var Gy=eP,Ps=class extends L{constructor(){super(...arguments),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:r,rowIndex:o,column:l,oldValue:a,value:u}=e,d={rowPinned:r,rowIndex:o,columnId:l.getColId(),newValue:u,oldValue:a};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}init(){if(!this.gos.get("undoRedoCellEditing"))return;const e=this.gos.get("undoRedoCellEditingLimit");e<=0||(this.undoStack=new Gy(e),this.redoStack=new Gy(e),this.addRowEditingListeners(),this.addCellEditingListeners(),this.addPasteListeners(),this.addFillListeners(),this.addCellKeyListeners(),this.addManagedListener(this.eventService,g.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged),this.addManagedListener(this.eventService,g.EVENT_MODEL_UPDATED,t=>{t.keepUndoRedoStack||this.clearStacks()}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PINNED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_ROW_DRAG_END,this.clearStacks),this.ctrlsService.whenReady(t=>{this.gridBodyCtrl=t.gridBodyCtrl}))}getCurrentUndoStackSize(){return this.undoStack?this.undoStack.getCurrentStackSize():0}getCurrentRedoStackSize(){return this.redoStack?this.redoStack.getCurrentStackSize():0}undo(e){const t={type:g.EVENT_UNDO_STARTED,source:e};this.eventService.dispatchEvent(t);const i=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo"),s={type:g.EVENT_UNDO_ENDED,source:e,operationPerformed:i};this.eventService.dispatchEvent(s)}redo(e){const t={type:g.EVENT_REDO_STARTED,source:e};this.eventService.dispatchEvent(t);const i=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo"),s={type:g.EVENT_REDO_ENDED,source:e,operationPerformed:i};this.eventService.dispatchEvent(s)}undoRedo(e,t,i,s,n){if(!e)return!1;const r=e.pop();return!r||!r.cellValueChanges?!1:(this.processAction(r,o=>o[s],n),r instanceof Hp?this.processRange(this.rangeService,r.ranges||[r[i]]):this.processCell(r.cellValueChanges),t.push(r),!0)}processAction(e,t,i){e.cellValueChanges.forEach(s=>{const{rowIndex:n,rowPinned:r,columnId:o}=s,l={rowIndex:n,rowPinned:r},a=this.rowPositionUtils.getRowNode(l);a.displayed&&a.setDataValue(o,t(s),i)})}processRange(e,t){let i;e.removeAllCellRanges(!0),t.forEach((s,n)=>{if(!s)return;const r=s.startRow,o=s.endRow;n===t.length-1&&(i={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:s.startColumn.getColId()},this.setLastFocusedCell(i));const l={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:o.rowIndex,rowEndPinned:o.rowPinned,columnStart:s.startColumn,columns:s.columns};e.addCellRange(l)})}processCell(e){const t=e[0],{rowIndex:i,rowPinned:s}=t,n={rowIndex:i,rowPinned:s},r=this.rowPositionUtils.getRowNode(n),o={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(o,this.rangeService)}setLastFocusedCell(e,t){const{rowIndex:i,columnId:s,rowPinned:n}=e,r=this.gridBodyCtrl.getScrollFeature(),o=this.columnModel.getGridColumn(s);if(!o)return;r.ensureIndexVisible(i),r.ensureColumnVisible(o);const l={rowIndex:i,column:o,rowPinned:n};this.focusService.setFocusedCell(Ie(K({},l),{forceBrowserFocus:!0})),t==null||t.setRangeToCell(l)}addRowEditingListeners(){this.addManagedListener(this.eventService,g.EVENT_ROW_EDITING_STARTED,e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}}),this.addManagedListener(this.eventService,g.EVENT_ROW_EDITING_STOPPED,()=>{const e=new jl(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null})}addCellEditingListeners(){this.addManagedListener(this.eventService,g.EVENT_CELL_EDITING_STARTED,e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}}),this.addManagedListener(this.eventService,g.EVENT_CELL_EDITING_STOPPED,e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const i=new jl(this.cellValueChanges);this.pushActionsToUndoStack(i)}})}addPasteListeners(){this.addManagedListener(this.eventService,g.EVENT_PASTE_START,()=>{this.isPasting=!0}),this.addManagedListener(this.eventService,g.EVENT_PASTE_END,()=>{const e=new jl(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1})}addFillListeners(){this.addManagedListener(this.eventService,g.EVENT_FILL_START,()=>{this.isRangeInAction=!0}),this.addManagedListener(this.eventService,g.EVENT_FILL_END,e=>{const t=new Hp(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1})}addCellKeyListeners(){this.addManagedListener(this.eventService,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,()=>{this.isRangeInAction=!0}),this.addManagedListener(this.eventService,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,()=>{let e;this.rangeService&&this.gos.get("enableRangeSelection")?e=new Hp(this.cellValueChanges,void 0,void 0,[...this.rangeService.getCellRanges()]):e=new jl(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1})}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}};h([f("focusService")],Ps.prototype,"focusService",2);h([f("ctrlsService")],Ps.prototype,"ctrlsService",2);h([f("cellPositionUtils")],Ps.prototype,"cellPositionUtils",2);h([f("rowPositionUtils")],Ps.prototype,"rowPositionUtils",2);h([f("columnModel")],Ps.prototype,"columnModel",2);h([Se("rangeService")],Ps.prototype,"rangeService",2);h([I],Ps.prototype,"init",1);Ps=h([B("undoRedoService")],Ps);var qa=class extends L{findHeader(e,t){let i,s;if(e.column instanceof ht?i=this.columnModel.getDisplayedGroupAtDirection(e.column,t):(s=`getDisplayedCol${t}`,i=this.columnModel[s](e.column)),!i)return;let{headerRowIndex:n}=e;if(this.getHeaderRowType(n)!=="filter"){const l=[i];for(;i.getParent();)i=i.getParent(),l.push(i);i=l[l.length-1-n]}const{column:r,headerRowIndex:o}=this.getHeaderIndexToFocus(i,n);return{column:r,headerRowIndex:o}}getHeaderIndexToFocus(e,t){let i;if(e instanceof ht&&this.isAnyChildSpanningHeaderHeight(e)&&e.isPadding()){const s=e;i=s.getLeafColumns()[0];let n=i;for(;n!==s;)t++,n=n.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",n=i==="column";let r=s?e:e.getParent(),o=t-1,l=o;if(n&&this.isAnyChildSpanningHeaderHeight(e.getParent())){for(;r&&r.isPadding();)r=r.getParent(),o--;l=o,o<0&&(r=e,o=t,l=void 0)}return{column:r,headerRowIndex:o,headerRowIndexWithoutSpan:l}}getColumnVisibleChild(e,t,i="After"){const s=this.getHeaderRowType(t);let n=e,r=t+1,o=r;if(s==="group"){const l=e.getDisplayedLeafColumns(),a=i==="After"?l[0]:pe(l),u=[];let d=a;for(;d.getParent()!==e;)d=d.getParent(),u.push(d);if(n=a,a.isSpanHeaderHeight())for(let c=u.length-1;c>=0;c--){const p=u[c];if(!p.isPadding()){n=p;break}r++}else n=pe(u),n||(n=a)}return{column:n,headerRowIndex:r,headerRowIndexWithoutSpan:o}}getHeaderRowType(e){const t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){const i=this.columnModel.getAllDisplayedColumns(),s=i[t==="start"?0:i.length-1];if(!s)return;const r=this.ctrlsService.getHeaderRowContainerCtrl(s.getPinned()).getRowType(e);if(r=="group"){const o=this.columnModel.getColumnGroupAtLevel(s,e);return{headerRowIndex:e,column:o}}return{headerRowIndex:r==null?-1:e,column:s}}};h([f("columnModel")],qa.prototype,"columnModel",2);h([f("ctrlsService")],qa.prototype,"ctrlsService",2);qa=h([B("headerPositionUtils")],qa);var Sf=class{buildColumnDefs(e,t,i){const s=[],n={};return e.forEach(r=>{const o=this.createDefFromColumn(r,t,i);let l=!0,a=o,u=r.getOriginalParent(),d=null;for(;u;){let c=null;if(u.isPadding()){u=u.getOriginalParent();continue}const p=n[u.getGroupId()];if(p){p.children.push(a),l=!1;break}if(c=this.createDefFromGroup(u),c&&(c.children=[a],n[c.groupId]=c,a=c,u=u.getOriginalParent()),u!=null&&d===u){l=!1;break}d=u}l&&s.push(a)}),s}createDefFromGroup(e){const t=hc(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){const s=hc(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}};Sf=h([B("columnDefFactory")],Sf);var Xa=class{getInitialRowClasses(e){const t=[];return A(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"),tf(t,this.processClassesFromGridOptions(e.rowNode)),tf(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=r=>{typeof r=="string"?t.push(r):Array.isArray(r)&&r.forEach(o=>t.push(o))},s=this.gos.get("rowClass");if(s){if(typeof s=="function")return console.warn("AG Grid: rowClass should not be a function, please use getRowClass instead"),[];i(s)}const n=this.gos.getCallback("getRowClass");if(n){const r={data:e.data,node:e,rowIndex:e.rowIndex},o=n(r);i(o)}return t}preProcessRowClassRules(e){const t=[];return this.processRowClassRules(e,i=>{t.push(i)},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}};h([f("stylingService")],Xa.prototype,"stylingService",2);h([f("gridOptionsService")],Xa.prototype,"gos",2);Xa=h([B("rowCssClassCalculator")],Xa);var tl=class extends L{init(){this.isAccentedSort=this.gos.get("accentedSort"),this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup(),this.addManagedPropertyListener("accentedSort",e=>this.isAccentedSort=e.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup())}doFullSort(e,t){const i=(n,r)=>({currentPos:r,rowNode:n}),s=e.map(i);return s.sort(this.compareRowNodes.bind(this,t)),s.map(n=>n.rowNode)}compareRowNodes(e,t,i){const s=t.rowNode,n=i.rowNode;for(let r=0,o=e.length;r<o;r++){const l=e[r],a=l.sort==="desc",u=this.getValue(s,l.column),d=this.getValue(n,l.column);let c;const p=this.getComparator(l,s);if(p?c=p(u,d,s,n,a):c=Z.defaultComparator(u,d,this.isAccentedSort),!isNaN(c)&&c!==0)return l.sort==="asc"?c:c*-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 n=!t.group&&i.getColDef().field;if(!n)return;const r=this.columnModel.getPrimaryColumn(n);if(r)return r.getColDef().comparator}getValue(e,t){var i,s;if(!this.primaryColumnsSortGroups)return this.valueService.getValue(t,e,!1,!1);if(e.rowGroupColumn===t){if(this.gos.isGroupUseEntireRow(this.columnModel.isPivotActive())){const l=(i=e.allLeafChildren)==null?void 0:i[0];return l?this.valueService.getValue(t,l,!1,!1):void 0}const o=this.columnModel.getGroupDisplayColumnForGroup(t.getId());return o?(s=e.groupData)==null?void 0:s[o.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return this.valueService.getValue(t,e,!1,!1)}};h([f("valueService")],tl.prototype,"valueService",2);h([f("columnModel")],tl.prototype,"columnModel",2);h([I],tl.prototype,"init",1);tl=h([B("rowNodeSorter")],tl);var Er=class extends L{constructor(){super(...arguments),this.params={},this.ready=!1,this.readyCallbacks=[]}checkReady(){const e=this.params;this.ready=e.gridCtrl!=null&&e.gridBodyCtrl!=null&&e.center!=null&&e.left!=null&&e.right!=null&&e.bottomCenter!=null&&e.bottomLeft!=null&&e.bottomRight!=null&&e.topCenter!=null&&e.topLeft!=null&&e.topRight!=null&&e.stickyTopCenter!=null&&e.stickyTopLeft!=null&&e.stickyTopRight!=null&&e.stickyBottomCenter!=null&&e.stickyBottomLeft!=null&&e.stickyBottomRight!=null&&e.centerHeader!=null&&e.leftHeader!=null&&e.rightHeader!=null&&e.fakeHScrollComp!=null&&e.fakeVScrollComp!=null&&e.gridHeaderCtrl!=null,this.ready&&(this.readyCallbacks.forEach(t=>t(e)),this.readyCallbacks.length=0)}whenReady(e){this.ready?e(this.params):this.readyCallbacks.push(e)}register(e,t){this.params[e]=t,this.checkReady()}registerHeaderContainer(e,t){switch(t){case"left":this.params.leftHeader=e;break;case"right":this.params.rightHeader=e;break;default:this.params.centerHeader=e;break}this.checkReady()}get(e){return this.params[e]}getParams(){return this.params}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){return[this.params.leftHeader,this.params.rightHeader,this.params.centerHeader]}getHeaderRowContainerCtrl(e){switch(e){case"left":return this.params.leftHeader;case"right":return this.params.rightHeader;default:return this.params.centerHeader}}};Er.NAME="ctrlsService";Er=h([B(Er.NAME)],Er);var Ef=class extends L{constructor(){super(...arguments),this.registry={}}register(e){this.registry[e.controllerName]=e.controllerClass}getInstance(e){const t=this.registry[e];if(t!=null)return new t}};Ef=h([B("ctrlsFactory")],Ef);var Xr=class extends te{constructor(e,t){super(e),this.direction=t,this.hideTimeout=null}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",Km()||qs())}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=Qm(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=["mouseenter","mousedown","touchstart"],t=["mouseleave","touchend"],i=this.getGui();e.forEach(s=>this.addManagedListener(i,s,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0))),t.forEach(s=>this.addManagedListener(i,s,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1)))}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame(()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,e=>{e.direction===this.direction&&(this.hideTimeout!==null&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=null),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))}),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL_END,()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=null},400)})}attemptSettingScrollPosition(e){const t=this.getViewport();Nm(()=>di(t),()=>this.setScrollPosition(e),100)}getViewport(){return this.eViewport}getContainer(){return this.eContainer}onScrollCallback(e){this.addManagedListener(this.getViewport(),"scroll",e)}};h([_("eViewport")],Xr.prototype,"eViewport",2);h([_("eContainer")],Xr.prototype,"eContainer",2);h([f("scrollVisibleService")],Xr.prototype,"scrollVisibleService",2);h([f("ctrlsService")],Xr.prototype,"ctrlsService",2);h([f("animationFrameService")],Xr.prototype,"animationFrameService",2);var Zr=class iP extends Xr{constructor(){super(iP.TEMPLATE,"horizontal")}postConstruct(){super.postConstruct();const t=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,t),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,t),this.addManagedListener(this.eventService,g.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedPropertyListener("domLayout",t),this.ctrlsService.register("fakeHScrollComp",this),this.createManagedBean(new dl(i=>this.eContainer.style.width=`${i}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 t=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom=`${t}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const t=this.scrollVisibleService.isVerticalScrollShowing();let i=this.columnModel.getDisplayedColumnsRightWidth();const s=!this.enableRtl&&t,n=this.gos.getScrollbarWidth();s&&(i+=n),Vi(this.eRightSpacer,i),this.eRightSpacer.classList.toggle("ag-scroller-corner",i<=n);let r=this.columnModel.getDisplayedColumnsLeftWidth();this.enableRtl&&t&&(r+=n),Vi(this.eLeftSpacer,r),this.eLeftSpacer.classList.toggle("ag-scroller-corner",r<=n)}setScrollVisible(){const t=this.scrollVisibleService.isHorizontalScrollShowing(),i=this.invisibleScrollbar,s=this.gos.get("suppressHorizontalScroll"),n=t&&this.gos.getScrollbarWidth()||0,o=s?0:n===0&&i?16:n;this.addOrRemoveCssClass("ag-scrollbar-invisible",i),vr(this.getGui(),o),vr(this.eViewport,o),vr(this.eContainer,o),this.setDisplayed(t,{skipAriaHidden:!0})}getScrollPosition(){return Va(this.getViewport(),this.enableRtl)}setScrollPosition(t){di(this.getViewport())||this.attemptSettingScrollPosition(t),Ha(this.getViewport(),t,this.enableRtl)}};Zr.TEMPLATE=`<div class="ag-body-horizontal-scroll" aria-hidden="true">
|
|
375
|
+
<div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>
|
|
376
|
+
<div class="ag-body-horizontal-scroll-viewport" ref="eViewport">
|
|
377
|
+
<div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>
|
|
378
|
+
</div>
|
|
379
|
+
<div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>
|
|
380
|
+
</div>`;h([_("eLeftSpacer")],Zr.prototype,"eLeftSpacer",2);h([_("eRightSpacer")],Zr.prototype,"eRightSpacer",2);h([f("columnModel")],Zr.prototype,"columnModel",2);h([f("pinnedRowModel")],Zr.prototype,"pinnedRowModel",2);h([I],Zr.prototype,"postConstruct",1);var yN=Zr,Za=class extends L{postConstruct(){const e=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const e=this.gos.isDomLayout("print"),t=e?0:this.columnModel.getDisplayedColumnsLeftWidth(),i=e?0:this.columnModel.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:g.EVENT_LEFT_PINNED_WIDTH_CHANGED})),i!=this.rightWidth&&(this.rightWidth=i,this.eventService.dispatchEvent({type:g.EVENT_RIGHT_PINNED_WIDTH_CHANGED}))}getPinnedRightWidth(){return this.rightWidth}getPinnedLeftWidth(){return this.leftWidth}};h([f("columnModel")],Za.prototype,"columnModel",2);h([I],Za.prototype,"postConstruct",1);Za=h([B("pinnedWidthService")],Za);var il=class extends L{constructor(){super(...arguments),this.events=[]}postConstruct(){this.rowModel.getType()=="clientSide"&&(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())}};h([f("animationFrameService")],il.prototype,"animationFrameService",2);h([f("rowModel")],il.prototype,"rowModel",2);h([I],il.prototype,"postConstruct",1);il=h([B("rowNodeEventThrottle")],il);var wN={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"},dndSource:{version:"31.2",message:"This feature has been replaced by `Row Dragging to an External DropZone`."},dndSourceOnRowDrag:{version:"31.2",message:"This feature has been replaced by `Row Dragging to an External DropZone`."}},on=(e,t)=>{var i;return((i=t.rowModelType)!=null?i:"clientSide")==="clientSide"?{module:"@ag-grid-enterprise/row-grouping"}:null},SN={enableRowGroup:on,rowGroup:on,rowGroupIndex:on,enablePivot:on,enableValue:on,pivot:on,pivotIndex:on,aggFunc:on,cellEditor:e=>e.cellEditor==="agRichSelect"||e.cellEditor==="agRichSelectCellEditor"?{module:"@ag-grid-enterprise/rich-select"}:null,menuTabs:e=>{var t;const i=["columnsMenuTab","generalMenuTab"];return(t=e.menuTabs)!=null&&t.some(s=>i.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"],dependencies:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],dependencies:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],dependencies:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},children:()=>So},EN={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},RN=Object.keys(EN),So={objectName:"colDef",allProperties:RN,docsUrl:"column-properties/",deprecations:wN,validations:SN},TN={enableChartToolPanelsButton:{version:"29"},functionsPassive:{version:"29.2"},onColumnRowGroupChangeRequest:{version:"29.2"},onColumnPivotChangeRequest:{version:"29.2"},onColumnValueChangeRequest:{version:"29.2"},onColumnAggFuncChangeRequest:{version:"29.2"},serverSideFilterAllLevels:{version:"30",message:"All server-side group levels are now filtered by default. This can be toggled using `serverSideOnlyRefreshFilteredGroups`."},suppressAggAtRootLevel:{version:"30",message:"The root level aggregation is now suppressed by default. This can be toggled using `alwaysAggregateAtRootLevel`."},excludeHiddenColumnsFromQuickFilter:{version:"30",message:"Hidden columns are now excluded from the Quick Filter by default. This can be toggled using `includeHiddenColumnsInQuickFilter`."},enterMovesDown:{version:"30",renamed:"enterNavigatesVertically"},enterMovesDownAfterEdit:{version:"30",renamed:"enterNavigatesVerticallyAfterEdit"},suppressParentsInRowNodes:{version:"30.2",message:"Using suppressParentsInRowNodes is no longer recommended. To serialize nodes it is now recommended to instead remove the parent node reference before serialization."},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."}},DN={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!1,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,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!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,suppressChartToolPanelsButton:!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,functionsPassive:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1},PN={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",dependencies:e=>{var t;const i=(t=e.rowModelType)!=null?t:"clientSide";switch(i){case"clientSide":const s=`treeData requires 'getDataPath' in the ${i} row model.`;return e.getDataPath?null:s;case"serverSide":const n=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return e.isServerSideGroup&&e.getServerSideGroupKey?null:n}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"],dependencies:e=>{var t;switch((t=e.rowModelType)!=null?t:"clientSide"){case"clientSide":return null;case"serverSide":return e.suppressServerSideInfiniteScroll?"groupIncludeFooter is not supported alongside suppressServerSideInfiniteScroll":null}return null}},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"]}},suppressParentsInRowNodes:{dependencies:{groupSelectsChildren:[void 0,!1]}},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"},columnDefs:()=>So,defaultColDef:()=>So,defaultColGroupDef:()=>So,autoGroupColumnDef:()=>So},bN={objectName:"gridOptions",allProperties:[...Oa.ALL_PROPERTIES,...mc.EVENT_CALLBACKS],propertyExceptions:["api","columnApi"],docsUrl:"grid-options/",deprecations:TN,validations:PN},ve=class{constructor(){this.destroyed=!1,this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new ls,this.globalEventHandlerFactory=e=>(t,i)=>{if(this.destroyed)return;const s=yd.has(t);if(s&&!e||!s&&e)return;const n=mc.getCallbackForEvent(t),r=this.gridOptions[n];typeof r=="function"&&this.frameworkOverrides.wrapOutgoing(()=>{r(i)})}}get context(){return this.gridOptions.context}init(){this.columnApi=new Qo(this.api);const e=!this.get("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),e),this.eventService.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propertyEventService.setFrameworkOverrides(this.frameworkOverrides),this.getScrollbarWidth()}destroy(){this.destroyed=!0,this.columnApi=void 0}get(e){var t;return(t=this.gridOptions[e])!=null?t:DN[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return A(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(i=>{const s=i;return s.api=this.api,s.columnApi=this.columnApi,s.context=this.context,e(s)})}static toBoolean(e){return typeof e=="boolean"?e:typeof e=="string"?e.toUpperCase()==="TRUE"||e=="":!1}static toNumber(e){if(typeof e=="number")return e;if(typeof e=="string"){const t=parseInt(e);return isNaN(t)?void 0:t}}static toConstrainedNum(e,t){return i=>{const s=ve.toNumber(i);if(!(s==null||s<e||s>t))return s}}static getCoercedValue(e,t){const i=ve.PROPERTY_COERCIONS.get(e);return i?i(t):t}static getCoercedGridOptions(e){const t={};return Object.entries(e).forEach(([i,s])=>{const n=ve.getCoercedValue(i,s);t[i]=n}),t}updateGridOptions({options:e,force:t,source:i="api"}){const s={id:ve.changeSetId++,properties:[]},n=[];Object.entries(e).forEach(([r,o])=>{i==="api"&&tM[r]&&Y(`${r} is an initial property and cannot be updated.`);const l=ve.getCoercedValue(r,o),a=t||typeof l=="object"&&i==="api",u=this.gridOptions[r];if(a||u!==l){this.gridOptions[r]=l;const d={type:r,currentValue:l,previousValue:u,changeSet:s,source:i};n.push(d)}}),this.validationService.processGridOptions(this.gridOptions),s.properties=n.map(r=>r.type),n.forEach(r=>{this.gridOptions.debug&&console.log(`AG Grid: Updated property ${r.type} from `,r.previousValue," to ",r.currentValue),this.propertyEventService.dispatchEvent(r)})}addEventListener(e,t){this.propertyEventService.addEventListener(e,t)}removeEventListener(e,t){this.propertyEventService.removeEventListener(e,t)}getScrollbarWidth(){if(this.scrollbarWidth==null){const t=typeof this.gridOptions.scrollbarWidth=="number"&&this.gridOptions.scrollbarWidth>=0?this.gridOptions.scrollbarWidth:vT();t!=null&&(this.scrollbarWidth=t,this.eventService.dispatchEvent({type:g.EVENT_SCROLLBAR_WIDTH_CHANGED}))}return this.scrollbarWidth}isRowModelType(e){return this.gridOptions.rowModelType===e||e==="clientSide"&&J(this.gridOptions.rowModelType)}isDomLayout(e){var t;return((t=this.gridOptions.domLayout)!=null?t:"normal")===e}isRowSelection(){return this.gridOptions.rowSelection==="single"||this.gridOptions.rowSelection==="multiple"}useAsyncEvents(){return!this.get("suppressAsyncEvents")}isGetRowHeightFunction(){return typeof this.gridOptions.getRowHeight=="function"}getRowHeightForNode(e,t=!1,i){if(i==null&&(i=this.environment.getDefaultRowHeight()),this.isGetRowHeightFunction()){if(t)return{height:i,estimated:!0};const n={node:e,data:e.data},r=this.getCallback("getRowHeight")(n);if(this.isNumeric(r))return r===0&&Y("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,r),estimated:!1}}return e.detail&&this.get("masterDetail")?this.getMasterDetailRowHeight():{height:this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:i,estimated:!1}}getMasterDetailRowHeight(){return this.get("detailRowAutoHeight")?{height:1,estimated:!1}:this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1}}getRowHeightAsNumber(){if(!this.gridOptions.rowHeight||J(this.gridOptions.rowHeight))return this.environment.getDefaultRowHeight();const e=this.environment.refreshRowHeightVariable();return e!==-1?e:(console.warn("AG Grid row height must be a number if not using standard row model"),this.environment.getDefaultRowHeight())}isNumeric(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}getDomDataKey(){return this.domDataKey}getDomData(e,t){const i=e[this.getDomDataKey()];return i?i[t]:void 0}setDomData(e,t,i){const s=this.getDomDataKey();let n=e[s];J(n)&&(n={},e[s]=n),n[t]=i}getDocument(){let e=null;return this.gridOptions.getDocument&&A(this.gridOptions.getDocument)?e=this.gridOptions.getDocument():this.eGridDiv&&(e=this.eGridDiv.ownerDocument),e&&A(e)?e:document}getWindow(){return this.getDocument().defaultView||window}getRootNode(){return this.eGridDiv.getRootNode()}getActiveDomElement(){return this.getRootNode().activeElement}getAsyncTransactionWaitMillis(){return A(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:50}isAnimateRows(){return this.get("ensureDomOrder")?!1:this.get("animateRows")}isGroupRowsSticky(){return!(this.get("paginateChildRows")||this.get("groupHideOpenParents")||this.isDomLayout("print"))}isColumnsSortingCoupledToGroup(){const e=this.gridOptions.autoGroupColumnDef;return!(e!=null&&e.comparator)&&!this.get("treeData")}getGroupAggFiltering(){const e=this.gridOptions.groupAggFiltering;if(typeof e=="function")return this.getCallback("groupAggFiltering");if(e===!0)return()=>!0}getGrandTotalRow(){const e=this.gridOptions.grandTotalRow;if(e)return e;if(this.gridOptions.groupIncludeTotalFooter)return"bottom"}getGroupTotalRowCallback(){const e=this.get("groupTotalRow");if(typeof e=="function")return this.getCallback("groupTotalRow");if(e)return()=>e;const t=this.get("groupIncludeFooter");if(typeof t=="function"){const i=this.getCallback("groupIncludeFooter");return s=>i(s)?"bottom":void 0}return()=>t?"bottom":void 0}isGroupMultiAutoColumn(){return this.gridOptions.groupDisplayType?this.gridOptions.groupDisplayType==="multipleColumns":this.get("groupHideOpenParents")}isGroupUseEntireRow(e){return e?!1:this.gridOptions.groupDisplayType==="groupRows"}getGridCommonParams(){return{api:this.api,columnApi:this.columnApi,context:this.context}}addGridCommonParams(e){const t=e;return t.api=this.api,t.columnApi=this.columnApi,t.context=this.context,t}};ve.PROPERTY_COERCIONS=new Map([...Oa.BOOLEAN_PROPERTIES.map(e=>[e,ve.toBoolean]),...Oa.NUMBER_PROPERTIES.map(e=>[e,ve.toNumber]),["groupAggFiltering",e=>typeof e=="function"?e:ve.toBoolean(e)],["pageSize",ve.toConstrainedNum(1,Number.MAX_VALUE)],["autoSizePadding",ve.toConstrainedNum(0,Number.MAX_VALUE)],["keepDetailRowsCount",ve.toConstrainedNum(1,Number.MAX_VALUE)],["rowBuffer",ve.toConstrainedNum(0,Number.MAX_VALUE)],["infiniteInitialRowCount",ve.toConstrainedNum(1,Number.MAX_VALUE)],["cacheOverflowSize",ve.toConstrainedNum(1,Number.MAX_VALUE)],["cacheBlockSize",ve.toConstrainedNum(1,Number.MAX_VALUE)],["serverSideInitialRowCount",ve.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelPageSize",ve.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelBufferSize",ve.toConstrainedNum(0,Number.MAX_VALUE)]]);ve.changeSetId=0;h([f("gridOptions")],ve.prototype,"gridOptions",2);h([f("eventService")],ve.prototype,"eventService",2);h([f("environment")],ve.prototype,"environment",2);h([f("frameworkOverrides")],ve.prototype,"frameworkOverrides",2);h([f("eGridDiv")],ve.prototype,"eGridDiv",2);h([f("validationService")],ve.prototype,"validationService",2);h([f("gridApi")],ve.prototype,"api",2);h([I],ve.prototype,"init",1);h([$t],ve.prototype,"destroy",1);ve=h([B("gridOptionsService")],ve);var Rf=class extends L{getLocaleTextFunc(){const e=this.gos.getCallback("getLocaleText");if(e)return(i,s,n)=>e({key:i,defaultValue:s,variableValues:n});const t=this.gos.get("localeText");return(i,s,n)=>{let r=t&&t[i];if(r&&n&&n.length){let o=0;for(;!(o>=n.length||r.indexOf("${variable}")===-1);)r=r.replace("${variable}",n[o++])}return r??s}}};Rf=h([B("localeService")],Rf);var LC=class sP extends Xr{constructor(){super(sP.TEMPLATE,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new Lh(this.eContainer)),this.ctrlsService.register("fakeVScrollComp",this),this.addManagedListener(this.eventService,g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onRowContainerHeightChanged.bind(this))}setScrollVisible(){const t=this.scrollVisibleService.isVerticalScrollShowing(),i=this.invisibleScrollbar,s=t&&this.gos.getScrollbarWidth()||0,n=s===0&&i?16:s;this.addOrRemoveCssClass("ag-scrollbar-invisible",i),Vi(this.getGui(),n),Vi(this.eViewport,n),Vi(this.eContainer,n),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(){const{ctrlsService:t}=this,s=t.getGridBodyCtrl().getBodyViewportElement(),n=this.getScrollPosition(),r=s.scrollTop;n!=r&&this.setScrollPosition(r,!0)}getScrollPosition(){return this.getViewport().scrollTop}setScrollPosition(t,i){!i&&!di(this.getViewport())&&this.attemptSettingScrollPosition(t),this.getViewport().scrollTop=t}};LC.TEMPLATE=`<div class="ag-body-vertical-scroll" aria-hidden="true">
|
|
381
|
+
<div class="ag-body-vertical-scroll-viewport" ref="eViewport">
|
|
382
|
+
<div class="ag-body-vertical-scroll-container" ref="eContainer"></div>
|
|
383
|
+
</div>
|
|
384
|
+
</div>`;h([I],LC.prototype,"postConstruct",1);var FN=LC,ky={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Vy=["january","february","march","april","may","june","july","august","september","october","november","december"],_r=class extends L{constructor(){super(...arguments),this.dataTypeDefinitions={},this.isWaitingForRowData=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}init(){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(wo(e.source))})}processDataTypeDefinitions(){var e;const t=this.getDefaultDataTypes();this.dataTypeDefinitions={},Object.entries(t).forEach(([s,n])=>{this.dataTypeDefinitions[s]=Ie(K({},n),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(n)})});const i=(e=this.gos.get("dataTypeDefinitions"))!=null?e:{};this.dataTypeMatchers={},Object.entries(i).forEach(([s,n])=>{const r=this.processDataTypeDefinition(n,i,[s],t);r&&(this.dataTypeDefinitions[s]=r,n.dataTypeMatcher&&(this.dataTypeMatchers[s]=n.dataTypeMatcher))}),this.checkObjectValueHandlers(t),["dateString","text","number","boolean","date"].forEach(s=>{const n=this.dataTypeMatchers[s];n&&delete this.dataTypeMatchers[s],this.dataTypeMatchers[s]=n??t[s].dataTypeMatcher})}mergeDataTypeDefinitions(e,t){const i=K(K({},e),t);return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...this.convertColumnTypes(e.columnTypes),...this.convertColumnTypes(t.columnTypes)]),i}processDataTypeDefinition(e,t,i,s){let n;const r=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let o=s[r];const l=t[r];if(o&&l&&(o=l),!this.validateDataTypeDefinition(e,o,r))return;n=this.mergeDataTypeDefinitions(o,e)}else{if(i.includes(r)){Y('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');return}const o=t[r];if(!this.validateDataTypeDefinition(e,o,r))return;const l=this.processDataTypeDefinition(o,t,[...i,r],s);if(!l)return;n=this.mergeDataTypeDefinitions(l,e)}return Ie(K({},n),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(n)})}validateDataTypeDefinition(e,t,i){return t?t.baseDataType!==e.baseDataType?(Y('The "baseDataType" property of a data type definition must match that of its parent.'),!1):!0:(Y(`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 n=t.column.getAggFunc();if(n){if(n==="first"||n==="last")return e.valueFormatter(t);if(e.baseDataType==="number"&&n!=="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(Ie(K({},t),{value:t.value.toNumber()}));if("value"in t.value)return e.valueFormatter(Ie(K({},t),{value:t.value.value}))}}}if(!this.gos.get("suppressGroupMaintainValueType"))return}else if(this.groupHideOpenParents&&t.column.isRowGroupActive()){if(typeof t.value!="string"||(s=e.dataTypeMatcher)!=null&&s.call(e,t.value))return e.valueFormatter(t);if(!this.gos.get("suppressGroupMaintainValueType"))return}return e.valueFormatter(t)}}updateColDefAndGetDataTypeDefinitionColumnType(e,t,i){let{cellDataType:s}=t;const{field:n}=t;if(s===void 0&&(s=e.cellDataType),(s==null||s===!0)&&(s=this.canInferCellDataType(e,t)?this.inferCellDataType(n,i):!1),!s){e.cellDataType=!1;return}const r=this.dataTypeDefinitions[s];if(!r){Y(`Missing data type definition - "${s}"`);return}return e.cellDataType=s,r.groupSafeValueFormatter&&(e.valueFormatter=r.groupSafeValueFormatter),r.valueParser&&(e.valueParser=r.valueParser),r.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,r,i),r.columnTypes}updateColDefAndGetColumnType(e,t,i){var s,n;const r=this.updateColDefAndGetDataTypeDefinitionColumnType(e,t,i),o=(n=(s=t.type)!=null?s:r)!=null?n:e.type;return e.type=o,o?this.convertColumnTypes(o):void 0}addColumnListeners(e){if(!this.isWaitingForRowData)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const i=s=>{t.add(s.key)};e.addEventListener(Pe.EVENT_STATE_UPDATED,i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.removeEventListener(Pe.EVENT_STATE_UPDATED,i))}canInferCellDataType(e,t){var i;if(this.rowModel.getType()!=="clientSide")return!1;const s={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(this.doColDefPropsPreventInference(t,s))return!1;const n=t.type===null?e.type:t.type;if(n){const r=(i=this.gos.get("columnTypes"))!=null?i:{};if(this.convertColumnTypes(n).some(l=>{const a=r[l.trim()];return a&&this.doColDefPropsPreventInference(a,s)}))return!1}return!this.doColDefPropsPreventInference(e,s)}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 n=e[i];return n===null?(t[i]=!1,!1):s===void 0?!!n:n===s}inferCellDataType(e,t){var i;if(!e)return;let s;const n=this.getInitialData();if(n){const o=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");s=Ao(n,e,o)}else this.initWaitForRowData(t);if(s==null)return;const[r]=(i=Object.entries(this.dataTypeMatchers).find(([o,l])=>l(s)))!=null?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.addManagedListener(this.eventService,g.EVENT_ROW_DATA_UPDATE_STARTED,s=>{const{firstRowData:n}=s;if(!n)return;i==null||i(),this.isWaitingForRowData=!1,this.processColumnsPendingInference(n,t),this.columnStateUpdatesPendingInference={},t&&this.columnModel.processResizeOperations();const r={type:g.EVENT_DATA_TYPES_INFERRED};this.eventService.dispatchEvent(r)})}isPendingInference(){return this.isWaitingForRowData}processColumnsPendingInference(e,t){this.initialData=e;const i=[];this.columnStateUpdateListenerDestroyFuncs.forEach(r=>r()),this.columnStateUpdateListenerDestroyFuncs=[];const s={},n={};Object.entries(this.columnStateUpdatesPendingInference).forEach(([r,o])=>{const l=this.columnModel.getGridColumn(r);if(!l)return;const a=l.getColDef();if(!this.columnModel.resetColumnDefIntoColumn(l,"cellDataTypeInferred"))return;const u=l.getColDef();if(t&&u.type&&u.type!==a.type){const d=this.getUpdatedColumnState(l,o);d.rowGroup&&d.rowGroupIndex==null&&(s[r]=d),d.pivot&&d.pivotIndex==null&&(n[r]=d),i.push(d)}}),t&&i.push(...this.columnModel.generateColumnStateForRowGroupAndPivotIndexes(s,n)),i.length&&this.columnModel.applyColumnState({state:i},"cellDataTypeInferred"),this.initialData=null}getUpdatedColumnState(e,t){const i=this.columnModel.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}convertColumnTypes(e){let t=[];return e instanceof Array?e.some(s=>typeof s!="string")?console.warn("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:typeof e=="string"?t=e.split(","):console.warn("colDef.type should be of type 'string' | 'string[]'"),t}getDateStringTypeDefinition(e){var t;return e?(t=this.getDataTypeDefinition(e))!=null?t: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 i;if(t==null)return!0;const s=(i=this.getDataTypeDefinition(e))==null?void 0:i.dataTypeMatcher;return s?s(t):!0}validateColDef(e){e.cellDataType==="object"&&(e.valueFormatter===this.dataTypeDefinitions.object.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&Y('Cell data type is "object" but no value formatter has been provided. Please either provide an object data type definition with a value formatter, or set "colDef.valueFormatter"'),e.editable&&e.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&Y('Cell data type is "object" but no value parser has been provided. Please either provide an object data type definition with a value parser, or set "colDef.valueParser"'))}setColDefPropertiesForBaseDataType(e,t,i){const s=(l,a,u)=>{let d=l.getColDef().valueFormatter;return d===t.groupSafeValueFormatter&&(d=t.valueFormatter),this.valueService.formatValue(l,a,u,d)},n=Ce.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()),r=this.localeService.getLocaleTextFunc(),o=l=>{const{filterParams:a}=e;e.filterParams=typeof a=="object"?K(K({},a),l):l};switch(t.baseDataType){case"number":{e.cellEditor="agNumberCellEditor",n&&o({comparator:(l,a)=>{const u=l==null?0:parseInt(l),d=a==null?0:parseInt(a);return u===d?0:u>d?1:-1}});break}case"boolean":{e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=l=>!!l.colDef.editable&&l.event.key===D.SPACE,o(n?{valueFormatter:l=>A(l.value)?r(String(l.value),l.value?"True":"False"):r("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(l,a)=>a,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(l,a)=>a===!1,numberOfInputs:0}]});break}case"date":{e.cellEditor="agDateCellEditor",e.keyCreator=l=>s(l.column,l.node,l.value),n&&o({valueFormatter:l=>{const a=s(l.column,l.node,l.value);return A(a)?a:r("blanks","(Blanks)")},treeList:!0,treeListFormatter:(l,a)=>{if(a===1&&l!=null){const u=Vy[Number(l)-1];return r(u,ky[u])}return l??r("blanks","(Blanks)")}});break}case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=a=>s(a.column,a.node,a.value);const l=t.dateParser;o(n?{valueFormatter:a=>{const u=s(a.column,a.node,a.value);return A(u)?u:r("blanks","(Blanks)")},treeList:!0,treeListPathGetter:a=>{const u=l(a??void 0);return u?[String(u.getFullYear()),String(u.getMonth()+1),String(u.getDate())]:null},treeListFormatter:(a,u)=>{if(u===1&&a!=null){const d=Vy[Number(a)-1];return r(d,ky[d])}return a??r("blanks","(Blanks)")}}:{comparator:(a,u)=>{const d=l(u);return u==null||d<a?-1:d>a?1:0}});break}case"object":{e.cellEditorParams={useFormatter:!0},e.comparator=(l,a)=>{const u=this.columnModel.getPrimaryColumn(i),d=u==null?void 0:u.getColDef();if(!u||!d)return 0;const c=l==null?"":s(u,null,l),p=a==null?"":s(u,null,a);return c===p?0:c>p?1:-1},e.keyCreator=l=>s(l.column,l.node,l.value),n?o({valueFormatter:l=>{const a=s(l.column,l.node,l.value);return A(a)?a:r("blanks","(Blanks)")}}):e.filterValueGetter=l=>s(l.column,l.node,this.valueService.getValue(l.column,l.node));break}}}getDefaultDataTypes(){const e=i=>!!i.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:i=>{var s,n;return((n=(s=i.newValue)==null?void 0:s.trim)==null?void 0:n.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:Ma(i.newValue),dataTypeMatcher:i=>typeof i=="string"},boolean:{baseDataType:"boolean",valueParser:i=>{var s,n;return i.newValue==null?i.newValue:((n=(s=i.newValue)==null?void 0:s.trim)==null?void 0:n.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=>si(i.newValue==null?null:String(i.newValue)),valueFormatter:i=>{var s;return i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):(s=ki(i.value,!1))!=null?s:""},dataTypeMatcher:i=>i instanceof Date},dateString:{baseDataType:"dateString",dateParser:i=>{var s;return(s=si(i))!=null?s:void 0},dateFormatter:i=>{var s;return(s=ki(i??null,!1))!=null?s: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=>{var s;return(s=Ma(i.value))!=null?s:""}}}}};h([f("rowModel")],_r.prototype,"rowModel",2);h([f("columnModel")],_r.prototype,"columnModel",2);h([f("valueService")],_r.prototype,"valueService",2);h([I],_r.prototype,"init",1);_r=h([B("dataTypeService")],_r);var Or=class extends L{constructor(){super(...arguments),this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.ctrlsService.whenReady(()=>{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.dispatchGridReadyEvent();const e=Ce.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId());new xC("AG Grid",()=>this.gos.get("debug")).log(`initialised successfully, enterprise = ${e}`)}dispatchGridReadyEvent(){const e={type:g.EVENT_GRID_READY};this.eventService.dispatchEvent(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,wo(e.source))}}};h([f("ctrlsService")],Or.prototype,"ctrlsService",2);h([f("columnModel")],Or.prototype,"columnModel",2);h([f("rowModel")],Or.prototype,"rowModel",2);h([I],Or.prototype,"postConstruct",1);Or=h([B("syncService")],Or);var Gr=class extends L{constructor(){super(...arguments),this.manuallyDisplayed=!1}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_ROW_DATA_UPDATED,()=>this.onRowDataUpdated()),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.onNewColumnsLoaded())}registerOverlayWrapperComp(e){this.overlayWrapperComp=e,(!this.gos.get("columnDefs")||this.gos.isRowModelType("clientSide")&&!this.gos.get("rowData"))&&this.showLoadingOverlay()}showLoadingOverlay(){if(this.gos.get("suppressLoadingOverlay"))return;const e={},t=this.userComponentFactory.getLoadingOverlayCompDetails(e);this.showOverlay(t,"ag-overlay-loading-wrapper","loadingOverlayComponentParams")}showNoRowsOverlay(){if(this.gos.get("suppressNoRowsOverlay"))return;const e={},t=this.userComponentFactory.getNoRowsOverlayCompDetails(e);this.showOverlay(t,"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams")}showOverlay(e,t,i){const s=e.newAgStackInstance(),n=this.addManagedPropertyListener(i,({currentValue:r})=>{s.then(o=>{o.refresh&&o.refresh(this.gos.addGridCommonParams(K({},r??{})))})});this.manuallyDisplayed=this.columnModel.isReady()&&!this.paginationProxy.isEmpty(),this.overlayWrapperComp.showOverlay(s,t,n)}hideOverlay(){this.manuallyDisplayed=!1,this.overlayWrapperComp.hideOverlay()}showOrHideOverlay(){const e=this.paginationProxy.isEmpty(),t=this.gos.get("suppressNoRowsOverlay");e&&!t?this.showNoRowsOverlay():this.hideOverlay()}onRowDataUpdated(){this.showOrHideOverlay()}onNewColumnsLoaded(){this.columnModel.isReady()&&!this.paginationProxy.isEmpty()&&!this.manuallyDisplayed&&this.hideOverlay()}};h([f("userComponentFactory")],Gr.prototype,"userComponentFactory",2);h([f("paginationProxy")],Gr.prototype,"paginationProxy",2);h([f("columnModel")],Gr.prototype,"columnModel",2);h([I],Gr.prototype,"postConstruct",1);Gr=h([B("overlayService")],Gr);var Ht=class extends L{constructor(){super(...arguments),this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=kt(()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=kt(()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),0),this.onRowSelectedDebounced=kt(()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){var e;this.isClientSideRowModel=this.rowModel.getType()==="clientSide",this.cachedState=(e=this.gos.get("initialState"))!=null?e:{},this.ctrlsService.whenReady(()=>this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnGridReady()));const t=this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,({source:n})=>{n==="gridInitializing"&&(t==null||t(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnColumnsInitialised()))}),i=this.addManagedListener(this.eventService,g.EVENT_ROW_COUNT_READY,()=>{i==null||i(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnRowCountReady())}),s=this.addManagedListener(this.eventService,g.EVENT_FIRST_DATA_RENDERED,()=>{s==null||s(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnFirstDataRendered())})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){this.updateCachedState("sideBar",this.getSideBarState()),this.addManagedListener(this.eventService,g.EVENT_TOOL_PANEL_VISIBLE_CHANGED,()=>this.updateCachedState("sideBar",this.getSideBarState())),this.addManagedListener(this.eventService,g.EVENT_SIDE_BAR_UPDATED,()=>this.updateCachedState("sideBar",this.getSideBarState()))}setupStateOnColumnsInitialised(){var e;const t=(e=this.gos.get("initialState"))!=null?e:{};this.setColumnState(t),this.setColumnGroupState(t),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,()=>this.updateColumnState(["aggregation"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,()=>this.updateColumnState(["columnOrder"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PINNED,()=>this.updateColumnState(["columnPinning"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_RESIZED,()=>this.updateColumnState(["columnSizing"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,()=>this.updateColumnState(["columnVisibility"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,()=>this.updateColumnState(["pivot"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.updateColumnState(["pivot"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateColumnState(["rowGroup"])),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,()=>this.updateColumnState(["sort"])),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,()=>this.updateCachedState("columnGroup",this.getColumnGroupState()))}setupStateOnRowCountReady(){var e;const{filter:t,rowGroupExpansion:i,rowSelection:s,pagination:n}=(e=this.gos.get("initialState"))!=null?e:{},r=this.gos.get("advancedFilterModel");(t||r)&&this.setFilterState(t,r),i&&this.setRowGroupExpansionState(i),s&&this.setRowSelectionState(s),n&&this.setPaginationState(n),this.updateCachedState("filter",this.getFilterState()),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState()),this.addManagedListener(this.eventService,g.EVENT_FILTER_CHANGED,()=>this.updateCachedState("filter",this.getFilterState())),this.addManagedListener(this.eventService,g.EVENT_ROW_GROUP_OPENED,()=>this.onRowGroupOpenedDebounced()),this.addManagedListener(this.eventService,g.EVENT_EXPAND_COLLAPSE_ALL,()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())),this.addManagedListener(this.eventService,g.EVENT_SELECTION_CHANGED,()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()}),this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,o=>{(o.newPage||o.newPageSize)&&this.updateCachedState("pagination",this.getPaginationState())})}setupStateOnFirstDataRendered(){var e;const{scroll:t,rangeSelection:i,focusedCell:s,columnOrder:n}=(e=this.gos.get("initialState"))!=null?e:{};s&&this.setFocusedCellState(s),i&&this.setRangeSelectionState(i),t&&this.setScrollState(t),this.setColumnPivotState(!!(n!=null&&n.orderedColIds)),this.updateCachedState("sideBar",this.getSideBarState()),this.updateCachedState("focusedCell",this.getFocusedCellState()),this.updateCachedState("rangeSelection",this.getRangeSelectionState()),this.updateCachedState("scroll",this.getScrollState()),this.addManagedListener(this.eventService,g.EVENT_CELL_FOCUSED,()=>this.updateCachedState("focusedCell",this.getFocusedCellState())),this.addManagedListener(this.eventService,g.EVENT_RANGE_SELECTION_CHANGED,r=>{r.finished&&this.updateCachedState("rangeSelection",this.getRangeSelectionState())}),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL_END,()=>this.updateCachedState("scroll",this.getScrollState()))}getColumnState(){const e=this.columnModel.isPivotMode(),t=[],i=[],s=[],n=[],r=[],o=[],l=[],a=[],u=[],d=this.columnModel.getColumnState();for(let c=0;c<d.length;c++){const{colId:p,sort:C,sortIndex:v,rowGroup:S,rowGroupIndex:E,aggFunc:w,pivot:m,pivotIndex:R,pinned:T,hide:P,width:F,flex:b}=d[c];u.push(p),C&&(t[v??0]={colId:p,sort:C}),S&&(i[E??0]=p),typeof w=="string"&&s.push({colId:p,aggFunc:w}),m&&(n[R??0]=p),T&&(T==="right"?o:r).push(p),P&&l.push(p),(b||F)&&a.push({colId:p,flex:b??void 0,width:F})}return{sort:t.length?{sortModel:t}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:n.length||e?{pivotMode:e,pivotColIds:n}:void 0,columnPinning:r.length||o.length?{leftColIds:r,rightColIds:o}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:a.length?{columnSizingModel:a}:void 0,columnOrder:u.length?{orderedColIds:u}:void 0}}setColumnState(e){const{sort:t,rowGroup:i,aggregation:s,pivot:n,columnPinning:r,columnVisibility:o,columnSizing:l,columnOrder:a}=e,u={},d=v=>{let S=u[v];return S||(S={colId:v},u[v]=S,S)};t&&t.sortModel.forEach(({colId:v,sort:S},E)=>{const w=d(v);w.sort=S,w.sortIndex=E}),i&&i.groupColIds.forEach((v,S)=>{const E=d(v);E.rowGroup=!0,E.rowGroupIndex=S}),s&&s.aggregationModel.forEach(({colId:v,aggFunc:S})=>{d(v).aggFunc=S}),n&&(n.pivotColIds.forEach((v,S)=>{const E=d(v);E.pivot=!0,E.pivotIndex=S}),this.gos.updateGridOptions({options:{pivotMode:n.pivotMode},source:"gridInitializing"})),r&&(r.leftColIds.forEach(v=>{d(v).pinned="left"}),r.rightColIds.forEach(v=>{d(v).pinned="right"})),o&&o.hiddenColIds.forEach(v=>{d(v).hide=!0}),l&&l.columnSizingModel.forEach(({colId:v,flex:S,width:E})=>{const w=d(v);w.flex=S??null,w.width=E});const c=a==null?void 0:a.orderedColIds,p=!!(c!=null&&c.length),C=p?c.map(v=>d(v)):Object.values(u);if(C.length){this.columnStates=C;const v={sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};this.columnModel.applyColumnState({state:C,applyOrder:p,defaultState:v},"gridInitializing")}}setColumnPivotState(e){const t=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;if(this.columnGroupStates=void 0,!!this.columnModel.isSecondaryColumnsPresent()){if(t){let s=[];for(const n of t)this.columnModel.getSecondaryColumn(n.colId)&&s.push(n);this.columnModel.applyColumnState({state:s,applyOrder:e},"gridInitializing")}i&&this.columnModel.setColumnGroupState(i,"gridInitializing")}}getColumnGroupState(){const e=this.columnModel.getColumnGroupState(),t=[];return e.forEach(({groupId:i,open:s})=>{s&&t.push(i)}),t.length?{openColumnGroupIds:t}:void 0}setColumnGroupState(e){var t;if(!e.hasOwnProperty("columnGroup"))return;const i=new Set((t=e.columnGroup)==null?void 0:t.openColumnGroupIds),n=this.columnModel.getColumnGroupState().map(({groupId:r})=>{const o=i.has(r);return o&&i.delete(r),{groupId:r,open:o}});i.forEach(r=>{n.push({groupId:r,open:!0})}),n.length&&(this.columnGroupStates=n),this.columnModel.setColumnGroupState(n,"gridInitializing")}getFilterState(){var e;let t=this.filterManager.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const i=(e=this.filterManager.getAdvancedFilterModel())!=null?e:void 0;return t||i?{filterModel:t,advancedFilterModel:i}:void 0}setFilterState(e,t){const{filterModel:i,advancedFilterModel:s}=e??{advancedFilterModel:t};i&&this.filterManager.setFilterModel(i,"columnFilter"),s&&this.filterManager.setAdvancedFilterModel(s)}getRangeSelectionState(){var e;const t=(e=this.rangeService)==null?void 0:e.getCellRanges().map(i=>{const{id:s,type:n,startRow:r,endRow:o,columns:l,startColumn:a}=i;return{id:s,type:n,startRow:r,endRow:o,colIds:l.map(u=>u.getColId()),startColId:a.getColId()}});return t!=null&&t.length?{cellRanges:t}:void 0}setRangeSelectionState(e){if(!this.gos.get("enableRangeSelection")||!this.rangeService)return;const t=[];e.cellRanges.forEach(i=>{const s=[];if(i.colIds.forEach(r=>{const o=this.columnModel.getGridColumn(r);o&&s.push(o)}),!s.length)return;let n=this.columnModel.getGridColumn(i.startColId);if(!n){const r=this.columnModel.getAllDisplayedColumns(),o=new Set(s);n=r.find(l=>o.has(l))}t.push(Ie(K({},i),{columns:s,startColumn:n}))}),this.rangeService.setCellRanges(t)}getScrollState(){var e,t,i;if(!this.isClientSideRowModel)return;const s=(e=this.ctrlsService.getGridBodyCtrl())==null?void 0:e.getScrollFeature(),{left:n}=(t=s==null?void 0:s.getHScrollPosition())!=null?t:{left:0},{top:r}=(i=s==null?void 0:s.getVScrollPosition())!=null?i:{top:0};return r||n?{top:r,left:n}:void 0}setScrollState(e){var t;if(!this.isClientSideRowModel)return;const{top:i,left:s}=e;(t=this.ctrlsService.getGridBodyCtrl())==null||t.getScrollFeature().setScrollPosition(i,s)}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.getGridColumn(t),rowIndex:i,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const e=this.paginationProxy.getCurrentPage(),t=this.gos.get("paginationAutoPageSize")?void 0:this.paginationProxy.getPageSize();if(!(!e&&!t))return{page:e,pageSize:t}}setPaginationState(e){e.pageSize&&!this.gos.get("paginationAutoPageSize")&&this.paginationProxy.setPageSize(e.pageSize,"initialState"),typeof e.page=="number"&&this.paginationProxy.setPage(e.page)}getRowSelectionState(){var e;const t=this.selectionService.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((e=t==null?void 0:t.toggledNodes)!=null&&e.length)?void 0:t}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,n])=>{qg(n,this.cachedState[s])||(i=!0)}),this.cachedState=K(K({},this.cachedState),t),i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const i=this.cachedState[e];this.setCachedStateValue(e,t),qg(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState=Ie(K({},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();const t={type:g.EVENT_STATE_UPDATED,sources:e,state:this.cachedState};this.eventService.dispatchEvent(t)}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"]))})}};h([f("filterManager")],Ht.prototype,"filterManager",2);h([f("ctrlsService")],Ht.prototype,"ctrlsService",2);h([f("focusService")],Ht.prototype,"focusService",2);h([f("columnModel")],Ht.prototype,"columnModel",2);h([f("paginationProxy")],Ht.prototype,"paginationProxy",2);h([f("rowModel")],Ht.prototype,"rowModel",2);h([f("selectionService")],Ht.prototype,"selectionService",2);h([f("expansionService")],Ht.prototype,"expansionService",2);h([f("columnAnimationService")],Ht.prototype,"columnAnimationService",2);h([Se("sideBarService")],Ht.prototype,"sideBarService",2);h([Se("rangeService")],Ht.prototype,"rangeService",2);h([I],Ht.prototype,"postConstruct",1);Ht=h([B("stateService")],Ht);var Ja=class extends L{init(){this.processGridOptions(this.gridOptions)}processGridOptions(e){this.processOptions(e,bN)}processColumnDefs(e){this.processOptions(e,So)}processOptions(e,t){const{validations:i,deprecations:s,allProperties:n,propertyExceptions:r,objectName:o,docsUrl:l}=t;n&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...r??[],...Object.keys(s)],n,o,l);const a=new Set;Object.keys(e).forEach(d=>{var c;const p=s[d];if(p)if("renamed"in p){const{renamed:R,version:T}=p;a.add(`As of v${T}, ${String(d)} is deprecated. Please use ${String(R)} instead.`),e[R]=e[d]}else{const{message:R,version:T}=p;a.add(`As of v${T}, ${String(d)} is deprecated. ${R??""}`)}const C=e[d];if(C==null||C===!1)return;const v=i[d];let S;if(v)if(typeof v=="function"){const R=v(e,this.gridOptions);if(!R)return;if("objectName"in R){const T=e[d];if(Array.isArray(T)){T.forEach(P=>{this.processOptions(P,R)});return}this.processOptions(e[d],R);return}S=R}else S=v;else return;const{module:E,dependencies:w,supportedRowModels:m}=S;if(m){const R=(c=this.gridOptions.rowModelType)!=null?c:"clientSide";if(!m.includes(R)){a.add(`${String(d)} is not supported with the '${R}' row model.`);return}}if(E){const R=Array.isArray(E)?E:[E];let T=!0;if(R.forEach(P=>{Ce.__assertRegistered(P,String(d),this.context.getGridId())||(T=!1,a.add(`${String(d)} is only available when ${P} is loaded.`))}),!T)return}if(w){const R=this.checkForWarning(d,w,e);if(R){a.add(R);return}}}),a.size>0&&a.forEach(d=>{Y(d)})}checkForWarning(e,t,i){if(typeof t=="function")return t(i,this.gridOptions);const n=Object.entries(t).find(([l,a])=>{const u=i[l];return!a.includes(u)});if(!n)return null;const[r,o]=n;return o.length>1?`'${String(e)}' requires '${r}' to be one of [${o.join(", ")}].`:`'${String(e)}' requires '${r}' to be ${o[0]}.`}checkProperties(e,t,i,s,n){const r=["__ob__","__v_skip","__metadata__"],o=MT(Object.getOwnPropertyNames(e),[...r,...t,...i],i);if(Lt(o,(l,a)=>{Y(`invalid ${s} property '${l}' did you mean any of these: ${a.slice(0,8).join(", ")}`)}),Object.keys(o).length>0&&n){const l=this.getFrameworkOverrides().getDocLink(n);Y(`to see all the valid ${s} properties please check: ${l}`)}}};h([f("gridOptions")],Ja.prototype,"gridOptions",2);h([I],Ja.prototype,"init",1);Ja=h([B("validationService")],Ja);var bc=class extends L{constructor(){super(...arguments),this.syncEventListeners=new Map,this.asyncEventListeners=new Map,this.syncGlobalEventListeners=new Set,this.globalEventListenerPairs=new Map}postConstruct(){this.frameworkEventWrappingService=new _m(this.getFrameworkOverrides())}addEventListener(e,t){const i=this.frameworkEventWrappingService.wrap(t),s=this.gos.useAsyncEvents()&&!yd.has(e),n=s?this.asyncEventListeners:this.syncEventListeners;n.has(e)||n.set(e,new Set),n.get(e).add(i),this.eventService.addEventListener(e,i,s)}removeEventListener(e,t){var i;const s=this.frameworkEventWrappingService.unwrap(t),n=this.asyncEventListeners.get(e),r=!!(n!=null&&n.delete(s));r||(i=this.syncEventListeners.get(e))==null||i.delete(s),this.eventService.removeEventListener(e,s,r)}addGlobalListener(e){const t=this.frameworkEventWrappingService.wrapGlobal(e);if(this.gos.useAsyncEvents()){const s=(r,o)=>{yd.has(r)&&t(r,o)},n=(r,o)=>{yd.has(r)||t(r,o)};this.globalEventListenerPairs.set(e,{syncListener:s,asyncListener:n}),this.eventService.addGlobalListener(s,!1),this.eventService.addGlobalListener(n,!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:n}=this.globalEventListenerPairs.get(t);this.eventService.removeGlobalListener(s,!1),this.eventService.removeGlobalListener(n,!0),this.globalEventListenerPairs.delete(e)}else this.syncGlobalEventListeners.delete(t),this.eventService.removeGlobalListener(t,!1)}destroyEventListeners(e,t){e.forEach((i,s)=>{i.forEach(n=>this.eventService.removeEventListener(s,n,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()}};h([I],bc.prototype,"postConstruct",1);bc=h([B("apiEventService")],bc);var MC=class extends te{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.paginationProxy.getPageSize()||(this.paginationProxy.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}init(){this.addManagedPropertyListener("paginationPageSizeSelector",()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,e=>this.handlePaginationChanged(e))}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))return;const t=this.paginationProxy.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp&&this.appendChild(this.selectPageSizeComp))}reset(){Xe(this.getGui()),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0)}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get("paginationPageSizeSelector")!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.paginationProxy.getPageSize(),i=!t||!e.includes(t);i&&(e.unshift(""),Y(`The paginationPageSize grid option is set to a value that is not in the list of page size options.
|
|
385
|
+
Please make sure that the paginationPageSize grid option is set to one of the values in the
|
|
386
|
+
paginationPageSizeSelector array, or set the paginationPageSizeSelector to false to hide the page size selector.`)),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0);const s=this.localeService.getLocaleTextFunc(),n=s("pageSizeSelectorLabel","Page Size:"),r=e.map(l=>({value:String(l),text:String(l)})),o=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Eh).addOptions(r).setValue(String(i?"":t)).setAriaLabel(o).setLabel(n).onValueChange(()=>this.handlePageSizeItemSelected()),this.hasEmptyOption=i}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get("paginationPageSizeSelector");return!Array.isArray(t)||!this.validateValues(t)?e:[...t].sort((i,s)=>i-s)}validateValues(e){if(!e.length)return Y(`The paginationPageSizeSelector grid option is an empty array. This is most likely a mistake.
|
|
387
|
+
If you want to hide the page size selector, please set the paginationPageSizeSelector to false.`),!1;for(let t=0;t<e.length;t++){const i=e[t],s=typeof i=="number",n=i>0;if(!s)return Y(`The paginationPageSizeSelector grid option contains a non-numeric value.
|
|
388
|
+
Please make sure that all values in the paginationPageSizeSelector array are numbers.`),!1;if(!n)return Y(`The paginationPageSizeSelector grid option contains a negative number or zero.
|
|
389
|
+
Please make sure that all values in the paginationPageSizeSelector array are positive.`),!1}return!0}destroy(){this.toggleSelectDisplay(!1),super.destroy()}};h([f("paginationProxy")],MC.prototype,"paginationProxy",2);h([I],MC.prototype,"init",1);var eu=class extends L{constructor(){super(),this.descriptionContainer=null,this.announceValue=kt(this.announceValue.bind(this),200)}postConstruct(){const e=this.gos.getDocument(),t=this.descriptionContainer=e.createElement("div");t.classList.add("ag-aria-description-container"),Vm(t,"polite"),rT(t,"additions text"),nT(t,!0),this.eGridDiv.appendChild(t)}announceValue(e){this.descriptionContainer&&(this.descriptionContainer.textContent="",setTimeout(()=>{this.isAlive()&&this.descriptionContainer&&(this.descriptionContainer.textContent=e)},50))}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(Xe(e),e.parentElement&&e.parentElement.removeChild(e)),this.descriptionContainer=null,this.eGridDiv=null}};h([f("eGridDiv")],eu.prototype,"eGridDiv",2);h([I],eu.prototype,"postConstruct",1);eu=h([B("ariaAnnouncementService")],eu);var Tf=class{};Tf.gridOptions=void 0;var AN=1,xN=class{create(e,t,i,s,n){var r;let o={};Tf.gridOptions?(ii(o,Tf.gridOptions,!0,!0),o=K(K({},o),t)):o=t;const l=ve.getCoercedGridOptions(o),a=!!l.debug,u=(r=l.gridId)!=null?r:String(AN++),d=this.getRegisteredModules(n,u),c=this.createBeansList(l.rowModelType,d,u),p=this.createProvidedBeans(e,l,n);if(!c){dr("Failed to create grid.");return}const C={providedBeanInstances:p,beanClasses:c,debug:a,gridId:u},v=new xC("Context",()=>C.debug),S=new HL(C,v),E=S.getBean("beans");return this.registerModuleUserComponents(E,d),this.registerStackComponents(E,d),this.registerControllers(E,d),i(S),E.syncService.start(),s&&s(S),S.getBean("gridApi")}registerControllers(e,t){t.forEach(i=>{i.controllers&&i.controllers.forEach(s=>e.ctrlsFactory.register(s))})}registerStackComponents(e,t){const i=this.createAgStackComponentsList(t);e.agStackComponentsRegistry.setupComponents(i)}getRegisteredModules(e,t){const i=e?e.modules:null,s=Ce.__getRegisteredModules(t),n=[],r={},o=(l,a,u)=>{(c=>{r[c.moduleName]||(r[c.moduleName]=!0,n.push(c),Ce.__register(c,l,u))})(a),a.dependantModules&&a.dependantModules.forEach(c=>o(l,c,u))};return i&&i.forEach(l=>o(!0,l,t)),s&&s.forEach(l=>o(!Ce.__isPackageBased(),l,void 0)),n}registerModuleUserComponents(e,t){this.extractModuleEntity(t,s=>s.userComponents?s.userComponents:[]).forEach(s=>{e.userComponentRegistry.registerDefaultComponent(s.componentName,s.componentClass)})}createProvidedBeans(e,t,i){let s=i?i.frameworkOverrides:null;J(s)&&(s=new ZD);const n={gridOptions:t,eGridDiv:e,globalEventListener:i?i.globalEventListener:null,globalSyncEventListener:i?i.globalSyncEventListener:null,frameworkOverrides:s};return i&&i.providedBeanInstances&&Object.assign(n,i.providedBeanInstances),n}createAgStackComponentsList(e){let t=[{componentName:"AgCheckbox",componentClass:Rh},{componentName:"AgRadioButton",componentClass:qT},{componentName:"AgToggleButton",componentClass:jD},{componentName:"AgInputTextField",componentClass:Ur},{componentName:"AgInputTextArea",componentClass:JI},{componentName:"AgInputNumberField",componentClass:gC},{componentName:"AgInputDateField",componentClass:eN},{componentName:"AgInputRange",componentClass:tN},{componentName:"AgRichSelect",componentClass:Vh},{componentName:"AgSelect",componentClass:Eh},{componentName:"AgSlider",componentClass:sN},{componentName:"AgGridBody",componentClass:us},{componentName:"AgHeaderRoot",componentClass:qI},{componentName:"AgSortIndicator",componentClass:mC},{componentName:"AgPagination",componentClass:hi},{componentName:"AgPageSizeSelector",componentClass:MC},{componentName:"AgOverlayWrapper",componentClass:vN},{componentName:"AgGroupComponent",componentClass:nN},{componentName:"AgRowContainer",componentClass:cl},{componentName:"AgFakeHorizontalScroll",componentClass:yN},{componentName:"AgFakeVerticalScroll",componentClass:FN},{componentName:"AgAutocomplete",componentClass:dN}];const i=this.extractModuleEntity(e,s=>s.agStackComponents?s.agStackComponents:[]);return t=t.concat(i),t}createBeansList(e="clientSide",t,i){const s=t.filter(a=>!a.rowModel||a.rowModel===e),n={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(!n[e]){dr("Could not find row model for rowModelType = "+e);return}if(!Ce.__assertRegistered(n[e],`rowModelType = '${e}'`,i))return;const r=[se,el,wf,qa,qo,le,wc,Pc,Ya,ff,Mn,Zo,Ua,Rf,Ja,$a,Wa,sf,ls,ve,zs,Ir,Wi,yt,xr,ja,Pi,Rc,Na,Mr,It,Dc,_n,Tc,Lr,In,ie,Qo,De,ks,Qa,Nn,Ec,Ko,Nr,yf,Ka,Jo,_a,Xo,Yo,Ps,nf,Sf,Xa,Ds,tl,Er,Za,il,Ef,_r,ri,Or,Gr,Ht,za,bc,eu,Ui],o=this.extractModuleEntity(s,a=>a.beans?a.beans:[]);r.push(...o);const l=[];return r.forEach(a=>{l.indexOf(a)<0&&l.push(a)}),l}extractModuleEntity(e,t){return[].concat(...e.map(t))}},LN=class{wrap(e,t,i=[],s){const n=this.createWrapper(e,s);return t.forEach(r=>{this.createMethod(n,r,!0)}),i.forEach(r=>{this.createMethod(n,r,!1)}),n}unwrap(e){return e}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&&console.warn("AG Grid: Framework component is missing the method "+t+"()"),null)}}},wl=typeof global>"u"?{}:global;wl.HTMLElement=typeof HTMLElement>"u"?{}:HTMLElement;wl.HTMLButtonElement=typeof HTMLButtonElement>"u"?{}:HTMLButtonElement;wl.HTMLSelectElement=typeof HTMLSelectElement>"u"?{}:HTMLSelectElement;wl.HTMLInputElement=typeof HTMLInputElement>"u"?{}:HTMLInputElement;wl.Node=typeof Node>"u"?{}:Node;wl.MouseEvent=typeof MouseEvent>"u"?{}:MouseEvent;var IC=class Kl{constructor(t,i,s,n,r,o){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=t,this.gos=i,this.eventService=s,this.columnModel=n,this.beans=o,this.selectionService=r,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=Kl.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return Z.cloneObject(this.allNodesMap)}getRowNode(t){return this.allNodesMap[t]}setRowData(t){if(typeof t=="string"){console.warn("AG Grid: rowData must be an array.");return}this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t);const i=this.rootNode,s=this.rootNode.sibling;i.childrenAfterFilter=null,i.childrenAfterGroup=null,i.childrenAfterAggFilter=null,i.childrenAfterSort=null,i.childrenMapped=null,i.updateHasChildren(),this.nextId=0,this.allNodesMap={},t?i.allLeafChildren=t.map(n=>this.createNode(n,this.rootNode,Kl.TOP_LEVEL)):(i.allLeafChildren=[],i.childrenAfterGroup=[]),s&&(s.childrenAfterFilter=i.childrenAfterFilter,s.childrenAfterGroup=i.childrenAfterGroup,s.childrenAfterAggFilter=i.childrenAfterAggFilter,s.childrenAfterSort=i.childrenAfterSort,s.childrenMapped=i.childrenMapped,s.allLeafChildren=i.allLeafChildren)}updateRowData(t,i){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t.add);const s={remove:[],update:[],add:[]},n=[];return this.executeRemove(t,s,n),this.executeUpdate(t,s,n),this.executeAdd(t,s),this.updateSelection(n,"rowDataChanged"),i&&Z.sortRowNodesByOrder(this.rootNode.allLeafChildren,i),s}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(t){const i={type:g.EVENT_ROW_DATA_UPDATE_STARTED,firstRowData:t!=null&&t.length?t[0]:null};this.eventService.dispatchEvent(i)}updateSelection(t,i){const s=t.length>0;if(s&&this.selectionService.setNodesSelected({newValue:!1,nodes:t,suppressFinishActions:!0,source:i}),this.selectionService.updateGroupsFromChildrenSelections(i),s){const n={type:g.EVENT_SELECTION_CHANGED,source:i};this.eventService.dispatchEvent(n)}}executeAdd(t,i){var s;const{add:n,addIndex:r}=t;if(Z.missingOrEmpty(n))return;const o=n.map(l=>this.createNode(l,this.rootNode,Kl.TOP_LEVEL));if(typeof r=="number"&&r>=0){const{allLeafChildren:l}=this.rootNode,a=l.length;let u=r;if(this.gos.get("treeData")&&r>0&&a>0){for(let C=0;C<a;C++)if(((s=l[C])==null?void 0:s.rowIndex)==r-1){u=C+1;break}}const c=l.slice(0,u),p=l.slice(u,l.length);this.rootNode.allLeafChildren=[...c,...o,...p]}else this.rootNode.allLeafChildren=[...this.rootNode.allLeafChildren,...o];this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),i.add=o}executeRemove(t,i,s){const{remove:n}=t;if(Z.missingOrEmpty(n))return;const r={};n.forEach(o=>{const l=this.lookupRowNode(o);l&&(l.isSelected()&&s.push(l),l.clearRowTopAndRowIndex(),r[l.id]=!0,delete this.allNodesMap[l.id],i.remove.push(l))}),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter(o=>!r[o.id]),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(t,i,s){const{update:n}=t;Z.missingOrEmpty(n)||n.forEach(r=>{const o=this.lookupRowNode(r);o&&(o.updateData(r),!o.selectable&&o.isSelected()&&s.push(o),this.setMasterForRow(o,r,Kl.TOP_LEVEL,!1),i.update.push(o))})}lookupRowNode(t){const i=this.gos.getCallback("getRowId");let s;if(i){const n=i({data:t,level:0});if(s=this.allNodesMap[n],!s)return console.error(`AG Grid: could not find row id=${n}, data item was not found for this id`),null}else if(s=this.rootNode.allLeafChildren.find(n=>n.data===t),!s)return console.error("AG Grid: could not find data item as object was not found",t),console.error("Consider using getRowId to help the Grid find matching row data"),null;return s||null}createNode(t,i,s){const n=new ne(this.beans);n.group=!1,this.setMasterForRow(n,t,s,!0);const r=this.gos.get("suppressParentsInRowNodes");return i&&!r&&(n.parent=i),n.level=s,n.setDataAndId(t,this.nextId.toString()),this.allNodesMap[n.id]&&console.warn(`AG Grid: duplicate node id '${n.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[n.id]=n,this.nextId++,n}setMasterForRow(t,i,s,n){if(this.gos.get("treeData"))t.setMaster(!1),n&&(t.expanded=!1);else{if(this.gos.get("masterDetail")){const l=this.gos.get("isRowMaster");l?t.setMaster(l(i)):t.setMaster(!0)}else t.setMaster(!1);if(n){const l=this.columnModel.getRowGroupColumns(),a=l?l.length:0,u=s+a;t.expanded=t.master?this.isExpanded(u):!1}}}isExpanded(t){const i=this.gos.get("groupDefaultExpanded");return i===-1?!0:t<i}};IC.TOP_LEVEL=0;IC.ROOT_NODE_ID="ROOT_NODE_ID";var MN=IC,Bt=class extends L{constructor(){super(...arguments),this.onRowHeightChanged_debounced=Z.debounce(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[],this.hasStarted=!1,this.shouldSkipSettingDataOnStart=!1,this.isRefreshingModel=!1,this.rowCountReady=!1}init(){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.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,i),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:"pivot"})),this.addManagedListener(this.eventService,g.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanges.bind(this)),this.addManagedListener(this.eventService,g.EVENT_GRID_READY,()=>this.onGridReady()),this.addPropertyListeners(),this.rootNode=new ne(this.beans),this.nodeManager=new MN(this.rootNode,this.gos,this.eventService,this.columnModel,this.selectionService,this.beans)}addPropertyListeners(){const e=new Set(["treeData","masterDetail"]),t=new Set(["suppressParentsInRowNodes","groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),i=new Set(["excludeChildrenWhenTreeDataFiltering"]),s=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),n=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),r=new Set(["postSortRows","groupDisplayType","accentedSort"]),o=new Set([]),l=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),a=[...e,...t,...i,...s,...s,...n,...r,...o,...l];this.addManagedPropertyListeners(a,u=>{var d;const c=(d=u.changeSet)==null?void 0:d.properties;if(!c)return;const p=C=>c.some(v=>C.has(v));if(p(e)){this.setRowData(this.rootNode.allLeafChildren.map(C=>C.data));return}if(p(t)){this.refreshModel({step:"group"});return}if(p(i)){this.refreshModel({step:"filter"});return}if(p(s)){this.refreshModel({step:"pivot"});return}if(p(n)){this.refreshModel({step:"aggregate"});return}if(p(r)){this.refreshModel({step:"sort"});return}if(p(o)){this.refreshModel({step:"filter_aggregates"});return}p(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 n,r=!1;do{n=!1;const o=this.getRowIndexAtPixel(e),l=this.getRowIndexAtPixel(t),a=Math.max(o,i),u=Math.min(l,s);for(let d=a;d<=u;d++){const c=this.getRow(d);if(c.rowHeightEstimated){const p=this.gos.getRowHeightForNode(c);c.setRowHeight(p.height),n=!0,r=!0}}n&&this.setRowTopAndRowIndex()}while(n);return r}setRowTopAndRowIndex(){const e=this.environment.getDefaultRowHeight();let t=0;const i=new Set,s=this.gos.isDomLayout("normal");for(let n=0;n<this.rowsToDisplay.length;n++){const r=this.rowsToDisplay[n];if(r.id!=null&&i.add(r.id),r.rowHeight==null){const o=this.gos.getRowHeightForNode(r,s,e);r.setRowHeight(o.height,o.estimated)}r.setRowTop(t),r.setRowIndex(n),t+=r.rowHeight}return i}clearRowTopAndRowIndex(e,t){const i=e.isActive(),s=r=>{r&&r.id!=null&&!t.has(r.id)&&r.clearRowTopAndRowIndex()},n=r=>{if(s(r),s(r.detailNode),s(r.sibling),r.hasChildren()&&r.childrenAfterGroup){const o=r.level==-1;i&&!o&&!r.expanded||r.childrenAfterGroup.forEach(n)}};n(this.rootNode)}ensureRowsAtPixel(e,t,i=0){const s=this.getRowIndexAtPixel(t),n=this.getRow(s),r=!this.gos.get("suppressAnimationFrame");return n===e[0]?!1:(e.forEach(o=>{Z.removeFromArray(this.rootNode.allLeafChildren,o)}),e.forEach((o,l)=>{Z.insertIntoArray(this.rootNode.allLeafChildren,o,Math.max(s+i,0)+l)}),this.refreshModel({step:"group",keepRenderedRows:!0,keepEditingRows:!0,animate:r}),!0)}highlightRowAtPixel(e,t){const i=t!=null?this.getRowIndexAtPixel(t):null,s=i!=null?this.getRow(i):null;if(!s||!e||s===e||t==null){this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null);return}const n=this.getHighlightPosition(t,s);this.lastHighlightedRow&&this.lastHighlightedRow!==s&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),s.setHighlighted(n),this.lastHighlightedRow=s}getHighlightPosition(e,t){if(!t){const n=this.getRowIndexAtPixel(e);if(t=this.getRow(n||0),!t)return 1}const{rowTop:i,rowHeight:s}=t;return e-i<s/2?0:1}getLastHighlightedRowNode(){return this.lastHighlightedRow}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return 1;const t=this.rootNode.childrenAfterAggFilter;return t?t.length:0}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let i=this.rootNode.childrenAfterSort[e];if(this.gos.get("groupHideOpenParents"))for(;i.expanded&&i.childrenAfterSort&&i.childrenAfterSort.length>0;)i=i.childrenAfterSort[0];return i.rowIndex}getRowBounds(e){if(Z.missing(this.rowsToDisplay))return null;const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=this.gos.isAnimateRows();this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=this.gos.isAnimateRows(),s=e.columns.length===0||e.columns.some(n=>n.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=this.gos.isAnimateRows();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=Z.missingOrEmpty(e),i=new kh(!1,this.rootNode);return(t||this.gos.get("treeData"))&&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",sort:"sort",pivot:"pivot"};if(Z.exists(e)&&(t=i[e]),Z.missing(t)){console.error(`AG Grid: 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.shouldRowModelIgnoreRefresh())return;let 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,t.rowNodeOrder,i,!!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;const n={type:g.EVENT_MODEL_UPDATED,animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack};this.eventService.dispatchEvent(n)}isEmpty(){const e=Z.missing(this.rootNode.allLeafChildren)||this.rootNode.allLeafChildren.length===0;return Z.missing(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return Z.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!t,s=!1;const n=[],r=this.gos.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort(o=>{if(s)return;if(i&&(o===t||o===e)&&(s=!0,o.group&&r)){n.push(...o.allLeafChildren);return}if(!i){if(o!==t&&o!==e)return;i=!0}if(!o.group||!r){n.push(o);return}}),n}setDatasource(e){console.error("AG Grid: 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(Z.last(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let n=-1,r=-1;for(;;){const o=Math.floor((t+i)/2),l=this.rowsToDisplay[o];if(this.isRowInPixel(l,e)||(l.rowTop<e?t=o+1:l.rowTop>e&&(i=o-1),n===t&&r===i))return o;n=t,r=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:n}=e;let{index:r}=e;const o=l=>{var a;const u=(a=t[0])==null?void 0:a.parent;if(!u)return;const d=n&&this.gos.getGrandTotalRow(),c=this.gos.getGroupTotalRowCallback(),p=n&&c({node:u});if(u===this.rootNode){d===l&&(u.createFooter(),i(u.sibling,r++));return}p===l&&(u.createFooter(),i(u.sibling,r++))};o("top");for(let l=0;l<t.length;l++){const a=t[l];if(i(a,r++),a.hasChildren()&&!a.footer){let u=null;switch(s){case 0:u=a.childrenAfterGroup;break;case 1:u=a.childrenAfterAggFilter;break;case 2:u=a.childrenAfterSort;break;case 3:u=a.leafGroup?null:a.childrenAfterSort;break}u&&(r=this.recursivelyWalkNodesAndCallback({nodes:[...u],callback:i,recursionType:s,index:r,includeFooterNodes:n}))}}return o("bottom"),r}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=o=>{o&&o.forEach(l=>{const a=()=>{l.expanded=e,s(l.childrenAfterGroup)};if(t){Z.exists(l.childrenAfterGroup)&&a();return}if(i){!l.leafGroup&&a();return}l.group&&a()})};this.rootNode&&s(this.rootNode.childrenAfterGroup),this.refreshModel({step:"map"});const n=e?"expandAll":"collapseAll",r={type:g.EVENT_EXPAND_COLLAPSE_ALL,source:n};this.eventService.dispatchEvent(r)}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}doRowGrouping(e,t,i,s){if(this.groupStage){if(e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodeOrder:t,changedPath:i}):this.groupStage.execute({rowNode:this.rootNode,changedPath:i,afterColumnsChanged:s}),this.gos.get("groupSelectsChildren")&&this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",i)){const r={type:g.EVENT_SELECTION_CHANGED,source:"rowGroupChanged"};this.eventService.dispatchEvent(r)}}else this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren,this.rootNode.sibling&&(this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup),this.rootNode.updateHasChildren();this.nodeManager.isRowCountReady()&&(this.rowCountReady=!0,this.eventService.dispatchEventOnce({type:g.EVENT_ROW_COUNT_READY}))}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})}getCopyOfNodesMap(){return this.nodeManager.getCopyOfNodesMap()}getRowNode(e){if(typeof e=="string"&&e.indexOf(ne.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(){const e={type:g.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(e),this.refreshModel({step:"group",newData:!0})}batchUpdateRowData(e,t){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const i=this.gos.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.executeBatchUpdateRowData()},i)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache.onDataChanged();const e=[],t=[];let i=!1;if(this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach(s=>{const n=this.nodeManager.updateRowData(s.rowDataTransaction,void 0);t.push(n),s.callback&&e.push(s.callback.bind(null,n)),typeof s.rowDataTransaction.addIndex=="number"&&(i=!0)}),this.commonUpdateRowData(t,void 0,i),e.length>0&&window.setTimeout(()=>{e.forEach(s=>s())},0),t.length>0){const s={type:g.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:t};this.eventService.dispatchEvent(s)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e,t){this.valueCache.onDataChanged();const i=this.nodeManager.updateRowData(e,t),s=typeof e.addIndex=="number";return this.commonUpdateRowData([i],t,s),i}createRowNodeOrder(){if(this.gos.get("suppressMaintainUnsortedOrder"))return;const t={};if(this.rootNode&&this.rootNode.allLeafChildren)for(let i=0;i<this.rootNode.allLeafChildren.length;i++){const s=this.rootNode.allLeafChildren[i];t[s.id]=i}return t}commonUpdateRowData(e,t,i){if(!this.hasStarted)return;const s=!this.gos.get("suppressAnimationFrame");i&&(t=this.createRowNodeOrder());const n={type:g.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(n),this.refreshModel({step:"group",rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,keepEditingRows:!0,animate:s})}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(){this.columnModel.isAutoRowHeightActive()||this.resetRowHeights()}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}};h([f("columnModel")],Bt.prototype,"columnModel",2);h([f("selectionService")],Bt.prototype,"selectionService",2);h([f("valueCache")],Bt.prototype,"valueCache",2);h([f("beans")],Bt.prototype,"beans",2);h([f("filterStage")],Bt.prototype,"filterStage",2);h([f("sortStage")],Bt.prototype,"sortStage",2);h([f("flattenStage")],Bt.prototype,"flattenStage",2);h([Se("groupStage")],Bt.prototype,"groupStage",2);h([Se("aggregationStage")],Bt.prototype,"aggregationStage",2);h([Se("pivotStage")],Bt.prototype,"pivotStage",2);h([Se("filterAggregatesStage")],Bt.prototype,"filterAggregatesStage",2);h([I],Bt.prototype,"init",1);Bt=h([B("rowModel")],Bt);var Fc=class extends L{execute(e){const{changedPath:t}=e;this.filterService.filter(t)}};h([f("filterService")],Fc.prototype,"filterService",2);Fc=h([B("filterStage")],Fc);var tu=class extends L{execute(e){const t=this.sortController.getSortOptions(),i=Z.exists(t)&&t.length>0,s=i&&Z.exists(e.rowNodeTransactions)&&this.gos.get("deltaSort"),n=t.some(r=>this.gos.isColumnsSortingCoupledToGroup()?r.column.isPrimary()&&r.column.isRowGroupActive():!!r.column.getColDef().showRowGroup);this.sortService.sort(t,i,s,e.rowNodeTransactions,e.changedPath,n)}};h([f("sortService")],tu.prototype,"sortService",2);h([f("sortController")],tu.prototype,"sortController",2);tu=h([B("sortStage")],tu);var Ac=class extends L{execute(e){const t=e.rowNode,i=[],s=this.beans.columnModel.isPivotMode(),n=s&&t.leafGroup,r=n?[t]:t.childrenAfterSort,o=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(o,r,i,s,0);const l=i.length>0;if(!n&&l&&o.grandTotalRow){t.createFooter();const u=o.grandTotalRow==="top";this.addRowNodeToRowsToDisplay(o,t.sibling,i,0,u)}return i}getFlattenDetails(){const e=this.gos.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gos.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:this.gos.isGroupMultiAutoColumn(),hideOpenParents:this.gos.get("groupHideOpenParents"),grandTotalRow:this.gos.getGrandTotalRow(),groupTotalRow:this.gos.getGroupTotalRowCallback()}}recursivelyAddToRowsToDisplay(e,t,i,s,n){if(!Z.missingOrEmpty(t))for(let r=0;r<t.length;r++){const o=t[r],l=o.hasChildren(),a=s&&!l,u=e.groupRemoveSingleChildren&&l&&o.childrenAfterGroup.length===1,d=e.groupRemoveLowestSingleChildren&&l&&o.leafGroup&&o.childrenAfterGroup.length===1,c=s&&o.leafGroup,p=e.hideOpenParents&&o.expanded&&!o.master&&!c;if(!a&&!p&&!u&&!d&&this.addRowNodeToRowsToDisplay(e,o,i,n),!(s&&o.leafGroup)){if(l){const v=u||d;if(o.expanded||v){const S=e.groupTotalRow({node:o});S||o.destroyFooter();const E=v?n:n+1;S==="top"&&(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,E)),this.recursivelyAddToRowsToDisplay(e,o.childrenAfterSort,i,s,E),S==="bottom"&&(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,E))}}else if(o.master&&o.expanded){const v=this.createDetailNode(o);this.addRowNodeToRowsToDisplay(e,v,i,n)}}}}addRowNodeToRowsToDisplay(e,t,i,s,n){n?i.unshift(t):i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:s)}createDetailNode(e){if(Z.exists(e.detailNode))return e.detailNode;const t=new ne(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,Z.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}};h([f("beans")],Ac.prototype,"beans",2);Ac=h([B("flattenStage")],Ac);var iu=class extends L{sort(e,t,i,s,n,r){const o=this.gos.get("groupMaintainOrder"),l=this.columnModel.getAllGridColumns().some(p=>p.isRowGroupActive());let a={};i&&s&&(a=this.calculateDirtyNodes(s));const u=this.columnModel.isPivotMode(),d=this.gos.getCallback("postSortRows"),c=p=>{var C;this.pullDownGroupDataForHideOpenParents(p.childrenAfterAggFilter,!0);const v=u&&p.leafGroup;if(o&&l&&!p.leafGroup&&!r){const E=(C=this.columnModel.getRowGroupColumns())==null?void 0:C[p.level+1],w=(E==null?void 0:E.getSort())===null,m=p.childrenAfterAggFilter.slice(0);if(p.childrenAfterSort&&!w){const R={};p.childrenAfterSort.forEach((T,P)=>{R[T.id]=P}),m.sort((T,P)=>{var F,b;return((F=R[T.id])!=null?F:0)-((b=R[P.id])!=null?b:0)})}p.childrenAfterSort=m}else!t||v?p.childrenAfterSort=p.childrenAfterAggFilter.slice(0):i?p.childrenAfterSort=this.doDeltaSort(p,a,n,e):p.childrenAfterSort=this.rowNodeSorter.doFullSort(p.childrenAfterAggFilter,e);if(p.sibling&&(p.sibling.childrenAfterSort=p.childrenAfterSort),this.updateChildIndexes(p),d){const E={nodes:p.childrenAfterSort};d(E)}};n&&n.forEachChangedNodeDepthFirst(c),this.updateGroupDataForHideOpenParents(n)}calculateDirtyNodes(e){const t={},i=s=>{s&&s.forEach(n=>t[n.id]=!0)};return e&&e.forEach(s=>{i(s.add),i(s.update),i(s.remove)}),t}doDeltaSort(e,t,i,s){const n=e.childrenAfterAggFilter,r=e.childrenAfterSort;if(!r)return this.rowNodeSorter.doFullSort(n,s);const o={},l=[];n.forEach(c=>{t[c.id]||!i.canSkip(c)?l.push(c):o[c.id]=!0});const a=r.filter(c=>o[c.id]),u=(c,p)=>({currentPos:p,rowNode:c}),d=l.map(u).sort((c,p)=>this.rowNodeSorter.compareRowNodes(s,c,p));return this.mergeSortedArrays(s,d,a.map(u)).map(({rowNode:c})=>c)}mergeSortedArrays(e,t,i){const s=[];let n=0,r=0;for(;n<t.length&&r<i.length;)this.rowNodeSorter.compareRowNodes(e,t[n],i[r])<0?s.push(t[n++]):s.push(i[r++]);for(;n<t.length;)s.push(t[n++]);for(;r<i.length;)s.push(i[r++]);return s}updateChildIndexes(e){if(Z.missing(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let i=0;i<t.length;i++){const s=t[i],n=i===0,r=i===e.childrenAfterSort.length-1;s.setFirstChild(n),s.setLastChild(r),s.setChildIndex(i)}}updateGroupDataForHideOpenParents(e){if(!this.gos.get("groupHideOpenParents"))return;if(this.gos.get("treeData"))return Z.warnOnce("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")||Z.missing(e)||e.forEach(i=>{this.columnModel.getGroupDisplayColumns().forEach(n=>{const r=n.getColDef().showRowGroup;if(typeof r!="string"){console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");return}const o=r,l=this.columnModel.getPrimaryColumn(o);if(l!==i.rowGroupColumn)if(t)i.setGroupValue(n.getId(),void 0);else{const u=i.getFirstChildOfFirstChild(l);u&&i.setGroupValue(n.getId(),u.key)}})})}};h([f("columnModel")],iu.prototype,"columnModel",2);h([f("rowNodeSorter")],iu.prototype,"rowNodeSorter",2);iu=h([B("sortService")],iu);var xc=class extends L{filter(e){const t=this.filterManager.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const i=(s,n)=>{s.hasChildren()&&e&&!n?s.childrenAfterFilter=s.childrenAfterGroup.filter(r=>{const o=r.childrenAfterFilter&&r.childrenAfterFilter.length>0,l=r.data&&this.filterManager.doesRowPassFilter({rowNode:r});return o||l}):s.childrenAfterFilter=s.childrenAfterGroup,s.sibling&&(s.sibling.childrenAfterFilter=s.childrenAfterFilter)};if(this.doingTreeDataFiltering()){const s=(r,o)=>{if(r.childrenAfterGroup)for(let l=0;l<r.childrenAfterGroup.length;l++){const a=r.childrenAfterGroup[l],u=o||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?s(r.childrenAfterGroup[l],u):i(a,u)}i(r,o)},n=r=>s(r,!1);t.executeFromRootNode(n)}else{const s=n=>i(n,!1);t.forEachChangedNodeDepthFirst(s,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}};h([f("filterManager")],xc.prototype,"filterManager",2);xc=h([B("filterService")],xc);var kr=class extends L{postConstruct(){this.rowModel.getType()==="clientSide"&&(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,s]=t;this.clientSideRowModel.updateRowData(i,s)}createTransactionForRowData(e){if(Z.missing(this.clientSideRowModel)){console.error("AG Grid: ImmutableService only works with ClientSideRowModel");return}const t=this.gos.getCallback("getRowId");if(t==null){console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");return}const i={remove:[],update:[],add:[]},s=this.clientSideRowModel.getCopyOfNodesMap(),r=this.gos.get("suppressMaintainUnsortedOrder")?void 0:{};return Z.exists(e)&&e.forEach((o,l)=>{const a=t({data:o,level:0}),u=s[a];r&&(r[a]=l),u?(u.data!==o&&i.update.push(o),s[a]=void 0):i.add.push(o)}),Z.iterateObject(s,(o,l)=>{l&&i.remove.push(l.data)}),[i,r]}onRowDataUpdated(){const e=this.gos.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}};h([f("rowModel")],kr.prototype,"rowModel",2);h([f("rowRenderer")],kr.prototype,"rowRenderer",2);h([f("selectionService")],kr.prototype,"selectionService",2);h([I],kr.prototype,"postConstruct",1);kr=h([B("immutableService")],kr);var IN="31.3.4",NN={version:IN,moduleName:"@ag-grid-community/client-side-row-model",rowModel:"clientSide",beans:[Bt,Fc,tu,Ac,iu,xc,kr]},_N=Object.defineProperty,ON=Object.getOwnPropertyDescriptor,Kt=(e,t,i,s)=>{for(var n=s>1?void 0:s?ON(t,i):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(n=(s?o(t,i,n):o(n))||n);return s&&n&&_N(t,i,n),n},GN=(e,t)=>(i,s)=>t(i,s,e),su=class extends mf{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){Z.exists(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Z.missing(this.params.datasource.getRows)){console.warn("AG Grid: 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,n)=>{this.startRow+n<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 ne(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 n=e.rowData?e.rowData[s]:void 0;!i.id&&i.alreadyRendered&&n&&(this.rowNodes[s]=new ne(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],n,this.startRow+s)});const t=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,t)}destroyRowNodes(){this.rowNodes.forEach(e=>{e.clearRowTopAndRowIndex()})}};Kt([f("beans")],su.prototype,"beans",2);Kt([I],su.prototype,"postConstruct",1);Kt([$t],su.prototype,"destroyRowNodes",1);var Sl=class nP extends L{constructor(t){super(),this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=t.initialRowCount,this.params=t}setBeans(t){this.logger=t.create("InfiniteCache")}getRow(t,i=!1){const s=Math.floor(t/this.params.blockSize);let n=this.blocks[s];if(!n){if(i)return;n=this.createBlock(s)}return n.getRow(t)}createBlock(t){const i=this.createBean(new su(t,this,this.params));return this.blocks[i.getId()]=i,this.blockCount++,this.purgeBlocksIfNeeded(i),this.params.rowNodeBlockLoader.addBlock(i),i}refreshCache(){if(this.blockCount==0){this.purgeCache();return}this.getBlocksInOrder().forEach(i=>i.setStateWaitingToLoad()),this.params.rowNodeBlockLoader.checkBlockToLoad()}destroyAllBlocks(){this.getBlocksInOrder().forEach(t=>this.destroyBlock(t))}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(t,i){this.isAlive()&&(this.logger.log(`onPageLoaded: page = ${t.getId()}, lastRow = ${i}`),this.checkRowCount(t,i),this.onCacheUpdated())}purgeBlocksIfNeeded(t){const i=this.getBlocksInOrder().filter(l=>l!=t),s=(l,a)=>a.getLastAccessed()-l.getLastAccessed();i.sort(s);const n=this.params.maxBlocksInCache>0,r=n?this.params.maxBlocksInCache-1:null,o=nP.MAX_EMPTY_BLOCKS_TO_KEEP-1;i.forEach((l,a)=>{const u=l.getState()===su.STATE_WAITING_TO_LOAD&&a>=o,d=n?a>=r:!1;if(u||d){if(this.isBlockCurrentlyDisplayed(l)||this.isBlockFocused(l))return;this.removeBlockFromCache(l)}})}isBlockFocused(t){const i=this.focusService.getFocusCellToUseAfterRefresh();if(!i||i.rowPinned!=null)return!1;const s=t.getStartRow(),n=t.getEndRow();return i.rowIndex>=s&&i.rowIndex<n}isBlockCurrentlyDisplayed(t){const i=t.getStartRow(),s=t.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(i,s)}removeBlockFromCache(t){t&&this.destroyBlock(t)}checkRowCount(t,i){if(typeof i=="number"&&i>=0)this.rowCount=i,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const n=(t.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<n&&(this.rowCount=n)}}setRowCount(t,i){this.rowCount=t,Z.exists(i)&&(this.lastRowIndexKnown=i),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(t){const i=new jo;this.getBlocksInOrder().forEach(s=>s.forEachNode(t,i,this.rowCount))}getBlocksInOrder(){const t=(s,n)=>s.getId()-n.getId();return Z.getAllValuesInObject(this.blocks).sort(t)}destroyBlock(t){delete this.blocks[t.getId()],this.destroyBean(t),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(t)}onCacheUpdated(){if(this.isAlive()){this.destroyAllBlocksPastVirtualRowCount();const t={type:g.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(t)}}destroyAllBlocksPastVirtualRowCount(){const t=[];this.getBlocksInOrder().forEach(i=>{i.getId()*this.params.blockSize>=this.rowCount&&t.push(i)}),t.length>0&&t.forEach(i=>this.destroyBlock(i))}purgeCache(){this.getBlocksInOrder().forEach(t=>this.removeBlockFromCache(t)),this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(t,i){const s=[];let n=-1,r=!1;const o=new jo;Z.missing(t)&&(r=!0);let l=!1;return this.getBlocksInOrder().forEach(u=>{if(!l){if(r&&n+1!==u.getId()){l=!0;return}n=u.getId(),u.forEachNode(d=>{const c=d===t||d===i;(r||c)&&s.push(d),c&&(r=!r)},o,this.rowCount)}}),l||r?[]:s}};Sl.MAX_EMPTY_BLOCKS_TO_KEEP=2;Kt([f("rowRenderer")],Sl.prototype,"rowRenderer",2);Kt([f("focusService")],Sl.prototype,"focusService",2);Kt([GN(0,_i("loggerFactory"))],Sl.prototype,"setBeans",1);Kt([$t],Sl.prototype,"destroyAllBlocks",1);var kN=Sl,bs=class extends L{getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(e,t,i,s){return!1}init(){this.gos.isRowModelType("infinite")&&(this.rowHeight=this.gos.getRowHeightAsNumber(),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache()),this.verifyProps())}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&Z.warnOnce("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")}start(){this.setDatasource(this.gos.get("datasource"))}destroyDatasource(){this.datasource&&(this.getContext().destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedListener(this.eventService,g.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,g.EVENT_STORE_UPDATED,this.onCacheUpdated.bind(this)),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=this.gos.getRowHeightAsNumber(),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!Z.jsonEquals(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;this.gos.getCallback("getRowId")!=null||this.selectionService.reset("rowDataChanged"),this.resetCache()}createModelUpdatedEvent(){return{type:g.EVENT_MODEL_UPDATED,newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1}}resetCache(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gos.get("infiniteInitialRowCount"),maxBlocksInCache:this.gos.get("maxBlocksInCache"),rowHeight:this.gos.getRowHeightAsNumber(),overflowSize:this.gos.get("cacheOverflowSize"),blockSize:this.gos.get("cacheBlockSize"),lastAccessedSequence:new jo},this.infiniteCache=this.createBean(new kN(this.cacheParams)),this.eventService.dispatchEventOnce({type:g.EVENT_ROW_COUNT_READY});const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}updateRowHeights(){this.forEachNode(t=>{t.setRowHeight(this.rowHeight),t.setRowTop(this.rowHeight*t.rowIndex)});const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}destroyCache(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))}onCacheUpdated(){const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}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)}};Kt([f("filterManager")],bs.prototype,"filterManager",2);Kt([f("sortController")],bs.prototype,"sortController",2);Kt([f("selectionService")],bs.prototype,"selectionService",2);Kt([f("rowRenderer")],bs.prototype,"rowRenderer",2);Kt([f("rowNodeBlockLoader")],bs.prototype,"rowNodeBlockLoader",2);Kt([I],bs.prototype,"init",1);Kt([$t],bs.prototype,"destroyDatasource",1);bs=Kt([B("rowModel")],bs);var VN="31.3.4",HN={version:VN,moduleName:"@ag-grid-community/infinite-row-model",rowModel:"infinite",beans:[bs]},BN=Object.defineProperty,WN=Object.getOwnPropertyDescriptor,pi=(e,t,i,s)=>{for(var n=s>1?void 0:s?WN(t,i):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(n=(s?o(t,i,n):o(n))||n);return s&&n&&BN(t,i,n),n},UN=class{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()}`}},zN=class{constructor(e){this.groupColumns=[];const{columnModel:t,valueService:i,gos:s,processCellCallback:n,processHeaderCallback:r,processGroupHeaderCallback:o,processRowGroupCallback:l}=e;this.columnModel=t,this.valueService=i,this.gos=s,this.processCellCallback=n,this.processHeaderCallback=r,this.processGroupHeaderCallback=o,this.processRowGroupCallback=l}prepare(e){this.groupColumns=e.filter(t=>!!t.getColDef().showRowGroup)}extractHeaderValue(e){const t=this.getHeaderName(this.processHeaderCallback,e);return t??""}extractRowCellValue(e,t,i,s,n){const o=(!this.gos.get("groupHideOpenParents")||n.footer)&&this.shouldRenderGroupSummaryCell(n,e,t)?this.createValueForGroupNode(e,n):this.valueService.getValue(e,n);return this.processCell({accumulatedRowIndex:i,rowNode:n,column:e,value:o,processCellCallback:this.processCellCallback,type:s})}shouldRenderGroupSummaryCell(e,t,i){var s;if(!(e&&e.group))return!1;if(this.groupColumns.indexOf(t)!==-1){if(((s=e.groupData)==null?void 0:s[t.getId()])!=null||this.gos.isRowModelType("serverSide")&&e.group)return!0;if(e.footer&&e.level===-1){const l=t.getColDef();return l==null||l.showRowGroup===!0||l.showRowGroup===this.columnModel.getRowGroupColumns()[0].getId()}}const o=this.gos.isGroupUseEntireRow(this.columnModel.isPivotMode());return i===0&&o}getHeaderName(e,t){return e?e(this.gos.addGridCommonParams({column:t})):this.columnModel.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"),n=a=>{var u,d;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:(d=this.valueService.formatValue(a.rowGroupColumn,a,c))!=null?d:c},r=t.footer,o=[n(t)];if(!this.gos.isGroupMultiAutoColumn())for(;t.parent;)t=t.parent,o.push(n(t));const l=o.reverse().join(" -> ");return r?`Total ${l}`:l}processCell(e){var t;const{accumulatedRowIndex:i,rowNode:s,column:n,value:r,processCellCallback:o,type:l}=e;return o?{value:(t=o(this.gos.addGridCommonParams({accumulatedRowIndex:i,column:n,node:s,value:r,type:l,parseValue:a=>this.valueService.parseValue(n,s,a,this.valueService.getValue(n,s)),formatValue:a=>{var u;return(u=this.valueService.formatValue(n,s,a))!=null?u:a}})))!=null?t:""}:n.getColDef().useValueFormatterForExport!==!1?{value:r??"",valueFormatted:this.valueService.formatValue(n,s,r)}:{value:r??""}}},$N=class{static download(e,t){const i=document.defaultView||window;if(!i){console.warn("AG Grid: There is no `window` associated with the current `document`");return}const s=document.createElement("a"),n=i.URL.createObjectURL(t);s.setAttribute("href",n),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(n)},0)}},Hy=`\r
|
|
390
|
+
`,jN=class extends zN{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,Hy),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){var s;t!=0&&(this.result+=this.columnSeparator);const n=this.extractRowCellValue(e,t,t,"csv",i);this.result+=this.putInQuotes((s=n.valueFormatted)!=null?s:n.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():(console.warn("AG Grid: unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=Hy),this.isFirstLine=!1}},On=class extends UN{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()){console.warn("AG Grid: 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"}),n=typeof t.fileName=="function"?t.fileName(this.gos.getGridCommonParams()):t.fileName;$N.download(this.getFileName(n),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,valueService:i,gos:s}=this,{processCellCallback:n,processHeaderCallback:r,processGroupHeaderCallback:o,processRowGroupCallback:l,suppressQuotes:a,columnSeparator:u}=e;return new jN({columnModel:t,valueService:i,gos:s,processCellCallback:n||void 0,processHeaderCallback:r||void 0,processGroupHeaderCallback:o||void 0,processRowGroupCallback:l||void 0,suppressQuotes:a||!1,columnSeparator:u||","})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};pi([f("columnModel")],On.prototype,"columnModel",2);pi([f("valueService")],On.prototype,"valueService",2);pi([f("gridSerializer")],On.prototype,"gridSerializer",2);pi([f("gridOptionsService")],On.prototype,"gos",2);pi([I],On.prototype,"postConstruct",1);On=pi([B("csvCreator")],On);var Fs=class extends L{serialize(e,t={}){const{allColumns:i,columnKeys:s,skipRowGroups:n}=t,r=this.getColumnsToExport(i,n,s);return Z.compose(this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t))(e).parse()}processRow(e,t,i,s){const n=t.shouldRowBeSkipped||(()=>!1),r=this.gos.get("groupRemoveSingleChildren"),o=this.gos.get("groupRemoveLowestSingleChildren"),a=t.rowPositions!=null||!!t.onlySelected,u=this.gos.get("groupHideOpenParents")&&!a,d=this.columnModel.isPivotMode()?s.leafGroup:!s.group,c=!!s.footer;t.skipRowGroups;const p=o&&s.leafGroup,C=s.allChildrenCount===1&&(r||p);if(!d&&!c&&(t.skipRowGroups||C||u)||t.onlySelected&&!s.isSelected()||t.skipPinnedTop&&s.rowPinned==="top"||t.skipPinnedBottom&&s.rowPinned==="bottom"||s.level===-1&&!d&&!c||n(this.gos.addGridCommonParams({node:s})))return;const E=e.onNewBodyRow(s);if(i.forEach((w,m)=>{E.onColumn(w,m,s)}),t.getCustomContentBelowRow){const w=t.getCustomContentBelowRow(this.gos.addGridCommonParams({node:s}));w&&e.addCustomContent(w)}}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 YR,n=this.displayedGroupCreator.createDisplayedGroups(t,s,null);this.recursivelyAddHeaderGroups(n,i,e.processGroupHeaderCallback)}return i}}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){const s=i.onNewHeaderRow();t.forEach((n,r)=>{s.onColumn(n,r,void 0)})}return i}}processPinnedTopRows(e,t){return i=>{const s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(n=>n.rowPinned==="top").sort((n,r)=>n.rowIndex-r.rowIndex).map(n=>this.pinnedRowModel.getPinnedTopRow(n.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedTopRow(s),i}}processRows(e,t){return i=>{const s=this.rowModel,n=s.getType(),r=n==="clientSide",o=n==="serverSide",l=!r&&e.onlySelected,a=this.processRow.bind(this,i,e,t),{exportedRows:u="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(d=>d.rowPinned==null).sort((d,c)=>d.rowIndex-c.rowIndex).map(d=>s.getRow(d.rowIndex)).forEach(a);else if(this.columnModel.isPivotMode())r?s.forEachPivotNode(a,!0):o?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);else if(e.onlySelectedAllPages||l){const d=this.selectionService.getSelectedNodes();this.replicateSortedOrder(d),d.forEach(a)}else u==="all"?s.forEachNode(a):r||o?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);return i}}replicateSortedOrder(e){const t=this.sortController.getSortOptions(),i=(s,n)=>{var r,o,l,a;return s.rowIndex!=null&&n.rowIndex!=null?s.rowIndex-n.rowIndex:s.level===n.level?((r=s.parent)==null?void 0:r.id)===((o=n.parent)==null?void 0:o.id)?this.rowNodeSorter.compareRowNodes(t,{rowNode:s,currentPos:(l=s.rowIndex)!=null?l:-1},{rowNode:n,currentPos:(a=n.rowIndex)!=null?a:-1}):i(s.parent,n.parent):s.level>n.level?i(s.parent,n):i(s,n.parent)};e.sort(i)}processPinnedBottomRows(e,t){return i=>{const s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(n=>n.rowPinned==="bottom").sort((n,r)=>n.rowIndex-r.rowIndex).map(n=>this.pinnedRowModel.getPinnedBottomRow(n.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedBottomRow(s),i}}getColumnsToExport(e=!1,t=!1,i){const s=this.columnModel.isPivotMode();if(i&&i.length)return this.columnModel.getGridColumns(i);const n=this.gos.get("treeData");let r=[];return e&&!s?r=this.columnModel.getAllGridColumns():r=this.columnModel.getAllDisplayedColumns(),t&&!n&&(r=r.filter(o=>o.getColId()!==Wo)),r}recursivelyAddHeaderGroups(e,t,i){const s=[];e.forEach(n=>{const r=n;r.getChildren&&r.getChildren().forEach(o=>s.push(o))}),e.length>0&&e[0]instanceof ht&&this.doAddHeaderHeader(t,e,i),s&&s.length>0&&this.recursivelyAddHeaderGroups(s,t,i)}doAddHeaderHeader(e,t,i){const s=e.onNewHeaderGroupingRow();let n=0;t.forEach(r=>{const o=r;let l;i?l=i(this.gos.addGridCommonParams({columnGroup:o})):l=this.columnModel.getDisplayNameForColumnGroup(o,"header");const a=o.getLeafColumns().reduce((u,d,c,p)=>{let C=Z.last(u);return d.getColumnGroupShow()==="open"?(!C||C[1]!=null)&&(C=[c],u.push(C)):C&&C[1]==null&&(C[1]=c-1),c===p.length-1&&C&&C[1]==null&&(C[1]=c),u},[]);s.onColumn(o,l||"",n++,o.getLeafColumns().length-1,a)})}};pi([f("displayedGroupCreator")],Fs.prototype,"displayedGroupCreator",2);pi([f("columnModel")],Fs.prototype,"columnModel",2);pi([f("rowModel")],Fs.prototype,"rowModel",2);pi([f("pinnedRowModel")],Fs.prototype,"pinnedRowModel",2);pi([f("selectionService")],Fs.prototype,"selectionService",2);pi([f("rowNodeSorter")],Fs.prototype,"rowNodeSorter",2);pi([f("sortController")],Fs.prototype,"sortController",2);Fs=pi([B("gridSerializer")],Fs);var KN="31.3.4",YN={version:KN,moduleName:"@ag-grid-community/csv-export",beans:[On,Fs]},{utf8_encode:TG}=Z;Ce.__registerModules([NN,HN,YN],!1,void 0);var El={};/**
|
|
391
|
+
* @license React
|
|
392
|
+
* react-dom-server-legacy.browser.production.min.js
|
|
393
|
+
*
|
|
394
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
395
|
+
*
|
|
396
|
+
* This source code is licensed under the MIT license found in the
|
|
397
|
+
* LICENSE file in the root directory of this source tree.
|
|
398
|
+
*/var rP=y;function re(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 Xt=Object.prototype.hasOwnProperty,QN=/^[: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]*$/,By={},Wy={};function oP(e){return Xt.call(Wy,e)?!0:Xt.call(By,e)?!1:QN.test(e)?Wy[e]=!0:(By[e]=!0,!1)}function Yt(e,t,i,s,n,r,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=n,this.mustUseProperty=i,this.propertyName=e,this.type=t,this.sanitizeURL=r,this.removeEmptyString=o}var Pt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pt[e]=new Yt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pt[t]=new Yt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pt[e]=new Yt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pt[e]=new Yt(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){Pt[e]=new Yt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pt[e]=new Yt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pt[e]=new Yt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pt[e]=new Yt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pt[e]=new Yt(e,5,!1,e.toLowerCase(),null,!1,!1)});var NC=/[\-:]([a-z])/g;function _C(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(NC,_C);Pt[t]=new Yt(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(NC,_C);Pt[t]=new Yt(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(NC,_C);Pt[t]=new Yt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pt[e]=new Yt(e,1,!1,e.toLowerCase(),null,!1,!1)});Pt.xlinkHref=new Yt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pt[e]=new Yt(e,1,!1,e.toLowerCase(),null,!0,!0)});var Pd={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},qN=["Webkit","ms","Moz","O"];Object.keys(Pd).forEach(function(e){qN.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pd[t]=Pd[e]})});var XN=/["'&<>]/;function Gt(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var t=XN.exec(e);if(t){var i="",s,n=0;for(s=t.index;s<e.length;s++){switch(e.charCodeAt(s)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}n!==s&&(i+=e.substring(n,s)),n=s+1,i+=t}e=n!==s?i+e.substring(n,s):i}return e}var ZN=/([A-Z])/g,JN=/^ms-/,Df=Array.isArray;function Ls(e,t){return{insertionMode:e,selectedValue:t}}function e_(e,t,i){switch(t){case"select":return Ls(1,i.value!=null?i.value:i.defaultValue);case"svg":return Ls(2,null);case"math":return Ls(3,null);case"foreignObject":return Ls(1,null);case"table":return Ls(4,null);case"thead":case"tbody":case"tfoot":return Ls(5,null);case"colgroup":return Ls(7,null);case"tr":return Ls(6,null)}return 4<=e.insertionMode||e.insertionMode===0?Ls(1,null):e}var Uy=new Map;function lP(e,t,i){if(typeof i!="object")throw Error(re(62));t=!0;for(var s in i)if(Xt.call(i,s)){var n=i[s];if(n!=null&&typeof n!="boolean"&&n!==""){if(s.indexOf("--")===0){var r=Gt(s);n=Gt((""+n).trim())}else{r=s;var o=Uy.get(r);o!==void 0||(o=Gt(r.replace(ZN,"-$1").toLowerCase().replace(JN,"-ms-")),Uy.set(r,o)),r=o,n=typeof n=="number"?n===0||Xt.call(Pd,s)?""+n:n+"px":Gt((""+n).trim())}t?(t=!1,e.push(' style="',r,":",n)):e.push(";",r,":",n)}}t||e.push('"')}function gi(e,t,i,s){switch(i){case"style":lP(e,t,s);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N"){if(t=Pt.hasOwnProperty(i)?Pt[i]:null,t!==null){switch(typeof s){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(i=t.attributeName,t.type){case 3:s&&e.push(" ",i,'=""');break;case 4:s===!0?e.push(" ",i,'=""'):s!==!1&&e.push(" ",i,'="',Gt(s),'"');break;case 5:isNaN(s)||e.push(" ",i,'="',Gt(s),'"');break;case 6:!isNaN(s)&&1<=s&&e.push(" ",i,'="',Gt(s),'"');break;default:t.sanitizeURL&&(s=""+s),e.push(" ",i,'="',Gt(s),'"')}}else if(oP(i)){switch(typeof s){case"function":case"symbol":return;case"boolean":if(t=i.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-")return}e.push(" ",i,'="',Gt(s),'"')}}}function bd(e,t,i){if(t!=null){if(i!=null)throw Error(re(60));if(typeof t!="object"||!("__html"in t))throw Error(re(61));t=t.__html,t!=null&&e.push(""+t)}}function t_(e){var t="";return rP.Children.forEach(e,function(i){i!=null&&(t+=i)}),t}function Bp(e,t,i,s){e.push(gs(i));var n=i=null,r;for(r in t)if(Xt.call(t,r)){var o=t[r];if(o!=null)switch(r){case"children":i=o;break;case"dangerouslySetInnerHTML":n=o;break;default:gi(e,s,r,o)}}return e.push(">"),bd(e,n,i),typeof i=="string"?(e.push(Gt(i)),null):i}var i_=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,zy=new Map;function gs(e){var t=zy.get(e);if(t===void 0){if(!i_.test(e))throw Error(re(65,e));t="<"+e,zy.set(e,t)}return t}function s_(e,t,i,s,n){switch(t){case"select":e.push(gs("select"));var r=null,o=null;for(d in i)if(Xt.call(i,d)){var l=i[d];if(l!=null)switch(d){case"children":r=l;break;case"dangerouslySetInnerHTML":o=l;break;case"defaultValue":case"value":break;default:gi(e,s,d,l)}}return e.push(">"),bd(e,o,r),r;case"option":o=n.selectedValue,e.push(gs("option"));var a=l=null,u=null,d=null;for(r in i)if(Xt.call(i,r)){var c=i[r];if(c!=null)switch(r){case"children":l=c;break;case"selected":u=c;break;case"dangerouslySetInnerHTML":d=c;break;case"value":a=c;default:gi(e,s,r,c)}}if(o!=null)if(i=a!==null?""+a:t_(l),Df(o)){for(s=0;s<o.length;s++)if(""+o[s]===i){e.push(' selected=""');break}}else""+o===i&&e.push(' selected=""');else u&&e.push(' selected=""');return e.push(">"),bd(e,d,l),l;case"textarea":e.push(gs("textarea")),d=o=r=null;for(l in i)if(Xt.call(i,l)&&(a=i[l],a!=null))switch(l){case"children":d=a;break;case"value":r=a;break;case"defaultValue":o=a;break;case"dangerouslySetInnerHTML":throw Error(re(91));default:gi(e,s,l,a)}if(r===null&&o!==null&&(r=o),e.push(">"),d!=null){if(r!=null)throw Error(re(92));if(Df(d)&&1<d.length)throw Error(re(93));r=""+d}return typeof r=="string"&&r[0]===`
|
|
399
|
+
`&&e.push(`
|
|
400
|
+
`),r!==null&&e.push(Gt(""+r)),null;case"input":e.push(gs("input")),a=d=l=r=null;for(o in i)if(Xt.call(i,o)&&(u=i[o],u!=null))switch(o){case"children":case"dangerouslySetInnerHTML":throw Error(re(399,"input"));case"defaultChecked":a=u;break;case"defaultValue":l=u;break;case"checked":d=u;break;case"value":r=u;break;default:gi(e,s,o,u)}return d!==null?gi(e,s,"checked",d):a!==null&&gi(e,s,"checked",a),r!==null?gi(e,s,"value",r):l!==null&&gi(e,s,"value",l),e.push("/>"),null;case"menuitem":e.push(gs("menuitem"));for(var p in i)if(Xt.call(i,p)&&(r=i[p],r!=null))switch(p){case"children":case"dangerouslySetInnerHTML":throw Error(re(400));default:gi(e,s,p,r)}return e.push(">"),null;case"title":e.push(gs("title")),r=null;for(c in i)if(Xt.call(i,c)&&(o=i[c],o!=null))switch(c){case"children":r=o;break;case"dangerouslySetInnerHTML":throw Error(re(434));default:gi(e,s,c,o)}return e.push(">"),r;case"listing":case"pre":e.push(gs(t)),o=r=null;for(a in i)if(Xt.call(i,a)&&(l=i[a],l!=null))switch(a){case"children":r=l;break;case"dangerouslySetInnerHTML":o=l;break;default:gi(e,s,a,l)}if(e.push(">"),o!=null){if(r!=null)throw Error(re(60));if(typeof o!="object"||!("__html"in o))throw Error(re(61));i=o.__html,i!=null&&(typeof i=="string"&&0<i.length&&i[0]===`
|
|
401
|
+
`?e.push(`
|
|
402
|
+
`,i):e.push(""+i))}return typeof r=="string"&&r[0]===`
|
|
403
|
+
`&&e.push(`
|
|
404
|
+
`),r;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":e.push(gs(t));for(var C in i)if(Xt.call(i,C)&&(r=i[C],r!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(re(399,t));default:gi(e,s,C,r)}return e.push("/>"),null;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 Bp(e,i,t,s);case"html":return n.insertionMode===0&&e.push("<!DOCTYPE html>"),Bp(e,i,t,s);default:if(t.indexOf("-")===-1&&typeof i.is!="string")return Bp(e,i,t,s);e.push(gs(t)),o=r=null;for(u in i)if(Xt.call(i,u)&&(l=i[u],l!=null))switch(u){case"children":r=l;break;case"dangerouslySetInnerHTML":o=l;break;case"style":lP(e,s,l);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:oP(u)&&typeof l!="function"&&typeof l!="symbol"&&e.push(" ",u,'="',Gt(l),'"')}return e.push(">"),bd(e,o,r),r}}function $y(e,t,i){if(e.push('<!--$?--><template id="'),i===null)throw Error(re(395));return e.push(i),e.push('"></template>')}function n_(e,t,i,s){switch(i.insertionMode){case 0:case 1:return e.push('<div hidden id="'),e.push(t.segmentPrefix),t=s.toString(16),e.push(t),e.push('">');case 2:return e.push('<svg aria-hidden="true" style="display:none" id="'),e.push(t.segmentPrefix),t=s.toString(16),e.push(t),e.push('">');case 3:return e.push('<math aria-hidden="true" style="display:none" id="'),e.push(t.segmentPrefix),t=s.toString(16),e.push(t),e.push('">');case 4:return e.push('<table hidden id="'),e.push(t.segmentPrefix),t=s.toString(16),e.push(t),e.push('">');case 5:return e.push('<table hidden><tbody id="'),e.push(t.segmentPrefix),t=s.toString(16),e.push(t),e.push('">');case 6:return e.push('<table hidden><tr id="'),e.push(t.segmentPrefix),t=s.toString(16),e.push(t),e.push('">');case 7:return e.push('<table hidden><colgroup id="'),e.push(t.segmentPrefix),t=s.toString(16),e.push(t),e.push('">');default:throw Error(re(397))}}function r_(e,t){switch(t.insertionMode){case 0:case 1:return e.push("</div>");case 2:return e.push("</svg>");case 3:return e.push("</math>");case 4:return e.push("</table>");case 5:return e.push("</tbody></table>");case 6:return e.push("</tr></table>");case 7:return e.push("</colgroup></table>");default:throw Error(re(397))}}var o_=/[<\u2028\u2029]/g;function Wp(e){return JSON.stringify(e).replace(o_,function(t){switch(t){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function l_(e,t){return t=t===void 0?"":t,{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:t+"P:",segmentPrefix:t+"S:",boundaryPrefix:t+"B:",idPrefix:t,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:e}}function jy(e,t,i,s){return i.generateStaticMarkup?(e.push(Gt(t)),!1):(t===""?e=s:(s&&e.push("<!-- -->"),e.push(Gt(t)),e=!0),e)}var aa=Object.assign,a_=Symbol.for("react.element"),aP=Symbol.for("react.portal"),uP=Symbol.for("react.fragment"),dP=Symbol.for("react.strict_mode"),cP=Symbol.for("react.profiler"),hP=Symbol.for("react.provider"),pP=Symbol.for("react.context"),gP=Symbol.for("react.forward_ref"),fP=Symbol.for("react.suspense"),mP=Symbol.for("react.suspense_list"),CP=Symbol.for("react.memo"),OC=Symbol.for("react.lazy"),u_=Symbol.for("react.scope"),d_=Symbol.for("react.debug_trace_mode"),c_=Symbol.for("react.legacy_hidden"),h_=Symbol.for("react.default_value"),Ky=Symbol.iterator;function Pf(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 uP:return"Fragment";case aP:return"Portal";case cP:return"Profiler";case dP:return"StrictMode";case fP:return"Suspense";case mP:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case pP:return(e.displayName||"Context")+".Consumer";case hP:return(e._context.displayName||"Context")+".Provider";case gP:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case CP:return t=e.displayName||null,t!==null?t:Pf(e.type)||"Memo";case OC:t=e._payload,e=e._init;try{return Pf(e(t))}catch{}}return null}var vP={};function Yy(e,t){if(e=e.contextTypes,!e)return vP;var i={},s;for(s in e)i[s]=t[s];return i}var hr=null;function Bh(e,t){if(e!==t){e.context._currentValue2=e.parentValue,e=e.parent;var i=t.parent;if(e===null){if(i!==null)throw Error(re(401))}else{if(i===null)throw Error(re(401));Bh(e,i)}t.context._currentValue2=t.value}}function yP(e){e.context._currentValue2=e.parentValue,e=e.parent,e!==null&&yP(e)}function wP(e){var t=e.parent;t!==null&&wP(t),e.context._currentValue2=e.value}function SP(e,t){if(e.context._currentValue2=e.parentValue,e=e.parent,e===null)throw Error(re(402));e.depth===t.depth?Bh(e,t):SP(e,t)}function EP(e,t){var i=t.parent;if(i===null)throw Error(re(402));e.depth===i.depth?Bh(e,i):EP(e,i),t.context._currentValue2=t.value}function Lc(e){var t=hr;t!==e&&(t===null?wP(e):e===null?yP(t):t.depth===e.depth?Bh(t,e):t.depth>e.depth?SP(t,e):EP(t,e),hr=e)}var Qy={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function qy(e,t,i,s){var n=e.state!==void 0?e.state:null;e.updater=Qy,e.props=i,e.state=n;var r={queue:[],replace:!1};e._reactInternals=r;var o=t.contextType;if(e.context=typeof o=="object"&&o!==null?o._currentValue2:s,o=t.getDerivedStateFromProps,typeof o=="function"&&(o=o(i,n),n=o==null?n:aa({},n,o),e.state=n),typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function"&&(typeof e.UNSAFE_componentWillMount=="function"||typeof e.componentWillMount=="function"))if(t=e.state,typeof e.componentWillMount=="function"&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount=="function"&&e.UNSAFE_componentWillMount(),t!==e.state&&Qy.enqueueReplaceState(e,e.state,null),r.queue!==null&&0<r.queue.length)if(t=r.queue,o=r.replace,r.queue=null,r.replace=!1,o&&t.length===1)e.state=t[0];else{for(r=o?t[0]:e.state,n=!0,o=o?1:0;o<t.length;o++){var l=t[o];l=typeof l=="function"?l.call(e,r,i,s):l,l!=null&&(n?(n=!1,r=aa({},r,l)):aa(r,l))}e.state=r}else r.queue=null}var p_={id:1,overflow:""};function bf(e,t,i){var s=e.id;e=e.overflow;var n=32-Fd(s)-1;s&=~(1<<n),i+=1;var r=32-Fd(t)+n;if(30<r){var o=n-n%5;return r=(s&(1<<o)-1).toString(32),s>>=o,n-=o,{id:1<<32-Fd(t)+n|i<<n|s,overflow:r+e}}return{id:1<<r|i<<n|s,overflow:e}}var Fd=Math.clz32?Math.clz32:m_,g_=Math.log,f_=Math.LN2;function m_(e){return e>>>=0,e===0?32:31-(g_(e)/f_|0)|0}function C_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var v_=typeof Object.is=="function"?Object.is:C_,$s=null,GC=null,Ad=null,xe=null,Yl=!1,Mc=!1,nu=0,Cn=null,Wh=0;function sr(){if($s===null)throw Error(re(321));return $s}function Xy(){if(0<Wh)throw Error(re(312));return{memoizedState:null,queue:null,next:null}}function kC(){return xe===null?Ad===null?(Yl=!1,Ad=xe=Xy()):(Yl=!0,xe=Ad):xe.next===null?(Yl=!1,xe=xe.next=Xy()):(Yl=!0,xe=xe.next),xe}function VC(){GC=$s=null,Mc=!1,Ad=null,Wh=0,xe=Cn=null}function RP(e,t){return typeof t=="function"?t(e):t}function Zy(e,t,i){if($s=sr(),xe=kC(),Yl){var s=xe.queue;if(t=s.dispatch,Cn!==null&&(i=Cn.get(s),i!==void 0)){Cn.delete(s),s=xe.memoizedState;do s=e(s,i.action),i=i.next;while(i!==null);return xe.memoizedState=s,[s,t]}return[xe.memoizedState,t]}return e=e===RP?typeof t=="function"?t():t:i!==void 0?i(t):t,xe.memoizedState=e,e=xe.queue={last:null,dispatch:null},e=e.dispatch=y_.bind(null,$s,e),[xe.memoizedState,e]}function Jy(e,t){if($s=sr(),xe=kC(),t=t===void 0?null:t,xe!==null){var i=xe.memoizedState;if(i!==null&&t!==null){var s=i[1];e:if(s===null)s=!1;else{for(var n=0;n<s.length&&n<t.length;n++)if(!v_(t[n],s[n])){s=!1;break e}s=!0}if(s)return i[0]}}return e=e(),xe.memoizedState=[e,t],e}function y_(e,t,i){if(25<=Wh)throw Error(re(301));if(e===$s)if(Mc=!0,e={action:i,next:null},Cn===null&&(Cn=new Map),i=Cn.get(t),i===void 0)Cn.set(t,e);else{for(t=i;t.next!==null;)t=t.next;t.next=e}}function w_(){throw Error(re(394))}function id(){}var ew={readContext:function(e){return e._currentValue2},useContext:function(e){return sr(),e._currentValue2},useMemo:Jy,useReducer:Zy,useRef:function(e){$s=sr(),xe=kC();var t=xe.memoizedState;return t===null?(e={current:e},xe.memoizedState=e):t},useState:function(e){return Zy(RP,e)},useInsertionEffect:id,useLayoutEffect:function(){},useCallback:function(e,t){return Jy(function(){return e},t)},useImperativeHandle:id,useEffect:id,useDebugValue:id,useDeferredValue:function(e){return sr(),e},useTransition:function(){return sr(),[!1,w_]},useId:function(){var e=GC.treeContext,t=e.overflow;e=e.id,e=(e&~(1<<32-Fd(e)-1)).toString(32)+t;var i=xd;if(i===null)throw Error(re(404));return t=nu++,e=":"+i.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return sr(),t(e._source)},useSyncExternalStore:function(e,t,i){if(i===void 0)throw Error(re(407));return i()}},xd=null,Up=rP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function S_(e){return console.error(e),null}function Ql(){}function E_(e,t,i,s,n,r,o,l,a){var u=[],d=new Set;return t={destination:null,responseState:t,progressiveChunkSize:s===void 0?12800:s,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:d,pingedTasks:u,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:n===void 0?S_:n,onAllReady:Ql,onShellReady:o===void 0?Ql:o,onShellError:Ql,onFatalError:Ql},i=Ic(t,0,null,i,!1,!1),i.parentFlushed=!0,e=HC(t,e,null,i,d,vP,null,p_),u.push(e),t}function HC(e,t,i,s,n,r,o,l){e.allPendingTasks++,i===null?e.pendingRootTasks++:i.pendingTasks++;var a={node:t,ping:function(){var u=e.pingedTasks;u.push(a),u.length===1&&PP(e)},blockedBoundary:i,blockedSegment:s,abortSet:n,legacyContext:r,context:o,treeContext:l};return n.add(a),a}function Ic(e,t,i,s,n,r){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:s,boundary:i,lastPushedText:n,textEmbedded:r}}function ru(e,t){if(e=e.onError(t),e!=null&&typeof e!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof e+'" instead');return e}function Nc(e,t){var i=e.onShellError;i(t),i=e.onFatalError,i(t),e.destination!==null?(e.status=2,e.destination.destroy(t)):(e.status=1,e.fatalError=t)}function tw(e,t,i,s,n){for($s={},GC=t,nu=0,e=i(s,n);Mc;)Mc=!1,nu=0,Wh+=1,xe=null,e=i(s,n);return VC(),e}function iw(e,t,i,s){var n=i.render(),r=s.childContextTypes;if(r!=null){var o=t.legacyContext;if(typeof i.getChildContext!="function")s=o;else{i=i.getChildContext();for(var l in i)if(!(l in r))throw Error(re(108,Pf(s)||"Unknown",l));s=aa({},o,i)}t.legacyContext=s,Ci(e,t,n),t.legacyContext=o}else Ci(e,t,n)}function sw(e,t){if(e&&e.defaultProps){t=aa({},t),e=e.defaultProps;for(var i in e)t[i]===void 0&&(t[i]=e[i]);return t}return t}function Ff(e,t,i,s,n){if(typeof i=="function")if(i.prototype&&i.prototype.isReactComponent){n=Yy(i,t.legacyContext);var r=i.contextType;r=new i(s,typeof r=="object"&&r!==null?r._currentValue2:n),qy(r,i,s,n),iw(e,t,r,i)}else{r=Yy(i,t.legacyContext),n=tw(e,t,i,s,r);var o=nu!==0;if(typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0)qy(n,i,s,r),iw(e,t,n,i);else if(o){s=t.treeContext,t.treeContext=bf(s,1,0);try{Ci(e,t,n)}finally{t.treeContext=s}}else Ci(e,t,n)}else if(typeof i=="string"){switch(n=t.blockedSegment,r=s_(n.chunks,i,s,e.responseState,n.formatContext),n.lastPushedText=!1,o=n.formatContext,n.formatContext=e_(o,i,s),Af(e,t,r),n.formatContext=o,i){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:n.chunks.push("</",i,">")}n.lastPushedText=!1}else{switch(i){case c_:case d_:case dP:case cP:case uP:Ci(e,t,s.children);return;case mP:Ci(e,t,s.children);return;case u_:throw Error(re(343));case fP:e:{i=t.blockedBoundary,n=t.blockedSegment,r=s.fallback,s=s.children,o=new Set;var l={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:o,errorDigest:null},a=Ic(e,n.chunks.length,l,n.formatContext,!1,!1);n.children.push(a),n.lastPushedText=!1;var u=Ic(e,0,null,n.formatContext,!1,!1);u.parentFlushed=!0,t.blockedBoundary=l,t.blockedSegment=u;try{if(Af(e,t,s),e.responseState.generateStaticMarkup||u.lastPushedText&&u.textEmbedded&&u.chunks.push("<!-- -->"),u.status=1,_c(l,u),l.pendingTasks===0)break e}catch(d){u.status=4,l.forceClientRender=!0,l.errorDigest=ru(e,d)}finally{t.blockedBoundary=i,t.blockedSegment=n}t=HC(e,r,i,a,o,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if(typeof i=="object"&&i!==null)switch(i.$$typeof){case gP:if(s=tw(e,t,i.render,s,n),nu!==0){i=t.treeContext,t.treeContext=bf(i,1,0);try{Ci(e,t,s)}finally{t.treeContext=i}}else Ci(e,t,s);return;case CP:i=i.type,s=sw(i,s),Ff(e,t,i,s,n);return;case hP:if(n=s.children,i=i._context,s=s.value,r=i._currentValue2,i._currentValue2=s,o=hr,hr=s={parent:o,depth:o===null?0:o.depth+1,context:i,parentValue:r,value:s},t.context=s,Ci(e,t,n),e=hr,e===null)throw Error(re(403));s=e.parentValue,e.context._currentValue2=s===h_?e.context._defaultValue:s,e=hr=e.parent,t.context=e;return;case pP:s=s.children,s=s(i._currentValue2),Ci(e,t,s);return;case OC:n=i._init,i=n(i._payload),s=sw(i,s),Ff(e,t,i,s,void 0);return}throw Error(re(130,i==null?i:typeof i,""))}}function Ci(e,t,i){if(t.node=i,typeof i=="object"&&i!==null){switch(i.$$typeof){case a_:Ff(e,t,i.type,i.props,i.ref);return;case aP:throw Error(re(257));case OC:var s=i._init;i=s(i._payload),Ci(e,t,i);return}if(Df(i)){nw(e,t,i);return}if(i===null||typeof i!="object"?s=null:(s=Ky&&i[Ky]||i["@@iterator"],s=typeof s=="function"?s:null),s&&(s=s.call(i))){if(i=s.next(),!i.done){var n=[];do n.push(i.value),i=s.next();while(!i.done);nw(e,t,n)}return}throw e=Object.prototype.toString.call(i),Error(re(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e))}typeof i=="string"?(s=t.blockedSegment,s.lastPushedText=jy(t.blockedSegment.chunks,i,e.responseState,s.lastPushedText)):typeof i=="number"&&(s=t.blockedSegment,s.lastPushedText=jy(t.blockedSegment.chunks,""+i,e.responseState,s.lastPushedText))}function nw(e,t,i){for(var s=i.length,n=0;n<s;n++){var r=t.treeContext;t.treeContext=bf(r,s,n);try{Af(e,t,i[n])}finally{t.treeContext=r}}}function Af(e,t,i){var s=t.blockedSegment.formatContext,n=t.legacyContext,r=t.context;try{return Ci(e,t,i)}catch(a){if(VC(),typeof a=="object"&&a!==null&&typeof a.then=="function"){i=a;var o=t.blockedSegment,l=Ic(e,o.chunks.length,null,o.formatContext,o.lastPushedText,!0);o.children.push(l),o.lastPushedText=!1,e=HC(e,t.node,t.blockedBoundary,l,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,i.then(e,e),t.blockedSegment.formatContext=s,t.legacyContext=n,t.context=r,Lc(r)}else throw t.blockedSegment.formatContext=s,t.legacyContext=n,t.context=r,Lc(r),a}}function R_(e){var t=e.blockedBoundary;e=e.blockedSegment,e.status=3,DP(this,t,e)}function TP(e,t,i){var s=e.blockedBoundary;e.blockedSegment.status=3,s===null?(t.allPendingTasks--,t.status!==2&&(t.status=2,t.destination!==null&&t.destination.push(null))):(s.pendingTasks--,s.forceClientRender||(s.forceClientRender=!0,e=i===void 0?Error(re(432)):i,s.errorDigest=t.onError(e),s.parentFlushed&&t.clientRenderedBoundaries.push(s)),s.fallbackAbortableTasks.forEach(function(n){return TP(n,t,i)}),s.fallbackAbortableTasks.clear(),t.allPendingTasks--,t.allPendingTasks===0&&(s=t.onAllReady,s()))}function _c(e,t){if(t.chunks.length===0&&t.children.length===1&&t.children[0].boundary===null){var i=t.children[0];i.id=t.id,i.parentFlushed=!0,i.status===1&&_c(e,i)}else e.completedSegments.push(t)}function DP(e,t,i){if(t===null){if(i.parentFlushed){if(e.completedRootSegment!==null)throw Error(re(389));e.completedRootSegment=i}e.pendingRootTasks--,e.pendingRootTasks===0&&(e.onShellError=Ql,t=e.onShellReady,t())}else t.pendingTasks--,t.forceClientRender||(t.pendingTasks===0?(i.parentFlushed&&i.status===1&&_c(t,i),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(R_,e),t.fallbackAbortableTasks.clear()):i.parentFlushed&&i.status===1&&(_c(t,i),t.completedSegments.length===1&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,e.allPendingTasks===0&&(e=e.onAllReady,e())}function PP(e){if(e.status!==2){var t=hr,i=Up.current;Up.current=ew;var s=xd;xd=e.responseState;try{var n=e.pingedTasks,r;for(r=0;r<n.length;r++){var o=n[r],l=e,a=o.blockedSegment;if(a.status===0){Lc(o.context);try{Ci(l,o,o.node),l.responseState.generateStaticMarkup||a.lastPushedText&&a.textEmbedded&&a.chunks.push("<!-- -->"),o.abortSet.delete(o),a.status=1,DP(l,o.blockedBoundary,a)}catch(v){if(VC(),typeof v=="object"&&v!==null&&typeof v.then=="function"){var u=o.ping;v.then(u,u)}else{o.abortSet.delete(o),a.status=4;var d=o.blockedBoundary,c=v,p=ru(l,c);if(d===null?Nc(l,c):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=p,d.parentFlushed&&l.clientRenderedBoundaries.push(d))),l.allPendingTasks--,l.allPendingTasks===0){var C=l.onAllReady;C()}}}finally{}}}n.splice(0,r),e.destination!==null&&BC(e,e.destination)}catch(v){ru(e,v),Nc(e,v)}finally{xd=s,Up.current=i,i===ew&&Lc(t)}}}function sd(e,t,i){switch(i.parentFlushed=!0,i.status){case 0:var s=i.id=e.nextSegmentId++;return i.lastPushedText=!1,i.textEmbedded=!1,e=e.responseState,t.push('<template id="'),t.push(e.placeholderPrefix),e=s.toString(16),t.push(e),t.push('"></template>');case 1:i.status=2;var n=!0;s=i.chunks;var r=0;i=i.children;for(var o=0;o<i.length;o++){for(n=i[o];r<n.index;r++)t.push(s[r]);n=Uh(e,t,n)}for(;r<s.length-1;r++)t.push(s[r]);return r<s.length&&(n=t.push(s[r])),n;default:throw Error(re(390))}}function Uh(e,t,i){var s=i.boundary;if(s===null)return sd(e,t,i);if(s.parentFlushed=!0,s.forceClientRender)return e.responseState.generateStaticMarkup||(s=s.errorDigest,t.push("<!--$!-->"),t.push("<template"),s&&(t.push(' data-dgst="'),s=Gt(s),t.push(s),t.push('"')),t.push("></template>")),sd(e,t,i),e=e.responseState.generateStaticMarkup?!0:t.push("<!--/$-->"),e;if(0<s.pendingTasks){s.rootSegmentID=e.nextSegmentId++,0<s.completedSegments.length&&e.partialBoundaries.push(s);var n=e.responseState,r=n.nextSuspenseID++;return n=n.boundaryPrefix+r.toString(16),s=s.id=n,$y(t,e.responseState,s),sd(e,t,i),t.push("<!--/$-->")}if(s.byteSize>e.progressiveChunkSize)return s.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(s),$y(t,e.responseState,s.id),sd(e,t,i),t.push("<!--/$-->");if(e.responseState.generateStaticMarkup||t.push("<!--$-->"),i=s.completedSegments,i.length!==1)throw Error(re(391));return Uh(e,t,i[0]),e=e.responseState.generateStaticMarkup?!0:t.push("<!--/$-->"),e}function rw(e,t,i){return n_(t,e.responseState,i.formatContext,i.id),Uh(e,t,i),r_(t,i.formatContext)}function ow(e,t,i){for(var s=i.completedSegments,n=0;n<s.length;n++)bP(e,t,i,s[n]);if(s.length=0,e=e.responseState,s=i.id,i=i.rootSegmentID,t.push(e.startInlineScript),e.sentCompleteBoundaryFunction?t.push('$RC("'):(e.sentCompleteBoundaryFunction=!0,t.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),s===null)throw Error(re(395));return i=i.toString(16),t.push(s),t.push('","'),t.push(e.segmentPrefix),t.push(i),t.push('")<\/script>')}function bP(e,t,i,s){if(s.status===2)return!0;var n=s.id;if(n===-1){if((s.id=i.rootSegmentID)===-1)throw Error(re(392));return rw(e,t,s)}return rw(e,t,s),e=e.responseState,t.push(e.startInlineScript),e.sentCompleteSegmentFunction?t.push('$RS("'):(e.sentCompleteSegmentFunction=!0,t.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),t.push(e.segmentPrefix),n=n.toString(16),t.push(n),t.push('","'),t.push(e.placeholderPrefix),t.push(n),t.push('")<\/script>')}function BC(e,t){try{var i=e.completedRootSegment;if(i!==null&&e.pendingRootTasks===0){Uh(e,t,i),e.completedRootSegment=null;var s=e.responseState.bootstrapChunks;for(i=0;i<s.length-1;i++)t.push(s[i]);i<s.length&&t.push(s[i])}var n=e.clientRenderedBoundaries,r;for(r=0;r<n.length;r++){var o=n[r];s=t;var l=e.responseState,a=o.id,u=o.errorDigest,d=o.errorMessage,c=o.errorComponentStack;if(s.push(l.startInlineScript),l.sentClientRenderFunction?s.push('$RX("'):(l.sentClientRenderFunction=!0,s.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),a===null)throw Error(re(395));if(s.push(a),s.push('"'),u||d||c){s.push(",");var p=Wp(u||"");s.push(p)}if(d||c){s.push(",");var C=Wp(d||"");s.push(C)}if(c){s.push(",");var v=Wp(c);s.push(v)}if(!s.push(")<\/script>")){e.destination=null,r++,n.splice(0,r);return}}n.splice(0,r);var S=e.completedBoundaries;for(r=0;r<S.length;r++)if(!ow(e,t,S[r])){e.destination=null,r++,S.splice(0,r);return}S.splice(0,r);var E=e.partialBoundaries;for(r=0;r<E.length;r++){var w=E[r];e:{n=e,o=t;var m=w.completedSegments;for(l=0;l<m.length;l++)if(!bP(n,o,w,m[l])){l++,m.splice(0,l);var R=!1;break e}m.splice(0,l),R=!0}if(!R){e.destination=null,r++,E.splice(0,r);return}}E.splice(0,r);var T=e.completedBoundaries;for(r=0;r<T.length;r++)if(!ow(e,t,T[r])){e.destination=null,r++,T.splice(0,r);return}T.splice(0,r)}finally{e.allPendingTasks===0&&e.pingedTasks.length===0&&e.clientRenderedBoundaries.length===0&&e.completedBoundaries.length===0&&t.push(null)}}function T_(e,t){try{var i=e.abortableTasks;i.forEach(function(s){return TP(s,e,t)}),i.clear(),e.destination!==null&&BC(e,e.destination)}catch(s){ru(e,s),Nc(e,s)}}function D_(){}function FP(e,t,i,s){var n=!1,r=null,o="",l={push:function(u){return u!==null&&(o+=u),!0},destroy:function(u){n=!0,r=u}},a=!1;if(e=E_(e,l_(i,t?t.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,D_,void 0,function(){a=!0}),PP(e),T_(e,s),e.status===1)e.status=2,l.destroy(e.fatalError);else if(e.status!==2&&e.destination===null){e.destination=l;try{BC(e,l)}catch(u){ru(e,u),Nc(e,u)}}if(n)throw r;if(!a)throw Error(re(426));return o}El.renderToNodeStream=function(){throw Error(re(207))};El.renderToStaticMarkup=function(e,t){return FP(e,t,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')};El.renderToStaticNodeStream=function(){throw Error(re(208))};El.renderToString=function(e,t){return FP(e,t,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')};El.version="18.3.1";var WC={};/**
|
|
405
|
+
* @license React
|
|
406
|
+
* react-dom-server.browser.production.min.js
|
|
407
|
+
*
|
|
408
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
409
|
+
*
|
|
410
|
+
* This source code is licensed under the MIT license found in the
|
|
411
|
+
* LICENSE file in the root directory of this source tree.
|
|
412
|
+
*/var AP=y;function ae(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 vi=null,yi=0;function q(e,t){if(t.length!==0)if(512<t.length)0<yi&&(e.enqueue(new Uint8Array(vi.buffer,0,yi)),vi=new Uint8Array(512),yi=0),e.enqueue(t);else{var i=vi.length-yi;i<t.length&&(i===0?e.enqueue(vi):(vi.set(t.subarray(0,i),yi),e.enqueue(vi),t=t.subarray(i)),vi=new Uint8Array(512),yi=0),vi.set(t,yi),yi+=t.length}}function Ge(e,t){return q(e,t),!0}function lw(e){vi&&0<yi&&(e.enqueue(new Uint8Array(vi.buffer,0,yi)),vi=null,yi=0)}var xP=new TextEncoder;function de(e){return xP.encode(e)}function z(e){return xP.encode(e)}function LP(e,t){typeof e.error=="function"?e.error(t):e.close()}var Zt=Object.prototype.hasOwnProperty,P_=/^[: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]*$/,aw={},uw={};function MP(e){return Zt.call(uw,e)?!0:Zt.call(aw,e)?!1:P_.test(e)?uw[e]=!0:(aw[e]=!0,!1)}function Qt(e,t,i,s,n,r,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=n,this.mustUseProperty=i,this.propertyName=e,this.type=t,this.sanitizeURL=r,this.removeEmptyString=o}var bt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){bt[e]=new Qt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];bt[t]=new Qt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){bt[e]=new Qt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){bt[e]=new Qt(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){bt[e]=new Qt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){bt[e]=new Qt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){bt[e]=new Qt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){bt[e]=new Qt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){bt[e]=new Qt(e,5,!1,e.toLowerCase(),null,!1,!1)});var UC=/[\-:]([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(UC,zC);bt[t]=new Qt(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(UC,zC);bt[t]=new Qt(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(UC,zC);bt[t]=new Qt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){bt[e]=new Qt(e,1,!1,e.toLowerCase(),null,!1,!1)});bt.xlinkHref=new Qt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){bt[e]=new Qt(e,1,!1,e.toLowerCase(),null,!0,!0)});var Ld={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},b_=["Webkit","ms","Moz","O"];Object.keys(Ld).forEach(function(e){b_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ld[t]=Ld[e]})});var F_=/["'&<>]/;function Et(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var t=F_.exec(e);if(t){var i="",s,n=0;for(s=t.index;s<e.length;s++){switch(e.charCodeAt(s)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}n!==s&&(i+=e.substring(n,s)),n=s+1,i+=t}e=n!==s?i+e.substring(n,s):i}return e}var A_=/([A-Z])/g,x_=/^ms-/,xf=Array.isArray,L_=z("<script>"),M_=z("<\/script>"),I_=z('<script src="'),N_=z('<script type="module" src="'),dw=z('" async=""><\/script>'),__=/(<\/|<)(s)(cript)/gi;function O_(e,t,i,s){return""+t+(i==="s"?"\\u0073":"\\u0053")+s}function G_(e,t,i,s,n){e=e===void 0?"":e,t=t===void 0?L_:z('<script nonce="'+Et(t)+'">');var r=[];if(i!==void 0&&r.push(t,de((""+i).replace(__,O_)),M_),s!==void 0)for(i=0;i<s.length;i++)r.push(I_,de(Et(s[i])),dw);if(n!==void 0)for(s=0;s<n.length;s++)r.push(N_,de(Et(n[s])),dw);return{bootstrapChunks:r,startInlineScript:t,placeholderPrefix:z(e+"P:"),segmentPrefix:z(e+"S:"),boundaryPrefix:e+"B:",idPrefix:e,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}function fs(e,t){return{insertionMode:e,selectedValue:t}}function k_(e){return fs(e==="http://www.w3.org/2000/svg"?2:e==="http://www.w3.org/1998/Math/MathML"?3:0,null)}function V_(e,t,i){switch(t){case"select":return fs(1,i.value!=null?i.value:i.defaultValue);case"svg":return fs(2,null);case"math":return fs(3,null);case"foreignObject":return fs(1,null);case"table":return fs(4,null);case"thead":case"tbody":case"tfoot":return fs(5,null);case"colgroup":return fs(7,null);case"tr":return fs(6,null)}return 4<=e.insertionMode||e.insertionMode===0?fs(1,null):e}var $C=z("<!-- -->");function cw(e,t,i,s){return t===""?s:(s&&e.push($C),e.push(de(Et(t))),!0)}var hw=new Map,H_=z(' style="'),pw=z(":"),B_=z(";");function IP(e,t,i){if(typeof i!="object")throw Error(ae(62));t=!0;for(var s in i)if(Zt.call(i,s)){var n=i[s];if(n!=null&&typeof n!="boolean"&&n!==""){if(s.indexOf("--")===0){var r=de(Et(s));n=de(Et((""+n).trim()))}else{r=s;var o=hw.get(r);o!==void 0||(o=z(Et(r.replace(A_,"-$1").toLowerCase().replace(x_,"-ms-"))),hw.set(r,o)),r=o,n=typeof n=="number"?n===0||Zt.call(Ld,s)?de(""+n):de(n+"px"):de(Et((""+n).trim()))}t?(t=!1,e.push(H_,r,pw,n)):e.push(B_,r,pw,n)}}t||e.push(nr)}var ln=z(" "),oo=z('="'),nr=z('"'),gw=z('=""');function fi(e,t,i,s){switch(i){case"style":IP(e,t,s);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N"){if(t=bt.hasOwnProperty(i)?bt[i]:null,t!==null){switch(typeof s){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(i=de(t.attributeName),t.type){case 3:s&&e.push(ln,i,gw);break;case 4:s===!0?e.push(ln,i,gw):s!==!1&&e.push(ln,i,oo,de(Et(s)),nr);break;case 5:isNaN(s)||e.push(ln,i,oo,de(Et(s)),nr);break;case 6:!isNaN(s)&&1<=s&&e.push(ln,i,oo,de(Et(s)),nr);break;default:t.sanitizeURL&&(s=""+s),e.push(ln,i,oo,de(Et(s)),nr)}}else if(MP(i)){switch(typeof s){case"function":case"symbol":return;case"boolean":if(t=i.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-")return}e.push(ln,de(i),oo,de(Et(s)),nr)}}}var an=z(">"),fw=z("/>");function Md(e,t,i){if(t!=null){if(i!=null)throw Error(ae(60));if(typeof t!="object"||!("__html"in t))throw Error(ae(61));t=t.__html,t!=null&&e.push(de(""+t))}}function W_(e){var t="";return AP.Children.forEach(e,function(i){i!=null&&(t+=i)}),t}var zp=z(' selected=""');function $p(e,t,i,s){e.push(ms(i));var n=i=null,r;for(r in t)if(Zt.call(t,r)){var o=t[r];if(o!=null)switch(r){case"children":i=o;break;case"dangerouslySetInnerHTML":n=o;break;default:fi(e,s,r,o)}}return e.push(an),Md(e,n,i),typeof i=="string"?(e.push(de(Et(i))),null):i}var jp=z(`
|
|
413
|
+
`),U_=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,mw=new Map;function ms(e){var t=mw.get(e);if(t===void 0){if(!U_.test(e))throw Error(ae(65,e));t=z("<"+e),mw.set(e,t)}return t}var z_=z("<!DOCTYPE html>");function $_(e,t,i,s,n){switch(t){case"select":e.push(ms("select"));var r=null,o=null;for(d in i)if(Zt.call(i,d)){var l=i[d];if(l!=null)switch(d){case"children":r=l;break;case"dangerouslySetInnerHTML":o=l;break;case"defaultValue":case"value":break;default:fi(e,s,d,l)}}return e.push(an),Md(e,o,r),r;case"option":o=n.selectedValue,e.push(ms("option"));var a=l=null,u=null,d=null;for(r in i)if(Zt.call(i,r)){var c=i[r];if(c!=null)switch(r){case"children":l=c;break;case"selected":u=c;break;case"dangerouslySetInnerHTML":d=c;break;case"value":a=c;default:fi(e,s,r,c)}}if(o!=null)if(i=a!==null?""+a:W_(l),xf(o)){for(s=0;s<o.length;s++)if(""+o[s]===i){e.push(zp);break}}else""+o===i&&e.push(zp);else u&&e.push(zp);return e.push(an),Md(e,d,l),l;case"textarea":e.push(ms("textarea")),d=o=r=null;for(l in i)if(Zt.call(i,l)&&(a=i[l],a!=null))switch(l){case"children":d=a;break;case"value":r=a;break;case"defaultValue":o=a;break;case"dangerouslySetInnerHTML":throw Error(ae(91));default:fi(e,s,l,a)}if(r===null&&o!==null&&(r=o),e.push(an),d!=null){if(r!=null)throw Error(ae(92));if(xf(d)&&1<d.length)throw Error(ae(93));r=""+d}return typeof r=="string"&&r[0]===`
|
|
414
|
+
`&&e.push(jp),r!==null&&e.push(de(Et(""+r))),null;case"input":e.push(ms("input")),a=d=l=r=null;for(o in i)if(Zt.call(i,o)&&(u=i[o],u!=null))switch(o){case"children":case"dangerouslySetInnerHTML":throw Error(ae(399,"input"));case"defaultChecked":a=u;break;case"defaultValue":l=u;break;case"checked":d=u;break;case"value":r=u;break;default:fi(e,s,o,u)}return d!==null?fi(e,s,"checked",d):a!==null&&fi(e,s,"checked",a),r!==null?fi(e,s,"value",r):l!==null&&fi(e,s,"value",l),e.push(fw),null;case"menuitem":e.push(ms("menuitem"));for(var p in i)if(Zt.call(i,p)&&(r=i[p],r!=null))switch(p){case"children":case"dangerouslySetInnerHTML":throw Error(ae(400));default:fi(e,s,p,r)}return e.push(an),null;case"title":e.push(ms("title")),r=null;for(c in i)if(Zt.call(i,c)&&(o=i[c],o!=null))switch(c){case"children":r=o;break;case"dangerouslySetInnerHTML":throw Error(ae(434));default:fi(e,s,c,o)}return e.push(an),r;case"listing":case"pre":e.push(ms(t)),o=r=null;for(a in i)if(Zt.call(i,a)&&(l=i[a],l!=null))switch(a){case"children":r=l;break;case"dangerouslySetInnerHTML":o=l;break;default:fi(e,s,a,l)}if(e.push(an),o!=null){if(r!=null)throw Error(ae(60));if(typeof o!="object"||!("__html"in o))throw Error(ae(61));i=o.__html,i!=null&&(typeof i=="string"&&0<i.length&&i[0]===`
|
|
415
|
+
`?e.push(jp,de(i)):e.push(de(""+i)))}return typeof r=="string"&&r[0]===`
|
|
416
|
+
`&&e.push(jp),r;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":e.push(ms(t));for(var C in i)if(Zt.call(i,C)&&(r=i[C],r!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(ae(399,t));default:fi(e,s,C,r)}return e.push(fw),null;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 $p(e,i,t,s);case"html":return n.insertionMode===0&&e.push(z_),$p(e,i,t,s);default:if(t.indexOf("-")===-1&&typeof i.is!="string")return $p(e,i,t,s);e.push(ms(t)),o=r=null;for(u in i)if(Zt.call(i,u)&&(l=i[u],l!=null))switch(u){case"children":r=l;break;case"dangerouslySetInnerHTML":o=l;break;case"style":IP(e,s,l);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:MP(u)&&typeof l!="function"&&typeof l!="symbol"&&e.push(ln,de(u),oo,de(Et(l)),nr)}return e.push(an),Md(e,o,r),r}}var j_=z("</"),K_=z(">"),Y_=z('<template id="'),Q_=z('"></template>'),q_=z("<!--$-->"),X_=z('<!--$?--><template id="'),Z_=z('"></template>'),J_=z("<!--$!-->"),eO=z("<!--/$-->"),tO=z("<template"),iO=z('"'),sO=z(' data-dgst="');z(' data-msg="');z(' data-stck="');var nO=z("></template>");function Cw(e,t,i){if(q(e,X_),i===null)throw Error(ae(395));return q(e,i),Ge(e,Z_)}var rO=z('<div hidden id="'),oO=z('">'),lO=z("</div>"),aO=z('<svg aria-hidden="true" style="display:none" id="'),uO=z('">'),dO=z("</svg>"),cO=z('<math aria-hidden="true" style="display:none" id="'),hO=z('">'),pO=z("</math>"),gO=z('<table hidden id="'),fO=z('">'),mO=z("</table>"),CO=z('<table hidden><tbody id="'),vO=z('">'),yO=z("</tbody></table>"),wO=z('<table hidden><tr id="'),SO=z('">'),EO=z("</tr></table>"),RO=z('<table hidden><colgroup id="'),TO=z('">'),DO=z("</colgroup></table>");function PO(e,t,i,s){switch(i.insertionMode){case 0:case 1:return q(e,rO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,oO);case 2:return q(e,aO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,uO);case 3:return q(e,cO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,hO);case 4:return q(e,gO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,fO);case 5:return q(e,CO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,vO);case 6:return q(e,wO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,SO);case 7:return q(e,RO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,TO);default:throw Error(ae(397))}}function bO(e,t){switch(t.insertionMode){case 0:case 1:return Ge(e,lO);case 2:return Ge(e,dO);case 3:return Ge(e,pO);case 4:return Ge(e,mO);case 5:return Ge(e,yO);case 6:return Ge(e,EO);case 7:return Ge(e,DO);default:throw Error(ae(397))}}var FO=z('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),AO=z('$RS("'),xO=z('","'),LO=z('")<\/script>'),MO=z('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),IO=z('$RC("'),NO=z('","'),_O=z('")<\/script>'),OO=z('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),GO=z('$RX("'),kO=z('"'),VO=z(")<\/script>"),Kp=z(","),HO=/[<\u2028\u2029]/g;function Yp(e){return JSON.stringify(e).replace(HO,function(t){switch(t){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var ua=Object.assign,BO=Symbol.for("react.element"),NP=Symbol.for("react.portal"),_P=Symbol.for("react.fragment"),OP=Symbol.for("react.strict_mode"),GP=Symbol.for("react.profiler"),kP=Symbol.for("react.provider"),VP=Symbol.for("react.context"),HP=Symbol.for("react.forward_ref"),BP=Symbol.for("react.suspense"),WP=Symbol.for("react.suspense_list"),UP=Symbol.for("react.memo"),jC=Symbol.for("react.lazy"),WO=Symbol.for("react.scope"),UO=Symbol.for("react.debug_trace_mode"),zO=Symbol.for("react.legacy_hidden"),$O=Symbol.for("react.default_value"),vw=Symbol.iterator;function Lf(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 _P:return"Fragment";case NP:return"Portal";case GP:return"Profiler";case OP:return"StrictMode";case BP:return"Suspense";case WP:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case VP:return(e.displayName||"Context")+".Consumer";case kP:return(e._context.displayName||"Context")+".Provider";case HP:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case UP:return t=e.displayName||null,t!==null?t:Lf(e.type)||"Memo";case jC:t=e._payload,e=e._init;try{return Lf(e(t))}catch{}}return null}var zP={};function yw(e,t){if(e=e.contextTypes,!e)return zP;var i={},s;for(s in e)i[s]=t[s];return i}var pr=null;function zh(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var i=t.parent;if(e===null){if(i!==null)throw Error(ae(401))}else{if(i===null)throw Error(ae(401));zh(e,i)}t.context._currentValue=t.value}}function $P(e){e.context._currentValue=e.parentValue,e=e.parent,e!==null&&$P(e)}function jP(e){var t=e.parent;t!==null&&jP(t),e.context._currentValue=e.value}function KP(e,t){if(e.context._currentValue=e.parentValue,e=e.parent,e===null)throw Error(ae(402));e.depth===t.depth?zh(e,t):KP(e,t)}function YP(e,t){var i=t.parent;if(i===null)throw Error(ae(402));e.depth===i.depth?zh(e,i):YP(e,i),t.context._currentValue=t.value}function Oc(e){var t=pr;t!==e&&(t===null?jP(e):e===null?$P(t):t.depth===e.depth?zh(t,e):t.depth>e.depth?KP(t,e):YP(t,e),pr=e)}var ww={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function Sw(e,t,i,s){var n=e.state!==void 0?e.state:null;e.updater=ww,e.props=i,e.state=n;var r={queue:[],replace:!1};e._reactInternals=r;var o=t.contextType;if(e.context=typeof o=="object"&&o!==null?o._currentValue:s,o=t.getDerivedStateFromProps,typeof o=="function"&&(o=o(i,n),n=o==null?n:ua({},n,o),e.state=n),typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function"&&(typeof e.UNSAFE_componentWillMount=="function"||typeof e.componentWillMount=="function"))if(t=e.state,typeof e.componentWillMount=="function"&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount=="function"&&e.UNSAFE_componentWillMount(),t!==e.state&&ww.enqueueReplaceState(e,e.state,null),r.queue!==null&&0<r.queue.length)if(t=r.queue,o=r.replace,r.queue=null,r.replace=!1,o&&t.length===1)e.state=t[0];else{for(r=o?t[0]:e.state,n=!0,o=o?1:0;o<t.length;o++){var l=t[o];l=typeof l=="function"?l.call(e,r,i,s):l,l!=null&&(n?(n=!1,r=ua({},r,l)):ua(r,l))}e.state=r}else r.queue=null}var jO={id:1,overflow:""};function Mf(e,t,i){var s=e.id;e=e.overflow;var n=32-Id(s)-1;s&=~(1<<n),i+=1;var r=32-Id(t)+n;if(30<r){var o=n-n%5;return r=(s&(1<<o)-1).toString(32),s>>=o,n-=o,{id:1<<32-Id(t)+n|i<<n|s,overflow:r+e}}return{id:1<<r|i<<n|s,overflow:e}}var Id=Math.clz32?Math.clz32:QO,KO=Math.log,YO=Math.LN2;function QO(e){return e>>>=0,e===0?32:31-(KO(e)/YO|0)|0}function qO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var XO=typeof Object.is=="function"?Object.is:qO,js=null,KC=null,Nd=null,Le=null,ql=!1,Gc=!1,ou=0,vn=null,$h=0;function rr(){if(js===null)throw Error(ae(321));return js}function Ew(){if(0<$h)throw Error(ae(312));return{memoizedState:null,queue:null,next:null}}function YC(){return Le===null?Nd===null?(ql=!1,Nd=Le=Ew()):(ql=!0,Le=Nd):Le.next===null?(ql=!1,Le=Le.next=Ew()):(ql=!0,Le=Le.next),Le}function QC(){KC=js=null,Gc=!1,Nd=null,$h=0,Le=vn=null}function QP(e,t){return typeof t=="function"?t(e):t}function Rw(e,t,i){if(js=rr(),Le=YC(),ql){var s=Le.queue;if(t=s.dispatch,vn!==null&&(i=vn.get(s),i!==void 0)){vn.delete(s),s=Le.memoizedState;do s=e(s,i.action),i=i.next;while(i!==null);return Le.memoizedState=s,[s,t]}return[Le.memoizedState,t]}return e=e===QP?typeof t=="function"?t():t:i!==void 0?i(t):t,Le.memoizedState=e,e=Le.queue={last:null,dispatch:null},e=e.dispatch=ZO.bind(null,js,e),[Le.memoizedState,e]}function Tw(e,t){if(js=rr(),Le=YC(),t=t===void 0?null:t,Le!==null){var i=Le.memoizedState;if(i!==null&&t!==null){var s=i[1];e:if(s===null)s=!1;else{for(var n=0;n<s.length&&n<t.length;n++)if(!XO(t[n],s[n])){s=!1;break e}s=!0}if(s)return i[0]}}return e=e(),Le.memoizedState=[e,t],e}function ZO(e,t,i){if(25<=$h)throw Error(ae(301));if(e===js)if(Gc=!0,e={action:i,next:null},vn===null&&(vn=new Map),i=vn.get(t),i===void 0)vn.set(t,e);else{for(t=i;t.next!==null;)t=t.next;t.next=e}}function JO(){throw Error(ae(394))}function nd(){}var Dw={readContext:function(e){return e._currentValue},useContext:function(e){return rr(),e._currentValue},useMemo:Tw,useReducer:Rw,useRef:function(e){js=rr(),Le=YC();var t=Le.memoizedState;return t===null?(e={current:e},Le.memoizedState=e):t},useState:function(e){return Rw(QP,e)},useInsertionEffect:nd,useLayoutEffect:function(){},useCallback:function(e,t){return Tw(function(){return e},t)},useImperativeHandle:nd,useEffect:nd,useDebugValue:nd,useDeferredValue:function(e){return rr(),e},useTransition:function(){return rr(),[!1,JO]},useId:function(){var e=KC.treeContext,t=e.overflow;e=e.id,e=(e&~(1<<32-Id(e)-1)).toString(32)+t;var i=_d;if(i===null)throw Error(ae(404));return t=ou++,e=":"+i.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return rr(),t(e._source)},useSyncExternalStore:function(e,t,i){if(i===void 0)throw Error(ae(407));return i()}},_d=null,Qp=AP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function e0(e){return console.error(e),null}function Xl(){}function t0(e,t,i,s,n,r,o,l,a){var u=[],d=new Set;return t={destination:null,responseState:t,progressiveChunkSize:s===void 0?12800:s,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:d,pingedTasks:u,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:n===void 0?e0:n,onAllReady:r===void 0?Xl:r,onShellReady:o===void 0?Xl:o,onShellError:l===void 0?Xl:l,onFatalError:a===void 0?Xl:a},i=kc(t,0,null,i,!1,!1),i.parentFlushed=!0,e=qC(t,e,null,i,d,zP,null,jO),u.push(e),t}function qC(e,t,i,s,n,r,o,l){e.allPendingTasks++,i===null?e.pendingRootTasks++:i.pendingTasks++;var a={node:t,ping:function(){var u=e.pingedTasks;u.push(a),u.length===1&&ZP(e)},blockedBoundary:i,blockedSegment:s,abortSet:n,legacyContext:r,context:o,treeContext:l};return n.add(a),a}function kc(e,t,i,s,n,r){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:s,boundary:i,lastPushedText:n,textEmbedded:r}}function lu(e,t){if(e=e.onError(t),e!=null&&typeof e!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof e+'" instead');return e}function Vc(e,t){var i=e.onShellError;i(t),i=e.onFatalError,i(t),e.destination!==null?(e.status=2,LP(e.destination,t)):(e.status=1,e.fatalError=t)}function Pw(e,t,i,s,n){for(js={},KC=t,ou=0,e=i(s,n);Gc;)Gc=!1,ou=0,$h+=1,Le=null,e=i(s,n);return QC(),e}function bw(e,t,i,s){var n=i.render(),r=s.childContextTypes;if(r!=null){var o=t.legacyContext;if(typeof i.getChildContext!="function")s=o;else{i=i.getChildContext();for(var l in i)if(!(l in r))throw Error(ae(108,Lf(s)||"Unknown",l));s=ua({},o,i)}t.legacyContext=s,wi(e,t,n),t.legacyContext=o}else wi(e,t,n)}function Fw(e,t){if(e&&e.defaultProps){t=ua({},t),e=e.defaultProps;for(var i in e)t[i]===void 0&&(t[i]=e[i]);return t}return t}function If(e,t,i,s,n){if(typeof i=="function")if(i.prototype&&i.prototype.isReactComponent){n=yw(i,t.legacyContext);var r=i.contextType;r=new i(s,typeof r=="object"&&r!==null?r._currentValue:n),Sw(r,i,s,n),bw(e,t,r,i)}else{r=yw(i,t.legacyContext),n=Pw(e,t,i,s,r);var o=ou!==0;if(typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0)Sw(n,i,s,r),bw(e,t,n,i);else if(o){s=t.treeContext,t.treeContext=Mf(s,1,0);try{wi(e,t,n)}finally{t.treeContext=s}}else wi(e,t,n)}else if(typeof i=="string"){switch(n=t.blockedSegment,r=$_(n.chunks,i,s,e.responseState,n.formatContext),n.lastPushedText=!1,o=n.formatContext,n.formatContext=V_(o,i,s),Nf(e,t,r),n.formatContext=o,i){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:n.chunks.push(j_,de(i),K_)}n.lastPushedText=!1}else{switch(i){case zO:case UO:case OP:case GP:case _P:wi(e,t,s.children);return;case WP:wi(e,t,s.children);return;case WO:throw Error(ae(343));case BP:e:{i=t.blockedBoundary,n=t.blockedSegment,r=s.fallback,s=s.children,o=new Set;var l={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:o,errorDigest:null},a=kc(e,n.chunks.length,l,n.formatContext,!1,!1);n.children.push(a),n.lastPushedText=!1;var u=kc(e,0,null,n.formatContext,!1,!1);u.parentFlushed=!0,t.blockedBoundary=l,t.blockedSegment=u;try{if(Nf(e,t,s),u.lastPushedText&&u.textEmbedded&&u.chunks.push($C),u.status=1,Hc(l,u),l.pendingTasks===0)break e}catch(d){u.status=4,l.forceClientRender=!0,l.errorDigest=lu(e,d)}finally{t.blockedBoundary=i,t.blockedSegment=n}t=qC(e,r,i,a,o,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if(typeof i=="object"&&i!==null)switch(i.$$typeof){case HP:if(s=Pw(e,t,i.render,s,n),ou!==0){i=t.treeContext,t.treeContext=Mf(i,1,0);try{wi(e,t,s)}finally{t.treeContext=i}}else wi(e,t,s);return;case UP:i=i.type,s=Fw(i,s),If(e,t,i,s,n);return;case kP:if(n=s.children,i=i._context,s=s.value,r=i._currentValue,i._currentValue=s,o=pr,pr=s={parent:o,depth:o===null?0:o.depth+1,context:i,parentValue:r,value:s},t.context=s,wi(e,t,n),e=pr,e===null)throw Error(ae(403));s=e.parentValue,e.context._currentValue=s===$O?e.context._defaultValue:s,e=pr=e.parent,t.context=e;return;case VP:s=s.children,s=s(i._currentValue),wi(e,t,s);return;case jC:n=i._init,i=n(i._payload),s=Fw(i,s),If(e,t,i,s,void 0);return}throw Error(ae(130,i==null?i:typeof i,""))}}function wi(e,t,i){if(t.node=i,typeof i=="object"&&i!==null){switch(i.$$typeof){case BO:If(e,t,i.type,i.props,i.ref);return;case NP:throw Error(ae(257));case jC:var s=i._init;i=s(i._payload),wi(e,t,i);return}if(xf(i)){Aw(e,t,i);return}if(i===null||typeof i!="object"?s=null:(s=vw&&i[vw]||i["@@iterator"],s=typeof s=="function"?s:null),s&&(s=s.call(i))){if(i=s.next(),!i.done){var n=[];do n.push(i.value),i=s.next();while(!i.done);Aw(e,t,n)}return}throw e=Object.prototype.toString.call(i),Error(ae(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e))}typeof i=="string"?(s=t.blockedSegment,s.lastPushedText=cw(t.blockedSegment.chunks,i,e.responseState,s.lastPushedText)):typeof i=="number"&&(s=t.blockedSegment,s.lastPushedText=cw(t.blockedSegment.chunks,""+i,e.responseState,s.lastPushedText))}function Aw(e,t,i){for(var s=i.length,n=0;n<s;n++){var r=t.treeContext;t.treeContext=Mf(r,s,n);try{Nf(e,t,i[n])}finally{t.treeContext=r}}}function Nf(e,t,i){var s=t.blockedSegment.formatContext,n=t.legacyContext,r=t.context;try{return wi(e,t,i)}catch(a){if(QC(),typeof a=="object"&&a!==null&&typeof a.then=="function"){i=a;var o=t.blockedSegment,l=kc(e,o.chunks.length,null,o.formatContext,o.lastPushedText,!0);o.children.push(l),o.lastPushedText=!1,e=qC(e,t.node,t.blockedBoundary,l,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,i.then(e,e),t.blockedSegment.formatContext=s,t.legacyContext=n,t.context=r,Oc(r)}else throw t.blockedSegment.formatContext=s,t.legacyContext=n,t.context=r,Oc(r),a}}function i0(e){var t=e.blockedBoundary;e=e.blockedSegment,e.status=3,XP(this,t,e)}function qP(e,t,i){var s=e.blockedBoundary;e.blockedSegment.status=3,s===null?(t.allPendingTasks--,t.status!==2&&(t.status=2,t.destination!==null&&t.destination.close())):(s.pendingTasks--,s.forceClientRender||(s.forceClientRender=!0,e=i===void 0?Error(ae(432)):i,s.errorDigest=t.onError(e),s.parentFlushed&&t.clientRenderedBoundaries.push(s)),s.fallbackAbortableTasks.forEach(function(n){return qP(n,t,i)}),s.fallbackAbortableTasks.clear(),t.allPendingTasks--,t.allPendingTasks===0&&(s=t.onAllReady,s()))}function Hc(e,t){if(t.chunks.length===0&&t.children.length===1&&t.children[0].boundary===null){var i=t.children[0];i.id=t.id,i.parentFlushed=!0,i.status===1&&Hc(e,i)}else e.completedSegments.push(t)}function XP(e,t,i){if(t===null){if(i.parentFlushed){if(e.completedRootSegment!==null)throw Error(ae(389));e.completedRootSegment=i}e.pendingRootTasks--,e.pendingRootTasks===0&&(e.onShellError=Xl,t=e.onShellReady,t())}else t.pendingTasks--,t.forceClientRender||(t.pendingTasks===0?(i.parentFlushed&&i.status===1&&Hc(t,i),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(i0,e),t.fallbackAbortableTasks.clear()):i.parentFlushed&&i.status===1&&(Hc(t,i),t.completedSegments.length===1&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,e.allPendingTasks===0&&(e=e.onAllReady,e())}function ZP(e){if(e.status!==2){var t=pr,i=Qp.current;Qp.current=Dw;var s=_d;_d=e.responseState;try{var n=e.pingedTasks,r;for(r=0;r<n.length;r++){var o=n[r],l=e,a=o.blockedSegment;if(a.status===0){Oc(o.context);try{wi(l,o,o.node),a.lastPushedText&&a.textEmbedded&&a.chunks.push($C),o.abortSet.delete(o),a.status=1,XP(l,o.blockedBoundary,a)}catch(v){if(QC(),typeof v=="object"&&v!==null&&typeof v.then=="function"){var u=o.ping;v.then(u,u)}else{o.abortSet.delete(o),a.status=4;var d=o.blockedBoundary,c=v,p=lu(l,c);if(d===null?Vc(l,c):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=p,d.parentFlushed&&l.clientRenderedBoundaries.push(d))),l.allPendingTasks--,l.allPendingTasks===0){var C=l.onAllReady;C()}}}finally{}}}n.splice(0,r),e.destination!==null&&XC(e,e.destination)}catch(v){lu(e,v),Vc(e,v)}finally{_d=s,Qp.current=i,i===Dw&&Oc(t)}}}function rd(e,t,i){switch(i.parentFlushed=!0,i.status){case 0:var s=i.id=e.nextSegmentId++;return i.lastPushedText=!1,i.textEmbedded=!1,e=e.responseState,q(t,Y_),q(t,e.placeholderPrefix),e=de(s.toString(16)),q(t,e),Ge(t,Q_);case 1:i.status=2;var n=!0;s=i.chunks;var r=0;i=i.children;for(var o=0;o<i.length;o++){for(n=i[o];r<n.index;r++)q(t,s[r]);n=jh(e,t,n)}for(;r<s.length-1;r++)q(t,s[r]);return r<s.length&&(n=Ge(t,s[r])),n;default:throw Error(ae(390))}}function jh(e,t,i){var s=i.boundary;if(s===null)return rd(e,t,i);if(s.parentFlushed=!0,s.forceClientRender)s=s.errorDigest,Ge(t,J_),q(t,tO),s&&(q(t,sO),q(t,de(Et(s))),q(t,iO)),Ge(t,nO),rd(e,t,i);else if(0<s.pendingTasks){s.rootSegmentID=e.nextSegmentId++,0<s.completedSegments.length&&e.partialBoundaries.push(s);var n=e.responseState,r=n.nextSuspenseID++;n=z(n.boundaryPrefix+r.toString(16)),s=s.id=n,Cw(t,e.responseState,s),rd(e,t,i)}else if(s.byteSize>e.progressiveChunkSize)s.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(s),Cw(t,e.responseState,s.id),rd(e,t,i);else{if(Ge(t,q_),i=s.completedSegments,i.length!==1)throw Error(ae(391));jh(e,t,i[0])}return Ge(t,eO)}function xw(e,t,i){return PO(t,e.responseState,i.formatContext,i.id),jh(e,t,i),bO(t,i.formatContext)}function Lw(e,t,i){for(var s=i.completedSegments,n=0;n<s.length;n++)JP(e,t,i,s[n]);if(s.length=0,e=e.responseState,s=i.id,i=i.rootSegmentID,q(t,e.startInlineScript),e.sentCompleteBoundaryFunction?q(t,IO):(e.sentCompleteBoundaryFunction=!0,q(t,MO)),s===null)throw Error(ae(395));return i=de(i.toString(16)),q(t,s),q(t,NO),q(t,e.segmentPrefix),q(t,i),Ge(t,_O)}function JP(e,t,i,s){if(s.status===2)return!0;var n=s.id;if(n===-1){if((s.id=i.rootSegmentID)===-1)throw Error(ae(392));return xw(e,t,s)}return xw(e,t,s),e=e.responseState,q(t,e.startInlineScript),e.sentCompleteSegmentFunction?q(t,AO):(e.sentCompleteSegmentFunction=!0,q(t,FO)),q(t,e.segmentPrefix),n=de(n.toString(16)),q(t,n),q(t,xO),q(t,e.placeholderPrefix),q(t,n),Ge(t,LO)}function XC(e,t){vi=new Uint8Array(512),yi=0;try{var i=e.completedRootSegment;if(i!==null&&e.pendingRootTasks===0){jh(e,t,i),e.completedRootSegment=null;var s=e.responseState.bootstrapChunks;for(i=0;i<s.length-1;i++)q(t,s[i]);i<s.length&&Ge(t,s[i])}var n=e.clientRenderedBoundaries,r;for(r=0;r<n.length;r++){var o=n[r];s=t;var l=e.responseState,a=o.id,u=o.errorDigest,d=o.errorMessage,c=o.errorComponentStack;if(q(s,l.startInlineScript),l.sentClientRenderFunction?q(s,GO):(l.sentClientRenderFunction=!0,q(s,OO)),a===null)throw Error(ae(395));q(s,a),q(s,kO),(u||d||c)&&(q(s,Kp),q(s,de(Yp(u||"")))),(d||c)&&(q(s,Kp),q(s,de(Yp(d||"")))),c&&(q(s,Kp),q(s,de(Yp(c)))),Ge(s,VO)}n.splice(0,r);var p=e.completedBoundaries;for(r=0;r<p.length;r++)Lw(e,t,p[r]);p.splice(0,r),lw(t),vi=new Uint8Array(512),yi=0;var C=e.partialBoundaries;for(r=0;r<C.length;r++){var v=C[r];e:{n=e,o=t;var S=v.completedSegments;for(l=0;l<S.length;l++)if(!JP(n,o,v,S[l])){l++,S.splice(0,l);var E=!1;break e}S.splice(0,l),E=!0}if(!E){e.destination=null,r++,C.splice(0,r);return}}C.splice(0,r);var w=e.completedBoundaries;for(r=0;r<w.length;r++)Lw(e,t,w[r]);w.splice(0,r)}finally{lw(t),e.allPendingTasks===0&&e.pingedTasks.length===0&&e.clientRenderedBoundaries.length===0&&e.completedBoundaries.length===0&&t.close()}}function Mw(e,t){try{var i=e.abortableTasks;i.forEach(function(s){return qP(s,e,t)}),i.clear(),e.destination!==null&&XC(e,e.destination)}catch(s){lu(e,s),Vc(e,s)}}WC.renderToReadableStream=function(e,t){return new Promise(function(i,s){var n,r,o=new Promise(function(d,c){r=d,n=c}),l=t0(e,G_(t?t.identifierPrefix:void 0,t?t.nonce:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),k_(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,r,function(){var d=new ReadableStream({type:"bytes",pull:function(c){if(l.status===1)l.status=2,LP(c,l.fatalError);else if(l.status!==2&&l.destination===null){l.destination=c;try{XC(l,c)}catch(p){lu(l,p),Vc(l,p)}}},cancel:function(){Mw(l)}},{highWaterMark:0});d.allReady=o,i(d)},function(d){o.catch(function(){}),s(d)},n);if(t&&t.signal){var a=t.signal,u=function(){Mw(l,a.reason),a.removeEventListener("abort",u)};a.addEventListener("abort",u)}ZP(l)})};WC.version="18.3.1";var Rl,eb;Rl=El,eb=WC;Rl.version;Rl.renderToString;var s0=Rl.renderToStaticMarkup;Rl.renderToNodeStream;Rl.renderToStaticNodeStream;eb.renderToReadableStream;var n0=Object.defineProperty,r0=Object.defineProperties,o0=Object.getOwnPropertyDescriptors,Iw=Object.getOwnPropertySymbols,l0=Object.prototype.hasOwnProperty,a0=Object.prototype.propertyIsEnumerable,Nw=(e,t,i)=>t in e?n0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,He=(e,t)=>{for(var i in t||(t={}))l0.call(t,i)&&Nw(e,i,t[i]);if(Iw)for(var i of Iw(t))a0.call(t,i)&&Nw(e,i,t[i]);return e},Wt=(e,t)=>r0(e,o0(t)),ZC=y.createContext({setMethods:()=>{}}),u0=e=>{const{initialProps:t,addUpdateCallback:i,CustomComponentClass:s,setMethods:n}=e,[r,o]=y.useState(t);return y.useEffect(()=>{i(l=>o(l))},[]),O.createElement(ZC.Provider,{value:{setMethods:n}},O.createElement(s,He({},r)))},d0=y.memo(u0),c0=0;function _w(){return`agPortalKey_${++c0}`}var tb=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=_w(),this.portalKey=_w(),this.instanceCreated=this.isStatelessComponent()?it.resolve(!1):new it(n=>{this.resolveInstanceCreated=n})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){return this.componentInstance&&typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy(),this.portalManager.destroyPortal(this.portal)}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()&&(Z.warnOnce('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()&&(Z.warnOnce('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.params=e,this.createOrUpdatePortal(e),new it(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,Wt(He({},e),{key:this.key})),this.portal=sh.createPortal(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return y.createElement(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,t=>{e(t)})}isNullValue(){return this.valueRenderedIsNull(this.params)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!!(!this.isStatelessComponent()&&this.getFrameworkComponentInstance())}valueRenderedIsNull(e){if(!this.componentType.cellRenderer)return!1;const t=console.error;try{return console.error=()=>{},s0(y.createElement(this.reactComponent,e))===""}catch{}finally{console.error=t}return!1}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 JC(e,t,i){e.forEach(s=>{const n=t[s];n&&(i[s]=n)})}var qn=class extends tb{constructor(){super(...arguments),this.awaitUpdateCallback=new it(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=d0}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 it(s=>{setTimeout(()=>{s()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,JC(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return Wt(He({},this.sourceParams),{key:this.key,ref:this.ref})}refreshProps(){return this.updateCallback?this.updateCallback():new it(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},h0=class extends qn{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}},p0=class extends qn{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterChangedCallback()}isFilterActive(){return this.model!=null}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.model=e,this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getOptionalMethods(){return["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}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 ib(e,t){e.parentFilterInstance(i=>{(i.setModel(t)||it.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var g0=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=i=>this.updateModel(i)}getProps(){return Wt(He({},this.floatingFilterParams),{model:this.model,onModelChange:this.onModelChange})}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){JC(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),ib(this.floatingFilterParams,e)}},f0=class extends qn{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(),ib(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},m0=class extends qn{refresh(e){this.sourceParams=e,this.refreshProps()}},C0=class extends qn{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}},v0=class extends qn{refresh(e){this.sourceParams=e,this.refreshProps()}},y0=class extends qn{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},w0=class extends qn{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}},sb=class nb{constructor(t,i,s){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=i||"div",this.refresher=t,this.maxComponentCreationTimeMs=s||nb.MAX_COMPONENT_CREATION_TIME_IN_MS}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(t){this.portals=this.portals.filter(i=>i!==t),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(t,i,s){this.portals=[...this.portals,t],this.waitForInstance(i,s),this.batchUpdate()}updateReactPortal(t,i){this.portals[this.portals.indexOf(t)]=i,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(t,i,s=Date.now()){if(this.destroyed){i(null);return}if(t.rendered())i(t);else{if(Date.now()-s>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate){if(t.isNullValue()){i(t);return}console.error(`AG Grid: React Component '${t.getReactComponentName()}' not created within ${this.maxComponentCreationTimeMs}ms.`),console.error(" If the component is using `forwardRef` but not `useImperativeHandle`, add the following: `useImperativeHandle(ref, () => ({}));`");return}window.setTimeout(()=>{this.waitForInstance(t,i,s)})}}};sb.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3;var S0=sb,qt=O.createContext({}),Zi=(...e)=>e.filter(i=>i!=null&&i!=="").join(" "),Oi=class rb{constructor(...t){this.classesMap={},t.forEach(i=>{this.classesMap[i]=!0})}setClass(t,i){if(!!this.classesMap[t]==i)return this;const n=new rb;return n.classesMap=He({},this.classesMap),n.classesMap[t]=i,n}toString(){return Object.keys(this.classesMap).filter(i=>this.classesMap[i]).join(" ")}},Tl=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()},E0=zg.createRoot!=null&&zg.flushSync!=null,Od=!1;function R0(e){return Od||setTimeout(()=>Od=!1,0),Od=!0,e()}var ev=(e,t)=>{E0&&e&&!Od?zg.flushSync(t):t()};function tv(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=[],n=[],r=new Map,o=new Map;for(let l=0;l<t.length;l++){const a=t[l];o.set(a.getInstanceId(),a)}for(let l=0;l<e.length;l++){const a=e[l];r.set(a.getInstanceId(),a),o.has(a.getInstanceId())&&s.push(a)}for(let l=0;l<t.length;l++){const a=t[l],u=a.getInstanceId();r.has(u)||n.push(a)}return s.length===e.length&&n.length===0?e:s.length===0&&n.length===t.length?t:s.length===0?n:n.length===0?s:[...s,...n]}var Nu=(e,t,i,s)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const r=e.newAgStackInstance();if(!r)return;let o,l,a=!1;return r.then(u=>{if(a){t.destroyBean(u);return}o=u,l=o.getGui(),i.appendChild(l),Ow(s,o)}),()=>{a=!0,o&&(l&&l.parentElement&&l.parentElement.removeChild(l),t.destroyBean(o),s&&Ow(s,void 0))}},Ow=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const i=e;i.current=t}},T0=e=>{const t=e.newAgStackInstance();if(t)return t.resolveNow(null,i=>i)},ob=y.forwardRef((e,t)=>{var i;const s=y.useContext(qt).context,n=y.useRef(null),r=y.useRef(null),o=y.useRef(null),l=y.useRef(null),a=y.useRef(null),u=y.useRef(),[d,c]=y.useState(),[p,C]=y.useState(),[v,S]=y.useState(),[E,w]=y.useState(()=>new Oi),[m,R]=y.useState(()=>new Oi("ag-hidden")),[T,P]=y.useState(()=>new Oi("ag-hidden")),[F,b]=y.useState(()=>new Oi("ag-invisible"));y.useImperativeHandle(t,()=>({refresh(){return!1}})),y.useLayoutEffect(()=>Nu(d,s,r.current),[d]);const M=y.useCallback(ge=>{if(n.current=ge,!n.current){s.destroyBean(u.current),u.current=null;return}const G={setInnerRenderer:(H,W)=>{c(H),S(W)},setChildCount:H=>C(H),addOrRemoveCssClass:(H,W)=>w(X=>X.setClass(H,W)),setContractedDisplayed:H=>P(W=>W.setClass("ag-hidden",!H)),setExpandedDisplayed:H=>R(W=>W.setClass("ag-hidden",!H)),setCheckboxVisible:H=>b(W=>W.setClass("ag-invisible",!H))};u.current=s.createBean(new $r),u.current.init(G,n.current,o.current,l.current,a.current,ob,e)},[]),N=y.useMemo(()=>`ag-cell-wrapper ${E.toString()}`,[E]),k=y.useMemo(()=>`ag-group-expanded ${m.toString()}`,[m]),$=y.useMemo(()=>`ag-group-contracted ${T.toString()}`,[T]),U=y.useMemo(()=>`ag-group-checkbox ${F.toString()}`,[F]),Q=d&&d.componentFromFramework,he=Q?d.componentClass:void 0,we=d==null&&v!=null,fe=Z.escapeString(v,!0);return O.createElement("span",He({className:N,ref:M},e.colDef?{}:{role:(i=u.current)==null?void 0:i.getCellAriaRole()}),O.createElement("span",{className:k,ref:l}),O.createElement("span",{className:$,ref:a}),O.createElement("span",{className:U,ref:o}),O.createElement("span",{className:"ag-group-value",ref:r},we&&O.createElement(O.Fragment,null,fe),Q&&O.createElement(he,He({},d.params))),O.createElement("span",{className:"ag-group-child-count"},p))}),Gw=ob,D0=e=>{const{ctrl:t}=e,i=t.isAlive(),{context:s}=y.useContext(qt),n=i?t.getColId():void 0,[r,o]=y.useState(),l=y.useRef(null),a=y.useRef(null),u=y.useRef(null),d=y.useRef();let c=y.useRef();i&&!c.current&&(c.current=new wu(()=>l.current));const p=y.useCallback(E=>{var w;if(l.current=E,!l.current||!i)return;const m={setWidth:T=>{l.current&&(l.current.style.width=T)},addOrRemoveCssClass:(T,P)=>c.current.addOrRemoveCssClass(T,P),setAriaSort:T=>{l.current&&(T?Z.setAriaSort(l.current,T):Z.removeAriaSort(l.current))},setUserCompDetails:T=>o(T),getUserCompInstance:()=>d.current||void 0};t.setComp(m,l.current,a.current,u.current);const R=t.getSelectAllGui();(w=a.current)==null||w.insertAdjacentElement("afterend",R)},[]);y.useLayoutEffect(()=>Nu(r,s,u.current,d),[r]),y.useEffect(()=>{t.setDragSource(l.current)},[r]);const C=y.useMemo(()=>!!((r==null?void 0:r.componentFromFramework)&&Tl(r.componentClass)),[r]),v=r&&r.componentFromFramework,S=r&&r.componentClass;return O.createElement("div",{ref:p,className:"ag-header-cell","col-id":n,role:"columnheader"},O.createElement("div",{ref:a,className:"ag-header-cell-resize",role:"presentation"}),O.createElement("div",{ref:u,className:"ag-header-cell-comp-wrapper",role:"presentation"},v&&C&&O.createElement(S,He({},r.params)),v&&!C&&O.createElement(S,Wt(He({},r.params),{ref:d}))))},P0=y.memo(D0),b0=e=>{const{context:t}=y.useContext(qt),{ctrl:i}=e,[s,n]=y.useState(()=>new Oi),[r,o]=y.useState(()=>new Oi),[l,a]=y.useState("false"),[u,d]=y.useState(),[c,p]=y.useState(),C=y.useMemo(()=>i.getColId(),[]),v=y.useRef(null),S=y.useRef(null),E=y.useRef(),w=y.useCallback(b=>{if(v.current=b,!v.current)return;const M={setWidth:N=>{v.current&&(v.current.style.width=N)},addOrRemoveCssClass:(N,k)=>n($=>$.setClass(N,k)),setUserCompDetails:N=>p(N),setResizableDisplayed:N=>{o(k=>k.setClass("ag-hidden",!N)),a(N?"false":"true")},setAriaExpanded:N=>d(N),getUserCompInstance:()=>E.current||void 0};i.setComp(M,v.current,S.current)},[]);y.useLayoutEffect(()=>Nu(c,t,v.current),[c]),y.useEffect(()=>{v.current&&i.setDragSource(v.current)},[c]);const m=y.useMemo(()=>!!((c==null?void 0:c.componentFromFramework)&&Tl(c.componentClass)),[c]),R=y.useMemo(()=>"ag-header-group-cell "+s.toString(),[s]),T=y.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),P=c&&c.componentFromFramework,F=c&&c.componentClass;return O.createElement("div",{ref:w,className:R,"col-id":C,role:"columnheader","aria-expanded":u},P&&m&&O.createElement(F,He({},c.params)),P&&!m&&O.createElement(F,Wt(He({},c.params),{ref:E})),O.createElement("div",{ref:S,"aria-hidden":l,className:T}))},F0=y.memo(b0);function iv(){Z.warnOnce("Using custom components without `reactiveCustomComponents = true` is deprecated.")}var A0=e=>{const{context:t,gos:i}=y.useContext(qt),[s,n]=y.useState(()=>new Oi("ag-header-cell","ag-floating-filter")),[r,o]=y.useState(()=>new Oi),[l,a]=y.useState(()=>new Oi("ag-floating-filter-button","ag-hidden")),[u,d]=y.useState("false"),[c,p]=y.useState(),[C,v]=y.useState(1),S=y.useRef(null),E=y.useRef(null),w=y.useRef(null),m=y.useRef(null),R=y.useRef(),T=y.useRef(),P=ge=>{ge!=null&&R.current&&R.current(ge)},{ctrl:F}=e,b=y.useCallback(ge=>{if(S.current=ge,!S.current)return;T.current=new it(H=>{R.current=H});const G={addOrRemoveCssClass:(H,W)=>n(X=>X.setClass(H,W)),addOrRemoveBodyCssClass:(H,W)=>o(X=>X.setClass(H,W)),setButtonWrapperDisplayed:H=>{a(W=>W.setClass("ag-hidden",!H)),d(H?"false":"true")},setWidth:H=>{S.current&&(S.current.style.width=H)},setCompDetails:H=>p(H),getFloatingFilterComp:()=>T.current?T.current:null,setMenuIcon:H=>{var W;return(W=m.current)==null?void 0:W.appendChild(H)}};F.setComp(G,S.current,m.current,E.current)},[]);y.useLayoutEffect(()=>Nu(c,t,E.current,P),[c]);const M=y.useMemo(()=>s.toString(),[s]),N=y.useMemo(()=>r.toString(),[r]),k=y.useMemo(()=>l.toString(),[l]),$=y.useMemo(()=>!!(c&&c.componentFromFramework&&Tl(c.componentClass)),[c]),U=y.useMemo(()=>i.get("reactiveCustomComponents"),[]),Q=y.useMemo(()=>{if(c)if(U){const ge=new g0(c.params,()=>v(G=>G+1));return P(ge),ge}else c.componentFromFramework&&iv()},[c]),he=Q==null?void 0:Q.getProps(),we=c&&c.componentFromFramework,fe=c&&c.componentClass;return O.createElement("div",{ref:b,className:M,role:"gridcell"},O.createElement("div",{ref:E,className:N,role:"presentation"},we&&!U&&O.createElement(fe,Wt(He({},c.params),{ref:$?()=>{}:P})),we&&U&&O.createElement(ZC.Provider,{value:{setMethods:ge=>Q.setMethods(ge)}},O.createElement(fe,He({},he)))),O.createElement("div",{ref:w,"aria-hidden":u,className:k,role:"presentation"},O.createElement("button",{ref:m,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},x0=y.memo(A0),L0=e=>{const{ctrl:t}=e,{topOffset:i,rowHeight:s}=y.useMemo(()=>t.getTopAndHeight(),[]),n=t.getAriaRowIndex(),r=t.getHeaderRowClass(),[o,l]=y.useState(()=>s+"px"),[a,u]=y.useState(()=>i+"px"),d=y.useRef(null),c=y.useRef(null),[p,C]=y.useState(()=>t.getHeaderCtrls()),v=y.useRef(null),S=y.useCallback(m=>{if(v.current=m,!m)return;const R={setHeight:T=>l(T),setTop:T=>u(T),setHeaderCtrls:(T,P,F)=>{c.current=d.current,d.current=T;const b=tv(c.current,T,P);b!==c.current&&ev(F,()=>C(b))},setWidth:T=>{v.current&&(v.current.style.width=T)}};t.setComp(R,!1)},[]),E=y.useMemo(()=>({height:o,top:a}),[o,a]),w=y.useCallback(m=>{switch(t.getType()){case gf.COLUMN_GROUP:return O.createElement(F0,{ctrl:m,key:m.getInstanceId()});case gf.FLOATING_FILTER:return O.createElement(x0,{ctrl:m,key:m.getInstanceId()});default:return O.createElement(P0,{ctrl:m,key:m.getInstanceId()})}},[]);return O.createElement("div",{ref:S,className:r,role:"row",style:E,"aria-rowindex":n},p.map(w))},M0=y.memo(L0),I0=e=>{const[t,i]=y.useState(!0),[s,n]=y.useState([]),{context:r}=y.useContext(qt),o=y.useRef(null),l=y.useRef(null),a=y.useRef(null),u=e.pinned==="left",d=e.pinned==="right",c=!u&&!d,p=y.useCallback(S=>{if(o.current=S,!o.current){r.destroyBean(a.current),a.current=null;return}const E={setDisplayed:i,setCtrls:w=>n(w),setCenterWidth:w=>{l.current&&(l.current.style.width=w)},setViewportScrollLeft:w=>{o.current&&(o.current.scrollLeft=w)},setPinnedContainerWidth:w=>{o.current&&(o.current.style.width=w,o.current.style.minWidth=w,o.current.style.maxWidth=w)}};a.current=r.createBean(new zn(e.pinned)),a.current.setComp(E,o.current)},[]),C=t?"":"ag-hidden",v=()=>s.map(S=>O.createElement(M0,{ctrl:S,key:S.getInstanceId()}));return O.createElement(O.Fragment,null,u&&O.createElement("div",{ref:p,className:"ag-pinned-left-header "+C,"aria-hidden":!t,role:"rowgroup"},v()),d&&O.createElement("div",{ref:p,className:"ag-pinned-right-header "+C,"aria-hidden":!t,role:"rowgroup"},v()),c&&O.createElement("div",{ref:p,className:"ag-header-viewport "+C,role:"presentation"},O.createElement("div",{ref:l,className:"ag-header-container",role:"rowgroup"},v())))},qp=y.memo(I0),N0=()=>{const[e,t]=y.useState(()=>new Oi),[i,s]=y.useState(),{context:n}=y.useContext(qt),r=y.useRef(null),o=y.useRef(null),l=y.useCallback(d=>{if(r.current=d,!d){n.destroyBean(o.current),o.current=null;return}const c={addOrRemoveCssClass:(p,C)=>t(v=>v.setClass(p,C)),setHeightAndMinHeight:p=>s(p)};o.current=n.createBean(new $n),o.current.setComp(c,r.current,r.current)},[]),a=y.useMemo(()=>"ag-header "+e.toString(),[e]),u=y.useMemo(()=>({height:i,minHeight:i}),[i]);return O.createElement("div",{ref:l,className:a,style:u,role:"presentation"},O.createElement(qp,{pinned:"left"}),O.createElement(qp,{pinned:null}),O.createElement(qp,{pinned:"right"}))},_0=y.memo(N0),O0=(e,t)=>{y.useEffect(()=>{const i=t.current;if(i){const s=i.parentElement;if(s){const n=document.createComment(e);return s.insertBefore(n,i),()=>{s.removeChild(n)}}}},[e])},or=O0,G0=e=>{const t=y.useRef(e),i=y.useRef(),s=y.useRef(!1),n=y.useRef(!1),[,r]=y.useState(0);s.current&&(n.current=!0),y.useEffect(()=>(s.current||(i.current=t.current(),s.current=!0),r(o=>o+1),()=>{n.current&&i.current&&i.current()}),[])},k0=e=>{const[t,i]=y.useState(),{context:s,popupService:n,localeService:r,gos:o}=y.useContext(qt);return G0(()=>{const{editDetails:l,cellCtrl:a,eParentCell:u}=e,{compDetails:d}=l,c=o.get("stopEditingWhenCellsLoseFocus"),p=s.createBean(new VD(d.params)),C=p.getGui();if(e.jsChildComp){const R=e.jsChildComp.getGui();R&&C.appendChild(R)}const v={column:a.getColumn(),rowNode:a.getRowNode(),type:"popupCellEditor",eventSource:u,ePopup:C,position:l.popupPosition,keepWithinBounds:!0},S=n.positionPopupByComponent.bind(n,v),E=r.getLocaleTextFunc(),w=n.addPopup({modal:c,eChild:C,closeOnEsc:!0,closedCallback:()=>{a.onPopupEditorClosed()},anchorToElement:u,positionCallback:S,ariaLabel:E("ariaLabelCellEditor","Cell Editor")}),m=w?w.hideFunc:void 0;return i(p),e.jsChildComp&&e.jsChildComp.afterGuiAttached&&e.jsChildComp.afterGuiAttached(),()=>{m!=null&&m(),s.destroyBean(p)}}),O.createElement(O.Fragment,null,t&&e.wrappedContent&&sh.createPortal(e.wrappedContent,t.getGui()))},kw=y.memo(k0),V0=(e,t,i,s,n,r)=>{const{context:o}=y.useContext(qt),l=y.useCallback(()=>{const a=n.current;if(!a)return;const u=a.getGui();u&&u.parentElement&&u.parentElement.removeChild(u),o.destroyBean(a),n.current=void 0},[]);y.useEffect(()=>{const a=e!=null,u=e&&e.compDetails&&!e.compDetails.componentFromFramework,d=t&&i==null;if(!(a&&u&&!d)){l();return}const p=e.compDetails;if(n.current){const w=n.current,R=w.refresh!=null&&e.force==!1?w.refresh(p.params):!1;if(R===!0||R===void 0)return;l()}const C=p.newAgStackInstance();if(!C)return;const v=C.resolveNow(null,w=>w);if(!v)return;const S=v.getGui();if(!S)return;(t?i:r.current).appendChild(S),n.current=v},[e,t,s]),y.useEffect(()=>l,[])},H0=V0,B0=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new it(i=>{this.resolveInstanceCreated=i}),this.onValueChange=i=>this.updateValue(i),this.value=e.value}getProps(){return Wt(He({},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){JC(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["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached"]}updateValue(e){this.value=e,this.refreshProps()}},W0=(e,t,i)=>{const s=i.getColumn();if(!e&&t.isPopup&&t.isPopup()){const n=`AG Grid: Found an issue in column ${s.getColId()}. If using React, specify an editor is a popup using colDef.cellEditorPopup=true. AG Grid React cannot depend on the editor component specifying if it's in a popup (via the isPopup() method on the editor), as React needs to know this information BEFORE the component is created.`;Z.doOnce(()=>console.warn(n),"jsEditorComp-isPopup-"+i.getColumn().getColId())}if(e&&t.getPopupPosition&&t.getPopupPosition()!=null){const n=`AG Grid: Found an issue in column ${s.getColId()}. If using React, specify an editor popup position using colDef.cellEditorPopupPosition=true. AG Grid React cannot depend on the editor component specifying it's position (via the getPopupPosition() method on the editor), as React needs to know this information BEFORE the component is created.`;Z.doOnce(()=>console.warn(n),"jsEditorComp-getPopupPosition-"+i.getColumn().getColId())}},U0=(e,t,i)=>{const{compProxy:s}=e;i(s);const n=s.getProps(),r=Tl(t);return O.createElement(ZC.Provider,{value:{setMethods:o=>s.setMethods(o)}},r&&O.createElement(t,He({},n)),!r&&O.createElement(t,Wt(He({},n),{ref:o=>s.setRef(o)})))},Vw=(e,t,i)=>{const s=e.compProxy;return O.createElement(O.Fragment,null,!s&&O.createElement(t,Wt(He({},e.compDetails.params),{ref:i})),s&&U0(e,t,i))},z0=(e,t,i,s,n,r)=>{const o=e.compDetails,l=o.componentClass,a=o.componentFromFramework&&!e.popup,u=o.componentFromFramework&&e.popup,d=!o.componentFromFramework&&e.popup;return O.createElement(O.Fragment,null,a&&Vw(e,l,t),u&&O.createElement(kw,{editDetails:e,cellCtrl:n,eParentCell:s,wrappedContent:Vw(e,l,i)}),d&&r&&O.createElement(kw,{editDetails:e,cellCtrl:n,eParentCell:s,jsChildComp:r}))},$0=(e,t,i,s,n,r,o)=>{const{compDetails:l,value:a}=e,u=!l,d=l&&l.componentFromFramework,c=l&&l.componentClass,p=a!=null&&a.toString?a.toString():a,C=()=>O.createElement(O.Fragment,null,u&&O.createElement(O.Fragment,null,p),d&&!r&&O.createElement(c,Wt(He({},l.params),{key:t,ref:s})),d&&r&&O.createElement(c,Wt(He({},l.params),{key:t})));return O.createElement(O.Fragment,null,n?O.createElement("span",{role:"presentation",id:`cell-${i}`,className:"ag-cell-value",ref:o},C()):C())},j0=e=>{const{context:t}=y.useContext(qt),{cellCtrl:i,printLayout:s,editingRow:n}=e,r=i.getTabIndex(),o=i.getColumnIdSanitised(),l=i.getInstanceId(),[a,u]=y.useState(()=>i.isCellRenderer()?void 0:{compDetails:void 0,value:i.getValueToDisplay(),force:!1}),[d,c]=y.useState(),[p,C]=y.useState(1),[v,S]=y.useState(),[E,w]=y.useState(!1),[m,R]=y.useState(!1),[T,P]=y.useState(!1),[F,b]=y.useState(),M=y.useMemo(()=>i.isForceWrapper(),[i]),N=y.useMemo(()=>i.getCellAriaRole(),[i]),k=y.useRef(null),$=y.useRef(null),U=y.useRef(),Q=y.useRef(),he=y.useRef(),we=y.useRef([]),fe=y.useRef(),[ge,G]=y.useState(0),H=y.useCallback(Ye=>{fe.current=Ye,G(Ze=>Ze+1)},[]),W=a!=null&&(E||T||m),X=M||W,ee=y.useCallback((Ye,Ze)=>{Q.current=Ze,Ze&&(W0(Ye,Ze,i),Ze.isCancelBeforeStart&&Ze.isCancelBeforeStart()&&setTimeout(()=>{i.stopEditing(!0),i.focusCell(!0)}))},[i]),Ee=y.useCallback(Ye=>ee(!0,Ye),[ee]),gt=y.useCallback(Ye=>ee(!1,Ye),[ee]);let Re=y.useRef();Re.current||(Re.current=new wu(()=>k.current)),H0(a,X,fe.current,ge,U,k);const nt=y.useRef();y.useLayoutEffect(()=>{const Ye=nt.current,Ze=a;if(nt.current=a,Ye==null||Ye.compDetails==null||Ze==null||Ze.compDetails==null)return;const at=Ye.compDetails,me=Ze.compDetails;if(at.componentClass!=me.componentClass||$.current==null||$.current.refresh==null)return;$.current.refresh(me.params)!=!0&&C(ji=>ji+1)},[a]),y.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework))return;const Ze=d.compDetails,at=d.popup===!0,me=T0(Ze);if(!me)return;const ut=me.getGui();if(ee(at,me),!at){const ji=(M?he:k).current;ji==null||ji.appendChild(ut),me.afterGuiAttached&&me.afterGuiAttached()}return b(me),()=>{t.destroyBean(me),ee(at,void 0),b(void 0),ut&&ut.parentElement&&ut.parentElement.removeChild(ut)}},[d]);const Ke=y.useCallback(Ye=>{if(he.current=Ye,!he.current){we.current.forEach(at=>at()),we.current=[];return}const Ze=at=>{var me;if(at){const ut=at.getGui();(me=he.current)==null||me.insertAdjacentElement("afterbegin",ut),we.current.push(()=>{t.destroyBean(at),Z.removeFromParent(ut)})}return at};if(E){const at=i.createSelectionCheckbox();Ze(at)}T&&Ze(i.createDndSource()),m&&Ze(i.createRowDragComp())},[i,t,T,m,E]),As=y.useCallback(Ye=>{if(k.current=Ye,!k.current||!i)return;const Ze={addOrRemoveCssClass:(me,ut)=>Re.current.addOrRemoveCssClass(me,ut),setUserStyles:me=>S(me),getFocusableElement:()=>k.current,setIncludeSelection:me=>w(me),setIncludeRowDrag:me=>R(me),setIncludeDndSource:me=>P(me),getCellEditor:()=>Q.current||null,getCellRenderer:()=>$.current?$.current:U.current,getParentOfValue:()=>fe.current?fe.current:he.current?he.current:k.current,setRenderDetails:(me,ut,ji)=>{u(Ki=>(Ki==null?void 0:Ki.compDetails)!==me||(Ki==null?void 0:Ki.value)!==ut||(Ki==null?void 0:Ki.force)!==ji?{value:ut,compDetails:me,force:ji}:Ki)},setEditDetails:(me,ut,ji,Ki)=>{if(me){let Xn;Ki?Xn=new B0(me.params,()=>C(Kh=>Kh+1)):me.componentFromFramework&&iv(),c({compDetails:me,popup:ut,popupPosition:ji,compProxy:Xn}),ut||u(void 0)}else c(Xn=>{Xn!=null&&Xn.compProxy&&(Q.current=void 0)})}},at=he.current||void 0;i.setComp(Ze,k.current,at,s,n)},[]),Jr=y.useMemo(()=>!!(a&&a.compDetails&&a.compDetails.componentFromFramework&&Tl(a.compDetails.componentClass)),[a]);y.useLayoutEffect(()=>{var Ye;k.current&&(Re.current.addOrRemoveCssClass("ag-cell-value",!X),Re.current.addOrRemoveCssClass("ag-cell-inline-editing",!!d&&!d.popup),Re.current.addOrRemoveCssClass("ag-cell-popup-editing",!!d&&!!d.popup),Re.current.addOrRemoveCssClass("ag-cell-not-inline-editing",!d||!!d.popup),(Ye=i.getRowCtrl())==null||Ye.setInlineEditingCss(!!d),i.shouldRestoreFocus()&&!i.isEditing()&&k.current.focus({preventScroll:!0}))});const _u=()=>O.createElement(O.Fragment,null,a!=null&&$0(a,p,l,$,X,Jr,H),d!=null&&z0(d,gt,Ee,k.current,i,F));return O.createElement("div",{ref:As,style:v,tabIndex:r,role:N,"col-id":o},X?O.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:Ke},_u()):_u())},K0=y.memo(j0),Y0=e=>{const{context:t,gos:i}=y.useContext(qt),{rowCtrl:s,containerType:n}=e,r=s.getTabIndex(),o=y.useRef(s.getDomOrder()),l=s.isFullWidth(),a=s.getRowNode().displayed,[u,d]=y.useState(()=>a?s.getRowIndex():null),[c,p]=y.useState(()=>s.getRowId()),[C,v]=y.useState(()=>s.getBusinessKey()),[S,E]=y.useState(()=>s.getRowStyles()),w=y.useRef(null),m=y.useRef(null),[R,T]=y.useState(()=>null),[P,F]=y.useState(),[b,M]=y.useState(()=>a?s.getInitialRowTop(n):void 0),[N,k]=y.useState(()=>a?s.getInitialTransform(n):void 0),$=y.useRef(null),U=y.useRef(),Q=y.useRef(!1),[he,we]=y.useState(0);y.useEffect(()=>{var Re;if(Q.current||!P||he>10)return;const nt=(Re=$.current)==null?void 0:Re.firstChild;nt?(s.setupDetailRowAutoHeight(nt),Q.current=!0):we(Ke=>Ke+1)},[P,he]);let fe=y.useRef();fe.current||(fe.current=new wu(()=>$.current));const ge=y.useCallback(Re=>{if($.current=Re,!$.current){s.unsetComp(n);return}if(!s.isAlive())return;const nt={setTop:M,setTransform:k,addOrRemoveCssClass:(Ke,As)=>fe.current.addOrRemoveCssClass(Ke,As),setDomOrder:Ke=>o.current=Ke,setRowIndex:d,setRowId:p,setRowBusinessKey:v,setUserStyles:E,setCellCtrls:(Ke,As)=>{m.current=w.current,w.current=Ke;const Jr=tv(m.current,Ke,o.current);Jr!==m.current&&ev(As,()=>T(Jr))},showFullWidth:Ke=>F(Ke),getFullWidthCellRenderer:()=>U.current,refreshFullWidth:Ke=>ee.current?(F(As=>Wt(He({},As),{params:Ke()})),!0):!U.current||!U.current.refresh?!1:U.current.refresh(Ke())};s.setComp(nt,$.current,n)},[]);y.useLayoutEffect(()=>Nu(P,t,$.current,U),[P]);const G=y.useMemo(()=>{const Re={top:b,transform:N};return Object.assign(Re,S),Re},[b,N,S]),H=l&&P&&P.componentFromFramework,W=!l&&R!=null,X=y.useMemo(()=>!!((P==null?void 0:P.componentFromFramework)&&Tl(P.componentClass)),[P]),ee=y.useRef(!1);y.useEffect(()=>{ee.current=X&&!!P&&!!i.get("reactiveCustomComponents")},[X,P]);const Ee=()=>R==null?void 0:R.map(Re=>O.createElement(K0,{cellCtrl:Re,editingRow:s.isEditing(),printLayout:s.isPrintLayout(),key:Re.getInstanceId()})),gt=()=>{const Re=P.componentClass;return O.createElement(O.Fragment,null,X&&O.createElement(Re,He({},P.params)),!X&&O.createElement(Re,Wt(He({},P.params),{ref:U})))};return O.createElement("div",{ref:ge,role:"row",style:G,"row-index":u,"row-id":c,"row-business-key":C,tabIndex:r},W&&Ee(),H&>())},Q0=y.memo(Y0),q0=e=>{const{context:t}=y.useContext(qt),{name:i}=e,s=y.useMemo(()=>OD(i),[i]),n=y.useRef(null),r=y.useRef(null),o=y.useRef([]),l=y.useRef([]),[a,u]=y.useState(()=>[]),d=y.useRef(!1),c=y.useRef(),p=y.useMemo(()=>Sc.getRowContainerCssClasses(i),[i]),C=y.useMemo(()=>Zi(p.viewport),[p]),v=y.useMemo(()=>Zi(p.container),[p]),S=i===Ae.CENTER||i===Ae.TOP_CENTER||i===Ae.BOTTOM_CENTER||i===Ae.STICKY_TOP_CENTER||i===Ae.STICKY_BOTTOM_CENTER,E=S?n:r;or(" AG Row Container "+i+" ",E);const w=y.useCallback(()=>S?n.current!=null&&r.current!=null:r.current!=null,[]),m=y.useCallback(()=>S?n.current==null&&r.current==null:r.current==null,[]),R=y.useCallback(()=>{if(m()&&(t.destroyBean(c.current),c.current=null),w()){const b=N=>{const k=tv(l.current,o.current,d.current);k!==l.current&&(l.current=k,ev(N,()=>u(k)))},M={setViewportHeight:N=>{n.current&&(n.current.style.height=N)},setRowCtrls:({rowCtrls:N,useFlushSync:k})=>{const $=!!k&&o.current.length>0&&N.length>0;o.current=N,b($)},setDomOrder:N=>{d.current!=N&&(d.current=N,b(!1))},setContainerWidth:N=>{r.current&&(r.current.style.width=N)}};c.current=t.createBean(new Sc(i)),c.current.setComp(M,r.current,n.current)}},[w,m]),T=y.useCallback(b=>{r.current=b,R()},[R]),P=y.useCallback(b=>{n.current=b,R()},[R]),F=()=>O.createElement("div",{className:v,ref:T,role:"rowgroup"},a.map(b=>O.createElement(Q0,{rowCtrl:b,containerType:s,key:b.getInstanceId()})));return O.createElement(O.Fragment,null,S?O.createElement("div",{className:C,ref:P,role:"presentation"},F()):F())},X0=y.memo(q0),Z0=()=>{const{context:e,agStackComponentsRegistry:t,resizeObserverService:i}=y.useContext(qt),[s,n]=y.useState(""),[r,o]=y.useState(0),[l,a]=y.useState(0),[u,d]=y.useState("0px"),[c,p]=y.useState("0px"),[C,v]=y.useState("100%"),[S,E]=y.useState("0px"),[w,m]=y.useState("0px"),[R,T]=y.useState("100%"),[P,F]=y.useState(""),[b,M]=y.useState(""),[N,k]=y.useState(null),[$,U]=y.useState(""),[Q,he]=y.useState(null),[we,fe]=y.useState("ag-layout-normal");let ge=y.useRef();ge.current||(ge.current=new wu(()=>G.current));const G=y.useRef(null),H=y.useRef(null),W=y.useRef(null),X=y.useRef(null),ee=y.useRef(null),Ee=y.useRef(null),gt=y.useRef(null),Re=y.useRef([]),nt=y.useRef([]);or(" AG Grid Body ",G),or(" AG Pinned Top ",H),or(" AG Sticky Top ",W),or(" AG Middle ",Ee),or(" AG Pinned Bottom ",gt);const Ke=y.useCallback(eo=>{if(G.current=eo,!G.current){e.destroyBeans(Re.current),nt.current.forEach(ft=>ft()),Re.current=[],nt.current=[];return}if(!e)return;const Pl=ft=>{const ds=t.getComponentClass(ft),nv=e.createBean(new ds);return Re.current.push(nv),nv},tn=(ft,ds)=>{ft.appendChild(ds),nt.current.push(()=>ft.removeChild(ds))};tn(G.current,document.createComment(" AG Fake Horizontal Scroll ")),tn(G.current,Pl("AG-FAKE-HORIZONTAL-SCROLL").getGui()),tn(G.current,document.createComment(" AG Overlay Wrapper ")),tn(G.current,Pl("AG-OVERLAY-WRAPPER").getGui()),ee.current&&(tn(ee.current,document.createComment(" AG Fake Vertical Scroll ")),tn(ee.current,Pl("AG-FAKE-VERTICAL-SCROLL").getGui()));const Yh={setRowAnimationCssOnBodyViewport:n,setColumnCount:ft=>{G.current&&Z.setAriaColCount(G.current,ft)},setRowCount:ft=>{G.current&&Z.setAriaRowCount(G.current,ft)},setTopHeight:o,setBottomHeight:a,setStickyTopHeight:d,setStickyTopTop:p,setStickyTopWidth:v,setTopDisplay:F,setBottomDisplay:M,setColumnMovingCss:(ft,ds)=>ge.current.addOrRemoveCssClass(ft,ds),updateLayoutClasses:fe,setAlwaysVerticalScrollClass:k,setPinnedTopBottomOverflowY:U,setCellSelectableCss:(ft,ds)=>he(ds?ft:null),setBodyViewportWidth:ft=>{Ee.current&&(Ee.current.style.width=ft)},registerBodyViewportResizeListener:ft=>{if(Ee.current){const ds=i.observeResize(Ee.current,ft);nt.current.push(()=>ds())}},setStickyBottomHeight:E,setStickyBottomBottom:m,setStickyBottomWidth:T},sv=e.createBean(new _t);Re.current.push(sv),sv.setComp(Yh,G.current,Ee.current,H.current,gt.current,W.current,X.current)},[]),As=y.useMemo(()=>Zi("ag-root","ag-unselectable",we),[we]),Jr=y.useMemo(()=>Zi("ag-body-viewport",s,we,N,Q),[s,we,N,Q]),_u=y.useMemo(()=>Zi("ag-body",we),[we]),Ye=y.useMemo(()=>Zi("ag-floating-top",Q),[Q]),Ze=y.useMemo(()=>Zi("ag-sticky-top",Q),[Q]),at=y.useMemo(()=>Zi("ag-sticky-bottom",Q),[Q]),me=y.useMemo(()=>Zi("ag-floating-bottom",Q),[Q]),ut=y.useMemo(()=>({height:r,minHeight:r,display:P,overflowY:$}),[r,P,$]),ji=y.useMemo(()=>({height:u,top:c,width:C}),[u,c,C]),Ki=y.useMemo(()=>({height:S,bottom:w,width:R}),[S,w,R]),Xn=y.useMemo(()=>({height:l,minHeight:l,display:b,overflowY:$}),[l,b,$]),Kh=eo=>O.createElement(X0,{name:eo,key:`${eo}-container`}),Dl=({section:eo,children:Pl,className:tn,style:Yh})=>O.createElement("div",{ref:eo,className:tn,role:"presentation",style:Yh},Pl.map(Kh));return O.createElement("div",{ref:Ke,className:As,role:"treegrid"},O.createElement(_0,null),Dl({section:H,className:Ye,style:ut,children:[Ae.TOP_LEFT,Ae.TOP_CENTER,Ae.TOP_RIGHT,Ae.TOP_FULL_WIDTH]}),O.createElement("div",{className:_u,ref:ee,role:"presentation"},Dl({section:Ee,className:Jr,children:[Ae.LEFT,Ae.CENTER,Ae.RIGHT,Ae.FULL_WIDTH]})),Dl({section:W,className:Ze,style:ji,children:[Ae.STICKY_TOP_LEFT,Ae.STICKY_TOP_CENTER,Ae.STICKY_TOP_RIGHT,Ae.STICKY_TOP_FULL_WIDTH]}),Dl({section:X,className:at,style:Ki,children:[Ae.STICKY_BOTTOM_LEFT,Ae.STICKY_BOTTOM_CENTER,Ae.STICKY_BOTTOM_RIGHT,Ae.STICKY_BOTTOM_FULL_WIDTH]}),Dl({section:gt,className:me,style:Xn,children:[Ae.BOTTOM_LEFT,Ae.BOTTOM_CENTER,Ae.BOTTOM_RIGHT,Ae.BOTTOM_FULL_WIDTH]}))},J0=y.memo(Z0),eG=(e,t)=>{const{children:i,eFocusableElement:s,onTabKeyDown:n,gridCtrl:r,forceFocusOutWhenTabGuardsAreEmpty:o}=e,{context:l}=y.useContext(qt),a=y.useRef(null),u=y.useRef(null),d=y.useRef(),c=E=>{const w=E==null?void 0:parseInt(E,10).toString();[a,u].forEach(m=>{var R,T;w===void 0?(R=m.current)==null||R.removeAttribute("tabindex"):(T=m.current)==null||T.setAttribute("tabindex",w)})};y.useImperativeHandle(t,()=>({forceFocusOutOfContainer(E){var w;(w=d.current)==null||w.forceFocusOutOfContainer(E)}}));const p=y.useCallback(()=>{if(!a.current&&!u.current){l.destroyBean(d.current),d.current=null;return}if(a.current&&u.current){const E={setTabIndex:c};d.current=l.createBean(new Oh({comp:E,eTopGuard:a.current,eBottomGuard:u.current,eFocusableElement:s,onTabKeyDown:n,forceFocusOutWhenTabGuardsAreEmpty:o,focusInnerElement:w=>r.focusInnerElement(w)}))}},[]),C=y.useCallback(E=>{a.current=E,p()},[p]),v=y.useCallback(E=>{u.current=E,p()},[p]),S=E=>{const w=E==="top"?Td.TAB_GUARD_TOP:Td.TAB_GUARD_BOTTOM;return O.createElement("div",{className:`${Td.TAB_GUARD} ${w}`,role:"presentation",ref:E==="top"?C:v})};return O.createElement(O.Fragment,null,S("top"),i,S("bottom"))},tG=y.forwardRef(eG),iG=y.memo(tG),sG=({context:e})=>{const[t,i]=y.useState(""),[s,n]=y.useState(""),[r,o]=y.useState(""),[l,a]=y.useState(null),[u,d]=y.useState(null),[c,p]=y.useState(!1),[C,v]=y.useState(),S=y.useRef(null),E=y.useRef(null),w=y.useRef(),[m,R]=y.useState(null),T=y.useRef(()=>{}),P=y.useCallback(()=>{},[]),F=y.useMemo(()=>e.isDestroyed()?null:e.getBean("beans"),[e]);or(" AG Grid ",E);const b=y.useCallback(U=>{if(E.current=U,!E.current){e.destroyBean(S.current),S.current=null;return}if(e.isDestroyed())return;S.current=e.createBean(new Qn);const Q=S.current;T.current=Q.focusInnerElement.bind(Q);const he={destroyGridUi:()=>{},setRtlClass:i,forceFocusOutOfContainer:we=>{var fe;(fe=w.current)==null||fe.forceFocusOutOfContainer(we)},updateLayoutClasses:o,getFocusableContainers:()=>{var we,fe;const ge=[],G=(we=E.current)==null?void 0:we.querySelector(".ag-root"),H=(fe=E.current)==null?void 0:fe.querySelector(".ag-side-bar:not(.ag-hidden)");return G&&ge.push(G),H&&ge.push(H),ge},setCursor:a,setUserSelect:d};Q.setComp(he,E.current,E.current),p(!0)},[]);y.useEffect(()=>{if(!C||!F||!S.current||!m||!E.current)return;const U=S.current,Q=[],{agStackComponentsRegistry:he}=F,we=he.getComponentClass("AG-GRID-HEADER-DROP-ZONES"),fe=he.getComponentClass("AG-SIDE-BAR"),ge=he.getComponentClass("AG-STATUS-BAR"),G=he.getComponentClass("AG-WATERMARK"),H=he.getComponentClass("AG-PAGINATION"),W=[],X=E.current;if(U.showDropZones()&&we){const ee=e.createBean(new we),Ee=ee.getGui();X.insertAdjacentElement("afterbegin",Ee),W.push(Ee),Q.push(ee)}if(U.showSideBar()&&fe){const ee=e.createBean(new fe),Ee=ee.getGui(),gt=m.querySelector(".ag-tab-guard-bottom");gt&&(gt.insertAdjacentElement("beforebegin",Ee),W.push(Ee)),Q.push(ee)}if(U.showStatusBar()&&ge){const ee=e.createBean(new ge),Ee=ee.getGui();X.insertAdjacentElement("beforeend",Ee),W.push(Ee),Q.push(ee)}if(H){const ee=e.createBean(new H),Ee=ee.getGui();X.insertAdjacentElement("beforeend",Ee),W.push(Ee),Q.push(ee)}if(U.showWatermark()&&G){const ee=e.createBean(new G),Ee=ee.getGui();X.insertAdjacentElement("beforeend",Ee),W.push(Ee),Q.push(ee)}return()=>{e.destroyBeans(Q),W.forEach(ee=>{ee.parentElement&&ee.parentElement.removeChild(ee)})}},[C,m,F]);const M=y.useMemo(()=>Zi("ag-root-wrapper",t,s,r),[t,s,r]),N=y.useMemo(()=>Zi("ag-root-wrapper-body","ag-focus-managed",r),[r]),k=y.useMemo(()=>({userSelect:u??"",WebkitUserSelect:u??"",cursor:l??""}),[u,l]),$=y.useCallback(U=>{w.current=U,v(U!==null)},[]);return O.createElement("div",{ref:b,className:M,style:k,role:"presentation"},O.createElement("div",{className:N,ref:R,role:"presentation"},c&&m&&F&&O.createElement(qt.Provider,{value:F},O.createElement(iG,{ref:$,eFocusableElement:m,onTabKeyDown:P,gridCtrl:S.current,forceFocusOutWhenTabGuardsAreEmpty:!0},O.createElement(J0,null)))))},nG=y.memo(sG),lb=e=>{var t,i;const s=y.useRef(),n=y.useRef(null),r=y.useRef(null),o=y.useRef([]),l=y.useRef([]),a=y.useRef(e),u=y.useRef(!1),[d,c]=y.useState(void 0),[,p]=y.useState(0),C=y.useCallback(E=>{if(n.current=E,!n.current){o.current.forEach(b=>b()),o.current.length=0;return}const w=e.modules||[];r.current||(r.current=new S0(()=>p(b=>b+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),o.current.push(()=>{var b;(b=r.current)==null||b.destroy(),r.current=null}));const m=mc.combineAttributesAndGridOptions(e.gridOptions,e),R={providedBeanInstances:{frameworkComponentWrapper:new oG(r.current,!!m.reactiveCustomComponents)},modules:w,frameworkOverrides:new aG},T=b=>{c(b),o.current.push(()=>{b.destroy()}),b.getBean(Er.NAME).whenReady(()=>{if(b.isDestroyed())return;const N=s.current;N&&e.setGridApi&&e.setGridApi(N,new Qo(N))})},P=b=>{b.getBean(Er.NAME).whenReady(()=>{l.current.forEach(N=>N()),l.current.length=0,u.current=!0})},F=new xN;s.current=F.create(n.current,m,T,P,R)},[]),v=y.useMemo(()=>He({height:"100%"},e.containerStyle||{}),[e.containerStyle]),S=y.useCallback(E=>{u.current?E():l.current.push(E)},[]);return y.useEffect(()=>{const E=rG(a.current,e);a.current=e,S(()=>{s.current&&mc.processOnChange(E,s.current)})},[e]),O.createElement("div",{style:v,className:e.className,ref:C},d&&!d.isDestroyed()?O.createElement(nG,{context:d}):null,(i=(t=r.current)==null?void 0:t.getPortals())!=null?i:null)};function rG(e,t){const i={};return Object.keys(t).forEach(s=>{const n=t[s];e[s]!==n&&(i[s]=n)}),i}var oG=class extends LN{constructor(e,t){super(),this.parent=e,this.reactiveCustomComponents=t}createWrapper(e,t){if(this.reactiveCustomComponents){const n=(r=>{switch(r){case"filter":return p0;case"floatingFilterComponent":return f0;case"dateComponent":return h0;case"loadingOverlayComponent":return m0;case"noRowsOverlayComponent":return v0;case"statusPanel":return y0;case"toolPanel":return w0;case"menuItem":return C0}})(t.propertyName);if(n)return new n(e,this.parent,t)}else switch(t.propertyName){case"filter":case"floatingFilterComponent":case"dateComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":iv();break}const i=!t.cellRenderer&&t.propertyName!=="toolPanel";return new tb(e,this.parent,t,i)}},lG=y.forwardRef((e,t)=>{const{ctrlsFactory:i,context:s,gos:n,resizeObserverService:r,clientSideRowModel:o,serverSideRowModel:l}=y.useContext(qt),[a,u]=y.useState(()=>new Oi),[d,c]=y.useState(()=>new Oi),[p,C]=y.useState(),[v,S]=y.useState(),E=y.useRef(),w=y.useRef(null),m=y.useRef(),R=y.useMemo(()=>Ce.__getGridRegisteredModules(e.api.getGridId()),[e]),T=y.useMemo(()=>a.toString()+" ag-details-row",[a]),P=y.useMemo(()=>d.toString()+" ag-details-grid",[d]);t&&y.useImperativeHandle(t,()=>({refresh(){var M,N;return(N=(M=E.current)==null?void 0:M.refresh())!=null?N:!1}})),e.template&&Z.warnOnce("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 F=y.useCallback(M=>{if(w.current=M,!w.current){s.destroyBean(E.current),m.current&&m.current();return}const N={addOrRemoveCssClass:($,U)=>u(Q=>Q.setClass($,U)),addOrRemoveDetailGridCssClass:($,U)=>c(Q=>Q.setClass($,U)),setDetailGrid:$=>C($),setRowData:$=>S($),getGui:()=>w.current},k=i.getInstance("detailCellRenderer");if(k&&(s.createBean(k),k.init(N,e),E.current=k,n.get("detailRowAutoHeight"))){const $=()=>{if(w.current==null)return;const U=w.current.clientHeight;U!=null&&U>0&&setTimeout(()=>{e.node.setRowHeight(U),o?o.onRowHeightChanged():l&&l.onRowHeightChanged()},0)};m.current=r.observeResize(w.current,$),$()}},[]),b=y.useCallback((M,N)=>{var k;(k=E.current)==null||k.registerDetailWithMaster(M,N)},[]);return O.createElement("div",{className:T,ref:F},p&&O.createElement(lb,Wt(He({className:P},p),{modules:R,rowData:v,setGridApi:b})))}),aG=class extends ZD{constructor(){super("react"),this.frameworkComponents={agGroupCellRenderer:Gw,agGroupRowRenderer:Gw,agDetailCellRenderer:lG},this.wrapIncoming=(e,t)=>t==="ensureVisible"?R0(e):e(),this.renderingEngine="react"}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}},uG=class extends y.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=(e,t)=>{this.api=e,this.columnApi=t,this.apiListeners.forEach(i=>i(e))}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return O.createElement(lb,Wt(He({},this.props),{setGridApi:this.setGridApi}))}};const Hw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Bw=CR,dG=(e,t)=>i=>{var s;if((t==null?void 0:t.variants)==null)return Bw(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:n,defaultVariants:r}=t,o=Object.keys(n).map(u=>{const d=i==null?void 0:i[u],c=r==null?void 0:r[u];if(d===null)return null;const p=Hw(d)||Hw(c);return n[u][p]}),l=i&&Object.entries(i).reduce((u,d)=>{let[c,p]=d;return p===void 0||(u[c]=p),u},{}),a=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((u,d)=>{let{class:c,className:p,...C}=d;return Object.entries(C).every(v=>{let[S,E]=v;return Array.isArray(E)?E.includes({...r,...l}[S]):{...r,...l}[S]===E})?[...u,c,p]:u},[]);return Bw(e,o,a,i==null?void 0:i.class,i==null?void 0:i.className)},cG=dG("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),au=y.forwardRef(({className:e,variant:t,size:i,asChild:s=!1,...n},r)=>x.jsx("button",{className:ui(cG({variant:t,size:i,className:e})),ref:r,...n}));au.displayName="Button";function ab({filePath:e,className:t,onSaveSuccess:i}){const[s,n]=y.useState(""),[r,o]=y.useState(!1),[l,a]=y.useState(!1),[u,d]=y.useState(null),[c,p]=y.useState(null);y.useEffect(()=>{e&&C(e)},[e]);const C=async S=>{o(!0),d(null);try{const E=await fetch(`/api/schema/content?file=${encodeURIComponent(S)}`);if(!E.ok)throw new Error("Failed to load file");const w=await E.text();n(w)}catch(E){console.error(E),d("Failed to read file content")}finally{o(!1)}},v=async()=>{if(e){a(!0),p(null);try{if(!(await fetch(`/api/schema/content?file=${encodeURIComponent(e)}`,{method:"POST",body:s})).ok)throw new Error("Failed to save");p("File saved successfully!"),setTimeout(()=>p(null),3e3),i&&i()}catch{d("Failed to save file")}finally{a(!1)}}};return x.jsxs(Ho,{className:`flex flex-col h-full ${t}`,children:[x.jsxs(Aa,{className:"py-2 px-4 flex flex-row items-center justify-between border-b space-y-0 min-h-[50px]",children:[x.jsx(xa,{className:"text-sm font-mono text-muted-foreground flex items-center",children:e}),x.jsxs("div",{className:"flex items-center gap-2",children:[c&&x.jsx("span",{className:"text-xs text-green-600 font-medium animate-fade-in",children:c}),u&&x.jsx("span",{className:"text-xs text-red-600 font-medium",children:u}),x.jsx(au,{size:"sm",onClick:v,disabled:l||r,children:l?"Saving...":x.jsxs(x.Fragment,{children:[x.jsx(Qx,{className:"mr-2 h-3 w-3"})," Save"]})})]})]}),x.jsxs(La,{className:"flex-1 p-0 relative min-h-[400px]",children:[r&&x.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50 z-10 transition-all backdrop-blur-sm",children:x.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}),x.jsx("textarea",{className:"w-full h-full p-4 font-mono text-sm resize-none focus:outline-none bg-muted/10 leading-normal",value:s,onChange:S=>n(S.target.value),spellCheck:!1,disabled:r})]})]})}function hG({objectName:e}){const[t,i]=y.useState([]),[s,n]=y.useState([]),[r,o]=y.useState(!1),[l,a]=y.useState("data"),[u,d]=y.useState(null),c=async()=>{o(!0);try{const S=await(await fetch("/api/metadata")).json(),w=(Array.isArray(S)?S:S.objects).find(T=>T.name===e);if(w){const T=[{field:"id",headerName:"ID",width:100,pinned:"left"}];Object.entries(w.fields).forEach(([P,F])=>{T.push({field:P,headerName:F.label||P,flex:1,filter:!0})}),T.find(P=>P.field==="createdAt")||T.push({field:"createdAt",hide:!0}),T.find(P=>P.field==="updatedAt")||T.push({field:"updatedAt",hide:!0}),n(T)}const R=await(await fetch(`/api/objectql/${e}`)).json();i(Array.isArray(R)?R:[])}catch(v){console.error(v)}finally{o(!1)}},p=async()=>{try{const v=await fetch(`/api/schema/find?object=${e}`);if(v.ok){const S=await v.json();d(S.file)}else d(null),console.error("Failed to find schema file")}catch(v){console.error(v)}};y.useEffect(()=>{a("data")},[e]),y.useEffect(()=>{l==="data"?c():p()},[e,l]);const C=y.useMemo(()=>({sortable:!0,filter:!0,resizable:!0}),[]);return x.jsxs("div",{className:"flex h-full flex-col",children:[x.jsxs("div",{className:"border-b px-6 py-4 flex items-center justify-between bg-card text-card-foreground",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("h1",{className:"text-2xl font-bold tracking-tight capitalize",children:e}),x.jsxs("div",{className:"flex space-x-1",children:[x.jsxs("button",{onClick:()=>a("data"),className:ui("flex items-center space-x-2 px-3 py-1.5 text-sm font-medium rounded-md transition-colors",l==="data"?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[x.jsx(fR,{className:"h-4 w-4"}),x.jsx("span",{children:"Data"})]}),x.jsxs("button",{onClick:()=>a("schema"),className:ui("flex items-center space-x-2 px-3 py-1.5 text-sm font-medium rounded-md transition-colors",l==="schema"?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[x.jsx(xm,{className:"h-4 w-4"}),x.jsx("span",{children:"Schema"})]})]})]}),l==="data"&&x.jsxs("div",{className:"flex items-center space-x-2",children:[x.jsxs(au,{variant:"outline",size:"sm",onClick:c,disabled:r,children:[x.jsx(gR,{className:ui("mr-2 h-4 w-4",r&&"animate-spin")}),"Refresh"]}),x.jsxs(au,{size:"sm",children:[x.jsx(Yx,{className:"mr-2 h-4 w-4"}),"New Record"]})]})]}),x.jsx("div",{className:"flex-1 overflow-hidden p-6 bg-muted/20",children:l==="data"?x.jsx("div",{className:"rounded-md overflow-hidden bg-card h-full",style:{opacity:r?.6:1},children:x.jsx("div",{className:"ag-theme-quartz h-full w-full",children:x.jsx(uG,{rowData:t,columnDefs:s,defaultColDef:C,pagination:!0,paginationPageSize:20,rowSelection:"multiple"})})}):x.jsx("div",{className:"h-full bg-card rounded-md border",children:u?x.jsx(ab,{filePath:u,className:"h-full border-0"}):x.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:r?"Loading schema...":"Could not find definition file for this object."})})})]})}function pG(){const[e,t]=y.useState([]),[i,s]=y.useState(null),[n,r]=y.useState(null);y.useEffect(()=>{o()},[]);const o=async()=>{try{const l=await fetch("/api/schema/files");if(!l.ok)throw new Error("Failed to fetch files");const a=await l.json();t(a.files||[])}catch(l){console.error(l),r("Failed to load file list")}};return x.jsxs("div",{className:"flex h-full flex-col p-6 space-y-6",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Schema Editor"}),n&&x.jsx("p",{className:"text-sm text-red-500",children:n})]}),x.jsxs(au,{variant:"outline",size:"sm",onClick:o,children:[x.jsx(gR,{className:"mr-2 h-4 w-4"})," Refresh"]})]}),x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6 h-full min-h-[500px]",children:[x.jsxs(Ho,{className:"md:col-span-1 flex flex-col",children:[x.jsxs(Aa,{className:"py-4",children:[x.jsx(xa,{className:"text-lg",children:"Files"}),x.jsx(uc,{children:"Select a schema file to edit"})]}),x.jsx(La,{className:"flex-1 overflow-auto p-2",children:x.jsxs("div",{className:"space-y-1",children:[e.map(l=>x.jsxs("button",{onClick:()=>s(l),className:ui("w-full text-left px-3 py-2 text-sm rounded-md transition-colors flex items-center",i===l?"bg-primary text-primary-foreground font-medium":"hover:bg-muted"),children:[x.jsx(xm,{className:"mr-2 h-4 w-4 opacity-70"}),l]},l)),e.length===0&&x.jsx("div",{className:"text-sm text-muted-foreground p-2",children:"No schema files found"})]})})]}),x.jsx("div",{className:"md:col-span-3 h-full",children:i?x.jsx(ab,{filePath:i}):x.jsx(Ho,{className:"h-full flex items-center justify-center",children:x.jsx("div",{className:"text-muted-foreground",children:"Select a file to view content"})})})]})]})}function gG(){const{name:e}=cx();return e?x.jsx(hG,{objectName:e}):null}function fG(){return x.jsx(_x,{basename:"/studio",children:x.jsxs("div",{className:"flex h-screen bg-background text-foreground overflow-hidden font-sans antialiased",children:[x.jsx(FL,{}),x.jsx("main",{className:"flex-1 overflow-auto bg-muted/20",children:x.jsxs(bx,{children:[x.jsx(vd,{path:"/",element:x.jsx(xL,{})}),x.jsx(vd,{path:"/schema",element:x.jsx(pG,{})}),x.jsx(vd,{path:"/object/:name",element:x.jsx(gG,{})})]})})]})})}Xp.createRoot(document.getElementById("root")).render(x.jsx(O.StrictMode,{children:x.jsx(fG,{})}));
|