@epam/ai-dial-ui-kit 0.5.0-rc.1 → 0.5.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dial-ui-kit.cjs.js
CHANGED
|
@@ -1,2 +1,62 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),D=require("classnames"),A=require("@floating-ui/react"),c=require("react"),k=require("@tabler/icons-react"),Jn=require("react-dom");function Qn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const M=Qn(c),Se=({errorText:e})=>e&&o.jsx("span",{className:"text-error dial-tiny mt-1",children:e}),q=({icon:e,className:t})=>e?o.jsx("span",{className:D("flex-shrink-0",t),children:e}):null,es=7,ts=2,kr=c.createContext(null),Or=()=>{const e=c.useContext(kr);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e},rs=({initialOpen:e=!1,placement:t="bottom",isTriggerClickable:r=!1,open:n,onOpenChange:s}={})=>{const[i,a]=c.useState(e),l=c.useRef(null),d=n??i,u=s??a,f=A.useFloating({placement:t,open:d,onOpenChange:u,whileElementsMounted:A.autoUpdate,middleware:[A.offset(es+ts),A.flip({crossAxis:t.includes("-"),fallbackAxisSideDirection:"start",padding:5}),A.shift({padding:5}),A.arrow({element:l})]}),p=A.useHover(f.context,{move:!1,enabled:n==null,mouseOnly:r,delay:{open:500,close:0}}),C=A.useFocus(f.context,{enabled:n==null}),g=A.useDismiss(f.context),m=A.useRole(f.context,{role:"tooltip"}),h=A.useInteractions([p,C,g,m]);return c.useEffect(()=>{if(!d)return;const y=f.refs.reference.current;if(!(y instanceof Element))return;const b=new IntersectionObserver(([v])=>{v.isIntersecting||u(!1)},{root:null,threshold:0});return b.observe(y),()=>b.disconnect()},[d,f.refs.reference,u]),c.useMemo(()=>({open:d,setOpen:u,arrowRef:l,...h,...f}),[d,u,h,f])},Nr=({children:e,...t})=>{const r=rs(t);return o.jsx(kr.Provider,{value:r,children:e})},Rr=({style:e,...t})=>{const r=Or(),n=c.useRef(null),s=A.useMergeRefs([r.refs.setFloating,n]);return r.open?o.jsx(A.FloatingPortal,{id:"tooltip-portal",children:o.jsxs("div",{ref:s,style:{...r.floatingStyles,...e},...r.getFloatingProps(t),className:D("z-[55] whitespace-pre-wrap break-words rounded border border-primary bg-layer-0 px-2 py-1 dial-tiny shadow max-w-[300px]",r.getFloatingProps(t).className),children:[t.children,o.jsx(A.FloatingArrow,{ref:r.arrowRef,context:r.context,fill:"currentColor",strokeWidth:1,className:"stroke-primary w-2 text-[var(--bg-layer-0,_#000000)]"})]})}):null},Pr=({children:e,asChild:t=!1,...r})=>{const n=Or(),s=c.useRef(null),i=t&&c.isValidElement(e),l=e&&typeof e=="object"&&"ref"in e&&e.ref!==void 0?e.ref:void 0,d=[n.refs.setReference,s];i&&l&&d.push(l);const u=A.useMergeRefs(d);return i?c.cloneElement(e,n.getReferenceProps({...e.props,...r,ref:u})):o.jsx("span",{ref:u,...n.getReferenceProps(r),className:r.className??"dial-tooltip-trigger text-left",children:e})},Ie=({hideTooltip:e,tooltip:t,children:r,triggerClassName:n,contentClassName:s,...i})=>o.jsxs(Nr,{...i,children:[o.jsx(Pr,{className:D(n,"truncate"),children:r}),o.jsx(Rr,{className:D("text-primary",s,"max-w-[300px]",(e||!t)&&"hidden"),children:t})]}),Gt="-",ns=e=>{const t=os(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const l=a.split(Gt);return l[0]===""&&l.length!==1&&l.shift(),Mr(l,t)||ss(a)},getConflictingClassGroupIds:(a,l)=>{const d=r[a]||[];return l&&n[a]?[...d,...n[a]]:d}}},Mr=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?Mr(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Gt);return t.validators.find(({validator:a})=>a(i))?.classGroupId},nr=/^\[(.+)\]$/,ss=e=>{if(nr.test(e)){const t=nr.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},os=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const s in r)Rt(r[s],n,s,t);return n},Rt=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:sr(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(is(s)){Rt(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,a])=>{Rt(a,sr(t,i),r,n)})})},sr=(e,t)=>{let r=e;return t.split(Gt).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},is=e=>e.isThemeGetter,as=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,a)=>{r.set(i,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let a=r.get(i);if(a!==void 0)return a;if((a=n.get(i))!==void 0)return s(i,a),a},set(i,a){r.has(i)?r.set(i,a):s(i,a)}}},Pt="!",Mt=":",ls=Mt.length,cs=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const i=[];let a=0,l=0,d=0,u;for(let m=0;m<s.length;m++){let h=s[m];if(a===0&&l===0){if(h===Mt){i.push(s.slice(d,m)),d=m+ls;continue}if(h==="/"){u=m;continue}}h==="["?a++:h==="]"?a--:h==="("?l++:h===")"&&l--}const f=i.length===0?s:s.substring(d),p=ds(f),C=p!==f,g=u&&u>d?u-d:void 0;return{modifiers:i,hasImportantModifier:C,baseClassName:p,maybePostfixModifierPosition:g}};if(t){const s=t+Mt,i=n;n=a=>a.startsWith(s)?i(a.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},ds=e=>e.endsWith(Pt)?e.substring(0,e.length-1):e.startsWith(Pt)?e.substring(1):e,us=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const s=[];let i=[];return n.forEach(a=>{a[0]==="["||t[a]?(s.push(...i.sort(),a),i=[]):i.push(a)}),s.push(...i.sort()),s}},fs=e=>({cache:as(e.cacheSize),parseClassName:cs(e),sortModifiers:us(e),...ns(e)}),ps=/\s+/,hs=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,a=[],l=e.trim().split(ps);let d="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:p,modifiers:C,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:h}=r(f);if(p){d=f+(d.length>0?" "+d:d);continue}let y=!!h,b=n(y?m.substring(0,h):m);if(!b){if(!y){d=f+(d.length>0?" "+d:d);continue}if(b=n(m),!b){d=f+(d.length>0?" "+d:d);continue}y=!1}const v=i(C).join(":"),x=g?v+Pt:v,j=x+b;if(a.includes(j))continue;a.push(j);const N=s(b,y);for(let T=0;T<N.length;++T){const R=N[T];a.push(x+R)}d=f+(d.length>0?" "+d:d)}return d};function gs(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Fr(t))&&(n&&(n+=" "),n+=r);return n}const Fr=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Fr(e[n]))&&(r&&(r+=" "),r+=t);return r};function ms(e,...t){let r,n,s,i=a;function a(d){const u=t.reduce((f,p)=>p(f),e());return r=fs(u),n=r.cache.get,s=r.cache.set,i=l,l(d)}function l(d){const u=n(d);if(u)return u;const f=hs(d,r);return s(d,f),f}return function(){return i(gs.apply(null,arguments))}}const te=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Hr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Vr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Cs=/^\d+\/\d+$/,xs=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bs=/\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$/,vs=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ys=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ws=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Me=e=>Cs.test(e),V=e=>!!e&&!Number.isNaN(Number(e)),we=e=>!!e&&Number.isInteger(Number(e)),wt=e=>e.endsWith("%")&&V(e.slice(0,-1)),be=e=>xs.test(e),Ds=()=>!0,Ss=e=>bs.test(e)&&!vs.test(e),Ar=()=>!1,Is=e=>ys.test(e),Ts=e=>ws.test(e),Ls=e=>!L(e)&&!E(e),Es=e=>_e(e,Br,Ar),L=e=>Hr.test(e),Ee=e=>_e(e,$r,Ss),Dt=e=>_e(e,Rs,V),or=e=>_e(e,_r,Ar),js=e=>_e(e,zr,Ts),Qe=e=>_e(e,Gr,Is),E=e=>Vr.test(e),Ge=e=>ze(e,$r),ks=e=>ze(e,Ps),ir=e=>ze(e,_r),Os=e=>ze(e,Br),Ns=e=>ze(e,zr),et=e=>ze(e,Gr,!0),_e=(e,t,r)=>{const n=Hr.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ze=(e,t,r=!1)=>{const n=Vr.exec(e);return n?n[1]?t(n[1]):r:!1},_r=e=>e==="position"||e==="percentage",zr=e=>e==="image"||e==="url",Br=e=>e==="length"||e==="size"||e==="bg-size",$r=e=>e==="length",Rs=e=>e==="number",Ps=e=>e==="family-name",Gr=e=>e==="shadow",Ms=()=>{const e=te("color"),t=te("font"),r=te("text"),n=te("font-weight"),s=te("tracking"),i=te("leading"),a=te("breakpoint"),l=te("container"),d=te("spacing"),u=te("radius"),f=te("shadow"),p=te("inset-shadow"),C=te("text-shadow"),g=te("drop-shadow"),m=te("blur"),h=te("perspective"),y=te("aspect"),b=te("ease"),v=te("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...j(),E,L],T=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],I=()=>[E,L,d],z=()=>[Me,"full","auto",...I()],Q=()=>[we,"none","subgrid",E,L],P=()=>["auto",{span:["full",we,E,L]},we,E,L],G=()=>[we,"auto",E,L],B=()=>["auto","min","max","fr",E,L],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],ie=()=>["auto",...I()],X=()=>[Me,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],S=()=>[e,E,L],he=()=>[...j(),ir,or,{position:[E,L]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",Os,Es,{size:[E,L]}],me=()=>[wt,Ge,Ee],$=()=>["","none","full",u,E,L],J=()=>["",V,Ge,Ee],ue=()=>["solid","dashed","dotted","double"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>[V,wt,ir,or],ce=()=>["","none",m,E,L],Y=()=>["none",V,E,L],Z=()=>["none",V,E,L],ge=()=>[V,E,L],ye=()=>[Me,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[be],breakpoint:[be],color:[Ds],container:[be],"drop-shadow":[be],ease:["in","out","in-out"],font:[Ls],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[be],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[be],shadow:[be],spacing:["px",V],text:[be],"text-shadow":[be],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Me,L,E,y]}],container:["container"],columns:[{columns:[V,L,E,l]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{start:z()}],end:[{end:z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[we,"auto",E,L]}],basis:[{basis:[Me,"full","auto",l,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[V,Me,"auto","initial","none",L]}],grow:[{grow:["",V,E,L]}],shrink:[{shrink:["",V,E,L]}],order:[{order:[we,"first","last","none",E,L]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[l,"screen",...X()]}],"min-w":[{"min-w":[l,"screen","none",...X()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Ge,Ee]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,E,Dt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",wt,L]}],"font-family":[{font:[ks,L,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,E,L]}],"line-clamp":[{"line-clamp":[V,"none",E,Dt]}],leading:[{leading:[i,...I()]}],"list-image":[{"list-image":["none",E,L]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",E,L]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:S()}],"text-color":[{text:S()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[V,"from-font","auto",E,Ee]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[V,"auto",E,L]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",E,L]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",E,L]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:he()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},we,E,L],radial:["",E,L],conic:[we,E,L]},Ns,js]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:S()}],"border-color-x":[{"border-x":S()}],"border-color-y":[{"border-y":S()}],"border-color-s":[{"border-s":S()}],"border-color-e":[{"border-e":S()}],"border-color-t":[{"border-t":S()}],"border-color-r":[{"border-r":S()}],"border-color-b":[{"border-b":S()}],"border-color-l":[{"border-l":S()}],"divide-color":[{divide:S()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[V,E,L]}],"outline-w":[{outline:["",V,Ge,Ee]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",f,et,Qe]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",p,et,Qe]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[V,Ee]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",C,et,Qe]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[V,E,L]}],"mix-blend":[{"mix-blend":[...O(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":O()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[V]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":S()}],"mask-image-linear-to-color":[{"mask-linear-to":S()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":S()}],"mask-image-t-to-color":[{"mask-t-to":S()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":S()}],"mask-image-r-to-color":[{"mask-r-to":S()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":S()}],"mask-image-b-to-color":[{"mask-b-to":S()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":S()}],"mask-image-l-to-color":[{"mask-l-to":S()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":S()}],"mask-image-x-to-color":[{"mask-x-to":S()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[E,L]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":S()}],"mask-image-radial-to-color":[{"mask-radial-to":S()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[V]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":S()}],"mask-image-conic-to-color":[{"mask-conic-to":S()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:he()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",E,L]}],filter:[{filter:["","none",E,L]}],blur:[{blur:ce()}],brightness:[{brightness:[V,E,L]}],contrast:[{contrast:[V,E,L]}],"drop-shadow":[{"drop-shadow":["","none",g,et,Qe]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",V,E,L]}],"hue-rotate":[{"hue-rotate":[V,E,L]}],invert:[{invert:["",V,E,L]}],saturate:[{saturate:[V,E,L]}],sepia:[{sepia:["",V,E,L]}],"backdrop-filter":[{"backdrop-filter":["","none",E,L]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[V,E,L]}],"backdrop-contrast":[{"backdrop-contrast":[V,E,L]}],"backdrop-grayscale":[{"backdrop-grayscale":["",V,E,L]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[V,E,L]}],"backdrop-invert":[{"backdrop-invert":["",V,E,L]}],"backdrop-opacity":[{"backdrop-opacity":[V,E,L]}],"backdrop-saturate":[{"backdrop-saturate":[V,E,L]}],"backdrop-sepia":[{"backdrop-sepia":["",V,E,L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",E,L]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[V,"initial",E,L]}],ease:[{ease:["linear","initial",b,E,L]}],delay:[{delay:[V,E,L]}],animate:[{animate:["none",v,E,L]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,E,L]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:ge()}],"skew-x":[{"skew-x":ge()}],"skew-y":[{"skew-y":ge()}],transform:[{transform:[E,L,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":["translate-none"],accent:[{accent:S()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:S()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",E,L]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",E,L]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[V,Ge,Ee,Dt]}],stroke:[{stroke:["none",...S()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Fs=ms(Ms);function _(...e){return Fs(D(e))}const Pe=({fieldTitle:e,htmlFor:t,optional:r,optionalText:n,cssClass:s,description:i})=>e?o.jsxs("label",{className:_("dial-tiny text-secondary flex gap-1",s,!s?.includes("mb")&&"mb-2"),htmlFor:t,children:[typeof e=="string"?o.jsx("span",{className:"min-h-4",children:e}):e,r&&o.jsx("span",{children:n??"(Optional)"}),i&&o.jsx(Ie,{tooltip:i,children:o.jsx(q,{icon:o.jsx(k.IconInfoCircle,{size:14,className:"text-secondary"})})})]}):null;var se=(e=>(e.Primary="primary",e.Secondary="secondary",e.Tertiary="tertiary",e.Danger="danger",e))(se||{});const Hs={[se.Primary]:"dial-primary-button",[se.Secondary]:"dial-secondary-button",[se.Tertiary]:"dial-tertiary-button",[se.Danger]:"dial-danger-button"},re=({title:e,variant:t,cssClass:r,textCssClass:n,ref:s,onClick:i,disable:a,iconAfter:l,iconBefore:d,hideTitleOnMobile:u,ariaLabel:f})=>{const p=D("dial-small-semi",l?"mr-2":"",d?"ml-2":"",u?"hidden sm:inline":"inline",n),C=D(t&&Hs[t],r,"focus-visible:outline outline-offset-0");return o.jsxs("button",{ref:s,type:"button",className:C,onClick:g=>i?.(g),disabled:a,"aria-label":e||f,children:[o.jsx(q,{icon:d}),e&&o.jsx("span",{className:p,children:e}),o.jsx(q,{icon:l})]})};var ke=(e=>(e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e))(ke||{});const Vs={info:o.jsx(k.IconInfoCircle,{size:24,stroke:2}),error:o.jsx(k.IconAlertCircle,{size:24,stroke:2}),warning:o.jsx(k.IconAlertTriangle,{size:24,stroke:2}),success:o.jsx(k.IconCircleCheck,{size:24,stroke:2})},As={[ke.Info]:"bg-info border-info text-info",[ke.Success]:"bg-success border-success text-success",[ke.Warning]:"bg-warning border-warning text-warning",[ke.Error]:"bg-error border-error text-error"},_s="items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex",zs=({variant:e=ke.Info,message:t,cssClass:r,closable:n=!1,onClose:s})=>o.jsxs("div",{role:"alert",className:D(_s,As[e],r),children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(q,{icon:Vs[e]}),o.jsx("div",{className:"text-primary",children:t})]}),n&&o.jsx(re,{cssClass:"ml-2 text-secondary hover:text-primary",ariaLabel:"Close alert",iconBefore:o.jsx(k.IconX,{size:16}),onClick:i=>s?.(i)})]}),Bs="flex items-center justify-center text-secondary",$s="shrink-0 grow-0 basis-auto animate-spin-steps",Gs=e=>M.createElement("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M24 39V46.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{opacity:.4,d:"M9 24H1.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{opacity:.5,d:"M8.0918 8.0918L13.3994 13.3994",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{opacity:.6,d:"M24 1.5V9",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{opacity:.7,d:"M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{opacity:.8,d:"M46.5 24H39",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{opacity:.9,d:"M34.6055 34.6055L39.9082 39.9082",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{opacity:.3,d:"M13.3936 34.6055L8.08594 39.9131",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})),ct=({size:e=18,cssClass:t,iconClass:r,fullWidth:n=!0,ariaLabel:s="Loading"})=>o.jsx("div",{role:"status",className:D({[Bs]:!0,"w-full h-full":n,[t||""]:!!t}),children:o.jsx(q,{icon:o.jsx(Gs,{width:e,height:e,className:D($s,r),role:"img","aria-label":s})})}),We=18,le={size:We,stroke:2},Us="text-primary",Ce=({text:e,cssClass:t,contentClassName:r,hideTooltip:n,...s})=>{const i=c.useRef(null),[a,l]=c.useState(!1),[d,u]=c.useState(""),f=c.useRef(null),p=()=>{const h=i.current;if(!h)return;u(h.textContent??"");const y=h.clientWidth,b=h.scrollWidth,v=Math.ceil(h.getBoundingClientRect().width);l(b>y||b>v)},C=c.useCallback(()=>{f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(p)},[]);c.useEffect(()=>{C();const h=()=>C();window.addEventListener("resize",h);let y=null;return"ResizeObserver"in window&&i.current&&(y=new ResizeObserver(()=>C()),y.observe(i.current)),()=>{window.removeEventListener("resize",h),y&&y.disconnect(),f.current&&cancelAnimationFrame(f.current)}},[e,C]);const g=c.useMemo(()=>typeof e=="string"?e:d,[d,e]),m=c.useMemo(()=>n?"":a?g:"",[g,n,a]);return o.jsxs(Nr,{...s,children:[o.jsx(Pr,{asChild:!0,onMouseEnter:C,onFocusCapture:C,children:o.jsx("span",{className:_("block truncate flex-1 min-w-0 max-w-full text-left",t),"aria-label":a?g:void 0,onMouseEnter:C,onFocus:C,ref:i,children:e})}),o.jsx(Rr,{className:_(Us,r,!m&&"hidden"),children:m})]})},Ft=({label:e,id:t,checked:r,indeterminate:n,disabled:s,ariaLabel:i,onChange:a,cssClass:l})=>{const d=c.useCallback(C=>{a?.(C.target.checked,t)},[a,t]),u=D("flex flex-row items-center cursor-pointer text-accent-primary small-medium flex-1 min-w-0",`${r||n?"":'before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:border before:border-hover before:rounded before:mr-2'}`,s?"pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4":"",l),f=D("mr-2 border rounded",s?"bg-layer-4 border-icon-secondary":""),p=()=>n?o.jsx(k.IconMinus,{className:f,...le}):r?o.jsx(k.IconCheck,{className:f,...le}):null;return o.jsxs("label",{className:u,htmlFor:t,children:[p(),e&&(typeof e=="string"?o.jsx(Ce,{text:e,cssClass:"text-primary"}):e),o.jsx("input",{type:"checkbox",role:"checkbox",name:t,onChange:d,id:t,checked:r,"aria-checked":n?"mixed":r,"aria-disabled":s||void 0,"aria-label":e?void 0:i,className:"invisible w-0 h-0"})]})};var de=(e=>(e.VALID="valid",e.ERROR="error",e))(de||{});const Ws=(e,t)=>{if(t===e.id)switch(e.status){case de.VALID:return"border-accent-secondary text-primary";case de.ERROR:return"border-red-900 text-primary";default:return"border-accent-primary text-primary"}switch(e.status){case de.VALID:return"border-primary text-primary";case de.ERROR:return"border-red-900 text-error";default:return"border-primary text-secondary"}},qs=(e,t)=>{if(t===e.id)switch(e.status){case de.VALID:return"bg-accent-secondary";case de.ERROR:return"bg-red-400";default:return"bg-accent-primary"}switch(e.status){case de.VALID:return"bg-accent-secondary";case de.ERROR:return"bg-red-400";default:return"bg-layer-4"}},Zs=({step:e,index:t,currentStep:r,onChangeStep:n})=>{const s="h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny cursor-pointer dial-step",i="w-[22px] h-[22px] flex justify-center items-center mr-2 rounded-full text-white",a=()=>r===e.id&&e.status===de.ERROR?o.jsx(k.IconExclamationCircle,{stroke:2,size:16}):r!==e.id&&e.status===de.VALID?o.jsx(k.IconCheck,{stroke:2,size:16}):t+1;return o.jsxs("button",{className:D(s,Ws(e,r)),onClick:()=>n(e.id),children:[o.jsx("span",{className:D(i,qs(e,r)),children:a()}),o.jsx("span",{children:e.name})]})},Xs=({steps:e,currentStep:t,onChangeStep:r})=>{const n=s=>{const i=e.findIndex(l=>l.id===t),a=e.findIndex(l=>l.id===s);(s!==t&&e[i].status===de.VALID||a<i)&&r(s)};return o.jsx("div",{id:"steps",className:"flex gap-x-3",children:e.map((s,i)=>o.jsx(Zs,{currentStep:t,onChangeStep:n,step:s,index:i},s.id))})},Ur=({name:e,value:t,title:r,description:n,checked:s=!1,inputId:i,cssClass:a,labelCssClass:l,disabled:d,onChange:u,descriptionCssClass:f})=>{const p=`${i}-desc`,C=D("dial-small cursor-pointer",d?"text-secondary":"text-primary",l),g=D("cursor-pointer dial-input-radio",r&&"mr-2",a),m=D("flex flex-col",!!n&&"mb-2"),h=D("dial-tiny mt-2 ml-[26px] text-secondary",f),y=b=>{d||b.target.checked&&u?.(t)};return o.jsxs("div",{className:m,children:[o.jsxs("div",{className:"flex flex-row items-center",children:[o.jsx("input",{type:"radio",id:i,name:e,value:t,checked:s,disabled:d,"aria-describedby":s&&n?p:void 0,className:g,onChange:y}),r?o.jsx("label",{className:C,htmlFor:i,children:r}):null]}),s&&n&&o.jsx("div",{id:p,className:h,children:n})]})};var Xe=(e=>(e.Vertical="vertical",e.Horizontal="horizontal",e))(Xe||{});const Ys="w-full flex",Ks={[Xe.Vertical]:"flex-col",[Xe.Horizontal]:"flex-row items-end"},dt=({elementId:e,label:t,optional:r,optionalText:n,description:s,error:i,orientation:a=Xe.Vertical,labelVisuallyHidden:l=!1,cssClass:d,labelCssClass:u,errorCssClass:f,childrenCssClass:p,captionDescription:C,readonly:g,value:m,defaultEmptyText:h,children:y})=>{const b=`${e}-label`,v=s?`${e}-desc`:void 0,x=i?`${e}-err`:void 0,j=`${e}-caption-desc`,N=[v,x].filter(Boolean).join(" ")||void 0,T=c.useCallback(()=>typeof i=="boolean"?null:typeof i=="string"||typeof i>"u"?i?o.jsx("div",{id:x,role:"alert","aria-live":"polite",className:f,children:o.jsx(Se,{errorText:i})}):null:o.jsx("div",{id:x,role:"alert","aria-live":"polite",className:f,children:i}),[i,f,x]),R=c.useCallback(()=>m?typeof m=="string"||typeof m=="number"?o.jsx("span",{"aria-readonly":"true",children:m}):m:o.jsx("span",{className:"flex min-h-4","aria-readonly":"true",children:h??"None"}),[m,h]);return o.jsxs("div",{role:"group","aria-labelledby":t?b:void 0,"aria-describedby":N,className:_(Ys,Ks[a],d),children:[t&&o.jsx("div",{id:b,className:_(a==="horizontal"&&"shrink-0"),children:o.jsx(Pe,{htmlFor:e,fieldTitle:t,optional:r,optionalText:n,cssClass:_(l&&"sr-only",u),description:s})}),o.jsxs("div",{className:_("min-w-0 w-full",p),children:[g?o.jsx("div",{className:"dial-input px-3 py-2",children:R()}):y,C&&o.jsx("div",{id:j,className:_({"dial-tiny text-secondary mt-1":!0,"text-error":!!i}),children:C}),T()]})]})};var Ye=(e=>(e.Row="Row",e.Column="Column",e))(Ye||{});const Js="flex",Qs="pb-1 mt-2",eo={[Ye.Column]:"flex-col gap-y-3",[Ye.Row]:"flex-row gap-x-6"},Wr=({fieldTitle:e,radioCssClass:t,containerCssClass:r,selectedItemCssClass:n,selectedLabelCssClass:s,radioGroupCssClass:i,inputContainerCssClass:a,selectedInputContainerCssClass:l,groupLabelCssClass:d,formItemChildrenCssClass:u,labelCssClass:f,disabled:p,elementId:C,radioButtons:g,activeRadioButton:m,orientation:h,onChange:y})=>o.jsx(dt,{elementId:C,label:e,labelCssClass:d||f,cssClass:r,childrenCssClass:u,children:o.jsx("div",{role:"radiogroup","aria-label":e,"aria-disabled":p||void 0,className:_(Js,eo[h],i),children:g.map(b=>o.jsxs("div",{className:_("flex flex-col",a,b.id===m&&l),children:[o.jsx(Ur,{name:C,value:b.id,inputId:b.id,disabled:p,cssClass:t,labelCssClass:_(f,b.id===m&&s),title:b.name,checked:b.id===m,onChange:()=>y(b.id)}),b.id===m&&b.content?o.jsx("div",{className:_(Qs,n),children:b.content}):null]},b.id))})}),qr=({icon:e,title:t,description:r,containerCssClass:n,titleCssClass:s,descriptionCssClass:i})=>o.jsxs("div",{className:_("h-full w-full flex flex-col items-center justify-center text-secondary",n),children:[e||o.jsx(k.IconClipboardX,{width:60,height:60}),o.jsx("span",{className:_("dial-small mt-2 text-primary",s),children:t}),r&&o.jsx("span",{className:_("mt-1 text-primary",i),children:r})]}),St=48,to=({containerCssClass:e,children:t,width:r=280,title:n,iconSize:s=24,iconStroke:i=1.5,titleCssClass:a,additionalButtons:l,isOpened:d,onToggle:u})=>{const[f,p]=c.useState(r),[C,g]=c.useState(!0),m=c.useMemo(()=>typeof d=="boolean",[d]),h=m?d:C;c.useEffect(()=>{m&&p(d?r:St)},[m,d,r]);const y=D(["transform rotate-180 [writing-mode:tb-rl] py-4 px-3",h&&"hidden",a]),b=D(["flex flex-row gap-2 cursor-pointer text-secondary p-2 px-4",h?"justify-end":"justify-center"]),v=x=>{const j=!h;if(m){p(j?r:St),u?.(j,x);return}p(j?r:St),g(j)};return o.jsxs("div",{className:D(["rounded flex flex-col justify-between overflow-y-auto flex-shrink-0",e]),style:{width:`${f}px`},children:[o.jsx("div",{className:D(["flex-1 p-4 min-h-0 overflow-auto",!h&&"hidden"]),children:t}),o.jsx("div",{className:y,children:n}),o.jsxs("div",{className:_("border-t stroke-primary h-12",b),children:[h&&l,o.jsx(re,{cssClass:"hover:text-icon-accent-primary p-1",onClick:v,iconBefore:h?o.jsx(k.IconChevronsLeft,{size:s,stroke:i}):o.jsx(k.IconChevronsRight,{size:s,stroke:i})})]})]})},ro=({label:e,text:t,children:r,postfix:n})=>o.jsxs("div",{className:D("flex flex-col",r?"":"max-w-[200px]"),children:[o.jsx("label",{className:"dial-tiny mb-2 text-secondary",children:e}),r||o.jsxs("div",{className:"flex flex-row items-center",children:[o.jsx(Ie,{triggerClassName:"text-primary",tooltip:t,children:t}),n||null]})]});var ut=(e=>(e.Default="default",e))(ut||{});const no={[ut.Default]:"border-icon-secondary bg-layer-3"},ft=({tag:e,cssClass:t,remove:r,variant:n=ut.Default,iconBefore:s,bordered:i=!0})=>{const a=no[n],l=_("flex items-center gap-1 dial-tiny rounded p-1 h-[22px] text-primary",a,i?"border":"border-transparent",t);return o.jsxs("div",{className:l,children:[o.jsx(q,{icon:s}),o.jsx(Ce,{text:e}),r&&o.jsx(re,{iconAfter:o.jsx(k.IconX,{size:16}),onClick:d=>r(d)})]},e)},Zr=c.createContext({dragDropManager:void 0});function fe(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var ar=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),lr=function(){return Math.random().toString(36).substring(7).split("").join(".")},cr={INIT:"@@redux/INIT"+lr(),REPLACE:"@@redux/REPLACE"+lr()};function so(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function oo(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(lo(e))return"date";if(ao(e))return"error";var r=io(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function io(e){return typeof e.constructor=="function"?e.constructor.name:null}function ao(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function lo(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Fe(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=oo(e)),t}function Xr(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?fe(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?fe(1):"Expected the enhancer to be a function. Instead, received: '"+Fe(r)+"'");return r(Xr)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?fe(2):"Expected the root reducer to be a function. Instead, received: '"+Fe(e)+"'");var s=e,i=t,a=[],l=a,d=!1;function u(){l===a&&(l=a.slice())}function f(){if(d)throw new Error(process.env.NODE_ENV==="production"?fe(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function p(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?fe(4):"Expected the listener to be a function. Instead, received: '"+Fe(h)+"'");if(d)throw new Error(process.env.NODE_ENV==="production"?fe(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var y=!0;return u(),l.push(h),function(){if(y){if(d)throw new Error(process.env.NODE_ENV==="production"?fe(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");y=!1,u();var v=l.indexOf(h);l.splice(v,1),a=null}}}function C(h){if(!so(h))throw new Error(process.env.NODE_ENV==="production"?fe(7):"Actions must be plain objects. Instead, the actual type was: '"+Fe(h)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?fe(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(d)throw new Error(process.env.NODE_ENV==="production"?fe(9):"Reducers may not dispatch actions.");try{d=!0,i=s(i,h)}finally{d=!1}for(var y=a=l,b=0;b<y.length;b++){var v=y[b];v()}return h}function g(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?fe(10):"Expected the nextReducer to be a function. Instead, received: '"+Fe(h));s=h,C({type:cr.REPLACE})}function m(){var h,y=p;return h={subscribe:function(v){if(typeof v!="object"||v===null)throw new Error(process.env.NODE_ENV==="production"?fe(11):"Expected the observer to be an object. Instead, received: '"+Fe(v)+"'");function x(){v.next&&v.next(f())}x();var j=y(x);return{unsubscribe:j}}},h[ar]=function(){return this},h}return C({type:cr.INIT}),n={dispatch:C,subscribe:p,getState:f,replaceReducer:g},n[ar]=m,n}function F(e,t,...r){if(co()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let s=0;n=new Error(t.replace(/%s/g,function(){return r[s++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function co(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function uo(e,t,r){return t.split(".").reduce((n,s)=>n&&n[s]?n[s]:r||null,e)}function fo(e,t){return e.filter(r=>r!==t)}function Yr(e){return typeof e=="object"}function po(e,t){const r=new Map,n=i=>{r.set(i,r.has(i)?r.get(i)+1:1)};e.forEach(n),t.forEach(n);const s=[];return r.forEach((i,a)=>{i===1&&s.push(a)}),s}function ho(e,t){return e.filter(r=>t.indexOf(r)>-1)}const Ut="dnd-core/INIT_COORDS",pt="dnd-core/BEGIN_DRAG",Wt="dnd-core/PUBLISH_DRAG_SOURCE",ht="dnd-core/HOVER",gt="dnd-core/DROP",mt="dnd-core/END_DRAG";function dr(e,t){return{type:Ut,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const go={type:Ut,payload:{clientOffset:null,sourceClientOffset:null}};function mo(e){return function(r=[],n={publishSource:!0}){const{publishSource:s=!0,clientOffset:i,getSourceClientOffset:a}=n,l=e.getMonitor(),d=e.getRegistry();e.dispatch(dr(i)),Co(r,l,d);const u=vo(r,l);if(u==null){e.dispatch(go);return}let f=null;if(i){if(!a)throw new Error("getSourceClientOffset must be defined");xo(a),f=a(u)}e.dispatch(dr(i,f));const C=d.getSource(u).beginDrag(l,u);if(C==null)return;bo(C),d.pinSource(u);const g=d.getSourceType(u);return{type:pt,payload:{itemType:g,item:C,sourceId:u,clientOffset:i||null,sourceClientOffset:f||null,isSourcePublic:!!s}}}}function Co(e,t,r){F(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){F(r.getSource(n),"Expected sourceIds to be registered.")})}function xo(e){F(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function bo(e){F(Yr(e),"Item must be an object.")}function vo(e,t){let r=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function yo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){yo(e,s,r[s])})}return e}function Do(e){return function(r={}){const n=e.getMonitor(),s=e.getRegistry();So(n),Lo(n).forEach((a,l)=>{const d=Io(a,l,s,n),u={type:gt,payload:{dropResult:wo({},r,d)}};e.dispatch(u)})}}function So(e){F(e.isDragging(),"Cannot call drop while not dragging."),F(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Io(e,t,r,n){const s=r.getTarget(e);let i=s?s.drop(n,e):void 0;return To(i),typeof i>"u"&&(i=t===0?{}:n.getDropResult()),i}function To(e){F(typeof e>"u"||Yr(e),"Drop result must either be an object or undefined.")}function Lo(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Eo(e){return function(){const r=e.getMonitor(),n=e.getRegistry();jo(r);const s=r.getSourceId();return s!=null&&(n.getSource(s,!0).endDrag(r,s),n.unpinSource()),{type:mt}}}function jo(e){F(e.isDragging(),"Cannot call endDrag while not dragging.")}function Ht(e,t){return t===null?e===null:Array.isArray(e)?e.some(r=>r===t):e===t}function ko(e){return function(r,{clientOffset:n}={}){Oo(r);const s=r.slice(0),i=e.getMonitor(),a=e.getRegistry(),l=i.getItemType();return Ro(s,a,l),No(s,i,a),Po(s,i,a),{type:ht,payload:{targetIds:s,clientOffset:n||null}}}}function Oo(e){F(Array.isArray(e),"Expected targetIds to be an array.")}function No(e,t,r){F(t.isDragging(),"Cannot call hover while not dragging."),F(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){const s=e[n];F(e.lastIndexOf(s)===n,"Expected targetIds to be unique in the passed array.");const i=r.getTarget(s);F(i,"Expected targetIds to be registered.")}}function Ro(e,t,r){for(let n=e.length-1;n>=0;n--){const s=e[n],i=t.getTargetType(s);Ht(i,r)||e.splice(n,1)}}function Po(e,t,r){e.forEach(function(n){r.getTarget(n).hover(t,n)})}function Mo(e){return function(){if(e.getMonitor().isDragging())return{type:Wt}}}function Fo(e){return{beginDrag:mo(e),publishDragSource:Mo(e),hover:ko(e),drop:Do(e),endDrag:Eo(e)}}class Ho{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:r}=this.store;function n(i){return(...a)=>{const l=i.apply(t,a);typeof l<"u"&&r(l)}}const s=Fo(this);return Object.keys(s).reduce((i,a)=>{const l=s[a];return i[a]=n(l),i},{})}dispatch(t){this.store.dispatch(t)}constructor(t,r){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=r,t.subscribe(this.handleRefCountChange)}}function Vo(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Kr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ao(e){const{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return!t||!r||!n?null:Kr(Vo(t,n),r)}function _o(e){const{clientOffset:t,initialClientOffset:r}=e;return!t||!r?null:Kr(t,r)}const Ze=[],qt=[];Ze.__IS_NONE__=!0;qt.__IS_ALL__=!0;function zo(e,t){return e===Ze?!1:e===qt||typeof t>"u"?!0:ho(t,e).length>0}class Bo{subscribeToStateChange(t,r={}){const{handlerIds:n}=r;F(typeof t=="function","listener must be a function."),F(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let s=this.store.getState().stateId;const i=()=>{const a=this.store.getState(),l=a.stateId;try{l===s||l===s+1&&!zo(a.dirtyHandlerIds,n)||t()}finally{s=l}};return this.store.subscribe(i)}subscribeToOffsetChange(t){F(typeof t=="function","listener must be a function.");let r=this.store.getState().dragOffset;const n=()=>{const s=this.store.getState().dragOffset;s!==r&&(r=s,t())};return this.store.subscribe(n)}canDragSource(t){if(!t)return!1;const r=this.registry.getSource(t);return F(r,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:r.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const r=this.registry.getTarget(t);if(F(r,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(t),s=this.getItemType();return Ht(n,s)&&r.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const r=this.registry.getSource(t,!0);if(F(r,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(t),s=this.getItemType();return n!==s?!1:r.isDragging(this,t)}isOverTarget(t,r={shallow:!1}){if(!t)return!1;const{shallow:n}=r;if(!this.isDragging())return!1;const s=this.registry.getTargetType(t),i=this.getItemType();if(i&&!Ht(s,i))return!1;const a=this.getTargetIds();if(!a.length)return!1;const l=a.indexOf(t);return n?l===a.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Ao(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return _o(this.store.getState().dragOffset)}constructor(t,r){this.store=t,this.registry=r}}const ur=typeof global<"u"?global:self,Jr=ur.MutationObserver||ur.WebKitMutationObserver;function Qr(e){return function(){const r=setTimeout(s,0),n=setInterval(s,50);function s(){clearTimeout(r),clearInterval(n),e()}}}function $o(e){let t=1;const r=new Jr(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const Go=typeof Jr=="function"?$o:Qr;class Uo{enqueueTask(t){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const r=this.index;if(this.index++,t[r].call(),this.index>this.capacity){for(let n=0,s=t.length-this.index;n<s;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Go(this.flush),this.requestErrorThrow=Qr(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Wo{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,r){this.onError=t,this.release=r,this.task=null}}class qo{create(t){const r=this.freeTasks,n=r.length?r.pop():new Wo(this.onError,s=>r[r.length]=s);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const en=new Uo,Zo=new qo(en.registerPendingError);function Xo(e){en.enqueueTask(Zo.create(e))}const Zt="dnd-core/ADD_SOURCE",Xt="dnd-core/ADD_TARGET",Yt="dnd-core/REMOVE_SOURCE",Ct="dnd-core/REMOVE_TARGET";function Yo(e){return{type:Zt,payload:{sourceId:e}}}function Ko(e){return{type:Xt,payload:{targetId:e}}}function Jo(e){return{type:Yt,payload:{sourceId:e}}}function Qo(e){return{type:Ct,payload:{targetId:e}}}function ei(e){F(typeof e.canDrag=="function","Expected canDrag to be a function."),F(typeof e.beginDrag=="function","Expected beginDrag to be a function."),F(typeof e.endDrag=="function","Expected endDrag to be a function.")}function ti(e){F(typeof e.canDrop=="function","Expected canDrop to be a function."),F(typeof e.hover=="function","Expected hover to be a function."),F(typeof e.drop=="function","Expected beginDrag to be a function.")}function Vt(e,t){if(t&&Array.isArray(e)){e.forEach(r=>Vt(r,!1));return}F(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var pe;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(pe||(pe={}));let ri=0;function ni(){return ri++}function si(e){const t=ni().toString();switch(e){case pe.SOURCE:return`S${t}`;case pe.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function fr(e){switch(e[0]){case"S":return pe.SOURCE;case"T":return pe.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function pr(e,t){const r=e.entries();let n=!1;do{const{done:s,value:[,i]}=r.next();if(i===t)return!0;n=!!s}while(!n);return!1}class oi{addSource(t,r){Vt(t),ei(r);const n=this.addHandler(pe.SOURCE,t,r);return this.store.dispatch(Yo(n)),n}addTarget(t,r){Vt(t,!0),ti(r);const n=this.addHandler(pe.TARGET,t,r);return this.store.dispatch(Ko(n)),n}containsHandler(t){return pr(this.dragSources,t)||pr(this.dropTargets,t)}getSource(t,r=!1){return F(this.isSourceId(t),"Expected a valid source ID."),r&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return F(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return F(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return F(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return fr(t)===pe.SOURCE}isTargetId(t){return fr(t)===pe.TARGET}removeSource(t){F(this.getSource(t),"Expected an existing source."),this.store.dispatch(Jo(t)),Xo(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){F(this.getTarget(t),"Expected an existing target."),this.store.dispatch(Qo(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const r=this.getSource(t);F(r,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=r}unpinSource(){F(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,r,n){const s=si(t);return this.types.set(s,r),t===pe.SOURCE?this.dragSources.set(s,n):t===pe.TARGET&&this.dropTargets.set(s,n),s}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const ii=(e,t)=>e===t;function ai(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function li(e,t,r=ii){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function ci(e=Ze,t){switch(t.type){case ht:break;case Zt:case Xt:case Ct:case Yt:return Ze;case pt:case Wt:case mt:case gt:default:return qt}const{targetIds:r=[],prevTargetIds:n=[]}=t.payload,s=po(r,n);if(!(s.length>0||!li(r,n)))return Ze;const a=n[n.length-1],l=r[r.length-1];return a!==l&&(a&&s.push(a),l&&s.push(l)),s}function di(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ui(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){di(e,s,r[s])})}return e}const hr={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function fi(e=hr,t){const{payload:r}=t;switch(t.type){case Ut:case pt:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case ht:return ai(e.clientOffset,r.clientOffset)?e:ui({},e,{clientOffset:r.clientOffset});case mt:case gt:return hr;default:return e}}function pi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function He(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){pi(e,s,r[s])})}return e}const hi={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function gi(e=hi,t){const{payload:r}=t;switch(t.type){case pt:return He({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case Wt:return He({},e,{isSourcePublic:!0});case ht:return He({},e,{targetIds:r.targetIds});case Ct:return e.targetIds.indexOf(r.targetId)===-1?e:He({},e,{targetIds:fo(e.targetIds,r.targetId)});case gt:return He({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case mt:return He({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function mi(e=0,t){switch(t.type){case Zt:case Xt:return e+1;case Yt:case Ct:return e-1;default:return e}}function Ci(e=0){return e+1}function xi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){xi(e,s,r[s])})}return e}function vi(e={},t){return{dirtyHandlerIds:ci(e.dirtyHandlerIds,{type:t.type,payload:bi({},t.payload,{prevTargetIds:uo(e,"dragOperation.targetIds",[])})}),dragOffset:fi(e.dragOffset,t),refCount:mi(e.refCount,t),dragOperation:gi(e.dragOperation,t),stateId:Ci(e.stateId)}}function yi(e,t=void 0,r={},n=!1){const s=wi(n),i=new Bo(s,new oi(s)),a=new Ho(s,i),l=e(a,t,r);return a.receiveBackend(l),a}function wi(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Xr(vi,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function Di(e,t){if(e==null)return{};var r=Si(e,t),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)n=i[s],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Si(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,i;for(i=0;i<n.length;i++)s=n[i],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}let gr=0;const nt=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Ii=c.memo(function(t){var{children:r}=t,n=Di(t,["children"]);const[s,i]=Ti(n);return c.useEffect(()=>{if(i){const a=tn();return++gr,()=>{--gr===0&&(a[nt]=null)}}},[]),o.jsx(Zr.Provider,{value:s,children:r})});function Ti(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=Li(e.backend,e.context,e.options,e.debugMode),r=!e.context;return[t,r]}function Li(e,t=tn(),r,n){const s=t;return s[nt]||(s[nt]={dragDropManager:yi(e,t,r,n)}),s[nt]}function tn(){return typeof global<"u"?global:window}function Ei(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var It,mr;function ji(){return mr||(mr=1,It=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),It}var ki=ji();const Oi=Ei(ki),Ne=typeof window<"u"?c.useLayoutEffect:c.useEffect;function Ni(e,t,r){const[n,s]=c.useState(()=>t(e)),i=c.useCallback(()=>{const a=t(e);Oi(n,a)||(s(a),r&&r())},[n,e,r]);return Ne(i),[n,i]}function Ri(e,t,r){const[n,s]=Ni(e,t,r);return Ne(function(){const a=e.getHandlerId();if(a!=null)return e.subscribeToStateChange(s,{handlerIds:[a]})},[e,s]),n}function rn(e,t,r){return Ri(t,e||(()=>({})),()=>r.reconnect())}function nn(e,t){const r=[...t||[]];return t==null&&typeof e!="function"&&r.push(e),c.useMemo(()=>typeof e=="function"?e():e,r)}function Pi(e){return c.useMemo(()=>e.hooks.dragSource(),[e])}function Mi(e){return c.useMemo(()=>e.hooks.dragPreview(),[e])}let Tt=!1,Lt=!1;class Fi{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){F(!Tt,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Tt=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Tt=!1}}isDragging(){if(!this.sourceId)return!1;F(!Lt,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Lt=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Lt=!1}}subscribeToStateChange(t,r){return this.internalMonitor.subscribeToStateChange(t,r)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,r){return this.internalMonitor.isOverTarget(t,r)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let Et=!1;class Hi{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,r){return this.internalMonitor.subscribeToStateChange(t,r)}canDrop(){if(!this.targetId)return!1;F(!Et,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Et=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Et=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function Vi(e,t,r){const n=r.getRegistry(),s=n.addTarget(e,t);return[s,()=>n.removeTarget(s)]}function Ai(e,t,r){const n=r.getRegistry(),s=n.addSource(e,t);return[s,()=>n.removeSource(s)]}function At(e,t,r,n){let s;if(s!==void 0)return!!s;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;const l=Object.prototype.hasOwnProperty.bind(t);for(let d=0;d<i.length;d++){const u=i[d];if(!l(u))return!1;const f=e[u],p=t[u];if(s=void 0,s===!1||s===void 0&&f!==p)return!1}return!0}function _t(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _i(e){if(typeof e.type=="string")return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function zi(e){return(t=null,r=null)=>{if(!c.isValidElement(t)){const i=t;return e(i,r),i}const n=t;return _i(n),Bi(n,r?i=>e(i,r):e)}}function sn(e){const t={};return Object.keys(e).forEach(r=>{const n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{const s=zi(n);t[r]=()=>s}}),t}function Cr(e,t){typeof e=="function"?e(t):e.current=t}function Bi(e,t){const r=e.ref;return F(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?c.cloneElement(e,{ref:n=>{Cr(r,n),Cr(t,n)}}):c.cloneElement(e,{ref:t})}class $i{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return r&&this.disconnectDragSource(),this.handlerId?t?(r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),r):(this.lastConnectedDragSource=t,r):r}reconnectDragPreview(t=!1){const r=this.dragPreview,n=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),!!this.handlerId){if(!r){this.lastConnectedDragPreview=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=r,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,r,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!At(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!At(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=sn({dragSource:(r,n)=>{this.clearDragSource(),this.dragSourceOptions=n||null,_t(r)?this.dragSourceRef=r:this.dragSourceNode=r,this.reconnectDragSource()},dragPreview:(r,n)=>{this.clearDragPreview(),this.dragPreviewOptions=n||null,_t(r)?this.dragPreviewRef=r:this.dragPreviewNode=r,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class Gi{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!At(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=sn({dropTarget:(r,n)=>{this.clearDropTarget(),this.dropTargetOptions=n,_t(r)?this.dropTargetRef=r:this.dropTargetNode=r,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function Be(){const{dragDropManager:e}=c.useContext(Zr);return F(e!=null,"Expected drag drop context"),e}function Ui(e,t){const r=Be(),n=c.useMemo(()=>new $i(r.getBackend()),[r]);return Ne(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),Ne(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function Wi(){const e=Be();return c.useMemo(()=>new Fi(e),[e])}class qi{beginDrag(){const t=this.spec,r=this.monitor;let n=null;return typeof t.item=="object"?n=t.item:typeof t.item=="function"?n=t.item(r):n={},n??null}canDrag(){const t=this.spec,r=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(r):!0}isDragging(t,r){const n=this.spec,s=this.monitor,{isDragging:i}=n;return i?i(s):r===t.getSourceId()}endDrag(){const t=this.spec,r=this.monitor,n=this.connector,{end:s}=t;s&&s(r.getItem(),r),n.reconnect()}constructor(t,r,n){this.spec=t,this.monitor=r,this.connector=n}}function Zi(e,t,r){const n=c.useMemo(()=>new qi(e,t,r),[t,r]);return c.useEffect(()=>{n.spec=e},[e]),n}function Xi(e){return c.useMemo(()=>{const t=e.type;return F(t!=null,"spec.type must be defined"),t},[e])}function Yi(e,t,r){const n=Be(),s=Zi(e,t,r),i=Xi(e);Ne(function(){if(i!=null){const[l,d]=Ai(i,s,n);return t.receiveHandlerId(l),r.receiveHandlerId(l),d}},[n,t,r,s,i])}function Ki(e,t){const r=nn(e,t);F(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=Wi(),s=Ui(r.options,r.previewOptions);return Yi(r,n,s),[rn(r.collect,n,s),Pi(s),Mi(s)]}function Ji(e){return c.useMemo(()=>e.hooks.dropTarget(),[e])}function Qi(e){const t=Be(),r=c.useMemo(()=>new Gi(t.getBackend()),[t]);return Ne(()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget()),[e]),r}function ea(){const e=Be();return c.useMemo(()=>new Hi(e),[e])}function ta(e){const{accept:t}=e;return c.useMemo(()=>(F(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class ra{canDrop(){const t=this.spec,r=this.monitor;return t.canDrop?t.canDrop(r.getItem(),r):!0}hover(){const t=this.spec,r=this.monitor;t.hover&&t.hover(r.getItem(),r)}drop(){const t=this.spec,r=this.monitor;if(t.drop)return t.drop(r.getItem(),r)}constructor(t,r){this.spec=t,this.monitor=r}}function na(e,t){const r=c.useMemo(()=>new ra(e,t),[t]);return c.useEffect(()=>{r.spec=e},[e]),r}function sa(e,t,r){const n=Be(),s=na(e,t),i=ta(e);Ne(function(){const[l,d]=Vi(i,s,n);return t.receiveHandlerId(l),r.receiveHandlerId(l),d},[n,t,s,r,i.map(a=>a.toString()).join("|")])}function on(e,t){const r=nn(e,t),n=ea(),s=Qi(r.options);return sa(r,n,s),[rn(r.collect,n,s),Ji(s)]}const xr="column",oa="flex items-center",ia="mr-3 cursor-move text-secondary",aa=({id:e,children:t,cssClass:r,findItem:n,moveItem:s,handleAriaLabel:i="Drag item"})=>{const a=c.useRef(null),l=c.useRef(null),d=typeof n=="function"?n(e):-1,[{isDragging:u},f,p]=Ki(()=>({type:xr,item:{id:e,originalIndex:d},collect:g=>{const m=g.getItem();return{isDragging:g.isDragging()&&m?.id===e}},end:(g,m)=>{if(!g)return;!m.didDrop()&&typeof s=="function"&&g.originalIndex>-1&&s(g.id,g.originalIndex)}}),[e,d,s]),[,C]=on(()=>({accept:xr,hover:g=>{if(!(!g||g.id===e)&&typeof n=="function"&&typeof s=="function"){const m=n(e);s(g.id,m)}}}),[n,s,e]);return p(C(l)),f(a),o.jsxs("div",{ref:l,className:_(oa,r),style:{opacity:u?0:1},"aria-roledescription":"Draggable item",children:[o.jsx("div",{ref:a,className:ia,"aria-label":i,children:o.jsx(k.IconGripVertical,{...le})}),t]})},la=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M3.68628 10.3945C3.91003 10.408 4.10927 10.4422 4.2832 10.4978L4.28394 10.4971C4.5167 10.5698 4.71621 10.6662 4.87939 10.7871C4.9994 10.876 5.10332 10.974 5.18994 11.0815L5.27051 11.1929L5.27197 11.1943L5.34009 11.3079C5.38301 11.3838 5.42067 11.4597 5.45288 11.5356L5.49683 11.6492L5.49756 11.6514L5.53198 11.7649C5.56274 11.877 5.5838 11.9867 5.59497 12.0938C5.61194 12.23 5.62059 12.3501 5.62061 12.4534C5.62061 12.6166 5.57231 12.7639 5.47559 12.8906C5.41544 12.9694 5.325 13.0198 5.21997 13.0503C5.11455 13.0809 4.98537 13.0942 4.83691 13.0942C4.73711 13.0942 4.62608 13.0838 4.50439 13.0635C4.37577 13.0415 4.26002 12.9966 4.16089 12.9272L4.15869 12.9258C4.04118 12.8396 3.98657 12.7121 3.98657 12.5625C3.98655 12.2721 3.94576 12.0552 3.87231 11.9033L3.87158 11.9011C3.81572 11.7798 3.69406 11.7026 3.45337 11.7026C3.33114 11.7027 3.25307 11.7292 3.20435 11.7671C3.14221 11.8149 3.10061 11.864 3.07617 11.9128C3.04149 11.985 3.02355 12.0599 3.02124 12.1384V14.7905L3.02637 14.8652C3.03466 14.9384 3.05266 15.0073 3.07983 15.0725L3.10254 15.1201C3.12874 15.1672 3.16488 15.2124 3.21167 15.2556C3.2602 15.2978 3.33572 15.3259 3.45337 15.3259C3.56813 15.3259 3.65533 15.3041 3.71997 15.2673C3.78314 15.2313 3.83208 15.1772 3.86646 15.0996C3.94535 14.9186 3.98655 14.7002 3.98657 14.4412C3.98657 14.3004 4.04381 14.1839 4.1499 14.0991L4.19824 14.0647C4.33673 13.9762 4.55866 13.9431 4.83691 13.9431C5.09384 13.9431 5.30559 13.9858 5.43604 14.1013C5.55182 14.204 5.62061 14.3293 5.62061 14.4749C5.62057 14.7549 5.57953 15.0125 5.49536 15.2461L5.45654 15.3442C5.36294 15.5677 5.23261 15.7627 5.06543 15.928L4.99146 15.9968C4.58057 16.3629 4.03856 16.541 3.37793 16.541L3.12671 16.5278C3.00679 16.5188 2.87303 16.495 2.72607 16.4575C2.61505 16.4287 2.50136 16.3894 2.38696 16.3396L2.27197 16.2861C2.1155 16.2094 1.9705 16.0983 1.83691 15.9558L1.83618 15.9551C1.70598 15.8128 1.59909 15.6391 1.51392 15.4365L1.51318 15.4351C1.42797 15.2251 1.38722 14.9736 1.38721 14.6843V12.345C1.38721 12.1069 1.41644 11.892 1.47656 11.7026C1.52068 11.5616 1.57629 11.4337 1.64355 11.3196L1.7146 11.2097C1.81013 11.07 1.92167 10.9524 2.04932 10.8582C2.17206 10.7676 2.29884 10.6909 2.42871 10.6289L2.54297 10.5798C2.81231 10.4716 3.11394 10.4081 3.44678 10.3879L3.45337 10.3872L3.68628 10.3945Z",fill:"currentColor"}),M.createElement("path",{d:"M8.10791 11.7371C8.33261 11.7371 8.5218 11.8023 8.61255 11.9758C8.68772 12.1131 8.72383 12.2741 8.72388 12.4534V12.7522H9.03003C9.21461 12.7522 9.37781 12.7845 9.5127 12.8562C9.68704 12.9456 9.7463 13.149 9.74634 13.3843C9.74634 13.612 9.68105 13.8034 9.50537 13.894L9.5061 13.8948C9.36923 13.9665 9.20861 14.0002 9.03003 14.0002H8.72388V14.3064C8.72388 14.4941 8.68994 14.6588 8.61768 14.7942L8.61841 14.7949C8.5293 14.9647 8.334 15.0226 8.10791 15.0227C7.87257 15.0227 7.66761 14.9685 7.5769 14.8L7.57617 14.7993C7.50612 14.6659 7.47583 14.4988 7.47583 14.3064V14.0002H7.18579C6.99507 14.0002 6.82804 13.9669 6.69214 13.894C6.52182 13.8026 6.46069 13.6102 6.46069 13.3843C6.46073 13.1491 6.51509 12.944 6.68335 12.8533L6.68481 12.8525L6.79102 12.8079C6.90305 12.7697 7.03293 12.7522 7.177 12.7522H7.47583V12.4534C7.47587 12.2683 7.50712 12.1056 7.57617 11.9707L7.5769 11.9685L7.61646 11.9092C7.72038 11.7825 7.90134 11.7371 8.10791 11.7371Z",fill:"currentColor"}),M.createElement("path",{d:"M12.728 11.7371C12.9527 11.7371 13.1419 11.8023 13.2327 11.9758C13.3078 12.1131 13.3439 12.2741 13.344 12.4534V12.7522H13.6501C13.8347 12.7522 13.9979 12.7845 14.1328 12.8562C14.3072 12.9456 14.3664 13.149 14.3665 13.3843C14.3665 13.612 14.3012 13.8034 14.1255 13.894L14.1262 13.8948C13.9894 13.9665 13.8287 14.0002 13.6501 14.0002H13.344V14.3064C13.344 14.4941 13.3101 14.6588 13.2378 14.7942L13.2385 14.7949C13.1494 14.9647 12.9541 15.0226 12.728 15.0227C12.4927 15.0227 12.2877 14.9685 12.197 14.8L12.1963 14.7993C12.1262 14.6659 12.0959 14.4988 12.0959 14.3064V14.0002H11.8059C11.6152 14.0002 11.4482 13.9669 11.3123 13.894C11.1419 13.8026 11.0808 13.6102 11.0808 13.3843C11.0808 13.1491 11.1352 12.944 11.3035 12.8533L11.3049 12.8525L11.4111 12.8079C11.5232 12.7697 11.653 12.7522 11.7971 12.7522H12.0959V12.4534C12.096 12.2683 12.1272 12.1056 12.1963 11.9707L12.197 11.9685L12.2366 11.9092C12.3405 11.7825 12.5215 11.7371 12.728 11.7371Z",fill:"currentColor"}),M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V9C15 9.41421 14.6642 9.75 14.25 9.75C13.8358 9.75 13.5 9.41421 13.5 9V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),ca=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M4.29639 10.3945C4.50665 10.4083 4.69413 10.4433 4.85815 10.5L4.85889 10.4993C5.07789 10.5733 5.26574 10.6715 5.41919 10.7944C5.53204 10.8849 5.62958 10.9843 5.71069 11.0933L5.78613 11.2053L5.78687 11.2068L5.85059 11.3218C5.89058 11.3983 5.92606 11.4746 5.95605 11.551L5.99707 11.666L5.9978 11.6682L6.05566 11.8945C6.0708 11.9689 6.08168 12.0422 6.08862 12.1143C6.10449 12.252 6.11279 12.3734 6.11279 12.4775C6.11276 12.6403 6.06824 12.7876 5.97803 12.9155C5.92155 12.9956 5.83545 13.0472 5.73486 13.0789C5.63441 13.1104 5.51212 13.1243 5.37231 13.1243C5.32505 13.1243 5.27524 13.1215 5.2229 13.1162L5.05811 13.0928C4.93553 13.0701 4.82533 13.024 4.73145 12.9529L4.72998 12.9514C4.61882 12.8632 4.56958 12.7352 4.56958 12.5874C4.56955 12.2926 4.5312 12.0715 4.46191 11.9165L4.46045 11.9143C4.4319 11.8474 4.38931 11.8003 4.33154 11.7686C4.27185 11.7358 4.18944 11.7158 4.07812 11.7158C3.96626 11.7158 3.89622 11.7421 3.85254 11.7788C3.79519 11.8265 3.75637 11.8759 3.73315 11.926C3.70026 11.9999 3.68262 12.0771 3.68042 12.1582V14.8425L3.68555 14.9187C3.69337 14.9937 3.71038 15.0643 3.73608 15.1311L3.75732 15.1802C3.78176 15.2276 3.81496 15.2727 3.85767 15.3157L3.89575 15.3442C3.93843 15.3699 3.99697 15.386 4.07812 15.386C4.18296 15.386 4.26146 15.3647 4.31982 15.3289C4.37727 15.2935 4.4233 15.2389 4.45605 15.1589C4.53037 14.9746 4.56957 14.7522 4.56958 14.4888C4.56958 14.3307 4.63662 14.2007 4.7666 14.1116L4.82007 14.0801C4.95284 14.0119 5.14337 13.9856 5.37231 13.9856C5.61445 13.9856 5.81633 14.0298 5.94067 14.1489C6.04986 14.2536 6.11274 14.379 6.11279 14.5225C6.11279 14.8453 6.06245 15.1386 5.95972 15.3999C5.85998 15.6574 5.71501 15.8781 5.52466 16.0598L5.52393 16.0591C5.13817 16.4307 4.62871 16.6128 4.00708 16.6128C3.95774 16.6128 3.87811 16.6081 3.77124 16.5996C3.65793 16.5904 3.53127 16.5659 3.39331 16.5278C3.28866 16.4984 3.18149 16.4584 3.07397 16.4077L2.96631 16.3535C2.81858 16.2752 2.68196 16.1624 2.55688 16.0181L2.55615 16.0166C2.43435 15.8725 2.33453 15.6972 2.25513 15.4929L2.25439 15.4915C2.17508 15.28 2.13721 15.0267 2.13721 14.7349V12.3669C2.13721 12.1269 2.16476 11.9109 2.2207 11.7202L2.26538 11.5825C2.3136 11.4491 2.37234 11.3289 2.44263 11.2229C2.53187 11.0816 2.63607 10.9621 2.7561 10.8662C2.87117 10.7743 2.98996 10.6964 3.11206 10.6333L3.11353 10.6326L3.22046 10.5828C3.47384 10.4727 3.75793 10.4085 4.0708 10.3879L4.07812 10.3872L4.29639 10.3945Z",fill:"currentColor"}),M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H8.625C8.21079 16.5 7.875 16.1642 7.875 15.75C7.875 15.3358 8.21079 15 8.625 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),da=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M3.62109 10.571C3.83849 10.5842 4.03206 10.618 4.20117 10.6721L4.2019 10.6714C4.42776 10.742 4.62121 10.8352 4.77979 10.9526C4.89663 11.0392 4.99793 11.135 5.08228 11.2397L5.16064 11.3474L5.16211 11.3489L5.22803 11.4595C5.26973 11.5332 5.30659 11.6069 5.33789 11.6807L5.38037 11.7905L5.3811 11.7935L5.44116 12.0117C5.45675 12.0826 5.46834 12.1524 5.47559 12.2212L5.49463 12.4087C5.49888 12.4674 5.50049 12.5222 5.50049 12.5728C5.50045 12.7317 5.45415 12.8755 5.35986 12.999C5.30088 13.0762 5.2117 13.1246 5.10938 13.1543C5.0067 13.1841 4.88146 13.1975 4.7373 13.1975C4.64029 13.1975 4.53244 13.1872 4.41431 13.1675C4.28898 13.1461 4.17557 13.1026 4.07886 13.0349L4.07739 13.0334C3.96236 12.9491 3.90894 12.8243 3.90894 12.6782C3.90893 12.3968 3.86925 12.187 3.79834 12.0403L3.79761 12.0381C3.74418 11.922 3.62816 11.847 3.39551 11.8469C3.27715 11.8469 3.20179 11.873 3.15527 11.9092C3.09597 11.9548 3.05572 12.0012 3.03223 12.0476L3.03296 12.0483C2.99919 12.1182 2.98102 12.1906 2.97876 12.2666V14.8396L2.98389 14.9114C2.99188 14.9821 3.00888 15.049 3.03516 15.1121L3.05786 15.1582C3.08304 15.2033 3.11768 15.2464 3.1626 15.2878C3.2089 15.3285 3.28115 15.356 3.39551 15.356C3.50633 15.3559 3.58982 15.3349 3.65186 15.2996C3.71249 15.2651 3.75936 15.2131 3.79248 15.1384L3.84302 15.0007C3.88665 14.8554 3.90893 14.6891 3.90894 14.5005C3.90894 14.363 3.96502 14.2494 4.0686 14.1665L4.11621 14.1328C4.25147 14.0465 4.46739 14.0134 4.7373 14.0134C4.98658 14.0134 5.19278 14.0552 5.32031 14.168C5.43323 14.268 5.5004 14.3903 5.50049 14.5327C5.50049 14.8049 5.46077 15.0556 5.37891 15.2827L5.34155 15.3779C5.23762 15.6261 5.08621 15.8373 4.88892 16.0115L4.88965 16.0122C4.49029 16.3681 3.96383 16.541 3.32227 16.541C3.27168 16.541 3.18935 16.5367 3.07837 16.5286C3.02014 16.5242 2.95789 16.5158 2.89307 16.5044L2.68799 16.4597C2.5801 16.4317 2.47025 16.3938 2.35913 16.3455L2.2478 16.2935C2.09553 16.2188 1.95433 16.1112 1.82446 15.9727L1.82373 15.9712C1.69712 15.8328 1.593 15.6642 1.51025 15.4673L1.50952 15.4658C1.42669 15.2616 1.38721 15.0172 1.38721 14.7363V12.4666C1.38723 12.2355 1.41597 12.0273 1.47437 11.8433C1.53119 11.6615 1.60684 11.502 1.70361 11.3665L1.77686 11.2676C1.85263 11.1732 1.9374 11.0913 2.03101 11.0222C2.15024 10.9342 2.27322 10.8598 2.39941 10.7996L2.40015 10.7988L2.51074 10.7512C2.77229 10.6462 3.0652 10.5848 3.38818 10.5652L3.39551 10.5645L3.62109 10.571Z",fill:"currentColor"}),M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"}),M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.36914 11.28C9.50263 11.28 9.62352 11.3063 9.72583 11.3643L9.7251 11.365C9.85906 11.4379 9.90454 11.5838 9.90454 11.7429C9.9045 11.7567 9.90157 11.7778 9.89941 11.7935C9.89658 11.814 9.89242 11.8422 9.88696 11.8777C9.87611 11.9455 9.8639 12.0222 9.85034 12.1062C9.84553 12.136 9.84018 12.1643 9.83569 12.1912H10.0525C10.1919 12.1912 10.3171 12.2148 10.4216 12.2688L10.4209 12.2695C10.5686 12.3412 10.6128 12.5089 10.6128 12.6863C10.6128 12.8587 10.5617 13.0123 10.4194 13.0898L10.4187 13.0906C10.3122 13.1472 10.1885 13.1726 10.0525 13.1726H9.67529L9.55225 13.8589H9.75952C9.89706 13.8589 10.0206 13.8819 10.1243 13.9343C10.2748 14.005 10.3198 14.1752 10.3198 14.354C10.3198 14.5291 10.2702 14.6875 10.1243 14.7627L10.1235 14.7634C10.0176 14.8164 9.89461 14.8403 9.75952 14.8403H9.38452L9.33398 15.1677L9.33325 15.1714C9.30492 15.3271 9.26297 15.4669 9.20728 15.5903L9.20801 15.5911C9.17656 15.6626 9.13001 15.7228 9.06592 15.7646C9.00162 15.8065 8.92683 15.8247 8.84839 15.8247C8.72 15.8247 8.60307 15.8041 8.50122 15.7581L8.49976 15.7573C8.35755 15.6908 8.31299 15.5386 8.31299 15.3787C8.31299 15.3406 8.31787 15.2939 8.32617 15.241L8.35913 15.0242C8.36863 14.9624 8.37948 14.9012 8.38989 14.8403H7.92847L7.87793 15.1677L7.8772 15.1714C7.84887 15.3271 7.80691 15.4669 7.75122 15.5903L7.75195 15.5911C7.72046 15.6627 7.6734 15.7228 7.60913 15.7646C7.54487 15.8064 7.47071 15.8247 7.39233 15.8247C7.26394 15.8247 7.14702 15.8041 7.04517 15.7581L7.0437 15.7573C6.90149 15.6908 6.85693 15.5387 6.85693 15.3787C6.85694 15.3406 6.86181 15.2939 6.87012 15.241L6.90308 15.0242C6.91257 14.9624 6.92342 14.9012 6.93384 14.8403H6.6687C6.52906 14.8403 6.40313 14.8167 6.29663 14.7634L6.29297 14.762C6.15355 14.6853 6.10844 14.5261 6.1084 14.354C6.1084 14.1782 6.1487 14.0079 6.29297 13.9358C6.39784 13.882 6.52535 13.8589 6.6687 13.8589H7.09497L7.21802 13.1726H6.95361C6.81311 13.1726 6.68646 13.1475 6.57935 13.0906L6.57788 13.0898C6.43874 13.0135 6.39332 12.8568 6.39331 12.6863C6.39331 12.5105 6.43361 12.3402 6.57788 12.2681C6.68271 12.2144 6.81036 12.1912 6.95361 12.1912H7.38721L7.46045 11.7561C7.47174 11.6625 7.50842 11.5673 7.56372 11.4712C7.63824 11.3418 7.76255 11.2801 7.91309 11.28C8.04657 11.28 8.16746 11.3063 8.26978 11.3643L8.26904 11.365C8.403 11.4379 8.44849 11.5838 8.44849 11.7429C8.44844 11.7567 8.44552 11.7778 8.44336 11.7935C8.44053 11.814 8.43636 11.8422 8.43091 11.8777C8.42006 11.9455 8.40784 12.0222 8.39429 12.1062C8.38947 12.136 8.38413 12.1643 8.37964 12.1912H8.84326L8.9165 11.7561C8.92779 11.6625 8.96448 11.5673 9.01978 11.4712C9.0943 11.3418 9.21861 11.2801 9.36914 11.28ZM8.09619 13.8589H8.55103L8.67407 13.1726H8.21924L8.09619 13.8589Z",fill:"currentColor"})),ua=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M4.43188 10.4409C4.65285 10.4409 4.85471 10.4869 4.99951 10.6152L4.99878 10.6159C5.13097 10.7305 5.21409 10.881 5.25146 11.0576C5.28474 11.2148 5.30052 11.3869 5.30054 11.5724V15.4323C5.30054 15.6193 5.28417 15.7927 5.25146 15.9516L5.2522 15.9523C5.21779 16.1313 5.13551 16.2842 4.99951 16.3976L4.99878 16.3969C4.85386 16.52 4.65269 16.5646 4.43188 16.5646C4.21337 16.5646 4.01411 16.5195 3.86792 16.3976L3.86353 16.394C3.73466 16.2798 3.65263 16.1299 3.6123 15.9553L3.61157 15.9516C3.57826 15.7941 3.5625 15.6205 3.5625 15.4323V11.5724C3.56252 11.3869 3.5783 11.2148 3.61157 11.0576C3.64882 10.8815 3.72996 10.7302 3.85986 10.6152L3.86133 10.6137C4.00804 10.4875 4.2103 10.4409 4.43188 10.4409Z",fill:"currentColor"}),M.createElement("path",{d:"M8.07129 10.4474C8.18434 10.4599 8.28945 10.4924 8.3811 10.55L8.38184 10.5493C8.45754 10.5942 8.52569 10.6451 8.58472 10.7016L8.64111 10.7602L8.64331 10.7631L8.69385 10.8298C8.72596 10.8768 8.75504 10.9284 8.78101 10.9836L8.81763 11.0685L8.81909 11.0729L9.85986 13.8928V11.2692C9.85986 11.0565 9.89522 10.8654 9.98291 10.7119L9.98364 10.7104L10.0349 10.6393C10.1656 10.4886 10.3781 10.4409 10.5974 10.4409C10.8635 10.4409 11.125 10.4947 11.2529 10.6965C11.3535 10.8508 11.3928 11.0487 11.3928 11.2692V15.4323C11.3928 15.6163 11.3809 15.7863 11.3577 15.9413L11.3584 15.9421C11.3349 16.1167 11.2678 16.2708 11.1467 16.3881C11.0102 16.5202 10.8106 16.5646 10.5974 16.5646H10.0554C9.86994 16.5646 9.69972 16.5199 9.56104 16.416C9.44129 16.3261 9.3452 16.215 9.27466 16.0842C9.21353 15.9706 9.16292 15.8593 9.12378 15.7509L8.14893 13.1091V15.7363C8.14893 15.9493 8.11322 16.1406 8.02661 16.2958L8.02588 16.2973C7.90706 16.5052 7.66112 16.5646 7.41138 16.5646C7.14233 16.5646 6.88122 16.5106 6.75 16.312C6.64812 16.1572 6.60791 15.9581 6.60791 15.7363V11.5724C6.60792 11.3882 6.61818 11.2193 6.63867 11.0671V11.0641L6.66724 10.9367C6.7042 10.8142 6.76699 10.706 6.85986 10.6188C6.9982 10.4862 7.19704 10.4409 7.41138 10.4409H7.95337L8.07129 10.4474Z",fill:"currentColor"}),M.createElement("path",{d:"M13.5688 10.4409C13.7898 10.4409 13.9917 10.4869 14.1365 10.6152L14.1357 10.6159C14.2679 10.7305 14.3511 10.881 14.3884 11.0576C14.4217 11.2148 14.4375 11.3869 14.4375 11.5724V15.4323C14.4375 15.6193 14.4211 15.7927 14.3884 15.9516L14.3892 15.9523C14.3548 16.1313 14.2725 16.2842 14.1365 16.3976L14.1357 16.3969C13.9908 16.52 13.7897 16.5646 13.5688 16.5646C13.3503 16.5646 13.1511 16.5195 13.0049 16.3976L13.0005 16.394C12.8716 16.2798 12.7896 16.1299 12.7493 15.9553L12.7485 15.9516C12.7152 15.7941 12.6995 15.6205 12.6995 15.4323V11.5724C12.6995 11.3869 12.7153 11.2148 12.7485 11.0576C12.7858 10.8815 12.8669 10.7302 12.9968 10.6152L12.9983 10.6137C13.145 10.4875 13.3473 10.4409 13.5688 10.4409Z",fill:"currentColor"}),M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50385C10.7457 1.52087 10.9072 1.59681 11.0303 1.71991L14.7803 5.46991C14.9208 5.61054 15 5.80136 15 6.00018V9.00018C14.9998 9.41423 14.6641 9.75018 14.25 9.75018C13.8359 9.75018 13.5002 9.41423 13.5 9.00018V6.75018H11.25C10.8523 6.75018 10.4707 6.59192 10.1895 6.31073C9.90824 6.02951 9.7501 5.64788 9.75 5.25018V3.00018H5.25C5.05109 3.00018 4.86038 3.07926 4.71973 3.21991C4.57919 3.36054 4.5 3.55136 4.5 3.75018V9.00018C4.4998 9.41423 4.16409 9.75018 3.75 9.75018C3.33591 9.75018 3.0002 9.41423 3 9.00018V3.75018C3 3.15353 3.23734 2.5813 3.65918 2.15936C4.08114 1.73741 4.65326 1.50018 5.25 1.50018H10.5L10.574 1.50385ZM11.25 5.25018H12.4395L11.25 4.06073V5.25018Z",fill:"currentColor"})),fa=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M6.76831 10.8267C6.93291 10.8267 7.08404 10.8408 7.22021 10.8691L7.35205 10.9021L7.35278 10.9028L7.46851 10.9431C7.57872 10.986 7.67614 11.038 7.75928 11.0991C7.84245 11.1591 7.91481 11.2265 7.97388 11.3005L8.02881 11.3767L8.02954 11.3774L8.11011 11.5254C8.13317 11.5747 8.15233 11.6249 8.16797 11.6755C8.19815 11.7711 8.21863 11.8631 8.22656 11.9502C8.23376 12.0294 8.23755 12.096 8.23755 12.1479C8.23753 12.318 8.17338 12.4626 8.04639 12.572C7.92503 12.676 7.77653 12.7265 7.60913 12.7266C7.4711 12.7266 7.34146 12.6749 7.22241 12.583C7.1027 12.4905 7.02328 12.3741 7.02319 12.2329C7.02319 12.0468 6.98759 11.9498 6.94775 11.907L6.94629 11.9055C6.90561 11.8606 6.83878 11.8294 6.72583 11.8293C6.58234 11.8293 6.48534 11.856 6.42334 11.896C6.4086 11.9056 6.38747 11.9281 6.37061 11.981C6.35372 12.0341 6.34351 12.1099 6.34351 12.2117C6.34581 12.2878 6.36799 12.3546 6.40869 12.4153C6.45761 12.4821 6.52298 12.549 6.60718 12.6138L6.73608 12.7053C6.78632 12.7386 6.84449 12.7751 6.9104 12.8145C7.04454 12.8945 7.16167 12.9644 7.2605 13.0232L7.44507 13.1426C7.50565 13.1844 7.56597 13.2284 7.62524 13.2744C7.74715 13.3666 7.8562 13.4715 7.95337 13.5886C8.05276 13.7085 8.13297 13.8432 8.1936 13.9922C8.25599 14.1456 8.28891 14.3172 8.29395 14.5049V14.5364C8.29395 14.7339 8.26896 14.9141 8.21777 15.0754V15.0776C8.11696 15.3776 7.94914 15.6082 7.7124 15.761L7.71313 15.7617C7.62701 15.8179 7.53944 15.8644 7.45166 15.9016L7.36304 15.936C7.30225 15.9571 7.24075 15.9753 7.1792 15.9902L6.99243 16.0261C6.87331 16.0431 6.75886 16.0529 6.65039 16.0554H6.61304C6.41017 16.0554 6.22414 16.0345 6.05786 15.9917C5.89914 15.9495 5.75823 15.8922 5.63892 15.8196L5.63745 15.8188C5.52025 15.7449 5.42093 15.6589 5.34155 15.561C5.26338 15.4674 5.20001 15.3681 5.15332 15.2644C5.10802 15.1659 5.07431 15.0659 5.05371 14.9656C5.03361 14.8676 5.02297 14.7738 5.02295 14.6851C5.02295 14.5014 5.0798 14.3447 5.20898 14.2375L5.20972 14.2368L5.30493 14.1731C5.40409 14.1186 5.51594 14.0918 5.63745 14.0918C5.79553 14.0919 5.94175 14.1407 6.07251 14.2354L6.12451 14.2764C6.2216 14.3622 6.27861 14.4745 6.2959 14.6067L6.30103 14.6741L6.31055 14.7847C6.32502 14.8796 6.35383 14.9312 6.38306 14.9568C6.43071 14.9963 6.50789 15.0238 6.63135 15.0242C6.76743 15.0198 6.85874 14.9863 6.91772 14.9355L6.91846 14.9341L6.95361 14.8938C6.98575 14.8434 7.00924 14.7604 7.00928 14.6287C7.00928 14.4903 6.96843 14.3706 6.8877 14.2661L6.88696 14.2646C6.80068 14.1504 6.68858 14.0439 6.55078 13.946L6.55005 13.9453C6.40626 13.841 6.25592 13.7396 6.10034 13.6421C5.93262 13.5343 5.77326 13.4207 5.62427 13.303L5.62354 13.3022C5.46846 13.1772 5.34021 13.0351 5.24121 12.8752C5.13746 12.7076 5.0852 12.514 5.08008 12.2988V12.2388L5.0874 12.0505C5.10126 11.869 5.13388 11.7086 5.18628 11.5708V11.5693L5.2478 11.4382C5.31532 11.3136 5.40255 11.2077 5.51074 11.1233L5.62207 11.0464C5.73813 10.9764 5.87099 10.9263 6.01831 10.894C6.21201 10.8494 6.43196 10.8267 6.67603 10.8267H6.76831Z",fill:"currentColor"}),M.createElement("path",{d:"M14.2266 10.8062C14.3565 10.8062 14.4736 10.8329 14.5693 10.8933L14.5701 10.8926L14.5715 10.894L14.5737 10.8948L14.573 10.8955C14.6342 10.9321 14.6895 10.9722 14.7363 11.0171L14.781 11.064L14.7825 11.0662L14.8235 11.1204C14.8363 11.1392 14.8492 11.159 14.8608 11.1797L14.9246 11.3159L14.9253 11.3181L15.9163 14.0024V11.4705C15.9163 11.2922 15.9461 11.1369 16.0159 11.0149L16.054 10.9607C16.1527 10.8467 16.3175 10.8062 16.5022 10.8062C16.7284 10.8062 16.9271 10.8532 17.0229 11.0017C17.1032 11.1237 17.1379 11.2847 17.1379 11.4705V15.0535C17.1379 15.21 17.1275 15.3541 17.1079 15.4849L17.1086 15.4856C17.0896 15.6273 17.0355 15.7491 16.9409 15.8408C16.837 15.9414 16.6806 15.9784 16.5022 15.9785H16.0356C15.8837 15.9785 15.7483 15.9422 15.6394 15.8606C15.5419 15.7874 15.4638 15.6974 15.4065 15.5911C15.3549 15.4953 15.3125 15.4018 15.2798 15.3113L14.3459 12.7815V15.3149C14.3459 15.4932 14.316 15.6489 14.2471 15.7727L14.2463 15.7734C14.158 15.9281 13.9711 15.9784 13.76 15.9785C13.53 15.9785 13.3292 15.9315 13.2312 15.783C13.151 15.6609 13.1169 15.5006 13.1169 15.3149V11.7319C13.117 11.575 13.126 11.4319 13.1433 11.3035V11.3013L13.166 11.1987C13.1955 11.1009 13.2454 11.0157 13.3176 10.9475L13.3594 10.9124C13.4627 10.8363 13.6027 10.8062 13.76 10.8062H14.2266Z",fill:"currentColor"}),M.createElement("path",{d:"M3.62183 10.73C3.8058 10.73 3.96571 10.7696 4.07959 10.8677C4.185 10.9586 4.25306 11.0796 4.28613 11.2229C4.31675 11.3557 4.33154 11.5018 4.33154 11.6602V14.3606C4.33154 14.617 4.29481 14.8413 4.21655 15.0293C4.15993 15.1652 4.09098 15.286 4.00928 15.3896L3.92285 15.4878C3.80762 15.6056 3.67869 15.6971 3.5376 15.7625L3.53833 15.7632C3.40115 15.8269 3.27011 15.872 3.14722 15.8979L3.14795 15.8987C3.09669 15.9112 3.04501 15.9213 2.99414 15.9294L2.8418 15.9478C2.74998 15.9548 2.68156 15.9587 2.64111 15.9587C2.3706 15.9587 2.13396 15.928 1.93506 15.8643C1.73937 15.8022 1.56914 15.7204 1.42749 15.6174C1.28776 15.5158 1.17335 15.3984 1.08691 15.2651L1.02686 15.1685C0.970789 15.0715 0.926873 14.9732 0.895752 14.874L0.896484 14.8733C0.852315 14.745 0.821564 14.6203 0.806396 14.499L0.805664 14.4968C0.793555 14.3806 0.786621 14.2779 0.786621 14.1899C0.786659 14.0481 0.829716 13.9196 0.914062 13.8091C0.968035 13.7386 1.04873 13.6949 1.13965 13.6685C1.231 13.642 1.34202 13.6297 1.46851 13.6296C1.55651 13.6297 1.65224 13.6393 1.75415 13.6567C1.8653 13.6758 1.96539 13.7157 2.05151 13.7783C2.15785 13.853 2.20677 13.9666 2.20679 14.0977C2.20679 14.3421 2.24112 14.5246 2.302 14.6528L2.32178 14.6865C2.37332 14.7613 2.46833 14.8095 2.64111 14.8096C2.74386 14.8095 2.80532 14.7883 2.8396 14.762L2.84106 14.7605L2.90552 14.7019C2.92253 14.6822 2.9356 14.6623 2.94507 14.6426L2.97803 14.5518C2.98565 14.5209 2.98953 14.4889 2.99048 14.4565V11.9641H2.17236C2.0293 11.9641 1.8922 11.9536 1.76221 11.9312L1.76001 11.9304C1.62252 11.9035 1.50268 11.8482 1.40698 11.7612L1.40625 11.7598C1.30008 11.6602 1.25688 11.5177 1.25684 11.3547C1.25684 11.1882 1.29936 11.0419 1.40625 10.9417C1.49986 10.8517 1.6187 10.7951 1.75635 10.7681L1.9585 10.7395C2.02775 10.7333 2.09935 10.73 2.17236 10.73H3.62183Z",fill:"currentColor"}),M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0061 10.8398C11.1058 10.8474 11.2146 10.8676 11.3313 10.8984L11.332 10.8977C11.4562 10.9275 11.5817 10.9747 11.7078 11.0376L11.803 11.0896C11.8653 11.1277 11.926 11.1727 11.9839 11.2244L12.0688 11.3071L12.0696 11.3079L12.1472 11.4001C12.2197 11.4965 12.2807 11.608 12.3303 11.7327L12.3772 11.8674C12.417 12.0081 12.4358 12.1667 12.4358 12.3406V14.4111C12.4358 14.649 12.4035 14.8579 12.3347 15.0337L12.334 15.0352C12.2654 15.204 12.1782 15.349 12.071 15.4666C11.9653 15.5823 11.8439 15.6747 11.7085 15.7412L11.7078 15.7405C11.5864 15.8034 11.4622 15.8534 11.335 15.8877C11.2172 15.9189 11.1066 15.9387 11.0061 15.9463C10.9136 15.9532 10.8413 15.9573 10.793 15.9573H10.675L10.4626 15.9463C10.362 15.9387 10.2518 15.919 10.1338 15.8877C10.0122 15.8554 9.8873 15.8055 9.75952 15.7405C9.62706 15.6742 9.50578 15.5832 9.39624 15.4688L9.39551 15.468C9.28579 15.3506 9.19561 15.2056 9.12451 15.0366L9.12378 15.0352C9.05226 14.8589 9.01835 14.6495 9.01831 14.4111V12.3406C9.01831 12.105 9.05259 11.8998 9.12451 11.7297C9.19368 11.5618 9.28389 11.4184 9.39697 11.3027C9.50677 11.1905 9.62826 11.1014 9.76099 11.0376C9.82393 11.0062 9.88688 10.9792 9.94849 10.957L9.94922 10.9563L10.1323 10.8992L10.1345 10.8984L10.3066 10.8604C10.3612 10.8506 10.4136 10.8436 10.4626 10.8398L10.675 10.8289H10.793C10.8413 10.8289 10.9136 10.8329 11.0061 10.8398ZM10.738 11.9473C10.6399 11.9473 10.5796 11.9688 10.5439 11.9963L10.5432 11.9971C10.4934 12.0354 10.4596 12.0746 10.4385 12.1135L10.4377 12.1143C10.4103 12.1641 10.3949 12.222 10.3931 12.2886V14.5393L10.4062 14.6309L10.4385 14.7151L10.4392 14.7158L10.481 14.7766C10.4976 14.7958 10.5181 14.8147 10.5417 14.833L10.5732 14.8521C10.6101 14.8689 10.6637 14.8806 10.738 14.8806C10.8345 14.8805 10.8925 14.8598 10.9255 14.8345C10.9743 14.7969 11.0075 14.7565 11.0288 14.7158C11.054 14.6605 11.0699 14.5993 11.0757 14.5327V12.2944L11.0588 12.197C11.051 12.167 11.0406 12.138 11.0281 12.1106C11.0069 12.0728 10.9738 12.0343 10.9255 11.9971L10.9233 11.9949C10.8905 11.9684 10.8335 11.9474 10.738 11.9473Z",fill:"currentColor"}),M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V9C15 9.41421 14.6642 9.75 14.25 9.75C13.8358 9.75 13.5 9.41421 13.5 9V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),pa=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"}),M.createElement("path",{d:"M2.39355 10.5C2.53545 10.5 2.6592 10.5122 2.75757 10.5417C2.88987 10.5815 2.99161 10.6954 3.07251 10.8289L3.15747 10.9885L3.25195 11.2031L3.25269 11.2046L3.35229 11.4683C3.38786 11.5664 3.42601 11.6752 3.46655 11.7942L3.76318 12.6665L3.76392 12.6687L3.76904 12.6848L3.79907 12.5911L3.94849 12.1348C3.99515 11.9948 4.03674 11.8689 4.073 11.7576L4.07373 11.7561L4.1814 11.4434C4.21489 11.3495 4.24596 11.265 4.27515 11.1907L4.36084 10.9849C4.38855 10.9239 4.41584 10.8705 4.44214 10.8252C4.51581 10.6953 4.61188 10.5823 4.74243 10.5417H4.7439L4.82153 10.5227C4.90321 10.5069 4.99686 10.5 5.09985 10.5H5.67041C5.87137 10.5 6.05265 10.5425 6.17505 10.6619L6.17944 10.6655C6.29073 10.7714 6.35329 10.9108 6.375 11.072C6.39695 11.2133 6.40721 11.3701 6.40723 11.5415V15.5149C6.4072 15.7232 6.3696 15.9065 6.27686 16.0474C6.16065 16.2235 5.92578 16.2751 5.67041 16.2751C5.43573 16.2751 5.21924 16.2184 5.11157 16.0378L5.10938 16.0342C5.03005 15.8921 4.9966 15.7149 4.99658 15.5149V12.8335L4.4436 14.4456L4.44141 14.4521C4.39239 14.576 4.32667 14.6919 4.24658 14.8008L4.24731 14.8015C4.14341 14.9438 3.9882 15.008 3.80933 15.0081H3.73096C3.55351 15.008 3.40015 14.9437 3.29004 14.8081L3.28857 14.8066C3.20076 14.6954 3.13356 14.575 3.08862 14.4463L2.53564 12.8496V15.5149C2.53562 15.7149 2.50218 15.8921 2.42285 16.0342L2.42212 16.0356C2.31692 16.2193 2.09741 16.2751 1.86182 16.2751C1.60639 16.2751 1.37154 16.2236 1.25537 16.0474C1.16263 15.9065 1.12502 15.7232 1.125 15.5149V11.5415C1.12501 11.3697 1.13426 11.2129 1.15356 11.072L1.1543 11.0691L1.17993 10.9526C1.21308 10.8409 1.26884 10.7425 1.35059 10.6633L1.39966 10.6223C1.52082 10.5332 1.68333 10.5 1.86182 10.5H2.39355Z",fill:"currentColor"}),M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.1106 10.5C9.62746 10.5 10.0624 10.6251 10.4026 10.8875L10.5256 10.9944C10.6405 11.1071 10.7342 11.238 10.8062 11.3862C10.9039 11.5876 10.9497 11.8187 10.9497 12.074V14.4983C10.9497 14.7119 10.927 14.9051 10.8779 15.0754C10.8306 15.2398 10.7676 15.3875 10.689 15.5156L10.6875 15.5186C10.6079 15.6408 10.5165 15.7481 10.4143 15.8386C10.3155 15.9261 10.2132 15.9989 10.1074 16.0547L10.1067 16.054C9.86566 16.1854 9.58987 16.2585 9.28271 16.2751H7.97681C7.77408 16.2751 7.59145 16.2335 7.46704 16.1169C7.35471 16.0115 7.2898 15.8714 7.26489 15.7097C7.24266 15.5651 7.23194 15.4033 7.23193 15.2256V11.5415C7.23195 11.3663 7.2426 11.2069 7.26489 11.0647C7.28985 10.9032 7.35482 10.7635 7.46704 10.6582C7.59145 10.5416 7.77403 10.5 7.97681 10.5H9.1106ZM8.72095 15.0447H9.07544C9.15931 15.0426 9.23737 15.0225 9.31055 14.9839L9.31348 14.9817L9.35815 14.9553C9.40066 14.926 9.43743 14.8876 9.46802 14.8381L9.46875 14.8367L9.49438 14.7861C9.51748 14.7305 9.53172 14.6593 9.53174 14.5686V12.2615C9.53174 12.1256 9.50631 12.0248 9.46509 11.9517L9.46362 11.9495C9.42061 11.8696 9.36785 11.8162 9.30762 11.7825C9.25706 11.7542 9.19978 11.7342 9.1355 11.7231L9.06885 11.7151H8.72095V15.0447Z",fill:"currentColor"})),ha=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.6416 10.3784C3.95675 10.4068 4.24355 10.4808 4.49927 10.6033L4.68896 10.7058C4.75102 10.7437 4.81209 10.7853 4.87207 10.8303C4.99897 10.9227 5.10899 11.0375 5.20459 11.1724C5.30765 11.311 5.38613 11.4733 5.44116 11.6558L5.47998 11.8008C5.51306 11.9504 5.52903 12.1125 5.52905 12.2856C5.52905 12.6011 5.47828 12.8867 5.37305 13.1382L5.37378 13.1389C5.28434 13.3557 5.15787 13.5441 4.99512 13.7014L4.92334 13.7666C4.52343 14.1103 3.97203 14.269 3.2959 14.269H2.95166V15.4292C2.95165 15.614 2.93964 15.7845 2.91577 15.9397C2.8883 16.1182 2.81511 16.2739 2.68652 16.3909L2.68579 16.3901C2.54556 16.5202 2.34254 16.5645 2.12329 16.5645C1.90696 16.5644 1.70685 16.5194 1.56738 16.3887L1.56519 16.3865C1.44288 16.2679 1.37145 16.1152 1.34399 15.9404L1.34326 15.936C1.32257 15.7822 1.31251 15.613 1.3125 15.4292V11.5042C1.31251 11.3204 1.3225 11.1524 1.34326 11.001L1.34399 10.9973L1.37256 10.8691C1.40991 10.7455 1.47366 10.6362 1.56738 10.5483C1.70673 10.4148 1.90677 10.3689 2.12329 10.3689H3.50464L3.6416 10.3784ZM2.95166 12.9053H3.31787C3.43267 12.8984 3.53116 12.8714 3.61597 12.8269C3.69435 12.7857 3.75967 12.7244 3.81226 12.6387L3.84448 12.5728C3.8728 12.5 3.88989 12.4058 3.88989 12.2856C3.88984 12.1374 3.85971 12.0411 3.81812 11.9795L3.81519 11.9744C3.76419 11.8937 3.70357 11.8366 3.63428 11.7979C3.56584 11.7635 3.47692 11.7377 3.36328 11.7253H2.95166V12.9053Z",fill:"currentColor"}),M.createElement("path",{d:"M9.85181 10.3689C9.96017 10.369 10.0701 10.3945 10.1792 10.4392L10.2876 10.4897L10.2935 10.4927L10.2993 10.4963C10.4209 10.5712 10.5226 10.6619 10.5879 10.7725C10.6503 10.8716 10.6882 10.9809 10.6882 11.0969C10.6882 11.1892 10.6526 11.2993 10.6077 11.4089L10.6069 11.4082C10.5828 11.4685 10.5524 11.5379 10.5154 11.6147C10.4774 11.6937 10.4326 11.7792 10.3813 11.8704L9.1582 14.0391V15.4373C9.1582 15.6164 9.14303 15.7853 9.11279 15.9426C9.07918 16.1138 9.00547 16.2635 8.88647 16.3799L8.88721 16.3806C8.75142 16.5164 8.5562 16.5644 8.34668 16.5645C8.13595 16.5644 7.94219 16.5154 7.80249 16.3843L7.80103 16.3828C7.68055 16.2661 7.60635 16.1157 7.57251 15.9434C7.54226 15.786 7.52783 15.6164 7.52783 15.4373V14.0398L6.12085 11.5283L6.11938 11.5261C6.0459 11.3891 6.00587 11.2453 6.00586 11.0969C6.00589 10.986 6.03681 10.8798 6.09155 10.7812L6.09302 10.7791L6.15015 10.6963C6.21492 10.6176 6.30071 10.5509 6.39771 10.4941L6.4043 10.4905L6.5127 10.4392C6.6213 10.3943 6.73162 10.369 6.84155 10.3689C7.06446 10.369 7.25232 10.4649 7.39307 10.6399L7.48096 10.752C7.5635 10.8656 7.6337 10.9873 7.69263 11.116L8.34668 12.4878L9.00073 11.116C9.07902 10.945 9.177 10.7867 9.29443 10.6421L9.29517 10.6414L9.35083 10.5791C9.48615 10.443 9.65571 10.3689 9.85181 10.3689Z",fill:"currentColor"}),M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),U=(e,t)=>o.jsx(e,{size:t.size??le.size,stroke:t.stroke??le.stroke,className:t.className}),je=(e,t)=>o.jsx(e,{width:Number(t.size??le.size),height:Number(t.size??le.size),className:t.className}),br={".bmp":e=>U(k.IconFileTypeBmp,e),".cpp":e=>je(la,e),".c":e=>je(ca,e),".cs":e=>je(da,e),".css":e=>U(k.IconFileTypeCss,e),".csv":e=>U(k.IconFileTypeCsv,e),".doc":e=>U(k.IconFileTypeDoc,e),".docx":e=>U(k.IconFileTypeDocx,e),".html":e=>U(k.IconFileTypeHtml,e),".ini":e=>je(ua,e),".jpg":e=>U(k.IconFileTypeJpg,e),".js":e=>U(k.IconFileTypeJs,e),".json":e=>je(fa,e),".jsx":e=>U(k.IconFileTypeJsx,e),".md":e=>je(pa,e),".pdf":e=>U(k.IconFileTypePdf,e),".php":e=>U(k.IconFileTypePhp,e),".png":e=>U(k.IconFileTypePng,e),".ppt":e=>U(k.IconFileTypePpt,e),".py":e=>je(ha,e),".rs":e=>U(k.IconFileTypeRs,e),".sql":e=>U(k.IconFileTypeSql,e),".svg":e=>U(k.IconFileTypeSvg,e),".ts":e=>U(k.IconFileTypeTs,e),".tsx":e=>U(k.IconFileTypeTsx,e),".txt":e=>U(k.IconFileTypeTxt,e),".vue":e=>U(k.IconFileTypeVue,e),".xls":e=>U(k.IconFileTypeXls,e),".xml":e=>U(k.IconFileTypeXml,e),".zip":e=>U(k.IconFileTypeZip,e),default:e=>U(k.IconFile,e)},an=({extension:e,size:t=le.size,stroke:r=le.stroke,cssClass:n,decorative:s=!1,label:i,indicator:a})=>{const l=(()=>{const p=e.trim().toLowerCase();return p.startsWith(".")?p:`.${p}`})(),u=(br[l]??br.default)({size:t,stroke:r}),f=i??`${l.slice(1).toUpperCase()} file icon`;return o.jsxs("span",{className:D("inline-flex relative",n),...s?{"aria-hidden":!0}:{role:"img","aria-label":f},children:[o.jsx(q,{icon:u,className:"inline-block align-middle"}),a&&o.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:a})]})},Kt=({label:e="Shared entity",size:t=10,cssClass:r,stroke:n=2})=>o.jsx(q,{className:_("text-accent-primary",r),label:"Shared entity indicator",icon:o.jsx(k.IconArrowUpRight,{size:t,stroke:n,"aria-label":e,className:"bg-layer-3",role:"img"})}),ga=({name:e,cssClass:t,shared:r=!1})=>{const n=e.includes(".")?e.split(".").pop():null;return o.jsxs("div",{className:_("flex items-center gap-2 w-full",t),children:[n&&o.jsx(an,{extension:n,cssClass:"text-secondary",indicator:r?o.jsx(Kt,{}):null,label:"File type icon"}),o.jsx(Ce,{cssClass:"text-primary dial-small flex-1 min-w-0",text:e})]})},ma=({name:e,cssClass:t,shared:r=!1,loading:n=!1})=>{const s=()=>n?o.jsx(ct,{}):o.jsx(q,{icon:o.jsx(k.IconFolder,{...le}),className:"inline-block align-middle"});return o.jsxs("div",{className:_("flex items-center gap-2 w-full",t),children:[o.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[s(),r&&o.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:o.jsx(Kt,{})})]}),o.jsx(Ce,{cssClass:"text-primary dial-small flex-1 min-w-0",text:e})]})},Ca="en-US",xa={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},ba="text-primary";function ln(e){if(!e)return null;if(e instanceof Date)return isFinite(e.getTime())?e:null;if(typeof e=="number"){const t=new Date(e);return isFinite(t.getTime())?t:null}if(typeof e=="string"){const t=e.trim();if(/^-?\d+$/.test(t)){const n=Number(t);return ln(n)}const r=new Date(t);return isFinite(r.getTime())?r:null}return null}const va=({value:e,locale:t=Ca,options:r=xa,emptyPlaceholder:n="—",cssClass:s})=>{const i=ln(e),a=c.useMemo(()=>i?new Intl.DateTimeFormat(t,r).format(i):n,[i,n,t,r]),l=i?i.toISOString():void 0;return o.jsx(Ce,{text:l?o.jsx("time",{dateTime:l,children:a}):o.jsx("span",{children:a}),cssClass:D(ba,s),hideTooltip:!1})};var ot=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(ot||{}),zt=(e=>(e.Mobile="mobile",e.Tablet="tablet",e))(zt||{}),cn=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(cn||{}),De=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(De||{}),Jt=(e=>(e.Item="item",e.Divider="divider",e))(Jt||{});const ya=D("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),wa=D("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none","w-max"),Da=D("flex w-full cursor-pointer items-center gap-3","focus-visible:border-none focus-visible:outline-none","hover:bg-accent-primary-alpha px-3","dial-small h-[34px] rounded text-primary"),Sa="opacity-75 !cursor-not-allowed",Ia="text-error",Ta="my-1 border-t border-hover border-secondary",Ue=8,Qt=({ariaLabel:e,cssClass:t,size:r=24,onClose:n})=>o.jsx(re,{ariaLabel:e,cssClass:_("text-secondary hover:text-accent-primary",t),onClick:n,iconBefore:o.jsx(k.IconX,{size:r})}),Ve=({children:e,menu:t,renderOverlay:r,trigger:n=[De.Click],placement:s,disabled:i=!1,open:a,defaultOpen:l=!1,onOpenChange:d,closable:u=!1,onClose:f,cssClass:p,listClassName:C,outsidePressIgnoreRef:g,outsideClosable:m=!0,allowedPlacements:h,anchorToMouse:y=!1,matchReferenceWidth:b=!0})=>{const[v,x]=c.useState(l),j=a!==void 0,N=j?!!a:v,T=c.useRef(null),R=c.useCallback(O=>{j||x(O),d?.(O)},[j,d]),I=c.useId(),z=s===void 0,Q=O=>"clientWidth"in O?O.clientWidth:O.getBoundingClientRect?.()?.width??0,{refs:P,floatingStyles:G,context:B}=A.useFloating({placement:s,open:N,onOpenChange:R,whileElementsMounted:A.autoUpdate,middleware:[A.offset({mainAxis:Ue,crossAxis:0}),z?A.autoPlacement({alignment:"start",crossAxis:!0,padding:Ue,allowedPlacements:h}):A.flip({padding:Ue}),A.shift({padding:Ue}),A.size({padding:Ue,apply({availableWidth:O,availableHeight:H,elements:ce}){const Y=ce.floating,Z=Q(ce.reference);Y.style.setProperty("--fui-available-height",`${Math.floor(H)}px`),Y.style.setProperty("--reference-width",b?`${Math.round(Z)}px`:"0px"),b?Y.style.minWidth=`${Math.round(Z)}px`:Y.style.removeProperty("min-width"),Y.style.maxWidth=`${Math.floor(O)}px`,Y.style.maxHeight=`${Math.floor(H)}px`}})]}),ee=A.useClick(B,{enabled:n.includes(De.Click)&&!i}),oe=A.useHover(B,{enabled:n.includes(De.Hover)&&!i,move:!1,restMs:40,delay:{open:80,close:80}}),ie=A.useDismiss(B,{bubbles:!0,referencePress:!1,outsidePress:O=>{if(!m)return!1;const H=O.target;return!(g?.current&&H instanceof Node&&g.current.contains(H))}}),X=A.useRole(B,{role:"menu"}),{getReferenceProps:S,getFloatingProps:he}=A.useInteractions([ee,oe,ie,X]),ne=c.useCallback((O,H)=>{P.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:O,y:H,top:H,left:O,right:O,bottom:H})})},[P]),xe=c.useCallback(O=>{!n.includes(De.ContextMenu)||i||(O.preventDefault(),y&&(ne(O.clientX,O.clientY),T.current=document.elementFromPoint(O.clientX,O.clientY)),R(!0))},[y,i,R,ne,n]),me=c.useCallback(O=>{!y||i||(ne(O.clientX,O.clientY),T.current=document.elementFromPoint(O.clientX,O.clientY))},[y,i,ne]);c.useEffect(()=>{i&&N&&R(!1)},[i,N,R]);const $=c.useCallback(O=>H=>{O.disabled||(O.onClick?.({key:O.key,domEvent:H}),t?.onClick?.({key:O.key,domEvent:H}),R(!1))},[t,R]),J=c.useMemo(()=>r?r():t?o.jsxs(o.Fragment,{children:[t.header&&o.jsx(o.Fragment,{children:typeof t.header=="function"?t.header():t.header}),o.jsx("div",{role:"none",className:"py-1",children:t.items.map(O=>O.type===Jt.Divider?o.jsx("div",{role:"separator",className:Ta},O.key):o.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!O.disabled,className:D(Da,O.disabled&&Sa,O.danger&&Ia),disabled:O.disabled,onClick:$(O),children:[O.icon&&o.jsx("span",{className:D(O.danger&&"text-error",O.disabled&&"text-secondary"),children:o.jsx(q,{icon:O.icon})}),o.jsx("span",{className:D("flex-1 truncate text-left",O.danger&&"text-error",O.disabled&&"text-secondary"),children:O.label})]},O.key))}),t.footer&&o.jsx(o.Fragment,{children:typeof t.footer=="function"?t.footer():t.footer})]}):null,[$,t,r]),ue=S({onContextMenu:xe,onMouseDown:me});return c.useEffect(()=>{if(!N)return;const O=P.reference.current;let H=null;if(O instanceof Element?H=O:T.current instanceof Element&&(H=T.current),!H)return;const ce=new IntersectionObserver(([Y])=>{Y.isIntersecting||R(!1)},{root:null,threshold:0});return ce.observe(H),()=>ce.disconnect()},[N,P.reference,R]),o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:P.setReference,className:D(ya,i&&"!cursor-not-allowed opacity-75",p),"aria-haspopup":"menu","aria-expanded":N,"aria-controls":I,...ue,children:e}),N&&o.jsx(A.FloatingPortal,{children:o.jsx(A.FloatingFocusManager,{context:B,modal:!1,initialFocus:-1,returnFocus:!0,children:o.jsxs("div",{id:I,ref:P.setFloating,style:G,className:D(wa,!b&&"w-max",C),...he(),children:[u&&o.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:o.jsx(Qt,{ariaLabel:"Close dropdown",onClose:O=>{f?.(O),R(!1)}})}),J]})})})]})},tt=({tab:e,active:t,invalid:r,cssClass:n,horizontal:s,onClick:i})=>{const a=_("rounded h-[32px] items-center flex flex-row border-transparent cursor-pointer dial-small leading-4 hover:text-accent-primary",{"border-b-2 px-4":s,"border-l-2 px-3":!s}),l=_(a,{"bg-layer-4":s,"bg-layer-1 text-secondary pointer-events-none":e.disabled,"bg-accent-primary-alpha text-primary":t&&!e.disabled,"text-primary":!t&&!e.disabled,"border-b-accent-primary":t&&s&&!e.disabled,"border-l-accent-primary":t&&!s&&!e.disabled},n);return o.jsxs("button",{role:"tab",className:l,onClick:()=>i(e.id),disabled:e.disabled,children:[o.jsx(Ce,{text:e.name,contentClassName:"max-w-[200px]",cssClass:"max-w-[200px]"}),(r||e.invalid)&&o.jsx("div",{className:"text-error pl-1",children:o.jsx(k.IconExclamationCircle,{...le})})]})},vr=12;var Oe=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(Oe||{});const yr=()=>{if(typeof window>"u")return Oe.Undefined;const e=window.innerWidth;return e>=1024?Oe.Desktop:e<640?Oe.Mobile:Oe.Tablet},La=()=>{const[e,t]=c.useState(yr());return c.useEffect(()=>{const r=()=>t(yr());return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),e},Ea=({tabs:e,activeTab:t,onClick:r,orientation:n=ot.Horizontal,smallScreenThreshold:s=zt.Tablet,smallScreenContainerCssClass:i,smallScreenDropdownItemCssClass:a})=>{const[l,d]=c.useState(!1),[u,f]=c.useState(!1),[p,C]=c.useState(!1),g=La(),m=g===Oe.Mobile||s===zt.Tablet&&g===Oe.Tablet,h=n===ot.Horizontal,y=c.useRef(null),b=c.useRef(null),v=c.useRef(null),x=e.find(T=>T.id===t),j=c.useMemo(()=>D("flex gap-3",h?"flex-row flex-nowrap overflow-x-auto":"flex-col flex-wrap w-full"),[h]),N=c.useCallback(()=>{const T=b.current;T&&C(T.scrollWidth>T.clientWidth)},[]);return c.useEffect(()=>{N();const T=new ResizeObserver(()=>N()),R=b.current;return R&&T.observe(R),()=>T.disconnect()},[e,N]),c.useEffect(()=>{const T=v.current,R=b.current;if(!T||!R)return;const I=T.offsetLeft,z=I+T.offsetWidth,Q=R.scrollLeft,P=Q+R.clientWidth;I<Q?R.scrollTo({left:I-vr,behavior:"smooth"}):z>P&&R.scrollTo({left:z-R.clientWidth+vr,behavior:"smooth"})},[t]),m?o.jsx("div",{className:_("h-11 flex items-center bg-layer-3 px-4",i),children:o.jsx(Ve,{trigger:[De.Click],open:l,onOpenChange:d,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>e.map(T=>o.jsx(tt,{tab:T,active:T.id===t,onClick:R=>{r(R),d(!1)},cssClass:_("w-full rounded-none h-11 items-center px-6",a)},T.id)),children:o.jsxs("div",{className:"flex gap-2 items-center h-11 cursor-pointer",children:[o.jsx(tt,{tab:x,active:!0,onClick:r,cssClass:"rounded-none bg-transparent border-l-0 border-b-0 h-full items-center px-0"},t),o.jsx(q,{icon:o.jsx(k.IconChevronDown,{size:16}),className:D("text-primary transition-transform",l&&"rotate-180")})]})})}):o.jsxs("div",{ref:y,className:"flex w-full items-start",children:[o.jsx("div",{ref:b,className:j,children:e.map(T=>o.jsx("div",{ref:t===T.id?v:void 0,className:"w-full",children:o.jsx(tt,{tab:T,active:t===T.id,onClick:r,horizontal:h,cssClass:"w-full"})},T.id))}),p&&o.jsx("div",{className:"flex items-center ml-2",children:o.jsx(Ve,{trigger:[De.Click],open:u,onOpenChange:f,placement:"bottom-end",renderOverlay:()=>e.map(T=>o.jsx(tt,{tab:T,active:T.id===t,onClick:R=>{r(R),f(!1)},cssClass:"w-full rounded-none h-[32px] items-center px-3 py-2"},T.id)),children:o.jsx(re,{iconBefore:o.jsx(k.IconDotsVertical,{size:18}),cssClass:D("w-8 h-8 flex items-center justify-center rounded border",u?"bg-layer-4 border-transparent":"border-primary")})})})]})},ja="w-full overflow-hidden",ka="flex flex-nowrap items-center gap-2 min-w-0 px-0 py-0 whitespace-nowrap",dn="flex items-center gap-2 min-w-0 shrink-0 dial-small",Oa="max-w-[20%] basis-[20%] flex-none",Na="flex-1 min-w-0",wr="inline-flex items-center gap-1 min-w-0 transition-colors",Ra="text-secondary hover:text-accent-primary",Pa="text-primary cursor-default",un="flex-none inline-flex items-center leading-none text-icon-secondary",Ma="items-center gap-1 min-w-0 transition-colors text-secondary hover:text-accent-primary",fn=o.jsx(k.IconChevronRight,{size:16,"aria-hidden":"true"}),qe=({title:e,href:t,onClick:r,disabled:n,isLast:s,separator:i=fn,cssClass:a,iconBefore:l,titleCssClass:d})=>{const u=_(dn,s?Na:Oa,a),f=(!!t||!!r)&&!s&&!n,p=f?_(wr,Ra):_(wr,Pa,n?"pointer-events-none opacity-75":""),C=typeof e=="string"?o.jsx(Ce,{cssClass:d,text:e}):o.jsx("span",{className:_("flex-1 min-w-0 max-w-full truncate",d),children:e});return o.jsxs("li",{className:u,children:[f?o.jsxs("a",{href:t,onClick:r,className:p,children:[l,C]}):o.jsxs("span",{className:p,"aria-current":s?"page":void 0,"aria-disabled":n?"true":void 0,children:[l,C]}),!s&&o.jsx("span",{className:un,children:i})]})},Fa=({pathItems:e,separator:t=fn,ariaLabel:r="Breadcrumb",cssClass:n,children:s,titleCssClass:i})=>{const a=c.useMemo(()=>e?.length?e:c.Children.toArray(s).filter(c.isValidElement).map(u=>{const f=u.props;return{title:f.title,href:f.href,onClick:f.onClick,disabled:f.disabled,iconBefore:f.iconBefore,cssClass:f.cssClass}}),[e,s]),l=c.useCallback(u=>{const f=parseInt(u.key,10),p=a[f];p.onClick?p.onClick(u.domEvent):p.href&&(window.location.href=p.href)},[a]),d=c.useMemo(()=>{if(a.length===0)return null;if(a.length<=3)return a.map((m,h)=>c.createElement(qe,{...m,key:`item-${h}`,isLast:h===a.length-1,separator:t,titleCssClass:i}));const u=a.at(0),f=a.slice(1,-2),p=a.at(-2),C=a.at(-1);if(!u||!p||!C)return null;const g=f.map((m,h)=>({key:String(h+1),label:typeof m.title=="string"?m.title:`Item ${h+1}`,disabled:m.disabled}));return o.jsxs(o.Fragment,{children:[c.createElement(qe,{...u,key:"item-0",separator:t,titleCssClass:i}),o.jsxs("li",{className:_(dn),children:[o.jsx(Ve,{menu:{items:g,onClick:l},placement:"bottom-start",matchReferenceWidth:!1,children:o.jsx("button",{type:"button","aria-label":"More breadcrumbs",className:Ma,children:o.jsx(k.IconDots,{size:16})})}),o.jsx("span",{className:un,children:t})]}),c.createElement(qe,{...p,key:`item-${a.length-2}`,separator:t,titleCssClass:i}),c.createElement(qe,{...C,key:`item-${a.length-1}`,isLast:!0,separator:t,titleCssClass:i})]})},[a,t,i,l]);return o.jsx("nav",{"aria-label":r,className:_(ja,n),children:o.jsx("ol",{className:ka,children:d})})},pn=({iconClass:e,...t})=>o.jsx(re,{iconBefore:o.jsx(k.IconTrashX,{...le,className:e||""}),...t}),hn=({value:e,textareaId:t,placeholder:r,cssClass:n="",containerCssClass:s="",disabled:i,invalid:a,readonly:l,disableTooltip:d,onChange:u})=>o.jsx(Ie,{tooltip:d?null:e,triggerClassName:_("flex",s),children:o.jsx("textarea",{id:t,placeholder:r,value:e||"",disabled:i,className:D("dial-textarea dial-input px-3 py-2",a?"dial-input-error":"",i&&"dial-input-disable",l&&"dial-input-readonly",n),onChange:f=>!l&&u?.(f.currentTarget.value)})}),Ha=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],Va=(e,t,r,n)=>{if((t==="number"||r!==void 0||n!==void 0)&&!Ha.includes(e.key)&&!(e.ctrlKey||e.metaKey)&&!(e.key==="-"&&(e.currentTarget.selectionStart??0)===0&&!e.currentTarget.value.includes("-"))&&!(e.key==="."&&t==="number"&&!e.currentTarget.value.includes("."))){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}if(r!==void 0||n!==void 0){const i=e.currentTarget.value,a=e.currentTarget.selectionStart||0,l=i.slice(0,a)+e.key+i.slice(a),d=parseFloat(l);if(!isNaN(d)){if(r!==void 0&&d<r){e.preventDefault();return}if(n!==void 0&&d>n){e.preventDefault();return}}}}},Ae=({iconBefore:e,iconAfter:t,hideBorder:r,value:n,elementId:s,placeholder:i="",cssClass:a="",containerCssClass:l,tooltipTriggerClassName:d,type:u="text",disabled:f,readonly:p,invalid:C,onChange:g,min:m,max:h,prefix:y,suffix:b,textBeforeInput:v,textAfterInput:x,onBlur:j,defaultValue:N,tooltipText:T,hideTooltip:R=!1,inputRef:I})=>{const z=B=>B.target.blur(),Q=u==="number"||m!==void 0||h!==void 0,P=B=>{Va(B,u,m,h)},G=B=>{const ee=B.currentTarget.value;if(Q&&ee!==""){const oe=parseFloat(ee);if(isNaN(oe)&&ee!=="-"&&ee!=="."||!isNaN(oe)&&(m!==void 0&&oe<m||h!==void 0&&oe>h))return}g?.(ee||void 0)};return o.jsxs("div",{className:D("dial-input-field flex flex-row items-center justify-between py-2",r?"dial-input-no-border":"dial-input",C&&"dial-input-error",f&&"dial-input-disable",p&&"dial-input-readonly",!v&&"pl-3",!x&&"pr-3",l),children:[v&&o.jsx("div",{className:"mr-2",children:o.jsx(Ae,{hideBorder:!0,containerCssClass:"rounded-r-none border-r-0",cssClass:"overflow-hidden overflow-ellipsis dial-small",value:v,disabled:!0,elementId:v+"textBefore"})}),y&&o.jsxs("p",{className:"text-secondary dial-small mr-2",children:[" ",y]}),o.jsx(q,{icon:e,className:D(!!e&&"mr-2")}),o.jsx(Ie,{tooltip:R?void 0:T||n,triggerClassName:D(d,"flex-1"),children:o.jsx("input",{ref:I,type:u,autoComplete:"off",id:s,placeholder:i,value:N?void 0:n??"",disabled:f,className:D("border-0 bg-transparent w-full truncate",a),onChange:B=>!p&&G?.(B),onKeyDown:P,onWheel:z,onBlur:j,min:m,max:h,defaultValue:N})}),o.jsx(q,{icon:t,className:D(!!t&&"ml-2")}),b&&o.jsxs("p",{className:"text-secondary dial-small ml-2",children:[" ",b]}),x&&o.jsx("div",{className:"ml-2",children:o.jsx(Ae,{hideBorder:!0,containerCssClass:"rounded-l-none border-l-0",value:x,disabled:!0,elementId:x+"textAfter"})})]})},Aa=/^0+\.(\d+)?$/,_a=/^0+/,gn=({label:e,optional:t,optionalText:r,description:n,error:s,captionDescription:i,readonly:a,orientation:l,elementId:d,fieldTitle:u,errorText:f,elementCssClass:p,elementContainerCssClass:C,containerCssClass:g,defaultEmptyText:m,...h})=>o.jsx(dt,{label:e??u,error:s??f,optionalText:r,optional:t,description:n,captionDescription:i,readonly:a,orientation:l,elementId:d,cssClass:g,defaultEmptyText:m,value:h.value,children:o.jsx(Ae,{elementId:d,cssClass:p,containerCssClass:C,invalid:f!=null,...h})}),za=({onChange:e,...t})=>{const r=n=>!n||n==="-"?n:String(n)?.match(Aa)?String(n)?.replace(_a,"0"):Number(n);return o.jsx(gn,{type:"number",onChange:n=>e?.(r(n)),...t})},Ba=({onChange:e,...t})=>o.jsx(gn,{type:"text",onChange:r=>e?.(r),...t}),$a=({fieldTitle:e,optional:t,elementId:r,elementCssClass:n,containerCssClass:s,elementContainerCssClass:i,errorText:a,...l})=>o.jsxs("div",{className:_("flex flex-col",s),children:[o.jsx(Pe,{fieldTitle:e,optional:t,htmlFor:r}),o.jsx(hn,{textareaId:r,cssClass:n,containerCssClass:i,...l}),o.jsx(Se,{errorText:a})]}),Ga=({title:e,switchId:t,isOn:r=!1,disabled:n,onChange:s})=>{const i=D("flex w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",r?"flex-row-reverse":"flex-row",n?"pointer-events-none":"",n?r?"bg-controls-disable":"bg-layer-4":r?"bg-accent-primary":"bg-layer-4"),a=c.useCallback(l=>{l.stopPropagation(),s?.(!r)},[s,r]);return o.jsxs("div",{className:"flex flex-row items-center",children:[o.jsx("input",{type:"checkbox",onChange:a,id:t,disabled:n,className:"invisible w-0 h-0",checked:r}),o.jsx("label",{htmlFor:t,className:i,children:o.jsx("span",{className:D("size-3 rounded-full",n?r?"bg-layer-4":"bg-controls-disable":"bg-controls-enable-primary")})}),e&&o.jsx("span",{className:"pl-2 dial-small text-primary",children:e})]})};var ve=(e=>(e.Sm="sm",e.Md="md",e.Lg="lg",e))(ve||{});const Ua="z-[52] flex items-center justify-center bg-blackout md:p-4",Wa="divide-tertiary divide-y",qa="flex flex-row justify-between py-4 px-6 items-center",Za={[ve.Sm]:"dial-sm-popup",[ve.Md]:"dial-md-popup",[ve.Lg]:"dial-lg-popup"},xt=({open:e=!1,title:t,portalId:r,cssClass:n,overlayClass:s,headingClass:i,dividers:a=!0,children:l,footer:d,onClose:u,size:f=ve.Md})=>{const{refs:p,context:C}=A.useFloating({open:e,onOpenChange:v=>{v||u?.(null)}}),g=A.useRole(C,{role:"dialog"}),m=A.useDismiss(C,{outsidePress:!0}),{getFloatingProps:h}=A.useInteractions([g,m]);if(!e)return null;const y=typeof t=="string"?"dial-popup-heading":void 0,b=v=>v?typeof v=="string"?o.jsx("h3",{id:y,className:D("flex-1 min-w-0 mr-3 truncate dial-h3 text-primary",i),children:o.jsx(Ie,{tooltip:v,children:v})}):v:o.jsx("span",{});return o.jsx(A.FloatingPortal,{id:r,children:o.jsx(A.FloatingOverlay,{className:D(Ua,s),children:o.jsx(A.FloatingFocusManager,{context:C,children:o.jsxs("div",{ref:p.setFloating,...h(),role:"dialog","aria-modal":"true","aria-labelledby":y,className:D("dial-popup",Za[f],a&&Wa,n),children:[o.jsxs("div",{className:qa,children:[b(t),o.jsx(Qt,{ariaLabel:"Close dialog",onClose:v=>u?.(v)})]}),o.jsx("div",{className:"flex-grow overflow-auto",children:l}),d]})})})})};var Ke=(e=>(e.Info="info",e.Danger="danger",e))(Ke||{});const Xa="flex justify-end gap-2 px-6 py-4",Ya="text-secondary dial-small-150 px-6 py-4",Ka="Cancel",Ja="Ok",Dr={[Ke.Info]:{confirmVariant:se.Primary,cancelVariant:se.Secondary},[Ke.Danger]:{container:"dial-danger-popup",confirmVariant:se.Danger,cancelVariant:se.Secondary}},Qa=({title:e,description:t,descriptionCssClass:r,open:n=!1,confirmLabel:s=Ja,cancelLabel:i=Ka,isLoading:a=!1,disableConfirmButton:l=!1,cssClass:d,confirmClassName:u,onClose:f,onConfirm:p,onCancel:C,children:g,dividers:m=!1,variant:h=Ke.Info,size:y=ve.Sm,footer:b})=>{const v=a?null:o.jsxs("div",{className:Xa,children:[o.jsx(re,{variant:se.Secondary,title:i,onClick:()=>C?C():f?.()}),o.jsx(re,{variant:Dr[h].confirmVariant,cssClass:u,title:s,disable:l,onClick:()=>p()})]}),x=c.useCallback(()=>a?o.jsx("div",{className:"px-6 py-4 h-[120px]",children:o.jsx(ct,{size:50})}):g??(t?o.jsx("div",{className:D(Ya,r),children:t}):null),[g,t,a,r]);return o.jsx(xt,{open:n,title:e,cssClass:D(Dr[h].container,d),dividers:m,onClose:()=>f?.(),footer:b??v,size:y,children:x()})},er=({selectedItems:e,listCssClass:t,listElementCssClass:r,placeholder:n})=>e?.length?o.jsx("ul",{className:D("flex-row items-center truncate flex-wrap","flex gap-x-2 gap-y-1",t),children:e?.map(s=>o.jsx("li",{children:o.jsx(Ie,{tooltip:s,children:o.jsx(ft,{tag:s,cssClass:D([r])})})},s))}):n?o.jsx("span",{className:"text-secondary",children:n}):null,Sr=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M2.25 13.5V12C2.25 11.5858 2.58579 11.25 3 11.25C3.41421 11.25 3.75 11.5858 3.75 12V13.5C3.75 13.6989 3.82907 13.8896 3.96973 14.0303C4.11038 14.1709 4.30109 14.25 4.5 14.25H6C6.41421 14.25 6.75 14.5858 6.75 15C6.75 15.4142 6.41421 15.75 6 15.75H4.5C3.90326 15.75 3.33114 15.5128 2.90918 15.0908C2.48722 14.6689 2.25 14.0967 2.25 13.5ZM14.25 6V4.5C14.25 4.30109 14.1709 4.11038 14.0303 3.96973C13.8896 3.82907 13.6989 3.75 13.5 3.75H12C11.5858 3.75 11.25 3.41421 11.25 3C11.25 2.58579 11.5858 2.25 12 2.25H13.5C14.0967 2.25 14.6689 2.48722 15.0908 2.90918C15.5128 3.33114 15.75 3.90326 15.75 4.5V6C15.75 6.41421 15.4142 6.75 15 6.75C14.5858 6.75 14.25 6.41421 14.25 6Z",fill:"currentColor"})),mn=({children:e,open:t,disabled:r=!1,selectedValue:n,valueCssClasses:s,inputCssClasses:i,onOpen:a,elementId:l,errorText:d,invalid:u,emptyValueText:f,placeholder:p})=>{const C=Array.isArray(n)&&n.length>0,g=typeof n=="string"&&!!n.trim(),m=C||g?n:p?void 0:f,h=r?void 0:a,y=()=>o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",className:"w-full",onClick:h,"aria-label":"open-popup",id:l,children:o.jsxs("div",{className:D("dial-input px-3 py-2 dial-input-field flex flex-row items-center w-full justify-between",i,r&&"dial-input-disable",(d||u)&&"dial-input-error"),children:[o.jsx(Ie,{tooltip:m==null?void 0:String(m),children:m||!p?o.jsx("span",{className:s,children:m}):o.jsx("span",{className:"text-secondary",children:p})}),!r&&o.jsx("div",{className:"flex-shrink-0",children:o.jsx(q,{icon:o.jsx(Sr,{role:"img",width:We,height:We})})})]})}),d&&o.jsx(Se,{errorText:d})]}),b=()=>o.jsx("div",{className:"w-full",onClick:h,children:o.jsxs("div",{className:D("dial-input px-3 py-2 flex flex-row items-center w-full justify-between",r&&"dial-input-disable"),children:[o.jsx(er,{placeholder:p,selectedItems:m}),!r&&o.jsx("div",{className:"ml-1",children:o.jsx(q,{icon:o.jsx(Sr,{role:"img",width:We,height:We})})})]})});return o.jsxs(o.Fragment,{children:[C?b():y(),t&&Jn.createPortal(e,document.body)]})},e1=({fieldTitle:e,htmlFor:t,disabled:r,selectedValue:n,radioButtons:s,customInputValue:i,valueCssClasses:a,inputCssClasses:l,emptyValueText:d,onClose:u,title:f,portalId:p,onApply:C,cancelButtonTitle:g="Cancel",applyButtonTitle:m="Apply",isValid:h,selectedRadioValue:y,onChangeRadioField:b,id:v,size:x=ve.Md})=>{const[j,N]=c.useState(!1),T=c.useCallback(()=>{r||N(!0)},[r]),R=c.useCallback(()=>{N(!1),u?.()},[u]),I=c.useCallback(()=>{C(),R()},[C,R]);return o.jsxs("div",{className:"flex flex-col",children:[o.jsx(Pe,{fieldTitle:e,htmlFor:t}),o.jsx(mn,{disabled:r,open:j,selectedValue:i??s.find(z=>z.id===n)?.name,valueCssClasses:a,inputCssClasses:D(l,"py-2","px-3"),emptyValueText:d,onOpen:T,children:o.jsx(xt,{open:j,onClose:R,title:f,portalId:p,size:x,footer:o.jsxs("div",{className:"flex flex-row items-center justify-end gap-2 px-6 py-4",children:[o.jsx(re,{variant:se.Secondary,title:g,onClick:R}),o.jsx(re,{variant:se.Primary,title:m,onClick:I,disable:!h})]}),children:o.jsx("div",{className:"px-6 py-4",children:o.jsx(Wr,{radioButtons:s,labelCssClass:"dial-small",activeRadioButton:y,onChange:b,elementId:v,orientation:Ye.Column})})})})]})},t1="Create",r1="Cancel",n1="flex items-center justify-end gap-2 px-6 py-3",s1=({title:e,open:t=!1,submitLabel:r=t1,cancelLabel:n=r1,isLoading:s=!1,disableSubmitButton:i=!1,cssClass:a,submitClassName:l,onClose:d,onSubmit:u,onCancel:f,children:p,dividers:C=!0,size:g=ve.Md,footer:m})=>{const h=s?null:o.jsxs("div",{className:n1,children:[o.jsx(re,{variant:se.Secondary,title:n,onClick:()=>f?f():d?.()}),o.jsx(re,{variant:se.Primary,cssClass:l,title:r,disable:i,onClick:()=>u()})]}),y=c.useCallback(()=>s?o.jsx("div",{className:"px-6 py-4 h-[120px]",children:o.jsx(ct,{size:50})}):p??null,[p,s]);return o.jsx(xt,{open:t,title:e,cssClass:a,dividers:C,onClose:()=>d?.(),footer:m??h,size:g,children:y()})},o1=({onClick:e})=>o.jsx(k.IconEyeOff,{...le,className:"text-primary",onClick:e,role:"button","aria-label":"hide"}),i1=({onClick:e})=>o.jsx(k.IconEye,{...le,className:"text-primary",onClick:e,role:"button","aria-label":"show"}),Cn=({...e})=>{const[t,r]=c.useState(!1),n=c.useCallback(s=>{r(s)},[]);return o.jsx(Ae,{type:t?"text":"password",...e,hideTooltip:!t,iconAfter:t?o.jsx(o1,{onClick:()=>n(!1)}):o.jsx(i1,{onClick:()=>n(!0)})})},a1=({fieldTitle:e,optional:t,elementCssClass:r,elementId:n,errorText:s,...i})=>o.jsxs("div",{className:"flex flex-col",children:[o.jsx(Pe,{fieldTitle:e,optional:t,htmlFor:n}),o.jsx(Cn,{cssClass:r,elementId:n,invalid:!!s,...i}),o.jsx(Se,{errorText:s})]});var Je=(e=>(e.Small="small",e.Base="base",e))(Je||{});const l1={[Je.Small]:{textClass:"text-xs px-1",containerClass:"px-[6px] py-1 h-[22px]",iconSize:10,iconStroke:1},[Je.Base]:{textClass:"text-sm px-2",containerClass:"px-3 py-2 h-[38px]",iconSize:18,iconStroke:1.5}},xn=({elementId:e,value:t,placeholder:r="Search...",disabled:n,readonly:s,invalid:i,cssClass:a,containerCssClass:l,onChange:d,size:u=Je.Base,allowClear:f=!0})=>{const[p,C]=c.useState(t||"");c.useEffect(()=>{C(t||"")},[t]);const g=c.useCallback(y=>{C(y),d?.(y)},[d]),m=l1[u],h=c.useCallback(()=>{g("")},[g]);return o.jsxs("div",{className:D("dial-input flex flex-row items-center justify-between",i&&"dial-input-error",n&&"dial-input-disable",s&&"dial-input-readonly",m.containerClass,l),children:[o.jsx(q,{className:D(n?"text-secondary":"text-primary"),icon:o.jsx(k.IconSearch,{size:m.iconSize,stroke:m.iconStroke})}),o.jsx("input",{id:e,type:"text",autoComplete:"off",placeholder:r,value:p??"",disabled:n,readOnly:s,className:D("border-0 bg-transparent w-full",a,m.textClass),onChange:y=>!s&&g(y.currentTarget.value)}),p&&!s&&!n&&f&&o.jsx(q,{className:"text-primary cursor-pointer",icon:o.jsx(k.IconX,{size:m.iconSize,stroke:m.iconStroke,onClick:h,"aria-label":"Clear search",role:"button"})})]})},c1=({placeholder:e="",selectedItems:t=[],updateSelected:r,listCssClass:n,listElementCssClass:s,containerCssClass:i,inputCssClass:a})=>{const[l,d]=c.useState(""),u=c.useCallback(p=>{p.key==="Enter"&&(r([...t,p.currentTarget.value]),d("")),(p.key==="Backspace"||p.key==="Delete")&&t.length&&!l&&r(t.slice(0,-1))},[t,r,l]),f=c.useCallback(p=>{d(p.target.value)},[d]);return o.jsxs("div",{className:D(["dial-input px-3 py-2 flex flex-row items-center flex-wrap w-fit gap-2",i]),children:[o.jsx(er,{selectedItems:t,listCssClass:n,listElementCssClass:s}),o.jsx("input",{type:"text",value:l,className:D(["border-0 bg-transparent p-0",a]),placeholder:t?.length?"":e,onKeyDown:u,onChange:f})]})},d1=({initialTags:e=[],fieldTitle:t,optional:r,elementId:n,placeholder:s,errorText:i,invalid:a,disabled:l,onChange:d})=>{const u=c.useRef(null),[f,p]=c.useState(e),[C,g]=c.useState(""),[m,h]=c.useState(!1),y=x=>{const j=x.trim().replace(/,$/,"");if(j&&!f.includes(j)){const N=[j,...f];p(N),d?.(N)}},b=x=>{(x.key===","||x.key==="Enter")&&(x.preventDefault(),y(C),g(""))},v=x=>{const j=f.filter((N,T)=>T!==x);p(j),d?.(j)};return c.useEffect(()=>{const x=new ResizeObserver(()=>{if(u.current){const j=u.current.scrollHeight>u.current.clientHeight+10;h(j)}});return u.current&&x.observe(u.current),()=>x.disconnect()},[f]),o.jsxs("div",{className:D("flex flex-col w-full"),children:[o.jsx(Pe,{fieldTitle:t,optional:r,htmlFor:n}),o.jsx("div",{className:D("dial-input min-h-[38px] p-[6px]",a&&"dial-input-error",l&&"dial-input-disable"),children:o.jsxs("div",{ref:u,className:D("flex flex-wrap gap-2 items-center",m?"flex-col-reverse":"flex-row"),children:[f.map((x,j)=>o.jsx(ft,{tag:x,remove:l?void 0:()=>v(j)},x+j)),o.jsx("input",{type:"text",value:C,onChange:x=>g(x.target.value),onKeyDown:b,className:D("dial-input-no-border outline-none border-none w-full min-w-[100px] flex-1 p-1"),placeholder:s,disabled:l})]})}),o.jsx(Se,{errorText:i})]})},u1="dial-input flex w-full items-center justify-between gap-2 dial-small",f1="w-full rounded",jt="flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none",p1="bg-accent-primary-alpha",h1="bg-accent-primary-alpha border-l border-accent-primary border-1",Ir="opacity-75",g1=o.jsx(k.IconChevronDown,{size:16}),bn=({options:e,selectedValues:t,handleRemoveTag:r})=>o.jsx("div",{className:"flex flex-wrap w-full items-center gap-1",children:t.map(n=>{const s=e.find(a=>a.value===n)?.label??n,i=e.find(a=>a.value===n)?.icon;return o.jsx(ft,{tag:s,remove:a=>r?.(a,n),iconBefore:i?o.jsx(q,{icon:i}):null,cssClass:"max-w-full"},n)})});var it=(e=>(e.Sm="sm",e.Md="md",e))(it||{}),at=(e=>(e.Primary="Primary",e.Secondary="Secondary",e))(at||{});const vn=({options:e,multiple:t=!1,value:r,defaultValue:n,variant:s=at.Primary,size:i=it.Md,prefix:a,placeholder:l="Select...",searchable:d=!1,searchPlaceholder:u,selectAll:f=!1,selectAllLabel:p="Select all",emptyStateTitle:C="No options available",emptyStateDescription:g,emptyStateIcon:m,disabled:h=!1,cssClass:y,closable:b=!1,header:v,footer:x,onClose:j,onChange:N,inlineSearch:T=!1,onFooterClick:R})=>{const[I,z]=c.useState(!1),[Q,P]=c.useState(""),G=c.useId(),B=c.useRef(null),ee=r!==void 0,[oe,ie]=c.useState(n),X=ee?r:oe,S=c.useMemo(()=>t?Array.isArray(X)?X:[]:typeof X=="string"?[X]:[],[X,t]),he=c.useMemo(()=>{const w=Q.trim().toLowerCase();return w?e.filter(W=>W.label.toLowerCase().includes(w)):e},[e,Q]);c.useEffect(()=>{I||P("")},[I]);const ne=c.useCallback(w=>{ee||ie(w),N?.(w)},[ee,N]),xe=w=>{if(t){const W=new Set(S);W.has(w)?W.delete(w):W.add(w),ne(Array.from(W))}else ne(w),z(!1)},me=c.useCallback((w,W)=>{if(w.stopPropagation(),!t){ne("");return}const Te=S.filter(Le=>Le!==W);ne(Te)},[t,S,ne]),$=c.useMemo(()=>he.filter(w=>!w.disabled),[he]),J=c.useMemo(()=>$.filter(w=>S.includes(w.value)).length,[$,S]),ue=$.length>0&&J===$.length,O=J>0&&!ue,H=()=>{if(!(!t||$.length===0))if(ue){const w=new Set($.map(Te=>Te.value)),W=S.filter(Te=>!w.has(Te));ne(W)}else{const w=new Set(S);$.forEach(W=>w.add(W.value)),ne(Array.from(w))}},ce=S.length>0;c.useEffect(()=>{I&&T&&!t&&!h&&requestAnimationFrame(()=>{const w=B.current;if(!w)return;w.focus();const W=w.value?.length??0;w.setSelectionRange?.(W,W)})},[I,T,t,h]);const Y=!t&&ce?S[0]:void 0,Z=c.useMemo(()=>Y?e.find(w=>w.value===Y):void 0,[e,Y]),ge=c.useCallback(()=>!t||S.length===0?null:o.jsx(bn,{options:e,selectedValues:S,handleRemoveTag:me}),[t,e,S,me]),ye=c.useCallback(()=>t?ce?ge():o.jsx("span",{className:"text-secondary truncate",children:l}):Z?o.jsxs(o.Fragment,{children:[Z.icon&&o.jsx(q,{icon:Z.icon}),o.jsx(Ce,{text:a?`${a} ${Z.label}`:Z.label}),Z?.description&&o.jsx("div",{className:"text-secondary dial-small",children:Z.description})]}):o.jsx("span",{className:"text-secondary truncate",children:l}),[ce,t,a,l,ge,Z]),bt=I?Q:Z?.label??"";return o.jsx(Ve,{open:I,onOpenChange:z,disabled:h,closable:b,onClose:j,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>o.jsxs("div",{id:G,role:"listbox","aria-multiselectable":t||void 0,className:f1,children:[v&&o.jsx(o.Fragment,{children:typeof v=="function"?v():v}),(d||b)&&o.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[d&&o.jsx(xn,{placeholder:u,onChange:P,value:Q,elementId:`search-${G}`}),b&&o.jsx(re,{ariaLabel:"Close select",cssClass:"shrink-0",iconBefore:o.jsx(k.IconX,{size:16}),onClick:w=>{j?.(w),z(!1)}})]}),t&&f&&$.length>0&&o.jsx("div",{className:D(jt,"mt-2"),children:o.jsx(Ft,{id:`${G}-selectAll`,label:p,checked:ue,indeterminate:O,onChange:H,ariaLabel:p})}),o.jsx("div",{className:"overflow-y-auto py-1",children:he.length===0?o.jsx("div",{className:"px-2 py-3",children:o.jsx(qr,{icon:m??o.jsx(k.IconClipboardX,{size:24}),title:C,description:g})}):he.map(w=>{const W=S.includes(w.value);return t?o.jsxs("div",{role:"option","aria-selected":W,"aria-disabled":!!w.disabled,className:D(jt,W&&p1,w.disabled&&Ir,"w-full"),children:[o.jsx(Ft,{id:`${G}-${w.value}`,label:o.jsxs("span",{className:"flex w-full flex-1 min-w-0 items-center gap-2 text-primary",children:[w.icon&&o.jsx(q,{icon:w.icon}),o.jsx("span",{className:"truncate",children:w.label})]}),checked:W,disabled:w.disabled,onChange:()=>!w.disabled&&xe(w.value),ariaLabel:w.label}),w.description&&o.jsx("div",{className:"text-secondary dial-small",children:w.description})]},w.value):o.jsx("button",{role:"option",type:"button","aria-selected":W,"aria-disabled":!!w.disabled,disabled:w.disabled,className:D(jt,W&&h1,w.disabled&&Ir),onClick:()=>!w.disabled&&xe(w.value),children:o.jsxs("div",{className:"flex items-center gap-2 w-full",children:[w.icon&&o.jsx(q,{icon:w.icon}),o.jsx(Ce,{text:w.label}),w.description&&o.jsx("div",{className:"text-secondary dial-small",children:w.description})]})},w.value)})}),x&&o.jsx("div",{onClick:w=>{R?.(w),R&&z(!1)},children:typeof x=="function"?x():x})]}),children:o.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-expanded":I,"aria-controls":G,className:_(u1,h&&"opacity-75 !cursor-not-allowed",i===it.Sm?"min-h-[25px] px-1.5 py-1":"min-h-[38px] px-3 py-2",s===at.Secondary?"!bg-layer-4":"",y),onMouseDown:w=>{h||T&&!t&&w.preventDefault()},onClick:()=>{h||(z(w=>!w),T&&!t&&B.current?.focus())},children:[T&&!t?o.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-primary flex-1",children:[o.jsx("input",{id:`inline-${G}`,type:"text",placeholder:u??l,value:bt,onChange:w=>P(w.currentTarget.value),onFocus:()=>!h&&z(!0),onMouseDown:w=>w.stopPropagation(),onClick:w=>w.stopPropagation(),className:"bg-transparent outline-none w-full dial-small",ref:B,disabled:h,"aria-disabled":h}),Z&&!h&&o.jsx(re,{ariaLabel:"Clear selection",iconBefore:o.jsx(k.IconX,{size:16}),onClick:w=>{w.stopPropagation(),ne(""),P(""),z(!0)}})]}):o.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary",children:ye()}),o.jsx(q,{icon:g1,className:D("text-primary",I&&"rotate-180")})]})})},m1=({fieldTitle:e,optional:t,captionDescription:r,containerCssClass:n,selectCssClass:s,error:i,elementId:a,description:l,readonly:d,value:u,defaultEmptyText:f,...p})=>{const C=c.useCallback(()=>{if(!u||Array.isArray(u)&&u.length===0)return f??"None";if(Array.isArray(u))return o.jsx(bn,{options:p.options,selectedValues:u});{const g=p.options?.find(m=>m.value===u);return o.jsx("span",{"aria-readonly":!0,className:"text-primary",children:g?.label||u})}},[u,p.options,f]);return o.jsx(dt,{elementId:a,label:e,optional:t,description:l,error:i,captionDescription:r,cssClass:n,readonly:d,value:C(),defaultEmptyText:f,children:o.jsx(vn,{cssClass:s,value:u,...p})})};function yn(e){let t=null;return()=>(t==null&&(t=e()),t)}function C1(e,t){return e.filter(r=>r!==t)}function x1(e,t){const r=new Set,n=i=>r.add(i);e.forEach(n),t.forEach(n);const s=[];return r.forEach(i=>s.push(i)),s}class b1{enter(t){const r=this.entered.length,n=s=>this.isNodeInDocument(s)&&(!s.contains||s.contains(t));return this.entered=x1(this.entered.filter(n),[t]),r===0&&this.entered.length>0}leave(t){const r=this.entered.length;return this.entered=C1(this.entered.filter(this.isNodeInDocument),t),r>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class v1{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const r={};Object.keys(this.config.exposeProperties).forEach(n=>{const s=this.config.exposeProperties[n];s!=null&&(r[n]={value:s(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,r)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,r){return r===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const tr="__NATIVE_FILE__",wn="__NATIVE_URL__",Dn="__NATIVE_TEXT__",Sn="__NATIVE_HTML__",Tr=Object.freeze(Object.defineProperty({__proto__:null,FILE:tr,HTML:Sn,TEXT:Dn,URL:wn},Symbol.toStringTag,{value:"Module"}));function kt(e,t,r){const n=t.reduce((s,i)=>s||e.getData(i),"");return n??r}const Bt={[tr]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Sn]:{exposeProperties:{html:(e,t)=>kt(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[wn]:{exposeProperties:{urls:(e,t)=>kt(e,t,"").split(`
|
|
2
|
-
`),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Dn]:{exposeProperties:{text:(e,t)=>kt(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function y1(e,t){const r=Bt[e];if(!r)throw new Error(`native type ${e} has no configuration`);const n=new v1(r);return n.loadDataTransfer(t),n}function Ot(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(Bt).filter(r=>{const n=Bt[r];return n?.matchesTypes?n.matchesTypes.some(s=>t.indexOf(s)>-1):!1})[0]||null}const w1=yn(()=>/firefox/i.test(navigator.userAgent)),In=yn(()=>!!window.safari);class Lr{interpolate(t){const{xs:r,ys:n,c1s:s,c2s:i,c3s:a}=this;let l=r.length-1;if(t===r[l])return n[l];let d=0,u=a.length-1,f;for(;d<=u;){f=Math.floor(.5*(d+u));const g=r[f];if(g<t)d=f+1;else if(g>t)u=f-1;else return n[f]}l=Math.max(0,u);const p=t-r[l],C=p*p;return n[l]+s[l]*p+i[l]*C+a[l]*p*C}constructor(t,r){const{length:n}=t,s=[];for(let g=0;g<n;g++)s.push(g);s.sort((g,m)=>t[g]<t[m]?-1:1);const i=[],a=[];let l,d;for(let g=0;g<n-1;g++)l=t[g+1]-t[g],d=r[g+1]-r[g],i.push(l),a.push(d/l);const u=[a[0]];for(let g=0;g<i.length-1;g++){const m=a[g],h=a[g+1];if(m*h<=0)u.push(0);else{l=i[g];const y=i[g+1],b=l+y;u.push(3*b/((b+y)/m+(b+l)/h))}}u.push(a[a.length-1]);const f=[],p=[];let C;for(let g=0;g<u.length-1;g++){C=a[g];const m=u[g],h=1/i[g],y=m+u[g+1]-C-C;f.push((C-m-y)*h),p.push(y*h*h)}this.xs=t,this.ys=r,this.c1s=u,this.c2s=f,this.c3s=p}}const D1=1;function Tn(e){const t=e.nodeType===D1?e:e.parentElement;if(!t)return null;const{top:r,left:n}=t.getBoundingClientRect();return{x:n,y:r}}function rt(e){return{x:e.clientX,y:e.clientY}}function S1(e){var t;return e.nodeName==="IMG"&&(w1()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function I1(e,t,r,n){let s=e?t.width:r,i=e?t.height:n;return In()&&e&&(i/=window.devicePixelRatio,s/=window.devicePixelRatio),{dragPreviewWidth:s,dragPreviewHeight:i}}function T1(e,t,r,n,s){const i=S1(t),l=Tn(i?e:t),d={x:r.x-l.x,y:r.y-l.y},{offsetWidth:u,offsetHeight:f}=e,{anchorX:p,anchorY:C}=n,{dragPreviewWidth:g,dragPreviewHeight:m}=I1(i,t,u,f),h=()=>{let T=new Lr([0,.5,1],[d.y,d.y/f*m,d.y+m-f]).interpolate(C);return In()&&i&&(T+=(window.devicePixelRatio-1)*m),T},y=()=>new Lr([0,.5,1],[d.x,d.x/u*g,d.x+g-u]).interpolate(p),{offsetX:b,offsetY:v}=s,x=b===0||b,j=v===0||v;return{x:x?b:y(),y:j?v:h()}}class L1{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,r){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=r}}function E1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){E1(e,s,r[s])})}return e}class j1{profile(){var t,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,r,n){return this.sourcePreviewNodeOptions.set(t,n),this.sourcePreviewNodes.set(t,r),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,r,n){this.sourceNodes.set(t,r),this.sourceNodeOptions.set(t,n);const s=a=>this.handleDragStart(a,t),i=a=>this.handleSelectStart(a);return r.setAttribute("draggable","true"),r.addEventListener("dragstart",s),r.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),r.removeEventListener("dragstart",s),r.removeEventListener("selectstart",i),r.setAttribute("draggable","false")}}connectDropTarget(t,r){const n=a=>this.handleDragEnter(a,t),s=a=>this.handleDragOver(a,t),i=a=>this.handleDrop(a,t);return r.addEventListener("dragenter",n),r.addEventListener("dragover",s),r.addEventListener("drop",i),()=>{r.removeEventListener("dragenter",n),r.removeEventListener("dragover",s),r.removeEventListener("drop",i)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(t);return Er({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(t);return Er({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(Tr).some(r=>Tr[r]===t)}beginDragNativeItem(t,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=y1(t,r),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const r=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var n;return(n=this.rootElement)===null||n===void 0?void 0:n.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},r)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,r){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}handleDragEnter(t,r){this.dragEnterTargetIds.unshift(r)}handleDragOver(t,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}handleDrop(t,r){this.dropTargetIds.unshift(r)}constructor(t,r,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=s=>{const i=this.sourceNodes.get(s);return i&&Tn(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=s=>!!(s&&this.document&&this.document.body&&this.document.body.contains(s)),this.endDragIfSourceWasRemovedFromDOM=()=>{const s=this.currentDragSourceNode;s==null||this.isNodeInDocument(s)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=s=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(s||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=s=>{if(s.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const a=rt(s);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:a});const{dataTransfer:l}=s,d=Ot(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const f=this.monitor.getSourceId(),p=this.sourceNodes.get(f),C=this.sourcePreviewNodes.get(f)||p;if(C){const{anchorX:g,anchorY:m,offsetX:h,offsetY:y}=this.getCurrentSourcePreviewNodeOptions(),x=T1(p,C,a,{anchorX:g,anchorY:m},{offsetX:h,offsetY:y});l.setDragImage(C,x.x,x.y)}}try{l?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(s.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(d)this.beginDragNativeItem(d);else{if(l&&!l.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=s=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}if(!this.enterLeaveCounter.enter(s.target)||this.monitor.isDragging())return;const{dataTransfer:l}=s,d=Ot(l);d&&this.beginDragNativeItem(d,l)},this.handleTopDragEnter=s=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=s.altKey,i.length>0&&this.actions.hover(i,{clientOffset:rt(s)}),i.some(l=>this.monitor.canDropOnTarget(l))&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=s=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}},this.handleTopDragOver=s=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}this.altKeyPressed=s.altKey,this.lastClientOffset=rt(s),this.scheduleHover(i),(i||[]).some(l=>this.monitor.canDropOnTarget(l))?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=s=>{this.isDraggingNativeItem()&&s.preventDefault(),this.enterLeaveCounter.leave(s.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=s=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;s.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}else Ot(s.dataTransfer)&&s.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=s=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:rt(s)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=s=>{const i=s.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(s.preventDefault(),i.dragDrop()))},this.options=new L1(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new b1(this.isNodeInDocument)}}const k1=function(t,r,n){return new j1(t,r,n)},O1=({onChange:e,emptyTextFirstLine:t,emptyTextSecondLine:r,emptyButtonLabel:n,acceptTypes:s,maxFilesCount:i,multiple:a,fileFormatError:l,fileCountError:d,getIsFileFormatError:u})=>{const f=c.useRef(null),p=c.useRef(null),[C,g]=c.useState([]),[m,h]=c.useState(!1),y=c.useCallback(P=>{const G=P.target.files;if(G&&G.length>0){const B=Array.from(G);u?.(B)?h(!0):e(B)}},[u,e]),b=c.useCallback(P=>i&&P?.length>i,[i]),v=c.useMemo(()=>m||b(C),[m,C,b]),x=()=>{g([]),h(!1)};c.useEffect(()=>{x()},[s]);const[{isOver:j,canDrop:N},T]=on(()=>({accept:[tr],drop(P){const G=P.files;!u?.(G)&&!b(G)&&e(G),x()},collect:P=>({isOver:P.isOver(),canDrop:P.canDrop()})}),[y]),R=P=>{(P.key==="Enter"||P.key==="Space")&&(P.preventDefault(),p.current?.click())},I=P=>{P?.preventDefault();const G=Array.from(P.dataTransfer?.items??[]);h(!!u?.(G)),g(G)},z=P=>{P.target===P.currentTarget&&x()},Q=D("border border-dashed rounded w-full cursor-pointer relative h-full hover:border-hover",!N&&!v&&"border-primary",N&&(j?"border-accent-primary":"border-hover"),v&&"border-error");return T(f),o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:Q,ref:f,onDragOver:I,onDragLeave:z,children:[o.jsxs("label",{htmlFor:"file",tabIndex:0,onKeyDown:R,className:"flex flex-col items-center cursor-pointer h-full w-full text-secondary dial-tiny justify-center",children:[t&&o.jsx("p",{className:"mb-1",children:t}),r&&o.jsx("p",{className:"mb-0.5",children:r}),n&&o.jsx(re,{variant:se.Tertiary,title:n,onClick:()=>p.current?.click()})]}),o.jsx("input",{multiple:a,id:"file",type:"file",ref:p,hidden:!0,accept:s,onChange:y})]}),o.jsx(o.Fragment,{children:m?o.jsx(Se,{errorText:l}):b(C)&&o.jsx(Se,{errorText:d})})]})},N1=({iconBefore:e,cssClass:t,errorText:r,...n})=>{const s=n.invalid,i=()=>o.jsx("div",{className:"mr-2",children:s?o.jsx(k.IconExclamationCircle,{...le,className:"text-error"}):e});return o.jsx(Ae,{...n,iconBefore:i(),tooltipTriggerClassName:"flex-1 min-w-0",cssClass:D(s?"text-error":"",t),tooltipText:s&&r?r:void 0,hideBorder:!0})},R1=e=>{const{files:t,iconBeforeInput:r,dynamicIcon:n,onChange:s,isInvalid:i,errorText:a,removeButtonAriaLabel:l}=e,d=(p,C)=>{p.stopPropagation(),s(t?.filter(g=>g.name!==C)||[])},u=p=>o.jsx(pn,{ariaLabel:l,onClick:C=>d(C,p)}),f=p=>{s(p)};return!t||t.length===0?o.jsx(Ii,{backend:k1,children:o.jsx(O1,{...e,onChange:f})}):o.jsx("div",{className:"flex-1 min-h-0 border border-solid border-primary rounded",children:t&&t.length>0&&o.jsx("div",{className:"max-h-full overflow-y-auto",children:t.map((p,C)=>o.jsx(N1,{elementId:p.name,value:p.name,iconAfter:u(p.name),iconBefore:r||n?.(p.name),invalid:i?.(p),errorText:a},p.name+C))})})},P1=({onChange:e,fieldTitle:t,elementId:r,files:n,maxFilesCount:s,fileFormatError:i,fileCountError:a,multiple:l=!0,acceptTypes:d,deleteAllButtonLabel:u,addButtonLabel:f,...p})=>{const C=c.useRef(null),g=()=>C.current?.click(),m=()=>{e([])},h=c.useCallback(b=>b?.some(v=>v.type===""||!(d==="/"||d?.toLowerCase()?.includes(v?.type?.toLowerCase()))),[d]),y=c.useCallback(b=>{const v=b.target.files;if(v&&v.length>0){const x=Array.from(v);h(x)||e([...n||[],...x])}},[e,n,h]);return o.jsxs("div",{className:"h-full flex flex-col",children:[o.jsxs("div",{className:"flex justify-between items-center pb-1 min-h-[42px]",children:[o.jsx(Pe,{fieldTitle:`${t}: ${l?n?.length||0:""}`,htmlFor:r}),l&&!!n?.length&&o.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[o.jsx(re,{variant:se.Tertiary,cssClass:"!text-error",iconBefore:o.jsx(k.IconTrashX,{...le}),title:u,onClick:m}),(s?s>n?.length:!0)&&o.jsx(re,{variant:se.Tertiary,iconBefore:o.jsx(k.IconPlus,{...le}),title:f,onClick:g})]})]}),n&&n.length>0&&o.jsx("input",{id:"file",type:"file",multiple:l,ref:C,hidden:!0,accept:d,onChange:y}),o.jsx(R1,{files:n,onChange:e,acceptTypes:d,maxFilesCount:s,multiple:l,fileFormatError:i,fileCountError:a,getIsFileFormatError:h,...p})]})},M1=o.jsx(k.IconChevronDown,{size:16}),F1=o.jsx(k.IconChevronUp,{size:16}),H1=e=>{const[t,r]=c.useState(!1),n=c.useMemo(()=>t?F1:M1,[t]);return o.jsx("div",{children:o.jsx(Ve,{menu:{items:e.items},onOpenChange:s=>r(s),children:o.jsx(re,{...e,iconAfter:n})})})};var lt=(e=>(e.MyFiles="my_files",e.Shared="shared",e.Organization="organization",e))(lt||{}),Ln=(e=>(e.Duplicate="duplicate",e.Copy="copy",e.Move="move",e.Rename="rename",e.Download="download",e.Delete="delete",e))(Ln||{}),En=(e=>(e.Normal="normal",e.Reverse="reverse",e))(En||{}),jn=(e=>(e.File="file",e.Folder="folder",e))(jn||{});const V1=e=>{const[t,r]=c.useState(lt.MyFiles),n=i=>{r(i)},s=c.useMemo(()=>{if(e)return Object.values(lt).map(i=>({id:i,name:e?.[i]||i.replace("_"," ")}))},[e]);return{activeTab:t,handleTabChange:n,tabs:s}};function A1({value:e,isEditing:t,restoreOnCancel:r=!0,onValidate:n,onSave:s,onCancel:i}){const[a,l]=c.useState(e),[d,u]=c.useState(!1),[f,p]=c.useState(""),C=c.useRef(null),g=c.useCallback((v=!1,x="")=>{u(v),p(x)},[]),m=c.useCallback(v=>{if(!n)return g(),!0;const x=n(v);return x?(g(!0,x),!1):(g(),!0)},[n,g]),h=c.useCallback(v=>{const x=v??"";l(x),m(x)},[m]),y=c.useCallback(()=>{m(a)?s?.(a):C.current?.focus()},[m,s,a]),b=c.useCallback(()=>{r&&l(e),g(),i?.()},[e,i,r,g]);return c.useEffect(()=>{t&&(l(e),g(),requestAnimationFrame(()=>{C.current?.focus(),C.current?.select()}))},[t,e,g]),c.useEffect(()=>{const v=C.current;if(!t||!v)return;const x=j=>{j.key==="Enter"?(j.preventDefault(),y()):j.key==="Escape"&&(j.preventDefault(),b())};return v.addEventListener("keydown",x),()=>v.removeEventListener("keydown",x)},[t,y,b]),c.useEffect(()=>{if(!t)return;const v=C.current;if(!v)return;const x=j=>{const N=j.relatedTarget;N&&v.contains(N)||(m(a)?y():v.focus())};return v.addEventListener("blur",x),()=>{v.removeEventListener("blur",x)}},[t,a,m,y]),{inputRef:C,value:a,onChange:h,invalid:d,invalidMessage:f}}var Re=(e=>(e.ITEM="item",e.FOLDER="folder",e))(Re||{}),kn=(e=>(e.FILE="FILE",e.PROMPT="PROMPT",e.CONVERSATION="CONVERSATION",e.APPLICATION="APPLICATION",e.TOOLSET="TOOL_SET",e))(kn||{}),On=(e=>(e.READ="READ",e.WRITE="WRITE",e.SHARE="SHARE",e))(On||{});const $t=(e,t)=>{if(!(!e||!e.length||!t))for(const r of e){if(r.path===t)return r;const n=$t(r.items,t);if(n)return n}},jr=(e,t)=>{if(!e?.length)return;if(!t)return e[0];const r=$t(e,t);if(r&&r.nodeType===Re.FOLDER)return r;const n=t.split("/").filter(Boolean);if(n.length<=1)return e[0];const s="/"+n.slice(0,n.length-1).join("/");return $t(e,s)??e[0]},st=e=>(e??"").toLowerCase(),_1=e=>st(e).replace(/^\./,""),z1=e=>{if(!e)return[];const t=[],r=n=>{const s=n.items??[];for(const i of s)t.push(i),i.nodeType===Re.FOLDER&&r(i)};return r(e),t},B1=e=>(e.name??e.path.split("/").pop()??"").startsWith("."),$1=e=>{const[t,r]=c.useState(e?.showHiddenFiles??!1),n=!!e?.onShowHiddenFilesChange,s=n?e.showHiddenFiles??!1:t,i=c.useCallback(l=>{n?e?.onShowHiddenFilesChange?.(l):r(l)},[n,e]),a=c.useCallback(()=>{const l=!s;n?e?.onShowHiddenFilesChange?.(l):r(l)},[s,n,e]);return{areHiddenFilesVisible:s,toggleHiddenFilesVisibility:a,setAreHiddenFilesVisible:i}},G1=e=>{const[t,r]=c.useState(e?.collapsed??!1),n=!!e?.onCollapseChange,s=n?e.collapsed??!1:t,i=c.useCallback(l=>{n?e?.onCollapseChange?.(l):r(l)},[n,e]),a=c.useCallback(()=>{const l=!s;n?e?.onCollapseChange?.(l):r(l)},[s,n,e]);return{isTreeCollapsed:s,toggleTreeCollapse:a,setIsTreeCollapsed:i}},U1=(e,t)=>{if(!t.has(e))return e;const r=e.lastIndexOf("."),n=r>0,s=n?e.substring(0,r):e,i=n?e.substring(r):"";let a=1,l;do l=`${s} (${a})${i}`,a++;while(t.has(l));return l},W1=e=>e.name,Nt=(e,t,r,n=!1)=>{const s=new Set(r.map(W1));return t.map(i=>{const a=i.name,l=n?a:U1(a,s);return n||s.add(l),{sourceUrl:i.path,destinationUrl:`${e}/${l}`,overwrite:n,nodeType:i.nodeType??Re.ITEM}})},q1=({getDestinationFiles:e,onCopyFiles:t,onMoveToFiles:r})=>{const[n,s]=c.useState(!1),[i,a]=c.useState([]),[l,d]=c.useState([]),[u,f]=c.useState("copy"),p=c.useCallback(x=>{const j=e(x),N=Nt(x,i,j,!1);t?.(N,x)},[e,t,i]),C=c.useCallback((x,j)=>{const N=e(x),T=Nt(x,l,N,!0);r?.(T,j,x)},[e,r,l]),g=c.useCallback(x=>{const j=x.at(0)?.parentPath??"/",N=e(j),T=Nt(j,x,N,!1);t?.(T,j)},[t,e]),m=c.useCallback(x=>{f(x),s(!0)},[]),h=c.useCallback(()=>{a([]),d([])},[]),y=c.useCallback(()=>{s(!1),h()},[h]),b=c.useCallback(x=>{a(x)},[]),v=c.useCallback(x=>{d(x)},[]);return{handleDuplicate:g,handleCloseDestinationFolderPopup:y,handleOpenDestinationFolderPopup:m,handleCopyTo:p,handleMoveTo:C,openDestinationFolderPopup:n,destinationFolderMode:u,handleSetCopiedFiles:b,handleSetMovedFiles:v,clearState:h}},Z1=({path:e,onPathChange:t,onSelectionClear:r})=>{const[n,s]=c.useState(e);c.useEffect(()=>{s(e),r?.()},[e,r]);const i=c.useCallback(a=>{s(a),t?.(a),r?.()},[t,r]);return{currentPath:n,setCurrentPath:s,handlePathChange:i}},X1=({onDeleteFiles:e})=>{const[t,r]=c.useState(!1),[n,s]=c.useState([]),[i,a]=c.useState(""),l=c.useCallback((f,p)=>{s(f),a(p),r(!0)},[]),d=c.useCallback(()=>{r(!1),s([])},[]),u=c.useCallback(()=>{if(e&&n.length>0){const f=n.map(p=>({sourceUrl:p.path,nodeType:p.nodeType}));e(f,i)}d()},[n,e,d,i]);return{deleteConfirmationOpen:t,itemsToDelete:n,openDeleteConfirmation:l,closeDeleteConfirmation:d,confirmDelete:u}},Y1=({onDownloadFiles:e})=>({handleDownloadFiles:c.useCallback(r=>{e&&r.length>0&&e(r)},[e])}),Nn=c.createContext(void 0),K1=({onRename:e,onRenameSave:t,onRenameCancel:r,onRenameValidate:n})=>{const[s,i]=c.useState(),a=c.useCallback(f=>{e?.(f),i(f)},[e]),l=c.useCallback(()=>{i(void 0),r?.()},[r]),d=c.useCallback(f=>{i(void 0),t?.(f)},[t]),u=c.useCallback((f,p)=>n?.(f,p)??null,[n]);return{renamedPath:s,renameHandler:a,renameSaveHandler:d,renameCancelHandler:l,renameValidateHandler:u}},J1=e=>{if(!e||e<=0)return"-";const t=1024,r=t*1024;return e>=r?`${(e/r).toFixed(1)} MB`:e>=t?`${(e/t).toFixed(0)} KB`:`${e} bytes`},Q1=({children:e,cssClass:t,items:r=[],rootItem:n,path:s,showHiddenFiles:i,onShowHiddenFilesChange:a,treeOptions:l,navigationPanelOptions:d,deleteConfirmationOptions:u,gridOptions:f,toolbarOptions:p,bulkActionsToolbarOptions:C,destinationFolderPopupOptions:g,onPathChange:m,onTableFileClick:h,onCopyFiles:y,onMoveToFiles:b,onDeleteFiles:v,onDownloadFiles:x,onRename:j,onRenameSave:N,onRenameCancel:T,onRenameValidate:R})=>{const[I,z]=c.useState(new Set),Q=c.useCallback(()=>z(new Set),[]),{currentPath:P,setCurrentPath:G,handlePathChange:B}=Z1({path:s,onPathChange:m,onSelectionClear:Q}),[ee,oe]=c.useState(),ie=g?.destinationFolderPath??ee,X=c.useCallback(K=>{g?.setDestinationFolderPath?g.setDestinationFolderPath(K):oe(K)},[g]),{areHiddenFilesVisible:S,toggleHiddenFilesVisibility:he}=$1({showHiddenFiles:i,onShowHiddenFilesChange:a}),{isTreeCollapsed:ne,toggleTreeCollapse:xe,setIsTreeCollapsed:me}=G1({collapsed:l?.collapsed,onCollapseChange:l?.onCollapseChange}),{renamedPath:$,renameHandler:J,renameSaveHandler:ue,renameCancelHandler:O,renameValidateHandler:H}=K1({onRename:j,onRenameSave:N,onRenameCancel:T,onRenameValidate:R}),[ce,Y]=c.useState("");c.useEffect(()=>{const K=d?.value;K!=null&&Y(String(K))},[d?.value]);const Z=String(d?.value??ce??"").trim(),ge=c.useMemo(()=>jr(r,P)??r[0],[r,P]),{handleCopyTo:ye,handleMoveTo:bt,handleDuplicate:w,handleOpenDestinationFolderPopup:W,handleCloseDestinationFolderPopup:Te,openDestinationFolderPopup:Le,handleSetCopiedFiles:Rn,handleSetMovedFiles:Pn,destinationFolderMode:Mn}=q1({getDestinationFiles:K=>jr(r,K)?.items??[],onCopyFiles:y,onMoveToFiles:b});c.useEffect(()=>{Le&&!ie&&X(P??n?.path??"/")},[Le,ie,P,n?.path,X]),c.useEffect(()=>{Le||X(void 0)},[Le,X]);const{deleteConfirmationOpen:Fn,itemsToDelete:Hn,openDeleteConfirmation:Vn,closeDeleteConfirmation:An,confirmDelete:_n}=X1({onDeleteFiles:v}),{handleDownloadFiles:zn}=Y1({onDownloadFiles:x}),Bn=c.useMemo(()=>{const K=st(Z).trim(),$e=ge?.items??[];let vt=K?z1(ge):$e;S||(vt=vt.filter(ae=>!B1(ae)));const rr=vt.map(ae=>({id:ae.id??ae.path,name:ae.name??ae.path.split("/").pop()??"",updatedAt:ae.updatedAt,size:ae.nodeType===Re.ITEM?J1(ae.contentLength):"-",author:ae.author,path:ae.path,nodeType:ae.nodeType,extension:ae.extension}));if(!K)return rr;const Zn=K.split(/\s+/).filter(Boolean);return rr.filter(ae=>{const Xn=st(ae.name),Yn=st(ae.author),Kn=_1(ae.extension);return Zn.every(yt=>Xn.includes(yt)||Yn.includes(yt)||Kn.includes(yt))})},[ge,Z,S]),$n=c.useCallback(K=>{B(K.path)},[B]),Gn=c.useCallback(K=>{B(K)},[B]),Un=c.useCallback(K=>{const $e=String(K??"");Y($e),d?.onSearchChange?.($e)},[d]),Wn=c.useCallback(K=>{K.nodeType===Re.FOLDER?B(K.path):h?.(K)},[B,h]),qn={cssClass:t,items:r,rootItem:n,treeOptions:l,navigationPanelOptions:d,gridOptions:f,toolbarOptions:p,bulkActionsToolbarOptions:C,deleteConfirmationOptions:u,destinationFolderPopupOptions:{destinationFolderPath:ie,setDestinationFolderPath:X},currentPath:P,setCurrentPath:G,searchValue:ce,effectiveSearchValue:Z,setSearchValue:Y,areHiddenFilesVisible:S,toggleHiddenFilesVisibility:he,isTreeCollapsed:ne,toggleTreeCollapse:xe,setIsTreeCollapsed:me,selectedIds:I,setSelectedIds:z,clearSelection:Q,currentFolder:ge,gridRows:Bn,handleCopyTo:ye,handleMoveTo:bt,handleDuplicate:w,handleSetCopiedFiles:Rn,handleSetMovedFiles:Pn,openDestinationFolderPopup:Le,handleCloseDestinationFolderPopup:Te,handleOpenDestinationFolderPopup:W,destinationFolderMode:Mn,handleDownloadFiles:zn,renamedPath:$,onRename:J,onRenameSave:ue,onRenameCancel:O,onRenameValidate:H,openDeleteConfirmation:Vn,closeDeleteConfirmation:An,confirmDelete:_n,deleteConfirmationOpen:Fn,itemsToDelete:Hn,handlePathChange:B,handleTreeItemClick:$n,handleBreadcrumbItemClick:Gn,handleSearchChange:Un,handleTableRowClick:Wn,onTableFileClick:h};return o.jsx(Nn.Provider,{value:qn,children:e})},el=()=>{const e=c.useContext(Nn);if(!e)throw new Error("useFileManagerContext must be used within <FileManagerProvider>");return e};exports.AlertVariant=ke;exports.ButtonVariant=se;exports.ConfirmationPopupVariant=Ke;exports.DialAlert=zs;exports.DialAutocompleteInput=c1;exports.DialAutocompleteInputValue=er;exports.DialBreadcrumb=Fa;exports.DialBreadcrumbItem=qe;exports.DialButton=re;exports.DialButtonDropdown=H1;exports.DialCheckbox=Ft;exports.DialCloseButton=Qt;exports.DialCollapsibleSidebar=to;exports.DialConfirmationPopup=Qa;exports.DialDateCellRenderer=va;exports.DialDraggableItem=aa;exports.DialDropdown=Ve;exports.DialEllipsisTooltip=Ce;exports.DialErrorText=Se;exports.DialFieldLabel=Pe;exports.DialFileIcon=an;exports.DialFileManagerActions=Ln;exports.DialFileManagerTabs=lt;exports.DialFileName=ga;exports.DialFileNodeType=Re;exports.DialFilePermission=On;exports.DialFileResourceType=kn;exports.DialFolderName=ma;exports.DialFormItem=dt;exports.DialFormPopup=s1;exports.DialIcon=q;exports.DialInput=Ae;exports.DialInputPopup=mn;exports.DialItemType=jn;exports.DialLabelledText=ro;exports.DialLoadFileAreaField=P1;exports.DialLoader=ct;exports.DialNoDataContent=qr;exports.DialNumberInputField=za;exports.DialPasswordInput=Cn;exports.DialPasswordInputField=a1;exports.DialPopup=xt;exports.DialRadioButton=Ur;exports.DialRadioGroup=Wr;exports.DialRadioGroupPopupField=e1;exports.DialRemoveButton=pn;exports.DialSearch=xn;exports.DialSelect=vn;exports.DialSelectField=m1;exports.DialSharedEntityIndicator=Kt;exports.DialSteps=Xs;exports.DialSwitch=Ga;exports.DialTabs=Ea;exports.DialTag=ft;exports.DialTagInput=d1;exports.DialTextAreaField=$a;exports.DialTextInputField=Ba;exports.DialTextarea=hn;exports.DialTooltip=Ie;exports.DropdownItemType=Jt;exports.DropdownTrigger=De;exports.DropdownType=cn;exports.FileManagerProvider=Q1;exports.FlexibleActionsDirection=En;exports.FormItemOrientation=Xe;exports.PopupSize=ve;exports.RadioGroupOrientation=Ye;exports.SearchSize=Je;exports.SelectSize=it;exports.SelectVariant=at;exports.StepStatus=de;exports.TabOrientation=ot;exports.TagVariant=ut;exports.mergeClasses=_;exports.useDialFileManagerTabs=V1;exports.useEditableItem=A1;exports.useFileManagerContext=el;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),$=require("classnames"),ge=require("@floating-ui/react"),p=require("react"),j=require("@tabler/icons-react"),_n=require("react-dom");function zf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const re=zf(p),us=({errorText:e})=>e&&C.jsx("span",{className:"text-error dial-tiny mt-1",children:e}),Ee=({icon:e,className:t})=>e?C.jsx("span",{className:$("flex-shrink-0",t),children:e}):null,Wf=7,_f=2,du=p.createContext(null),uu=()=>{const e=p.useContext(du);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e},jf=({initialOpen:e=!1,placement:t="bottom",isTriggerClickable:s=!1,open:o,onOpenChange:i}={})=>{const[n,r]=p.useState(e),a=p.useRef(null),l=o??n,c=i??r,d=ge.useFloating({placement:t,open:l,onOpenChange:c,whileElementsMounted:ge.autoUpdate,middleware:[ge.offset(Wf+_f),ge.flip({crossAxis:t.includes("-"),fallbackAxisSideDirection:"start",padding:5}),ge.shift({padding:5}),ge.arrow({element:a})]}),u=ge.useHover(d.context,{move:!1,enabled:o==null,mouseOnly:s,delay:{open:500,close:0}}),h=ge.useFocus(d.context,{enabled:o==null}),g=ge.useDismiss(d.context),f=ge.useRole(d.context,{role:"tooltip"}),m=ge.useInteractions([u,h,g,f]);return p.useEffect(()=>{if(!l)return;const v=d.refs.reference.current;if(!(v instanceof Element))return;const w=new IntersectionObserver(([b])=>{b.isIntersecting||c(!1)},{root:null,threshold:0});return w.observe(v),()=>w.disconnect()},[l,d.refs.reference,c]),p.useMemo(()=>({open:l,setOpen:c,arrowRef:a,...m,...d}),[l,c,m,d])},hu=({children:e,...t})=>{const s=jf(t);return C.jsx(du.Provider,{value:s,children:e})},gu=({style:e,...t})=>{const s=uu(),o=p.useRef(null),i=ge.useMergeRefs([s.refs.setFloating,o]);return s.open?C.jsx(ge.FloatingPortal,{id:"tooltip-portal",children:C.jsxs("div",{ref:i,style:{...s.floatingStyles,...e},...s.getFloatingProps(t),className:$("z-[55] whitespace-pre-wrap break-words rounded border border-primary bg-layer-0 px-2 py-1 dial-tiny shadow max-w-[300px]",s.getFloatingProps(t).className),children:[t.children,C.jsx(ge.FloatingArrow,{ref:s.arrowRef,context:s.context,fill:"currentColor",strokeWidth:1,className:"stroke-primary w-2 text-[var(--bg-layer-0,_#000000)]"})]})}):null},pu=({children:e,asChild:t=!1,...s})=>{const o=uu(),i=p.useRef(null),n=t&&p.isValidElement(e),a=e&&typeof e=="object"&&"ref"in e&&e.ref!==void 0?e.ref:void 0,l=[o.refs.setReference,i];n&&a&&l.push(a);const c=ge.useMergeRefs(l);return n?p.cloneElement(e,o.getReferenceProps({...e.props,...s,ref:c})):C.jsx("span",{ref:c,...o.getReferenceProps(s),className:s.className??"dial-tooltip-trigger text-left",children:e})},Xt=({hideTooltip:e,tooltip:t,children:s,triggerClassName:o,contentClassName:i,...n})=>C.jsxs(hu,{...n,children:[C.jsx(pu,{className:$(o,"truncate"),children:s}),C.jsx(gu,{className:$("text-primary",i,"max-w-[300px]",(e||!t)&&"hidden"),children:t})]}),Xa="-",Uf=e=>{const t=Kf(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:r=>{const a=r.split(Xa);return a[0]===""&&a.length!==1&&a.shift(),fu(a,t)||$f(r)},getConflictingClassGroupIds:(r,a)=>{const l=s[r]||[];return a&&o[r]?[...l,...o[r]]:l}}},fu=(e,t)=>{if(e.length===0)return t.classGroupId;const s=e[0],o=t.nextPart.get(s),i=o?fu(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;const n=e.join(Xa);return t.validators.find(({validator:r})=>r(n))?.classGroupId},lc=/^\[(.+)\]$/,$f=e=>{if(lc.test(e)){const t=lc.exec(e)[1],s=t?.substring(0,t.indexOf(":"));if(s)return"arbitrary.."+s}},Kf=e=>{const{theme:t,classGroups:s}=e,o={nextPart:new Map,validators:[]};for(const i in s)la(s[i],o,i,t);return o},la=(e,t,s,o)=>{e.forEach(i=>{if(typeof i=="string"){const n=i===""?t:cc(t,i);n.classGroupId=s;return}if(typeof i=="function"){if(qf(i)){la(i(o),t,s,o);return}t.validators.push({validator:i,classGroupId:s});return}Object.entries(i).forEach(([n,r])=>{la(r,cc(t,n),s,o)})})},cc=(e,t)=>{let s=e;return t.split(Xa).forEach(o=>{s.nextPart.has(o)||s.nextPart.set(o,{nextPart:new Map,validators:[]}),s=s.nextPart.get(o)}),s},qf=e=>e.isThemeGetter,Yf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=new Map,o=new Map;const i=(n,r)=>{s.set(n,r),t++,t>e&&(t=0,o=s,s=new Map)};return{get(n){let r=s.get(n);if(r!==void 0)return r;if((r=o.get(n))!==void 0)return i(n,r),r},set(n,r){s.has(n)?s.set(n,r):i(n,r)}}},ca="!",da=":",Zf=da.length,Qf=e=>{const{prefix:t,experimentalParseClassName:s}=e;let o=i=>{const n=[];let r=0,a=0,l=0,c;for(let f=0;f<i.length;f++){let m=i[f];if(r===0&&a===0){if(m===da){n.push(i.slice(l,f)),l=f+Zf;continue}if(m==="/"){c=f;continue}}m==="["?r++:m==="]"?r--:m==="("?a++:m===")"&&a--}const d=n.length===0?i:i.substring(l),u=Xf(d),h=u!==d,g=c&&c>l?c-l:void 0;return{modifiers:n,hasImportantModifier:h,baseClassName:u,maybePostfixModifierPosition:g}};if(t){const i=t+da,n=o;o=r=>r.startsWith(i)?n(r.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:r,maybePostfixModifierPosition:void 0}}if(s){const i=o;o=n=>s({className:n,parseClassName:i})}return o},Xf=e=>e.endsWith(ca)?e.substring(0,e.length-1):e.startsWith(ca)?e.substring(1):e,Jf=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const i=[];let n=[];return o.forEach(r=>{r[0]==="["||t[r]?(i.push(...n.sort(),r),n=[]):n.push(r)}),i.push(...n.sort()),i}},em=e=>({cache:Yf(e.cacheSize),parseClassName:Qf(e),sortModifiers:Jf(e),...Uf(e)}),tm=/\s+/,sm=(e,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:n}=t,r=[],a=e.trim().split(tm);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:u,modifiers:h,hasImportantModifier:g,baseClassName:f,maybePostfixModifierPosition:m}=s(d);if(u){l=d+(l.length>0?" "+l:l);continue}let v=!!m,w=o(v?f.substring(0,m):f);if(!w){if(!v){l=d+(l.length>0?" "+l:l);continue}if(w=o(f),!w){l=d+(l.length>0?" "+l:l);continue}v=!1}const b=n(h).join(":"),S=g?b+ca:b,R=S+w;if(r.includes(R))continue;r.push(R);const y=i(w,v);for(let x=0;x<y.length;++x){const F=y[x];r.push(S+F)}l=d+(l.length>0?" "+l:l)}return l};function om(){let e=0,t,s,o="";for(;e<arguments.length;)(t=arguments[e++])&&(s=mu(t))&&(o&&(o+=" "),o+=s);return o}const mu=e=>{if(typeof e=="string")return e;let t,s="";for(let o=0;o<e.length;o++)e[o]&&(t=mu(e[o]))&&(s&&(s+=" "),s+=t);return s};function im(e,...t){let s,o,i,n=r;function r(l){const c=t.reduce((d,u)=>u(d),e());return s=em(c),o=s.cache.get,i=s.cache.set,n=a,a(l)}function a(l){const c=o(l);if(c)return c;const d=sm(l,s);return i(l,d),d}return function(){return n(om.apply(null,arguments))}}const _e=e=>{const t=s=>s[e]||[];return t.isThemeGetter=!0,t},Cu=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,vu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,nm=/^\d+\/\d+$/,rm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,am=/\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$/,lm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Js=e=>nm.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),is=e=>!!e&&Number.isInteger(Number(e)),fr=e=>e.endsWith("%")&&ce(e.slice(0,-1)),zt=e=>rm.test(e),um=()=>!0,hm=e=>am.test(e)&&!lm.test(e),wu=()=>!1,gm=e=>cm.test(e),pm=e=>dm.test(e),fm=e=>!q(e)&&!Y(e),mm=e=>Mo(e,yu,wu),q=e=>Cu.test(e),Ss=e=>Mo(e,Ru,hm),mr=e=>Mo(e,Sm,ce),dc=e=>Mo(e,bu,wu),Cm=e=>Mo(e,Su,pm),Li=e=>Mo(e,xu,gm),Y=e=>vu.test(e),Go=e=>Io(e,Ru),vm=e=>Io(e,ym),uc=e=>Io(e,bu),wm=e=>Io(e,yu),bm=e=>Io(e,Su),Oi=e=>Io(e,xu,!0),Mo=(e,t,s)=>{const o=Cu.exec(e);return o?o[1]?t(o[1]):s(o[2]):!1},Io=(e,t,s=!1)=>{const o=vu.exec(e);return o?o[1]?t(o[1]):s:!1},bu=e=>e==="position"||e==="percentage",Su=e=>e==="image"||e==="url",yu=e=>e==="length"||e==="size"||e==="bg-size",Ru=e=>e==="length",Sm=e=>e==="number",ym=e=>e==="family-name",xu=e=>e==="shadow",Rm=()=>{const e=_e("color"),t=_e("font"),s=_e("text"),o=_e("font-weight"),i=_e("tracking"),n=_e("leading"),r=_e("breakpoint"),a=_e("container"),l=_e("spacing"),c=_e("radius"),d=_e("shadow"),u=_e("inset-shadow"),h=_e("text-shadow"),g=_e("drop-shadow"),f=_e("blur"),m=_e("perspective"),v=_e("aspect"),w=_e("ease"),b=_e("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],y=()=>[...R(),Y,q],x=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],P=()=>[Y,q,l],M=()=>[Js,"full","auto",...P()],A=()=>[is,"none","subgrid",Y,q],E=()=>["auto",{span:["full",is,Y,q]},is,Y,q],I=()=>[is,"auto",Y,q],O=()=>["auto","min","max","fr",Y,q],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],ie=()=>["auto",...P()],Q=()=>[Js,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],k=()=>[e,Y,q],ee=()=>[...R(),uc,dc,{position:[Y,q]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",wm,mm,{size:[Y,q]}],U=()=>[fr,Go,Ss],z=()=>["","none","full",c,Y,q],ne=()=>["",ce,Go,Ss],ve=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[ce,fr,uc,dc],xe=()=>["","none",f,Y,q],we=()=>["none",ce,Y,q],oe=()=>["none",ce,Y,q],He=()=>[ce,Y,q],Fe=()=>[Js,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[zt],breakpoint:[zt],color:[um],container:[zt],"drop-shadow":[zt],ease:["in","out","in-out"],font:[fm],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[zt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[zt],shadow:[zt],spacing:["px",ce],text:[zt],"text-shadow":[zt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Js,q,Y,v]}],container:["container"],columns:[{columns:[ce,q,Y,a]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:y()}],overflow:[{overflow:x()}],"overflow-x":[{"overflow-x":x()}],"overflow-y":[{"overflow-y":x()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[is,"auto",Y,q]}],basis:[{basis:[Js,"full","auto",a,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,Js,"auto","initial","none",q]}],grow:[{grow:["",ce,Y,q]}],shrink:[{shrink:["",ce,Y,q]}],order:[{order:[is,"first","last","none",Y,q]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],w:[{w:[a,"screen",...Q()]}],"min-w":[{"min-w":[a,"screen","none",...Q()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[r]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",s,Go,Ss]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Y,mr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",fr,q]}],"font-family":[{font:[vm,q,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Y,q]}],"line-clamp":[{"line-clamp":[ce,"none",Y,mr]}],leading:[{leading:[n,...P()]}],"list-image":[{"list-image":["none",Y,q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Y,q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",Y,Ss]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[ce,"auto",Y,q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y,q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y,q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},is,Y,q],radial:["",Y,q],conic:[is,Y,q]},bm,Cm]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,Y,q]}],"outline-w":[{outline:["",ce,Go,Ss]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",d,Oi,Li]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",u,Oi,Li]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[ce,Ss]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",h,Oi,Li]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[ce,Y,q]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[Y,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Y,q]}],filter:[{filter:["","none",Y,q]}],blur:[{blur:xe()}],brightness:[{brightness:[ce,Y,q]}],contrast:[{contrast:[ce,Y,q]}],"drop-shadow":[{"drop-shadow":["","none",g,Oi,Li]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",ce,Y,q]}],"hue-rotate":[{"hue-rotate":[ce,Y,q]}],invert:[{invert:["",ce,Y,q]}],saturate:[{saturate:[ce,Y,q]}],sepia:[{sepia:["",ce,Y,q]}],"backdrop-filter":[{"backdrop-filter":["","none",Y,q]}],"backdrop-blur":[{"backdrop-blur":xe()}],"backdrop-brightness":[{"backdrop-brightness":[ce,Y,q]}],"backdrop-contrast":[{"backdrop-contrast":[ce,Y,q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ce,Y,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ce,Y,q]}],"backdrop-invert":[{"backdrop-invert":["",ce,Y,q]}],"backdrop-opacity":[{"backdrop-opacity":[ce,Y,q]}],"backdrop-saturate":[{"backdrop-saturate":[ce,Y,q]}],"backdrop-sepia":[{"backdrop-sepia":["",ce,Y,q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Y,q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ce,"initial",Y,q]}],ease:[{ease:["linear","initial",w,Y,q]}],delay:[{delay:[ce,Y,q]}],animate:[{animate:["none",b,Y,q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Y,q]}],"perspective-origin":[{"perspective-origin":y()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:He()}],"skew-x":[{"skew-x":He()}],"skew-y":[{"skew-y":He()}],transform:[{transform:[Y,q,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Fe()}],"translate-x":[{"translate-x":Fe()}],"translate-y":[{"translate-y":Fe()}],"translate-z":[{"translate-z":Fe()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Y,q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",Y,q]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[ce,Go,Ss,mr]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},xm=im(Rm);function ue(...e){return xm($(e))}const Ks=({fieldTitle:e,htmlFor:t,optional:s,optionalText:o,cssClass:i,description:n})=>e?C.jsxs("label",{className:ue("dial-tiny text-secondary flex gap-1",i,!i?.includes("mb")&&"mb-2"),htmlFor:t,children:[typeof e=="string"?C.jsx("span",{className:"min-h-4",children:e}):e,s&&C.jsx("span",{children:o??"(Optional)"}),n&&C.jsx(Xt,{tooltip:n,children:C.jsx(Ee,{icon:C.jsx(j.IconInfoCircle,{size:14,className:"text-secondary"})})})]}):null;var De=(e=>(e.Primary="primary",e.Secondary="secondary",e.Tertiary="tertiary",e.Danger="danger",e))(De||{});const Fm={[De.Primary]:"dial-primary-button",[De.Secondary]:"dial-secondary-button",[De.Tertiary]:"dial-tertiary-button",[De.Danger]:"dial-danger-button"},Re=({title:e,variant:t,cssClass:s,textCssClass:o,ref:i,onClick:n,disable:r,iconAfter:a,iconBefore:l,hideTitleOnMobile:c,ariaLabel:d})=>{const u=$("dial-small-semi",a?"mr-2":"",l?"ml-2":"",c?"hidden sm:inline":"inline",o),h=$(t&&Fm[t],s,"focus-visible:outline outline-offset-0");return C.jsxs("button",{ref:i,type:"button",className:h,onClick:g=>n?.(g),disabled:r,"aria-label":e||d,children:[C.jsx(Ee,{icon:l}),e&&C.jsx("span",{className:u,children:e}),C.jsx(Ee,{icon:a})]})};var Fs=(e=>(e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e))(Fs||{});const Em={info:C.jsx(j.IconInfoCircle,{size:24,stroke:2}),error:C.jsx(j.IconAlertCircle,{size:24,stroke:2}),warning:C.jsx(j.IconAlertTriangle,{size:24,stroke:2}),success:C.jsx(j.IconCircleCheck,{size:24,stroke:2})},Dm={[Fs.Info]:"bg-info border-info text-info",[Fs.Success]:"bg-success border-success text-success",[Fs.Warning]:"bg-warning border-warning text-warning",[Fs.Error]:"bg-error border-error text-error"},Pm="items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex",Tm=({variant:e=Fs.Info,message:t,cssClass:s,closable:o=!1,onClose:i})=>C.jsxs("div",{role:"alert",className:$(Pm,Dm[e],s),children:[C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx(Ee,{icon:Em[e]}),C.jsx("div",{className:"text-primary",children:t})]}),o&&C.jsx(Re,{cssClass:"ml-2 text-secondary hover:text-primary",ariaLabel:"Close alert",iconBefore:C.jsx(j.IconX,{size:16}),onClick:n=>i?.(n)})]}),Mm="flex items-center justify-center text-secondary",Im="shrink-0 grow-0 basis-auto animate-spin-steps",km=e=>re.createElement("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},re.createElement("path",{d:"M24 39V46.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),re.createElement("path",{opacity:.4,d:"M9 24H1.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),re.createElement("path",{opacity:.5,d:"M8.0918 8.0918L13.3994 13.3994",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),re.createElement("path",{opacity:.6,d:"M24 1.5V9",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),re.createElement("path",{opacity:.7,d:"M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),re.createElement("path",{opacity:.8,d:"M46.5 24H39",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),re.createElement("path",{opacity:.9,d:"M34.6055 34.6055L39.9082 39.9082",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),re.createElement("path",{opacity:.3,d:"M13.3936 34.6055L8.08594 39.9131",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})),Ri=({size:e=18,cssClass:t,iconClass:s,fullWidth:o=!0,ariaLabel:i="Loading"})=>C.jsx("div",{role:"status",className:$({[Mm]:!0,"w-full h-full":o,[t||""]:!!t}),children:C.jsx(Ee,{icon:C.jsx(km,{width:e,height:e,className:$(Im,s),role:"img","aria-label":i})})}),ao=18,me={size:ao,stroke:2},Am="text-primary",Ft=({text:e,cssClass:t,contentClassName:s,hideTooltip:o,...i})=>{const n=p.useRef(null),[r,a]=p.useState(!1),[l,c]=p.useState(""),d=p.useRef(null),u=()=>{const m=n.current;if(!m)return;c(m.textContent??"");const v=m.clientWidth,w=m.scrollWidth,b=Math.ceil(m.getBoundingClientRect().width);a(w>v||w>b)},h=p.useCallback(()=>{d.current&&cancelAnimationFrame(d.current),d.current=requestAnimationFrame(u)},[]);p.useEffect(()=>{h();const m=()=>h();window.addEventListener("resize",m);let v=null;return"ResizeObserver"in window&&n.current&&(v=new ResizeObserver(()=>h()),v.observe(n.current)),()=>{window.removeEventListener("resize",m),v&&v.disconnect(),d.current&&cancelAnimationFrame(d.current)}},[e,h]);const g=p.useMemo(()=>typeof e=="string"?e:l,[l,e]),f=p.useMemo(()=>o?"":r?g:"",[g,o,r]);return C.jsxs(hu,{...i,children:[C.jsx(pu,{asChild:!0,onMouseEnter:h,onFocusCapture:h,children:C.jsx("span",{className:ue("block truncate flex-1 min-w-0 max-w-full text-left",t),"aria-label":r?g:void 0,onMouseEnter:h,onFocus:h,ref:n,children:e})}),C.jsx(gu,{className:ue(Am,s,!f&&"hidden"),children:f})]})},ni=({label:e,id:t,checked:s,indeterminate:o,disabled:i,ariaLabel:n,onChange:r,cssClass:a})=>{const l=p.useCallback(h=>{r?.(h.target.checked,t)},[r,t]),c=$("flex flex-row items-center cursor-pointer text-accent-primary small-medium flex-1 min-w-0",`${s||o?"":'before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:border before:border-hover before:rounded before:mr-2'}`,i?"pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4":"",a),d=$("mr-2 border rounded",i?"bg-layer-4 border-icon-secondary":""),u=()=>o?C.jsx(j.IconMinus,{className:d,...me}):s?C.jsx(j.IconCheck,{className:d,...me}):null;return C.jsxs("label",{className:c,htmlFor:t,children:[u(),e&&(typeof e=="string"?C.jsx(Ft,{text:e,cssClass:"text-primary"}):e),C.jsx("input",{type:"checkbox",role:"checkbox",name:t,onChange:l,id:t,checked:s,"aria-checked":o?"mixed":s,"aria-disabled":i||void 0,"aria-label":e?void 0:n,className:"invisible w-0 h-0"})]})};var ct=(e=>(e.VALID="valid",e.ERROR="error",e))(ct||{});const Lm=(e,t)=>{if(t===e.id)switch(e.status){case ct.VALID:return"border-accent-secondary text-primary";case ct.ERROR:return"border-red-900 text-primary";default:return"border-accent-primary text-primary"}switch(e.status){case ct.VALID:return"border-primary text-primary";case ct.ERROR:return"border-red-900 text-error";default:return"border-primary text-secondary"}},Om=(e,t)=>{if(t===e.id)switch(e.status){case ct.VALID:return"bg-accent-secondary";case ct.ERROR:return"bg-red-400";default:return"bg-accent-primary"}switch(e.status){case ct.VALID:return"bg-accent-secondary";case ct.ERROR:return"bg-red-400";default:return"bg-layer-4"}},Nm=({step:e,index:t,currentStep:s,onChangeStep:o})=>{const i="h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny cursor-pointer dial-step",n="w-[22px] h-[22px] flex justify-center items-center mr-2 rounded-full text-white",r=()=>s===e.id&&e.status===ct.ERROR?C.jsx(j.IconExclamationCircle,{stroke:2,size:16}):s!==e.id&&e.status===ct.VALID?C.jsx(j.IconCheck,{stroke:2,size:16}):t+1;return C.jsxs("button",{className:$(i,Lm(e,s)),onClick:()=>o(e.id),children:[C.jsx("span",{className:$(n,Om(e,s)),children:r()}),C.jsx("span",{children:e.name})]})},Hm=({steps:e,currentStep:t,onChangeStep:s})=>{const o=i=>{const n=e.findIndex(a=>a.id===t),r=e.findIndex(a=>a.id===i);(i!==t&&e[n].status===ct.VALID||r<n)&&s(i)};return C.jsx("div",{id:"steps",className:"flex gap-x-3",children:e.map((i,n)=>C.jsx(Nm,{currentStep:t,onChangeStep:o,step:i,index:n},i.id))})},Fu=({name:e,value:t,title:s,description:o,checked:i=!1,inputId:n,cssClass:r,labelCssClass:a,disabled:l,onChange:c,descriptionCssClass:d})=>{const u=`${n}-desc`,h=$("dial-small cursor-pointer",l?"text-secondary":"text-primary",a),g=$("cursor-pointer dial-input-radio",s&&"mr-2",r),f=$("flex flex-col",!!o&&"mb-2"),m=$("dial-tiny mt-2 ml-[26px] text-secondary",d),v=w=>{l||w.target.checked&&c?.(t)};return C.jsxs("div",{className:f,children:[C.jsxs("div",{className:"flex flex-row items-center",children:[C.jsx("input",{type:"radio",id:n,name:e,value:t,checked:i,disabled:l,"aria-describedby":i&&o?u:void 0,className:g,onChange:v}),s?C.jsx("label",{className:h,htmlFor:n,children:s}):null]}),i&&o&&C.jsx("div",{id:u,className:m,children:o})]})};var ri=(e=>(e.Vertical="vertical",e.Horizontal="horizontal",e))(ri||{});const Gm="w-full flex",Vm={[ri.Vertical]:"flex-col",[ri.Horizontal]:"flex-row items-end"},jn=({elementId:e,label:t,optional:s,optionalText:o,description:i,error:n,orientation:r=ri.Vertical,labelVisuallyHidden:a=!1,cssClass:l,labelCssClass:c,errorCssClass:d,childrenCssClass:u,captionDescription:h,readonly:g,value:f,defaultEmptyText:m,children:v})=>{const w=`${e}-label`,b=i?`${e}-desc`:void 0,S=n?`${e}-err`:void 0,R=`${e}-caption-desc`,y=[b,S].filter(Boolean).join(" ")||void 0,x=p.useCallback(()=>typeof n=="boolean"?null:typeof n=="string"||typeof n>"u"?n?C.jsx("div",{id:S,role:"alert","aria-live":"polite",className:d,children:C.jsx(us,{errorText:n})}):null:C.jsx("div",{id:S,role:"alert","aria-live":"polite",className:d,children:n}),[n,d,S]),F=p.useCallback(()=>f?typeof f=="string"||typeof f=="number"?C.jsx("span",{"aria-readonly":"true",children:f}):f:C.jsx("span",{className:"flex min-h-4","aria-readonly":"true",children:m??"None"}),[f,m]);return C.jsxs("div",{role:"group","aria-labelledby":t?w:void 0,"aria-describedby":y,className:ue(Gm,Vm[r],l),children:[t&&C.jsx("div",{id:w,className:ue(r==="horizontal"&&"shrink-0"),children:C.jsx(Ks,{htmlFor:e,fieldTitle:t,optional:s,optionalText:o,cssClass:ue(a&&"sr-only",c),description:i})}),C.jsxs("div",{className:ue("min-w-0 w-full",u),children:[g?C.jsx("div",{className:"dial-input px-3 py-2",children:F()}):v,h&&C.jsx("div",{id:R,className:ue({"dial-tiny text-secondary mt-1":!0,"text-error":!!n}),children:h}),x()]})]})};var ai=(e=>(e.Row="Row",e.Column="Column",e))(ai||{});const Bm="flex",zm="pb-1 mt-2",Wm={[ai.Column]:"flex-col gap-y-3",[ai.Row]:"flex-row gap-x-6"},Eu=({fieldTitle:e,radioCssClass:t,containerCssClass:s,selectedItemCssClass:o,selectedLabelCssClass:i,radioGroupCssClass:n,inputContainerCssClass:r,selectedInputContainerCssClass:a,groupLabelCssClass:l,formItemChildrenCssClass:c,labelCssClass:d,disabled:u,elementId:h,radioButtons:g,activeRadioButton:f,orientation:m,onChange:v})=>C.jsx(jn,{elementId:h,label:e,labelCssClass:l||d,cssClass:s,childrenCssClass:c,children:C.jsx("div",{role:"radiogroup","aria-label":e,"aria-disabled":u||void 0,className:ue(Bm,Wm[m],n),children:g.map(w=>C.jsxs("div",{className:ue("flex flex-col",r,w.id===f&&a),children:[C.jsx(Fu,{name:h,value:w.id,inputId:w.id,disabled:u,cssClass:t,labelCssClass:ue(d,w.id===f&&i),title:w.name,checked:w.id===f,onChange:()=>v(w.id)}),w.id===f&&w.content?C.jsx("div",{className:ue(zm,o),children:w.content}):null]},w.id))})}),Un=({icon:e,title:t,description:s,containerCssClass:o,titleCssClass:i,descriptionCssClass:n})=>C.jsxs("div",{className:ue("h-full w-full flex flex-col items-center justify-center text-secondary",o),children:[e||C.jsx(j.IconClipboardX,{width:60,height:60}),C.jsx("span",{className:ue("dial-small mt-2 text-primary",i),children:t}),s&&C.jsx("span",{className:ue("mt-1 text-primary",n),children:s})]}),Cr=48,Du=({containerCssClass:e,children:t,width:s=280,title:o,iconSize:i=24,iconStroke:n=1.5,titleCssClass:r,additionalButtons:a,isOpened:l,onToggle:c})=>{const[d,u]=p.useState(s),[h,g]=p.useState(!0),f=p.useMemo(()=>typeof l=="boolean",[l]),m=f?l:h;p.useEffect(()=>{f&&u(l?s:Cr)},[f,l,s]);const v=$(["transform rotate-180 [writing-mode:tb-rl] py-4 px-3",m&&"hidden",r]),w=$(["flex flex-row gap-2 cursor-pointer text-secondary p-2 px-4",m?"justify-end":"justify-center"]),b=S=>{const R=!m;if(f){u(R?s:Cr),c?.(R,S);return}u(R?s:Cr),g(R)};return C.jsxs("div",{className:$(["rounded flex flex-col justify-between overflow-y-auto flex-shrink-0",e]),style:{width:`${d}px`},children:[C.jsx("div",{className:$(["flex-1 p-4 min-h-0 overflow-auto",!m&&"hidden"]),children:t}),C.jsx("div",{className:v,children:o}),C.jsxs("div",{className:ue("border-t stroke-primary h-12",w),children:[m&&a,C.jsx(Re,{cssClass:"hover:text-icon-accent-primary p-1",onClick:b,iconBefore:m?C.jsx(j.IconChevronsLeft,{size:i,stroke:n}):C.jsx(j.IconChevronsRight,{size:i,stroke:n})})]})]})},_m=({label:e,text:t,children:s,postfix:o})=>C.jsxs("div",{className:$("flex flex-col",s?"":"max-w-[200px]"),children:[C.jsx("label",{className:"dial-tiny mb-2 text-secondary",children:e}),s||C.jsxs("div",{className:"flex flex-row items-center",children:[C.jsx(Xt,{triggerClassName:"text-primary",tooltip:t,children:t}),o||null]})]});var $n=(e=>(e.Default="default",e))($n||{});const jm={[$n.Default]:"border-icon-secondary bg-layer-3"},Kn=({tag:e,cssClass:t,remove:s,variant:o=$n.Default,iconBefore:i,bordered:n=!0})=>{const r=jm[o],a=ue("flex items-center gap-1 dial-tiny rounded p-1 h-[22px] text-primary",r,n?"border":"border-transparent",t);return C.jsxs("div",{className:a,children:[C.jsx(Ee,{icon:i}),C.jsx(Ft,{text:e}),s&&C.jsx(Re,{iconAfter:C.jsx(j.IconX,{size:16}),onClick:l=>s(l)})]},e)},Pu=p.createContext({dragDropManager:void 0});function pt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var hc=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),gc=function(){return Math.random().toString(36).substring(7).split("").join(".")},pc={INIT:"@@redux/INIT"+gc(),REPLACE:"@@redux/REPLACE"+gc()};function Um(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function $m(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(Ym(e))return"date";if(qm(e))return"error";var s=Km(e);switch(s){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return s}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function Km(e){return typeof e.constructor=="function"?e.constructor.name:null}function qm(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Ym(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function eo(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=$m(e)),t}function Tu(e,t,s){var o;if(typeof t=="function"&&typeof s=="function"||typeof s=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?pt(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof s>"u"&&(s=t,t=void 0),typeof s<"u"){if(typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?pt(1):"Expected the enhancer to be a function. Instead, received: '"+eo(s)+"'");return s(Tu)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?pt(2):"Expected the root reducer to be a function. Instead, received: '"+eo(e)+"'");var i=e,n=t,r=[],a=r,l=!1;function c(){a===r&&(a=r.slice())}function d(){if(l)throw new Error(process.env.NODE_ENV==="production"?pt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return n}function u(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?pt(4):"Expected the listener to be a function. Instead, received: '"+eo(m)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?pt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var v=!0;return c(),a.push(m),function(){if(v){if(l)throw new Error(process.env.NODE_ENV==="production"?pt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");v=!1,c();var b=a.indexOf(m);a.splice(b,1),r=null}}}function h(m){if(!Um(m))throw new Error(process.env.NODE_ENV==="production"?pt(7):"Actions must be plain objects. Instead, the actual type was: '"+eo(m)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof m.type>"u")throw new Error(process.env.NODE_ENV==="production"?pt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(l)throw new Error(process.env.NODE_ENV==="production"?pt(9):"Reducers may not dispatch actions.");try{l=!0,n=i(n,m)}finally{l=!1}for(var v=r=a,w=0;w<v.length;w++){var b=v[w];b()}return m}function g(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?pt(10):"Expected the nextReducer to be a function. Instead, received: '"+eo(m));i=m,h({type:pc.REPLACE})}function f(){var m,v=u;return m={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?pt(11):"Expected the observer to be an object. Instead, received: '"+eo(b)+"'");function S(){b.next&&b.next(d())}S();var R=v(S);return{unsubscribe:R}}},m[hc]=function(){return this},m}return h({type:pc.INIT}),o={dispatch:h,subscribe:u,getState:d,replaceReducer:g},o[hc]=f,o}function le(e,t,...s){if(Zm()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let o;if(t===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;o=new Error(t.replace(/%s/g,function(){return s[i++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}function Zm(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function Qm(e,t,s){return t.split(".").reduce((o,i)=>o&&o[i]?o[i]:s||null,e)}function Xm(e,t){return e.filter(s=>s!==t)}function Mu(e){return typeof e=="object"}function Jm(e,t){const s=new Map,o=n=>{s.set(n,s.has(n)?s.get(n)+1:1)};e.forEach(o),t.forEach(o);const i=[];return s.forEach((n,r)=>{n===1&&i.push(r)}),i}function eC(e,t){return e.filter(s=>t.indexOf(s)>-1)}const Ja="dnd-core/INIT_COORDS",qn="dnd-core/BEGIN_DRAG",el="dnd-core/PUBLISH_DRAG_SOURCE",Yn="dnd-core/HOVER",Zn="dnd-core/DROP",Qn="dnd-core/END_DRAG";function fc(e,t){return{type:Ja,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const tC={type:Ja,payload:{clientOffset:null,sourceClientOffset:null}};function sC(e){return function(s=[],o={publishSource:!0}){const{publishSource:i=!0,clientOffset:n,getSourceClientOffset:r}=o,a=e.getMonitor(),l=e.getRegistry();e.dispatch(fc(n)),oC(s,a,l);const c=rC(s,a);if(c==null){e.dispatch(tC);return}let d=null;if(n){if(!r)throw new Error("getSourceClientOffset must be defined");iC(r),d=r(c)}e.dispatch(fc(n,d));const h=l.getSource(c).beginDrag(a,c);if(h==null)return;nC(h),l.pinSource(c);const g=l.getSourceType(c);return{type:qn,payload:{itemType:g,item:h,sourceId:c,clientOffset:n||null,sourceClientOffset:d||null,isSourcePublic:!!i}}}}function oC(e,t,s){le(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(o){le(s.getSource(o),"Expected sourceIds to be registered.")})}function iC(e){le(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function nC(e){le(Mu(e),"Item must be an object.")}function rC(e,t){let s=null;for(let o=e.length-1;o>=0;o--)if(t.canDragSource(e[o])){s=e[o];break}return s}function aC(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function lC(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){aC(e,i,s[i])})}return e}function cC(e){return function(s={}){const o=e.getMonitor(),i=e.getRegistry();dC(o),gC(o).forEach((r,a)=>{const l=uC(r,a,i,o),c={type:Zn,payload:{dropResult:lC({},s,l)}};e.dispatch(c)})}}function dC(e){le(e.isDragging(),"Cannot call drop while not dragging."),le(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function uC(e,t,s,o){const i=s.getTarget(e);let n=i?i.drop(o,e):void 0;return hC(n),typeof n>"u"&&(n=t===0?{}:o.getDropResult()),n}function hC(e){le(typeof e>"u"||Mu(e),"Drop result must either be an object or undefined.")}function gC(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function pC(e){return function(){const s=e.getMonitor(),o=e.getRegistry();fC(s);const i=s.getSourceId();return i!=null&&(o.getSource(i,!0).endDrag(s,i),o.unpinSource()),{type:Qn}}}function fC(e){le(e.isDragging(),"Cannot call endDrag while not dragging.")}function ua(e,t){return t===null?e===null:Array.isArray(e)?e.some(s=>s===t):e===t}function mC(e){return function(s,{clientOffset:o}={}){CC(s);const i=s.slice(0),n=e.getMonitor(),r=e.getRegistry(),a=n.getItemType();return wC(i,r,a),vC(i,n,r),bC(i,n,r),{type:Yn,payload:{targetIds:i,clientOffset:o||null}}}}function CC(e){le(Array.isArray(e),"Expected targetIds to be an array.")}function vC(e,t,s){le(t.isDragging(),"Cannot call hover while not dragging."),le(!t.didDrop(),"Cannot call hover after drop.");for(let o=0;o<e.length;o++){const i=e[o];le(e.lastIndexOf(i)===o,"Expected targetIds to be unique in the passed array.");const n=s.getTarget(i);le(n,"Expected targetIds to be registered.")}}function wC(e,t,s){for(let o=e.length-1;o>=0;o--){const i=e[o],n=t.getTargetType(i);ua(n,s)||e.splice(o,1)}}function bC(e,t,s){e.forEach(function(o){s.getTarget(o).hover(t,o)})}function SC(e){return function(){if(e.getMonitor().isDragging())return{type:el}}}function yC(e){return{beginDrag:sC(e),publishDragSource:SC(e),hover:mC(e),drop:cC(e),endDrag:pC(e)}}class RC{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:s}=this.store;function o(n){return(...r)=>{const a=n.apply(t,r);typeof a<"u"&&s(a)}}const i=yC(this);return Object.keys(i).reduce((n,r)=>{const a=i[r];return n[r]=o(a),n},{})}dispatch(t){this.store.dispatch(t)}constructor(t,s){this.isSetUp=!1,this.handleRefCountChange=()=>{const o=this.store.getState().refCount>0;this.backend&&(o&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!o&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=s,t.subscribe(this.handleRefCountChange)}}function xC(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Iu(e,t){return{x:e.x-t.x,y:e.y-t.y}}function FC(e){const{clientOffset:t,initialClientOffset:s,initialSourceClientOffset:o}=e;return!t||!s||!o?null:Iu(xC(t,o),s)}function EC(e){const{clientOffset:t,initialClientOffset:s}=e;return!t||!s?null:Iu(t,s)}const qo=[],tl=[];qo.__IS_NONE__=!0;tl.__IS_ALL__=!0;function DC(e,t){return e===qo?!1:e===tl||typeof t>"u"?!0:eC(t,e).length>0}class PC{subscribeToStateChange(t,s={}){const{handlerIds:o}=s;le(typeof t=="function","listener must be a function."),le(typeof o>"u"||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const n=()=>{const r=this.store.getState(),a=r.stateId;try{a===i||a===i+1&&!DC(r.dirtyHandlerIds,o)||t()}finally{i=a}};return this.store.subscribe(n)}subscribeToOffsetChange(t){le(typeof t=="function","listener must be a function.");let s=this.store.getState().dragOffset;const o=()=>{const i=this.store.getState().dragOffset;i!==s&&(s=i,t())};return this.store.subscribe(o)}canDragSource(t){if(!t)return!1;const s=this.registry.getSource(t);return le(s,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:s.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const s=this.registry.getTarget(t);if(le(s,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const o=this.registry.getTargetType(t),i=this.getItemType();return ua(o,i)&&s.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const s=this.registry.getSource(t,!0);if(le(s,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const o=this.registry.getSourceType(t),i=this.getItemType();return o!==i?!1:s.isDragging(this,t)}isOverTarget(t,s={shallow:!1}){if(!t)return!1;const{shallow:o}=s;if(!this.isDragging())return!1;const i=this.registry.getTargetType(t),n=this.getItemType();if(n&&!ua(i,n))return!1;const r=this.getTargetIds();if(!r.length)return!1;const a=r.indexOf(t);return o?a===r.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return FC(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return EC(this.store.getState().dragOffset)}constructor(t,s){this.store=t,this.registry=s}}const mc=typeof global<"u"?global:self,ku=mc.MutationObserver||mc.WebKitMutationObserver;function Au(e){return function(){const s=setTimeout(i,0),o=setInterval(i,50);function i(){clearTimeout(s),clearInterval(o),e()}}}function TC(e){let t=1;const s=new ku(e),o=document.createTextNode("");return s.observe(o,{characterData:!0}),function(){t=-t,o.data=t}}const MC=typeof ku=="function"?TC:Au;class IC{enqueueTask(t){const{queue:s,requestFlush:o}=this;s.length||(o(),this.flushing=!0),s[s.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const s=this.index;if(this.index++,t[s].call(),this.index>this.capacity){for(let o=0,i=t.length-this.index;o<i;o++)t[o]=t[o+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=MC(this.flush),this.requestErrorThrow=Au(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class kC{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,s){this.onError=t,this.release=s,this.task=null}}class AC{create(t){const s=this.freeTasks,o=s.length?s.pop():new kC(this.onError,i=>s[s.length]=i);return o.task=t,o}constructor(t){this.onError=t,this.freeTasks=[]}}const Lu=new IC,LC=new AC(Lu.registerPendingError);function OC(e){Lu.enqueueTask(LC.create(e))}const sl="dnd-core/ADD_SOURCE",ol="dnd-core/ADD_TARGET",il="dnd-core/REMOVE_SOURCE",Xn="dnd-core/REMOVE_TARGET";function NC(e){return{type:sl,payload:{sourceId:e}}}function HC(e){return{type:ol,payload:{targetId:e}}}function GC(e){return{type:il,payload:{sourceId:e}}}function VC(e){return{type:Xn,payload:{targetId:e}}}function BC(e){le(typeof e.canDrag=="function","Expected canDrag to be a function."),le(typeof e.beginDrag=="function","Expected beginDrag to be a function."),le(typeof e.endDrag=="function","Expected endDrag to be a function.")}function zC(e){le(typeof e.canDrop=="function","Expected canDrop to be a function."),le(typeof e.hover=="function","Expected hover to be a function."),le(typeof e.drop=="function","Expected beginDrag to be a function.")}function ha(e,t){if(t&&Array.isArray(e)){e.forEach(s=>ha(s,!1));return}le(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var Ct;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(Ct||(Ct={}));let WC=0;function _C(){return WC++}function jC(e){const t=_C().toString();switch(e){case Ct.SOURCE:return`S${t}`;case Ct.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function Cc(e){switch(e[0]){case"S":return Ct.SOURCE;case"T":return Ct.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function vc(e,t){const s=e.entries();let o=!1;do{const{done:i,value:[,n]}=s.next();if(n===t)return!0;o=!!i}while(!o);return!1}class UC{addSource(t,s){ha(t),BC(s);const o=this.addHandler(Ct.SOURCE,t,s);return this.store.dispatch(NC(o)),o}addTarget(t,s){ha(t,!0),zC(s);const o=this.addHandler(Ct.TARGET,t,s);return this.store.dispatch(HC(o)),o}containsHandler(t){return vc(this.dragSources,t)||vc(this.dropTargets,t)}getSource(t,s=!1){return le(this.isSourceId(t),"Expected a valid source ID."),s&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return le(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return le(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return le(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return Cc(t)===Ct.SOURCE}isTargetId(t){return Cc(t)===Ct.TARGET}removeSource(t){le(this.getSource(t),"Expected an existing source."),this.store.dispatch(GC(t)),OC(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){le(this.getTarget(t),"Expected an existing target."),this.store.dispatch(VC(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const s=this.getSource(t);le(s,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=s}unpinSource(){le(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,s,o){const i=jC(t);return this.types.set(i,s),t===Ct.SOURCE?this.dragSources.set(i,o):t===Ct.TARGET&&this.dropTargets.set(i,o),i}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const $C=(e,t)=>e===t;function KC(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function qC(e,t,s=$C){if(e.length!==t.length)return!1;for(let o=0;o<e.length;++o)if(!s(e[o],t[o]))return!1;return!0}function YC(e=qo,t){switch(t.type){case Yn:break;case sl:case ol:case Xn:case il:return qo;case qn:case el:case Qn:case Zn:default:return tl}const{targetIds:s=[],prevTargetIds:o=[]}=t.payload,i=Jm(s,o);if(!(i.length>0||!qC(s,o)))return qo;const r=o[o.length-1],a=s[s.length-1];return r!==a&&(r&&i.push(r),a&&i.push(a)),i}function ZC(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function QC(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){ZC(e,i,s[i])})}return e}const wc={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function XC(e=wc,t){const{payload:s}=t;switch(t.type){case Ja:case qn:return{initialSourceClientOffset:s.sourceClientOffset,initialClientOffset:s.clientOffset,clientOffset:s.clientOffset};case Yn:return KC(e.clientOffset,s.clientOffset)?e:QC({},e,{clientOffset:s.clientOffset});case Qn:case Zn:return wc;default:return e}}function JC(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function to(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){JC(e,i,s[i])})}return e}const ev={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function tv(e=ev,t){const{payload:s}=t;switch(t.type){case qn:return to({},e,{itemType:s.itemType,item:s.item,sourceId:s.sourceId,isSourcePublic:s.isSourcePublic,dropResult:null,didDrop:!1});case el:return to({},e,{isSourcePublic:!0});case Yn:return to({},e,{targetIds:s.targetIds});case Xn:return e.targetIds.indexOf(s.targetId)===-1?e:to({},e,{targetIds:Xm(e.targetIds,s.targetId)});case Zn:return to({},e,{dropResult:s.dropResult,didDrop:!0,targetIds:[]});case Qn:return to({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function sv(e=0,t){switch(t.type){case sl:case ol:return e+1;case il:case Xn:return e-1;default:return e}}function ov(e=0){return e+1}function iv(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function nv(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){iv(e,i,s[i])})}return e}function rv(e={},t){return{dirtyHandlerIds:YC(e.dirtyHandlerIds,{type:t.type,payload:nv({},t.payload,{prevTargetIds:Qm(e,"dragOperation.targetIds",[])})}),dragOffset:XC(e.dragOffset,t),refCount:sv(e.refCount,t),dragOperation:tv(e.dragOperation,t),stateId:ov(e.stateId)}}function av(e,t=void 0,s={},o=!1){const i=lv(o),n=new PC(i,new UC(i)),r=new RC(i,n),a=e(r,t,s);return r.receiveBackend(a),r}function lv(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Tu(rv,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function cv(e,t){if(e==null)return{};var s=dv(e,t),o,i;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}function dv(e,t){if(e==null)return{};var s={},o=Object.keys(e),i,n;for(n=0;n<o.length;n++)i=o[n],!(t.indexOf(i)>=0)&&(s[i]=e[i]);return s}let bc=0;const Yi=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var uv=p.memo(function(t){var{children:s}=t,o=cv(t,["children"]);const[i,n]=hv(o);return p.useEffect(()=>{if(n){const r=Ou();return++bc,()=>{--bc===0&&(r[Yi]=null)}}},[]),C.jsx(Pu.Provider,{value:i,children:s})});function hv(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=gv(e.backend,e.context,e.options,e.debugMode),s=!e.context;return[t,s]}function gv(e,t=Ou(),s,o){const i=t;return i[Yi]||(i[Yi]={dragDropManager:av(e,t,s,o)}),i[Yi]}function Ou(){return typeof global<"u"?global:window}function pv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vr,Sc;function fv(){return Sc||(Sc=1,vr=function e(t,s){if(t===s)return!0;if(t&&s&&typeof t=="object"&&typeof s=="object"){if(t.constructor!==s.constructor)return!1;var o,i,n;if(Array.isArray(t)){if(o=t.length,o!=s.length)return!1;for(i=o;i--!==0;)if(!e(t[i],s[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===s.source&&t.flags===s.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===s.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===s.toString();if(n=Object.keys(t),o=n.length,o!==Object.keys(s).length)return!1;for(i=o;i--!==0;)if(!Object.prototype.hasOwnProperty.call(s,n[i]))return!1;for(i=o;i--!==0;){var r=n[i];if(!e(t[r],s[r]))return!1}return!0}return t!==t&&s!==s}),vr}var mv=fv();const Cv=pv(mv),Hs=typeof window<"u"?p.useLayoutEffect:p.useEffect;function vv(e,t,s){const[o,i]=p.useState(()=>t(e)),n=p.useCallback(()=>{const r=t(e);Cv(o,r)||(i(r),s&&s())},[o,e,s]);return Hs(n),[o,n]}function wv(e,t,s){const[o,i]=vv(e,t,s);return Hs(function(){const r=e.getHandlerId();if(r!=null)return e.subscribeToStateChange(i,{handlerIds:[r]})},[e,i]),o}function Nu(e,t,s){return wv(t,e||(()=>({})),()=>s.reconnect())}function Hu(e,t){const s=[...t||[]];return t==null&&typeof e!="function"&&s.push(e),p.useMemo(()=>typeof e=="function"?e():e,s)}function bv(e){return p.useMemo(()=>e.hooks.dragSource(),[e])}function Sv(e){return p.useMemo(()=>e.hooks.dragPreview(),[e])}let wr=!1,br=!1;class yv{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){le(!wr,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return wr=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{wr=!1}}isDragging(){if(!this.sourceId)return!1;le(!br,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return br=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{br=!1}}subscribeToStateChange(t,s){return this.internalMonitor.subscribeToStateChange(t,s)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,s){return this.internalMonitor.isOverTarget(t,s)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let Sr=!1;class Rv{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,s){return this.internalMonitor.subscribeToStateChange(t,s)}canDrop(){if(!this.targetId)return!1;le(!Sr,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Sr=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Sr=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function xv(e,t,s){const o=s.getRegistry(),i=o.addTarget(e,t);return[i,()=>o.removeTarget(i)]}function Fv(e,t,s){const o=s.getRegistry(),i=o.addSource(e,t);return[i,()=>o.removeSource(i)]}function ga(e,t,s,o){let i;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let l=0;l<n.length;l++){const c=n[l];if(!a(c))return!1;const d=e[c],u=t[c];if(i=void 0,i===!1||i===void 0&&d!==u)return!1}return!0}function pa(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ev(e){if(typeof e.type=="string")return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function Dv(e){return(t=null,s=null)=>{if(!p.isValidElement(t)){const n=t;return e(n,s),n}const o=t;return Ev(o),Pv(o,s?n=>e(n,s):e)}}function Gu(e){const t={};return Object.keys(e).forEach(s=>{const o=e[s];if(s.endsWith("Ref"))t[s]=e[s];else{const i=Dv(o);t[s]=()=>i}}),t}function yc(e,t){typeof e=="function"?e(t):e.current=t}function Pv(e,t){const s=e.ref;return le(typeof s!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),s?p.cloneElement(e,{ref:o=>{yc(s,o),yc(t,o)}}):p.cloneElement(e,{ref:t})}class Tv{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,s=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return s&&this.disconnectDragSource(),this.handlerId?t?(s&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),s):(this.lastConnectedDragSource=t,s):s}reconnectDragPreview(t=!1){const s=this.dragPreview,o=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(o&&this.disconnectDragPreview(),!!this.handlerId){if(!s){this.lastConnectedDragPreview=s;return}o&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=s,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,s,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!ga(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!ga(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=Gu({dragSource:(s,o)=>{this.clearDragSource(),this.dragSourceOptions=o||null,pa(s)?this.dragSourceRef=s:this.dragSourceNode=s,this.reconnectDragSource()},dragPreview:(s,o)=>{this.clearDragPreview(),this.dragPreviewOptions=o||null,pa(s)?this.dragPreviewRef=s:this.dragPreviewNode=s,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class Mv{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const s=this.dropTarget;if(this.handlerId){if(!s){this.lastConnectedDropTarget=s;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=s,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,s,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!ga(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=Gu({dropTarget:(s,o)=>{this.clearDropTarget(),this.dropTargetOptions=o,pa(s)?this.dropTargetRef=s:this.dropTargetNode=s,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function ko(){const{dragDropManager:e}=p.useContext(Pu);return le(e!=null,"Expected drag drop context"),e}function Iv(e,t){const s=ko(),o=p.useMemo(()=>new Tv(s.getBackend()),[s]);return Hs(()=>(o.dragSourceOptions=e||null,o.reconnect(),()=>o.disconnectDragSource()),[o,e]),Hs(()=>(o.dragPreviewOptions=t||null,o.reconnect(),()=>o.disconnectDragPreview()),[o,t]),o}function kv(){const e=ko();return p.useMemo(()=>new yv(e),[e])}class Av{beginDrag(){const t=this.spec,s=this.monitor;let o=null;return typeof t.item=="object"?o=t.item:typeof t.item=="function"?o=t.item(s):o={},o??null}canDrag(){const t=this.spec,s=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(s):!0}isDragging(t,s){const o=this.spec,i=this.monitor,{isDragging:n}=o;return n?n(i):s===t.getSourceId()}endDrag(){const t=this.spec,s=this.monitor,o=this.connector,{end:i}=t;i&&i(s.getItem(),s),o.reconnect()}constructor(t,s,o){this.spec=t,this.monitor=s,this.connector=o}}function Lv(e,t,s){const o=p.useMemo(()=>new Av(e,t,s),[t,s]);return p.useEffect(()=>{o.spec=e},[e]),o}function Ov(e){return p.useMemo(()=>{const t=e.type;return le(t!=null,"spec.type must be defined"),t},[e])}function Nv(e,t,s){const o=ko(),i=Lv(e,t,s),n=Ov(e);Hs(function(){if(n!=null){const[a,l]=Fv(n,i,o);return t.receiveHandlerId(a),s.receiveHandlerId(a),l}},[o,t,s,i,n])}function Hv(e,t){const s=Hu(e,t);le(!s.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const o=kv(),i=Iv(s.options,s.previewOptions);return Nv(s,o,i),[Nu(s.collect,o,i),bv(i),Sv(i)]}function Gv(e){return p.useMemo(()=>e.hooks.dropTarget(),[e])}function Vv(e){const t=ko(),s=p.useMemo(()=>new Mv(t.getBackend()),[t]);return Hs(()=>(s.dropTargetOptions=e||null,s.reconnect(),()=>s.disconnectDropTarget()),[e]),s}function Bv(){const e=ko();return p.useMemo(()=>new Rv(e),[e])}function zv(e){const{accept:t}=e;return p.useMemo(()=>(le(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class Wv{canDrop(){const t=this.spec,s=this.monitor;return t.canDrop?t.canDrop(s.getItem(),s):!0}hover(){const t=this.spec,s=this.monitor;t.hover&&t.hover(s.getItem(),s)}drop(){const t=this.spec,s=this.monitor;if(t.drop)return t.drop(s.getItem(),s)}constructor(t,s){this.spec=t,this.monitor=s}}function _v(e,t){const s=p.useMemo(()=>new Wv(e,t),[t]);return p.useEffect(()=>{s.spec=e},[e]),s}function jv(e,t,s){const o=ko(),i=_v(e,t),n=zv(e);Hs(function(){const[a,l]=xv(n,i,o);return t.receiveHandlerId(a),s.receiveHandlerId(a),l},[o,t,i,s,n.map(r=>r.toString()).join("|")])}function Vu(e,t){const s=Hu(e,t),o=Bv(),i=Vv(s.options);return jv(s,o,i),[Nu(s.collect,o,i),Gv(i)]}const Rc="column",Uv="flex items-center",$v="mr-3 cursor-move text-secondary",Kv=({id:e,children:t,cssClass:s,findItem:o,moveItem:i,handleAriaLabel:n="Drag item"})=>{const r=p.useRef(null),a=p.useRef(null),l=typeof o=="function"?o(e):-1,[{isDragging:c},d,u]=Hv(()=>({type:Rc,item:{id:e,originalIndex:l},collect:g=>{const f=g.getItem();return{isDragging:g.isDragging()&&f?.id===e}},end:(g,f)=>{if(!g)return;!f.didDrop()&&typeof i=="function"&&g.originalIndex>-1&&i(g.id,g.originalIndex)}}),[e,l,i]),[,h]=Vu(()=>({accept:Rc,hover:g=>{if(!(!g||g.id===e)&&typeof o=="function"&&typeof i=="function"){const f=o(e);i(g.id,f)}}}),[o,i,e]);return u(h(a)),d(r),C.jsxs("div",{ref:a,className:ue(Uv,s),style:{opacity:c?0:1},"aria-roledescription":"Draggable item",children:[C.jsx("div",{ref:r,className:$v,"aria-label":n,children:C.jsx(j.IconGripVertical,{...me})}),t]})},qv=e=>re.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},re.createElement("path",{d:"M3.68628 10.3945C3.91003 10.408 4.10927 10.4422 4.2832 10.4978L4.28394 10.4971C4.5167 10.5698 4.71621 10.6662 4.87939 10.7871C4.9994 10.876 5.10332 10.974 5.18994 11.0815L5.27051 11.1929L5.27197 11.1943L5.34009 11.3079C5.38301 11.3838 5.42067 11.4597 5.45288 11.5356L5.49683 11.6492L5.49756 11.6514L5.53198 11.7649C5.56274 11.877 5.5838 11.9867 5.59497 12.0938C5.61194 12.23 5.62059 12.3501 5.62061 12.4534C5.62061 12.6166 5.57231 12.7639 5.47559 12.8906C5.41544 12.9694 5.325 13.0198 5.21997 13.0503C5.11455 13.0809 4.98537 13.0942 4.83691 13.0942C4.73711 13.0942 4.62608 13.0838 4.50439 13.0635C4.37577 13.0415 4.26002 12.9966 4.16089 12.9272L4.15869 12.9258C4.04118 12.8396 3.98657 12.7121 3.98657 12.5625C3.98655 12.2721 3.94576 12.0552 3.87231 11.9033L3.87158 11.9011C3.81572 11.7798 3.69406 11.7026 3.45337 11.7026C3.33114 11.7027 3.25307 11.7292 3.20435 11.7671C3.14221 11.8149 3.10061 11.864 3.07617 11.9128C3.04149 11.985 3.02355 12.0599 3.02124 12.1384V14.7905L3.02637 14.8652C3.03466 14.9384 3.05266 15.0073 3.07983 15.0725L3.10254 15.1201C3.12874 15.1672 3.16488 15.2124 3.21167 15.2556C3.2602 15.2978 3.33572 15.3259 3.45337 15.3259C3.56813 15.3259 3.65533 15.3041 3.71997 15.2673C3.78314 15.2313 3.83208 15.1772 3.86646 15.0996C3.94535 14.9186 3.98655 14.7002 3.98657 14.4412C3.98657 14.3004 4.04381 14.1839 4.1499 14.0991L4.19824 14.0647C4.33673 13.9762 4.55866 13.9431 4.83691 13.9431C5.09384 13.9431 5.30559 13.9858 5.43604 14.1013C5.55182 14.204 5.62061 14.3293 5.62061 14.4749C5.62057 14.7549 5.57953 15.0125 5.49536 15.2461L5.45654 15.3442C5.36294 15.5677 5.23261 15.7627 5.06543 15.928L4.99146 15.9968C4.58057 16.3629 4.03856 16.541 3.37793 16.541L3.12671 16.5278C3.00679 16.5188 2.87303 16.495 2.72607 16.4575C2.61505 16.4287 2.50136 16.3894 2.38696 16.3396L2.27197 16.2861C2.1155 16.2094 1.9705 16.0983 1.83691 15.9558L1.83618 15.9551C1.70598 15.8128 1.59909 15.6391 1.51392 15.4365L1.51318 15.4351C1.42797 15.2251 1.38722 14.9736 1.38721 14.6843V12.345C1.38721 12.1069 1.41644 11.892 1.47656 11.7026C1.52068 11.5616 1.57629 11.4337 1.64355 11.3196L1.7146 11.2097C1.81013 11.07 1.92167 10.9524 2.04932 10.8582C2.17206 10.7676 2.29884 10.6909 2.42871 10.6289L2.54297 10.5798C2.81231 10.4716 3.11394 10.4081 3.44678 10.3879L3.45337 10.3872L3.68628 10.3945Z",fill:"currentColor"}),re.createElement("path",{d:"M8.10791 11.7371C8.33261 11.7371 8.5218 11.8023 8.61255 11.9758C8.68772 12.1131 8.72383 12.2741 8.72388 12.4534V12.7522H9.03003C9.21461 12.7522 9.37781 12.7845 9.5127 12.8562C9.68704 12.9456 9.7463 13.149 9.74634 13.3843C9.74634 13.612 9.68105 13.8034 9.50537 13.894L9.5061 13.8948C9.36923 13.9665 9.20861 14.0002 9.03003 14.0002H8.72388V14.3064C8.72388 14.4941 8.68994 14.6588 8.61768 14.7942L8.61841 14.7949C8.5293 14.9647 8.334 15.0226 8.10791 15.0227C7.87257 15.0227 7.66761 14.9685 7.5769 14.8L7.57617 14.7993C7.50612 14.6659 7.47583 14.4988 7.47583 14.3064V14.0002H7.18579C6.99507 14.0002 6.82804 13.9669 6.69214 13.894C6.52182 13.8026 6.46069 13.6102 6.46069 13.3843C6.46073 13.1491 6.51509 12.944 6.68335 12.8533L6.68481 12.8525L6.79102 12.8079C6.90305 12.7697 7.03293 12.7522 7.177 12.7522H7.47583V12.4534C7.47587 12.2683 7.50712 12.1056 7.57617 11.9707L7.5769 11.9685L7.61646 11.9092C7.72038 11.7825 7.90134 11.7371 8.10791 11.7371Z",fill:"currentColor"}),re.createElement("path",{d:"M12.728 11.7371C12.9527 11.7371 13.1419 11.8023 13.2327 11.9758C13.3078 12.1131 13.3439 12.2741 13.344 12.4534V12.7522H13.6501C13.8347 12.7522 13.9979 12.7845 14.1328 12.8562C14.3072 12.9456 14.3664 13.149 14.3665 13.3843C14.3665 13.612 14.3012 13.8034 14.1255 13.894L14.1262 13.8948C13.9894 13.9665 13.8287 14.0002 13.6501 14.0002H13.344V14.3064C13.344 14.4941 13.3101 14.6588 13.2378 14.7942L13.2385 14.7949C13.1494 14.9647 12.9541 15.0226 12.728 15.0227C12.4927 15.0227 12.2877 14.9685 12.197 14.8L12.1963 14.7993C12.1262 14.6659 12.0959 14.4988 12.0959 14.3064V14.0002H11.8059C11.6152 14.0002 11.4482 13.9669 11.3123 13.894C11.1419 13.8026 11.0808 13.6102 11.0808 13.3843C11.0808 13.1491 11.1352 12.944 11.3035 12.8533L11.3049 12.8525L11.4111 12.8079C11.5232 12.7697 11.653 12.7522 11.7971 12.7522H12.0959V12.4534C12.096 12.2683 12.1272 12.1056 12.1963 11.9707L12.197 11.9685L12.2366 11.9092C12.3405 11.7825 12.5215 11.7371 12.728 11.7371Z",fill:"currentColor"}),re.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V9C15 9.41421 14.6642 9.75 14.25 9.75C13.8358 9.75 13.5 9.41421 13.5 9V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),Yv=e=>re.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},re.createElement("path",{d:"M4.29639 10.3945C4.50665 10.4083 4.69413 10.4433 4.85815 10.5L4.85889 10.4993C5.07789 10.5733 5.26574 10.6715 5.41919 10.7944C5.53204 10.8849 5.62958 10.9843 5.71069 11.0933L5.78613 11.2053L5.78687 11.2068L5.85059 11.3218C5.89058 11.3983 5.92606 11.4746 5.95605 11.551L5.99707 11.666L5.9978 11.6682L6.05566 11.8945C6.0708 11.9689 6.08168 12.0422 6.08862 12.1143C6.10449 12.252 6.11279 12.3734 6.11279 12.4775C6.11276 12.6403 6.06824 12.7876 5.97803 12.9155C5.92155 12.9956 5.83545 13.0472 5.73486 13.0789C5.63441 13.1104 5.51212 13.1243 5.37231 13.1243C5.32505 13.1243 5.27524 13.1215 5.2229 13.1162L5.05811 13.0928C4.93553 13.0701 4.82533 13.024 4.73145 12.9529L4.72998 12.9514C4.61882 12.8632 4.56958 12.7352 4.56958 12.5874C4.56955 12.2926 4.5312 12.0715 4.46191 11.9165L4.46045 11.9143C4.4319 11.8474 4.38931 11.8003 4.33154 11.7686C4.27185 11.7358 4.18944 11.7158 4.07812 11.7158C3.96626 11.7158 3.89622 11.7421 3.85254 11.7788C3.79519 11.8265 3.75637 11.8759 3.73315 11.926C3.70026 11.9999 3.68262 12.0771 3.68042 12.1582V14.8425L3.68555 14.9187C3.69337 14.9937 3.71038 15.0643 3.73608 15.1311L3.75732 15.1802C3.78176 15.2276 3.81496 15.2727 3.85767 15.3157L3.89575 15.3442C3.93843 15.3699 3.99697 15.386 4.07812 15.386C4.18296 15.386 4.26146 15.3647 4.31982 15.3289C4.37727 15.2935 4.4233 15.2389 4.45605 15.1589C4.53037 14.9746 4.56957 14.7522 4.56958 14.4888C4.56958 14.3307 4.63662 14.2007 4.7666 14.1116L4.82007 14.0801C4.95284 14.0119 5.14337 13.9856 5.37231 13.9856C5.61445 13.9856 5.81633 14.0298 5.94067 14.1489C6.04986 14.2536 6.11274 14.379 6.11279 14.5225C6.11279 14.8453 6.06245 15.1386 5.95972 15.3999C5.85998 15.6574 5.71501 15.8781 5.52466 16.0598L5.52393 16.0591C5.13817 16.4307 4.62871 16.6128 4.00708 16.6128C3.95774 16.6128 3.87811 16.6081 3.77124 16.5996C3.65793 16.5904 3.53127 16.5659 3.39331 16.5278C3.28866 16.4984 3.18149 16.4584 3.07397 16.4077L2.96631 16.3535C2.81858 16.2752 2.68196 16.1624 2.55688 16.0181L2.55615 16.0166C2.43435 15.8725 2.33453 15.6972 2.25513 15.4929L2.25439 15.4915C2.17508 15.28 2.13721 15.0267 2.13721 14.7349V12.3669C2.13721 12.1269 2.16476 11.9109 2.2207 11.7202L2.26538 11.5825C2.3136 11.4491 2.37234 11.3289 2.44263 11.2229C2.53187 11.0816 2.63607 10.9621 2.7561 10.8662C2.87117 10.7743 2.98996 10.6964 3.11206 10.6333L3.11353 10.6326L3.22046 10.5828C3.47384 10.4727 3.75793 10.4085 4.0708 10.3879L4.07812 10.3872L4.29639 10.3945Z",fill:"currentColor"}),re.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H8.625C8.21079 16.5 7.875 16.1642 7.875 15.75C7.875 15.3358 8.21079 15 8.625 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),Zv=e=>re.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},re.createElement("path",{d:"M3.62109 10.571C3.83849 10.5842 4.03206 10.618 4.20117 10.6721L4.2019 10.6714C4.42776 10.742 4.62121 10.8352 4.77979 10.9526C4.89663 11.0392 4.99793 11.135 5.08228 11.2397L5.16064 11.3474L5.16211 11.3489L5.22803 11.4595C5.26973 11.5332 5.30659 11.6069 5.33789 11.6807L5.38037 11.7905L5.3811 11.7935L5.44116 12.0117C5.45675 12.0826 5.46834 12.1524 5.47559 12.2212L5.49463 12.4087C5.49888 12.4674 5.50049 12.5222 5.50049 12.5728C5.50045 12.7317 5.45415 12.8755 5.35986 12.999C5.30088 13.0762 5.2117 13.1246 5.10938 13.1543C5.0067 13.1841 4.88146 13.1975 4.7373 13.1975C4.64029 13.1975 4.53244 13.1872 4.41431 13.1675C4.28898 13.1461 4.17557 13.1026 4.07886 13.0349L4.07739 13.0334C3.96236 12.9491 3.90894 12.8243 3.90894 12.6782C3.90893 12.3968 3.86925 12.187 3.79834 12.0403L3.79761 12.0381C3.74418 11.922 3.62816 11.847 3.39551 11.8469C3.27715 11.8469 3.20179 11.873 3.15527 11.9092C3.09597 11.9548 3.05572 12.0012 3.03223 12.0476L3.03296 12.0483C2.99919 12.1182 2.98102 12.1906 2.97876 12.2666V14.8396L2.98389 14.9114C2.99188 14.9821 3.00888 15.049 3.03516 15.1121L3.05786 15.1582C3.08304 15.2033 3.11768 15.2464 3.1626 15.2878C3.2089 15.3285 3.28115 15.356 3.39551 15.356C3.50633 15.3559 3.58982 15.3349 3.65186 15.2996C3.71249 15.2651 3.75936 15.2131 3.79248 15.1384L3.84302 15.0007C3.88665 14.8554 3.90893 14.6891 3.90894 14.5005C3.90894 14.363 3.96502 14.2494 4.0686 14.1665L4.11621 14.1328C4.25147 14.0465 4.46739 14.0134 4.7373 14.0134C4.98658 14.0134 5.19278 14.0552 5.32031 14.168C5.43323 14.268 5.5004 14.3903 5.50049 14.5327C5.50049 14.8049 5.46077 15.0556 5.37891 15.2827L5.34155 15.3779C5.23762 15.6261 5.08621 15.8373 4.88892 16.0115L4.88965 16.0122C4.49029 16.3681 3.96383 16.541 3.32227 16.541C3.27168 16.541 3.18935 16.5367 3.07837 16.5286C3.02014 16.5242 2.95789 16.5158 2.89307 16.5044L2.68799 16.4597C2.5801 16.4317 2.47025 16.3938 2.35913 16.3455L2.2478 16.2935C2.09553 16.2188 1.95433 16.1112 1.82446 15.9727L1.82373 15.9712C1.69712 15.8328 1.593 15.6642 1.51025 15.4673L1.50952 15.4658C1.42669 15.2616 1.38721 15.0172 1.38721 14.7363V12.4666C1.38723 12.2355 1.41597 12.0273 1.47437 11.8433C1.53119 11.6615 1.60684 11.502 1.70361 11.3665L1.77686 11.2676C1.85263 11.1732 1.9374 11.0913 2.03101 11.0222C2.15024 10.9342 2.27322 10.8598 2.39941 10.7996L2.40015 10.7988L2.51074 10.7512C2.77229 10.6462 3.0652 10.5848 3.38818 10.5652L3.39551 10.5645L3.62109 10.571Z",fill:"currentColor"}),re.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"}),re.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.36914 11.28C9.50263 11.28 9.62352 11.3063 9.72583 11.3643L9.7251 11.365C9.85906 11.4379 9.90454 11.5838 9.90454 11.7429C9.9045 11.7567 9.90157 11.7778 9.89941 11.7935C9.89658 11.814 9.89242 11.8422 9.88696 11.8777C9.87611 11.9455 9.8639 12.0222 9.85034 12.1062C9.84553 12.136 9.84018 12.1643 9.83569 12.1912H10.0525C10.1919 12.1912 10.3171 12.2148 10.4216 12.2688L10.4209 12.2695C10.5686 12.3412 10.6128 12.5089 10.6128 12.6863C10.6128 12.8587 10.5617 13.0123 10.4194 13.0898L10.4187 13.0906C10.3122 13.1472 10.1885 13.1726 10.0525 13.1726H9.67529L9.55225 13.8589H9.75952C9.89706 13.8589 10.0206 13.8819 10.1243 13.9343C10.2748 14.005 10.3198 14.1752 10.3198 14.354C10.3198 14.5291 10.2702 14.6875 10.1243 14.7627L10.1235 14.7634C10.0176 14.8164 9.89461 14.8403 9.75952 14.8403H9.38452L9.33398 15.1677L9.33325 15.1714C9.30492 15.3271 9.26297 15.4669 9.20728 15.5903L9.20801 15.5911C9.17656 15.6626 9.13001 15.7228 9.06592 15.7646C9.00162 15.8065 8.92683 15.8247 8.84839 15.8247C8.72 15.8247 8.60307 15.8041 8.50122 15.7581L8.49976 15.7573C8.35755 15.6908 8.31299 15.5386 8.31299 15.3787C8.31299 15.3406 8.31787 15.2939 8.32617 15.241L8.35913 15.0242C8.36863 14.9624 8.37948 14.9012 8.38989 14.8403H7.92847L7.87793 15.1677L7.8772 15.1714C7.84887 15.3271 7.80691 15.4669 7.75122 15.5903L7.75195 15.5911C7.72046 15.6627 7.6734 15.7228 7.60913 15.7646C7.54487 15.8064 7.47071 15.8247 7.39233 15.8247C7.26394 15.8247 7.14702 15.8041 7.04517 15.7581L7.0437 15.7573C6.90149 15.6908 6.85693 15.5387 6.85693 15.3787C6.85694 15.3406 6.86181 15.2939 6.87012 15.241L6.90308 15.0242C6.91257 14.9624 6.92342 14.9012 6.93384 14.8403H6.6687C6.52906 14.8403 6.40313 14.8167 6.29663 14.7634L6.29297 14.762C6.15355 14.6853 6.10844 14.5261 6.1084 14.354C6.1084 14.1782 6.1487 14.0079 6.29297 13.9358C6.39784 13.882 6.52535 13.8589 6.6687 13.8589H7.09497L7.21802 13.1726H6.95361C6.81311 13.1726 6.68646 13.1475 6.57935 13.0906L6.57788 13.0898C6.43874 13.0135 6.39332 12.8568 6.39331 12.6863C6.39331 12.5105 6.43361 12.3402 6.57788 12.2681C6.68271 12.2144 6.81036 12.1912 6.95361 12.1912H7.38721L7.46045 11.7561C7.47174 11.6625 7.50842 11.5673 7.56372 11.4712C7.63824 11.3418 7.76255 11.2801 7.91309 11.28C8.04657 11.28 8.16746 11.3063 8.26978 11.3643L8.26904 11.365C8.403 11.4379 8.44849 11.5838 8.44849 11.7429C8.44844 11.7567 8.44552 11.7778 8.44336 11.7935C8.44053 11.814 8.43636 11.8422 8.43091 11.8777C8.42006 11.9455 8.40784 12.0222 8.39429 12.1062C8.38947 12.136 8.38413 12.1643 8.37964 12.1912H8.84326L8.9165 11.7561C8.92779 11.6625 8.96448 11.5673 9.01978 11.4712C9.0943 11.3418 9.21861 11.2801 9.36914 11.28ZM8.09619 13.8589H8.55103L8.67407 13.1726H8.21924L8.09619 13.8589Z",fill:"currentColor"})),Qv=e=>re.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},re.createElement("path",{d:"M4.43188 10.4409C4.65285 10.4409 4.85471 10.4869 4.99951 10.6152L4.99878 10.6159C5.13097 10.7305 5.21409 10.881 5.25146 11.0576C5.28474 11.2148 5.30052 11.3869 5.30054 11.5724V15.4323C5.30054 15.6193 5.28417 15.7927 5.25146 15.9516L5.2522 15.9523C5.21779 16.1313 5.13551 16.2842 4.99951 16.3976L4.99878 16.3969C4.85386 16.52 4.65269 16.5646 4.43188 16.5646C4.21337 16.5646 4.01411 16.5195 3.86792 16.3976L3.86353 16.394C3.73466 16.2798 3.65263 16.1299 3.6123 15.9553L3.61157 15.9516C3.57826 15.7941 3.5625 15.6205 3.5625 15.4323V11.5724C3.56252 11.3869 3.5783 11.2148 3.61157 11.0576C3.64882 10.8815 3.72996 10.7302 3.85986 10.6152L3.86133 10.6137C4.00804 10.4875 4.2103 10.4409 4.43188 10.4409Z",fill:"currentColor"}),re.createElement("path",{d:"M8.07129 10.4474C8.18434 10.4599 8.28945 10.4924 8.3811 10.55L8.38184 10.5493C8.45754 10.5942 8.52569 10.6451 8.58472 10.7016L8.64111 10.7602L8.64331 10.7631L8.69385 10.8298C8.72596 10.8768 8.75504 10.9284 8.78101 10.9836L8.81763 11.0685L8.81909 11.0729L9.85986 13.8928V11.2692C9.85986 11.0565 9.89522 10.8654 9.98291 10.7119L9.98364 10.7104L10.0349 10.6393C10.1656 10.4886 10.3781 10.4409 10.5974 10.4409C10.8635 10.4409 11.125 10.4947 11.2529 10.6965C11.3535 10.8508 11.3928 11.0487 11.3928 11.2692V15.4323C11.3928 15.6163 11.3809 15.7863 11.3577 15.9413L11.3584 15.9421C11.3349 16.1167 11.2678 16.2708 11.1467 16.3881C11.0102 16.5202 10.8106 16.5646 10.5974 16.5646H10.0554C9.86994 16.5646 9.69972 16.5199 9.56104 16.416C9.44129 16.3261 9.3452 16.215 9.27466 16.0842C9.21353 15.9706 9.16292 15.8593 9.12378 15.7509L8.14893 13.1091V15.7363C8.14893 15.9493 8.11322 16.1406 8.02661 16.2958L8.02588 16.2973C7.90706 16.5052 7.66112 16.5646 7.41138 16.5646C7.14233 16.5646 6.88122 16.5106 6.75 16.312C6.64812 16.1572 6.60791 15.9581 6.60791 15.7363V11.5724C6.60792 11.3882 6.61818 11.2193 6.63867 11.0671V11.0641L6.66724 10.9367C6.7042 10.8142 6.76699 10.706 6.85986 10.6188C6.9982 10.4862 7.19704 10.4409 7.41138 10.4409H7.95337L8.07129 10.4474Z",fill:"currentColor"}),re.createElement("path",{d:"M13.5688 10.4409C13.7898 10.4409 13.9917 10.4869 14.1365 10.6152L14.1357 10.6159C14.2679 10.7305 14.3511 10.881 14.3884 11.0576C14.4217 11.2148 14.4375 11.3869 14.4375 11.5724V15.4323C14.4375 15.6193 14.4211 15.7927 14.3884 15.9516L14.3892 15.9523C14.3548 16.1313 14.2725 16.2842 14.1365 16.3976L14.1357 16.3969C13.9908 16.52 13.7897 16.5646 13.5688 16.5646C13.3503 16.5646 13.1511 16.5195 13.0049 16.3976L13.0005 16.394C12.8716 16.2798 12.7896 16.1299 12.7493 15.9553L12.7485 15.9516C12.7152 15.7941 12.6995 15.6205 12.6995 15.4323V11.5724C12.6995 11.3869 12.7153 11.2148 12.7485 11.0576C12.7858 10.8815 12.8669 10.7302 12.9968 10.6152L12.9983 10.6137C13.145 10.4875 13.3473 10.4409 13.5688 10.4409Z",fill:"currentColor"}),re.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50385C10.7457 1.52087 10.9072 1.59681 11.0303 1.71991L14.7803 5.46991C14.9208 5.61054 15 5.80136 15 6.00018V9.00018C14.9998 9.41423 14.6641 9.75018 14.25 9.75018C13.8359 9.75018 13.5002 9.41423 13.5 9.00018V6.75018H11.25C10.8523 6.75018 10.4707 6.59192 10.1895 6.31073C9.90824 6.02951 9.7501 5.64788 9.75 5.25018V3.00018H5.25C5.05109 3.00018 4.86038 3.07926 4.71973 3.21991C4.57919 3.36054 4.5 3.55136 4.5 3.75018V9.00018C4.4998 9.41423 4.16409 9.75018 3.75 9.75018C3.33591 9.75018 3.0002 9.41423 3 9.00018V3.75018C3 3.15353 3.23734 2.5813 3.65918 2.15936C4.08114 1.73741 4.65326 1.50018 5.25 1.50018H10.5L10.574 1.50385ZM11.25 5.25018H12.4395L11.25 4.06073V5.25018Z",fill:"currentColor"})),Xv=e=>re.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},re.createElement("path",{d:"M6.76831 10.8267C6.93291 10.8267 7.08404 10.8408 7.22021 10.8691L7.35205 10.9021L7.35278 10.9028L7.46851 10.9431C7.57872 10.986 7.67614 11.038 7.75928 11.0991C7.84245 11.1591 7.91481 11.2265 7.97388 11.3005L8.02881 11.3767L8.02954 11.3774L8.11011 11.5254C8.13317 11.5747 8.15233 11.6249 8.16797 11.6755C8.19815 11.7711 8.21863 11.8631 8.22656 11.9502C8.23376 12.0294 8.23755 12.096 8.23755 12.1479C8.23753 12.318 8.17338 12.4626 8.04639 12.572C7.92503 12.676 7.77653 12.7265 7.60913 12.7266C7.4711 12.7266 7.34146 12.6749 7.22241 12.583C7.1027 12.4905 7.02328 12.3741 7.02319 12.2329C7.02319 12.0468 6.98759 11.9498 6.94775 11.907L6.94629 11.9055C6.90561 11.8606 6.83878 11.8294 6.72583 11.8293C6.58234 11.8293 6.48534 11.856 6.42334 11.896C6.4086 11.9056 6.38747 11.9281 6.37061 11.981C6.35372 12.0341 6.34351 12.1099 6.34351 12.2117C6.34581 12.2878 6.36799 12.3546 6.40869 12.4153C6.45761 12.4821 6.52298 12.549 6.60718 12.6138L6.73608 12.7053C6.78632 12.7386 6.84449 12.7751 6.9104 12.8145C7.04454 12.8945 7.16167 12.9644 7.2605 13.0232L7.44507 13.1426C7.50565 13.1844 7.56597 13.2284 7.62524 13.2744C7.74715 13.3666 7.8562 13.4715 7.95337 13.5886C8.05276 13.7085 8.13297 13.8432 8.1936 13.9922C8.25599 14.1456 8.28891 14.3172 8.29395 14.5049V14.5364C8.29395 14.7339 8.26896 14.9141 8.21777 15.0754V15.0776C8.11696 15.3776 7.94914 15.6082 7.7124 15.761L7.71313 15.7617C7.62701 15.8179 7.53944 15.8644 7.45166 15.9016L7.36304 15.936C7.30225 15.9571 7.24075 15.9753 7.1792 15.9902L6.99243 16.0261C6.87331 16.0431 6.75886 16.0529 6.65039 16.0554H6.61304C6.41017 16.0554 6.22414 16.0345 6.05786 15.9917C5.89914 15.9495 5.75823 15.8922 5.63892 15.8196L5.63745 15.8188C5.52025 15.7449 5.42093 15.6589 5.34155 15.561C5.26338 15.4674 5.20001 15.3681 5.15332 15.2644C5.10802 15.1659 5.07431 15.0659 5.05371 14.9656C5.03361 14.8676 5.02297 14.7738 5.02295 14.6851C5.02295 14.5014 5.0798 14.3447 5.20898 14.2375L5.20972 14.2368L5.30493 14.1731C5.40409 14.1186 5.51594 14.0918 5.63745 14.0918C5.79553 14.0919 5.94175 14.1407 6.07251 14.2354L6.12451 14.2764C6.2216 14.3622 6.27861 14.4745 6.2959 14.6067L6.30103 14.6741L6.31055 14.7847C6.32502 14.8796 6.35383 14.9312 6.38306 14.9568C6.43071 14.9963 6.50789 15.0238 6.63135 15.0242C6.76743 15.0198 6.85874 14.9863 6.91772 14.9355L6.91846 14.9341L6.95361 14.8938C6.98575 14.8434 7.00924 14.7604 7.00928 14.6287C7.00928 14.4903 6.96843 14.3706 6.8877 14.2661L6.88696 14.2646C6.80068 14.1504 6.68858 14.0439 6.55078 13.946L6.55005 13.9453C6.40626 13.841 6.25592 13.7396 6.10034 13.6421C5.93262 13.5343 5.77326 13.4207 5.62427 13.303L5.62354 13.3022C5.46846 13.1772 5.34021 13.0351 5.24121 12.8752C5.13746 12.7076 5.0852 12.514 5.08008 12.2988V12.2388L5.0874 12.0505C5.10126 11.869 5.13388 11.7086 5.18628 11.5708V11.5693L5.2478 11.4382C5.31532 11.3136 5.40255 11.2077 5.51074 11.1233L5.62207 11.0464C5.73813 10.9764 5.87099 10.9263 6.01831 10.894C6.21201 10.8494 6.43196 10.8267 6.67603 10.8267H6.76831Z",fill:"currentColor"}),re.createElement("path",{d:"M14.2266 10.8062C14.3565 10.8062 14.4736 10.8329 14.5693 10.8933L14.5701 10.8926L14.5715 10.894L14.5737 10.8948L14.573 10.8955C14.6342 10.9321 14.6895 10.9722 14.7363 11.0171L14.781 11.064L14.7825 11.0662L14.8235 11.1204C14.8363 11.1392 14.8492 11.159 14.8608 11.1797L14.9246 11.3159L14.9253 11.3181L15.9163 14.0024V11.4705C15.9163 11.2922 15.9461 11.1369 16.0159 11.0149L16.054 10.9607C16.1527 10.8467 16.3175 10.8062 16.5022 10.8062C16.7284 10.8062 16.9271 10.8532 17.0229 11.0017C17.1032 11.1237 17.1379 11.2847 17.1379 11.4705V15.0535C17.1379 15.21 17.1275 15.3541 17.1079 15.4849L17.1086 15.4856C17.0896 15.6273 17.0355 15.7491 16.9409 15.8408C16.837 15.9414 16.6806 15.9784 16.5022 15.9785H16.0356C15.8837 15.9785 15.7483 15.9422 15.6394 15.8606C15.5419 15.7874 15.4638 15.6974 15.4065 15.5911C15.3549 15.4953 15.3125 15.4018 15.2798 15.3113L14.3459 12.7815V15.3149C14.3459 15.4932 14.316 15.6489 14.2471 15.7727L14.2463 15.7734C14.158 15.9281 13.9711 15.9784 13.76 15.9785C13.53 15.9785 13.3292 15.9315 13.2312 15.783C13.151 15.6609 13.1169 15.5006 13.1169 15.3149V11.7319C13.117 11.575 13.126 11.4319 13.1433 11.3035V11.3013L13.166 11.1987C13.1955 11.1009 13.2454 11.0157 13.3176 10.9475L13.3594 10.9124C13.4627 10.8363 13.6027 10.8062 13.76 10.8062H14.2266Z",fill:"currentColor"}),re.createElement("path",{d:"M3.62183 10.73C3.8058 10.73 3.96571 10.7696 4.07959 10.8677C4.185 10.9586 4.25306 11.0796 4.28613 11.2229C4.31675 11.3557 4.33154 11.5018 4.33154 11.6602V14.3606C4.33154 14.617 4.29481 14.8413 4.21655 15.0293C4.15993 15.1652 4.09098 15.286 4.00928 15.3896L3.92285 15.4878C3.80762 15.6056 3.67869 15.6971 3.5376 15.7625L3.53833 15.7632C3.40115 15.8269 3.27011 15.872 3.14722 15.8979L3.14795 15.8987C3.09669 15.9112 3.04501 15.9213 2.99414 15.9294L2.8418 15.9478C2.74998 15.9548 2.68156 15.9587 2.64111 15.9587C2.3706 15.9587 2.13396 15.928 1.93506 15.8643C1.73937 15.8022 1.56914 15.7204 1.42749 15.6174C1.28776 15.5158 1.17335 15.3984 1.08691 15.2651L1.02686 15.1685C0.970789 15.0715 0.926873 14.9732 0.895752 14.874L0.896484 14.8733C0.852315 14.745 0.821564 14.6203 0.806396 14.499L0.805664 14.4968C0.793555 14.3806 0.786621 14.2779 0.786621 14.1899C0.786659 14.0481 0.829716 13.9196 0.914062 13.8091C0.968035 13.7386 1.04873 13.6949 1.13965 13.6685C1.231 13.642 1.34202 13.6297 1.46851 13.6296C1.55651 13.6297 1.65224 13.6393 1.75415 13.6567C1.8653 13.6758 1.96539 13.7157 2.05151 13.7783C2.15785 13.853 2.20677 13.9666 2.20679 14.0977C2.20679 14.3421 2.24112 14.5246 2.302 14.6528L2.32178 14.6865C2.37332 14.7613 2.46833 14.8095 2.64111 14.8096C2.74386 14.8095 2.80532 14.7883 2.8396 14.762L2.84106 14.7605L2.90552 14.7019C2.92253 14.6822 2.9356 14.6623 2.94507 14.6426L2.97803 14.5518C2.98565 14.5209 2.98953 14.4889 2.99048 14.4565V11.9641H2.17236C2.0293 11.9641 1.8922 11.9536 1.76221 11.9312L1.76001 11.9304C1.62252 11.9035 1.50268 11.8482 1.40698 11.7612L1.40625 11.7598C1.30008 11.6602 1.25688 11.5177 1.25684 11.3547C1.25684 11.1882 1.29936 11.0419 1.40625 10.9417C1.49986 10.8517 1.6187 10.7951 1.75635 10.7681L1.9585 10.7395C2.02775 10.7333 2.09935 10.73 2.17236 10.73H3.62183Z",fill:"currentColor"}),re.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0061 10.8398C11.1058 10.8474 11.2146 10.8676 11.3313 10.8984L11.332 10.8977C11.4562 10.9275 11.5817 10.9747 11.7078 11.0376L11.803 11.0896C11.8653 11.1277 11.926 11.1727 11.9839 11.2244L12.0688 11.3071L12.0696 11.3079L12.1472 11.4001C12.2197 11.4965 12.2807 11.608 12.3303 11.7327L12.3772 11.8674C12.417 12.0081 12.4358 12.1667 12.4358 12.3406V14.4111C12.4358 14.649 12.4035 14.8579 12.3347 15.0337L12.334 15.0352C12.2654 15.204 12.1782 15.349 12.071 15.4666C11.9653 15.5823 11.8439 15.6747 11.7085 15.7412L11.7078 15.7405C11.5864 15.8034 11.4622 15.8534 11.335 15.8877C11.2172 15.9189 11.1066 15.9387 11.0061 15.9463C10.9136 15.9532 10.8413 15.9573 10.793 15.9573H10.675L10.4626 15.9463C10.362 15.9387 10.2518 15.919 10.1338 15.8877C10.0122 15.8554 9.8873 15.8055 9.75952 15.7405C9.62706 15.6742 9.50578 15.5832 9.39624 15.4688L9.39551 15.468C9.28579 15.3506 9.19561 15.2056 9.12451 15.0366L9.12378 15.0352C9.05226 14.8589 9.01835 14.6495 9.01831 14.4111V12.3406C9.01831 12.105 9.05259 11.8998 9.12451 11.7297C9.19368 11.5618 9.28389 11.4184 9.39697 11.3027C9.50677 11.1905 9.62826 11.1014 9.76099 11.0376C9.82393 11.0062 9.88688 10.9792 9.94849 10.957L9.94922 10.9563L10.1323 10.8992L10.1345 10.8984L10.3066 10.8604C10.3612 10.8506 10.4136 10.8436 10.4626 10.8398L10.675 10.8289H10.793C10.8413 10.8289 10.9136 10.8329 11.0061 10.8398ZM10.738 11.9473C10.6399 11.9473 10.5796 11.9688 10.5439 11.9963L10.5432 11.9971C10.4934 12.0354 10.4596 12.0746 10.4385 12.1135L10.4377 12.1143C10.4103 12.1641 10.3949 12.222 10.3931 12.2886V14.5393L10.4062 14.6309L10.4385 14.7151L10.4392 14.7158L10.481 14.7766C10.4976 14.7958 10.5181 14.8147 10.5417 14.833L10.5732 14.8521C10.6101 14.8689 10.6637 14.8806 10.738 14.8806C10.8345 14.8805 10.8925 14.8598 10.9255 14.8345C10.9743 14.7969 11.0075 14.7565 11.0288 14.7158C11.054 14.6605 11.0699 14.5993 11.0757 14.5327V12.2944L11.0588 12.197C11.051 12.167 11.0406 12.138 11.0281 12.1106C11.0069 12.0728 10.9738 12.0343 10.9255 11.9971L10.9233 11.9949C10.8905 11.9684 10.8335 11.9474 10.738 11.9473Z",fill:"currentColor"}),re.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V9C15 9.41421 14.6642 9.75 14.25 9.75C13.8358 9.75 13.5 9.41421 13.5 9V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),Jv=e=>re.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},re.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"}),re.createElement("path",{d:"M2.39355 10.5C2.53545 10.5 2.6592 10.5122 2.75757 10.5417C2.88987 10.5815 2.99161 10.6954 3.07251 10.8289L3.15747 10.9885L3.25195 11.2031L3.25269 11.2046L3.35229 11.4683C3.38786 11.5664 3.42601 11.6752 3.46655 11.7942L3.76318 12.6665L3.76392 12.6687L3.76904 12.6848L3.79907 12.5911L3.94849 12.1348C3.99515 11.9948 4.03674 11.8689 4.073 11.7576L4.07373 11.7561L4.1814 11.4434C4.21489 11.3495 4.24596 11.265 4.27515 11.1907L4.36084 10.9849C4.38855 10.9239 4.41584 10.8705 4.44214 10.8252C4.51581 10.6953 4.61188 10.5823 4.74243 10.5417H4.7439L4.82153 10.5227C4.90321 10.5069 4.99686 10.5 5.09985 10.5H5.67041C5.87137 10.5 6.05265 10.5425 6.17505 10.6619L6.17944 10.6655C6.29073 10.7714 6.35329 10.9108 6.375 11.072C6.39695 11.2133 6.40721 11.3701 6.40723 11.5415V15.5149C6.4072 15.7232 6.3696 15.9065 6.27686 16.0474C6.16065 16.2235 5.92578 16.2751 5.67041 16.2751C5.43573 16.2751 5.21924 16.2184 5.11157 16.0378L5.10938 16.0342C5.03005 15.8921 4.9966 15.7149 4.99658 15.5149V12.8335L4.4436 14.4456L4.44141 14.4521C4.39239 14.576 4.32667 14.6919 4.24658 14.8008L4.24731 14.8015C4.14341 14.9438 3.9882 15.008 3.80933 15.0081H3.73096C3.55351 15.008 3.40015 14.9437 3.29004 14.8081L3.28857 14.8066C3.20076 14.6954 3.13356 14.575 3.08862 14.4463L2.53564 12.8496V15.5149C2.53562 15.7149 2.50218 15.8921 2.42285 16.0342L2.42212 16.0356C2.31692 16.2193 2.09741 16.2751 1.86182 16.2751C1.60639 16.2751 1.37154 16.2236 1.25537 16.0474C1.16263 15.9065 1.12502 15.7232 1.125 15.5149V11.5415C1.12501 11.3697 1.13426 11.2129 1.15356 11.072L1.1543 11.0691L1.17993 10.9526C1.21308 10.8409 1.26884 10.7425 1.35059 10.6633L1.39966 10.6223C1.52082 10.5332 1.68333 10.5 1.86182 10.5H2.39355Z",fill:"currentColor"}),re.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.1106 10.5C9.62746 10.5 10.0624 10.6251 10.4026 10.8875L10.5256 10.9944C10.6405 11.1071 10.7342 11.238 10.8062 11.3862C10.9039 11.5876 10.9497 11.8187 10.9497 12.074V14.4983C10.9497 14.7119 10.927 14.9051 10.8779 15.0754C10.8306 15.2398 10.7676 15.3875 10.689 15.5156L10.6875 15.5186C10.6079 15.6408 10.5165 15.7481 10.4143 15.8386C10.3155 15.9261 10.2132 15.9989 10.1074 16.0547L10.1067 16.054C9.86566 16.1854 9.58987 16.2585 9.28271 16.2751H7.97681C7.77408 16.2751 7.59145 16.2335 7.46704 16.1169C7.35471 16.0115 7.2898 15.8714 7.26489 15.7097C7.24266 15.5651 7.23194 15.4033 7.23193 15.2256V11.5415C7.23195 11.3663 7.2426 11.2069 7.26489 11.0647C7.28985 10.9032 7.35482 10.7635 7.46704 10.6582C7.59145 10.5416 7.77403 10.5 7.97681 10.5H9.1106ZM8.72095 15.0447H9.07544C9.15931 15.0426 9.23737 15.0225 9.31055 14.9839L9.31348 14.9817L9.35815 14.9553C9.40066 14.926 9.43743 14.8876 9.46802 14.8381L9.46875 14.8367L9.49438 14.7861C9.51748 14.7305 9.53172 14.6593 9.53174 14.5686V12.2615C9.53174 12.1256 9.50631 12.0248 9.46509 11.9517L9.46362 11.9495C9.42061 11.8696 9.36785 11.8162 9.30762 11.7825C9.25706 11.7542 9.19978 11.7342 9.1355 11.7231L9.06885 11.7151H8.72095V15.0447Z",fill:"currentColor"})),ew=e=>re.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},re.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.6416 10.3784C3.95675 10.4068 4.24355 10.4808 4.49927 10.6033L4.68896 10.7058C4.75102 10.7437 4.81209 10.7853 4.87207 10.8303C4.99897 10.9227 5.10899 11.0375 5.20459 11.1724C5.30765 11.311 5.38613 11.4733 5.44116 11.6558L5.47998 11.8008C5.51306 11.9504 5.52903 12.1125 5.52905 12.2856C5.52905 12.6011 5.47828 12.8867 5.37305 13.1382L5.37378 13.1389C5.28434 13.3557 5.15787 13.5441 4.99512 13.7014L4.92334 13.7666C4.52343 14.1103 3.97203 14.269 3.2959 14.269H2.95166V15.4292C2.95165 15.614 2.93964 15.7845 2.91577 15.9397C2.8883 16.1182 2.81511 16.2739 2.68652 16.3909L2.68579 16.3901C2.54556 16.5202 2.34254 16.5645 2.12329 16.5645C1.90696 16.5644 1.70685 16.5194 1.56738 16.3887L1.56519 16.3865C1.44288 16.2679 1.37145 16.1152 1.34399 15.9404L1.34326 15.936C1.32257 15.7822 1.31251 15.613 1.3125 15.4292V11.5042C1.31251 11.3204 1.3225 11.1524 1.34326 11.001L1.34399 10.9973L1.37256 10.8691C1.40991 10.7455 1.47366 10.6362 1.56738 10.5483C1.70673 10.4148 1.90677 10.3689 2.12329 10.3689H3.50464L3.6416 10.3784ZM2.95166 12.9053H3.31787C3.43267 12.8984 3.53116 12.8714 3.61597 12.8269C3.69435 12.7857 3.75967 12.7244 3.81226 12.6387L3.84448 12.5728C3.8728 12.5 3.88989 12.4058 3.88989 12.2856C3.88984 12.1374 3.85971 12.0411 3.81812 11.9795L3.81519 11.9744C3.76419 11.8937 3.70357 11.8366 3.63428 11.7979C3.56584 11.7635 3.47692 11.7377 3.36328 11.7253H2.95166V12.9053Z",fill:"currentColor"}),re.createElement("path",{d:"M9.85181 10.3689C9.96017 10.369 10.0701 10.3945 10.1792 10.4392L10.2876 10.4897L10.2935 10.4927L10.2993 10.4963C10.4209 10.5712 10.5226 10.6619 10.5879 10.7725C10.6503 10.8716 10.6882 10.9809 10.6882 11.0969C10.6882 11.1892 10.6526 11.2993 10.6077 11.4089L10.6069 11.4082C10.5828 11.4685 10.5524 11.5379 10.5154 11.6147C10.4774 11.6937 10.4326 11.7792 10.3813 11.8704L9.1582 14.0391V15.4373C9.1582 15.6164 9.14303 15.7853 9.11279 15.9426C9.07918 16.1138 9.00547 16.2635 8.88647 16.3799L8.88721 16.3806C8.75142 16.5164 8.5562 16.5644 8.34668 16.5645C8.13595 16.5644 7.94219 16.5154 7.80249 16.3843L7.80103 16.3828C7.68055 16.2661 7.60635 16.1157 7.57251 15.9434C7.54226 15.786 7.52783 15.6164 7.52783 15.4373V14.0398L6.12085 11.5283L6.11938 11.5261C6.0459 11.3891 6.00587 11.2453 6.00586 11.0969C6.00589 10.986 6.03681 10.8798 6.09155 10.7812L6.09302 10.7791L6.15015 10.6963C6.21492 10.6176 6.30071 10.5509 6.39771 10.4941L6.4043 10.4905L6.5127 10.4392C6.6213 10.3943 6.73162 10.369 6.84155 10.3689C7.06446 10.369 7.25232 10.4649 7.39307 10.6399L7.48096 10.752C7.5635 10.8656 7.6337 10.9873 7.69263 11.116L8.34668 12.4878L9.00073 11.116C9.07902 10.945 9.177 10.7867 9.29443 10.6421L9.29517 10.6414L9.35083 10.5791C9.48615 10.443 9.65571 10.3689 9.85181 10.3689Z",fill:"currentColor"}),re.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),Te=(e,t)=>C.jsx(e,{size:t.size??me.size,stroke:t.stroke??me.stroke,className:t.className}),ys=(e,t)=>C.jsx(e,{width:Number(t.size??me.size),height:Number(t.size??me.size),className:t.className}),xc={".bmp":e=>Te(j.IconFileTypeBmp,e),".cpp":e=>ys(qv,e),".c":e=>ys(Yv,e),".cs":e=>ys(Zv,e),".css":e=>Te(j.IconFileTypeCss,e),".csv":e=>Te(j.IconFileTypeCsv,e),".doc":e=>Te(j.IconFileTypeDoc,e),".docx":e=>Te(j.IconFileTypeDocx,e),".html":e=>Te(j.IconFileTypeHtml,e),".ini":e=>ys(Qv,e),".jpg":e=>Te(j.IconFileTypeJpg,e),".js":e=>Te(j.IconFileTypeJs,e),".json":e=>ys(Xv,e),".jsx":e=>Te(j.IconFileTypeJsx,e),".md":e=>ys(Jv,e),".pdf":e=>Te(j.IconFileTypePdf,e),".php":e=>Te(j.IconFileTypePhp,e),".png":e=>Te(j.IconFileTypePng,e),".ppt":e=>Te(j.IconFileTypePpt,e),".py":e=>ys(ew,e),".rs":e=>Te(j.IconFileTypeRs,e),".sql":e=>Te(j.IconFileTypeSql,e),".svg":e=>Te(j.IconFileTypeSvg,e),".ts":e=>Te(j.IconFileTypeTs,e),".tsx":e=>Te(j.IconFileTypeTsx,e),".txt":e=>Te(j.IconFileTypeTxt,e),".vue":e=>Te(j.IconFileTypeVue,e),".xls":e=>Te(j.IconFileTypeXls,e),".xml":e=>Te(j.IconFileTypeXml,e),".zip":e=>Te(j.IconFileTypeZip,e),default:e=>Te(j.IconFile,e)},nl=({extension:e,size:t=me.size,stroke:s=me.stroke,cssClass:o,decorative:i=!1,label:n,indicator:r})=>{const a=(()=>{const u=e.trim().toLowerCase();return u.startsWith(".")?u:`.${u}`})(),c=(xc[a]??xc.default)({size:t,stroke:s}),d=n??`${a.slice(1).toUpperCase()} file icon`;return C.jsxs("span",{className:$("inline-flex relative",o),...i?{"aria-hidden":!0}:{role:"img","aria-label":d},children:[C.jsx(Ee,{icon:c,className:"inline-block align-middle"}),r&&C.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:r})]})},li=({label:e="Shared entity",size:t=10,cssClass:s,stroke:o=2})=>C.jsx(Ee,{className:ue("text-accent-primary",s),label:"Shared entity indicator",icon:C.jsx(j.IconArrowUpRight,{size:t,stroke:o,"aria-label":e,className:"bg-layer-3",role:"img"})}),rl=({name:e,cssClass:t,shared:s=!1})=>{const o=e.includes(".")?e.split(".").pop():null;return C.jsxs("div",{className:ue("flex items-center gap-2 w-full",t),children:[o&&C.jsx(nl,{extension:o,cssClass:"text-secondary",indicator:s?C.jsx(li,{}):null,label:"File type icon"}),C.jsx(Ft,{cssClass:"text-primary dial-small flex-1 min-w-0",text:e})]})},al=({name:e,cssClass:t,shared:s=!1,loading:o=!1})=>{const i=()=>o?C.jsx(Ri,{}):C.jsx(Ee,{icon:C.jsx(j.IconFolder,{...me}),className:"inline-block align-middle"});return C.jsxs("div",{className:ue("flex items-center gap-2 w-full",t),children:[C.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[i(),s&&C.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:C.jsx(li,{})})]}),C.jsx(Ft,{cssClass:"text-primary dial-small flex-1 min-w-0",text:e})]})},tw="en-US",sw={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},ow="text-primary";function Bu(e){if(!e)return null;if(e instanceof Date)return isFinite(e.getTime())?e:null;if(typeof e=="number"){const t=new Date(e);return isFinite(t.getTime())?t:null}if(typeof e=="string"){const t=e.trim();if(/^-?\d+$/.test(t)){const o=Number(t);return Bu(o)}const s=new Date(t);return isFinite(s.getTime())?s:null}return null}const zu=({value:e,locale:t=tw,options:s=sw,emptyPlaceholder:o="—",cssClass:i})=>{const n=Bu(e),r=p.useMemo(()=>n?new Intl.DateTimeFormat(t,s).format(n):o,[n,o,t,s]),a=n?n.toISOString():void 0;return C.jsx(Ft,{text:a?C.jsx("time",{dateTime:a,children:r}):C.jsx("span",{children:r}),cssClass:$(ow,i),hideTooltip:!1})};var gn=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(gn||{}),pn=(e=>(e.Mobile="mobile",e.Tablet="tablet",e))(pn||{}),Wu=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(Wu||{}),Rt=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(Rt||{}),ll=(e=>(e.Item="item",e.Divider="divider",e))(ll||{});const iw=$("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),nw=$("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none","w-max"),rw=$("flex w-full cursor-pointer items-center gap-3","focus-visible:border-none focus-visible:outline-none","hover:bg-accent-primary-alpha px-3","dial-small h-[34px] rounded text-primary"),aw="opacity-75 !cursor-not-allowed",lw="text-error",cw="my-1 border-t border-hover border-secondary",Vo=8,cl=({ariaLabel:e,cssClass:t,size:s=24,onClose:o})=>C.jsx(Re,{ariaLabel:e,cssClass:ue("text-secondary hover:text-accent-primary",t),onClick:o,iconBefore:C.jsx(j.IconX,{size:s})}),St=({children:e,menu:t,renderOverlay:s,trigger:o=[Rt.Click],placement:i,disabled:n=!1,open:r,defaultOpen:a=!1,onOpenChange:l,closable:c=!1,onClose:d,cssClass:u,listClassName:h,outsidePressIgnoreRef:g,outsideClosable:f=!0,allowedPlacements:m,anchorToMouse:v=!1,matchReferenceWidth:w=!0})=>{const[b,S]=p.useState(a),R=r!==void 0,y=R?!!r:b,x=p.useRef(null),F=p.useCallback(W=>{R||S(W),l?.(W)},[R,l]),P=p.useId(),M=i===void 0,A=W=>"clientWidth"in W?W.clientWidth:W.getBoundingClientRect?.()?.width??0,{refs:E,floatingStyles:I,context:O}=ge.useFloating({placement:i,open:y,onOpenChange:F,whileElementsMounted:ge.autoUpdate,middleware:[ge.offset({mainAxis:Vo,crossAxis:0}),M?ge.autoPlacement({alignment:"start",crossAxis:!0,padding:Vo,allowedPlacements:m}):ge.flip({padding:Vo}),ge.shift({padding:Vo}),ge.size({padding:Vo,apply({availableWidth:W,availableHeight:J,elements:xe}){const we=xe.floating,oe=A(xe.reference);we.style.setProperty("--fui-available-height",`${Math.floor(J)}px`),we.style.setProperty("--reference-width",w?`${Math.round(oe)}px`:"0px"),w?we.style.minWidth=`${Math.round(oe)}px`:we.style.removeProperty("min-width"),we.style.maxWidth=`${Math.floor(W)}px`,we.style.maxHeight=`${Math.floor(J)}px`}})]}),K=ge.useClick(O,{enabled:o.includes(Rt.Click)&&!n}),N=ge.useHover(O,{enabled:o.includes(Rt.Hover)&&!n,move:!1,restMs:40,delay:{open:80,close:80}}),ie=ge.useDismiss(O,{bubbles:!0,referencePress:!1,outsidePress:W=>{if(!f)return!1;const J=W.target;return!(g?.current&&J instanceof Node&&g.current.contains(J))}}),Q=ge.useRole(O,{role:"menu"}),{getReferenceProps:k,getFloatingProps:ee}=ge.useInteractions([K,N,ie,Q]),B=p.useCallback((W,J)=>{E.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:W,y:J,top:J,left:W,right:W,bottom:J})})},[E]),_=p.useCallback(W=>{!o.includes(Rt.ContextMenu)||n||(W.preventDefault(),v&&(B(W.clientX,W.clientY),x.current=document.elementFromPoint(W.clientX,W.clientY)),F(!0))},[v,n,F,B,o]),U=p.useCallback(W=>{!v||n||(B(W.clientX,W.clientY),x.current=document.elementFromPoint(W.clientX,W.clientY))},[v,n,B]);p.useEffect(()=>{n&&y&&F(!1)},[n,y,F]);const z=p.useCallback(W=>J=>{W.disabled||(W.onClick?.({key:W.key,domEvent:J}),t?.onClick?.({key:W.key,domEvent:J}),F(!1))},[t,F]),ne=p.useMemo(()=>s?s():t?C.jsxs(C.Fragment,{children:[t.header&&C.jsx(C.Fragment,{children:typeof t.header=="function"?t.header():t.header}),C.jsx("div",{role:"none",className:"py-1",children:t.items.map(W=>W.type===ll.Divider?C.jsx("div",{role:"separator",className:cw},W.key):C.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!W.disabled,className:$(rw,W.disabled&&aw,W.danger&&lw),disabled:W.disabled,onClick:z(W),children:[W.icon&&C.jsx("span",{className:$(W.danger&&"text-error",W.disabled&&"text-secondary"),children:C.jsx(Ee,{icon:W.icon})}),C.jsx("span",{className:$("flex-1 truncate text-left",W.danger&&"text-error",W.disabled&&"text-secondary"),children:W.label})]},W.key))}),t.footer&&C.jsx(C.Fragment,{children:typeof t.footer=="function"?t.footer():t.footer})]}):null,[z,t,s]),ve=k({onContextMenu:_,onMouseDown:U});return p.useEffect(()=>{if(!y)return;const W=E.reference.current;let J=null;if(W instanceof Element?J=W:x.current instanceof Element&&(J=x.current),!J)return;const xe=new IntersectionObserver(([we])=>{we.isIntersecting||F(!1)},{root:null,threshold:0});return xe.observe(J),()=>xe.disconnect()},[y,E.reference,F]),C.jsxs(C.Fragment,{children:[C.jsx("span",{ref:E.setReference,className:$(iw,n&&"!cursor-not-allowed opacity-75",u),"aria-haspopup":"menu","aria-expanded":y,"aria-controls":P,...ve,children:e}),y&&C.jsx(ge.FloatingPortal,{children:C.jsx(ge.FloatingFocusManager,{context:O,modal:!1,initialFocus:-1,returnFocus:!0,children:C.jsxs("div",{id:P,ref:E.setFloating,style:I,className:$(nw,!w&&"w-max",h),...ee(),children:[c&&C.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:C.jsx(cl,{ariaLabel:"Close dropdown",onClose:W=>{d?.(W),F(!1)}})}),ne]})})})]})},Ni=({tab:e,active:t,invalid:s,cssClass:o,horizontal:i,onClick:n})=>{const r=ue("rounded h-[32px] items-center flex flex-row border-transparent cursor-pointer dial-small leading-4 hover:text-accent-primary",{"border-b-2 px-4":i,"border-l-2 px-3":!i}),a=ue(r,{"bg-layer-4":i,"bg-layer-1 text-secondary pointer-events-none":e.disabled,"bg-accent-primary-alpha text-primary":t&&!e.disabled,"text-primary":!t&&!e.disabled,"border-b-accent-primary":t&&i&&!e.disabled,"border-l-accent-primary":t&&!i&&!e.disabled},o);return C.jsxs("button",{role:"tab",className:a,onClick:()=>n(e.id),disabled:e.disabled,children:[C.jsx(Ft,{text:e.name,contentClassName:"max-w-[200px]",cssClass:"max-w-[200px]"}),(s||e.invalid)&&C.jsx("div",{className:"text-error pl-1",children:C.jsx(j.IconExclamationCircle,{...me})})]})},Fc=12;var Es=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(Es||{});const Ec=()=>typeof window<"u"&&window.innerWidth<640,Dc=()=>{if(typeof window>"u")return Es.Undefined;const e=window.innerWidth;return e>=1024?Es.Desktop:e<640?Es.Mobile:Es.Tablet},dw=()=>{const[e,t]=p.useState(Dc());return p.useEffect(()=>{const s=()=>t(Dc());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},_u=({tabs:e,activeTab:t,onClick:s,orientation:o=gn.Horizontal,smallScreenThreshold:i=pn.Tablet,smallScreenContainerCssClass:n,smallScreenDropdownItemCssClass:r})=>{const[a,l]=p.useState(!1),[c,d]=p.useState(!1),[u,h]=p.useState(!1),g=dw(),f=g===Es.Mobile||i===pn.Tablet&&g===Es.Tablet,m=o===gn.Horizontal,v=p.useRef(null),w=p.useRef(null),b=p.useRef(null),S=e.find(x=>x.id===t),R=p.useMemo(()=>$("flex gap-3",m?"flex-row flex-nowrap overflow-x-auto":"flex-col flex-wrap w-full"),[m]),y=p.useCallback(()=>{const x=w.current;x&&h(x.scrollWidth>x.clientWidth)},[]);return p.useEffect(()=>{y();const x=new ResizeObserver(()=>y()),F=w.current;return F&&x.observe(F),()=>x.disconnect()},[e,y]),p.useEffect(()=>{const x=b.current,F=w.current;if(!x||!F)return;const P=x.offsetLeft,M=P+x.offsetWidth,A=F.scrollLeft,E=A+F.clientWidth;P<A?F.scrollTo({left:P-Fc,behavior:"smooth"}):M>E&&F.scrollTo({left:M-F.clientWidth+Fc,behavior:"smooth"})},[t]),f?C.jsx("div",{className:ue("h-11 flex items-center bg-layer-3 px-4",n),children:C.jsx(St,{trigger:[Rt.Click],open:a,onOpenChange:l,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>e.map(x=>C.jsx(Ni,{tab:x,active:x.id===t,onClick:F=>{s(F),l(!1)},cssClass:ue("w-full rounded-none h-11 items-center px-6",r)},x.id)),children:C.jsxs("div",{className:"flex gap-2 items-center h-11 cursor-pointer",children:[C.jsx(Ni,{tab:S,active:!0,onClick:s,cssClass:"rounded-none bg-transparent border-l-0 border-b-0 h-full items-center px-0"},t),C.jsx(Ee,{icon:C.jsx(j.IconChevronDown,{size:16}),className:$("text-primary transition-transform",a&&"rotate-180")})]})})}):C.jsxs("div",{ref:v,className:"flex w-full items-start",children:[C.jsx("div",{ref:w,className:R,children:e.map(x=>C.jsx("div",{ref:t===x.id?b:void 0,className:"w-full",children:C.jsx(Ni,{tab:x,active:t===x.id,onClick:s,horizontal:m,cssClass:"w-full"})},x.id))}),u&&C.jsx("div",{className:"flex items-center ml-2",children:C.jsx(St,{trigger:[Rt.Click],open:c,onOpenChange:d,placement:"bottom-end",renderOverlay:()=>e.map(x=>C.jsx(Ni,{tab:x,active:x.id===t,onClick:F=>{s(F),d(!1)},cssClass:"w-full rounded-none h-[32px] items-center px-3 py-2"},x.id)),children:C.jsx(Re,{iconBefore:C.jsx(j.IconDotsVertical,{size:18}),cssClass:$("w-8 h-8 flex items-center justify-center rounded border",c?"bg-layer-4 border-transparent":"border-primary")})})})]})},uw="w-full overflow-hidden",hw="flex flex-nowrap items-center gap-2 min-w-0 px-0 py-0 whitespace-nowrap",ju="flex items-center gap-2 min-w-0 shrink-0 dial-small",gw="max-w-[20%] basis-[20%] flex-none",pw="flex-1 min-w-0",Pc="inline-flex items-center gap-1 min-w-0 transition-colors",fw="text-secondary hover:text-accent-primary",mw="text-primary cursor-default",Uu="flex-none inline-flex items-center leading-none text-icon-secondary",Cw="items-center gap-1 min-w-0 transition-colors text-secondary hover:text-accent-primary",$u=C.jsx(j.IconChevronRight,{size:16,"aria-hidden":"true"}),Uo=({title:e,href:t,onClick:s,disabled:o,isLast:i,separator:n=$u,cssClass:r,iconBefore:a,titleCssClass:l})=>{const c=ue(ju,i?pw:gw,r),d=(!!t||!!s)&&!i&&!o,u=d?ue(Pc,fw):ue(Pc,mw,o?"pointer-events-none opacity-75":""),h=typeof e=="string"?C.jsx(Ft,{cssClass:l,text:e}):C.jsx("span",{className:ue("flex-1 min-w-0 max-w-full truncate",l),children:e});return C.jsxs("li",{className:c,children:[d?C.jsxs("a",{href:t,onClick:s,className:u,children:[a,h]}):C.jsxs("span",{className:u,"aria-current":i?"page":void 0,"aria-disabled":o?"true":void 0,children:[a,h]}),!i&&C.jsx("span",{className:Uu,children:n})]})},Ku=({pathItems:e,separator:t=$u,ariaLabel:s="Breadcrumb",cssClass:o,children:i,titleCssClass:n})=>{const r=p.useMemo(()=>e?.length?e:p.Children.toArray(i).filter(p.isValidElement).map(c=>{const d=c.props;return{title:d.title,href:d.href,onClick:d.onClick,disabled:d.disabled,iconBefore:d.iconBefore,cssClass:d.cssClass}}),[e,i]),a=p.useCallback(c=>{const d=parseInt(c.key,10),u=r[d];u.onClick?u.onClick(c.domEvent):u.href&&(window.location.href=u.href)},[r]),l=p.useMemo(()=>{if(r.length===0)return null;if(r.length<=3)return r.map((f,m)=>p.createElement(Uo,{...f,key:`item-${m}`,isLast:m===r.length-1,separator:t,titleCssClass:n}));const c=r.at(0),d=r.slice(1,-2),u=r.at(-2),h=r.at(-1);if(!c||!u||!h)return null;const g=d.map((f,m)=>({key:String(m+1),label:typeof f.title=="string"?f.title:`Item ${m+1}`,disabled:f.disabled}));return C.jsxs(C.Fragment,{children:[p.createElement(Uo,{...c,key:"item-0",separator:t,titleCssClass:n}),C.jsxs("li",{className:ue(ju),children:[C.jsx(St,{menu:{items:g,onClick:a},placement:"bottom-start",matchReferenceWidth:!1,children:C.jsx("button",{type:"button","aria-label":"More breadcrumbs",className:Cw,children:C.jsx(j.IconDots,{size:16})})}),C.jsx("span",{className:Uu,children:t})]}),p.createElement(Uo,{...u,key:`item-${r.length-2}`,separator:t,titleCssClass:n}),p.createElement(Uo,{...h,key:`item-${r.length-1}`,isLast:!0,separator:t,titleCssClass:n})]})},[r,t,n,a]);return C.jsx("nav",{"aria-label":s,className:ue(uw,o),children:C.jsx("ol",{className:hw,children:l})})},qu=({iconClass:e,...t})=>C.jsx(Re,{iconBefore:C.jsx(j.IconTrashX,{...me,className:e||""}),...t}),Yu=({value:e,textareaId:t,placeholder:s,cssClass:o="",containerCssClass:i="",disabled:n,invalid:r,readonly:a,disableTooltip:l,onChange:c})=>C.jsx(Xt,{tooltip:l?null:e,triggerClassName:ue("flex",i),children:C.jsx("textarea",{id:t,placeholder:s,value:e||"",disabled:n,className:$("dial-textarea dial-input px-3 py-2",r?"dial-input-error":"",n&&"dial-input-disable",a&&"dial-input-readonly",o),onChange:d=>!a&&c?.(d.currentTarget.value)})}),vw=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],ww=(e,t,s,o)=>{if((t==="number"||s!==void 0||o!==void 0)&&!vw.includes(e.key)&&!(e.ctrlKey||e.metaKey)&&!(e.key==="-"&&(e.currentTarget.selectionStart??0)===0&&!e.currentTarget.value.includes("-"))&&!(e.key==="."&&t==="number"&&!e.currentTarget.value.includes("."))){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}if(s!==void 0||o!==void 0){const n=e.currentTarget.value,r=e.currentTarget.selectionStart||0,a=n.slice(0,r)+e.key+n.slice(r),l=parseFloat(a);if(!isNaN(l)){if(s!==void 0&&l<s){e.preventDefault();return}if(o!==void 0&&l>o){e.preventDefault();return}}}}},Gs=({iconBefore:e,iconAfter:t,hideBorder:s,value:o,elementId:i,placeholder:n="",cssClass:r="",containerCssClass:a,tooltipTriggerClassName:l,type:c="text",disabled:d,readonly:u,invalid:h,onChange:g,min:f,max:m,prefix:v,suffix:w,textBeforeInput:b,textAfterInput:S,onBlur:R,defaultValue:y,tooltipText:x,hideTooltip:F=!1,inputRef:P})=>{const M=O=>O.target.blur(),A=c==="number"||f!==void 0||m!==void 0,E=O=>{ww(O,c,f,m)},I=O=>{const K=O.currentTarget.value;if(A&&K!==""){const N=parseFloat(K);if(isNaN(N)&&K!=="-"&&K!=="."||!isNaN(N)&&(f!==void 0&&N<f||m!==void 0&&N>m))return}g?.(K||void 0)};return C.jsxs("div",{className:$("dial-input-field flex flex-row items-center justify-between py-2",s?"dial-input-no-border":"dial-input",h&&"dial-input-error",d&&"dial-input-disable",u&&"dial-input-readonly",!b&&"pl-3",!S&&"pr-3",a),children:[b&&C.jsx("div",{className:"mr-2",children:C.jsx(Gs,{hideBorder:!0,containerCssClass:"rounded-r-none border-r-0",cssClass:"overflow-hidden overflow-ellipsis dial-small",value:b,disabled:!0,elementId:b+"textBefore"})}),v&&C.jsxs("p",{className:"text-secondary dial-small mr-2",children:[" ",v]}),C.jsx(Ee,{icon:e,className:$(!!e&&"mr-2")}),C.jsx(Xt,{tooltip:F?void 0:x||o,triggerClassName:$(l,"flex-1"),children:C.jsx("input",{ref:P,type:c,autoComplete:"off",id:i,placeholder:n,value:y?void 0:o??"",disabled:d,className:$("border-0 bg-transparent w-full truncate",r),onChange:O=>!u&&I?.(O),onKeyDown:E,onWheel:M,onBlur:R,min:f,max:m,defaultValue:y})}),C.jsx(Ee,{icon:t,className:$(!!t&&"ml-2")}),w&&C.jsxs("p",{className:"text-secondary dial-small ml-2",children:[" ",w]}),S&&C.jsx("div",{className:"ml-2",children:C.jsx(Gs,{hideBorder:!0,containerCssClass:"rounded-l-none border-l-0",value:S,disabled:!0,elementId:S+"textAfter"})})]})},bw=/^0+\.(\d+)?$/,Sw=/^0+/,Zu=({label:e,optional:t,optionalText:s,description:o,error:i,captionDescription:n,readonly:r,orientation:a,elementId:l,fieldTitle:c,errorText:d,elementCssClass:u,elementContainerCssClass:h,containerCssClass:g,defaultEmptyText:f,...m})=>C.jsx(jn,{label:e??c,error:i??d,optionalText:s,optional:t,description:o,captionDescription:n,readonly:r,orientation:a,elementId:l,cssClass:g,defaultEmptyText:f,value:m.value,children:C.jsx(Gs,{elementId:l,cssClass:u,containerCssClass:h,invalid:d!=null,...m})}),yw=({onChange:e,...t})=>{const s=o=>!o||o==="-"?o:String(o)?.match(bw)?String(o)?.replace(Sw,"0"):Number(o);return C.jsx(Zu,{type:"number",onChange:o=>e?.(s(o)),...t})},Rw=({onChange:e,...t})=>C.jsx(Zu,{type:"text",onChange:s=>e?.(s),...t}),xw=({fieldTitle:e,optional:t,elementId:s,elementCssClass:o,containerCssClass:i,elementContainerCssClass:n,errorText:r,...a})=>C.jsxs("div",{className:ue("flex flex-col",i),children:[C.jsx(Ks,{fieldTitle:e,optional:t,htmlFor:s}),C.jsx(Yu,{textareaId:s,cssClass:o,containerCssClass:n,...a}),C.jsx(us,{errorText:r})]}),dl=({title:e,switchId:t,isOn:s=!1,disabled:o,onChange:i})=>{const n=$("flex w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",s?"flex-row-reverse":"flex-row",o?"pointer-events-none":"",o?s?"bg-controls-disable":"bg-layer-4":s?"bg-accent-primary":"bg-layer-4"),r=p.useCallback(a=>{a.stopPropagation(),i?.(!s)},[i,s]);return C.jsxs("div",{className:"flex flex-row items-center",children:[C.jsx("input",{type:"checkbox",onChange:r,id:t,disabled:o,className:"invisible w-0 h-0",checked:s}),C.jsx("label",{htmlFor:t,className:n,children:C.jsx("span",{className:$("size-3 rounded-full",o?s?"bg-layer-4":"bg-controls-disable":"bg-controls-enable-primary")})}),e&&C.jsx("span",{className:"pl-2 dial-small text-primary",children:e})]})};var Ot=(e=>(e.Sm="sm",e.Md="md",e.Lg="lg",e))(Ot||{});const Fw="z-[52] flex items-center justify-center bg-blackout md:p-4",Ew="divide-tertiary divide-y",Dw="flex flex-row justify-between py-4 px-6 items-center",Pw={[Ot.Sm]:"dial-sm-popup",[Ot.Md]:"dial-md-popup",[Ot.Lg]:"dial-lg-popup"},xi=({open:e=!1,title:t,portalId:s,cssClass:o,overlayClass:i,headingClass:n,dividers:r=!0,children:a,footer:l,onClose:c,size:d=Ot.Md})=>{const{refs:u,context:h}=ge.useFloating({open:e,onOpenChange:b=>{b||c?.(null)}}),g=ge.useRole(h,{role:"dialog"}),f=ge.useDismiss(h,{outsidePress:!0}),{getFloatingProps:m}=ge.useInteractions([g,f]);if(!e)return null;const v=typeof t=="string"?"dial-popup-heading":void 0,w=b=>b?typeof b=="string"?C.jsx("h3",{id:v,className:$("flex-1 min-w-0 mr-3 truncate dial-h3 text-primary",n),children:C.jsx(Xt,{tooltip:b,children:b})}):b:C.jsx("span",{});return C.jsx(ge.FloatingPortal,{id:s,children:C.jsx(ge.FloatingOverlay,{className:$(Fw,i),children:C.jsx(ge.FloatingFocusManager,{context:h,children:C.jsxs("div",{ref:u.setFloating,...m(),role:"dialog","aria-modal":"true","aria-labelledby":v,className:$("dial-popup",Pw[d],r&&Ew,o),children:[C.jsxs("div",{className:Dw,children:[w(t),C.jsx(cl,{ariaLabel:"Close dialog",onClose:b=>c?.(b)})]}),C.jsx("div",{className:"flex-grow overflow-auto",children:a}),l]})})})})};var Ro=(e=>(e.Info="info",e.Danger="danger",e))(Ro||{});const Tw="flex justify-end gap-2 px-6 py-4",Mw="text-secondary dial-small-150 px-6 py-4",Iw="Cancel",kw="Ok",Tc={[Ro.Info]:{confirmVariant:De.Primary,cancelVariant:De.Secondary},[Ro.Danger]:{container:"dial-danger-popup",confirmVariant:De.Danger,cancelVariant:De.Secondary}},Qu=({title:e,description:t,descriptionCssClass:s,open:o=!1,confirmLabel:i=kw,cancelLabel:n=Iw,isLoading:r=!1,disableConfirmButton:a=!1,cssClass:l,confirmClassName:c,onClose:d,onConfirm:u,onCancel:h,children:g,dividers:f=!1,variant:m=Ro.Info,size:v=Ot.Sm,footer:w})=>{const b=r?null:C.jsxs("div",{className:Tw,children:[C.jsx(Re,{variant:De.Secondary,title:n,onClick:()=>h?h():d?.()}),C.jsx(Re,{variant:Tc[m].confirmVariant,cssClass:c,title:i,disable:a,onClick:()=>u()})]}),S=p.useCallback(()=>r?C.jsx("div",{className:"px-6 py-4 h-[120px]",children:C.jsx(Ri,{size:50})}):g??(t?C.jsx("div",{className:$(Mw,s),children:t}):null),[g,t,r,s]);return C.jsx(xi,{open:o,title:e,cssClass:$(Tc[m].container,l),dividers:f,onClose:()=>d?.(),footer:w??b,size:v,children:S()})},ul=({selectedItems:e,listCssClass:t,listElementCssClass:s,placeholder:o})=>e?.length?C.jsx("ul",{className:$("flex-row items-center truncate flex-wrap","flex gap-x-2 gap-y-1",t),children:e?.map(i=>C.jsx("li",{children:C.jsx(Xt,{tooltip:i,children:C.jsx(Kn,{tag:i,cssClass:$([s])})})},i))}):o?C.jsx("span",{className:"text-secondary",children:o}):null,Mc=e=>re.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},re.createElement("path",{d:"M2.25 13.5V12C2.25 11.5858 2.58579 11.25 3 11.25C3.41421 11.25 3.75 11.5858 3.75 12V13.5C3.75 13.6989 3.82907 13.8896 3.96973 14.0303C4.11038 14.1709 4.30109 14.25 4.5 14.25H6C6.41421 14.25 6.75 14.5858 6.75 15C6.75 15.4142 6.41421 15.75 6 15.75H4.5C3.90326 15.75 3.33114 15.5128 2.90918 15.0908C2.48722 14.6689 2.25 14.0967 2.25 13.5ZM14.25 6V4.5C14.25 4.30109 14.1709 4.11038 14.0303 3.96973C13.8896 3.82907 13.6989 3.75 13.5 3.75H12C11.5858 3.75 11.25 3.41421 11.25 3C11.25 2.58579 11.5858 2.25 12 2.25H13.5C14.0967 2.25 14.6689 2.48722 15.0908 2.90918C15.5128 3.33114 15.75 3.90326 15.75 4.5V6C15.75 6.41421 15.4142 6.75 15 6.75C14.5858 6.75 14.25 6.41421 14.25 6Z",fill:"currentColor"})),Xu=({children:e,open:t,disabled:s=!1,selectedValue:o,valueCssClasses:i,inputCssClasses:n,onOpen:r,elementId:a,errorText:l,invalid:c,emptyValueText:d,placeholder:u})=>{const h=Array.isArray(o)&&o.length>0,g=typeof o=="string"&&!!o.trim(),f=h||g?o:u?void 0:d,m=s?void 0:r,v=()=>C.jsxs(C.Fragment,{children:[C.jsx("button",{type:"button",className:"w-full",onClick:m,"aria-label":"open-popup",id:a,children:C.jsxs("div",{className:$("dial-input px-3 py-2 dial-input-field flex flex-row items-center w-full justify-between",n,s&&"dial-input-disable",(l||c)&&"dial-input-error"),children:[C.jsx(Xt,{tooltip:f==null?void 0:String(f),children:f||!u?C.jsx("span",{className:i,children:f}):C.jsx("span",{className:"text-secondary",children:u})}),!s&&C.jsx("div",{className:"flex-shrink-0",children:C.jsx(Ee,{icon:C.jsx(Mc,{role:"img",width:ao,height:ao})})})]})}),l&&C.jsx(us,{errorText:l})]}),w=()=>C.jsx("div",{className:"w-full",onClick:m,children:C.jsxs("div",{className:$("dial-input px-3 py-2 flex flex-row items-center w-full justify-between",s&&"dial-input-disable"),children:[C.jsx(ul,{placeholder:u,selectedItems:f}),!s&&C.jsx("div",{className:"ml-1",children:C.jsx(Ee,{icon:C.jsx(Mc,{role:"img",width:ao,height:ao})})})]})});return C.jsxs(C.Fragment,{children:[h?w():v(),t&&_n.createPortal(e,document.body)]})},Aw=({fieldTitle:e,htmlFor:t,disabled:s,selectedValue:o,radioButtons:i,customInputValue:n,valueCssClasses:r,inputCssClasses:a,emptyValueText:l,onClose:c,title:d,portalId:u,onApply:h,cancelButtonTitle:g="Cancel",applyButtonTitle:f="Apply",isValid:m,selectedRadioValue:v,onChangeRadioField:w,id:b,size:S=Ot.Md})=>{const[R,y]=p.useState(!1),x=p.useCallback(()=>{s||y(!0)},[s]),F=p.useCallback(()=>{y(!1),c?.()},[c]),P=p.useCallback(()=>{h(),F()},[h,F]);return C.jsxs("div",{className:"flex flex-col",children:[C.jsx(Ks,{fieldTitle:e,htmlFor:t}),C.jsx(Xu,{disabled:s,open:R,selectedValue:n??i.find(M=>M.id===o)?.name,valueCssClasses:r,inputCssClasses:$(a,"py-2","px-3"),emptyValueText:l,onOpen:x,children:C.jsx(xi,{open:R,onClose:F,title:d,portalId:u,size:S,footer:C.jsxs("div",{className:"flex flex-row items-center justify-end gap-2 px-6 py-4",children:[C.jsx(Re,{variant:De.Secondary,title:g,onClick:F}),C.jsx(Re,{variant:De.Primary,title:f,onClick:P,disable:!m})]}),children:C.jsx("div",{className:"px-6 py-4",children:C.jsx(Eu,{radioButtons:i,labelCssClass:"dial-small",activeRadioButton:v,onChange:w,elementId:b,orientation:ai.Column})})})})]})},Lw="Create",Ow="Cancel",Nw="flex items-center justify-end gap-2 px-6 py-3",Hw=({title:e,open:t=!1,submitLabel:s=Lw,cancelLabel:o=Ow,isLoading:i=!1,disableSubmitButton:n=!1,cssClass:r,submitClassName:a,onClose:l,onSubmit:c,onCancel:d,children:u,dividers:h=!0,size:g=Ot.Md,footer:f})=>{const m=i?null:C.jsxs("div",{className:Nw,children:[C.jsx(Re,{variant:De.Secondary,title:o,onClick:()=>d?d():l?.()}),C.jsx(Re,{variant:De.Primary,cssClass:a,title:s,disable:n,onClick:()=>c()})]}),v=p.useCallback(()=>i?C.jsx("div",{className:"px-6 py-4 h-[120px]",children:C.jsx(Ri,{size:50})}):u??null,[u,i]);return C.jsx(xi,{open:t,title:e,cssClass:r,dividers:h,onClose:()=>l?.(),footer:f??m,size:g,children:v()})},Gw=({onClick:e})=>C.jsx(j.IconEyeOff,{...me,className:"text-primary",onClick:e,role:"button","aria-label":"hide"}),Vw=({onClick:e})=>C.jsx(j.IconEye,{...me,className:"text-primary",onClick:e,role:"button","aria-label":"show"}),Ju=({...e})=>{const[t,s]=p.useState(!1),o=p.useCallback(i=>{s(i)},[]);return C.jsx(Gs,{type:t?"text":"password",...e,hideTooltip:!t,iconAfter:t?C.jsx(Gw,{onClick:()=>o(!1)}):C.jsx(Vw,{onClick:()=>o(!0)})})},Bw=({fieldTitle:e,optional:t,elementCssClass:s,elementId:o,errorText:i,...n})=>C.jsxs("div",{className:"flex flex-col",children:[C.jsx(Ks,{fieldTitle:e,optional:t,htmlFor:o}),C.jsx(Ju,{cssClass:s,elementId:o,invalid:!!i,...n}),C.jsx(us,{errorText:i})]});var ci=(e=>(e.Small="small",e.Base="base",e))(ci||{});const zw={[ci.Small]:{textClass:"text-xs px-1",containerClass:"px-[6px] py-1 h-[22px]",iconSize:10,iconStroke:1},[ci.Base]:{textClass:"text-sm px-2",containerClass:"px-3 py-2 h-[38px]",iconSize:18,iconStroke:1.5}},hl=({elementId:e,value:t,placeholder:s="Search...",disabled:o,readonly:i,invalid:n,cssClass:r,containerCssClass:a,onChange:l,size:c=ci.Base,allowClear:d=!0})=>{const[u,h]=p.useState(t||"");p.useEffect(()=>{h(t||"")},[t]);const g=p.useCallback(v=>{h(v),l?.(v)},[l]),f=zw[c],m=p.useCallback(()=>{g("")},[g]);return C.jsxs("div",{className:$("dial-input flex flex-row items-center justify-between",n&&"dial-input-error",o&&"dial-input-disable",i&&"dial-input-readonly",f.containerClass,a),children:[C.jsx(Ee,{className:$(o?"text-secondary":"text-primary"),icon:C.jsx(j.IconSearch,{size:f.iconSize,stroke:f.iconStroke})}),C.jsx("input",{id:e,type:"text",autoComplete:"off",placeholder:s,value:u??"",disabled:o,readOnly:i,className:$("border-0 bg-transparent w-full",r,f.textClass),onChange:v=>!i&&g(v.currentTarget.value)}),u&&!i&&!o&&d&&C.jsx(Ee,{className:"text-primary cursor-pointer",icon:C.jsx(j.IconX,{size:f.iconSize,stroke:f.iconStroke,onClick:m,"aria-label":"Clear search",role:"button"})})]})},Ww=({placeholder:e="",selectedItems:t=[],updateSelected:s,listCssClass:o,listElementCssClass:i,containerCssClass:n,inputCssClass:r})=>{const[a,l]=p.useState(""),c=p.useCallback(u=>{u.key==="Enter"&&(s([...t,u.currentTarget.value]),l("")),(u.key==="Backspace"||u.key==="Delete")&&t.length&&!a&&s(t.slice(0,-1))},[t,s,a]),d=p.useCallback(u=>{l(u.target.value)},[l]);return C.jsxs("div",{className:$(["dial-input px-3 py-2 flex flex-row items-center flex-wrap w-fit gap-2",n]),children:[C.jsx(ul,{selectedItems:t,listCssClass:o,listElementCssClass:i}),C.jsx("input",{type:"text",value:a,className:$(["border-0 bg-transparent p-0",r]),placeholder:t?.length?"":e,onKeyDown:c,onChange:d})]})},_w=({initialTags:e=[],fieldTitle:t,optional:s,elementId:o,placeholder:i,errorText:n,invalid:r,disabled:a,onChange:l})=>{const c=p.useRef(null),[d,u]=p.useState(e),[h,g]=p.useState(""),[f,m]=p.useState(!1),v=S=>{const R=S.trim().replace(/,$/,"");if(R&&!d.includes(R)){const y=[R,...d];u(y),l?.(y)}},w=S=>{(S.key===","||S.key==="Enter")&&(S.preventDefault(),v(h),g(""))},b=S=>{const R=d.filter((y,x)=>x!==S);u(R),l?.(R)};return p.useEffect(()=>{const S=new ResizeObserver(()=>{if(c.current){const R=c.current.scrollHeight>c.current.clientHeight+10;m(R)}});return c.current&&S.observe(c.current),()=>S.disconnect()},[d]),C.jsxs("div",{className:$("flex flex-col w-full"),children:[C.jsx(Ks,{fieldTitle:t,optional:s,htmlFor:o}),C.jsx("div",{className:$("dial-input min-h-[38px] p-[6px]",r&&"dial-input-error",a&&"dial-input-disable"),children:C.jsxs("div",{ref:c,className:$("flex flex-wrap gap-2 items-center",f?"flex-col-reverse":"flex-row"),children:[d.map((S,R)=>C.jsx(Kn,{tag:S,remove:a?void 0:()=>b(R)},S+R)),C.jsx("input",{type:"text",value:h,onChange:S=>g(S.target.value),onKeyDown:w,className:$("dial-input-no-border outline-none border-none w-full min-w-[100px] flex-1 p-1"),placeholder:i,disabled:a})]})}),C.jsx(us,{errorText:n})]})},jw="dial-input flex w-full items-center justify-between gap-2 dial-small",Uw="w-full rounded",yr="flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none",$w="bg-accent-primary-alpha",Kw="bg-accent-primary-alpha border-l border-accent-primary border-1",Ic="opacity-75",qw=C.jsx(j.IconChevronDown,{size:16}),eh=({options:e,selectedValues:t,handleRemoveTag:s})=>C.jsx("div",{className:"flex flex-wrap w-full items-center gap-1",children:t.map(o=>{const i=e.find(r=>r.value===o)?.label??o,n=e.find(r=>r.value===o)?.icon;return C.jsx(Kn,{tag:i,remove:r=>s?.(r,o),iconBefore:n?C.jsx(Ee,{icon:n}):null,cssClass:"max-w-full"},o)})});var fn=(e=>(e.Sm="sm",e.Md="md",e))(fn||{}),mn=(e=>(e.Primary="Primary",e.Secondary="Secondary",e))(mn||{});const th=({options:e,multiple:t=!1,value:s,defaultValue:o,variant:i=mn.Primary,size:n=fn.Md,prefix:r,placeholder:a="Select...",searchable:l=!1,searchPlaceholder:c,selectAll:d=!1,selectAllLabel:u="Select all",emptyStateTitle:h="No options available",emptyStateDescription:g,emptyStateIcon:f,disabled:m=!1,cssClass:v,closable:w=!1,header:b,footer:S,onClose:R,onChange:y,inlineSearch:x=!1,onFooterClick:F})=>{const[P,M]=p.useState(!1),[A,E]=p.useState(""),I=p.useId(),O=p.useRef(null),K=s!==void 0,[N,ie]=p.useState(o),Q=K?s:N,k=p.useMemo(()=>t?Array.isArray(Q)?Q:[]:typeof Q=="string"?[Q]:[],[Q,t]),ee=p.useMemo(()=>{const H=A.trim().toLowerCase();return H?e.filter(pe=>pe.label.toLowerCase().includes(H)):e},[e,A]);p.useEffect(()=>{P||E("")},[P]);const B=p.useCallback(H=>{K||ie(H),y?.(H)},[K,y]),_=H=>{if(t){const pe=new Set(k);pe.has(H)?pe.delete(H):pe.add(H),B(Array.from(pe))}else B(H),M(!1)},U=p.useCallback((H,pe)=>{if(H.stopPropagation(),!t){B("");return}const te=k.filter(de=>de!==pe);B(te)},[t,k,B]),z=p.useMemo(()=>ee.filter(H=>!H.disabled),[ee]),ne=p.useMemo(()=>z.filter(H=>k.includes(H.value)).length,[z,k]),ve=z.length>0&&ne===z.length,W=ne>0&&!ve,J=()=>{if(!(!t||z.length===0))if(ve){const H=new Set(z.map(te=>te.value)),pe=k.filter(te=>!H.has(te));B(pe)}else{const H=new Set(k);z.forEach(pe=>H.add(pe.value)),B(Array.from(H))}},xe=k.length>0;p.useEffect(()=>{P&&x&&!t&&!m&&requestAnimationFrame(()=>{const H=O.current;if(!H)return;H.focus();const pe=H.value?.length??0;H.setSelectionRange?.(pe,pe)})},[P,x,t,m]);const we=!t&&xe?k[0]:void 0,oe=p.useMemo(()=>we?e.find(H=>H.value===we):void 0,[e,we]),He=p.useCallback(()=>!t||k.length===0?null:C.jsx(eh,{options:e,selectedValues:k,handleRemoveTag:U}),[t,e,k,U]),Fe=p.useCallback(()=>t?xe?He():C.jsx("span",{className:"text-secondary truncate",children:a}):oe?C.jsxs(C.Fragment,{children:[oe.icon&&C.jsx(Ee,{icon:oe.icon}),C.jsx(Ft,{text:r?`${r} ${oe.label}`:oe.label}),oe?.description&&C.jsx("div",{className:"text-secondary dial-small",children:oe.description})]}):C.jsx("span",{className:"text-secondary truncate",children:a}),[xe,t,r,a,He,oe]),je=P?A:oe?.label??"";return C.jsx(St,{open:P,onOpenChange:M,disabled:m,closable:w,onClose:R,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>C.jsxs("div",{id:I,role:"listbox","aria-multiselectable":t||void 0,className:Uw,children:[b&&C.jsx(C.Fragment,{children:typeof b=="function"?b():b}),(l||w)&&C.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[l&&C.jsx(hl,{placeholder:c,onChange:E,value:A,elementId:`search-${I}`}),w&&C.jsx(Re,{ariaLabel:"Close select",cssClass:"shrink-0",iconBefore:C.jsx(j.IconX,{size:16}),onClick:H=>{R?.(H),M(!1)}})]}),t&&d&&z.length>0&&C.jsx("div",{className:$(yr,"mt-2"),children:C.jsx(ni,{id:`${I}-selectAll`,label:u,checked:ve,indeterminate:W,onChange:J,ariaLabel:u})}),C.jsx("div",{className:"overflow-y-auto py-1",children:ee.length===0?C.jsx("div",{className:"px-2 py-3",children:C.jsx(Un,{icon:f??C.jsx(j.IconClipboardX,{size:24}),title:h,description:g})}):ee.map(H=>{const pe=k.includes(H.value);return t?C.jsxs("div",{role:"option","aria-selected":pe,"aria-disabled":!!H.disabled,className:$(yr,pe&&$w,H.disabled&&Ic,"w-full"),children:[C.jsx(ni,{id:`${I}-${H.value}`,label:C.jsxs("span",{className:"flex w-full flex-1 min-w-0 items-center gap-2 text-primary",children:[H.icon&&C.jsx(Ee,{icon:H.icon}),C.jsx("span",{className:"truncate",children:H.label})]}),checked:pe,disabled:H.disabled,onChange:()=>!H.disabled&&_(H.value),ariaLabel:H.label}),H.description&&C.jsx("div",{className:"text-secondary dial-small",children:H.description})]},H.value):C.jsx("button",{role:"option",type:"button","aria-selected":pe,"aria-disabled":!!H.disabled,disabled:H.disabled,className:$(yr,pe&&Kw,H.disabled&&Ic),onClick:()=>!H.disabled&&_(H.value),children:C.jsxs("div",{className:"flex items-center gap-2 w-full",children:[H.icon&&C.jsx(Ee,{icon:H.icon}),C.jsx(Ft,{text:H.label}),H.description&&C.jsx("div",{className:"text-secondary dial-small",children:H.description})]})},H.value)})}),S&&C.jsx("div",{onClick:H=>{F?.(H),F&&M(!1)},children:typeof S=="function"?S():S})]}),children:C.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-expanded":P,"aria-controls":I,className:ue(jw,m&&"opacity-75 !cursor-not-allowed",n===fn.Sm?"min-h-[25px] px-1.5 py-1":"min-h-[38px] px-3 py-2",i===mn.Secondary?"!bg-layer-4":"",v),onMouseDown:H=>{m||x&&!t&&H.preventDefault()},onClick:()=>{m||(M(H=>!H),x&&!t&&O.current?.focus())},children:[x&&!t?C.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-primary flex-1",children:[C.jsx("input",{id:`inline-${I}`,type:"text",placeholder:c??a,value:je,onChange:H=>E(H.currentTarget.value),onFocus:()=>!m&&M(!0),onMouseDown:H=>H.stopPropagation(),onClick:H=>H.stopPropagation(),className:"bg-transparent outline-none w-full dial-small",ref:O,disabled:m,"aria-disabled":m}),oe&&!m&&C.jsx(Re,{ariaLabel:"Clear selection",iconBefore:C.jsx(j.IconX,{size:16}),onClick:H=>{H.stopPropagation(),B(""),E(""),M(!0)}})]}):C.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary",children:Fe()}),C.jsx(Ee,{icon:qw,className:$("text-primary",P&&"rotate-180")})]})})},Yw=({fieldTitle:e,optional:t,captionDescription:s,containerCssClass:o,selectCssClass:i,error:n,elementId:r,description:a,readonly:l,value:c,defaultEmptyText:d,...u})=>{const h=p.useCallback(()=>{if(!c||Array.isArray(c)&&c.length===0)return d??"None";if(Array.isArray(c))return C.jsx(eh,{options:u.options,selectedValues:c});{const g=u.options?.find(f=>f.value===c);return C.jsx("span",{"aria-readonly":!0,className:"text-primary",children:g?.label||c})}},[c,u.options,d]);return C.jsx(jn,{elementId:r,label:e,optional:t,description:a,error:n,captionDescription:s,cssClass:o,readonly:l,value:h(),defaultEmptyText:d,children:C.jsx(th,{cssClass:i,value:c,...u})})};function sh(e){let t=null;return()=>(t==null&&(t=e()),t)}function Zw(e,t){return e.filter(s=>s!==t)}function Qw(e,t){const s=new Set,o=n=>s.add(n);e.forEach(o),t.forEach(o);const i=[];return s.forEach(n=>i.push(n)),i}class Xw{enter(t){const s=this.entered.length,o=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t));return this.entered=Qw(this.entered.filter(o),[t]),s===0&&this.entered.length>0}leave(t){const s=this.entered.length;return this.entered=Zw(this.entered.filter(this.isNodeInDocument),t),s>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class Jw{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const s={};Object.keys(this.config.exposeProperties).forEach(o=>{const i=this.config.exposeProperties[o];i!=null&&(s[o]={value:i(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,s)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,s){return s===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const gl="__NATIVE_FILE__",oh="__NATIVE_URL__",ih="__NATIVE_TEXT__",nh="__NATIVE_HTML__",kc=Object.freeze(Object.defineProperty({__proto__:null,FILE:gl,HTML:nh,TEXT:ih,URL:oh},Symbol.toStringTag,{value:"Module"}));function Rr(e,t,s){const o=t.reduce((i,n)=>i||e.getData(n),"");return o??s}const fa={[gl]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[nh]:{exposeProperties:{html:(e,t)=>Rr(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[oh]:{exposeProperties:{urls:(e,t)=>Rr(e,t,"").split(`
|
|
2
|
+
`),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[ih]:{exposeProperties:{text:(e,t)=>Rr(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function e1(e,t){const s=fa[e];if(!s)throw new Error(`native type ${e} has no configuration`);const o=new Jw(s);return o.loadDataTransfer(t),o}function xr(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(fa).filter(s=>{const o=fa[s];return o?.matchesTypes?o.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const t1=sh(()=>/firefox/i.test(navigator.userAgent)),rh=sh(()=>!!window.safari);class Ac{interpolate(t){const{xs:s,ys:o,c1s:i,c2s:n,c3s:r}=this;let a=s.length-1;if(t===s[a])return o[a];let l=0,c=r.length-1,d;for(;l<=c;){d=Math.floor(.5*(l+c));const g=s[d];if(g<t)l=d+1;else if(g>t)c=d-1;else return o[d]}a=Math.max(0,c);const u=t-s[a],h=u*u;return o[a]+i[a]*u+n[a]*h+r[a]*u*h}constructor(t,s){const{length:o}=t,i=[];for(let g=0;g<o;g++)i.push(g);i.sort((g,f)=>t[g]<t[f]?-1:1);const n=[],r=[];let a,l;for(let g=0;g<o-1;g++)a=t[g+1]-t[g],l=s[g+1]-s[g],n.push(a),r.push(l/a);const c=[r[0]];for(let g=0;g<n.length-1;g++){const f=r[g],m=r[g+1];if(f*m<=0)c.push(0);else{a=n[g];const v=n[g+1],w=a+v;c.push(3*w/((w+v)/f+(w+a)/m))}}c.push(r[r.length-1]);const d=[],u=[];let h;for(let g=0;g<c.length-1;g++){h=r[g];const f=c[g],m=1/n[g],v=f+c[g+1]-h-h;d.push((h-f-v)*m),u.push(v*m*m)}this.xs=t,this.ys=s,this.c1s=c,this.c2s=d,this.c3s=u}}const s1=1;function ah(e){const t=e.nodeType===s1?e:e.parentElement;if(!t)return null;const{top:s,left:o}=t.getBoundingClientRect();return{x:o,y:s}}function Hi(e){return{x:e.clientX,y:e.clientY}}function o1(e){var t;return e.nodeName==="IMG"&&(t1()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function i1(e,t,s,o){let i=e?t.width:s,n=e?t.height:o;return rh()&&e&&(n/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:n}}function n1(e,t,s,o,i){const n=o1(t),a=ah(n?e:t),l={x:s.x-a.x,y:s.y-a.y},{offsetWidth:c,offsetHeight:d}=e,{anchorX:u,anchorY:h}=o,{dragPreviewWidth:g,dragPreviewHeight:f}=i1(n,t,c,d),m=()=>{let x=new Ac([0,.5,1],[l.y,l.y/d*f,l.y+f-d]).interpolate(h);return rh()&&n&&(x+=(window.devicePixelRatio-1)*f),x},v=()=>new Ac([0,.5,1],[l.x,l.x/c*g,l.x+g-c]).interpolate(u),{offsetX:w,offsetY:b}=i,S=w===0||w,R=b===0||b;return{x:S?w:v(),y:R?b:m()}}class r1{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,s){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=s}}function a1(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Lc(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){a1(e,i,s[i])})}return e}class l1{profile(){var t,s;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((s=this.dragOverTargetIds)===null||s===void 0?void 0:s.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var s;(s=this.window)===null||s===void 0||s.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,s,o){return this.sourcePreviewNodeOptions.set(t,o),this.sourcePreviewNodes.set(t,s),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,s,o){this.sourceNodes.set(t,s),this.sourceNodeOptions.set(t,o);const i=r=>this.handleDragStart(r,t),n=r=>this.handleSelectStart(r);return s.setAttribute("draggable","true"),s.addEventListener("dragstart",i),s.addEventListener("selectstart",n),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),s.removeEventListener("dragstart",i),s.removeEventListener("selectstart",n),s.setAttribute("draggable","false")}}connectDropTarget(t,s){const o=r=>this.handleDragEnter(r,t),i=r=>this.handleDragOver(r,t),n=r=>this.handleDrop(r,t);return s.addEventListener("dragenter",o),s.addEventListener("dragover",i),s.addEventListener("drop",n),()=>{s.removeEventListener("dragenter",o),s.removeEventListener("dragover",i),s.removeEventListener("drop",n)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),s=this.sourceNodeOptions.get(t);return Lc({dropEffect:this.altKeyPressed?"copy":"move"},s||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),s=this.sourcePreviewNodeOptions.get(t);return Lc({anchorX:.5,anchorY:.5,captureDraggingState:!1},s||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(kc).some(s=>kc[s]===t)}beginDragNativeItem(t,s){this.clearCurrentDragSourceNode(),this.currentNativeSource=e1(t,s),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const s=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var o;return(o=this.rootElement)===null||o===void 0?void 0:o.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},s)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,s){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(s))}handleDragEnter(t,s){this.dragEnterTargetIds.unshift(s)}handleDragOver(t,s){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(s)}handleDrop(t,s){this.dropTargetIds.unshift(s)}constructor(t,s,o){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const n=this.sourceNodes.get(i);return n&&ah(n)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:n}=this;this.dragStartSourceIds=null;const r=Hi(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(n||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:a}=i,l=xr(a);if(this.monitor.isDragging()){if(a&&typeof a.setDragImage=="function"){const d=this.monitor.getSourceId(),u=this.sourceNodes.get(d),h=this.sourcePreviewNodes.get(d)||u;if(h){const{anchorX:g,anchorY:f,offsetX:m,offsetY:v}=this.getCurrentSourcePreviewNodeOptions(),S=n1(u,h,r,{anchorX:g,anchorY:f},{offsetX:m,offsetY:v});a.setDragImage(h,S.x,S.y)}}try{a?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:c}=this.getCurrentSourcePreviewNodeOptions();c?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(l)this.beginDragNativeItem(l);else{if(a&&!a.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var n;(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:a}=i,l=xr(a);l&&this.beginDragNativeItem(l,a)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:n}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,n.length>0&&this.actions.hover(n,{clientOffset:Hi(i)}),n.some(a=>this.monitor.canDropOnTarget(a))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var n;(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:n}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=Hi(i),this.scheduleHover(n),(n||[]).some(a=>this.monitor.canDropOnTarget(a))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var n;i.preventDefault(),(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(i.dataTransfer)}else xr(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:n}=this;this.dropTargetIds=[],this.actions.hover(n,{clientOffset:Hi(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const n=i.target;typeof n.dragDrop=="function"&&(n.tagName==="INPUT"||n.tagName==="SELECT"||n.tagName==="TEXTAREA"||n.isContentEditable||(i.preventDefault(),n.dragDrop()))},this.options=new r1(s,o),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new Xw(this.isNodeInDocument)}}const c1=function(t,s,o){return new l1(t,s,o)},d1=({onChange:e,emptyTextFirstLine:t,emptyTextSecondLine:s,emptyButtonLabel:o,acceptTypes:i,maxFilesCount:n,multiple:r,fileFormatError:a,fileCountError:l,getIsFileFormatError:c})=>{const d=p.useRef(null),u=p.useRef(null),[h,g]=p.useState([]),[f,m]=p.useState(!1),v=p.useCallback(E=>{const I=E.target.files;if(I&&I.length>0){const O=Array.from(I);c?.(O)?m(!0):e(O)}},[c,e]),w=p.useCallback(E=>n&&E?.length>n,[n]),b=p.useMemo(()=>f||w(h),[f,h,w]),S=()=>{g([]),m(!1)};p.useEffect(()=>{S()},[i]);const[{isOver:R,canDrop:y},x]=Vu(()=>({accept:[gl],drop(E){const I=E.files;!c?.(I)&&!w(I)&&e(I),S()},collect:E=>({isOver:E.isOver(),canDrop:E.canDrop()})}),[v]),F=E=>{(E.key==="Enter"||E.key==="Space")&&(E.preventDefault(),u.current?.click())},P=E=>{E?.preventDefault();const I=Array.from(E.dataTransfer?.items??[]);m(!!c?.(I)),g(I)},M=E=>{E.target===E.currentTarget&&S()},A=$("border border-dashed rounded w-full cursor-pointer relative h-full hover:border-hover",!y&&!b&&"border-primary",y&&(R?"border-accent-primary":"border-hover"),b&&"border-error");return x(d),C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:A,ref:d,onDragOver:P,onDragLeave:M,children:[C.jsxs("label",{htmlFor:"file",tabIndex:0,onKeyDown:F,className:"flex flex-col items-center cursor-pointer h-full w-full text-secondary dial-tiny justify-center",children:[t&&C.jsx("p",{className:"mb-1",children:t}),s&&C.jsx("p",{className:"mb-0.5",children:s}),o&&C.jsx(Re,{variant:De.Tertiary,title:o,onClick:()=>u.current?.click()})]}),C.jsx("input",{multiple:r,id:"file",type:"file",ref:u,hidden:!0,accept:i,onChange:v})]}),C.jsx(C.Fragment,{children:f?C.jsx(us,{errorText:a}):w(h)&&C.jsx(us,{errorText:l})})]})},u1=({iconBefore:e,cssClass:t,errorText:s,...o})=>{const i=o.invalid,n=()=>C.jsx("div",{className:"mr-2",children:i?C.jsx(j.IconExclamationCircle,{...me,className:"text-error"}):e});return C.jsx(Gs,{...o,iconBefore:n(),tooltipTriggerClassName:"flex-1 min-w-0",cssClass:$(i?"text-error":"",t),tooltipText:i&&s?s:void 0,hideBorder:!0})},h1=e=>{const{files:t,iconBeforeInput:s,dynamicIcon:o,onChange:i,isInvalid:n,errorText:r,removeButtonAriaLabel:a}=e,l=(u,h)=>{u.stopPropagation(),i(t?.filter(g=>g.name!==h)||[])},c=u=>C.jsx(qu,{ariaLabel:a,onClick:h=>l(h,u)}),d=u=>{i(u)};return!t||t.length===0?C.jsx(uv,{backend:c1,children:C.jsx(d1,{...e,onChange:d})}):C.jsx("div",{className:"flex-1 min-h-0 border border-solid border-primary rounded",children:t&&t.length>0&&C.jsx("div",{className:"max-h-full overflow-y-auto",children:t.map((u,h)=>C.jsx(u1,{elementId:u.name,value:u.name,iconAfter:c(u.name),iconBefore:s||o?.(u.name),invalid:n?.(u),errorText:r},u.name+h))})})},g1=({onChange:e,fieldTitle:t,elementId:s,files:o,maxFilesCount:i,fileFormatError:n,fileCountError:r,multiple:a=!0,acceptTypes:l,deleteAllButtonLabel:c,addButtonLabel:d,...u})=>{const h=p.useRef(null),g=()=>h.current?.click(),f=()=>{e([])},m=p.useCallback(w=>w?.some(b=>b.type===""||!(l==="/"||l?.toLowerCase()?.includes(b?.type?.toLowerCase()))),[l]),v=p.useCallback(w=>{const b=w.target.files;if(b&&b.length>0){const S=Array.from(b);m(S)||e([...o||[],...S])}},[e,o,m]);return C.jsxs("div",{className:"h-full flex flex-col",children:[C.jsxs("div",{className:"flex justify-between items-center pb-1 min-h-[42px]",children:[C.jsx(Ks,{fieldTitle:`${t}: ${a?o?.length||0:""}`,htmlFor:s}),a&&!!o?.length&&C.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[C.jsx(Re,{variant:De.Tertiary,cssClass:"!text-error",iconBefore:C.jsx(j.IconTrashX,{...me}),title:c,onClick:f}),(i?i>o?.length:!0)&&C.jsx(Re,{variant:De.Tertiary,iconBefore:C.jsx(j.IconPlus,{...me}),title:d,onClick:g})]})]}),o&&o.length>0&&C.jsx("input",{id:"file",type:"file",multiple:a,ref:h,hidden:!0,accept:l,onChange:v}),C.jsx(h1,{files:o,onChange:e,acceptTypes:l,maxFilesCount:i,multiple:a,fileFormatError:n,fileCountError:r,getIsFileFormatError:m,...u})]})},p1=C.jsx(j.IconChevronDown,{size:16}),f1=C.jsx(j.IconChevronUp,{size:16}),ma=e=>{const[t,s]=p.useState(!1),o=p.useMemo(()=>t?f1:p1,[t]);return C.jsx("div",{children:C.jsx(St,{menu:{items:e.items},onOpenChange:i=>s(i),children:C.jsx(Re,{...e,iconAfter:o})})})},m1="w-full h-full grid grid-rows-[auto_1fr] gap-5 p-6 overflow-hidden min-w-0 bg-layer-2",Oc="w-full text-secondary flex items-center gap-2",C1="flex min-h-0 min-w-0 h-full gap-4 overflow-hidden",v1="flex flex-col flex-1 min-h-0 min-w-0 h-full gap-4",w1="w-full h-full rounded bg-layer-3 text-secondary overflow-auto min-w-0",b1="flex-1 w-full rounded text-secondary overflow-auto min-h-0 min-w-0",S1=280,y1="Files";var Gt=(e=>(e.ITEM="item",e.FOLDER="folder",e))(Gt||{}),lh=(e=>(e.FILE="FILE",e.PROMPT="PROMPT",e.CONVERSATION="CONVERSATION",e.APPLICATION="APPLICATION",e.TOOLSET="TOOL_SET",e))(lh||{}),ch=(e=>(e.READ="READ",e.WRITE="WRITE",e.SHARE="SHARE",e))(ch||{});const R1={size:10,stroke:2},x1=26,Cn=(e,t)=>{if(!(!e||!e.length||!t))for(const s of e){if(s.path===t)return s;const o=Cn(s.items,t);if(o)return o}},Nc=(e,t)=>{if(!e?.length)return;if(!t)return e[0];const s=Cn(e,t);if(s&&s.nodeType===Gt.FOLDER)return s;const o=t.split("/").filter(Boolean);if(o.length<=1)return e[0];const i="/"+o.slice(0,o.length-1).join("/");return Cn(e,i)??e[0]},Zi=e=>(e??"").toLowerCase(),F1=e=>Zi(e).replace(/^\./,""),E1=e=>{if(!e)return[];const t=[],s=o=>{const i=o.items??[];for(const n of i)t.push(n),n.nodeType===Gt.FOLDER&&s(n)};return s(e),t},dh=e=>(e.name??e.path.split("/").pop()??"").startsWith(".");var Vs=(e=>(e.File="file",e.Folder="folder",e))(Vs||{});const D1=({name:e,type:t,shared:s=!1,loading:o=!1,...i})=>{const n=r=>C.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[r,s&&C.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:C.jsx(li,{})})]});if(o)return n(C.jsx(Ri,{}));if(t===Vs.File){const r=e.includes(".")?e.split(".").pop():null;return C.jsx(nl,{...i,extension:r??"",cssClass:"text-secondary",indicator:s?C.jsx(li,{}):null,label:"File type icon"})}return t===Vs.Folder?n(C.jsx(Ee,{icon:C.jsx(j.IconFolder,{className:i.cssClass,size:i.size??me.size,stroke:i.stroke??me.stroke}),className:"inline-block align-middle"})):null},P1=({name:e,type:t,elementId:s,loading:o=!1,shared:i=!1,iconCssClass:n,iconIndicator:r,iconLabel:a,iconSize:l,iconStroke:c,inputInvalid:d,inputInvalidMessage:u,inputIconAfter:h,inputRef:g,onChange:f})=>{const m=()=>d?C.jsx(Xt,{tooltip:u,children:h||C.jsx(j.IconAlertCircleFilled,{...me,className:"text-icon-error","aria-label":"alert"})}):null;return C.jsxs("div",{className:"flex gap-2 items-center",children:[C.jsx(D1,{name:e,type:t,label:a,cssClass:n,indicator:r,size:l,stroke:c,loading:o,shared:i}),C.jsx(Gs,{containerCssClass:"!h-6 py-[1px] pl-[7px] pr-[7px]",elementId:s,defaultValue:e,onChange:f,invalid:d,iconAfter:m(),inputRef:g})]})};function uh({value:e,isEditing:t,restoreOnCancel:s=!0,onValidate:o,onSave:i,onCancel:n}){const[r,a]=p.useState(e),[l,c]=p.useState(!1),[d,u]=p.useState(""),h=p.useRef(null),g=p.useCallback((b=!1,S="")=>{c(b),u(S)},[]),f=p.useCallback(b=>{if(!o)return g(),!0;const S=o(b);return S?(g(!0,S),!1):(g(),!0)},[o,g]),m=p.useCallback(b=>{const S=b??"";a(S),f(S)},[f]),v=p.useCallback(()=>{f(r)?i?.(r):h.current?.focus()},[f,i,r]),w=p.useCallback(()=>{s&&a(e),g(),n?.()},[e,n,s,g]);return p.useEffect(()=>{t&&(a(e),g(),requestAnimationFrame(()=>{h.current?.focus(),h.current?.select()}))},[t,e,g]),p.useEffect(()=>{const b=h.current;if(!t||!b)return;const S=R=>{R.key==="Enter"?(R.preventDefault(),v()):R.key==="Escape"&&(R.preventDefault(),w())};return b.addEventListener("keydown",S),()=>b.removeEventListener("keydown",S)},[t,v,w]),p.useEffect(()=>{if(!t)return;const b=h.current;if(!b)return;const S=R=>{const y=R.relatedTarget;y&&b.contains(y)||(f(r)?v():b.focus())};return b.addEventListener("blur",S),()=>{b.removeEventListener("blur",S)}},[t,r,f,v]),{inputRef:h,value:r,onChange:m,invalid:l,invalidMessage:d}}const T1=({name:e,type:t,elementId:s,editing:o=!1,loading:i=!1,shared:n=!1,validate:r,onSave:a,onCancel:l})=>{const{value:c,invalid:d,invalidMessage:u,onChange:h,inputRef:g}=uh({value:e,isEditing:o,onValidate:r,onCancel:l,onSave:a});return o?C.jsx(P1,{type:t,name:c,elementId:s,inputInvalid:d,inputInvalidMessage:u,inputRef:g,onChange:h}):t===Vs.Folder?C.jsx(al,{name:e,loading:i,shared:n,cssClass:"max-w-[428px] truncate"}):C.jsx(rl,{name:e,shared:n,cssClass:"max-w-[428px]"})},M1=({items:e,showFiles:t=!1,expandedPaths:s=new Set,loadingPaths:o=new Set,selectedPath:i,emptyStateTitle:n="No Folders",emptyStateDescription:r,emptyStateIcon:a,areHiddenFilesVisible:l=!1,renamedPath:c,onItemClick:d,getContextMenuItems:u,onRenameSave:h,onRenameCancel:g,onRenameValidate:f})=>{const[m,v]=p.useState(s),w=S=>{d?.(S),m.has(S.path)?v(R=>{const y=new Set(R);return y.delete(S.path),y}):v(R=>{const y=new Set(R);return y.add(S.path),y})},b=(S,R)=>S.map(y=>{const{path:x,nodeType:F,name:P,items:M}=y,A=F===Gt.FOLDER;if(!l&&dh(y))return null;if(!A&&!t)return;const E=Array.isArray(M)&&M.length>0&&M.some(ee=>ee.nodeType===Gt.FOLDER||t),I=m.has(x),O=i===x,K=o.has(x),N=c===x,ie=f&&(ee=>f(ee,y)),Q=O?"bg-accent-primary-alpha border-l-2 border-l-accent-primary rounded":"border-l-2 border-l-transparent",k=u?.(y)??[];return C.jsx("div",{className:"cursor-pointer text-secondary",children:C.jsxs("div",{className:"flex flex-col min-w-fit w-full",children:[C.jsx(St,{trigger:[Rt.ContextMenu],cssClass:"w-full",anchorToMouse:!0,menu:{items:k},children:C.jsxs("div",{style:{paddingLeft:`${R*x1}px`},className:ue("py-1 gap-[2px] dial-small flex justify-between hover:bg-accent-primary-alpha rounded group w-full mb-[2px] relative",Q),children:[!N&&C.jsx("div",{className:"absolute size-full left-0 top-0 z-0",onClick:()=>w(y)}),C.jsx("div",{className:"relative flex flex-row truncate items-center w-fit h-6",onClick:()=>!N&&w(y),children:C.jsxs(C.Fragment,{children:[A&&C.jsx(j.IconCaretRightFilled,{...R1,className:$("flex-shrink-0",I&&"rotate-90 transition-all",!E&&"text-transparent")}),C.jsx(T1,{elementId:`${x}-tree-item`,name:P,type:A?Vs.Folder:Vs.File,loading:K,editing:N,onSave:h,onCancel:g,validate:ie})]})}),k.length>0&&!N&&C.jsx("div",{className:"flex-1 flex justify-end",children:C.jsx(St,{placement:"bottom-start",allowedPlacements:["top-start","top-end"],menu:{items:k},cssClass:"sticky right-0",children:C.jsx(Ee,{className:"invisible group-hover:visible text-secondary mx-2 flex flex-row gap-2 hover:text-accent-primary",icon:C.jsx(j.IconDotsVertical,{...me})})})})]})}),I&&M&&b(M,R+1)]})},`${x}-children`)});return C.jsx("div",{className:"flex-1 w-full h-full overflow-y-auto",children:e.length>0?b(e,0):C.jsx(Un,{title:n,description:r,icon:a})})},I1="w-full h-[12] flex items-center justify-between gap-4",k1="min-w-0 h-[38px] flex-1 overflow-hidden bg-layer-3 px-3 flex items-center rounded",A1="w-[260px]",L1=({ariaLabel:e="Breadcrumb",titleCssClass:t,onItemClick:s,path:o,makeHref:i,rootItemPath:n,rootItemLabel:r,cssClass:a,breadcrumbCssClass:l,searchable:c=!0,value:d,elementId:u="fm-search",disabled:h,readonly:g,invalid:f,onSearchChange:m,searchCssClass:v,searchContainerCssClass:w})=>{const b=p.useMemo(()=>{if(!o)return;const S=o.split("/").map(y=>y.trim()).filter(Boolean);if(!S.length)return[{title:"/"}];const R=S.map((y,x)=>{const F=S.slice(0,x+1),P=typeof i=="function"?i(F,x):void 0;return{title:y,href:P,onClick:s?M=>{M.preventDefault(),s(P)}:void 0}});if(n&&r){const y=n.split("/").filter(Boolean),x=o.split("/").filter(Boolean);if(y.every((P,M)=>x[M]===P)&&R.length>0){const P=R.slice(y.length);return[{title:r,href:n,onClick:s?M=>{M.preventDefault(),s(n)}:void 0},...P]}}return R},[o,i,s,n,r]);return C.jsxs("div",{className:$(I1,a),children:[C.jsx("div",{className:k1,children:C.jsx(Ku,{pathItems:b,ariaLabel:e,titleCssClass:t,cssClass:l})}),c&&C.jsx("div",{className:A1,role:"search","aria-label":"Search",children:C.jsx(hl,{elementId:u,value:d??"",onChange:m,disabled:h,readonly:g,invalid:f,cssClass:v,containerCssClass:w})})]})};var Bs=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,s){const o=t?this.allAsyncListeners:this.allSyncListeners;let i=o.get(e);return!i&&s&&(i=new Set,o.set(e,i)),i}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,s=!1){this.getListeners(e,s,!0).add(t)}removeEventListener(e,t,s=!1){const o=this.getListeners(e,s,!1);o&&(o.delete(t),o.size===0&&(s?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const s=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:o}=this,i=a=>{const l=o?()=>o.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},n=this.getListeners(s,t,!1);if((n?.size??0)>0){const a=new Set(n);for(const l of a)n?.has(l)&&i(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)i(()=>l(s,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function Kt(e){return e==null||e===""?null:e}function V(e){return e!=null&&e!==""}function Ie(e){return!V(e)}function Ca(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function di(e,t){const s=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return s===o}function O1(e,t,s=!1){const o=e==null,i=t==null;if(e?.toNumber&&(e=e.toNumber()),t?.toNumber&&(t=t.toNumber()),o&&i)return 0;if(o)return-1;if(i)return 1;function n(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!s)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var N1=/[&<>"']/g,H1={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ao(e){return e?.toString().toString()??null}function Yo(e){return Ao(e)?.replace(N1,t=>H1[t])??null}function Mt(e){return e.eRootDiv.getRootNode()}function Ae(e){return Mt(e).activeElement}function $e(e){const{gos:t,eRootDiv:s}=e;let o=null;const i=t.get("getDocument");return i&&V(i)?o=i():s&&(o=s.ownerDocument),o&&V(o)?o:document}function hh(e){const t=Ae(e);return t===null||t===$e(e).body}function gh(e){return $e(e).defaultView||window}function pl(e){let t=null,s=null;try{t=$e(e).fullscreenElement}catch{}finally{t||(t=Mt(e));const o=t.querySelector("body");o?s=o:t instanceof ShadowRoot?s=t:t instanceof Document?s=t?.documentElement:s=t}return s}function G1(e){return pl(e)?.clientWidth??(window.innerWidth||-1)}function V1(e){return pl(e)?.clientHeight??(window.innerHeight||-1)}function Dt(e,t,s){s==null||typeof s=="string"&&s==""?ph(e,t):Pt(e,t,s)}function Pt(e,t,s){e.setAttribute(fh(t),s.toString())}function ph(e,t){e.removeAttribute(fh(t))}function fh(e){return`aria-${e}`}function zs(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function B1(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function z1(e){return e.getAttribute("aria-label")}function xo(e,t){Dt(e,"label",t)}function ui(e,t){Dt(e,"labelledby",t)}function mh(e,t){Dt(e,"live",t)}function W1(e,t){Dt(e,"atomic",t)}function _1(e,t){Dt(e,"relevant",t)}function j1(e,t){Dt(e,"invalid",t)}function U1(e,t){Dt(e,"disabled",t)}function Ch(e,t){Dt(e,"hidden",t)}function va(e,t){Pt(e,"expanded",t)}function $1(e,t){Pt(e,"setsize",t)}function K1(e,t){Pt(e,"posinset",t)}function q1(e,t){Pt(e,"rowcount",t)}function vh(e,t){Pt(e,"rowindex",t)}function Y1(e,t){Pt(e,"rowspan",t)}function Z1(e,t){Pt(e,"colcount",t)}function wh(e,t){Pt(e,"colindex",t)}function Q1(e,t){Pt(e,"colspan",t)}function X1(e,t){Pt(e,"sort",t)}function J1(e){ph(e,"sort")}function bh(e,t){Dt(e,"selected",t)}function eb(e,t){Dt(e,"controls",t)}function tb(e,t){eb(e,t.id),ui(t,e.id)}function Hc(e,t){Dt(e,"owns",t)}function Jn(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var sb="[tabindex], input, select, button, textarea, [href]",Sh="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Zo(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(Sh)?!1:Jt(e)}function ke(e,t,s={}){const{skipAriaHidden:o}=s;e.classList.toggle("ag-hidden",!t),o||Ch(e,!t)}function ob(e,t,s={}){const{skipAriaHidden:o}=s;e.classList.toggle("ag-invisible",!t),o||Ch(e,!t)}function hi(e,t){const s="disabled",o=t?n=>n.setAttribute(s,""):n=>n.removeAttribute(s);o(e);const i=e.querySelectorAll("input")??[];for(const n of i)o(n)}function Ms(e,t,s){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof s=="number"){if(++o>s)break}else if(e===s)break}return!1}function qs(e){const{height:t,width:s,borderTopWidth:o,borderRightWidth:i,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:h,marginBottom:g,marginLeft:f,boxSizing:m}=window.getComputedStyle(e),v=Number.parseFloat;return{height:v(t||"0"),width:v(s||"0"),borderTopWidth:v(o||"0"),borderRightWidth:v(i||"0"),borderBottomWidth:v(n||"0"),borderLeftWidth:v(r||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(c||"0"),paddingLeft:v(d||"0"),marginTop:v(u||"0"),marginRight:v(h||"0"),marginBottom:v(g||"0"),marginLeft:v(f||"0"),boxSizing:m}}function fl(e){const t=qs(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function gi(e){const t=qs(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function yh(e){const{height:t,marginBottom:s,marginTop:o}=qs(e);return Math.floor(t+s+o)}function vn(e){const{width:t,marginLeft:s,marginRight:o}=qs(e);return Math.floor(t+s+o)}function Rh(e){const t=e.getBoundingClientRect(),{borderTopWidth:s,borderLeftWidth:o,borderRightWidth:i,borderBottomWidth:n}=qs(e);return{top:t.top+(s||0),left:t.left+(o||0),right:t.right+(i||0),bottom:t.bottom+(n||0)}}function wn(e,t){let s=e.scrollLeft;return t&&(s=Math.abs(s)),s}function bn(e,t,s){s&&(t*=-1),e.scrollLeft=t}function at(e){for(;e?.firstChild;)e.firstChild.remove()}function hs(e){e?.parentNode&&e.remove()}function xh(e){return!!e.offsetParent}function Jt(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!xh(e)||window.getComputedStyle(e).visibility!=="visible")}function ml(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Qi(e){return()=>{const t=e();return t?Cl(t)||Fh(t):!0}}function Cl(e){return e.clientWidth<e.scrollWidth}function Fh(e){return e.clientHeight<e.scrollHeight}function Sn(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Nt(e,t)}function Nt(e,t){t=vl(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Qo(e,t){t=vl(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function vl(e){return typeof e=="number"?`${e}px`:e}function wl(e){return e instanceof Node||e instanceof HTMLElement}function dt(e,t,s){s==null||s===""?e.removeAttribute(t):e.setAttribute(t,s.toString())}function es(e,t,s){const i=gh(e).ResizeObserver,n=i?new i(s):null;return n?.observe(t),()=>n?.disconnect()}function ts(e,t){const s=gh(e);s.requestAnimationFrame?s.requestAnimationFrame(t):s.webkitRequestAnimationFrame?s.webkitRequestAnimationFrame(t):s.setTimeout(t,0)}var Eh="data-ref",Fr;function Gc(){return Fr??(Fr=document.createTextNode(" ")),Fr.cloneNode()}function Fi(e){const{attrs:t,children:s,cls:o,ref:i,role:n,tag:r}=e,a=document.createElement(r);if(o&&(a.className=o),i&&a.setAttribute(Eh,i),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(s)if(typeof s=="string")a.textContent=s;else{let l=!0;for(const c of s)c&&(typeof c=="string"?(a.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?a.appendChild(c()):(l&&(a.appendChild(Gc()),l=!1),a.append(Fi(c)),a.appendChild(Gc())))}return a}var ib=["touchstart","touchend","touchmove","touchcancel","scroll"],nb=["wheel"],Er={},Dh=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return s=>{if(typeof Er[s]=="boolean")return Er[s];const o=document.createElement(e[s]||"div");return s="on"+s,Er[s]=s in o}})();function rb(e,t){return!t||!e?!1:lb(t).indexOf(e)>=0}function ab(e){const t=[];let s=e.target;for(;s;)t.push(s),s=s.parentElement;return t}function lb(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():ab(t)}function cb(e,t,s){const o=db(t);let i;o!=null&&(i={passive:o}),e.addEventListener(t,s,i)}var db=e=>{const t=ib.includes(e),s=nb.includes(e);if(t)return!0;if(s)return!1};function Ph(e,t,s){if(s===0)return!1;const o=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY);return Math.max(o,i)<=s}var Xo=(e,t)=>{const s=e.identifier;for(let o=0,i=t.length;o<i;++o){const n=t[o];if(n.identifier===s)return n}return null};function pi(e,t){return e.gos.isElementInThisInstance(t.target)}function ub(e,t,s){const i=e.getBoundingClientRect().height,n=G1(s)-2,r=V1(s)-2;if(!e.offsetParent)return;const l=Rh(e.offsetParent),{clientY:c,clientX:d}=t;let u=c-l.top-i/2,h=d-l.left-10;const g=$e(s),f=g.defaultView||window,m=f.pageYOffset||g.documentElement.scrollTop,v=f.pageXOffset||g.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+v&&(h=n+v-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+m&&(u=r+m-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}var Xi=(e,...t)=>{for(const s of t){const[o,i,n,r]=s;o.addEventListener(i,n,r),e.push(s)}},bl=e=>{if(e){for(const[t,s,o,i]of e)t.removeEventListener(s,o,i);e.length=0}},ls=e=>{e.cancelable&&e.preventDefault()};function hb(e,t){return t}function Th(e){return e?.getLocaleTextFunc()??hb}function gb(e,t,s,o){const i=t[s];return e.getLocaleTextFunc()(s,typeof i=="function"?i(o):i,o)}function pb(e){return(t,s,o)=>e({key:t,defaultValue:s,variableValues:o})}function fb(e){return(t,s,o)=>{let i=e?.[t];if(i&&o?.length){let n=0;for(;!(n>=o.length||i.indexOf("${variable}")===-1);)i=i.replace("${variable}",o[n++])}return i??s}}var Bt=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,s){this.localEventService||(this.localEventService=new Bs),this.localEventService.addEventListener(e,t,s)}removeEventListener(e,t,s){this.localEventService?.removeEventListener(e,t,s)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const s=[];for(const o of Object.keys(t)){const i=t[o];i&&s.push(this._setupListener(e,o,i))}return s}_setupListener(e,t,s){if(this.destroyed)return()=>null;let o;if(mb(e))e.__addEventListener(t,s),o=()=>(e.__removeEventListener(t,s),null);else{const i=Cb(e);e instanceof HTMLElement?cb(e,t,s):i?e.addListener(t,s):e.addEventListener(t,s),o=i?()=>(e.removeListener(t,s),null):()=>(e.removeEventListener(t,s),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==o),null)}setupPropertyListener(e,t){const{gos:s}=this;s.addPropertyEventListener(e,t);const o=()=>(s.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const s=e.join("-")+this.propertyListenerId++,o=i=>{if(i.changeSet){if(i.changeSet&&i.changeSet.id===this.lastChangeSetIdLookup[s])return;this.lastChangeSetIdLookup[s]=i.changeSet.id}const n={type:"propertyChanged",changeSet:i.changeSet,source:i.source};t(n)};for(const i of e)this.setupPropertyListener(i,o)}getLocaleTextFunc(){return Th(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const s=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),s}createBean(e,t,s){return(t||this.stubContext).createBean(e,s)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function mb(e){return e.__addEventListener!==void 0}function Cb(e){return e.eventServiceType==="global"}var T=class extends Bt{},Vc={};function Sl(e,t){Vc[t]||(e(),Vc[t]=!0)}var vb={pending:!1,funcs:[]},wb={pending:!1,funcs:[]};function wa(e,t="setTimeout",s){const o=t==="raf"?wb:vb;if(o.funcs.push(e),o.pending)return;o.pending=!0;const i=()=>{const n=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const r of n)r()};t==="raf"?ts(s,i):window.setTimeout(i,0)}function Ye(e,t,s){let o;return function(...i){const n=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(n,i)},s)}}function Bc(e,t){let s=0;return function(...o){const i=this,n=Date.now();n-s<t||(s=n,e.apply(i,o))}}function bb(e,t,s,o=100){const i=Date.now();let n=null,r=!1;const a=()=>{n!=null&&(window.clearInterval(n),n=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-i>o;(t()||c)&&(s(),r=!0,a())};l(),r||(n=window.setInterval(l,10))}var Mh=new Set(["__proto__","constructor","prototype"]);function Sb(e,t){if(e!=null){if(Array.isArray(e)){for(let s=0;s<e.length;s++)t(s.toString(),e[s]);return}for(const s of Object.keys(e).filter(o=>!Mh.has(o)))t(s,e[s])}}function st(e,t,s=!0,o=!1){V(t)&&Sb(t,(i,n)=>{let r=e[i];r!==n&&(o&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[i]=r),zc(n)&&zc(r)&&!Array.isArray(r)?st(r,n,s,o):(s||n!==void 0)&&(e[i]=n))})}function zc(e){return typeof e=="object"&&e!==null}var yl=class _t{static applyGlobalGridOptions(t){if(!_t.gridOptions)return{...t};let s={};return st(s,_t.gridOptions,!0,!0),_t.mergeStrategy==="deep"?st(s,t,!0,!0):s={...s,...t},_t.gridOptions.context&&(s.context=_t.gridOptions.context),t.context&&(_t.mergeStrategy==="deep"&&s.context&&st(t.context,s.context,!0,!0),s.context=t.context),s}static applyGlobalGridOption(t,s){if(_t.mergeStrategy==="deep"){const o=Ih(t);if(o&&typeof o=="object"&&typeof s=="object")return _t.applyGlobalGridOptions({[t]:s})[t]}return s}};yl.gridOptions=void 0;yl.mergeStrategy="shallow";var Rl=yl;function Ih(e){return Rl.gridOptions?.[e]}var kh={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,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,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!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,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!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,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},Ah="https://www.ag-grid.com";function Ws(e,t,...s){e.get("debug")&&console.log("AG Grid: "+t,...s)}function Jo(e,...t){Sl(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function ho(e,...t){Sl(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var Lh=new Set,yn={},Is={},Ji,Oh=!1,Nh=!1,yb=!1;function Rb(e){const[t,s]=e.version.split(".")||[],[o,i]=Ji.split(".")||[];return t===o&&s===i}function xb(e){Ji||(Ji=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;e.version?Rb(e)||ho(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Ji}.`)):ho(t(`'${e.moduleName}' is incompatible.`));const s=e.validate?.();s&&!s.isValid&&ho(`${s.message}`)}function fi(e,t,s=!1){s||(Oh=!0),xb(e);const o=e.rowModels??["all"];Lh.add(e);let i;t!==void 0?(Nh=!0,Is[t]===void 0&&(Is[t]={}),i=Is[t]):i=yn;for(const n of o)i[n]===void 0&&(i[n]={}),i[n][e.moduleName]=e;if(e.dependsOn)for(const n of e.dependsOn)fi(n,t,s)}function Fb(e){delete Is[e]}function ba(e,t,s){const o=i=>!!yn[i]?.[e]||!!Is[t]?.[i]?.[e];return o(s)||o("all")}function xl(){return Nh}function Eb(e,t){const s=Is[e]??{};return[...Object.values(yn.all??{}),...Object.values(s.all??{}),...Object.values(yn[t]??{}),...Object.values(s[t]??{})]}function Db(){return new Set(Lh)}function Pb(e,t){const s=Is[e]??{};return[...Object.values(s.all??{}),...Object.values(s[t]??{})]}function Tb(){return Oh}function Mb(){return yb}var Ib=class{static register(e){fi(e,void 0)}static registerModules(e){for(const t of e)fi(t,void 0)}},G="34.3.0",Wc=2e3,_c=100,Hh="_version_",Gh=null,go=`${Ah}/javascript-data-grid`;function kb(e){Gh=e}function Ab(e){go=e}function Vh(e,t,s){return Gh?.(e,t)??[Hb(e,t,s)]}function Fl(e,t,s,o,i){e(`${o?"warning":"error"} #${t}`,...Vh(t,s,i))}function Lb(e){if(!e)return String(e);const t={};for(const s of Object.keys(e))typeof e[s]!="object"&&typeof e[s]!="function"&&(t[s]=e[s]);return JSON.stringify(t)}function Ob(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Lb(e)),t}function Rn(e){return e===void 0?"undefined":e===null?"null":e}function Sa(e,t){return`${e}?${t.toString()}`}function Nb(e,t,s){const o=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let i=Sa(e,t);for(const[n,r]of o){if(n===Hh)continue;const a=i.length-s;if(a<=0)break;const l="...",c=a+l.length,d=r.length-c>_c?r.slice(0,r.length-c)+l:r.slice(0,_c)+l;t.set(n,d),i=Sa(e,t)}return i}function Bh(e,t){const s=new URLSearchParams;if(s.append(Hh,G),t)for(const n of Object.keys(t))s.append(n,Ob(t[n]));const o=`${go}/errors/${e}`,i=Sa(o,s);return i.length<=Wc?i:Nb(o,s,Wc)}var Hb=(e,t,s)=>{const o=Bh(e,t);return`${`${s?s+`
|
|
3
|
+
`:""}Visit ${o}`}${s?"":`
|
|
4
|
+
Alternatively register the ValidationModule to see the full message in the console.`}`};function L(...e){Fl(Jo,e[0],e[1],!0)}function be(...e){Fl(ho,e[0],e[1],!1)}function $o(e,t,s){Fl(ho,e,t,!1,s)}function Gb(e,t){const s=t[0];return`error #${s} `+Vh(s,t[1],e).join(" ")}function Ht(...e){return Gb(void 0,e)}function zh(e,t){return e.get("rowModelType")===t}function Ne(e,t){return zh(e,"clientSide")}function Ys(e,t){return zh(e,"serverSide")}function Ze(e,t){return e.get("domLayout")===t}function ks(e){return Fn(e)!==void 0}function Wh(e){return typeof e.get("getRowHeight")=="function"}function Vb(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function gs(e,t,s=!1,o){const{gos:i,environment:n}=e;if(o==null&&(o=n.getDefaultRowHeight()),Wh(i)){if(s)return{height:o,estimated:!0};const l={node:t,data:t.data},c=i.getCallback("getRowHeight")(l);if(ya(c))return c===0&&L(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&i.get("masterDetail"))return Bb(i);const r=i.get("rowHeight");return{height:r&&ya(r)?r:o,estimated:!1}}function Bb(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return ya(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function As(e){const{environment:t,gos:s}=e,o=s.get("rowHeight");if(!o||Ie(o))return t.getDefaultRowHeight();const i=t.refreshRowHeightVariable();return i!==-1?i:(L(24),t.getDefaultRowHeight())}function ya(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function _h(e,t,s){const o=t[e.getDomDataKey()];return o?o[s]:void 0}function _s(e,t,s,o){const i=e.getDomDataKey();let n=t[i];Ie(n)&&(n={},t[i]=n),n[s]=o}function po(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function jh(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Ze(e,"print"))}function kt(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function Ra(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function Uh(e){return e.get("grandTotalRow")}function $h(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Kh(e,t,s){return!!t.group&&!t.footer&&$h(e,s)}function Fo(e){const t=e.getCallback("getRowId");return t===void 0?t:s=>{let o=t(s);return typeof o!="string"&&(Sl(()=>L(25,{id:o}),"getRowIdString"),o=String(o)),o}}function zb(e,t){const s=e.get("groupHideParentOfSingleChild");return!!(s===!0||s==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Wb(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function fo(e){return e?.checkboxes??!0}function en(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function xn(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Dr(e){return e?.hideDisabledCheckboxes??!1}function _b(e){return typeof e.get("rowSelection")!="string"}function ps(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function qh(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const s=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return s&&o?!1:s?"enableDeselection":o?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function jb(e){const t=qh(e);return t===!0||t==="enableSelection"}function Ub(e){const t=qh(e);return t===!0||t==="enableDeselection"}function xa(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function Fn(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function En(e){return Fn(e)==="multiRow"}function $b(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Dn(e){const t=e.get("rowSelection");if(typeof t=="string"){const s=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return s&&o?"filteredDescendants":s?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function Yh(e,t=!0){const s=e.get("rowSelection");return typeof s!="object"?t?"all":void 0:s.mode==="multiRow"?s.selectAll:"all"}function Kb(e){const t=e.get("rowSelection");return typeof t=="string"?!1:t?.mode==="multiRow"?t.ctrlASelectsRows??!1:!1}function mi(e){const t=Dn(e);return t==="descendants"||t==="filteredDescendants"}function jc(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function qb(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function ut(e){return e.get("columnMenu")==="legacy"}function Yb(e){return!ut(e)}function Zb(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Qb(e,t,s){typeof e!="object"&&(e={});const o={...e};for(const i of s){const n=t[i];typeof n<"u"&&(o[i]=n)}return o}function Xb(e,t){if(!e)return;const s={};let o=!1;for(const r of Object.keys(e))s[r]=e[r],o=!0;if(!o)return;const i={type:"gridOptionsChanged",options:s};t.dispatchEvent(i);const n={type:"componentStateChanged",...s};t.dispatchEvent(n)}function X(e,t){return e.addCommon(t)}function tn(e,t){return e[t]??e.gridOptions?.[t]??Ih(t)??kh[t]}function Uc({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var Jb={resizable:!0,sortable:!0},e0=0;function Zh(){return e0++}function fs(e){return e instanceof Zs}var Zs=class extends T{constructor(e,t,s,o){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=s,this.primary=o,this.isColumn=!0,this.instanceId=Zh(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new Bs,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Yo(s)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:s,colFlex:o}}=this;t?.initCol(this);const i=e.hide;i!==void 0?this.visible=!i:this.visible=!e.initialHide,s?.initCol(this),o?.initCol(this)}setColDef(e,t,s){const o=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),o&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",s)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:s}}=this,o=e.get("suppressFieldDotNotation");this.fieldContainsDots=V(t)&&t.includes(".")&&!o,this.tooltipFieldContainsDots=V(s)&&s.includes(".")&&!o}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:s=>{const o=e.recreateColDef(this.colDef);this.setColDef(o,o,s.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const s=e.width,o=e.initialWidth;return s!=null?t=s:o!=null?t=o:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const s=this.frameworkEventListenerService?.wrap(e,t)??t;this.colEventSvc.addEventListener(e,s)}removeEventListener(e,t){const s=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,s)}createColumnFunctionCallbackParams(e){return X(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable({rowNode:e,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??Jb[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const s=this.createColumnFunctionCallbackParams(e);return t(s)}return!1}createColumnEvent(e,t){return X(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return Ie(this.sort)}isSorting(){return V(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return L(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const s=e===!0;this.visible!==s&&(this.visible=s,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e?.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e?.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let s=!0;for(;e;){if(!e.isPadding()){s=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:s}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return X(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Ie(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),s=this.colDef.colSpan(t);return Math.max(s,1)}getRowSpan(e){if(Ie(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),s=this.colDef.rowSpan(t);return Math.max(s,1)}setActualWidth(e,t,s=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),s||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,s){const o=this.createColumnEvent(e,t);s&&st(o,s),this.colEventSvc.dispatchEvent(o)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function Xe(e){return e instanceof sn}var sn=class extends T{constructor(e,t,s,o){super(),this.colGroupDef=e,this.groupId=t,this.padding=s,this.level=o,this.isColumn=!1,this.expandable=!1,this.instanceId=Zh(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)fs(t)?e(t):Xe(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)fs(t)?e.push(t):Xe(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,s=!1;const o=this.findChildrenRemovingPadding();for(let n=0,r=o.length;n<r;n++){const a=o[n];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,s=!0):l==="closed"?(t=!0,s=!0):(e=!0,t=!0)}const i=e&&t&&s;this.expandable!==i&&(this.expandable=i,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=s=>{for(const o of s)Xe(o)&&o.isPadding()?t(o.children):e.push(o)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},t0={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function $c(e,t,s){const o={},i=e.gos;return Object.assign(o,i.get("defaultColGroupDef")),Object.assign(o,t),i.validateColDef(o,s),o}var s0=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Ca(e);let s=0;for(;;){let o=e??t;if(o?s!==0&&(o+="_"+s):o=s,!this.existingKeys[o]){const i=String(o);return e&&s>0&&L(273,{providedId:e,usedId:i}),this.existingKeys[i]=!0,i}s++}}};function ye(e){if(e?.length)return e[e.length-1]}function Cs(e,t,s){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const o=e.length;if(o!==t.length)return!1;for(let i=0;i<o;i++)if(e[i]!==t[i]&&!s?.(e[i],t[i]))return!1;return!0}function Bo(e,t){if(e)for(const s of e)t(s)}function Et(e,t){const s=e.indexOf(t);s>=0&&e.splice(s,1)}function Kc(e,t,s){for(let o=0;o<t.length;o++)Et(e,t[o]);for(let o=t.length-1;o>=0;o--)e.splice(s,0,t[o])}var er="ag-Grid-AutoColumn",Qh="ag-Grid-SelectionColumn",Xh="ag-Grid-RowNumbersColumn";function Jh(e){const t=[],s=o=>{for(let i=0;i<o.length;i++){const n=o[i];fs(n)?t.push(n):Xe(n)&&s(n.getChildren())}};return s(e),t}function jt(e){return e.reduce((t,s)=>t+s.getActualWidth(),0)}function Pn(e,t,s){const o={};if(!t)return;Yt(null,t,n=>{o[n.getInstanceId()]=n}),s&&Yt(null,s,n=>{o[n.getInstanceId()]=null});const i=Object.values(o).filter(n=>n!=null);e.context.destroyBeans(i)}function El(e){return e.getId().startsWith(er)}function ss(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Qh)??!1}function qt(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Xh)??!1}function o0(e){return ss(e)||qt(e)}function Tn(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function i0(e,t){return Cs(e,t,(s,o)=>s.getColId()===o.getColId())}function n0(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function mo(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function ei(e,t){const s=e===t,o=e.getColDef()===t,i=e.getColId()==t;return s||o||i}var r0=(e,t)=>(s,o)=>{const i={value1:void 0,value2:void 0};let n=!1;return e&&(e[s]!==void 0&&(i.value1=e[s],n=!0),V(o)&&e[o]!==void 0&&(i.value2=e[o],n=!0)),!n&&t&&(t[s]!==void 0&&(i.value1=t[s]),V(o)&&t[o]!==void 0&&(i.value2=t[o])),i},a0=(e,t)=>{Xe(e)&&e.setupExpandable(),e.originalParent=t};function l0(e,t=null,s,o,i){const n=new s0,{existingCols:r,existingGroups:a,existingColKeys:l}=c0(o);n.addExistingKeys(l);const c=eg(e,t,0,s,r,n,a,i),{colGroupSvc:d}=e,u=d?.findMaxDepth(c,0)??0,h=d?d.balanceColumnTree(c,0,u,n):c;return Yt(null,h,a0),{columnTree:h,treeDepth:u}}function c0(e){const t=[],s=[],o=[];return e&&Yt(null,e,i=>{if(Xe(i)){const n=i;s.push(n)}else{const n=i;o.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:s,existingColKeys:o}}function eg(e,t,s,o,i,n,r,a){if(!t)return[];const{colGroupSvc:l}=e,c=new Array(t.length);for(let d=0;d<c.length;d++){const u=t[d];l&&f0(u)?c[d]=l.createProvidedColumnGroup(o,u,s,i,n,r,a):c[d]=d0(e,o,u,i,n,a)}return c}function d0(e,t,s,o,i,n){const r=h0(s,o);r&&o?.splice(r.idx,1);let a=r?.column;if(a){const l=Fa(e,s,a.getColId());a.setColDef(l,s,n),u0(e,a,l,n)}else{const l=i.getUniqueKey(s.colId,s.field),c=Fa(e,s,l);a=new Zs(c,s,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function tg(e,t,s,o,i,n,r,a){const{sortSvc:l,pinnedCols:c,colFlex:d}=e;s!==void 0&&t.setVisible(!s,a),l&&(l.updateColSort(t,o,a),i!==void 0&&l.setColSortIndex(t,i)),n!==void 0&&c?.setColPinned(t,n),r!==void 0&&d?.setColFlex(t,r)}function u0(e,t,s,o){tg(e,t,s.hide,s.sort,s.sortIndex,s.pinned,s.flex,o);const i=t.getFlex();if(!(i!=null&&i>0))if(s.width!=null)t.setActualWidth(s.width,o);else{const n=t.getActualWidth();t.setActualWidth(n,o)}}function h0(e,t){if(t)for(let s=0;s<t.length;s++){const o=t[s].getUserProvidedColDef();if(!o)continue;if(e.colId!=null){if(t[s].getId()===e.colId)return{idx:s,column:t[s]};continue}if(e.field!=null){if(o.field===e.field)return{idx:s,column:t[s]};continue}if(o===e)return{idx:s,column:t[s]}}}function Fa(e,t,s,o){const{gos:i,dataTypeSvc:n}=e,r={},a=i.get("defaultColDef");st(r,a,!1,!0);const l=g0(e,r,t,s);l&&p0(e,l,r);const c=r.cellDataType;st(r,t,!1,!0),c!==void 0&&(r.cellDataType=c);const d=i.get("autoGroupColumnDef"),u=kt(i);return t.rowGroup&&d&&u&&st(r,{sort:d.sort,initialSort:d.initialSort},!1,!0),n&&(n.postProcess(r),n.validateColDef(r)),i.validateColDef(r,s,o),r}function g0(e,t,s,o){const i=e.dataTypeSvc?.updateColDefAndGetColumnType(t,s,o),n=s.type??i??t.type;return t.type=n,n?Tn(n):void 0}function p0(e,t,s){if(!t.length)return;const o=Object.assign({},t0),i=e.gos.get("columnTypes")||{};for(const n of Object.keys(i)){const r=i[n];n in o?L(34,{key:n}):(r.type&&L(35),o[n]=r)}for(const n of t){const r=o[n.trim()];r?st(s,r,!1,!0):L(36,{t:n})}}function f0(e){return e.children!==void 0}function Yt(e,t,s){if(t)for(let o=0;o<t.length;o++){const i=t[o];Xe(i)&&Yt(i,i.getChildren(),s),s(i,e)}}function sg(e,t){const s=[],o=[],i=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?i.push(r):a==="left"||a===!0?s.push(r):o.push(r)}),t.get("enableRtl")?[...i,...o,...s]:[...s,...o,...i]}function og(e,t){let s=!0;return Yt(null,t,o=>{if(!Xe(o))return;const i=o;if(!i.getColGroupDef()?.marryChildren)return;const a=[];for(const h of i.getLeafColumns()){const g=e.indexOf(h);a.push(g)}const l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),d=l-c,u=i.getLeafColumns().length-1;d>u&&(s=!1)}),s}function ig(e,t){if(!e||e.length==0)return;const s=t(e[0]);for(let o=1;o<e.length;o++)if(s!==t(e[o]))return;return s}function ng(e,t,s){if(!t.length)return;const o=t.length===1?t[0]:null,i=ig(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:i??null,columns:t,column:o,source:s})}function m0(e,t,s){if(!t.length)return;const o=t.length===1?t[0]:null,i=ig(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:i,columns:t,column:o,source:s})}function C0(e,t,s,o){e.dispatchEvent({type:t,columns:s,column:s&&s.length==1?s[0]:null,source:o})}function Eo(e,t,s,o,i=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:i,finished:s,source:o})}function xt(e,t,s){const{colModel:o,rowGroupColsSvc:i,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:d,environment:u,valueColsSvc:h,eventSvc:g,gos:f}=e,m=o.getColDefCols()??[],v=a?.getColumns();if(!m.length&&!v?.length)return!1;if(t?.state&&!t.state.forEach)return L(32),!1;const w=(y,x,F,P,M)=>{if(!y)return;const A=r0(x,t.defaultState),E=A("flex").value1;if(tg(e,y,A("hide").value1,A("sort").value1,A("sortIndex").value1,A("pinned").value1,E,s),E==null){const I=A("width").value1;if(I!=null){const O=y.getColDef().minWidth??u.getDefaultColumnMinWidth();O!=null&&I>=O&&y.setActualWidth(I,s)}}M||!y.isPrimary()||(h?.syncColumnWithState(y,s,A),i?.syncColumnWithState(y,s,A,F),n?.syncColumnWithState(y,s,A,P))},b=(y,x,F)=>{const P=rg(e,s),M=x.slice(),A={},E={},I=[],O=[],K=[];let N=0;const ie=i?.columns.slice()??[],Q=n?.columns.slice()??[];for(const B of y){const _=B.colId;if(_.startsWith(er)){I.push(B),K.push(B);continue}if(ss(_)){O.push(B),K.push(B);continue}const z=F(_);z?(w(z,B,A,E,!1),Et(M,z)):(K.push(B),N+=1)}const k=B=>w(B,null,A,E,!1);M.forEach(k),i?.sortColumns(qc.bind(i,A,ie)),n?.sortColumns(qc.bind(n,E,Q)),o.refreshCols(!1,s);const ee=(B,_,U=[])=>{for(const z of _){const ne=B(z.colId);Et(U,ne),w(ne,z,null,null,!0)}U.forEach(k)};return ee(B=>r?.getColumn(B)??null,I,r?.getColumns()?.slice()),ee(B=>a?.getColumn(B)??null,O,a?.getColumns()?.slice()),w0(t,o,f),c.refresh(s),g.dispatchEvent({type:"columnEverythingChanged",source:s}),P(),{unmatchedAndAutoStates:K,unmatchedCount:N}};l?.start();let{unmatchedAndAutoStates:S,unmatchedCount:R}=b(t.state||[],m,y=>o.getColDefCol(y));if(S.length>0||V(t.defaultState)){const y=d?.getPivotResultCols()?.list??[];R=b(S,y,x=>d?.getPivotResultCol(x)??null).unmatchedCount}return l?.finish(),R===0}function v0(e,t){const{colModel:s,autoColSvc:o,selectionColSvc:i,eventSvc:n,gos:r}=e,a=s.getColDefCols();if(!a?.length)return;const l=s.getColDefColTree(),c=Jh(l),d=[];let u=1e3,h=1e3;const g=b=>{const S=ag(b);Ie(S.rowGroupIndex)&&S.rowGroup&&(S.rowGroupIndex=u++),Ie(S.pivotIndex)&&S.pivot&&(S.pivotIndex=h++),d.push(S)};o?.getColumns()?.forEach(g),i?.getColumns()?.forEach(g),c?.forEach(g),xt(e,{state:d},t);const f=o?.getColumns()??[],w=[...i?.getColumns()??[],...f,...a].map(b=>({colId:b.colId}));xt(e,{state:w,applyOrder:!0},t),n.dispatchEvent(X(r,{type:"columnsReset",source:t}))}function rg(e,t){const{rowGroupColsSvc:s,pivotColsSvc:o,valueColsSvc:i,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:s?.columns.slice()??[],pivotColumns:o?.columns.slice()??[],valueColumns:i?.columns.slice()??[]},c=Mn(e),d={};for(const u of c)d[u.colId]=u;return()=>{const u=(x,F,P,M)=>{const A=F.map(M),E=P.map(M);if(Cs(A,E))return;const O=new Set(F);for(const N of P)O.delete(N)||O.add(N);const K=[...O];a.dispatchEvent({type:x,columns:K,column:K.length===1?K[0]:null,source:t})},h=x=>{const F=[];return n.forAllCols(P=>{const M=d[P.getColId()];M&&x(M,P)&&F.push(P)}),F},g=x=>x.getColId();u("columnRowGroupChanged",l.rowGroupColumns,s?.columns??[],g),u("columnPivotChanged",l.pivotColumns,o?.columns??[],g);const m=h((x,F)=>{const P=x.aggFunc!=null,M=P!=F.isValueActive(),A=P&&x.aggFunc!=F.getAggFunc();return M||A});m.length>0&&C0(a,"columnValueChanged",m,t),Eo(a,h((x,F)=>x.width!=F.getActualWidth()),!0,t),ng(a,h((x,F)=>x.pinned!=F.getPinned()),t),m0(a,h((x,F)=>x.hide==F.isVisible()),t);const R=h((x,F)=>x.sort!=F.getSort()||x.sortIndex!=F.getSortIndex());R.length>0&&r?.dispatchSortChangedEvents(t,R);const y=Mn(e);S0(c,y,t,n,a)}}function Mn(e){const{colModel:t,rowGroupColsSvc:s,pivotColsSvc:o}=e,i=t.getColDefCols();if(Ie(i)||!t.isAlive())return[];const n=s?.columns,r=o?.columns,a=[],l=d=>{const u=d.isRowGroupActive()&&n?n.indexOf(d):null,h=d.isPivotActive()&&r?r.indexOf(d):null,g=d.isValueActive()?d.getAggFunc():null,f=d.getSort()!=null?d.getSort():null,m=d.getSortIndex()!=null?d.getSortIndex():null;a.push({colId:d.getColId(),width:d.getActualWidth(),hide:!d.isVisible(),pinned:d.getPinned(),sort:f,sortIndex:m,aggFunc:g,rowGroup:d.isRowGroupActive(),rowGroupIndex:u,pivot:d.isPivotActive(),pivotIndex:h,flex:d.getFlex()??null})};t.forAllCols(d=>l(d));const c=new Map(t.getCols().map((d,u)=>[d.getColId(),u]));return a.sort((d,u)=>{const h=c.has(d.colId)?c.get(d.colId):-1,g=c.has(u.colId)?c.get(u.colId):-1;return h-g}),a}function ag(e){const t=(f,m)=>f??m??null,s=e.getColDef(),o=t(s.sort,s.initialSort),i=t(s.sortIndex,s.initialSortIndex),n=t(s.hide,s.initialHide),r=t(s.pinned,s.initialPinned),a=t(s.width,s.initialWidth),l=t(s.flex,s.initialFlex);let c=t(s.rowGroupIndex,s.initialRowGroupIndex),d=t(s.rowGroup,s.initialRowGroup);c==null&&!d&&(c=null,d=null);let u=t(s.pivotIndex,s.initialPivotIndex),h=t(s.pivot,s.initialPivot);u==null&&!h&&(u=null,h=null);const g=t(s.aggFunc,s.initialAggFunc);return{colId:e.getColId(),sort:o,sortIndex:i,hide:n,pinned:r,width:a,flex:l,rowGroup:d,rowGroupIndex:c,pivot:h,pivotIndex:u,aggFunc:g}}function w0(e,t,s){if(!e.applyOrder||!e.state)return;const o=[];for(const i of e.state)i.colId!=null&&o.push(i.colId);b0(t.cols,o,t,s)}function b0(e,t,s,o){if(e==null)return;let i=[];const n={};for(const a of t){if(n[a])continue;const l=e.map[a];l&&(i.push(l),n[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(n[l]!=null)continue;l.startsWith(er)?i.splice(r++,0,a):i.push(a)}if(i=sg(i,o),!og(i,s.getColTree())){L(39);return}e.list=i}function S0(e,t,s,o,i){const n={};for(const d of t)n[d.colId]=d;const r={};for(const d of e)n[d.colId]&&(r[d.colId]=!0);const a=e.filter(d=>r[d.colId]),l=t.filter(d=>r[d.colId]),c=[];l.forEach((d,u)=>{const h=a?.[u];if(h&&h.colId!==d.colId){const g=o.getCol(h.colId);g&&c.push(g)}}),c.length&&i.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:s})}var qc=(e,t,s,o)=>{const i=e[s.getId()],n=e[o.getId()],r=i!=null,a=n!=null;if(r&&a)return i-n;if(r)return-1;if(a)return 1;const l=t.indexOf(s),c=t.indexOf(o),d=l>=0,u=c>=0;return d&&u?l-c:d?-1:1},y0=class extends T{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(mo(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),mo(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:s,colAutosize:o,rowGroupColsSvc:i,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,d=this.colDefs?rg(t,e):void 0;s?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,g=l0(t,this.colDefs,!0,h,e);Pn(t,this.colDefCols?.tree,g.columnTree);const f=g.columnTree,m=g.treeDepth,v=Jh(f),w={};for(const b of v)w[b.getId()]=b;this.colDefCols={tree:f,treeDepth:m,list:v,map:w},this.createColumnsForService([c],this.colDefCols,e),i?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.refreshCols(!0,e),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),d&&(this.changeEventsDispatching=!0,d(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&o?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;const s=this.cols?.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:i,rowNumbersSvc:n,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:c,visibleCols:d,colViewport:u,eventSvc:h}=this.beans,g=this.selectCols(a,this.colDefCols);this.createColumnsForService([o,i,n],g,t);const f=Vb(this.gos,this.showingPivotResult);(!e||f)&&this.restoreColOrder(g),this.positionLockedCols(g),l?.refresh(),r?.refreshCols(),this.setColSpanActive(),c?.setAutoHeightActive(g),d.clear(),u.clear(),!Cs(s,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,s){for(const o of e)o&&(o.createColumns(t,i=>{this.lastOrder=i(this.lastOrder),this.lastPivotOrder=i(this.lastPivotOrder)},s),o.addColumns(t))}selectCols(e,t){const s=e?.getPivotResultCols()??null;this.showingPivotResult=s!=null;const{map:o,list:i,tree:n,treeDepth:r}=s??t;return this.cols={list:i.slice(),map:{...o},tree:n.slice(),treeDepth:r},s&&(s.list.some(l=>this.cols?.map[l.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:s}=this.beans,o=this.isPivotMode()&&!this.showingPivotResult,i=t?.isSelectionColumnEnabled(),n=s.get("rowNumbers"),r=e?.columns;return this.cols.list.filter(l=>{const c=El(l);if(o){const d=r?.includes(l);return c||d||i&&ss(l)||n&&qt(l)}else return c||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,s){xt(this.beans,{state:e.map(o=>({colId:typeof o=="string"?o:o.getColId(),hide:!t}))},s)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const s=t.filter(u=>e.map[u.getId()]!=null);if(s.length===0)return;if(s.length===e.list.length){e.list=s;return}const o=u=>{const h=u.getOriginalParent();return h?h.getChildren().length>1?!0:o(h):!1};if(!s.some(u=>o(u))){const u=new Set(s);for(const h of e.list)u.has(h)||s.push(h);e.list=s;return}const i=new Map;for(let u=0;u<s.length;u++){const h=s[u];i.set(h,u)}const n=e.list.filter(u=>!i.has(u));if(n.length===0){e.list=s;return}const r=(u,h)=>{const g=h?h.getOriginalParent():u.getOriginalParent();if(!g)return null;let f=null,m=null;for(const v of g.getChildren())if(!(v===h||v===u)){if(v instanceof Zs){const w=i.get(v);if(w==null)continue;(f==null||f<w)&&(f=w,m=v);continue}v.forEachLeafColumn(w=>{const b=i.get(w);b!=null&&(f==null||f<b)&&(f=b,m=w)})}return m??r(u,g)},a=[],l=new Map;for(const u of n){const h=r(u,null);if(h==null){a.push(u);continue}const g=l.get(h);g===void 0?l.set(h,u):Array.isArray(g)?g.push(u):l.set(h,[g,u])}const c=new Array(e.list.length);let d=c.length-1;for(let u=a.length-1;u>=0;u--)c[d--]=a[u];for(let u=s.length-1;u>=0;u--){const h=s[u],g=l.get(h);if(g)if(Array.isArray(g))for(let f=g.length-1;f>=0;f--){const m=g[f];c[d--]=m}else c[d--]=g;c[d--]=h}e.list=c}positionLockedCols(e){e.list=sg(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(e){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],e)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:s,eventSvc:o}=this.beans;s.refresh(t),o.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=mo(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){Pn(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){const{pivotResultCols:t,autoColSvc:s,selectionColSvc:o,groupHierarchyColSvc:i}=this.beans;Bo(this.colDefCols?.list,e),Bo(s?.columns?.list,e),Bo(o?.columns?.list,e),Bo(i?.columns?.list,e),Bo(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){return this.cols?.map[e]??null}getColFromCollection(e,t){if(t==null)return null;const{map:s,list:o}=t;if(typeof e=="string"&&s[e])return s[e];for(let a=0;a<o.length;a++)if(ei(o[a],e))return o[a];const{autoColSvc:i,selectionColSvc:n,groupHierarchyColSvc:r}=this.beans;return i?.getColumn(e)??n?.getColumn(e)??r?.getColumn(e)??null}},lg=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let s;return typeof t!="number"?s=0:s=t+1,this.existingIds[e]=s,s}},Lo=class extends T{};function Ei(e,t,s){return s&&e.addDestroyFunc(()=>t.destroyBean(s)),s??e}var Z=null;function Yc(e){return typeof e?.getGui=="function"}var Di=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(!e)return;if(e.indexOf(" ")>=0){const o=(e||"").split(" ");if(o.length>1){for(const i of o)this.toggleCss(i,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}},R0=0,Pi=class extends Bt{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=R0++,this.cssManager=new Di(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(s=>[s.selector,s])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui());const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(const t of this.css??[])this.beans.environment.addGlobalCSS(t,e)}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(Eh):null}applyElementsToComponent(e,t,s,o=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const i=this[t];if(i===Z)this[t]=o??e;else{const n=s?.[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${i}`)}}}createChildComponentsFromTags(e,t){const s=[];for(const o of e.childNodes??[])s.push(o);for(const o of s){if(!(o instanceof HTMLElement))continue;const i=this.createComponentFromElement(o,n=>{const r=n.getGui();if(r)for(const a of o.attributes??[])r.setAttribute(a.name,a.value)},t);if(i){if(i.addItems&&o.children.length){this.createChildComponentsFromTags(o,t);const n=Array.prototype.slice.call(o.children);i.addItems(n)}this.swapComponentForNode(i,e,o)}else o.childNodes&&this.createChildComponentsFromTags(o,t)}}createComponentFromElement(e,t,s){const o=e.nodeName,i=this.getDataRefAttribute(e),n=o.indexOf("AG-")===0,r=n?this.componentSelectors.get(o):null;let a=null;if(r){const l=s&&i?s[i]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${o}`);return this.applyElementsToComponent(e,i,s,a),a}swapComponentForNode(e,t,s){const o=e.getGui();t.replaceChild(o,s),t.insertBefore(document.createComment(s.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const s of e)s.setAttribute("tabindex",t.toString())}setTemplate(e,t,s){let o;typeof e=="string"||e==null?o=ml(e):o=Fi(e),this.setTemplateFromElement(o,t,s)}setTemplateFromElement(e,t,s,o=!1){if(this.eGui=e,this.suppressDataRefValidation=o,t)for(let i=0;i<t.length;i++){const n=t[i];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,s)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let s=t;return e==null?null:(s||(s=this.eGui),wl(e)?{element:e,parent:s}:{element:e.getGui(),parent:s})}prependChild(e,t){const{element:s,parent:o}=this.getContainerAndElement(e,t)||{};!s||!o||o.insertAdjacentElement("afterbegin",s)}appendChild(e,t){const{element:s,parent:o}=this.getContainerAndElement(e,t)||{};!s||!o||o.appendChild(s)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:s}=t;ob(this.eGui,e,{skipAriaHidden:s})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:s}=t;ke(this.eGui,e,{skipAriaHidden:s});const o={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(o)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,s){this.eGui.addEventListener(e,t,s),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},Le=class extends Pi{};function cg(e){return typeof e=="object"&&!!e.component}function x0(e,t){return new fe(s=>{s(window.setInterval(e,t))})}var fe=class Ko{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(s=>this.onDone(s),s=>this.onReject(s))}static all(t){return t.length?new Ko(s=>{let o=t.length;const i=new Array(o);t.forEach((n,r)=>{n.then(a=>{i[r]=a,o--,o===0&&s(i)})})}):Ko.resolve()}static resolve(t=null){return new Ko(s=>s(t))}then(t){return new Ko(s=>{this.status===1?s(t(this.resolution)):this.waiters.push(o=>s(t(o)))})}onDone(t){this.status=1,this.resolution=t;for(const s of this.waiters)s(t)}onReject(t){}};function F0(e){return e?e.prototype&&"getGui"in e.prototype:!1}function dg(e,t,s,o){const{name:i}=s;let n,r,a,l,c,d;if(t){const u=t,h=u[i+"Selector"],g=h?h(o):null,f=m=>{typeof m=="string"?n=m:m!=null&&m!==!0&&(e.isFrameworkComponent(m)?a=m:r=m)};g?(f(g.component),l=g.params,c=g.popup,d=g.popupPosition):f(u[i])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:d}}var E0=class extends T{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,s,o=!1){return this.getCompDetails(this.gridOptions,e,t,s,o)}getCompDetails(e,t,s,o,i=!1){const{name:n,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:d,popupFromSelector:u,popupPositionFromSelector:h}=dg(this.beans.frameworkOverrides,e,t,o),g,f;const m=S=>{const R=this.registry.getUserComponent(n,S);R&&(l=R.componentFromFramework?void 0:R.component,c=R.componentFromFramework?R.component:void 0,g=R.params,f=R.processParams)};if(a!=null&&m(a),l==null&&c==null&&s!=null&&m(s),l&&r&&!F0(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!c){const{validation:S}=this.beans;i&&(a!==s||!s)?a?S?.isProvidedUserComp(a)||be(50,{compName:a}):s?S||be(260,{...this.gos.getModuleErrorParams(),propName:n,compName:s}):be(216,{name:n}):s&&!S&&be(146,{comp:s});return}const v=this.mergeParams(e,t,o,d,g,f),w=l==null,b=l??c;return{componentFromFramework:w,componentClass:b,params:v,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(b,w,v,t)}}newAgStackInstance(e,t,s,o){const i=!t;let n;i?n=new e:n=this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o),this.createBean(n);const r=n.init?.(s);return r==null?fe.resolve(n):r.then(()=>n)}mergeParams(e,t,s,o=null,i,n){const r={...s,...i},l=e?.[t.name+"Params"];if(typeof l=="function"){const c=l(s);st(r,c)}else typeof l=="object"&&st(r,l);return st(r,o),n?n(r):r}},D0={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},P0={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},T0={name:"headerComponent",optionalMethods:["refresh"]},M0={name:"innerHeaderComponent"},I0={name:"innerHeaderGroupComponent"},k0={name:"headerGroupComponent"},A0={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},L0={name:"loadingCellRenderer",cellRenderer:!0},O0={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},N0={name:"loadingOverlayComponent",optionalMethods:["refresh"]},H0={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},G0={name:"tooltipComponent"},Dl={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},V0={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},B0={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},z0={name:"loadingCellRenderer",cellRenderer:!0},W0={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},_0={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function j0(e,t){return e.getCompDetailsFromGridOptions(P0,"agDragAndDropImage",t,!0)}function U0(e,t,s){return e.getCompDetails(t,T0,"agColumnHeader",s)}function $0(e,t,s){return e.getCompDetails(t,M0,void 0,s)}function K0(e,t){const s=t.columnGroup.getColGroupDef();return e.getCompDetails(s,k0,"agColumnGroupHeader",t)}function q0(e,t,s){return e.getCompDetails(t,I0,void 0,s)}function Y0(e,t){return e.getCompDetailsFromGridOptions(B0,void 0,t,!0)}function Z0(e,t){return e.getCompDetailsFromGridOptions(z0,"agLoadingCellRenderer",t,!0)}function Q0(e,t){return e.getCompDetailsFromGridOptions(W0,"agGroupRowRenderer",t,!0)}function X0(e,t){return e.getCompDetailsFromGridOptions(_0,"agDetailCellRenderer",t,!0)}function Zc(e,t,s){return e.getCompDetails(t,A0,void 0,s)}function Qc(e,t,s){return e.getCompDetails(t,L0,"agSkeletonCellRenderer",s,!0)}function ug(e,t,s){return e.getCompDetails(t,O0,"agCellEditor",s,!0)}function J0(e,t,s,o){const i=t.filter;return cg(i)&&(t={filter:i.component,filterParams:t.filterParams}),e.getCompDetails(t,Dl,o,s,!0)}function eS(e,t,s){return e.getCompDetails(t,D0,"agDateInput",s,!0)}function tS(e,t){return e.getCompDetailsFromGridOptions(N0,"agLoadingOverlay",t,!0)}function sS(e,t){return e.getCompDetailsFromGridOptions(H0,"agNoRowsOverlay",t,!0)}function oS(e,t){return e.getCompDetails(t.colDef,G0,"agTooltipComponent",t,!0)}function iS(e,t,s,o){return e.getCompDetails(t,V0,o,s)}function hg(e,t){return dg(e,t,Dl)}function Pr(e,t,s){return e.mergeParams(t,Dl,s)}function Ci(e){const t=e;return t?.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}function nS(e){return typeof e=="object"&&!!e.getComp}var D={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},Pl=class extends Pi{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e?.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},Tr,Mr,Ir,kr,Ea,Da,Ar;function vs(){return Tr===void 0&&(Tr=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Tr}function gg(){return Mr===void 0&&(Mr=/(firefox)/i.test(navigator.userAgent)),Mr}function pg(){return Ir===void 0&&(Ir=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Ir}function Ls(){return kr===void 0&&(kr=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),kr}function Pa(e){if(!e)return null;const t=e.tabIndex,s=e.getAttribute("tabIndex");return t===-1&&(s===null||s===""&&!gg())?null:t.toString()}function rS(){if(Ar!==void 0)return Ar;if(!document.body)return-1;let e=1e6;const t=gg()?6e6:1e9,s=document.createElement("div");for(document.body.appendChild(s);;){const o=e*2;if(s.style.height=o+"px",o>t||s.clientHeight!==o)break;e=o}return s.remove(),Ar=e,e}function aS(){return Da==null&&fg(),Da}function fg(){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 s=t.offsetWidth-t.clientWidth;s===0&&t.clientWidth===0&&(s=null),t.parentNode&&t.remove(),s!=null&&(Da=s,Ea=s===0)}function mg(){return Ea==null&&fg(),Ea}var Tl="T",lS=new RegExp(`[${Tl} ]`),cS=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${Tl}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function At(e,t){return e.toString().padStart(t,"0")}function ht(e,t=!0,s=Tl){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(i=>At(i,2)).join("-");return t&&(o+=s+[e.getHours(),e.getMinutes(),e.getSeconds()].map(i=>At(i,2)).join(":")),o}function Gi(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),At(e.getDate(),2),At(e.getHours(),2),`:${At(e.getMinutes(),2)}`,`:${At(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,At(e.getDate(),2)].map(String):null}var Lr=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"},Xc=["January","February","March","April","May","June","July","August","September","October","November","December"],Or=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Ta(e,t){if(t==null)return ht(e,!1);const s=At(e.getFullYear(),4),o={YYYY:()=>s.slice(s.length-4,s.length),YY:()=>s.slice(s.length-2,s.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>Xc[e.getMonth()],MMM:()=>Xc[e.getMonth()].slice(0,3),MM:()=>At(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${Lr(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${Lr(e.getDate())}`,DD:()=>At(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>Or[e.getDay()],ddd:()=>Or[e.getDay()].slice(0,3),dd:()=>Or[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${Lr(e.getDay())}`,d:()=>`${e.getDay()}`},i=new RegExp(Object.keys(o).join("|"),"g");return t.replace(i,n=>n in o?o[n]():n)}function on(e,t=!1){return!!lt(e,t)}function dS(e){return on(e,!0)}function lt(e,t=!1,s){if(!e||!s&&!cS.test(e))return null;const[o,i]=e.split(lS);if(!o)return null;const n=o.split("-").map(g=>Number.parseInt(g,10));if(n.filter(g=>!isNaN(g)).length!==3)return null;const[r,a,l]=n,c=new Date(r,a-1,l);if(c.getFullYear()!==r||c.getMonth()!==a-1||c.getDate()!==l||!i&&t)return null;if(!i||i==="00:00:00")return c;const[d,u,h]=i.split(":").map(g=>Number.parseInt(g,10));if(d>=0&&d<24)c.setHours(d);else if(t)return null;if(u>=0&&u<60)c.setMinutes(u);else if(t)return null;if(h>=0&&h<60)c.setSeconds(h);else if(t)return null;return c}function Ma(e){const{inputValue:t,allSuggestions:s,hideIrrelevant:o,filterByPercentageOfBestMatch:i}=e;let n=(s??[]).map((l,c)=>({value:l,relevance:uS(t,l),idx:c}));if(n.sort((l,c)=>l.relevance-c.relevance),o&&(n=n.filter(l=>l.relevance<Math.max(l.value.length,t.length))),n.length>0&&i&&i>0){const c=n[0].relevance*i;n=n.filter(d=>c-d.relevance<0)}const r=[],a=[];for(const l of n)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function uS(e,t){e.length<t.length&&([e,t]=[t,e]);let s=[],o=[];const i=e.length,n=t.length;for(let a=0;a<=n;a++)s[a]=a;let r=0;for(let a=1;a<=i;a++){o[0]=a;for(let l=1;l<=n;l++){const c=e[a-1],d=t[l-1];if(c.toLocaleLowerCase()===d.toLocaleLowerCase())++r,c===d&&++r,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++r,e[a-2]===t[l-2]&&++r),a<i/2-10&&++r,o[l]=s[l-1];else{const u=o[l-1],h=s[l],g=s[l-1];o[l]=1+Math.min(u,h,g)}}[s,o]=[o,s]}return s[n]/(r+1)}function Cg(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}var Ia=!1,In=0;function hS(e){In>0||(e.addEventListener("keydown",kn),e.addEventListener("mousedown",kn))}function gS(e){In>0||(e.removeEventListener("keydown",kn),e.removeEventListener("mousedown",kn))}function kn(e){const t=Ia,s=e.type==="keydown";s&&(e.ctrlKey||e.metaKey||e.altKey)||t!==s&&(Ia=s)}function pS(e){const t=$e(e);return hS(t),In++,()=>{In--,gS(t)}}function fS(){return Ia}function Co(e,t,s=!1){const o=sb;let i=Sh;t&&(i+=", "+t),s&&(i+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(o)).filter(l=>Jt(l)),r=Array.prototype.slice.apply(e.querySelectorAll(i));return r.length?((l,c)=>l.filter(d=>c.indexOf(d)===-1))(n,r):n}function js(e,t=!1,s=!1,o=!1){const i=Co(e,o?".ag-tab-guard":null,s),n=t?ye(i):i[0];return n?(n.focus({preventScroll:!0}),!0):!1}function Qs(e,t,s,o){const i=Co(t,s?':not([tabindex="-1"])':null),n=Ae(e);let r;s?r=i.findIndex(l=>l.contains(n)):r=i.indexOf(n);const a=r+(o?-1:1);return a<0||a>=i.length?null:i[a]}function vg(e,t=5){let s=0;for(;e&&Pa(e)===null&&++s<=t;)e=e.parentElement;return Pa(e)===null?null:e}var mS=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",CS=class extends Pi{constructor(e,t,s){super(t,s),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(mS)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:s,labelAlignment:o,disabled:i}=this.config;i!=null&&this.setDisabled(i),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),s!=null&&this.setLabelWidth(s),this.setLabelAlignment(o||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;at(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(ke(t,!1),zs(t,"presentation")):(ke(t,!0),zs(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const s=this.getGui().classList;return s.toggle("ag-label-align-left",e==="left"),s.toggle("ag-label-align-right",e==="right"),s.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:(Sn(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return hi(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},wg=class extends CS{constructor(e,t,s,o){super(e,t,s),this.className=o}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:s}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),s!=null&&this.onValueChange(s),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),s=this.getLabel();s==null||s==""||z1(e)!==null?ui(e,""):ui(e,t??"")}setAriaLabel(e){return xo(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Nt(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function vS(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var Ds=class extends wg{constructor(e,t,s="text",o="input"){super(e,e?.template??vS(o),[],t),this.inputType=s,this.displayFieldTag=o,this.eLabel=Z,this.eWrapper=Z,this.eInput=Z}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:s,className:o}=this;e.classList.add(`${o}-label`),t.classList.add(`${o}-input-wrapper`),s.classList.add(`${o}-input`),this.addCss("ag-input-field"),s.id=s.id||`ag-${this.getCompId()}-input`;const{inputName:i,inputWidth:n}=this.config;i!=null&&this.setInputName(i),n!=null&&this.setInputWidth(n),this.addInputListeners(),this.activateTabIndex([s])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,dt(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return Sn(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 dt(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return xo(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return hi(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)dt(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";dt(this.eInput,"autocomplete",t)}return this}},Ml=class extends Ds{constructor(e,t="ag-checkbox",s="checkbox"){super(e,t,s),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const s=this.eInput;s.checked=e,s.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,s){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:s});const o=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:o.id,name:o.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),s=this.selected=e.target.checked;this.refreshSelectedClass(s),this.dispatchChange(s,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},Il={selector:"AG-CHECKBOX",component:Ml},wS=class extends Ml{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},Xs=class extends Ds{constructor(e,t="ag-text-field",s="text"){super(e,t,s)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const s=this.eInput;return s.value!==e&&(s.value=V(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=s=>{Cg(s)&&s.key&&!e.test(s.key)&&s.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:s=>{s.clipboardData?.getData("text")?.split("").some(i=>!e.test(i))&&s.preventDefault()}})}},tr={selector:"AG-INPUT-TEXT-FIELD",component:Xs},bS=class extends Ds{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const s=super.setValue(e,t);return this.eInput.value=e,s}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},SS={selector:"AG-INPUT-TEXT-AREA",component:bS},kl=class extends Xs{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=Number.parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:s,max:o,step:i}=this.config;typeof t=="number"&&this.setPrecision(t),typeof s=="number"&&this.setMin(s),typeof o=="number"&&this.setMax(o),typeof i=="number"&&this.setStep(i)}onWheel(e){Ae(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const s=this.precision;if(s==null)return e;if(t){const i=Number.parseFloat(e).toFixed(s);return Number.parseFloat(i).toString()}const o=String(e).split(".");if(o.length>1){if(o[1].length<=s)return e;if(s>0)return`${o[0]}.${o[1].slice(0,s)}`}return o[0]}setMin(e){return this.min===e?this:(this.min=e,dt(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,dt(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,dt(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(s=>super.setValue(s,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,s){if(V(s)){let o=this.isScientificNotation(s);if(o&&this.eInput.validity.valid)return e(s);if(!o){s=this.adjustPrecision(s);const i=this.normalizeValue(s);o=s!=i}if(o)return t(s)}return e(s)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},yS={selector:"AG-INPUT-NUMBER-FIELD",component:kl},RS=class extends Xs{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=vs();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Ae(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?ht(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,dt(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?ht(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,dt(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,dt(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return lt(this.getValue())??void 0}setDate(e,t){this.setValue(ht(e??null,this.includeTime),t)}},bg={selector:"AG-INPUT-DATE-FIELD",component:RS},xS=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",FS="ag-active-item",ES=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),DS=class extends Pi{constructor(e,t,s){super(ES(e,t)),this.label=t,this.value=s,this.eText=Z}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(FS,e),bh(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const s=this.getGui();K1(s,e),$1(s,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>Cl(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},PS=class extends Pi{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(xS)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case D.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const s=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(s)}break;case D.DOWN:case D.UP:e.preventDefault(),this.navigate(t);break;case D.PAGE_DOWN:case D.PAGE_UP:case D.PAGE_HOME:case D.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:s}=e,o=s??t;return this.options.push({value:t,text:o}),this.renderOption(t,o),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();at(this.getGui()),this.listItems=[],this.refreshAriaRole()}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const s=this.options.findIndex(o=>o.value===e);if(s!==-1){const o=this.options[s];this.value=o.value,this.displayValue=o.text,this.highlightItem(this.listItems[s]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!Jt(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const s=this.getGui(),{scrollTop:o,clientHeight:i}=s,{offsetTop:n,offsetHeight:r}=t;(n+r>o+i||n<o)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const s=new DS(this.cssIdentifier,t,e);s.setParentComponent(this);const o=this.createManagedBean(s);this.listItems.push(o),this.getGui().appendChild(o.getGui())}navigate(e){const t=e===D.DOWN;let s;const{listItems:o,highlightedItem:i}=this;if(!i)s=t?o[0]:ye(o);else{let r=o.indexOf(i)+(t?1:-1);r=Math.min(Math.max(r,0),o.length-1),s=o[r]}this.highlightItem(s)}navigateToPage(e){const{listItems:t,highlightedItem:s}=this;if(!s||t.length===0)return;const o=t.indexOf(s),i=this.options.length-1,n=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/n);let a=-1;e===D.PAGE_HOME?a=0:e===D.PAGE_END?a=i:e===D.PAGE_DOWN?a=Math.min(o+r,i):e===D.PAGE_UP&&(a=Math.max(o-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){zs(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((s,o)=>{s.setIndex(o+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},TS=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",MS={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},IS=class extends wg{constructor(e){if(super(e,e?.template||MS,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=Z,this.eWrapper=Z,this.eDisplayField=Z,this.eIcon=Z,this.registerCSS(TS),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:s,variableWidth:o,minPickerWidth:i,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!o,s!=null&&this.setPickerMaxHeight(s),i!=null&&this.setPickerMinWidth(i),n!=null&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:s,inputWidth:o}=this.config;if(s){const i=this.beans.iconSvc.createIconNoSpan(s);i&&this.eIcon.appendChild(i)}o!=null&&this.setInputWidth(o)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),va(e,!1),this.ariaRole&&zs(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&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.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:s,pickerAriaLabelValue:o,modalPicker:i=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:d}=this,u={modal:i,eChild:e,closeOnEsc:!0,closedCallback:()=>{const m=hh(c);this.beforeHidePicker(),m&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(s,o),anchorToElement:d};e.style.position="absolute";const h=c.popupSvc,g=h.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=vl(vn(d)),a&&(e.style.maxWidth=a)):Sn(e,a??vn(d));const f=n??`${fl(h.getPopupParent())}px`;return e.style.setProperty("max-height",f),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:s,gos:o},eWrapper:i,pickerComponent:n}=this,r=o.get("enableRtl")?"right":"left";s.positionPopupByComponent({type:t,eventSource:i,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}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();va(t,e);const s=this.eWrapper.classList;s.toggle("ag-picker-expanded",e),s.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.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(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return Sn(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()}},kS=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}",Al=class extends IS{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(kS)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Qi(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:s}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),s&&t==null&&(this.eDisplayField.textContent=s),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new PS("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),s=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",s),tb(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:o=>{o?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){const{key:t}=e;switch(t===D.TAB&&this.hidePicker(),t){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:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case D.ESCAPE:super.onKeyDown(e);break;case D.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,s){const{listComponent:o,config:{placeholder:i},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!o)return this;if(s||o.setValue(e,!0),o.getValue()===this.getValue())return this;let l=o.getDisplayValue();return l==null&&i&&(l=i),n.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},AS={selector:"AG-SELECT",component:Al},LS=':where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',Ll=typeof window!="object"||!window?.document?.fonts?.forEach,Do=(e,t,s,o,i,n)=>{if(Ll)return;o&&(e=`@layer ${CSS.escape(o)} { ${e} }`);let r=vo.map.get(t);if(r||(r=[],vo.map.set(t,r)),r.some(d=>d.css===e))return;const a=document.createElement("style");n&&a.setAttribute("nonce",n),a.dataset.agGlobalCss=s,a.textContent=e;const l={css:e,el:a,priority:i};let c;for(const d of r){if(d.priority>i)break;c=d}if(c){c.el.insertAdjacentElement("afterend",a);const d=r.indexOf(c);r.splice(d+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},Sg=(e,t,s,o)=>{Do(LS,e,"shared",t,0,s),o?.forEach((i,n)=>i.forEach(r=>Do(r,e,n,t,0,s)))},OS=e=>{vo.grids.add(e)},NS=e=>{if(vo.grids.delete(e),vo.grids.size===0){vo.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},Jc,vo=(Jc=typeof window=="object"?window:{}).agStyleInjectionState??(Jc.agStyleInjectionState={map:new WeakMap,grids:new Set}),ot=e=>new yg(e),cs="$default",HS=0,yg=class{constructor({feature:e,params:t,modeParams:s={},css:o,cssImports:i}){this.feature=e,this.css=o,this.cssImports=i,this.modeParams={[cs]:{...s[cs]??{},...t??{}},...s}}use(e,t,s){let o=this._inject;if(o==null){let{css:i}=this;if(i){const n=`ag-theme-${this.feature??"part"}-${++HS}`;typeof i=="function"&&(i=i()),i=`:where(.${n}) {
|
|
5
|
+
${i}
|
|
6
|
+
}
|
|
7
|
+
`;for(const r of this.cssImports??[])i=`@import url(${JSON.stringify(r)});
|
|
8
|
+
${i}`;o={css:i,class:n}}else o=!1;this._inject=o}return o&&e&&Do(o.css,e,o.class,t,1,s),o?o.class:!1}},GS=e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase(),Rg=e=>`--ag-${GS(e)}`,Vt=e=>`var(${Rg(e)})`,VS=(e,t,s)=>Math.max(t,Math.min(s,e)),BS=e=>{const t=new Map;return s=>{const o=s;return t.has(o)||t.set(o,e(s)),t.get(o)}},It=e=>({ref:"accentColor",mix:e}),tt=e=>({ref:"foregroundColor",mix:e}),qe=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),zS=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),ze={ref:"backgroundColor"},Ut={ref:"foregroundColor"},vt={ref:"accentColor"},An={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:tt(.15),chromeBackgroundColor:qe(.02),browserColorScheme:"light"},WS={...An,textColor:Ut,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,focusShadow:{spread:3,color:It(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:ze,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:vt,toggleButtonOffBackgroundColor:qe(.3),toggleButtonSwitchBackgroundColor:ze,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}}},_S=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],jS=BS(e=>(e=e.toLowerCase(),_S.find(t=>e.endsWith(t.toLowerCase()))??"length")),sr=e=>typeof e=="object"&&e?.ref?Vt(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,Ol=e=>{if(typeof e=="string")return e;if(e&&"ref"in e){const t=Vt(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?Vt(e.onto):"transparent"}, ${t} ${VS(e.mix*100,0,100)}%)`}return!1},US=sr,lo=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,s=>s[0]==="-"?s:" "+Vt(s)+" ")})`:e&&"ref"in e?Vt(e.ref):!1,$S=sr,ka=(e,t)=>typeof e=="string"?e:e===!0?ka({},t):e===!1?t==="columnBorder"?ka({color:"transparent"},t):"none":e&&"ref"in e?Vt(e.ref):xg(e.style??"solid")+" "+lo(e.width??{ref:"borderWidth"})+" "+Ol(e.color??{ref:"borderColor"}),KS=e=>typeof e=="string"?e:e===!1?"none":e&&"ref"in e?Vt(e.ref):[lo(e.offsetX??0),lo(e.offsetY??0),lo(e.radius??0),lo(e.spread??0),Ol(e.color??{ref:"foregroundColor"})].join(" "),xg=sr,Fg=e=>typeof e=="string"?e.includes(",")?e:ed(e):e&&"googleFont"in e?Fg(e.googleFont):e&&"ref"in e?Vt(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),ed(t))).join(", "):!1,ed=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),qS=sr,Eg=e=>typeof e=="string"?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?Eg({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):e&&"ref"in e?Vt(e.ref):!1,YS=(e,t,s)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&s.warn(104,{value:e,param:t}),`${e}s`):e&&"ref"in e?Vt(e.ref):!1,ZS={color:Ol,colorScheme:US,length:lo,scale:$S,border:ka,borderStyle:xg,shadow:KS,image:Eg,fontFamily:Fg,fontWeight:qS,duration:YS},QS=(e,t,s)=>{const o=jS(e);return ZS[o](t,e,s)},XS=e=>new Dg(e),Dg=class Pg{constructor(t,s=[]){this.themeLogger=t,this.parts=s}withPart(t){return typeof t=="function"&&(t=t()),t instanceof yg?new Pg(this.themeLogger,[...this.parts,t]):(this.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(t){return this.withPart(ot({feature:t}))}withParams(t,s=cs){return this.withPart(ot({modeParams:{[s]:t}}))}_startUse({styleContainer:t,cssLayer:s,nonce:o,loadThemeGoogleFonts:i,moduleCss:n}){if(Ll)return;ey(),Sg(t,s,o,n);const r=JS(this);if(r.length>0)for(const a of r)i&&ty(a,o);for(const a of this.parts)a.use(t,s,o)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=td(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const s={[cs]:{...WS}};for(const o of td(this.parts))for(const i of Object.keys(o.modeParams)){const n=o.modeParams[i];if(n){const r=s[i]??(s[i]={}),a=new Set;for(const l of Object.keys(n)){const c=n[l];c!==void 0&&(r[l]=c,a.add(l))}if(i===cs)for(const l of Object.keys(s)){const c=s[l];if(l!==cs)for(const d of a)delete c[d]}}}this._paramsCache=t=s}return t}_getPerInstanceCss(t){const s="##SELECTOR##";let o=this._paramsCssCache;if(!o){let i="",n="";const r=this._getModeParams();for(const l of Object.keys(r)){const c=r[l];if(l!==cs){const u=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(l):l}"]) & {
|
|
9
|
+
`;i+=u,n+=u}for(const d of Object.keys(c).sort()){const u=c[d],h=QS(d,u,this.themeLogger);if(h===!1)this.themeLogger.error(107,{key:d,value:u});else{const g=Rg(d),f=g.replace("--ag-","--ag-inherited-");i+=` ${g}: var(${f}, ${h});
|
|
10
|
+
`,n+=` ${f}: var(${g});
|
|
11
|
+
`}}l!==cs&&(i+=`}
|
|
12
|
+
`,n+=`}
|
|
13
|
+
`)}let a=`${s} {
|
|
14
|
+
${i}}
|
|
15
|
+
`;a+=`:has(> ${s}):not(${s}) {
|
|
16
|
+
${n}}
|
|
17
|
+
`,this._paramsCssCache=o=a}return o.replaceAll(s,`:where(.${t})`)}},td=e=>{const t=new Map;for(const o of e)t.set(o.feature,o);const s=[];for(const o of e)(!o.feature||t.get(o.feature)===o)&&s.push(o);return s},JS=e=>{const t=new Set,s=n=>{if(Array.isArray(n))n.forEach(s);else{const r=n?.googleFont;typeof r=="string"&&t.add(r)}};return Object.values(e._getModeParams()).flatMap(n=>Object.values(n)).forEach(s),Array.from(t).sort()},sd=!1,ey=()=>{if(!sd){sd=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},ty=async(e,t)=>{const s=`@import url('https://${sy}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
|
|
18
|
+
`;Do(s,document.head,`googleFont:${e}`,void 0,0,t)},sy="fonts.googleapis.com",oy=1,iy=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=oy++,e?.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];for(const t of e.beanClasses){const s=new t;s.beanName?this.beans[s.beanName]=s:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(s)}for(const t of e.derivedBeans??[]){const{beanName:s,bean:o}=t(this);this.beans[s]=o,this.createdBeans.push(o)}e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){const s=this.beans;for(const o of e)o.preWireBeans?.(s),o.wireBeans?.(s);for(const o of e)o.preConstruct?.();t&&e.forEach(t);for(const o of e)o.postConstruct?.()}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[],this.destroyCallback?.()}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}},ny=0,ry=class extends Bt{constructor(){super(...arguments),this.beanName="environment",this.paramsClass=`ag-theme-params-${++ny}`,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){const{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t),this.eStyleContainer=e.get("themeStyleContainer")??(t.getRootNode()===document?document.head:t),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.initVariables(),this.addDestroyFunc(()=>NS(this)),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){const{theme:s}=this;let o;s?o=`${this.paramsClass} ${s._getCssClass()}`:o=this.applyLegacyThemeClasses();for(const i of Array.from(e.classList))i.startsWith("ag-theme-")&&e.classList.remove(i);if(o){const i=e.className;e.className=`${i}${i?" ":""}${o}${t?.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let s=!1;for(const o of Array.from(t.classList))o.startsWith("ag-theme-")&&(s=!0,e=e?`${e} ${o}`:o);s&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?Do(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}handleThemeChange(){const{gos:e,theme:t}=this,s=e.get("theme");let o;if(s==="legacy")o=void 0;else{const i=s??this.getDefaultTheme();i instanceof Dg?o=i:this.themeError(i)}o!==t&&this.handleNewTheme(o),this.postProcessThemeChange(o,s)}handleNewTheme(e){const{gos:t,eRootDiv:s,globalCSS:o}=this,i=this.getAdditionalCss();if(e){OS(this),Sg(this.eStyleContainer,this.cssLayer,this.styleNonce,i);for(const[r,a]of o)Do(r,this.eStyleContainer,a,this.cssLayer,0,this.styleNonce);o.length=0}this.theme=e,e?._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:i});let n=this.eParamsStyle;if(!n){n=this.eParamsStyle=Fi({tag:"style"});const r=t.get("styleNonce");r&&n.setAttribute("nonce",r),s.appendChild(n)}Ll||(n.textContent=e?._getPerInstanceCss(this.paramsClass)||""),this.applyThemeClasses(s),this.fireStylesChangedEvent("themeChanged")}},ay=class extends Bt{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){if(e){this.dynamicBeans??(this.dynamicBeans={});for(const t of Object.keys(e))this.dynamicBeans[t]=e[t]}}createDynamicBean(e,t,...s){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));const o=this.dynamicBeans[e];if(o==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new o(...s)}},ly=class extends Bt{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new Bs}addListener(e,t,s){this.globalSvc.addEventListener(e,t,s)}removeListener(e,t,s){this.globalSvc.removeEventListener(e,t,s)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},Tg=class extends Bt{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const s="title",o=this.ctrl.getGui();o&&(e!=null&&(e!=""||t)?o.setAttribute(s,e):o.removeAttribute(s))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){const e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},cy=1e3,dy=1e3,od=100,id,Vi=!1,uy=class extends Bt{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return e==="show"?this.tooltipCtrl.getTooltipShowDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipCtrl.getTooltipHideDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Ls()&&(Vi?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},od):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,s=this.tooltipCtrl.getGui(),o=this.tooltipComp?.getGui();this.isInteractingWithTooltip||s.contains(t)||this.interactionEnabled&&o?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Vi)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-id<cy}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!V(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const s=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const o=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(s,o)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),id=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const o=t.getGui();this.tooltipComp=t,o.classList.contains("ag-tooltip")||o.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&o.classList.add("ag-tooltip-animate"),this.interactionEnabled&&o.classList.add("ag-tooltip-interactive");const i=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:o,ariaLabel:i("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:r}),this.setEventHandlers(r)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(o,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners($e(this.beans),{keydown:r=>{o.contains(r?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(o,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:o,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=Ae(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,s=this.tooltipTrigger===0?dy:0;window.setTimeout(()=>{e(),this.destroyBean(t)},s),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Vi=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},od)}unlockService(){Vi=!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()}},hy=class extends Tg{constructor(e,t,s){super(e,s),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:e})=>{this.setTooltipMode(e)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(e){this.tooltipMode===1&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode=e==="focus"?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},Bi=0,gy=200,py=class extends Bt{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:s,nudgeY:o,skipObserver:i}=e;this.positionPopup({ePopup:t,nudgeX:s,nudgeY:o,keepWithinBounds:!0,skipObserver:i,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:s,nudgeY:o,keepWithinBounds:i,eventSource:n,alignSide:r="left",position:a="over",type:l}=e,c=n.getBoundingClientRect(),d=this.getParentRect();this.setAlignedTo(n,t);const u=()=>{let h=c.left-d.left;r==="right"&&(h-=t.offsetWidth-c.width);let g;return a==="over"?(g=c.top-d.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,c,d,e.nudgeY||0)==="under"?g=c.top-d.top+c.height:g=c.top-t.offsetHeight-(o||0)*2-d.top),{x:h,y:g}};this.positionPopup({ePopup:t,nudgeX:s,nudgeY:o,keepWithinBounds:i,updatePosition:u,postProcessCallback:()=>this.callPostProcessPopup(e,l,t,n,null)})}shouldRenderUnderOrAbove(e,t,s,o){const i=s.bottom-t.bottom,n=t.top-s.top,r=e.offsetHeight+o;return i>r?"under":n>r||n>i?"above":"under"}setAlignedStyles(e,t){const s=this.getPopupIndex(e);if(s===-1)return;const o=this.popupList[s],{alignedToElement:i}=o;if(!i)return;const n=["right","left","over","above","under"];for(const r of n)i.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`);t&&(i.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const s=this.getPopupIndex(t);if(s!==-1){const o=this.popupList[s];o.alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:s,nudgeX:o,nudgeY:i,skipObserver:n,updatePosition:r}=e,a={width:0,height:0},l=(c=!1)=>{let{x:d,y:u}=r();c&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,o&&(d+=o),i&&(u+=i),s&&(d=this.keepXYWithinBounds(t,d,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${d}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!n){const c=es(this.beans,t,()=>l(!0));setTimeout(()=>c(),gy)}}getParentRect(){const e=$e(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Rh(t)}keepXYWithinBounds(e,t,s){const o=s===0,i=o?"clientHeight":"clientWidth",n=o?"top":"left",r=o?"height":"width",a=o?"scrollTop":"scrollLeft",l=$e(this.beans),c=l.documentElement,d=this.getPopupParent(),u=e.getBoundingClientRect(),h=d.getBoundingClientRect(),g=l.documentElement.getBoundingClientRect(),f=d===l.body,m=Math.ceil(u[r]);let w=f?(o?yh:vn)(c)+c[a]:d[i];f&&(w-=Math.abs(g[n]-h[n]));const b=w-m;return Math.min(Math.max(t,0),Math.max(b,0))}addPopup(e){const{eChild:t,ariaLabel:s,ariaOwns:o,alwaysOnTop:i,positionCallback:n,anchorToElement:r}=e,a=this.getPopupIndex(t);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!i,s,o),c=this.addEventListenersToPopup({...e,wrapperEl:l});return n&&n(),this.addPopupToPopupList(t,l,c,r),{hideFunc:c}}initialisePopupPosition(e){const s=this.getPopupParent().getBoundingClientRect();V(e.style.top)||(e.style.top=`${s.top*-1}px`),V(e.style.left)||(e.style.left=`${s.left*-1}px`)}createPopupWrapper(e,t,s,o){const i=this.getPopupParent(),{environment:n,gos:r}=this.beans,a=Fi({tag:"div"});return n.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||zs(e,"dialog"),s?xo(e,s):o&&(e.id||(e.id=`popup-component-${Bi}`),Hc(o,e.id)),a.appendChild(e),i.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,s=$e(t),{wrapperEl:o,eChild:i,closedCallback:n,afterGuiAttached:r,closeOnEsc:a,modal:l,ariaOwns:c}=e;let d=!1;const u=m=>{if(!o.contains(Ae(t)))return;m.key===D.ESCAPE&&!this.isStopPropagation(m)&&f({keyboardEvent:m})},h=m=>f({mouseEvent:m}),g=m=>f({touchEvent:m}),f=(m={})=>{const{mouseEvent:v,touchEvent:w,keyboardEvent:b,forceHide:S}=m;!S&&(this.isEventFromCurrentPopup({mouseEvent:v,touchEvent:w},i)||d)||(d=!0,o.remove(),s.removeEventListener("keydown",u),s.removeEventListener("mousedown",h),s.removeEventListener("touchstart",g),s.removeEventListener("contextmenu",h),this.eventSvc.removeListener("dragStarted",h),n&&n(v||w||b),this.removePopupFromPopupList(i,c))};return r&&r({hidePopup:f}),window.setTimeout(()=>{a&&s.addEventListener("keydown",u),l&&(s.addEventListener("mousedown",h),this.eventSvc.addListener("dragStarted",h),s.addEventListener("touchstart",g),s.addEventListener("contextmenu",h))},0),f}addPopupToPopupList(e,t,s,o){this.popupList.push({element:e,wrapper:t,hideFunc:s,instanceId:Bi,isAnchored:!!o}),o&&this.setPopupPositionRelatedToElement(e,o),Bi=Bi+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const s=this.getPopupIndex(e);if(s===-1)return;const o=this.popupList[s];if(o.stopAnchoringPromise&&o.stopAnchoringPromise.then(n=>n&&n()),o.stopAnchoringPromise=void 0,o.isAnchored=!1,!t)return;const i=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:o.hideFunc});return o.stopAnchoringPromise=i,o.isAnchored=!0,i}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&Hc(t,null),this.popupList=this.popupList.filter(s=>s.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),s=t.getBoundingClientRect(),{element:o,ePopup:i}=e,n=o.getBoundingClientRect(),r=u=>Number.parseInt(u.substring(0,u.length-1),10),a=(u,h)=>{const g=s[u]-n[u],f=r(i.style[u]);return{initialDiff:g,lastDiff:g,initial:f,last:f,direction:h}},l=a("top",0),c=a("left",1),d=this.beans.frameworkOverrides;return new fe(u=>{d.wrapIncoming(()=>{x0(()=>{const h=t.getBoundingClientRect(),g=o.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const m=(v,w)=>{const b=r(i.style[w]);v.last!==b&&(v.initial=b,v.last=b);const S=h[w]-g[w];if(S!=v.lastDiff){const R=this.keepXYWithinBounds(i,v.initial+v.initialDiff-S,v.direction);i.style[w]=`${R}px`,v.last=R}v.lastDiff=S};m(l,"top"),m(c,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:s,touchEvent:o}=e,i=s||o;if(!i)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const a=this.popupList[r];if(rb(a.element,i))return!0}return this.isElementWithinCustomPopup(i.target)}isElementWithinCustomPopup(e){const t=$e(this.beans);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 s=this.getWrapper(e);s&&(s.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(s))}bringPopupToFront(e){const t=this.getPopupParent(),s=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),o=s.length,i=this.getWrapper(e);if(!i||o<=1||!t.contains(e))return;const n=[],r=[];for(const h of s)h!==i&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const a=[],l=r.length,u=i.classList.contains("ag-always-on-top")||!l?[...n,...r,i]:[...n,i,...r];for(let h=0;h<=o;h++){const g=u[h];if(s[h]===u[h]||g===i)continue;const f=g.querySelectorAll("div");for(const m of f)m.scrollTop!==0&&a.push([m,m.scrollTop]);h===0?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;a.length;){const h=a.pop();h[0].scrollTop=h[1]}}},fy=class extends Pl{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,s=this.getGui();s.textContent=Ao(t);const o=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();s.classList.add(`ag-${o}-tooltip`)}},Mg=(e,t)=>{if(t!=null&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},my=(e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const s=t.pointerId;if(!Mg(e,s))return null;const o={eElement:e,pointerId:s,onLost(i){vy(o,i)}};return e.addEventListener("lostpointercapture",o.onLost),o},Cy=e=>{if(!e)return;Ig(e);const{eElement:t,pointerId:s}=e;if(t){try{t.releasePointerCapture(s)}catch{}e.eElement=null}},Ig=e=>{const{eElement:t,onLost:s}=e;t&&s&&(t.removeEventListener("lostpointercapture",s),e.onLost=null)},vy=(e,t)=>{Ig(e);const{eElement:s,pointerId:o}=e;s&&t.pointerId===o&&Mg(s,o)},so,co,Wt=e=>{if(!co)co=new WeakSet;else if(co.has(e))return!1;return co.add(e),!0},wy=class extends Bt{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!so?.has(Mt(this.beans))}hasPointerCapture(){const e=this.drag?.pointerCapture;return!!(e&&this.beans.eRootDiv.hasPointerCapture?.(e.pointerId))}destroy(){this.drag&&this.cancelDrag();const e=this.dragSources;for(const t of e)nd(t);e.length=0,super.destroy()}removeDragSource(e){const t=this.dragSources;for(let s=0,o=t.length;s<o;++s){const i=t[s];if(i.params===e){t.splice(s,1),nd(i);break}}}addDragSource(e){if(!this.isAlive())return;const{eElement:t,includeTouch:s}=e,o=[];let i;if(s){const c=t.style;c&&(i=c.touchAction,c.touchAction="none")}const n={handlers:o,params:e,oldTouchAction:i};this.dragSources.push(n),Xi(o,[t,"pointerdown",c=>this.onPointerDown(e,c),{passive:!1}],[t,"mousedown",c=>this.onMouseDown(e,c)]);const l=this.gos.get("suppressTouch");s&&!l&&Xi(o,[t,"touchstart",d=>this.onTouchStart(e,d),{passive:!1}])}cancelDrag(e){const t=this.drag;e??(e=t?.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),t?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(e){const t=e.type;return(t==="mousemove"||t==="pointermove")&&e.cancelable&&pi(this.beans,e)&&!Zo(Hr(e))}initDrag(e,...t){this.drag=e;const s=this.beans,o=a=>this.onScroll(a),i=a=>this.onKeyDown(a),n=Mt(s),r=$e(s);Xi(e.handlers,[n,"contextmenu",ls],[n,"keydown",i],[r,"scroll",o,{capture:!0}],[r.defaultView||window,"scroll",o],...t)}destroyDrag(){this.dragging=!1;const e=this.drag;if(e){const t=e.rootEl;so?.get(t)===e&&so?.delete(t),this.drag=null,Cy(e.pointerCapture),bl(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const s=this.beans;if(co?.has(t))return;const o=t.pointerType;if(o==="touch"&&(s.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),Zo(Hr(t))))||!t.isPrimary||o==="mouse"&&t.button!==0)return;this.destroyDrag();const i=Mt(s),n=e.eElement,r=t.pointerId,a=new Nr(i,e,t,r);so??(so=new WeakMap),so.set(i,a);const l=u=>{u.pointerId===r&&this.onMouseOrPointerMove(u)},c=u=>{u.pointerId===r&&this.onMouseOrPointerUp(u)},d=u=>{u.pointerId===r&&Wt(u)&&this.cancelDrag()};this.initDrag(a,[i,"pointerup",c],[i,"pointercancel",d],[i,"pointermove",l,{passive:!1}],[i,"touchmove",ls,{passive:!1}],[n,"mousemove",ls,{passive:!1}]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Wt(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!Wt(t)||Zo(Hr(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){ls(t);return}this.destroyDrag();const o=this.beans,i=Mt(o),n=new Nr(i,e,t.touches[0]),r=c=>this.onTouchMove(c),a=c=>this.onTouchUp(c),l=t.target??e.eElement;this.initDrag(n,[Mt(o),"touchmove",ls,{passive:!1}],[l,"touchmove",r,{passive:!0}],[l,"touchend",a,{passive:!0}],[l,"touchcancel",a,{passive:!0}]),e.dragStartPixels===0&&this.onMove(n.start)}onMouseDown(e,t){if(t.button!==0||co?.has(t)||this.isPointer())return;const s=this.beans;this.destroyDrag();const o=new Nr(Mt(s),e,t),i=a=>this.onMouseOrPointerMove(a),n=a=>this.onMouseOrPointerUp(a),r=Mt(s);this.initDrag(o,[r,"mousemove",i],[r,"mouseup",n]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Wt(t)}onScroll(e){if(!Wt(e))return;const t=this.drag,s=t?.lastDrag;s&&this.dragging&&t.params?.onDragging(s)}onMouseOrPointerMove(e){Wt(e)&&(vs()&&$e(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&ls(e),this.onMove(e))}onTouchMove(e){const t=this.drag;if(!t||!Wt(e))return;const s=Xo(t.start,e.touches);s&&(e.preventDefault(),this.onMove(s))}onMove(e){const t=this.drag;if(!t)return;t.lastDrag=e;const s=t.params;if(!this.dragging){const o=t.start,n=s.dragStartPixels??4;if(Ph(e,o,n)||(this.dragging=!0,s.capturePointer&&(t.pointerCapture=my(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:s.eElement}),s.onDragStart(o),this.drag!==t)||(s.onDragging(o),this.drag!==t))return}s.onDragging(e)}onTouchUp(e){const t=this.drag;t&&Wt(e)&&this.onUp(Xo(t.start,e.changedTouches))}onMouseOrPointerUp(e){Wt(e)&&this.onUp(e)}onUp(e){const t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,t.params.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){e.key===D.ESCAPE&&this.cancelDrag()}},nd=e=>{bl(e.handlers);const t=e.oldTouchAction;if(t!=null){const s=e.params.eElement.style;s&&(s.touchAction=t)}},Nr=class{constructor(e,t,s,o=null){this.rootEl=e,this.params=t,this.start=s,this.pointerId=o,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},Hr=e=>{const t=e.target;return t instanceof Element?t:null},by=class extends Bt{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageParent=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.lastDropTarget=null}addDragSource(e,t=!1){const s={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:o=>this.onDragStart(e,o),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(s),this.beans.dragSvc.addDragSource(s)}setDragImageCompIcon(e,t=!1){const s=this.dragImageComp;s&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,s.setIcon(e,t))}removeDragSource(e){const{dragSourceAndParamsList:t,beans:s}=this,o=t.find(i=>i.dragSource===e);o&&(s.dragSvc?.removeDragSource(o),Et(t,o))}destroy(){const{dragSourceAndParamsList:e,dropTargets:t,beans:s}=this,o=s.dragSvc;for(const i of e)o?.removeDragSource(i);e.length=0,t.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){const e=this.lastMouseEvent;e&&this.onDragging(e,!0)}onDragStart(e,t){this.lastMouseEvent=t,this.dragSource=e,this.dragItem=e.getDragItem();const s=e.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=t.clientX-s.left,this.dragInitialSourcePointerOffsetY=t.clientY-s.top,e.onDragStarted?.(),this.createAndUpdateDragImageComp(e)}onDragStop(e){const{dragSource:t,lastDropTarget:s}=this;if(t?.onDragStopped?.(),s){const o=this.dropTargetEvent(s,e,!1);s.onDragStop?.(o)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t,lastMouseEvent:s}=this;if(e?.onDragCancelled?.(),t&&s){const o=this.dropTargetEvent(t,s,!1);t.onDragCancel?.(o)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);const s=this.findCurrentDropTarget(e),{lastDropTarget:o,dragSource:i,dragItem:n}=this;let r=!1;if(s!==o){if(r=!0,o){const a=this.dropTargetEvent(o,e,t);o.onDragLeave?.(a)}if(o!==null&&!s?this.handleExit(i,n):o===null&&s&&this.handleEnter(i,n),s){const a=this.dropTargetEvent(s,e,t);s.onDragEnter?.(a)}this.lastDropTarget=s}else if(s){const a=this.dropTargetEvent(s,e,t);s.onDragging?.(a),a?.changed&&(r=!0)}this.lastMouseEvent=e,r&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageParent=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,s=[[e.getContainer()]];return t?s.concat(t):s}isMouseOnDropTarget(e,t){const s=this.getAllContainersFromDropTarget(t);let o=!1;const i=(a,l)=>{for(const c of l){const{width:d,height:u,left:h,right:g,top:f,bottom:m}=c.getBoundingClientRect();if(d===0||u===0)return!1;const v=a.clientX>=h&&a.clientX<g,w=a.clientY>=f&&a.clientY<m;if(!v||!w)return!1}return!0};for(const a of s)if(i(e,a)){o=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:o&&t.isInterestedIn(r,n)}findCurrentDropTarget(e){const t=this.dropTargets.filter(n=>this.isMouseOnDropTarget(e,n)),s=t.length;if(s===0)return null;if(s===1)return t[0];const i=Mt(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const n of i)for(const r of t)if(this.getAllContainersFromDropTarget(r).flatMap(l=>l).indexOf(n)!==-1)return r;return 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.find(t=>t.external&&t.getContainer()===e)||null}dropTargetEvent(e,t,s){const{dragSource:o,dragItem:i,lastDraggingEvent:n,lastMouseEvent:r,dragInitialSourcePointerOffsetX:a,dragInitialSourcePointerOffsetY:l}=this,c=e.getContainer(),d=c.getBoundingClientRect(),{clientX:u,clientY:h}=t,g=u-(r?.clientX||0),f=h-(r?.clientY||0),m=this.createEvent({event:t,x:u-d.left,y:h-d.top,vDirection:f>0?"down":f<0?"up":null,hDirection:g<0?"left":g>0?"right":null,initialSourcePointerOffsetX:a,initialSourcePointerOffsetY:l,dragSource:o,fromNudge:s,dragItem:i,dropZoneTarget:c,dropTarget:n?.dropTarget??null,changed:!!n?.changed});return this.lastDraggingEvent=m,m}positionDragImageComp(e){const t=this.dragImageComp?.getGui();t&&ub(t,e,this.beans)}removeDragImageComp(e){this.dragImageComp===e&&(this.dragImageComp=null),e&&(e.getGui()?.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){const t=this.createDragImageComp(e)??null;this.dragImageCompPromise=t,t?.then(s=>{if(t!==this.dragImageCompPromise||!this.lastMouseEvent||!this.isAlive()){this.destroyBean(s);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const o=this.dragImageComp;o!==s&&(this.dragImageComp=s,this.removeDragImageComp(o)),s&&(this.appendDragImageComp(s),this.updateDragImageComp())})}appendDragImageComp(e){const t=e.getGui(),s=t.style;s.position="absolute",s.zIndex="9999",this.beans.dragSvc?.hasPointerCapture()&&(s.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),s.top="20px",s.left="20px";const o=pl(this.beans);this.dragImageParent=o,o?o.appendChild(t):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:e,dragSource:t,lastDropTarget:s,lastDraggingEvent:o,dragImageLastLabel:i}=this;if(!e)return;this.setDragImageCompIcon(s?.getIconName?.(o)??null);let n=t?.dragItemName;typeof n=="function"&&(n=n(o)),n||(n=""),i!==n&&(this.dragImageLastLabel=n,e.setLabel(n))}},Sy=class extends by{createEvent(e){return X(this.gos,e)}createDragImageComp(e){const{gos:t,beans:s}=this;return j0(s.userCompFactory,X(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){L(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const s={getContainer:e,isInterestedIn:o=>o===1||o===0,getIconName:()=>"notAllowed"};this.addDropTarget(s),t.addDestroyFunc(()=>this.removeDropTarget(s))}};function kg(e,t){return e+"_"+t}function Be(e){return e instanceof vi}var vi=class extends T{constructor(e,t,s,o){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=s,this.pinned=o,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=Yo(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return kg(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){for(const e of this.displayedChildren)Be(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=ye(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;for(const t of this.displayedChildren??[])e+=t.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(const t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(const t of this.displayedChildren)e+=t.getMinWidth();return e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){for(const t of this.displayedChildren??[])fs(t)?e.push(t):Be(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])fs(t)?e.push(t):Be(t)&&t.addLeafColumns(e)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e?.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e?.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}for(const s of this.children??[]){if(Be(s)&&!s.displayedChildren?.length)continue;switch(s.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(s);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(s);break;default:this.displayedChildren.push(s);break}}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},Aa="row-group-",Nl="t-",Hl="b-",yy=0,ms=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=yy++,this.alreadyRendered=!1,this.hovered=!1,this.__selected=!1,this.beans=e}get allLeafChildren(){const e=this._leafs;return e===void 0?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:s,eventSvc:o}=this.beans,i=this.data;this.data=e,s?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,i,t);if(this.__localEventService?.dispatchEvent(n),this.sibling){this.sibling.data=e;const a=this.sibling.createDataChangedEvent(e,i,t);this.sibling.__localEventService?.dispatchEvent(a)}o.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,r.__localEventService?.dispatchEvent(r.createDataChangedEvent(e,i,t)),o.dispatchEvent({type:"rowNodeDataChanged",node:r}))}updateDataOnDetailNode(){const e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,s){return{type:"dataChanged",node:this,oldData:t,newData:e,update:s}}getRowIndexString(){return this.rowIndex==null?(be(13),null):this.rowPinned==="top"?Nl+this.rowIndex:this.rowPinned==="bottom"?Hl+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:s}=this.beans,o=s?.createDaemonNode?.(this),i=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),s&&(s.updateRowSelectable(this),s.syncInRowNode(this,o));const n=this.createDataChangedEvent(e,i,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=Fo(this.beans.gos);if(t)if(this.data){const s=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:s.length>0?s:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(Aa)&&be(14,{groupPrefix:Aa})}else this.id=void 0;else this.id=e}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");const t=e!==null;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,s){this.beans.expansionSvc?.setExpanded(this,e,t,s)}setDataValue(e,t,s){const{colModel:o,valueSvc:i,gos:n,editSvc:r}=this.beans,a=typeof e!="string"?e:o.getCol(e)??o.getColDefCol(e);if(!a)return!1;const l=i.getValueForDisplay(a,this,void 0,void 0,"api").value;if(n.get("readOnlyEdit")){const{beans:{eventSvc:d},data:u,rowIndex:h,rowPinned:g}=this;return d.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:g,column:a,colDef:a.colDef,data:u,node:this,oldValue:l,newValue:t,value:t,source:s}),!1}if(r&&!r.committing){const d=r.setDataValue({rowNode:this,column:a},t,s);if(d!=null)return d}const c=i.setValue(this,a,t,s);return this.dispatchCellChangedEvent(a,t,l),c&&this.pinnedSibling?.dispatchCellChangedEvent(a,t,l),c}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,s){const o={type:"cellChanged",node:this,column:e,newValue:t,oldValue:s};this.__localEventService?.dispatchEvent(o)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer)return this.sibling.isSelected();const e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){const t=this.childrenAfterGroup;if(t)for(let s=0,o=t.length;s<o;++s)t[s].depthFirstSearch(e);e(this)}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,s="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:s})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){(this.__localEventService??(this.__localEventService=new Bs)).addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e);const s=this.__localEventService??(this.__localEventService=new Bs);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,s);const o=this.frameworkEventListenerService?.wrap(e,t)??t;s.addEventListener(e,o)}removeEventListener(e,t){const s=this.frameworkEventListenerService?.unwrap(e,t)??t;this.removeLocalListener(e,s)}removeLocalListener(e,t){const s=this.__localEventService;s&&(s.removeEventListener(e,t),s.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(L(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t?.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){const e=this.childStore;return e?e.getFirstNode():this.childrenAfterSort?.[0]??null}};function Ry(e,t,s){return X(t,{type:s,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var xy=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_leafs","childStore","oldRowTop","sticky","treeNodeFlags","treeParent"]),Fy=(e,t)=>{const s=new ms(t);for(const o of Object.keys(e))xy.has(o)||(s[o]=e[o]);return s.oldRowTop=null,s},Ag=e=>{for(;e?.length;){const t=e[0];if(t.data)return t;e=t.childrenAfterGroup}},Lg={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},Ey=new Set(Object.values(Lg));function ns(e,t){const s=e.filterUi;if(!s)return null;if(s.created)return s.promise;if(t)return null;const o=s.create(s.refreshed),i=s;return i.created=!0,i.promise=o,o}function Dy(e,t,s,o,i,n,r){return t.refresh?.({...s,model:o,source:n,additionalEventAttributes:r}),e().then(a=>{if(a){const{filter:l,filterParams:c}=a;Og(l,c,o,i,n,r)}})}function Og(e,t,s,o,i,n){e?.refresh?.({...t,model:s,state:o,source:i,additionalEventAttributes:n})}function Ng(e,t,s){const o=e();o?.created&&o.promise.then(i=>{const n=t();Og(i,o.filterParams,n,s()??{model:n},"ui")})}function rd(e,t,s,o,i,n,r){let a,l=!1,c;switch(e){case"apply":{const d=o();c=d?.model??null,r&&(c=r(c)),a={state:d?.state,model:c},l=!0;break}case"clear":{a={model:null};break}case"reset":{a={model:null},l=!0,c=null;break}case"cancel":{a={model:s()};break}}i(a),l?n(c):Ng(t,s,o)}function Ue(e,t){return e[t]??null}function it(e){return Fi(e)}function Py(e){return{tag:"div",cls:e}}var Ty=class extends Le{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(Py(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const s=this.buttons;if(this.buttons=e,s===e)return;const o=this.getGui();at(o);let i;this.destroyListeners();const n=document.createDocumentFragment(),r=this.className,a=({type:c,label:d})=>{const u=w=>{this.dispatchLocalEvent({type:c,event:w})};["apply","clear","reset","cancel"].includes(c)||L(75);const h=c==="apply",f=it({tag:"button",attrs:{type:h&&t?"submit":"button"},ref:`${c}FilterButton`,cls:`ag-button ag-standard-button ${r}-button${h?" "+r+"-apply-button":""}`,children:d});this.activateTabIndex([f]),h&&(i=f);const m=w=>{w.key===D.ENTER&&(w.preventDefault(),u(w))},v=this.listeners;f.addEventListener("click",u),v.push(()=>f.removeEventListener("click",u)),f.addEventListener("keydown",m),v.push(()=>f.removeEventListener("keydown",m)),n.append(f)};for(const c of e)a(c);this.eApply=i;const l=this.validationTooltipFeature;i&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!i&&l&&(this.validationTooltipFeature=this.destroyBean(l)),o.append(n)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const s=this.eApply;s&&(hi(s,e===!1),this.validationMessage=t??null,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},My={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",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`};function ds(e,t,s){return gb(e,My,t,s)}function Gl(e,t){const{debounceMs:s}=e;return or(e)?(s!=null&&L(71),0):s??t}function or(e){return(e.buttons?.indexOf("apply")??-1)>=0}var Iy=class extends Le{constructor(e,t,s,o,i,n){super(),this.column=e,this.wrapper=t,this.eventParent=s,this.updateModel=o,this.isGlobalButtons=i,this.enableGlobalButtonCheck=n,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,s=t,o=s.useForm,i=o?"form":"div";this.setTemplate({tag:i,cls:"ag-filter-wrapper"}),o&&this.addManagedElementListeners(this.getGui(),{submit:n=>{n?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=s,this.resetButtonsPanel(s),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:n,params:r})=>{n===this.column&&this.resetButtonsPanel(r,this.params)},filterStateChanged:({column:n,state:r})=>{n===this.column&&this.eButtons?.updateValidity(r.valid!==!1)},filterAction:({column:n,action:r,event:a})=>{n===this.column&&this.afterAction(r,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:n})=>{if(n!==this.isGlobalButtons){this.isGlobalButtons=n;const r=this.params;this.resetButtonsPanel(r,r,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,s){const{buttons:o,readOnly:i}=t??{},{buttons:n,readOnly:r,useForm:a}=e;if(!s&&i===r&&di(o,n))return;const l=n&&n.length>0&&!e.readOnly&&!this.isGlobalButtons;let c=this.eButtons;if(l){const d=n.map(u=>{const h=`${u}Filter`;return{type:u,label:ds(this,h)}});if(this.applyActive=or(this.params),!c){c=this.createBean(new Ty),this.appendChild(c.getGui());const u=this.column,h=g=>({event:f})=>{this.updateModel(u,g,{fromButtons:!0}),this.afterAction(g,f)};c?.addManagedListeners(c,{apply:h("apply"),clear:h("clear"),reset:h("reset"),cancel:h("cancel")}),this.eButtons=c}c.updateButtons(d,a)}else this.applyActive=!1,c&&(hs(c.getGui()),this.eButtons=this.destroyBean(c))}close(e){const t=this.hidePopup;if(!t)return;const s=e,o=s?.key;let i;(o===D.ENTER||o===D.SPACE)&&(i={keyboardEvent:s}),t(i),this.hidePopup=null}afterAction(e,t){const{params:s,applyActive:o}=this,i=s?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),i&&o&&this.close(t);break}case"reset":{i&&o&&this.close();break}case"cancel":{i&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===D.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},ky={tag:"div",cls:"ag-filter"},Ay=class extends Le{constructor(e,t,s){super(ky),this.column=e,this.source=t,this.enableGlobalButtonCheck=s,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??fe.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:s,beans:{colFilter:o}}=this,i=o.getFilterUiForDisplay(t)??null;this.wrapper=i,i?.then(n=>{if(!n)return;const{isHandler:r,comp:a}=n;let l;if(r){const c=!!this.enableGlobalButtonCheck,d=this.createBean(new Iy(t,n,o,o.updateModel.bind(o),c&&o.isGlobalButtons,c));this.comp=d,l=d.getGui()}else l=a.getGui(),V(l)||L(69,{guiFromFilter:l});this.appendChild(l),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:s,eGui:this.getGui()}):a.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:s}=e;(t==="api"||t==="paramsUpdated")&&s.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(at(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},ad={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},ld=["january","february","march","april","may","june","july","august","september","october","november","december"];function Ly(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function cd(e){return e instanceof Date&&!isNaN(e.getTime())}var La={number:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate:cd}),dateString:({dataTypeDefinition:e})=>({comparator:(t,s)=>{const o=e.dateParser(s);return s==null||o<t?-1:o>t?1:0},isValidDate:t=>typeof t=="string"&&cd(e.dateParser(t))}),dateTime:e=>La.date(e),dateTimeString:e=>La.dateString(e),object:()=>{},text:()=>{}},Oa={number:()=>({comparator:Ly}),boolean:({t:e})=>({valueFormatter:t=>V(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:s=>{const o=e(s);return V(o)?o:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(s,o)=>{if(s==="NaN")return t("invalidDate","Invalid Date");if(o===1&&s!=null){const i=ld[Number(s)-1];return t(i,ad[i])}return s??t("blanks","(Blanks)")},treeListPathGetter:s=>Gi(s,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:s})=>({valueFormatter:o=>{const i=e(o);return V(i)?i:s("blanks","(Blanks)")},treeList:!0,treeListPathGetter:o=>Gi(t.dateParser(o??void 0),!1),treeListFormatter:(o,i)=>{if(i===1&&o!=null){const n=ld[Number(o)-1];return s(n,ad[n])}return o??s("blanks","(Blanks)")}}),dateTime:e=>{const t=Oa.date(e);return t.treeListPathGetter=Gi,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,s=Oa.dateString(e);return s.treeListPathGetter=o=>Gi(t(o??void 0)),s},object:({formatValue:e,t})=>({valueFormatter:s=>{const o=e(s);return V(o)?o:t("blanks","(Blanks)")}}),text:()=>{}};function Oy(e,t,s,o,i,n,r){let a=t,l=s;const c=e==="agSetColumnFilter";!l&&o.baseDataType==="object"&&!c&&(l=({column:g,node:f})=>i({column:g,node:f,value:n.valueSvc.getValue(g,f)}));const u=(c?Oa:La)[o.baseDataType],h=u({dataTypeDefinition:o,formatValue:i,t:r});return a=typeof t=="object"?{...h,...t}:h,{filterParams:a,filterValueGetter:l}}var Ny={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},Hy={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function Gy(e,t=!1){return(t?Hy:Ny)[e??"text"]}var Hg="ag-resizer-wrapper",rs=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),Vy={tag:"div",cls:Hg,children:[rs("eTopLeft","topLeft"),rs("eTop","top"),rs("eTopRight","topRight"),rs("eRight","right"),rs("eBottomRight","bottomRight"),rs("eBottom","bottom"),rs("eBottomLeft","bottomLeft"),rs("eLeft","left")]},By=class extends T{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){const{clientHeight:t,clientWidth:s}=this.offsetParent,o=s/2-this.getWidth()/2,i=t/2-this.getHeight()/2;this.offsetElement(o,i,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:s,minWidth:o,width:i,minHeight:n,height:r,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let c=0,d=0;const u=Jt(this.element);if(u){const h=this.findBoundaryElement(),g=window.getComputedStyle(h);if(g.minWidth!=null){const f=h.offsetWidth-this.element.offsetWidth;d=Number.parseInt(g.minWidth,10)-f}if(g.minHeight!=null){const f=h.offsetHeight-this.element.offsetHeight;c=Number.parseInt(g.minHeight,10)-f}}if(this.minHeight=n||c,this.minWidth=o||d,i&&this.setWidth(i),r&&this.setHeight(r),(!i||!r)&&this.refreshSize(),t)this.center(e);else if(a||l)this.offsetElement(a,l,e);else if(u&&s){let h=this.boundaryEl,g=!0;if(h||(h=this.findBoundaryElement(),g=!1),h){const f=Number.parseFloat(h.style.top),m=Number.parseFloat(h.style.left);g?this.offsetElement(isNaN(m)?0:m,isNaN(f)?0:f,e):this.setPosition(m,f)}}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 s=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(s),this.moveElementDragListener=s):(this.dragSvc?.removeDragSource(s),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 o=!!e[t],i=this.getResizerElement(t),n={dragStartPixels:0,eElement:i,onDragStart:r=>this.onResizeStart(r,t),onDragging:this.onResize.bind(this),onDragStop:r=>this.onResizeEnd(r,t)};(o||!this.isAlive()&&!o)&&(o?(this.dragSvc?.addDragSource(n),this.resizeListeners.push(n),i.style.pointerEvents="all"):i.style.pointerEvents="none",this.resizable[t]=o)})}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,s=this.element;let o=!1;if(typeof e=="string"&&e.includes("%"))Qo(s,e),e=yh(s),o=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const i=this.getAvailableHeight();i&&e>i&&(e=i)}this.getHeight()!==e&&(o?(s.style.maxHeight="unset",s.style.minHeight="unset"):t?Qo(s,e):(s.style.height=`${e}px`,s.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:Number.parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:s}=this.offsetParent;if(!s)return null;const o=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:o.top,r=e?0:i.top;let a=0;if(t){const c=this.element.parentElement;if(c){const{bottom:d}=c.getBoundingClientRect();a=d-o.bottom}}return s+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:s}=this.config;let o=!1;if(typeof e=="string"&&e.includes("%"))Nt(t,e),e=vn(t),o=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:i}=this.offsetParent,n=s?this.position.x:this.element.getBoundingClientRect().left;i&&e+n>i&&(e=i-n)}this.getWidth()!==e&&(o?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Nt(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,s){const{forcePopupParentAsOffsetParent:o}=this.config,i=o?this.boundaryEl:this.element;i&&(this.popupSvc?.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:s}),this.setPosition(Number.parseFloat(i.style.left),Number.parseFloat(i.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const s=this.getAvailableHeight();this.element.style.setProperty("max-height",`${s}px`)};e&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=es(this.beans,this.popupSvc?.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:s,isTop:o,anywhereWithin:i,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!s,!!i,r)?0:r,c=this.shouldSkipY(t,!!o,n,a)?0:a;return{movementX:l,movementY:c}}shouldSkipX(e,t,s,o){const i=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:i.left;let l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return l?!0:(t?l=o<0&&e.clientX>a+n.left||o>0&&e.clientX<a+n.left:s?l=o<0&&e.clientX>r.right||o>0&&e.clientX<a+n.left:l=o<0&&e.clientX>r.right||o>0&&e.clientX<r.right,l)}shouldSkipY(e,t,s=0,o){const i=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:i.top;let l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return l?!0:(t?l=o<0&&e.clientY>a+n.top+s||o>0&&e.clientY<a+n.top:l=o<0&&e.clientY>r.bottom||o>0&&e.clientY<r.bottom,l)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(it(Vy)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${Hg}`)?.remove(),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:s,forcePopupParentAsOffsetParent:o}=this.config;!s&&!o&&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(s=>!s.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,s=0;for(let o=0;o<e.length;o++){const i=e[o],n=!!i.style.flex&&i.style.flex!=="0 0 auto";if(i===this.element)continue;let r=this.minHeight||0,a=this.minWidth||0;if(n){const l=window.getComputedStyle(i);l.minHeight&&(r=Number.parseInt(l.minHeight,10)),l.minWidth&&(a=Number.parseInt(l.minWidth,10))}else r=i.offsetHeight,a=i.offsetWidth;t+=r,s+=a}return{height:t,width:s}}applySizeToSiblings(e){let t=null;const s=this.getSiblings();if(s){for(let o=0;o<s.length;o++){const i=s[o];i!==t&&(e?i.style.height=`${i.offsetHeight}px`:i.style.width=`${i.offsetWidth}px`,i.style.flex="0 0 auto",i===this.element&&(t=s[o+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:s}=this.config,{isTop:o,isRight:i,isBottom:n,isLeft:r}=this.currentResizer,a=i||r,l=n||o,{movementX:c,movementY:d}=this.calculateMouseMovement({e,isLeft:r,isTop:o}),u=this.position.x,h=this.position.y;let g=0,f=0;if(a&&c){const m=r?-1:1,v=this.getWidth(),w=v+c*m;let b=!1;r&&(g=v-w,(u+g<=0||w<=this.minWidth)&&(b=!0,g=0)),b||this.setWidth(w)}if(l&&d){const m=o?-1:1,v=this.getHeight(),w=v+d*m;let b=!1;o?(f=v-w,(h+f<=0||w<=this.minHeight)&&(b=!0,f=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&v<w&&this.getMinSizeOfSiblings().height+w>this.element.parentElement.offsetHeight&&(b=!0),b||this.setHeight(w)}this.updateDragStartPosition(e.clientX,e.clientY),((t||s)&&g||f)&&this.offsetElement(u+g,h+f)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:s}=this.position;let o;this.config.calculateTopBuffer&&(o=this.config.calculateTopBuffer());const{movementX:i,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:o});this.offsetElement(t+i,s+n),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.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.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},Gg="__ag_Grid_Stop_Propagation";function Us(e){e[Gg]=!0}function Zt(e){return e[Gg]===!0}var zy="ag-focus-managed",Oo=class extends T{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:s=>{if(s.defaultPrevented)return;const o=Qs(this.beans,this.eFocusable,!1,s.shiftKey);o&&(o.focus(),s.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:s}}=this;e.classList.add(zy),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),s&&this.addManagedElementListeners(e,{focusout:s})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||Zt(t))return;const{callbacks:s}=this;if(s.shouldStopEventPropagation(t)){Us(t);return}t.key===D.TAB?s.onTabKeyDown(t):s.handleKeyDown&&s.handleKeyDown(t)}})}},Wy=class extends Le{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){const e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new Oo(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new By(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}refresh(e){const t=e,s=this.params;this.params=t,t.source==="colDef"&&this.updateParams(t,s);const i=t.state,n=this.state;return this.state=i,(i.model!==n.model||i.state!==n.state)&&this.setModelIntoUi(i.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=or(e),this.setupApplyDebounced()}doesFilterPass(e){L(283);const{getHandler:t,model:s,column:o}=this.params;return t().doesFilterPass({...e,model:s,handlerParams:this.beans.colFilter.getHandlerParams(o)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return L(284),this.params.model!=null}setupApplyDebounced(){const e=Gl(this.params,this.defaultDebounceMs),t=Ye(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return L(285),this.params.model}setModel(e){L(286);const{beans:t,params:s}=this;return t.colFilter.setModelForColumnLegacy(s.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){const{params:t,state:s}=this,o=!this.areModelsEqual(t.model,s.model);return o&&t.onAction("apply",e),o}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const s=this.getModelFromUi(),o={model:s,state:this.getState(),valid:this.canApply(s)};this.state=o;const i=this.params;i.onStateChange(o),i.onUiChange(this.getUiChangeEventParams()),this.gos.get("enableFilterHandlers")||this.eventSvc.dispatchEvent({type:"filterModified",column:i.column,filterInstance:this}),e??(e=this.applyActive?void 0:"debounce"),e==="immediately"?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):e==="debounce"&&this.applyDebounced()}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:s}=this;if(!t)return;const o=e==="floatingFilter"||e==="columnFilter";o?(t.restoreLastSize(),t.setResizable(s.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(o)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e){return ds(this,e)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}};function Vg(e){return!!e.operator}function _y(e,t,s){if(t==null)return null;let o=null;const{compName:i,jsComp:n,fwComp:r}=hg(e,t);return i?o={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[i]:n==null&&r==null&&t.filter===!0&&(o=s()),o}var nn={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},Vl=class extends T{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},s=t.autoHeight?nn.AUTO_HEIGHT:t.print?nn.PRINT:nn.NORMAL;this.view.updateLayoutClasses(s,t)}},as="Viewport",dd="fakeVScrollComp",Gr=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],ud=100,Vr=150,jy=class extends T{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=Ye(this,()=>this.lastScrollSource[1]=null,Vr),this.resetLastVScrollDebounced=Ye(this,()=>this.lastScrollSource[0]=null,Vr)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,s=>{this.centerRowsCtrl=s.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,as)});for(const e of Gr){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),s=t?Ye(this,this.onVScroll.bind(this,as),ud):this.onVScroll.bind(this,as),o=t?Ye(this,this.onVScroll.bind(this,dd),ud):this.onVScroll.bind(this,dd);this.addManagedElementListeners(this.eBodyViewport,{scroll:s}),this.registerScrollPartner(e,o)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...Gr,as]){if(this.lastScrollSource[1]===t)continue;const s=this.getViewportForSource(t);bn(s,e,this.enableRtl)}}getViewportForSource(e){return e===as?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:s}=t;if(this.shouldBlockScrollUpdate(1,s,!0))return;const o=wn(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(o),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===as?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:s}=this;s?.setScrollTop(t),this.nextScrollTop=t,e===as?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,s?.active?s.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},Vr)}shouldBlockScrollUpdate(e,t,s=!1){return s&&!Ls()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=fl(this.eBodyViewport),{scrollHeight:s}=this.eBodyViewport;return e<0||e+t>s}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:s}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>s}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){const e=this.scrollLeft;let t=!1;for(const s of Gr)if(this.getViewportForSource(s).scrollLeft!==e){t=!0;break}t&&this.onHScroll(as)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const o=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:o:e=Math.min(Math.max(e,0),o)),bn(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:s,lastScrollTop:o}=this;return{top:o,bottom:o+s}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}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.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:s}=this.beans,o=s.getRowCount();let i=-1;for(let n=0;n<o;n++){const r=s.getRow(n);if(typeof e=="function"){if(r&&e(r)){i=n;break}}else if(e===r||e===r.data){i=n;break}}i>=0&&this.ensureIndexVisible(i,t)}ensureIndexVisible(e,t,s=0){if(Ze(this.gos,"print"))return;const{rowModel:o}=this.beans,i=o.getRowCount();if(typeof e!="number"||e<0||e>=i){L(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:r,rowContainerHeight:a,rowRenderer:l}=this.beans;n.wrapIncoming(()=>{const c=this.ctrlsSvc.getGridBodyCtrl(),d=o.getRow(e);let u,h,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:f,stickyBottomHeight:m}=c,v=d.rowTop,w=d.rowHeight,b=r.getPixelOffset(),S=d.rowTop-b,R=S+d.rowHeight,y=this.getVScrollPosition(),x=a.divStretchOffset,F=y.top+x,P=y.bottom+x,M=P-F,A=a.getScrollPositionForPixel(S),E=a.getScrollPositionForPixel(R-M),I=Math.min((A+E)/2,S),O=F+f>S,K=P-m<R;let N=null;t==="top"?N=A-f:t==="bottom"?N=E+m:t==="middle"?N=I:O?N=A-f:K&&(E-A>M?N=A-f:N=E+m),N!==null&&(this.setVerticalScrollPosition(N),l.redraw({afterScroll:!0})),u=v!==d.rowTop||w!==d.rowHeight,h=f!==c.stickyTopHeight||m!==c.stickyBottomHeight,g++}while((u||h)&&g<10);if(this.animationFrameSvc?.flushAllFrames(),s<10&&(d?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const f=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const m=this.getVScrollPosition().top;f!==m&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=o.getRowCount())&&this.ensureIndexVisible(e,t,s+1)}})}})}clearRetryListeners(){for(const e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:s,frameworkOverrides:o}=this.beans,i=s.getCol(e);if(!i||i.isPinned()||!this.visibleCols.isColDisplayed(i))return;const n=this.getPositionedHorizontalScroll(i,t);o.wrapIncoming(()=>{n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:s,columnAfterEnd:o}=this.isColumnOutsideViewport(e),i=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?s:o)||i,l=r?o:s;t!=="auto"&&(a=t==="start",l=t==="end");const c=t==="middle";if(a||l||c){const{colLeft:d,colMiddle:u,colRight:h}=this.getColumnBounds(e);return c?u-n/2:a?r?h:d:r?d-n:h-n}return null}isColumnOutsideViewport(e){const{start:t,end:s}=this.getViewportBounds(),{colLeft:o,colRight:i}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>i:s<i,a=n?s<o:t>o;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,s=this.visibleCols.bodyWidth,o=e.getActualWidth(),i=e.getLeft(),n=t?-1:1,r=t?s-i:i,a=r+o*n,l=r+o/2*n;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),s=t,o=e+t;return{start:s,end:o,width:e}}},Bl=class extends T{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=Ze(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:s}=this.beans,o=t.bodyWidth,i=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=o+i+n:(r=o,this.addSpacer&&(this.gos.get("enableRtl")?i:n)===0&&s.verticalScrollShowing&&(r+=s.getScrollbarWidth())),this.callback(r)}},Uy=class extends T{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:s}=this,o=()=>{ts(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(o),s.registerBodyViewportResizeListener(o)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const s=this.centerContainerCtrl.getCenterWidth();s!==this.centerWidth&&(this.centerWidth=s,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=fl(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function rn(e,t,s,o){const i=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return Bg(e,t,s,o,i)}function $y(e,t,s,o){const i=t?.suppressMouseEventHandling;return Bg(e,void 0,s,o,i)}function Bg(e,t,s,o,i){return i?i(X(e,{column:t,node:s,event:o})):!1}function zg(e,t,s){let o=t;for(;o;){const i=_h(e,o,s);if(i)return i;o=o.parentElement}return null}var Ln="cellCtrl";function zl(e,t){return zg(e,t,Ln)}var On="renderedRow";function Ky(e,t){return zg(e,t,On)}function Na(e,t,s,o,i){const n=o?o.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=X(e,{event:t,editing:i,column:o,node:s,data:s.data,colDef:o.getColDef()});return!!(n&&n(r))}function qy(e){const{pinnedRowModel:t,rowModel:s}=e,[o,i]=[t?.isEmpty("top")??!0,t?.isEmpty("bottom")??!0],n=o?null:"top";let r,a;i?(r=null,a=s.getRowCount()-1):(r="bottom",a=t?.getPinnedBottomRowCount()??-1);const{visibleCols:l,rangeSvc:c}=e,d=l.allCols;!c||!d?.length||c.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:a,rowEndPinned:r})}var Yy=65,Zy=67,Qy=86,Xy=68,Jy=90,eR=89;function tR(e){const{keyCode:t}=e;let s;switch(t){case Yy:s=D.A;break;case Zy:s=D.C;break;case Qy:s=D.V;break;case Xy:s=D.D;break;case Jy:s=D.Z;break;case eR:s=D.Y;break;default:s=e.code}return s}var sR=class extends T{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){const t=["dblclick","contextmenu","mouseover","mouseout","click",Dh("touchstart")?"touchstart":"mousedown"];for(const s of t){const o=this.processMouseEvent.bind(this,s);this.addManagedElementListeners(this.element,{[s]:o})}}processMouseEvent(e,t){if(!pi(this.beans,t)||Zt(t))return;const{cellCtrl:s,rowCtrl:o}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(s?.column&&s.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,o,s)):(s&&s.onMouseEvent(e,t),o&&o.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:zl(t,e),rowCtrl:Ky(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:s,rowCtrl:o}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(s?this.processCellKeyboardEvent(s,e,t):o?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(o,e,t))}processCellKeyboardEvent(e,t,s){const o=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!Na(this.gos,s,e.rowNode,e.column,o)&&t==="keydown"&&(!o&&this.beans.navigation?.handlePageScrollingKey(s)||e.onKeyDown(s),this.doGridOperations(s,o),Cg(s)&&e.processCharacter(s)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(s,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,s){const{rowNode:o}=e,{focusSvc:i,navigation:n}=this.beans,a=i.getFocusedCell()?.column;if(!Na(this.gos,s,o,a,!1)){const c=s.key;if(t==="keydown")switch(c){case D.PAGE_HOME:case D.PAGE_END:case D.PAGE_UP:case D.PAGE_DOWN:n?.handlePageScrollingKey(s,!0);break;case D.LEFT:case D.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case D.UP:case D.DOWN:e.onKeyboardNavigate(s);break;case D.TAB:e.onTabKeyDown(s);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",s))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!pi(this.beans,e))return;const s=tR(e),{clipboardSvc:o,undoRedo:i}=this.beans;if(s===D.A)return this.onCtrlAndA(e);if(s===D.C)return this.onCtrlAndC(o,e);if(s===D.D)return this.onCtrlAndD(o,e);if(s===D.V)return this.onCtrlAndV(o,e);if(s===D.X)return this.onCtrlAndX(o,e);if(s===D.Y)return this.onCtrlAndY(i);if(s===D.Z)return this.onCtrlAndZ(i,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:s,selectionSvc:o},gos:i}=this;s&&ps(i)&&!Kb(i)&&t.isRowsToRender()?qy(this.beans):o&&o.selectAllRowNodes({source:"keyboardSelectAll",selectAll:Yh(i)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:s}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(s,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:s}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(s,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:s}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(s,{withOpenEditor:!0})||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},Wg=class extends T{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,s=t!=null?`${t}px`:"";this.eContainer.style.height=s,this.eViewport&&(this.eViewport.style.height=s)}},zi=e=>e.topRowCtrls,Wi=e=>e.getStickyTopRowCtrls(),_i=e=>e.getStickyBottomRowCtrls(),ji=e=>e.bottomRowCtrls,Ui=e=>e.allRowCtrls,Br=e=>e.getCtrls("top"),zr=e=>e.getCtrls("center"),Wr=e=>e.getCtrls("bottom"),oR={center:{type:"center",name:"center-cols",getRowCtrls:Ui,getSpannedRowCtrls:zr},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:Ui,getSpannedRowCtrls:zr},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:Ui,getSpannedRowCtrls:zr},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:Ui},topCenter:{type:"center",name:"floating-top",getRowCtrls:zi,getSpannedRowCtrls:Br},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:zi,getSpannedRowCtrls:Br},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:zi,getSpannedRowCtrls:Br},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:zi},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Wi},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Wi},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Wi},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Wi},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:_i},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:_i},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:_i},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:_i},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:ji,getSpannedRowCtrls:Wr},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:ji,getSpannedRowCtrls:Wr},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:ji,getSpannedRowCtrls:Wr},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:ji}};function _g(e){return`ag-${Ti(e).name}-viewport`}function an(e){const t=Ti(e);return t.container??`ag-${t.name}-container`}function iR(e){return`ag-${Ti(e).name}-spanned-cells-container`}function Ti(e){return oR[e]}var nR=["topCenter","topLeft","topRight"],rR=["bottomCenter","bottomLeft","bottomRight"],aR=["center","left","right"],lR=["center","left","right","fullWidth"],cR=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],dR=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],uR=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],jg=["stickyTopCenter","stickyTopLeft","stickyTopRight"],Ug=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],hR=[...jg,"stickyTopFullWidth",...Ug,"stickyBottomFullWidth"],gR=[...nR,...rR,...aR,...jg,...Ug],pR=class extends T{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=Ti(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Uy(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,s,o){this.comp=e,this.eContainer=t,this.eSpannedContainer=s,this.eViewport=o,this.createManagedBean(new sR(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:i,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(dR,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(uR,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(lR,()=>this.createManagedBean(new Wg(this.eContainer,this.name==="center"?o:void 0))),n&&this.forContainers(gR,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(cR,()=>this.createManagedBean(new Bl(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans,s=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:s,displayedColumnsWidthChanged:s,displayedRowsChanged:o=>this.onDisplayedRowsChanged(o.afterScroll)}),s(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const o=this.options.getSpannedRowCtrls(e);o&&this.comp.setSpannedRowCtrls(o,!1)}})}listenOnDomOrder(){if(hR.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const s=this.gos.get("ensureDomOrder"),o=Ze(this.gos,"print");this.comp.setDomOrder(s||o)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=s=>{e.dragging&&s.cancelable&&s.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),s=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,s,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return gi(this.eViewport)}getCenterViewportScrollLeft(){return wn(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=es(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return xh(this.eViewport)}getViewportScrollLeft(){return wn(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||Cl(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){bn(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const s=Ze(this.gos,"print"),i=this.gos.get("embedFullWidthRows")||s,n=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!i&&a:i||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},fR="ag-force-vertical-scroll",mR="ag-selectable",CR="ag-column-moving",vR=class extends T{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,s,o,i,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=s,this.eTop=o,this.eBottom=i,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=s.querySelector(`.${_g("center")}`),this.eFullWidthContainer=s.querySelector(`.${an("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${an("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${an("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new Vl(this.comp)),this.scrollFeature=this.createManagedBean(new jy(s)),this.beans.rowDragSvc?.setupRowDrag(s,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([o,s,i,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(o),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),s=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:s,rowResizeEnded:s}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const s=t&&e.getScrollbarWidth()||0,o=mg()?16:0,i=`calc(100% + ${s+o}px)`;ts(this.beans,()=>this.comp.setBodyViewportWidth(i)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let s=this.gos.get("treeData");if(!s){const o=t.isPivotMode();s=(e?e.columns.length:0)>=(o?2:1)}this.comp.setGridRootRole(s?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:s=>{const{target:o}=s,i=Ms(o,"ag-root",t);t.classList.toggle("ag-has-focus",!i)},focusout:s=>{const{target:o,relatedTarget:i}=s,n=t.contains(i),r=Ms(i,"ag-root",t);Ms(o,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(CR,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(mR,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,s=t.isLastRowIndexKnown()?t.getRowCount():-1,o=s===-1?-1:e+s;this.comp.setRowCount(o)}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?fR:null,s=Ze(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||s&&Fh(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let s=t.sizesMeasured;const o=()=>{const i=s&&po(this.gos)&&!e.stretching,n=i?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,i)};o(),this.addManagedEventListeners({heightScaleChanged:o}),this.addManagedPropertyListener("animateRows",o),this.addManagedEventListeners({gridStylesChanged:()=>{!s&&t.sizesMeasured&&(s=!0,o())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:s,eTop:o,eBottom:i,beans:{popupSvc:n,touchSvc:r}}=this,a=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:a}),r?.mockBodyContextMenu(this,a),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});const l=this.onStickyWheel.bind(this);for(const d of[t,s,o,i])this.addManagedElementListeners(d,{wheel:l});const c=this.onHorizontalWheel.bind(this);for(const d of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(d).eContainer,{wheel:c});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:s,shiftKey:o}=e;(o||Math.abs(t)>Math.abs(s))&&pi(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:s,shiftKey:o}=e;(o||Math.abs(t)>Math.abs(s))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:s}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||s})}onBodyViewportContextMenu(e,t,s){if(!e&&!s)return;this.gos.get("preventDefaultOnContextMenu")&&(e||s).preventDefault();const{target:o}=e||t;(o===this.eBodyViewport||o===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:s,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e,beans:{environment:t}}=this,s=e?.getPinnedTopTotalHeight(),o=e?.getPinnedBottomTotalHeight(),i=t.getPinnedRowBorderWidth(),n=t.getRowBorderWidth(),r=i-n,a=s?r+s:0,l=o?r+o:0;this.comp.setTopHeight(a),this.comp.setBottomHeight(l),this.comp.setTopInvisible(a<=0),this.comp.setBottomInvisible(l<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),s=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let o=0;t>0&&(o+=t),s>0&&(o+=s),o>0&&(o+=1),this.comp.setStickyTopTop(`${o}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:s}=this,o=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=o+n;s.setStickyBottomBottom(`${r}px`)}};function wR(e,t){return zl(e,t.target)?.getFocusedCellPosition()??null}function hd(e,t){const s=Ze(e.gos,"normal"),o=t;let i,n;o.clientX!=null||o.clientY!=null?(i=o.clientX,n=o.clientY):(i=o.x,n=o.y);const{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(n+=r,s){const a=e.ctrlsSvc.getScrollFeature(),l=a.getVScrollPosition(),c=a.getHScrollPosition();i+=c.left,n+=l.top}return{x:i,y:n}}var $g=class extends Le{constructor(e,t){super(),this.direction=t,this.eViewport=Z,this.eContainer=Z,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",pg()||Ls())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=mg(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),s=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:s,touchend:s})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),ts(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;bb(this,()=>Jt(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},bR={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},SR=class extends $g{constructor(){super(bR,"horizontal"),this.eLeftSpacer=Z,this.eRightSpacer=Z,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new Bl(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const s=!this.enableRtl&&e,o=this.scrollVisibleSvc.getScrollbarWidth();s&&(t+=o),Nt(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=o);let i=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(i+=o),Nt(this.eLeftSpacer,i),this.eLeftSpacer.classList.toggle("ag-scroller-corner",i<=o)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,s=this.gos.get("suppressHorizontalScroll"),o=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=s?0:o===0&&t?16:o,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),Qo(this.getGui(),n),Qo(this.eViewport,n),Qo(this.eContainer,n),n||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return wn(this.eViewport,this.enableRtl)}setScrollPosition(e){Jt(this.eViewport)||this.attemptSettingScrollPosition(e),bn(this.eViewport,e,this.enableRtl)}},yR={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},RR=class extends $g{constructor(){super(yR,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new Wg(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,s=this.invisibleScrollbar,o=t&&e.getScrollbarWidth()||0,i=o===0&&s?16:o;this.toggleCss("ag-scrollbar-invisible",s),Nt(this.getGui(),i),Nt(this.eViewport,i),Nt(this.eContainer,i),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const s=e.getGridBodyCtrl().eBodyViewport,o=this.getScrollPosition(),i=s.scrollTop;o!=i&&this.setScrollPosition(i,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!Jt(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},xR="ag-column-first",FR="ag-column-last";function Kg(e,t,s,o){return Ie(e)?[]:DR(e.headerClass,e,t,s,o)}function qg(e,t,s){e.toggleCss(xR,s.isColAtEdge(t,"first")),e.toggleCss(FR,s.isColAtEdge(t,"last"))}function ER(e,t,s,o){return X(t,{colDef:e,column:s,columnGroup:o})}function DR(e,t,s,o,i){if(Ie(e))return[];let n;if(typeof e=="function"){const r=ER(t,s,o,i);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}function PR(e,t,s){t.addManagedElementListeners(s,{keydown:o=>{if(!o.defaultPrevented&&o.key===D.TAB){const i=o.shiftKey;Qs(e,s,!1,i)||Po(e,i)&&o.preventDefault()}}})}function TR(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function Os(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.isExclusive()}function ir(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.isExclusive()}function Po(e,t,s=!1){const o=e.ctrlsSvc.get("gridCtrl");return!s&&o.focusNextInnerContainer(t)?!0:((s||!t&&!o.isDetailGrid())&&o.forceFocusOutOfContainer(t),!1)}function Lt(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function Wl(e){const t=[],s=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const o of s){if(!o)continue;const i=o.getGroupRowCount()||0;for(let n=0;n<i;n++){const r=o.getGroupRowCtrlAtIndex(n),a=t[n];if(r){const l=MR(e,r);(a==null||l>a)&&(t[n]=l)}}}return t}function MR(e,t){let o=e.colModel.isPivotMode()?kR(e):Zg(e);const i=t.getHeaderCellCtrls();for(const n of i){const{column:r}=n,a=r.getAutoHeaderHeight();a!=null&&a>o&&r.isAutoHeaderHeight()&&(o=a)}return o}function _l(e){let s=e.colModel.isPivotMode()?IR(e):Mi(e);return e.colModel.forAllCols(o=>{const i=o.getAutoHeaderHeight();i!=null&&i>s&&o.isAutoHeaderHeight()&&(s=i)}),s}function Mi(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function Yg(e){return e.gos.get("floatingFiltersHeight")??Mi(e)}function Zg(e){return e.gos.get("groupHeaderHeight")??Mi(e)}function IR(e){return e.gos.get("pivotHeaderHeight")??Mi(e)}function kR(e){return e.gos.get("pivotGroupHeaderHeight")??Zg(e)}function AR(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}var LR=class extends T{setComp(e,t,s){this.comp=e,this.eGui=t;const{beans:o}=this,{headerNavigation:i,touchSvc:n,ctrlsSvc:r}=o;i&&this.createManagedBean(new Oo(s,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,o),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,o)}),this.onPivotModeChanged(o),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),n?.mockHeaderContextMenu(this,a),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>ts(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const s=Wl(e).reduce((n,r)=>n+r,0),o=_l(e);if(e.filterManager?.hasFloatingFilters()&&(t+=Yg(e)),t+=s,t+=o,this.headerHeight===t)return;this.headerHeight=t;const i=`${t+1}px`;this.comp.setHeightAndMinHeight(i),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const s=e.visibleCols.allCols.some(o=>o.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",s)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),s=e.shiftKey,o=s!==t?"LEFT":"RIGHT",{beans:i}=this,{headerNavigation:n,focusSvc:r}=i;(n.navigateHorizontally(o,!0,e)||!s&&r.focusOverlay(!1)||Po(i,s,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:s}=this.beans;switch(e.key){case D.LEFT:t="LEFT";case D.RIGHT:{V(t)||(t="RIGHT"),s.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case D.UP:t="UP";case D.DOWN:{V(t)||(t="DOWN"),s.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:s,beans:o}=this;!t&&s.contains(Ae(o))||s.contains(t)||(o.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,s){const{menuSvc:o,ctrlsSvc:i}=this.beans;if(!e&&!s||!o?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===i.getHeaderRowContainerCtrl()?.eViewport)&&o.showHeaderContextMenu(void 0,e,s)}},jl=class extends T{constructor(e,t,s,o){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=o,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=s}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?ye(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,s=e.get("suppressColumnMoveAnimation"),o=V(this.columnOrGroup.getOldLeft());t?.isActive()&&o&&!s?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),s=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=s,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===s&&this.setLeft(s)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:s,visibleCols:o}=this.beans;if(!Ze(s,"print")||e.getPinned()==="left")return t;const n=o.getColsLeftWidth();if(e.getPinned()==="right"){const r=o.bodyWidth;return n+r+t}return n+t}setLeft(e){if(V(e)&&(this.eCell.style.left=`${e}px`),Be(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&Q1(this.ariaEl,t.length)}}},OR=0,Qg="headerCtrl",Ul=class extends T{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.reAttemptToFocus=!1,this.instanceId=e.getUniqueId()+"-"+OR++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,s,o,i){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,s,o,i),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:s}=this.beans.focusSvc.focusedHeader,o=s.getDefinition(),i=o?.suppressHeaderKeyboardEvent;if(!V(i))return!1;const n=X(this.gos,{colDef:o,column:s,headerRowIndex:t,event:e});return!!i(n)}getWrapperHasFocus(){return Ae(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let s;if(typeof t=="function"){const o=this.getHeaderClassParams();s=t(o)}else s=t;s&&this.comp.setUserStyles(s)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:s,compBean:o}=e,{beans:i}=this,n=u=>{if(!this.isAlive()||!o.isAlive())return;const{paddingTop:h,paddingBottom:g,borderBottomWidth:f,borderTopWidth:m}=qs(this.eGui),v=h+g+f+m,b=t.offsetHeight+v;if(u<5){const R=!$e(i)?.contains(t),y=b==0;if(R||y){wa(()=>n(u+1),"raf",i);return}}this.setColHeaderHeight(this.column,b)};let r=!1,a;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&c(),!u&&r&&d()},c=()=>{r=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),n(0),a=es(this.beans,t,()=>n(0))},d=()=>{r=!1,a&&a(),this.comp.toggleCss("ag-header-cell-auto-height",!1),a=void 0};l(),o.addDestroyFunc(()=>d()),o.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),o.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),s&&s(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:s,eGui:o}=this;!e||!t||!o||(qg(e,t,s.visibleCols),wh(o,s.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=Os(this.beans);this.eGui&&dt(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=Ae(this.beans),s=e.key===D.LEFT||e.key===D.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||s)&&(e.preventDefault(),e.stopImmediatePropagation()),!s))return;const i=e.key===D.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const n=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(n,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(i)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:s}=this.beans;return s?s.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:s}=this;let o=e.key===D.LEFT!==t.get("enableRtl");const i=s.getPinned(),n=t.get("enableRtl");return i&&n!==(i==="right")&&(o=!o),(o?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case D.PAGE_DOWN:case D.PAGE_UP:case D.PAGE_HOME:case D.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=Qg,{eGui:s,gos:o}=this;_s(o,s,t,this),e.addDestroyFunc(()=>_s(o,s,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(t.focus(),this.lastFocusEvent=e||null):this.reAttemptToFocus=!0,!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,s){const o=e??t,{menuSvc:i,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&o.preventDefault(),i?.isHeaderContextMenuEnabled(s)&&i.showHeaderContextMenu(s,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",s)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:s}=this;e.isColumn?s.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):s.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},NR=class extends Ul{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,s,o,i){this.comp=e;const{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:c,colHover:d,rangeSvc:u}=a,h=Ei(this,c,i);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:o,checkMeasuringCallback:f=>this.setRefreshFunction("measuring",f),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=h.createManagedBean(l.createResizeFeature(n.pinned,r,s,e,this)):ke(s,!1),d?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new jl(r,t,a)),h.createManagedBean(new Oo(t,{shouldStopEventPropagation:f=>this.shouldStopEventPropagation(f),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh()}),h.addManagedListeners(r,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.colDef;return X(t.gos,{colDef:s,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return U0(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:s,gos:o}=this.beans;return X(o,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!s&&(!this.openFilterEnabled||ut(this.gos)),showColumnMenu:(n,r)=>{e?.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e?.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e?.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t?.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t?.setSortForColumn(this.column,n,!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{const s=t.createSelectAllFeature(this.column);s&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(s),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!s&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}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){e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&this.beans.sortSvc?.progressSort(this.column,e.shiftKey,"uiColumnSorted")}showMenuOnKeyPress(e,t){const s=this.comp.getUserCompInstance();gd(s)&&s.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),fS()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),s=Kg(t,this.gos,this.column,null),o=this.userHeaderClasses;this.userHeaderClasses=new Set(s);for(const i of s)o.has(i)?o.delete(i):this.comp.toggleCss(i,!0);for(const i of o)this.comp.toggleCss(i,!1)};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(const e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(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.colNames.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}setupWidth(e){const t=()=>{const s=this.column.getActualWidth();this.comp.setWidth(`${s}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const s=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",s),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,s=e===1;this.comp.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",s)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:s,beans:o}=this,i=Wl(this.beans),n=i.reduce((h,g)=>h+g,0)===0;if(s.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),s.toggleCss("ag-header-span-height",!1),s.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();s.toggleCss("ag-header-span-height",r>0);const l=_l(o);if(r===0){s.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}s.toggleCss("ag-header-span-total",a);const c=(this.column.getFirstRealParent()?.getLevel()??-1)+1,d=i.length-c;let u=0;for(let h=0;h<d;h++)u+=i[i.length-1-h];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${l+u}px`)}refreshAriaSort(){if(this.sortable){const e=this.getLocaleTextFunc(),t=this.beans.sortSvc?.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(B1(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.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!ut(this.gos)){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.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(Ae(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,s)=>t==="filter"?-1:s.charCodeAt(0)-t.charCodeAt(0)).map(t=>this.ariaDescriptionProperties.get(t)).join(". ");this.beans.ariaAnnounce?.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=i=>this.handleMouseOverChange(i.type==="mouseenter"),s=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},o=i=>this.handleContextMenuMouseEvent(i,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:s,contextmenu:o})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return gd(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function gd(e){return typeof e?.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var HR=0,_r=class extends T{constructor(e,t,s){super(),this.rowIndex=e,this.pinned=t,this.type=s,this.instanceId=HR++,this.comp=null,this.allCtrls=[];let o="ag-header-row-column";s==="group"?o="ag-header-row-group":s==="filter"&&(o="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${o}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=Ze(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,s=!0){this.comp=e,t=Ei(this,this.beans.context,t),s&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),s=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:s,virtualColumnsChanged:o=>this.onVirtualColumnsChanged(o.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",s),e.addManagedPropertyListener("ensureDomOrder",o=>this.isEnsureDomOrder=o.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=Ze(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=Wl(this.beans);for(let i=0;i<t.length;i++){if(i===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[i]};e+=t[i]}const s=_l(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:s};e+=s;const o=Yg(this.beans);return{topOffset:e,rowHeight:o}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;const t=this.getUpdatedHeaderCtrls(),s=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,s,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const o of t)this.recycleAndCreateHeaderCtrls(o,this.ctrlsById,e);const s=o=>{const{focusSvc:i,visibleCols:n}=this.beans;return i.isHeaderWrapperFocused(o)?n.isVisible(o.column):!1};if(e)for(const[o,i]of e)s(i)?this.ctrlsById.set(o,i):this.destroyBean(i);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,s){if(e.isEmptyGroup())return;const o=e.getUniqueId();let i;if(s&&(i=s.get(o),s.delete(o)),i&&i.column!=e&&(this.destroyBean(i),i=void 0),i==null)switch(this.type){case"filter":{i=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":i=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:i=this.createBean(new NR(e,this));break}t.set(o,i)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];for(const t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const s=this.allCtrls.find(i=>i.column==e);return s?s.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},GR=class extends T{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:s,ctrlsSvc:o,colModel:i,colMoves:n}=this.beans;this.setupCenterWidth(),s?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});const a=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;o.register(a,this),i.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,filterManager:s,visibleCols:o}=this.beans;let i=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=o.headerGroupRowCount;i=u,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const h=this.groupsRowCtrls.length;if(h!==u){if(h>u){for(let g=u;g<h;g++)this.destroyBean(this.groupsRowCtrls[g]);this.groupsRowCtrls.length=u;return}for(let g=h;g<u;g++){const f=this.createBean(new _r(g,this.pinned,"group"));this.groupsRowCtrls.push(f)}}},a=()=>{const u=i++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new _r(u,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u)},l=()=>{this.includeFloatingFilter=!!s?.hasFloatingFilters()&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}e||u();const h=i++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new _r(h,this.pinned,"filter"))},c=this.getAllCtrls();r(),a(),l();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,n),c.length!==d.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=s=>s?.getHeaderCellCtrls().find(o=>o.column===e);if(fs(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let s=0;s<this.groupsRowCtrls.length;s++){const o=t(this.groupsRowCtrls[s]);if(o)return o}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,s){const i=this.getAllCtrls()[e];return i?i.focusHeader(t,s):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const s=e?.createBodyDropTarget(this.pinned,t);s&&this.createManagedBean(s)}restoreFocusOnHeader(e,t){if(!t)return;const{column:s}=t;s.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t,scroll:!1})}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new Bl(e=>this.comp.setCenterWidth(`${e}px`),!0))}},VR=class extends T{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(fd(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,s){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,s)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){fd(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(ut(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&fs(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Ls()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!ut(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!ut(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return ut(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,s,o){const{positionBy:i,onClosedCallback:n}=t,r=t.column;if(i==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(r,a,s,n,o)}else if(i==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(r,a,s,n,o)}else if(r){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(r,"auto"),ts(a,()=>{const c=l.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);c&&e?.showMenuAfterButtonClick(r,c.getAnchorElementForMenu(o),s,n,o)})}}};function pd(e,t,s){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",s))}function fd(e){const{enterpriseMenuFactory:t,filterMenuFactory:s,gos:o}=e;return t&&ut(o)?t:s}var nr=class extends Pl{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.errorMessages=null}},Xg=class extends Le{constructor(){super()}},BR={tag:"span",cls:"ag-overlay-loading-center"},zR=class extends Xg{init(){const e=Kt(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??BR),!e){const s=this.getLocaleTextFunc()("loadingOoo","Loading...");this.getGui().textContent=s,this.beans.ariaAnnounce.announceValue(s,"overlay")}}},WR={tag:"span",cls:"ag-overlay-no-rows-center"},_R=class extends Xg{init(){const e=Kt(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??WR),!e){const s=this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=s,this.beans.ariaAnnounce.announceValue(s,"overlay")}}};function jR(e,t,s){const o=wt(e,t,s);if(o){const{className:n}=o;if(typeof n=="string"&&n.includes("ag-icon")||typeof n=="object"&&n["ag-icon"])return o}const i=it({tag:"span"});return i.appendChild(o),i}function wt(e,t,s){let o=null;e==="smallDown"?L(262):e==="smallLeft"?L(263):e==="smallRight"&&L(264);const i=s?.getColDef().icons;if(i&&(o=i[e]),t.gos&&!o){const n=t.gos.get("icons");n&&(o=n[e])}if(o){let n;if(typeof o=="function")n=o();else if(typeof o=="string")n=o;else{L(38,{iconName:e});return}if(typeof n=="string")return ml(n);if(wl(n))return n;L(133,{iconName:e});return}else{const n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),it({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var UR=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}",$R={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},KR=class extends Le{constructor(){super(),this.dragSource=null,this.eIcon=Z,this.eLabel=Z,this.eGhost=Z,this.registerCSS(UR)}postConstruct(){const e=t=>jR(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate($R),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:s,eIcon:o,dragSource:i,dropIconMap:n,gos:r}=this;at(o);let a=null;e||(e=i?.getDefaultIconName?i.getDefaultIconName():"notAllowed"),a=n[e],s.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),o.classList.toggle("ag-shake-left-to-right",t),!(a===n.hide&&r.get("suppressDragLeaveHidesColumns"))&&a&&o.appendChild(a)}setLabel(e){this.eLabel.textContent=e}},qR=".ag-checkbox-cell{height:100%}",YR={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},ZR=class extends Le{constructor(){super(YR,[Il]),this.eCheckbox=Z,this.registerCSS(qR)}init(e){this.refresh(e);const{eCheckbox:t,beans:s}=this,o=t.getInputElement();o.setAttribute("tabindex","-1"),mh(o,"polite"),this.addManagedListeners(o,{click:i=>{if(Us(i),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:i=>{Us(i)}}),this.addManagedElementListeners(e.eGridCell,{keydown:i=>{if(i.key===D.SPACE&&!t.isDisabled()){e.eGridCell===Ae(s)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),i.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,s=!0;const{value:o,column:i,node:n}=e;if(n.group&&i)if(typeof o=="boolean")t=o;else{const u=i.getColId();u.startsWith(er)?t=o==null||o===""?void 0:o==="true":n.aggData&&n.aggData[u]!==void 0||n.sourceRowIndex>=0?t=o??void 0:s=!1}else t=o??void 0;const{eCheckbox:r}=this;if(!s){r.setDisplayed(!1);return}r.setValue(t);const a=e.disabled??!i?.isCellEditable(n);r.setDisabled(a);const l=this.getLocaleTextFunc(),c=Jn(l,t),d=a?c:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${c})`;r.setInputAriaLabel(d)}onCheckboxChanged(e){const{params:t}=this,{column:s,node:o,value:i}=t;this.beans?.editSvc?.setEditingCells([{column:s,colId:s.getColId(),rowIndex:o.rowIndex,rowPinned:o.rowPinned,state:"changed",oldValue:i,newValue:i}],{update:!0,forceRefreshOfEditCellsOnly:!0});const n=o.setDataValue(s,e,"renderer");this.beans.editSvc?.stopEditing({rowNode:o,column:s},{source:this.beans.editSvc?.isBatchEditing()?"ui":"api"}),n||this.updateCheckbox(t)}},md=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){const{all:t,visible:s,order:o}=this;t.has(e)||(t.add(e),s.add(e),o.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),Et(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(const t of this.visible)if(t.id==e)return t}clear(){const{all:e,visible:t,order:s,queued:o}=this;e.clear(),o.clear(),t.clear(),s.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:s}=this.beans,o=e?.getSortOptions()??[],i=JR(this.order);if(this.order.sort((r,a)=>(r.pinnedSibling?.rowIndex??0)-(a.pinnedSibling?.rowIndex??0)),this.order=t?.doFullSort(this.order,o)??this.order,!i)return;const n=Uh(s);n==="bottom"||n==="pinnedBottom"?this.order.push(i):this.order.unshift(i)}hide(e){const{all:t,visible:s}=this;t.forEach(o=>e(o)?s.delete(o):s.add(o)),this.order=Array.from(s),this.sort()}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function Jg(e){if(e.level===-1)return!0;const t=e.parent;return t?.childrenAfterSort?.some(s=>s==e)?Jg(t):!1}function jr(e,t){const{gos:s,rowModel:o,filterManager:i}=e;return Ys(s)?!o.getRowNode(t.id):i?.isAnyFilterPresent()?!Jg(t):s.get("pivotMode")?!t.group:!1}function QR(e){return!!e.footer&&e.level===-1}function XR(e){return!!e.pinnedSibling&&QR(e.pinnedSibling)}function JR(e){const t=e.findIndex(XR);if(t>-1)return e.splice(t,1)?.[0]}var Cd=class extends T{postConstruct(){const{gos:e,beans:t}=this;this.top=new md(t,"top"),this.bottom=new md(t,"bottom");const s=i=>jr(t,i.pinnedSibling),o=()=>{const i=e.get("isRowPinned");i&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,i(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:i})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow(),this.forContainers(r=>r.hide(s));const n=this.refreshRowPositions();(!i||n)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(tx),this.refreshRowPositions()},rowNodeDataChanged:({node:i})=>{(e.get("isRowPinnable")?.(i)??!0)||this.pinRow(i,null)},firstDataRendered:o}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(i=>i.hide(s)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:i})=>{this._grandTotalPinned=i==="pinnedBottom"?"bottom":i==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",o)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const s=[];t.forEach(o=>s.push(o)),s.forEach(o=>this.pinRow(o,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,s){if(e.footer&&e.level>-1)return;if(e.footer&&e.level===-1){this._grandTotalPinned=t,ox(this.beans);return}const o=e.rowPinned??e.pinnedSibling?.rowPinned;if(o!=null&&t!=null&&t!=o){const r=e.rowPinned?e:e.pinnedSibling,a=e.rowPinned?e.pinnedSibling:e;this.pinRow(r,null,s),this.pinRow(a,t,s);return}const n=s&&sx(this.beans,e,s);if(n){n.forEach(r=>this.pinRow(r,t));return}if(t==null){const r=e.rowPinned?e:e.pinnedSibling,a=this.findPinnedRowNode(r);if(!a)return;a.delete(r);const l=r.pinnedSibling;Ur(r),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(l)}else{const r=vd(this.beans,e,t),a=this.getContainer(t);a.add(r),jr(this.beans,e)&&a.hide(l=>jr(this.beans,l.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const s=o=>{if(o.rowHeightEstimated){const i=gs(this.beans,o);o.setRowTop(t),o.setRowHeight(i.height),t+=i.height,e=!0}};return this.bottom.forEach(s),t=0,this.top.forEach(s),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return wd(this.top)}getPinnedBottomTotalHeight(){return wd(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){const e=t=>{const s=[];return this.forEachPinnedRow(t,o=>s.push(o.pinnedSibling.id)),s};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,s)=>{for(const o of e[s]){const i=this.beans.rowModel.getRowNode(o);i?this.pinRow(i,s):t.queue(o)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const s=new Set;e.forEachQueued(o=>{const i=this.beans.rowModel.getRowNode(o);i&&s.add(i)});for(const o of s)e.unqueue(o.id),this.pinRow(o,t)})}pinGrandTotalRow(){const{gos:e,beans:t,_grandTotalPinned:s}=this,o=t.rowModel;if(!Ne(e))return;const i=o.rootNode?.sibling;if(!i)return;const n=i.pinnedSibling,r=n&&this.findPinnedRowNode(n);if(s){if(r&&r.floating!==s&&(r.delete(n),Ur(n)),!r||r.floating!==s){const a=vd(t,i,s);this.getContainer(s).add(a)}}else{if(!r)return;r.delete(n),Ur(n)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(s=>s.setRowHeight(s.rowHeight,!0)))}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){const t=o=>ex(this.beans,o);if(e)return t(this.getContainer(e));let s=!1;return this.forContainers(o=>{const i=t(o);s||(s=i)}),s}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function ex(e,t){let s=0,o=!1;return t.forEach((i,n)=>{if(o||(o=i.rowTop!==s),i.setRowTop(s),i.rowHeightEstimated||i.rowHeight==null){const r=gs(e,i).height;o||(o=i.rowHeight!==r),i.setRowHeight(r)}i.setRowIndex(n),s+=i.rowHeight}),o}function vd(e,t,s){if(t.pinnedSibling)return t.pinnedSibling;const o=Fy(t,e);o.setRowTop(null),o.setRowIndex(null),o.rowPinned=s;const i=s==="top"?Nl:Hl;return o.id=`${i}${s}-${t.id}`,o.pinnedSibling=t,t.pinnedSibling=o,o}function Ur(e){if(!e.pinnedSibling)return;e.rowPinned=null,e.setRowTop(null),e.setRowIndex(null);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function tx(e){const t=new Set;e.forEach(s=>{s.group&&t.add(s)}),t.forEach(s=>e.delete(s))}function sx(e,t,s){const{rowSpanSvc:o}=e,i=(s&&o?.isCellSpanning(s,t))??!1;if(s&&i)return o?.getCellSpan(s,t)?.spannedNodes}function wd(e){const t=e.size();if(t===0)return 0;const s=e.getByIndex(t-1);return s===void 0?0:s.rowTop+s.rowHeight}function ox({gos:e,rowModel:t}){Ne(e)&&t.refreshModel({step:"map"})}var bd=class extends T{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=s=>{s.setRowHeight(s.rowHeight,!0)};zo(this.pinnedBottomRows,t),zo(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const s=o=>{if(o.rowHeightEstimated){const i=gs(this.beans,o);o.setRowTop(t),o.setRowHeight(i.height),t+=i.height,e=!0}};return zo(this.pinnedBottomRows,s),t=0,zo(this.pinnedTopRows,s),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const s=this.getCache(t);if(e===void 0){s.order.length=0,s.cache={};return}const o=Fo(this.gos),i=t==="top"?Nl:Hl,n=new Set(s.order),r=[],a=new Set;let l=0,c=-1;for(const d of e){const u=o?.({data:d,level:0,rowPinned:t})??i+this.nextId++;if(a.has(u)){L(96,{id:u,data:d});continue}c++,a.add(u),r.push(u);const h=ti(s,u);if(h!==void 0)h.data!==d&&h.updateData(d),l+=this.setRowTopAndRowIndex(h,l,c),n.delete(u);else{const g=new ms(this.beans);g.id=u,g.data=d,g.rowPinned=t,l+=this.setRowTopAndRowIndex(g,l,c),s.cache[u]=g,s.order.push(u)}}for(const d of n)ti(s,d)?.clearRowTopAndRowIndex(),delete s.cache[d];s.order=r}setRowTopAndRowIndex(e,t,s){return e.setRowTop(t),e.setRowHeight(gs(this.beans,e).height),e.setRowIndex(s),e.rowHeight}getPinnedTopTotalHeight(){return Sd(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return Sd(this.pinnedBottomRows)}getPinnedTopRowCount(){return Ga(this.pinnedTopRows)}getPinnedBottomRowCount(){return Ga(this.pinnedBottomRows)}getPinnedTopRow(e){return Ha(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Ha(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return ti(this.getCache(t),e)}forEachPinnedRow(e,t){return zo(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function Sd(e){const t=Ga(e);if(t===0)return 0;const s=Ha(e,t-1);return s===void 0?0:s.rowTop+s.rowHeight}function ti(e,t){return e.cache[t]}function Ha(e,t){return ti(e,e.order[t])}function zo(e,t){e.order.forEach((s,o)=>{const i=ti(e,s);i&&t(i,o)})}function Ga(e){return e.order.length}var ix=class extends T{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const s=e.get("enableRowPinning"),o=Uh(e),n=!!s||(o==="pinnedBottom"||o==="pinnedTop"),r=n?this.inner instanceof bd:this.inner instanceof Cd;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(n?new Cd:new bd))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,s){return this.inner.pinRow(e,t,s)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}};function Ii(e){return!!(e.rowPinned&&e.pinnedSibling)}function ft(e,t,s,o){const i=t==="top";if(!s)return ft(e,t,i?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),o);if(!o){const l=i?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return ft(e,t,s,i?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let n=!1,r=!1;const a=[];return e.forEachPinnedRow(t,l=>{if(l===s&&!n){n=!0,a.push(l);return}if(n&&l===o){r=!0,a.push(l);return}n&&!r&&a.push(l)}),a}var nx={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},rx=class extends Le{constructor(){super(nx,[Il]),this.eCheckbox=Z}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:s}=this,o=t.isSelected(),i=Jn(e,o),[n,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(n,r);s.setValue(o,!0),s.setInputAriaLabel(`${a} (${i})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:Us,click:o=>{Us(o),this.beans.selectionSvc?.handleSelectionEvent(o,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:i})=>{const n=typeof o=="object"?Dr(o):void 0,r=typeof i=="object"?Dr(i):void 0;n!==r&&this.onSelectableChanged()}),xa(this.gos)||typeof this.getIsVisible()=="function"){const o=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o}),this.addManagedListeners(this.rowNode,{dataChanged:o,cellChanged:o}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:s,gos:o}=this,i=t.selectable,n=this.getIsVisible();let r;if(typeof n=="function"){const u=s?.callbackParams;if(!e)r=n({...u,node:t,data:t.data});else{const h=e.createColumnFunctionCallbackParams(t);r=n({...u,...h})}}else r=n??!1;const a=i&&!r||!i&&r,l=i||r,c=o.get("rowSelection"),d=c&&typeof c!="string"?!Dr(c):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(l&&(a?d:!0)),this.setDisplayed(l&&(a?d:!0)),l&&this.eCheckbox.setDisabled(a),s?.removeHidden&&this.setDisplayed(l)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?fo(t):this.column?.getColDef()?.checkboxSelection}},ax=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:s,pinnedRowModel:o}=this;return t??(t=s.getRowNode(e)),o?.isManual()&&(t??(t=o.getPinnedRowById(e,"top")),t??(t=o.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const s=t[0].id===this.rootId,o=t.findIndex(i=>i.id===e.id);if(o>-1){const i=t.slice(0,o),n=t.slice(o+1);return this.setEndRange(e),s?{keep:i,discard:n}:{keep:n,discard:i}}else return{keep:t,discard:[]}}extend(e,t=!1){const s=this.getRoot();if(s==null){const i=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&i.push(n)),i.push(e),this.setRoot(e),{keep:i,discard:[]}}const o=this.getNodesInRange(s,e);if(!o)return this.setRoot(e),{keep:[e],discard:[]};if(o.find(i=>i.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const i=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:i}}}getNodesInRange(e,t){const{pinnedRowModel:s,rowModel:o}=this;if(!s?.isManual())return o.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return ft(s,"top",e,void 0).concat(o.getNodesInRangeForSelection(o.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const i=ft(s,"bottom",void 0,e),n=o.getRowCount(),r=o.getRow(n-1);return(o.getNodesInRangeForSelection(t,r)??[]).concat(i)}if(!e.rowPinned&&!t.rowPinned)return o.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return ft(s,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const i=ft(s,"top",t,void 0),n=ft(s,"bottom",void 0,e),r=o.getRow(0),a=o.getRow(o.getRowCount()-1);return i.concat(o.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(!e.rowPinned&&t.rowPinned==="top")return ft(s,"top",t,void 0).concat(o.getNodesInRangeForSelection(o.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const i=ft(s,"top",e,void 0),n=ft(s,"bottom",void 0,t),r=o.getRow(0),a=o.getRow(o.getRowCount()-1);return i.concat(o.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return ft(s,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const i=ft(s,"bottom",void 0,t),n=o.getRow(o.getRowCount());return(o.getNodesInRangeForSelection(e,n)??[]).concat(i)}return null}},lx=class extends T{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(Ae(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new Ml);this.cbSelectAll=t,t.addCss("ag-header-select-all"),zs(t.getGui(),"presentation"),this.showOrHideSelectAll();const s=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:s,paginationChanged:s,modelUpdated:s}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:i})=>{const n=r=>typeof r=="string"||!r||r.mode==="singleRow"?void 0:r.selectAll;n(o)!==n(i)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,s=this.cbSelectAll,o=t.getSelectAllState(e);s.setValue(o);const i=t.hasNodesToSelect(e);s.setDisabled(!i),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:s,cbSelectAll:o,cbSelectAllVisible:i}=this,n=o.getValue(),r=Jn(t,n),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",i?`${a} (${r})`:null),o.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||s.announceAriaDescription()}checkSelectionType(e){return En(this.gos)?!0:(L(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:s}=this.beans;return Ne(t)||Ys(t)?!0:(L(129,{feature:e,rowModel:s.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let s="uiSelectAll";t==="currentPage"?s="uiSelectAllCurrentPage":t==="filtered"&&(s="uiSelectAllFiltered");const o={source:s,selectAll:t},i=this.beans.selectionSvc;e?i.selectAllRowNodes(o):i.deselectAllRowNodes(o)}isCheckboxSelection(){const{column:e,gos:t,beans:s}=this,n=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return ep(s,e)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const e=Yh(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:s}=this.column.getColDef();return t?"currentPage":s?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function ep({gos:e,selectionColSvc:t},s){const o=e.get("rowSelection"),i=s.getColDef(),{headerCheckboxSelection:n}=i;let r=!1;if(typeof o=="object"){const l=ss(s),c=El(s);(xn(o)==="autoGroupColumn"&&c||l&&t?.isSelectionColumnEnabled())&&(r=en(o))}else typeof n=="function"?r=n(X(e,{column:s,colDef:i})):r=!!n;return r}var cx=class extends T{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new ax(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=xa(e);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=xa(e),this.addManagedEventListeners({cellValueChanged:s=>this.updateRowSelectable(s.node),rowNodeDataChanged:s=>this.updateRowSelectable(s.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new rx}createSelectAllFeature(e){if(ep(this.beans,e))return new lx(e)}isMultiSelect(){return En(this.gos)}onRowCtrlSelected(e,t,s){const o=!!e.rowNode.isSelected();e.forEachGui(s,i=>{i.rowComp.toggleCss("ag-row-selected",o);const n=i.element;bh(n,o),n.contains(Ae(this.beans))&&t(i)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),s=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||s)return;const i=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(i,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!Ii(e)||!ks(this.gos)}updateRowSelectable(e,t){const s=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,s,t),s}setRowSelectable(e,t,s){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),s)return;if(mi(this.gos)){const i=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:i??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,s=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let o=0;o<e.childrenAfterGroup.length;o++){const i=e.childrenAfterGroup[o];let n=i.isSelected();if(!i.selectable){const r=this.calculateSelectedFromChildren(i);if(r===null)continue;n=r}switch(n){case!0:t=!0;break;case!1:s=!0;break;default:return}}if(!(t&&s))return t?!0:s?!1:e.selectable?e.__selected:null}selectRowNode(e,t,s,o="api"){const i=!e.selectable&&t,n=e.__selected===t;if(i||n)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...Ry(e,this.gos,"rowSelected"),event:s||null,source:o}),!0}isCellCheckboxSelection(e,t){const s=this.gos.get("rowSelection");if(s&&typeof s!="string"){const o=ss(e)&&fo(s);return e.isColumnFunc(t,o)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,s,o){const{gos:i,selectionCtx:n}=this,r=e.isSelected(),a=mi(i),l=jb(i),c=Ub(i),d=this.isMultiSelect(),u=o==="rowClicked";if(u&&!(l||c))return null;if(t&&s&&d){const h=n.getRoot();if(h)if(h.isSelected()){const g=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{deselect:g.discard,select:g.keep,reset:!1}}else{const g=n.extend(e,a);return{select:[],deselect:g.keep,reset:!1}}else return null}else if(t&&d){const h=n.selectAll?this.beans.rowModel.getRow(0):void 0,g=n.getRoot(h),f=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{select:f.keep,deselect:f.discard,reset:n.selectAll||!!(g&&!g.isSelected())}}else if(s){if(u){const h=!r;return h&&!l||!h&&!c?null:(n.setRoot(e),{node:e,newValue:h,clearSelection:!1})}return n.setRoot(e),{node:e,newValue:!r,clearSelection:!d}}else{n.setRoot(e);const h=$b(i),g=Dn(i)==="filteredDescendants",f=u&&(!h||!l);if(g&&r===void 0&&Ne(i))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!d||f};if(u){const m=r?!h:l;return m===r&&!f||m&&!l||!m&&!c?null:{node:e,newValue:m,clearSelection:!d||f,keepDescendants:e.group&&a}}return{node:e,newValue:!r,clearSelection:!d||f}}}},wo={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},tp=class extends T{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:s,eBottomGuard:o,focusTrapActive:i,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:r,focusInnerElement:a,onFocusIn:l,onFocusOut:c,shouldStopEventPropagation:d,onTabKeyDown:u,handleKeyDown:h,isEmpty:g,eFocusableElement:f}=e;this.comp=t,this.eTopGuard=s,this.eBottomGuard=o,this.providedFocusInnerElement=a,this.eFocusableElement=f,this.focusTrapActive=!!i,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!r,this.providedFocusIn=l,this.providedFocusOut=c,this.providedShouldStopEventPropagation=d,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=g}postConstruct(){this.createManagedBean(new Oo(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();for(const e of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)})}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():Co(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){const t=$e(this.beans),s=Co(t.body,null,!0),o=s.indexOf(e?this.eTopGuard:this.eBottomGuard);if(o===-1)return;let i,n;e?(i=0,n=o):(i=o+1,n=s.length);const r=s.slice(i,n),a=this.gos.get("tabIndex");r.sort((l,c)=>{const d=Number.parseInt(l.getAttribute("tabindex")||"0"),u=Number.parseInt(c.getAttribute("tabindex")||"0");return u===a?1:d===a?-1:d===0?1:u===0?-1:d-u}),r[e?r.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const s=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),s&&(s.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=Co(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return Qs(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},dx=class extends T{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:s,eFocusableElement:o}=this,i=[t,s],n={setTabIndex:v=>{for(const w of i)v!=null?w.setAttribute("tabindex",v):w.removeAttribute("tabindex")}};this.addTabGuards(t,s);const{focusTrapActive:r=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:c,handleKeyDown:d,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}=e;this.tabGuardCtrl=this.createManagedBean(new tp({comp:n,focusTrapActive:r,eTopGuard:t,eBottomGuard:s,eFocusableElement:o,onFocusIn:a,onFocusOut:l,focusInnerElement:c,handleKeyDown:d,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=$e(this.beans).createElement("div"),s=e==="top"?wo.TAB_GUARD_TOP:wo.TAB_GUARD_BOTTOM;return t.classList.add(wo.TAB_GUARD,s),zs(t,"presentation"),t}addTabGuards(e,t){const s=this.eFocusableElement;s.insertAdjacentElement("afterbegin",e),s.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];at(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,s){wl(t)||(t=t.getGui());const{eBottomGuard:o}=this;o?o.insertAdjacentElement("beforebegin",t):e(t,s)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;hs(e),hs(t),super.destroy()}},ux=class extends Le{initialiseTabGuard(t){this.tabGuardFeature=this.createManagedBean(new dx(this)),this.tabGuardFeature.initialiseTabGuard(t)}forceFocusOutOfContainer(t=!1){this.tabGuardFeature.forceFocusOutOfContainer(t)}appendChild(t,s){this.tabGuardFeature.appendChild(super.appendChild.bind(this),t,s)}},hx=500,gx=550,$i,px=e=>{if(!$i)$i=new WeakSet;else if($i.has(e))return!1;return $i.add(e),!0},Rs=class{constructor(e,t=!1){this.eElement=e,this.preventClick=t,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(e,t){let s=this.eventSvc;if(!s){if(s===null)return;this.eventSvc=s=new Bs;const o=this.onTouchStart.bind(this);this.startListener=o,this.eElement.addEventListener("touchstart",o,{passive:!0})}s.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!px(e))return;const t=e.touches[0];this.touchStart=t;const s=this.handlers;if(!s.length){const o=this.eElement,i=o.ownerDocument,n=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this),a=this.onTouchCancel.bind(this),l={passive:!0},c={passive:!1};Xi(s,[o,"touchmove",n,l],[i,"touchcancel",a,l],[i,"touchend",r,c],[i,"contextmenu",ls,c])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{this.longPressTimer=0,this.touchStart===t&&!this.moved&&(this.moved=!0,this.eventSvc?.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))},gx)}onTouchMove(e){const{moved:t,touchStart:s}=this;if(!t&&s){const o=Xo(s,e.touches);o&&!Ph(o,s,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;!t||!Xo(t,e.changedTouches)||(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&ls(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;!t||!Xo(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now();const s=this.lastTapTime;s&&t-s>hx&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),bl(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){const e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}},fx=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),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)}get scrolling(){return this.tickingInterval!==null}check(e,t=!1){const s=t||this.shouldSkipVerticalScroll();if(s&&this.shouldSkipHorizontalScroll())return;const o=this.scrollContainer.getBoundingClientRect(),i=this.scrollByTick;this.tickLeft=e.clientX<o.left+i,this.tickRight=e.clientX>o.right-i,this.tickUp=e.clientY<o.top+i&&!s,this.tickDown=e.clientY>o.bottom-i&&!s,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},sp=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${Ah}/${this.frameworkName}-data-grid`,Ab(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}};function mx(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var Cx=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],yd=Object.fromEntries(Cx.map((e,t)=>[e,t]));function vx(e,t){const s=(e.beanName?yd[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,o=(t.beanName?yd[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return s-o}function wx(e,t){return e?.beanName==="gridDestroySvc"?-1:t?.beanName==="gridDestroySvc"?1:0}var bx=class extends T{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,s){this.view=e,this.eGridHostDiv=t,this.eGui=s,this.eGui.setAttribute("grid-id",this.beans.context.getId());const{dragAndDrop:o,ctrlsSvc:i}=this.beans;o?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new Vl(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=es(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),i.register("gridCtrl",this)}isDetailGrid(){return vg(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry?.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){const{view:t}=this;if(e===!1)t.setCursor(null);else{const s=e===1?"ew-resize":"ns-resize";t.setCursor(s)}}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:s,nextIndex:o}=this.getNextFocusableIndex(t,e);if(o<0||o>=t.length)return!1;if(o===0){if(s>0){const{visibleCols:i,focusSvc:n}=this.beans,r=i.allCols,a=ye(r);if(n.focusGridView({column:a,backwards:!0}))return!0}return!1}return this.focusContainer(t[o],e)}focusInnerElement(e){if(this.gos.getCallback("focusGridInnerElement")?.({fromBottom:!!e}))return!0;const s=this.getFocusableContainers(),{focusSvc:o,visibleCols:i}=this.beans,n=i.allCols;if(e){if(s.length>1)return this.focusContainer(ye(s),e);const r=ye(n);if(o.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||Os(this.beans)){if(o.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<s.length;r++)if(js(s[r].getGui(),e))return!0;return!1}return o.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{nextIndex:s,indexWithFocus:o}=this.getNextFocusableIndex(t,e);if(o===-1||s<0||s>=t.length)return;const i=t[s];i.setAllowFocus?.(!0),setTimeout(()=>{i.setAllowFocus?.(!1)})}isFocusable(){const e=this.beans;return!ir(e)||!Os(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const s=Ae(this.beans),o=e.findIndex(n=>n.getGui().contains(s)),i=o+(t?-1:1);return{indexWithFocus:o,nextIndex:i}}focusContainer(e,t){e.setAllowFocus?.(!0);const s=js(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),s}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},se=(e,t)=>{for(const s of Object.keys(t))t[s]=e;return t},Rd={dispatchEvent:"CommunityCore",...se("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...se("GridState",{getState:0,setState:0}),...se("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...se("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...se("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...se("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...se("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...se("ValueCache",{expireValueCache:0}),...se("CellApi",{getCellValue:0}),...se("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...se("Sort",{onSortChanged:0}),...se("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...se("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...se("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...se("HighlightChanges",{flashCells:0}),...se("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...se("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...se("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...se("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...se("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...se("ColumnResize",{setColumnWidths:0}),...se("ColumnHover",{isColumnHovered:0}),...se("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...se("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...se("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...se("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...se("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...se("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...se("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...se("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...se("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0}),...se("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...se("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...se("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...se("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...se("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...se("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...se("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...se("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...se("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...se("ContextMenu",{showContextMenu:0}),...se("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...se("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...se("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...se("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...se("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...se("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...se("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...se("StatusBar",{getStatusPanel:0}),...se("AiToolkit",{getStructuredSchema:0})},$r={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},Sx=(e,t)=>e.eventSvc.dispatchEvent(t),op=class{};Reflect.defineProperty(op,"name",{value:"GridApi"});var yx=class extends T{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new op,this.fns={...$r,dispatchEvent:Sx},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(Rd))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:s,beans:o}=this;s!==$r&&(s[e]=o?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:s,fns:{[e]:o}}=this;return o?o(s,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:s,preDestroyLink:o}=this;if(!t)L(26,{fnName:e,preDestroyLink:o});else{const i=Rd[e];s.assertModuleRegistered(i,`api.${e}`)&&L(27,{fnName:e,module:i})}}destroy(){super.destroy(),this.fns=$r,this.beans=null}};function Rx(e){return e.context.getId()}function xx(e){e.gridDestroySvc.destroy()}function Fx(e){return e.gridDestroySvc.destroyCalled}function Ex(e,t){return e.gos.get(t)}function Dx(e,t,s){ip(e,{[t]:s})}function ip(e,t){e.gos.updateGridOptions({options:t})}function Px(e,t){const s=t.replace(/Module$/,"");return e.gos.isModuleRegistered(s)}var Tx={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},Mx=class extends Le{constructor(e,t,s){super(Tx),this.rowNode=e,this.column=t,this.eCell=s}postConstruct(){this.getGui().appendChild(wt("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:s,eCell:o,gos:i}=this,n=s.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(o,0,0),n){const a=X(i,{rowNode:t,dragEvent:e});n(a)}else try{const a=JSON.stringify(t.data);r.setData("application/json",a),r.setData("text/plain",a)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};function Ix(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function kx(e,t){const s=e.dragAndDrop?.findExternalZone(t.getContainer());s&&e.dragAndDrop?.removeDropTarget(s)}function Ax(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}function Lx(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function Ox(e,t){const s=e.rowDropHighlightSvc;if(!s)return;const o=t?.row;let i=t?.dropIndicatorPosition;i!=="above"&&i!=="below"&&i!=="inside"&&(i="none");const n=o?.rowIndex;n==null||i==="none"?s.clear():s.set(o,i)}var Nx=class extends wy{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},Hx=class extends T{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:s}=this.beans;return s.addDragSource(t),()=>s.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const s=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(s)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},Gx={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},Vx=class extends Le{constructor(e,t,s,o,i,n=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=s,this.customGui=o,this.dragStartPixels=i,this.alwaysVisible=n,this.dragSource=null}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(Gx),this.getGui().appendChild(wt("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,gos:t,rowNode:s}=this,o=this.refreshVisibility.bind(this);this.addManagedPropertyListener("suppressRowDrag",o),this.addManagedListeners(s,{dataChanged:o,cellChanged:o}),this.addManagedListeners(e.eventSvc,t.get("rowDragManaged")?{sortChanged:o,filterChanged:o,columnRowGroupChanged:o,newColumnsLoaded:o}:{newColumnsLoaded:o})}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const e={skipAriaHidden:!0};if(this.isNeverDisplayed()){this.setDisplayed(!1,e);return}const t=this.column;let s=typeof t?.getColDef().rowDrag=="function",o=!t||this.isCustomGui()||t.isRowDrag(this.rowNode);o&&this.rowNode.footer&&this.gos.get("rowDragManaged")&&(o=!1,s=!0),this.setDisplayed(s||o,e),this.setVisible(o,e)}isNeverDisplayed(){const{gos:e,beans:t}=this;return!!(e.get("suppressRowDrag")||e.get("rowDragManaged")&&t.rowDragSvc.rowDragFeature?.shouldPreventRowMove()&&!t.dragAndDrop?.hasExternalDropZones())}getSelectedNodes(){const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const s=this.beans.selectionSvc?.getSelectedNodes()??[];return s.indexOf(e)!==-1?s:[e]}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]: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){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(t,{mousedown:o=>{o?.preventDefault()}})[0]);const s=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:o=>{const i=o?.dragItem||this.getDragItem(),n=(o?.dropTarget?.rows.length??i.rowNodes?.length)||1,r=this.getRowDragText(this.column);return r?r(i,n):n===1?this.cellValueFn():`${n} ${s("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},ln=class{constructor(){this.reordered=!1,this.removals=new Set,this.updates=new Set,this.adds=new Set}};function Bx(e){const{rowIndex:t,rowPinned:s,column:o}=e;return`${t}.${s??"null"}.${o.getId()}`}function np(e,t){const s=e.column===t.column,o=e.rowPinned===t.rowPinned,i=e.rowIndex===t.rowIndex;return s&&o&&i}function zx(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(V(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function Wx(e,t){return!e&&!t?!0:e&&!t||!e&&t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function _x(e){let t=0,s;const{pinnedRowModel:o,rowModel:i,pageBounds:n}=e;return o?.getPinnedTopRowCount()?s="top":i.getRowCount()?(s=null,t=n.getFirstRow()):o?.getPinnedBottomRowCount()&&(s="bottom"),s===void 0?null:{rowIndex:t,rowPinned:s}}function jx(e){let t,s=null;const{pinnedRowModel:o,pageBounds:i}=e,n=o?.getPinnedBottomRowCount(),r=o?.getPinnedTopRowCount();return n?(s="bottom",t=n-1):e.rowModel.getRowCount()?t=i.getLastRow():r&&(s="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:s}}function Qt(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function uo(e,t){const s=e.spannedRowRenderer?.getCellByPosition(t);if(s)return s;const o=e.rowRenderer.getRowByPosition(t);return o?o.getCellCtrl(t.column):null}function Ux(e,t,s){const{rowModel:o,pinnedRowModel:i}=e;let n;return n??(n=o?.getRowNode(t)),s?n??(n=i?.getPinnedRowById(t,s)):(n??(n=i?.getPinnedRowById(t,"top")),n??(n=i?.getPinnedRowById(t,"bottom"))),n}function Nn(e,t,s=!1){const{rowIndex:o,rowPinned:i}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(o===0)return i==="top"?null:i==="bottom"&&a.isRowsToRender()?{rowIndex:n.getLastRow(),rowPinned:null}:r?.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null;if(s){const l=i?void 0:a.getRow(o);return rp(e,l,!0)??{rowIndex:o-1,rowPinned:i}}return{rowIndex:o-1,rowPinned:i}}function xd(e,t,s=!1){const{rowIndex:o,rowPinned:i}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if($x(e,t))return i==="bottom"?null:i==="top"&&a.isRowsToRender()?{rowIndex:n.getFirstRow(),rowPinned:null}:r?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;if(s){const l=i?void 0:a.getRow(o);return rp(e,l)??{rowIndex:o+1,rowPinned:i}}return{rowIndex:o+1,rowPinned:i}}function rp(e,t,s=!1){const{gos:o,rowRenderer:i}=e;if(!t?.sticky||!jh(o))return;const n=i.getStickyTopRowCtrls(),r=i.getStickyBottomRowCtrls(),a=!r.some(u=>u.rowNode.rowIndex===t.rowIndex),l=a?n:r,c=(s?-1:1)*(a?-1:1);let d;for(let u=0;u<l.length;u++)if(l[u].rowNode.rowIndex===t.rowIndex){d=l[u+c];break}return d?{rowIndex:d.rowNode.rowIndex,rowPinned:null}:void 0}function $x(e,t){const{rowPinned:s,rowIndex:o}=t,{pinnedRowModel:i,pageBounds:n}=e;return s==="top"?(i?.getPinnedTopRowCount()??0)-1<=o:s==="bottom"?(i?.getPinnedBottomRowCount()??0)-1<=o:n.getLastRow()<=o}var wi=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}depthFirstSearchChangedPath(e,t){const{rowNode:s,children:o}=e;if(o)for(let i=0;i<o.length;++i)this.depthFirstSearchChangedPath(o[i],t);t(s)}depthFirstSearchEverything(e,t,s){const o=e.childrenAfterGroup;if(o)for(let i=0,n=o.length;i<n;++i){const r=o[i];r.childrenAfterGroup?this.depthFirstSearchEverything(r,t,s):s&&t(r)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,s=!1){this.active&&!s?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,s=0;for(;!this.mapToItems[t.id];){const o={rowNode:t,children:null};this.mapToItems[t.id]=o,s++,t=t.parent}return s}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let s=e;for(;s;){this.nodeIdsToColumns[s.id]||(this.nodeIdsToColumns[s.id]={});for(const o of t)this.nodeIdsToColumns[s.id][o.getId()]=!0;s=s.parent}}linkPathItems(e,t){let s=e;for(let o=0;o<t;o++){const i=this.mapToItems[s.id],n=this.mapToItems[s.parent.id];n.children||(n.children=[]),n.children.push(i),s=s.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const s=this.createPathItems(e);this.linkPathItems(e,s),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const s=this.nodeIdsToColumns[e.id];return t.filter(i=>s[i.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const s=this.nodeIdsToColumns[e.id];return t.filter(i=>!s[i.getId()])}},Kx=class{constructor(e,t){this.beans=e,this.groupThrottled=!1,this.scrollChanged=!1,this.scrollChanging=!1,this.oldVScroll=null,this.groupTimer=null,this.groupTarget=null,this.onGroupThrottle=()=>{this.groupTimer=null,this.groupThrottled=!0,this.beans.dragAndDrop?.nudge()};const s=()=>t.scrollFeature.getVScrollPosition().top;this.autoScroll=new fx({scrollContainer:t.eBodyViewport,scrollAxis:"y",getVerticalPosition:s,setVerticalPosition:o=>t.scrollFeature.setVerticalScrollPosition(o),onScrollCallback:()=>{const o=s();if(this.oldVScroll!==o){this.oldVScroll=o,this.scrollChanging=!0;return}const i=this.scrollChanging;this.scrollChanged=i,this.scrollChanging=!1,i&&(this.beans.dragAndDrop?.nudge(),this.scrollChanged=!1)}})}updateGroup(e,t){this.groupTarget&&this.groupTarget!==e&&this.clearGroup(),e&&(t&&this.groupThrottled&&!e.expanded&&e.childrenAfterSort?.length&&e.isExpandable()&&e.setExpanded(!0,void 0,!0),e.expanded&&e.childrenAfterSort?.length&&(this.groupThrottled=!0,this.groupTarget=e))}startGroup(e){this.groupTarget=e,this.groupTimer===null&&(this.groupTimer=window.setTimeout(this.onGroupThrottle,this.beans.gos.get("rowDragInsertDelay")))}clearGroup(){this.groupThrottled=!1,this.groupTarget=null;const e=this.groupTimer;e!==null&&(this.groupTimer=null,window.clearTimeout(e))}clear(){this.clearGroup(),this.autoScroll.ensureCleared(),this.oldVScroll=null,this.scrollChanged=!1,this.scrollChanging=!1}},qx=class extends T{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.nudger=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{this.nudger=new Kx(e,t.gridBodyCtrl)})}destroy(){super.destroy(),this.nudger?.clear(),this.nudger=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){return e?.dropTarget?.allowed===!1||this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){const{rowGroupColsSvc:e,filterManager:t,sortSvc:s}=this.beans;return!!((e?.columns??[]).length||t?.isAnyFilterPresent()||s?.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const s=this.beans.selectionSvc?.getSelectedNodes();if(s&&s.indexOf(t)>=0)return s.slice().sort(Qx)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:s,beans:o}=this;if(t){const r=this.getRowNodes(e);e.dragItem.rowNodes=r,Dd(r,!0)}this.lastDraggingEvent=e;const i=e.fromNudge,n=this.makeRowsDrop(s,e,i,!1);o.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e),n?.rowDragManaged&&n.moved&&n.allowed&&n.sameGrid&&!n.suppressMoveWhenRowDragging&&(!i&&!this.nudger?.autoScroll.scrolling||this.nudger?.scrollChanged)&&this.dropRows(n),this.nudger?.autoScroll.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,s,o){const{beans:i,gos:n}=this,r=this.newRowsDrop(t,o),a=i.rowModel;if(t.dropTarget=r,t.changed=!1,!r)return null;let{sameGrid:l,rootNode:c,source:d,target:u,rows:h}=r;u??(u=a.getRow(a.getRowCount()-1)??null);const g=!!this.beans.groupStage?.treeData&&l;let f=null;if(u?.footer){const S=cn(a,-1,u)??cn(a,1,u);f=u.sibling??c,u=S??null}u?.detail&&(u=u.parent),r.moved&&(r.moved=d!==u);let m=.5;if(u&&(l&&r.moved&&(f||!g)?m=d.rowIndex>u.rowIndex?-.5:.5:m=(r.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!g&&l&&u&&r.moved&&Ne(n)){const S=Xx(a,r);S&&(m=d.rowIndex>S.rowIndex?-.5:.5,u=S,r.moved&&(r.moved=d!==u))}const v=this.nudger;v?.updateGroup(u,s),g&&!f&&v&&(!u||m>=.5&&u.rowIndex===i.pageBounds.getLastRow()?f=c:r.moved&&this.targetShouldBeParent(u,m,h)&&(v.groupThrottled&&(f=u),!s&&(!f||u&&!u.expanded&&u.childrenAfterSort?.length)&&v.startGroup(u)),f??(f=u?.parent??c));let w=!1;if(f){if(f===u&&f!==c){const S=f.expanded?cn(a,1,u):null;S?.parent===f?(u=S,m=-.5):w=!0}if(u&&!w){let S=u;for(;S&&S!==c&&S!==f;)u=S,S=S.parent}}r.target=u,r.newParent=f,r.moved&&(r.moved=d!==u);const b=m<0?"above":"below";return r.position=r.moved?w?"inside":b:"none",this.validateRowsDrop(r,g,b,o),t.changed||(t.changed=Zx(e?.dropTarget,r)),r}newRowsDrop(e,t){const{beans:s,gos:o}=this,i=s.rowModel.rootNode,n=Ne(o)?o.get("rowDragManaged"):!1,r=o.get("suppressMoveWhenRowDragging"),a=this.isFromThisGrid(e);let{rowNode:l,rowNodes:c}=e.dragItem;if(c||(c=l?[l]:[]),l||(l=c[0]),!l||!i)return null;const d=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;n&&(!c.length||this.shouldPreventRowMove()||(r||!a)&&!d)&&(u=!1);const h=hd(s,e).y,g=this.getOverNode(h);return{api:s.gridApi,context:s.gridOptions.context,draggingEvent:e,rowDragManaged:n,suppressMoveWhenRowDragging:r,sameGrid:a,withinGrid:d,rootNode:i,moved:l!==g,y:h,overNode:g,overIndex:g?.rowIndex??-1,position:"none",source:l,target:g??null,newParent:null,rows:c,allowed:u,highlight:!t&&n&&r&&(d||!a)}}validateRowsDrop(e,t,s,o){const{rowDragManaged:i,suppressMoveWhenRowDragging:n}=e;t||(e.newParent=null),n&&!e.moved&&(e.allowed=!1);const r=(!i||e.allowed)&&this.gos.get("isRowValidDropPosition");if(r){t&&e.newParent&&Fd(e.rows,e.newParent)&&(e.newParent=null);const a=r(e);if(!a)e.allowed=!1;else if(typeof a=="object"){a.rows!==void 0&&(e.rows=a.rows??[]),t&&a.newParent!==void 0&&(e.newParent=a.newParent),a.target!==void 0&&(e.target=a.target),a.position&&(e.position=a.position),a.allowed!==void 0?e.allowed=a.allowed:i||(e.allowed=!0);const l=e.draggingEvent;a.changed&&l&&(l.changed=!0),!o&&a.highlight!==void 0&&(e.highlight=a.highlight)}}i&&(e.rows=this.filterRows(e)),t&&e.newParent&&Fd(e.rows,e.newParent)&&(e.newParent=null),n&&(!e.rows.length||e.position==="none")&&(e.allowed=!1),(!e.allowed||!e.newParent)&&e.position==="inside"&&(e.position=s)}targetShouldBeParent(e,t,s){const o=e.rowIndex,i=.25;if(t<-.5+i)return!1;if(t<.5-i)return!0;let n,r=o+1;const a=this.beans.rowModel;do n=a.getRow(r++);while(n?.footer);const l=e.childrenAfterGroup;if(n&&n.parent===e&&l?.length){const c=new Set(s);for(const d of l)if(d.rowIndex!==null&&!c.has(d))return!0}return!1}addRowDropZone(e){if(!e.getContainer()){L(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){L(56);return}const s=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(i=>e.onDragEnter(this.rowDragEvent("rowDragEnter",i))),onDragLeave:e.onDragLeave&&(i=>e.onDragLeave(this.rowDragEvent("rowDragLeave",i))),onDragging:e.onDragging&&(i=>e.onDragging(this.rowDragEvent("rowDragMove",i))),onDragStop:e.onDragStop&&(i=>e.onDragStop(this.rowDragEvent("rowDragEnd",i))),onDragCancel:e.onDragCancel&&(i=>e.onDragCancel(this.rowDragEvent("rowDragCancel",i)))},o={isInterestedIn:i=>i===2,getIconName:()=>"move",external:!0,...s};t.addDropTarget(o),this.addDestroyFunc(()=>t.removeDropTarget(o))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:s=>{this.onDragEnter(s),e?.onDragEnter?.(this.rowDragEvent("rowDragEnter",s))},onDragLeave:s=>{this.onDragLeave(s),e?.onDragLeave?.(this.rowDragEvent("rowDragLeave",s))},onDragging:s=>{this.onDragging(s),e?.onDragging?.(this.rowDragEvent("rowDragMove",s))},onDragStop:s=>{this.onDragStop(s),e?.onDragStop?.(this.rowDragEvent("rowDragEnd",s))},onDragCancel:s=>{this.onDragCancel(s),e?.onDragCancel?.(this.rowDragEvent("rowDragCancel",s))},fromGrid:!0}}getOverNode(e){const{pageBounds:t,rowModel:s}=this.beans,i=e>t.getCurrentPagePixelRange().pageLastPixel?-1:s.getRowIndexAtPixel(e);return i>=0?s.getRow(i):void 0}rowDragEvent(e,t){const s=this.beans,{dragItem:o,dropTarget:i,event:n,vDirection:r}=t,a=i?.rootNode===s.rowModel.rootNode,l=a?i.y:hd(s,t).y,c=a?i.overNode:this.getOverNode(l),d=a?i.overIndex:c?.rowIndex??-1;return{api:s.gridApi,context:s.gridOptions.context,type:e,event:n,node:o.rowNode,nodes:o.rowNodes,overIndex:d,overNode:c,y:l,vDirection:r,rowsDrop:i}}dispatchGridEvent(e,t){const s=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(s)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e)}onDragStop(e){const t=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),t?.allowed&&t.rowDragManaged&&(t.suppressMoveWhenRowDragging||!t.sameGrid||this.nudger?.autoScroll.scrolling)&&this.dropRows(t),this.stopDragging(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e)}stopDragging(e){this.nudger?.clear(),this.beans.rowDropHighlightSvc?.fromDrag(null),Dd(e.dragItem.rowNodes,!1)}dropRows(e){return e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:s}){const o=Fo(this.gos),i=this.beans.rowModel,n=s.filter(({data:a,rowPinned:l})=>!i.getRowNode(o?.({data:a,level:0,rowPinned:l})??a.id)).map(({data:a})=>a);if(n.length===0)return!1;const r=t?Ed(t)+(e==="above"?0:1):void 0;return i.updateRowData({add:n,addIndex:r}),!0}filterRows({newParent:e,rows:t}){let s;for(let o=0,i=t.length;o<i;++o){let n=!0;const r=t[o];(!r||r.footer||r.rowTop===null&&r!==this.beans.rowModel.getRowNode(r.id)||e&&r.parent!==e&&Yx(r,e)||!Va(r))&&(n=!1),n?s?.push(r):s??(s=t.slice(0,o))}return s??t}csrmMoveRows({position:e,target:t,rows:s,newParent:o,rootNode:i}){let n=!1;const r=new Set;for(const h of s){o&&h.parent!==o&&(h.treeParent=o,n=!0);const g=Va(h);g&&r.add(g)}if(!n&&r.size===0)return!1;const a=this.beans.focusSvc,l=a.getFocusedCell(),c=l&&uo(this.beans,l);if(r.size&&this.reorderLeafChildren(r,...this.getMoveRowsBounds(r,t,e==="above"))&&(n=!0),!n)return!1;const d=this.beans.rowModel,u=new ln;return u.reordered=!0,d.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedPath:new wi(!1,i),changedRowNodes:u}),c?c.focusCell():a.clearFocusedCell(),!0}getMoveRowsBounds(e,t,s){const o=this.beans.rowModel.rootNode?._leafs?.length??0;let i=t?Ed(t):-1;i<0||i>=o?i=o:s||++i;let n=i,r=Math.min(i,o-1);for(const a of e){const l=a.sourceRowIndex;l<n&&(n=l),l>r&&(r=l)}return[n,i,r]}reorderLeafChildren(e,t,s,o){let i=!1;const n=this.beans.rowModel.rootNode?._leafs;if(!e.size||!n)return!1;let r=t;for(let l=t;l<s;++l){const c=n[l];e.has(c)||(c.sourceRowIndex!==r&&(c.sourceRowIndex=r,n[r]=c,i=!0),++r)}let a=o;for(let l=o;l>=s;--l){const c=n[l];e.has(c)||(c.sourceRowIndex!==a&&(c.sourceRowIndex=a,n[a]=c,i=!0),--a)}for(const l of e)l.sourceRowIndex!==r&&(l.sourceRowIndex=r,n[r]=l,i=!0),++r;return i}},cn=(e,t,s)=>{if(s){const o=e.getRowCount();let i=s.rowIndex+t;for(;i>=0&&i<o;){const n=e.getRow(i);if(!n||!n.footer&&!n.detail)return n;i+=t}}},Yx=(e,t)=>{let s=t;for(;s;){if(s===e)return!0;s=s.parent}return!1},Fd=(e,t)=>{for(let s=0,o=e.length;s<o;++s)if(e[s].parent!==t)return!1;return!0},Ed=e=>{const t=Va(e);return t!==void 0?t.sourceRowIndex:-1},Va=e=>e.data?e:Ag(e.childrenAfterGroup),Zx=(e,t)=>e!==t&&(!e||e.sameGrid!==t.sameGrid||e.allowed!==t.allowed||e.position!==t.position||e.target!==t.target||e.source!==t.source||e.newParent!==t.newParent||!Cs(e.rows,t.rows)),Qx=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,Dd=(e,t)=>{for(let s=0,o=e?.length||0;s<o;++s){const i=e[s];i.dragging!==t&&(i.dragging=t,i.dispatchRowEvent("draggingChanged"))}},Xx=(e,t)=>{let s=null,o=t.target;if(o&&t.rows.indexOf(o)<0)return null;const i=t.source;if(!o||!i)return null;let n=o.rowIndex-i.rowIndex;const r=n<0?-1:1;n=t.suppressMoveWhenRowDragging?Math.abs(n):1;const a=new Set(t.rows);do{const l=cn(e,r,o);if(!l)break;a.has(l)||(s=l,--n),o=l}while(n>0);return s},Jx=class extends T{constructor(){super(...arguments),this.beanName="rowDragSvc"}setupRowDrag(e,t){const s=t.createManagedBean(new qx(e)),o=this.beans.dragAndDrop;o.addDropTarget(s),t.addDestroyFunc(()=>o.removeDropTarget(s)),this.rowDragFeature=s}createRowDragComp(e,t,s,o,i,n){return new Vx(e,t,s,o,i,n)}createRowDragCompForRow(e,t){if(ps(this.gos))return;const s=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${s("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,s,o,i,n){const r=this.gos;return r.get("rowDragManaged")&&(!Ne(r)||r.get("pagination"))?void 0:this.createRowDragComp(s,e,t,o,i,n)}},e2=class extends T{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const e=this.row,t=this.dragging;!e||e?.rowIndex===null||this.position==="none"?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){const e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){const s=e!==this.row,o=e.uiLevel,i=t!==this.position,n=o!==this.uiLevel;this.dragging=!1,(s||i||n)&&(s&&this.clear(),this.uiLevel=o,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:s,target:o,position:i}=t;if(s&&o&&i!=="none"){this.set(o,i),this.dragging=!0;return}}this.dragging&&this.clear()}},ap={moduleName:"Drag",version:G,beans:[Nx]},t2={moduleName:"DragAndDrop",version:G,dynamicBeans:{dndSourceComp:Mx},icons:{rowDrag:"grip"}},lp={moduleName:"SharedDragAndDrop",version:G,beans:[Sy],dependsOn:[ap],userComponents:{agDragAndDropImage:KR},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},s2={moduleName:"RowDrag",version:G,beans:[e2,Jx],apiFunctions:{addRowDropZone:Ix,removeRowDropZone:kx,getRowDropZoneParams:Ax,getRowDropPositionIndicator:Lx,setRowDropPositionIndicator:Ox},dependsOn:[lp]},o2={moduleName:"HorizontalResize",version:G,beans:[Hx],dependsOn:[ap]},i2=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",n2=class extends T{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:s,executeLaterFuncs:o}=this;if(s.length===0&&o.length===0){e(),t();return}const i=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),i(s)},0),window.setTimeout(()=>{t(),i(o)},200)})}};function r2(e,t,s){e.colMoves?.moveColumnByIndex(t,s,"api")}function a2(e,t,s){e.colMoves?.moveColumns(t,s,"api")}var l2=class extends T{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;if(t)for(const s of t)s.isPrimary()&&(s.isAnyFunctionActive()||(s.isAllowValue()?this.columnsToAggregate.push(s):s.isAllowRowGroup()?this.columnsToGroup.push(s):s.isAllowPivot()&&this.columnsToPivot.push(s)))}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:s,pivotColsSvc:o}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&s?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&o?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function c2(e,t){!t||t.length<=1||t.filter(o=>e.indexOf(o)<0).length>0||t.sort((o,i)=>{const n=e.indexOf(o),r=e.indexOf(i);return n-r})}function d2(e){const t=[...e];for(const s of e){let o=null,i=s.getParent();for(;i!=null&&i.getDisplayedLeafColumns().length===1;)o=i,i=i.getParent();if(o!=null){const r=!!o.getColGroupDef()?.marryChildren?o.getProvidedColumnGroup().getLeafColumns():o.getLeafColumns();for(const a of r)t.includes(a)||t.push(a)}}return t}function u2(e,t,s,o){const i=o.allCols;let n=null,r=null;for(let a=0;a<e.length;a++){const l=e[a],c=s.getProposedColumnOrder(t,l);if(!s.doesOrderPassRules(c))continue;const d=c.filter(h=>i.includes(h));if(r===null)r=d;else if(!Cs(d,r))break;const u=g2(c);(n===null||u<n.fragCount)&&(n={move:l,fragCount:u})}return n}function cp(e){const{isFromHeader:t,fromLeft:s,xPosition:o,fromEnter:i,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:c,visibleCols:d}=e;let{allMovingColumns:u}=e;t&&(u=d2(u));const h=u.slice();c2(l.getCols(),h);const g=f2({movingCols:h,draggingRight:s,xPosition:o,pinned:r,gos:a,colModel:l,visibleCols:d}),f=h2(h,l);if(g.length===0)return;const m=g[0];if(f!==null&&(t||!i)&&!n&&(!s&&m>=f||s&&m<=f))return;const w=u2(g,h,c,d);if(!w)return;const b=w.move;if(!(b>l.getCols().length-h.length))return{columns:h,toIndex:b}}function dp(e){const{columns:t,toIndex:s}=cp(e)||{},{finished:o,colMoves:i}=e;return!t||s==null?null:(i.moveColumns(t,s,"uiColumnMoved",o),o?null:{columns:t,toIndex:s})}function h2(e,t){const s=t.getCols(),o=e.map(l=>s.indexOf(l)).sort((l,c)=>l-c),i=o[0];return ye(o)-i!==o.length-1?null:i}function g2(e){function t(o){const i=[];let n=o.getOriginalParent();for(;n!=null;)i.push(n),n=n.getOriginalParent();return i}let s=0;for(let o=0;o<e.length-1;o++){let i=t(e[o]),n=t(e[o+1]);[i,n]=i.length>n.length?[i,n]:[n,i];for(const r of i)n.indexOf(r)===-1&&s++}return s}function p2(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function f2(e){const{movingCols:t,draggingRight:s,xPosition:o,pinned:i,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(S=>S.getColDef().suppressMovable))return[];const c=p2(a,i),d=r.getCols(),u=c.filter(S=>t.includes(S)),h=c.filter(S=>!t.includes(S)),g=d.filter(S=>!t.includes(S));let f=0,m=o;if(s){let S=0;for(const R of u)S+=R.getActualWidth();m-=S}if(m>0){for(let S=0;S<h.length;S++){const R=h[S];if(m-=R.getActualWidth(),m<0)break;f++}s&&f++}let v;if(f>0){const S=h[f-1];v=g.indexOf(S)+1}else v=g.indexOf(h[0]),v===-1&&(v=0);const w=[v],b=(S,R)=>S-R;if(s){let S=v+1;const R=d.length-1;for(;S<=R;)w.push(S),S++;w.sort(b)}else{let S=v;const R=d.length-1;let y=d[S];for(;S<=R&&c.indexOf(y)<0;)S++,w.push(S),y=d[S];S=v-1;const x=0;for(;S>=x;)w.push(S),S--;w.sort(b).reverse()}return w}function Ba(e){const{pinned:t,fromKeyboard:s,gos:o,ctrlsSvc:i,useHeaderRow:n,skipScrollPadding:r}=e;let a=i.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(s&&(l-=a.getBoundingClientRect().left),o.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=i.get("center").getCenterViewportScrollLeft()),l):0}function Kr(e,t){for(const s of e)s.moving=t,s.dispatchColEvent("movingChanged","uiColumnMoved")}var Pd=7,za=100,Ki=za/2,m2=5,C2=100,v2=class extends T{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!V(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:s}=t||{},o=s?.columns??[];for(const i of o){const n=i.getPinned();if(i.getColDef().lockPinned){if(n==e)return"move";continue}const r=s?.containerType;if(r===e||!e)return"move";if(e&&(!n||r!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,s=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(s,!0,"uiColumnDragged");else{const i=t.visibleState,n=(s||[]).filter(r=>i[r.getId()]&&!r.isVisible());this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(s,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,s=!1,o=!1){const{gos:i,ctrlsSvc:n}=this.beans,r=i.get("suppressMoveWhenColumnDragging");if(o&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!o&&Ie(e.hDirection))return;const a=Ba({x:e.x,pinned:this.pinned,gos:i,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,s,a,o):this.handleColumnDragWhileAllowingMovement(e,t,s,a,o)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,s){if(!e?.length)return;const o=e.filter(i=>!i.getColDef().lockVisible);o.length&&this.beans.colModel.setColsVisible(o,t,s)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:s}=e;this.beans.colMoves.moveColumns(t,s,"uiColumnMoved",!0)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,s,o,i){const n=this.getAllMovingColumns(e,!0);if(i){const r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(n,r)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:l,fromEnter:t,fakeEvent:s,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,o)}}handleColumnDragWhileAllowingMovement(e,t,s,o,i){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:a,xPosition:o,fromLeft:r,fromEnter:t,fakeEvent:s}),c=dp({...l,finished:i});c&&(this.lastMovedInfo=c)}getAllMovingColumns(e,t=!1){const s=e.dragSource.getDragItem();let o=null;t?(o=s.columnsInSplit,o||(o=s.columns)):o=s.columns;const i=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return o?o.filter(i):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:s,xPosition:o,fromLeft:i,fromEnter:n,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:c,visibleCols:d}=this.beans;return{allMovingColumns:t,isFromHeader:s,fromLeft:i,xPosition:o,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:c,visibleCols:d}}highlightHoveredColumn(e,t){const{gos:s,colModel:o}=this.beans,i=s.get("enableRtl"),n=o.getCols().filter(d=>d.isVisible()&&d.getPinned()===this.pinned);let r=null,a=null,l=null;for(const d of n){if(a=d.getActualWidth(),r=this.getNormalisedColumnLeft(d,0,i),r!=null){const u=r+a;if(r<=t&&u>=t){l=d;break}}r=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let d=n.length-1;d>=0;d--){const u=n[d],h=n[d].getParent();if(!h){l=u;break}const g=h?.getDisplayedLeafColumns();if(g.length){l=ye(g);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,i),a=l.getActualWidth()}if(this.lastHighlightedColumn?.column!==l&&this.clearHighlighted(),l==null||r==null||a==null)return;let c;t-r<a/2!==i?c=0:c=1,Td(l,c),this.lastHighlightedColumn={column:l,position:c}}getNormalisedXPositionInfo(e,t){const{gos:s,visibleCols:o}=this.beans,i=s.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,i);if(!n||!r||a==null)return;const l=o.allCols,c=l.indexOf(n),d=l.indexOf(r),u=a===0!==i,h=c<d||c===d&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),d+g===c)return;const f=l[d+g];if(!f)return;const m=this.getNormalisedColumnLeft(f,20,i);return{fromLeft:h,xPosition:m}}getColumnMoveAndTargetInfo(e,t,s){const o=this.lastHighlightedColumn||{},{firstMovingCol:i,lastMovingCol:n}=w2(e);if(!i||!n||o.column||!t)return{firstMovingCol:i,...o};const a=this.getPinDirection()==="left";return{firstMovingCol:i,position:a?1:0,column:a!==s?i:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,s){const{gos:o,ctrlsSvc:i}=this.beans,n=e.getLeft();if(n==null)return null;const r=e.getActualWidth();return Ba({x:s?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:s,skipScrollPadding:!0,gos:o,ctrlsSvc:i})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,s=this.failedMoveAttempts>Pd;return t&&s||e.some(o=>o.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:s,fromEnter:o,fakeEvent:i,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:s,fromLeft:n,fromEnter:o,fakeEvent:i}),{columns:a,toIndex:l}=cp(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(Td(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),s=t.getCenterViewportScrollLeft(),o=s+t.getCenterWidth();let i,n;this.gos.get("enableRtl")?(i=e<s+Ki,n=e>o-Ki):(n=e<s+Ki,i=e>o-Ki),this.needToMoveRight=i,this.needToMoveLeft=n,n||i?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),C2),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*m2,e>za&&(e=za);let t=null;const s=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=s.scrollHorizontally(-e):this.needToMoveRight&&(t=s.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:o,dragAndDrop:i,gos:n}=this.beans;if(this.failedMoveAttempts<=Pd+1||!o)return;if(i.setDragImageCompIcon("pinned"),!n.get("suppressMoveWhenColumnDragging")){const r=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(r,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,s=!1){const o=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!o.length)return 0;s&&(t=this.getPinDirection());const{pinnedCols:i,dragAndDrop:n}=this.beans;return i?.setColsPinned(o,t,"uiColumnDragged"),s&&n.nudge(),o.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function Td(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function w2(e){const t=e.length;let s,o;for(let i=0;i<t;i++){if(!s){const n=e[i];n.getLeft()!=null&&(s=n)}if(!o){const n=e[t-1-i];n.getLeft()!=null&&(o=n)}if(s&&o)break}return{firstMovingCol:s,lastMovingCol:o}}var b2=class extends T{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,s=this.pinned;e.whenReady(this,o=>{let i;const n=o.gridBodyCtrl.eBodyViewport;switch(s){case"left":i=[[n,o.left.eContainer],[o.bottomLeft.eContainer],[o.topLeft.eContainer]];break;case"right":i=[[n,o.right.eContainer],[o.bottomRight.eContainer],[o.topRight.eContainer]];break;default:i=[[n,o.center.eViewport],[o.bottomCenter.eViewport],[o.topCenter.eViewport]];break}this.eSecondaryContainers=i}),this.moveColumnFeature=this.createManagedBean(new v2(s)),this.bodyDropPivotTarget=this.createManagedBean(new l2(s)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},S2=class extends T{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,s){const o=this.beans.colModel.getCols();if(!o)return;const i=o[e];this.moveColumns([i],t,s)}moveColumns(e,t,s,o=!0){const{colModel:i,colAnimation:n,visibleCols:r,eventSvc:a}=this.beans,l=i.getCols();if(!l)return;if(t>l.length-e.length){L(30,{toIndex:t});return}n?.start();const c=i.getColsForKeys(e);this.doesMovePassRules(c,t)&&(Kc(i.getCols(),c,t),r.refresh(s),a.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,toIndex:t,finished:o,source:s})),n?.finish()}doesMovePassRules(e,t){const s=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(s)}doesOrderPassRules(e){const{colModel:t,gos:s}=this.beans;return!(!og(e,t.getColTree())||!(i=>{const n=c=>c?c==="left"||c===!0?-1:1:0,r=s.get("enableRtl");let a=r?1:-1,l=!0;for(const c of i){const d=n(c.getColDef().lockPosition);r?d>a&&(l=!1):d<a&&(l=!1),a=d}return l})(e))}getProposedColumnOrder(e,t){const o=this.beans.colModel.getCols().slice();return Kc(o,e,t),o}createBodyDropTarget(e,t){return new b2(e,t)}moveHeader(e,t,s,o,i){const{ctrlsSvc:n,gos:r,colModel:a,visibleCols:l,focusSvc:c}=this.beans,d=t.getBoundingClientRect(),u=d.left,h=Be(s),g=h?d.width:s.getActualWidth(),f=e==="left"!==r.get("enableRtl"),m=Ba({x:f?u-20:u+g+20,pinned:o,fromKeyboard:!0,gos:r,ctrlsSvc:n}),v=c.focusedHeader;dp({allMovingColumns:h?s.getLeafColumns():[s],isFromHeader:!0,fromLeft:e==="right",xPosition:m,pinned:o,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let w;if(h){const b=s.getDisplayedLeafColumns();w=f?b[0]:ye(b)}else w=s;if(n.getScrollFeature().ensureColumnVisible(w,"auto"),(!i.isAlive()||r.get("ensureDomOrder"))&&v){let b;if(h){const S=s.getGroupId(),R=s.getLeafColumns();if(!R.length)return;const y=R[0].getParent();if(!y)return;b=y2(y,S)}else b=s;b&&c.focusHeaderPosition({headerPosition:{...v,column:b}})}}setDragSourceForHeader(e,t,s){const{gos:o,colModel:i,dragAndDrop:n,visibleCols:r}=this.beans;let a=!o.get("suppressDragLeaveHidesColumns");const l=Be(t),c=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>x2(t,r.allCols):()=>R2(t),dragItemName:s,onDragStarted:()=>{a=!o.get("suppressDragLeaveHidesColumns"),Kr(c,!0)},onDragStopped:()=>Kr(c,!1),onDragCancelled:()=>Kr(c,!1),onGridEnter:h=>{if(a){const{columns:g=[],visibleState:f}=h??{},m=l?w=>!f||f[w.getColId()]:()=>!0,v=g.filter(w=>!w.getColDef().lockVisible&&m(w));i.setColsVisible(v,!0,"uiColumnMoved")}},onGridExit:h=>{if(a){const g=h?.columns?.filter(f=>!f.getColDef().lockVisible)||[];i.setColsVisible(g,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function y2(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function R2(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function x2(e,t){const s=e.getProvidedColumnGroup().getLeafColumns(),o={};for(const a of s)o[a.getId()]=a.isVisible();const i=[];for(const a of t)s.indexOf(a)>=0&&(i.push(a),Et(s,a));for(const a of s)i.push(a);const n=[],r=e.getLeafColumns();for(const a of i)r.indexOf(a)!==-1&&n.push(a);return{columns:i,columnsInSplit:n,visibleState:o,containerType:n[0]?.pinned}}var F2={moduleName:"ColumnMove",version:G,beans:[S2,n2],apiFunctions:{moveColumnByIndex:r2,moveColumns:a2},dependsOn:[lp],css:[i2]},E2=class extends T{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const s=this.getHeaderCellForColumn(e);if(!s)return-1;const o=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||o.push(s),this.getPreferredWidthForElements(o)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const s=document.createElement("form");s.style.position="fixed";const o=this.centerRowContainerCtrl.eContainer;for(const n of e)this.cloneItemIntoDummy(n,s);o.appendChild(s);const i=s.offsetWidth;return s.remove(),t=t??this.gos.get("autoSizePadding"),i+t}getHeaderCellForColumn(e){let t=null;for(const s of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const o=s.getHtmlElementForColumnHeader(e);o!=null&&(t=o)}return t}cloneItemIntoDummy(e,t){const s=e.cloneNode(!0);s.style.width="",s.style.position="static",s.style.left="";const o=document.createElement("div"),i=o.classList;["ag-header-cell","ag-header-group-cell"].some(a=>s.classList.contains(a))?(i.add("ag-header","ag-header-row"),o.style.position="static"):i.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(l=>r.classList.contains(l))){for(let l=0;l<r.classList.length;l++){const c=r.classList[l];c!="ag-row-position-absolute"&&i.add(c)}break}r=r.parentElement}o.appendChild(s),t.appendChild(o)}},up={moduleName:"AutoWidth",version:G,beans:[E2]};function D2(e,t,s=!0,o="api"){e.colResize?.setColumnWidths(t,!1,s,o)}var P2=class extends T{constructor(e,t,s,o){super(),this.comp=e,this.eResize=t,this.pinned=s,this.columnGroup=o}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:s}=this.beans,o=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(o),!t.get("suppressAutoSize")&&s&&this.addDestroyFunc(s.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:s,resizeRatios:o,groupAfterColumns:i,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=s,this.resizeRatios=o,this.resizeTakeFromCols=i,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,s="uiColumnResized"){const o=this.normaliseDragChange(t),i=this.resizeStartWidth+o;this.resizeColumnsFromLocalValues(i,s,e)}getInitialValues(e){const t=l=>l.reduce((c,d)=>c+d.getActualWidth(),0),s=(l,c)=>l.map(d=>d.getActualWidth()/c),o=this.getColumnsToResize(),i=t(o),n=s(o,i),r={columnsToResize:o,resizeStartWidth:i,resizeRatios:n};let a=null;if(e&&(a=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),a){const l=a.getDisplayedLeafColumns(),c=r.groupAfterColumns=l.filter(u=>u.isResizable()),d=r.groupAfterStartWidth=t(c);r.groupAfterRatios=s(c,d)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),s=this.getInitialValues();t>s.resizeStartWidth&&this.resizeColumns(s,t,e,!0)}resizeColumnsFromLocalValues(e,t,s=!0){if(!this.resizeCols||!this.resizeRatios)return;const o={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(o,e,t,s)}resizeColumns(e,t,s,o=!0){const{columnsToResize:i,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:c}=e,d=[];if(d.push({columns:i,ratios:r,width:t}),a){const u=t-n;d.push({columns:a,ratios:c,width:l-u})}this.beans.colResize?.resizeColumnSets({resizeSets:d,finished:o,source:s}),o&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}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.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},T2=class extends T{constructor(e,t,s,o,i){super(),this.pinned=e,this.column=t,this.eResize=s,this.comp=o,this.ctrl=i}postConstruct(){const e=[];let t,s;const o=()=>{if(ke(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:a}=this.beans,l=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),s&&a&&e.push(a.addColumnAutosizeListeners(this.eResize,this.column))},i=()=>{for(const r of e)r();e.length=0},n=()=>{const r=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||a!==s)&&(t=r,s=a,i(),o())};n(),this.addDestroyFunc(i),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:s,lastResizeAmount:o,resizeStartWidth:i,beans:n}=this,r=this.normaliseResizeAmount(t),a=i+r,l=[{key:s,newWidth:a}],{pinnedCols:c,ctrlsSvc:d,colResize:u}=n;if(this.column.getPinned()){const h=c?.leftWidth??0,g=c?.rightWidth??0,f=gi(d.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-o)>f)return}this.lastResizeAmount=r,u?.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.column.resizing=e,this.comp.toggleCss("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const s=this.pinned!=="left",o=this.pinned==="right";return this.gos.get("enableRtl")?s&&(t*=-1):o&&(t*=-1),t}},M2=class extends T{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,s,o){const i=[],{colModel:n,gos:r,visibleCols:a}=this.beans;for(const l of e){const c=n.getColDefCol(l.key)||n.getCol(l.key);if(!c)continue;if(i.push({width:l.newWidth,ratios:[1],columns:[c]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=a.getColAfter(c);if(!u)continue;const h=c.getActualWidth()-l.newWidth,g=u.getActualWidth()+h;i.push({width:g,ratios:[1],columns:[u]})}}i.length!==0&&this.resizeColumnSets({resizeSets:i,finished:s,source:o})}resizeColumnSets(e){const{resizeSets:t,finished:s,source:o}=e;if(!(!t||t.every(d=>I2(d)))){if(s){const d=t&&t.length>0?t[0].columns:null;Eo(this.eventSvc,d,s,o)}return}const n=[],r=[];for(const d of t){const{width:u,columns:h,ratios:g}=d,f={},m={};for(const b of h)r.push(b);let v=!0,w=0;for(;v;){if(w++,w>1e3){be(31);break}v=!1;const b=[];let S=0,R=u;h.forEach((x,F)=>{if(m[x.getId()])R-=f[x.getId()];else{b.push(x);const M=g[F];S+=M}});const y=1/S;b.forEach((x,F)=>{const P=F===b.length-1;let M;P?M=R:(M=Math.round(g[F]*u*y),R-=M);const A=x.getMinWidth(),E=x.getMaxWidth();M<A?(M=A,m[x.getId()]=!0,v=!0):E>0&&M>E&&(M=E,m[x.getId()]=!0,v=!0),f[x.getId()]=M})}for(const b of h){const S=f[b.getId()];b.getActualWidth()!==S&&(b.setActualWidth(S,o),n.push(b))}}const a=n.length>0;let l=[];if(a){const{colFlex:d,visibleCols:u,colViewport:h}=this.beans;l=d?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(o),u.updateBodyWidths(),h.checkViewportColumns()}const c=r.concat(l);(a||s)&&Eo(this.eventSvc,c,s,o,l)}resizeHeader(e,t,s){if(!e.isResizable())return;const o=e.getActualWidth(),i=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(o+t,i),n);this.setColumnWidths([{key:e,newWidth:r}],s,!0,"uiColumnResized")}createResizeFeature(e,t,s,o,i){return new T2(e,t,s,o,i)}createGroupResizeFeature(e,t,s,o){return new P2(e,t,s,o)}};function I2(e){const{columns:t,width:s}=e;let o=0,i=0,n=!0;for(const l of t){const c=l.getMinWidth();o+=c||0;const d=l.getMaxWidth();d>0?i+=d:n=!1}const r=s>=o,a=!n||s<=i;return r&&a}var k2={moduleName:"ColumnResize",version:G,beans:[M2],apiFunctions:{setColumnWidths:D2},dependsOn:[o2,up]},A2=class extends T{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);for(const t of this.columnGroup.getLeafColumns())t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})}removeListenersOnChildrenColumns(){for(const e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}},L2=class extends Ul{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,s,o,i){const{column:n,beans:r}=this,{context:a,colNames:l,colHover:c,rangeSvc:d,colResize:u}=r;this.comp=e,i=Ei(this,a,i),this.setGui(t,i),this.displayName=l.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(i),this.setupExpandable(i),this.setupTooltip(),this.setupAutoHeight({wrapperElement:o,compBean:i}),this.setupUserComp(),this.addHeaderMouseListeners(i),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();c?.createHoverFeature(i,g,t),d?.createRangeHighlightFeature(i,n,e),i.createManagedBean(new jl(n,t,r)),i.createManagedBean(new A2(e,n)),u?this.resizeFeature=i.createManagedBean(u.createGroupResizeFeature(e,s,h,n)):e.setResizableDisplayed(!1),i.createManagedBean(new Oo(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(i,g),i.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(i),i.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.getDefinition();return X(t.gos,{colDef:s,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,s=e.get("groupHeaderHeight");s!=null?s===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(s):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const s of t)e.addManagedListeners(s,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,s)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),s=t[0]===e,o=ye(t)===e;if(!s&&!o)return;const i=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let r=!1,a=!1;if(n){const l=this.beans.gos.get("enableRtl"),c=i===1,d=i===0;s&&(l?a=c:r=d),o&&(l?r=d:a=c)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:s}=this;if(!s)return;const o=s.getInitialValues(t);s.resizeColumns(o,o.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:s,enterpriseMenuFactory:o}=this.beans,i=this.column,n=i.getProvidedColumnGroup(),r=X(s,{displayName:this.displayName,columnGroup:i,setExpanded:l=>{e.setColumnGroupOpened(n,l,"gridInitializing")},setTooltip:(l,c)=>{s.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,c)},showColumnMenu:(l,c)=>o?.showMenuAfterButtonClick(n,l,"columnMenu",c),showColumnMenuAfterMouseClick:(l,c)=>o?.showMenuAfterMouseEvent(n,l,"columnMenu",c),eGridHeader:this.eGui}),a=K0(t,r);a&&this.comp.setUserCompDetails(a)}addHeaderMouseListeners(e){const t=i=>this.handleMouseOverChange(i.type==="mouseenter"),s=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),o=i=>this.handleContextMenuMouseEvent(i,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:s,contextmenu:o})}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const s=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:s,expandableChanged:s})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),s=Kg(t,this.gos,null,e);e.isPadding()?(s.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(i=>i.isSpanHeaderHeight())&&s.push("ag-header-span-height")):(s.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&s.push("ag-header-cell-wrap-text"));for(const o of s)this.comp.toggleCss(o,!0)}setupMovingCss(e){const{column:t}=this,o=t.getProvidedColumnGroup().getLeafColumns(),i=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const n of o)e.addManagedListeners(n,{movingChanged:i});i()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===D.ENTER){const s=this.column,o=!s.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(s.getProvidedColumnGroup(),o,"uiColumnExpanded")}}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function O2(e,t,s){e.colGroupSvc?.setColumnGroupOpened(t,s,"api")}function N2(e,t,s){return e.colGroupSvc?.getColumnGroup(t,s)??null}function H2(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function G2(e,t,s){return e.colNames.getDisplayNameForColumnGroup(t,s)||""}function V2(e){return e.colGroupSvc?.getColumnGroupState()??[]}function B2(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function z2(e){e.colGroupSvc?.resetColumnGroupState("api")}function W2(e){return e.visibleCols.treeLeft}function _2(e){return e.visibleCols.treeCenter}function j2(e){return e.visibleCols.treeRight}function U2(e){return e.visibleCols.getAllTrees()}function $2(e,t){for(let s=0;s<t.length;s++){const o=e.indexOf(t[s]);o>=0&&(e[o]=e[e.length-1],e.pop())}}var K2=class extends T{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:s,colModel:o,colGroupSvc:i,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(o,i),i?.updateOpenClosedVisibility(),this.leftCols=qr(this.treeLeft),this.centerCols=qr(this.treeCenter),this.rightCols=qr(this.treeRight),r?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(o),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),s?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(o,this.leftCols,this.rightCols,e),n.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let s=t.getParent();for(;s;){if(!s.isPadding()){const o=s.getProvidedColumnGroup().getLevel()+1;o>e&&(e=o);break}s=s.getParent()}}return e}updateBodyWidths(){const e=jt(this.centerCols),t=jt(this.leftCols),s=jt(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==s)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=s,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,s,o){let i,n;this.gos.get("enableRtl")?(i=t?t[0]:null,n=s?ye(s):null):(i=t?ye(t):null,n=s?s[0]:null);for(const r of e.getCols())r.setLastLeftPinned(r===i,o),r.setFirstRightPinned(r===n,o)}buildTrees(e,t){const s=e.getColsToShow(),o=s.filter(l=>l.getPinned()=="left"),i=s.filter(l=>l.getPinned()=="right"),n=s.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new lg,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:o,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:i,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),s=[],o=[],i=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?s.push(n):i.push(n):o.push(n)}this.ariaOrderColumns=s.concat(o).concat(i)}getAriaColIndex(e){let t;return Be(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(const e of[this.treeLeft,this.treeRight,this.treeCenter])for(const t of e)Be(t)&&t.checkLeft()}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const o=t.getCols().slice(0),i=this.gos.get("enableRtl");for(const n of[this.leftCols,this.rightCols,this.centerCols]){if(i){let r=jt(n);for(const a of n)r-=a.getActualWidth(),a.setLeft(r,e)}else{let r=0;for(const a of n)a.setLeft(r,e),r+=a.getActualWidth()}$2(o,n)}for(const n of o)n.setLeft(null,e)}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:s}}=this;return s.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:s}}=this;return s.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,s,o){const i=[];let n=null;for(let r=0;r<t.length;r++){const a=t[r],l=t.length-r,c=Math.min(a.getColSpan(e),l),d=[a];if(c>1){const h=c-1;for(let g=1;g<=h;g++)d.push(t[r+g]);r+=h}let u;if(s){u=!1;for(const h of d)s(h)&&(u=!0)}else u=!0;u&&(i.length===0&&n&&(o&&o(a))&&i.push(n),i.push(a)),n=a}return i}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,s=t.indexOf(e);return s>0?t[s-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};Ns(this.treeCenter,!1,e),Ns(this.treeLeft,!1,e),Ns(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let s=0;s<t.length;s++){const o=this[t[s]];if(o.length)return e?ye(o):o[0]}return null}getColAfter(e){const t=this.allCols,s=t.indexOf(e);return s<t.length-1?t[s+1]:null}getColsLeftWidth(){return jt(this.leftCols)}getDisplayedColumnsRightWidth(){return jt(this.rightCols)}isColAtEdge(e,t){const s=this.allCols;if(!s.length)return!1;const o=t==="first";let i;if(Be(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;i=o?n[0]:ye(n)}else i=e;return(o?s[0]:ye(s))===i}};function Ns(e,t,s){if(e)for(let o=0;o<e.length;o++){const i=e[o];if(Be(i)){const n=t?i.getDisplayedChildren():i.getChildren();Ns(n,t,s)}s(i)}}function qr(e){const t=[];return Ns(e,!0,s=>{fs(s)&&t.push(s)}),t}var q2=class extends T{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return Yt(null,t,s=>{Xe(s)&&e.push({groupId:s.getGroupId(),open:s.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const s=[];Yt(null,t,o=>{if(Xe(o)){const i=o.getColGroupDef(),n={groupId:o.getGroupId(),open:i?i.openByDefault:void 0};s.push(n)}}),this.setColumnGroupState(s,e)}setColumnGroupState(e,t){const{colModel:s,colAnimation:o,visibleCols:i,eventSvc:n}=this.beans;if(!s.getColTree().length)return;o?.start();const a=[];for(const l of e){const c=l.groupId,d=l.open,u=this.getProvidedColGroup(c);u&&u.isExpanded()!==d&&(u.setExpanded(d),a.push(u))}i.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),o?.finish()}setColumnGroupOpened(e,t,s){let o;Xe(e)?o=e.getId():o=e||"",this.setColumnGroupState([{groupId:o,open:t}],s)}getProvidedColGroup(e){let t=null;return Yt(null,this.beans.colModel.getColTree(),s=>{Xe(s)&&s.getId()===e&&(t=s)}),t}getGroupAtDirection(e,t){const s=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),o=e.getDisplayedLeafColumns(),i=t==="After"?ye(o):o[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](i);if(!r)return null;const a=this.getColGroupAtLevel(r,s);if(a!==e)return a}}getColGroupAtLevel(e,t){let s=e.getParent(),o,i;for(;o=s.getProvidedColumnGroup().getLevel(),i=s.getPaddingLevel(),!(o+i<=t);)s=s.getParent();return s}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();Ns(e,!1,t=>{Be(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(Be(e))return e;const s=this.beans.visibleCols.getAllTrees(),o=typeof t=="number";let i=null;return Ns(s,!1,n=>{if(Be(n)){const r=n;let a;o?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(i=r)}}),i}createColumnGroups(e){const{columns:t,idCreator:s,pinned:o,oldDisplayedGroups:i,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(i),a=[];let l=t;for(;l.length;){const c=l;l=[];let d=0;const u=h=>{const g=d;d=h;const f=c[g],v=(Be(f)?f.getProvidedColumnGroup():f).getOriginalParent();if(v==null){for(let b=g;b<h;b++)a.push(c[b]);return}const w=this.createColumnGroup(v,s,r,o,n);for(let b=g;b<h;b++)w.addChild(c[b]);l.push(w)};for(let h=1;h<c.length;h++){const g=c[h],m=(Be(g)?g.getProvidedColumnGroup():g).getOriginalParent(),v=c[d],b=(Be(v)?v.getProvidedColumnGroup():v).getOriginalParent();m!==b&&u(h)}d<c.length&&u(c.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,s,o,i,n,r){const a=i.getUniqueKey(t.groupId||null,null),l=$c(this.beans,t,a),c=new sn(l,a,!1,s);this.createBean(c);const d=this.findExistingGroup(t,n);d&&n.splice(d.idx,1);const u=d?.group;u&&c.setExpanded(u.isExpanded());const h=eg(this.beans,l.children,s+1,e,o,i,n,r);return c.setChildren(h),c}balanceColumnTree(e,t,s,o){const i=[];for(let n=0;n<e.length;n++){const r=e[n];if(Xe(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,s,o);a.setChildren(l),i.push(a)}else{let a,l;for(let c=t;c<s;c++){const d=o.getUniqueKey(null,null),u=$c(this.beans,null,d),h=new sn(u,d,!0,c);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(i.push(a),e.some(d=>Xe(d))){l.setChildren([r]);continue}else{l.setChildren(e);break}i.push(r)}}return i}findDepth(e){let t=0,s=e;for(;s?.[0]&&Xe(s[0]);)t++,s=s[0].getChildren();return t}findMaxDepth(e,t){let s=t;for(let o=0;o<e.length;o++){const i=e[o];if(Xe(i)){const n=i,r=this.findMaxDepth(n.getChildren(),t+1);s<r&&(s=r)}}return s}balanceTreeForAutoCols(e,t){const s=[];for(const o of e){let i=o;for(let n=t-1;n>=0;n--){const r=new sn(null,`FAKE_PATH_${o.getId()}}_${n}`,!0,n);this.createBean(r),r.setChildren([i]),i.originalParent=r,i=r}t===0&&(o.originalParent=null),s.push(i)}return s}findExistingGroup(e,t){if(e.groupId!=null)for(let o=0;o<t.length;o++){const i=t[o];if(i.getColGroupDef()&&i.getId()===e.groupId)return{idx:o,group:i}}}createColumnGroup(e,t,s,o,i){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),a=kg(n,r);let l=s[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),V(l)?l.reset():(l=new vi(e,n,r,o),i||this.createBean(l)),l}mapOldGroupsById(e){const t={},s=o=>{for(const i of o)if(Be(i)){const n=i;t[i.getUniqueId()]=n,s(n.getChildren())}};return e&&s(e),t}setupParentsIntoCols(e,t){for(const s of e??[])if(s.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),s.parent=t,Be(s)){const o=s;this.setupParentsIntoCols(o.getChildren(),o)}}},Y2={moduleName:"ColumnGroup",version:G,dynamicBeans:{headerGroupCellCtrl:L2},beans:[q2],apiFunctions:{getAllDisplayedColumnGroups:U2,getCenterDisplayedColumnGroups:_2,getColumnGroup:N2,getColumnGroupState:V2,getDisplayNameForColumnGroup:G2,getLeftDisplayedColumnGroups:W2,getProvidedColumnGroup:H2,getRightDisplayedColumnGroups:j2,resetColumnGroupState:z2,setColumnGroupOpened:O2,setColumnGroupState:B2}},Z2={tag:"div",cls:"ag-skeleton-container"},Q2=class extends Le{constructor(){super(Z2)}init(t){const s=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",s),this.addDestroyFunc(()=>ui(t.eParentOfValue)),ui(t.eParentOfValue,s),t.deferRender?this.setupLoading(t):t.node.failedLoad?this.setupFailed():this.setupLoading(t)}setupFailed(){const t=this.getLocaleTextFunc();this.getGui().textContent=t("loadingError","ERR");const s=t("ariaSkeletonCellLoadingFailed","Row failed to load");xo(this.getGui(),s)}setupLoading(t){const s=it({tag:"div",cls:"ag-skeleton-effect"}),o=t.node.rowIndex;if(o!=null){const r=75+25*(o%2===0?Math.sin(o):Math.cos(o));s.style.width=`${r}%`}this.getGui().appendChild(s);const i=this.getLocaleTextFunc(),n=t.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");xo(this.getGui(),n)}refresh(t){return!1}},X2={moduleName:"CheckboxCellRenderer",version:G,userComponents:{agCheckboxCellRenderer:ZR}},J2={moduleName:"SkeletonCellRenderer",version:G,userComponents:{agSkeletonCellRenderer:Q2}};function eF(e,t){const s=e.colModel.getColDefCol(t);return s?s.getColDef():null}function tF(e){return e.colModel.getColumnDefs(!0)}function sF(e,t,s){return e.colNames.getDisplayNameForColumn(t,s)||""}function oF(e,t){return e.colModel.getColDefCol(t)}function iF(e){return e.colModel.getColDefCols()}function nF(e,t){return xt(e,t,"api")}function rF(e){return Mn(e)}function aF(e){v0(e,"api")}function lF(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function cF(e){return e.visibleCols.isPinningLeft()}function dF(e){return e.visibleCols.isPinningRight()}function uF(e,t){return e.visibleCols.getColAfter(t)}function hF(e,t){return e.visibleCols.getColBefore(t)}function gF(e,t,s){e.colModel.setColsVisible(t,s,"api")}function pF(e,t,s){e.pinnedCols?.setColsPinned(t,s,"api")}function fF(e){return e.colModel.getCols()}function mF(e){return e.visibleCols.leftCols}function CF(e){return e.visibleCols.centerCols}function vF(e){return e.visibleCols.rightCols}function wF(e){return e.visibleCols.allCols}function bF(e){return e.colViewport.getViewportColumns()}function Wa(e,t){if(!e)return;const s=e,o={};for(const i of Object.keys(s)){if(t&&t.indexOf(i)>=0||Mh.has(i))continue;const n=s[i];typeof n=="object"&&n!==null&&n.constructor===Object?o[i]=Wa(n):o[i]=n}return o}var SF=class extends T{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,s,o,i=!1){const n=e.slice();t?n.sort((l,c)=>s.indexOf(l)-s.indexOf(c)):(s||i)&&n.sort((l,c)=>o.indexOf(l)-o.indexOf(c));const r=this.rowGroupColsSvc?.columns,a=this.pivotColsSvc?.columns;return this.buildColumnDefs(n,r,a)}buildColumnDefs(e,t=[],s=[]){const o=[],i={};for(const n of e){const r=this.createDefFromColumn(n,t,s);let a=!0,l=r,c=n.getOriginalParent(),d=null;for(;c;){let u=null;if(c.isPadding()){c=c.getOriginalParent();continue}const h=i[c.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(c),u&&(u.children=[l],i[u.groupId]=u,l=u,c=c.getOriginalParent()),c!=null&&d===c){a=!1;break}d=c}a&&o.push(l)}return o}createDefFromGroup(e){const t=Wa(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,s){const o=Wa(e.getColDef());return o.colId=e.getColId(),o.width=e.getActualWidth(),o.rowGroup=e.isRowGroupActive(),o.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,o.pivot=e.isPivotActive(),o.pivotIndex=e.isPivotActive()?s.indexOf(e):null,o.aggFunc=e.isValueActive()?e.getAggFunc():null,o.hide=e.isVisible()?void 0:!0,o.pinned=e.isPinned()?e.getPinned():null,o.sort=e.getSort()?e.getSort():null,o.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,o}},yF=class extends T{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const s=this.flexViewportWidth,{visibleCols:o,colDelayRenderSvc:i}=this.beans,n=o.centerCols;let r=-1;if(e.resizingCols){const m=new Set(e.resizingCols);for(let v=n.length-1;v>=0;v--)if(m.has(n[v])){r=v;break}}let a=!1;const l=n.map((m,v)=>{const w=m.getFlex(),b=w!=null&&w>0&&v>r;return a||(a=b),{col:m,isFlex:b,flex:Math.max(0,w??0),initialSize:m.getActualWidth(),min:m.getMinWidth(),max:m.getMaxWidth(),targetSize:0}});if(a?(i?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(i),!s||!a)return[];let c=l.length,d=l.reduce((m,v)=>m+v.flex,0),u=s;const h=(m,v)=>{m.frozenSize=v,m.col.setActualWidth(v,t),u-=v,d-=m.flex,c-=1},g=m=>m.frozenSize!=null;for(const m of l)m.isFlex||h(m,m.initialSize);for(;c>0;){const m=Math.round(d<1?u*d:u);let v,w=0,b=0;for(const y of l){if(g(y))continue;v=y,b+=m*(y.flex/d);const x=b-w,F=Math.round(x);y.targetSize=F,w+=F}v&&(v.targetSize+=m-w);let S=0;for(const y of l){if(g(y))continue;const x=y.targetSize,F=Math.min(Math.max(x,y.min),y.max);S+=F-x,y.violationType=F===x?void 0:F<x?"max":"min",y.targetSize=F}const R=S===0?"all":S>0?"min":"max";for(const y of l)g(y)||(R==="all"||y.violationType===R)&&h(y,y.targetSize)}e.skipSetLeft||o.setLeftValues(t),e.updateBodyWidths&&o.updateBodyWidths();const f=l.filter(m=>m.isFlex&&!m.violationType).map(m=>m.col);if(e.fireResizedEvent){const m=l.filter(w=>w.initialSize!==w.frozenSize).map(w=>w.col),v=l.filter(w=>w.flex).map(w=>w.col);Eo(this.eventSvc,m,!0,t,v)}return this.revealColumns(i),f}revealColumns(e){this.columnsHidden&&(e?.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){const{flex:t,initialFlex:s}=e.colDef;t!==void 0?e.flex=t:s!==void 0&&(e.flex=s)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}};function si(e,t,s){if(!t||!e)return;if(!s)return e[t];const o=t.split(".");let i=e;for(let n=0;n<o.length;n++){if(i==null)return;i=i[o[n]]}return i}var RF=["dateTimeString","dateString","text","number","boolean","date"],xF=class extends T{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:e=>!!e.colDef.editable&&e.event.key===D.SPACE}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:s}){return{cellEditorParams:{useFormatter:!0},comparator:(o,i)=>{const n=t.getColDefCol(s),r=n?.getColDef();if(!n||!r)return 0;const a=o==null?"":e({column:n,node:null,value:o}),l=i==null?"":e({column:n,node:null,value:i});return a===l?0:a>l?1:-1},keyCreator:e}},text(){return{}}}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={},s={},o=d=>u=>{const{column:h,node:g,value:f}=u;let m=h.getColDef().valueFormatter;return m===d.groupSafeValueFormatter&&(m=d.valueFormatter),this.beans.valueSvc.formatValue(h,g,f,m)};for(const d of Object.keys(e)){const u=e[d],h={...u,groupSafeValueFormatter:kd(u,this.gos)};t[d]=h,s[d]=o(h)}const i=this.gos.get("dataTypeDefinitions")??{},n={};for(const d of Object.keys(i)){const u=i[d],h=this.processDataTypeDefinition(u,i,[d],e);h&&(t[d]=h,u.dataTypeMatcher&&(n[d]=u.dataTypeMatcher),s[d]=o(h))}const{valueParser:r,valueFormatter:a}=e.object,{valueParser:l,valueFormatter:c}=t.object;this.hasObjectValueParser=l!==r,this.hasObjectValueFormatter=c!==a,this.formatValueFuncs=s,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(n,e)}sortKeysInMatchers(e,t){const s={...e};for(const o of RF)delete s[o],s[o]=e[o]??t[o].dataTypeMatcher;return s}processDataTypeDefinition(e,t,s,o){let i;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=o[n];const a=t[n];if(r&&a&&(r=a),!Id(e,r,n))return;i=Md(r,e)}else{if(s.includes(n)){L(44);return}const r=t[n];if(!Id(e,r,n))return;const a=this.processDataTypeDefinition(r,t,[...s,n],o);if(!a)return;i=Md(a,e)}return{...i,groupSafeValueFormatter:kd(i,this.gos)}}updateColDefAndGetColumnType(e,t,s){let{cellDataType:o}=t;const{field:i}=t;if(o===void 0&&(o=e.cellDataType),(o==null||o===!0)&&(o=this.canInferCellDataType(e,t)?this.inferCellDataType(i,s):!1),!o){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[o];if(!n){L(47,{cellDataType:o});return}return e.cellDataType=o,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,o,n,s),n.columnTypes}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const s=o=>{t.add(o.key)};e.__addEventListener("columnStateUpdated",s),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",s))}canInferCellDataType(e,t){const{gos:s}=this;if(!Ne(s))return!1;const o={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(Yr(t,o))return!1;const i=t.type===null?e.type:t.type;if(i){const n=s.get("columnTypes")??{};if(Tn(i).some(a=>{const l=n[a.trim()];return l&&Yr(l,o)}))return!1}return!Yr(e,o)}inferCellDataType(e,t){if(!e)return;let s;const o=this.getInitialData();if(o){const n=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");s=si(o,e,n)}else this.initWaitForRowData(t);return s==null?void 0:Object.keys(this.dataTypeMatchers).find(n=>this.dataTypeMatchers[n](s))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?._leafs;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:s,eventSvc:o}=this.beans;t&&s&&(s.shouldQueueResizeOperations=!0);const[i]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(i?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&s?.processResizeOperations(),o.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const s=[];this.destroyColumnStateUpdateListeners();const o={},i={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[n],a=this.colModel.getCol(n);if(!a)return;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))return;const c=a.getColDef();if(t&&c.type&&c.type!==l.type){const d=EF(a,r);d.rowGroup&&d.rowGroupIndex==null&&(o[n]=d),d.pivot&&d.pivotIndex==null&&(i[n]=d),s.push(d)}}t&&s.push(...this.generateColumnStateForRowGroupAndPivotIndexes(o,i)),s.length&&xt(this.beans,{state:s},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const s={},{rowGroupColsSvc:o,pivotColsSvc:i}=this.beans;return o?.restoreColumnOrder(s,e),i?.restoreColumnOrder(s,t),Object.values(s)}resetColDefIntoCol(e,t){const s=e.getUserProvidedColDef();if(!s)return!1;const o=Fa(this.beans,s,e.getColId());return e.setColDef(o,s,t),!0}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const s=this.getDataTypeDefinition(e)?.dataTypeMatcher;return s?s(t):!0}validateColDef(e){const t=s=>L(48,{property:s});if(e.cellDataType==="object"){const{object:s}=this.dataTypeDefinitions;e.valueFormatter===s.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===s.valueParser&&!this.hasObjectValueParser&&t("Parser")}}postProcess(e){const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:s,beans:o,formatValueFuncs:i}=this,n=s[t];n&&o.colFilter?.setColDefPropsForDataType(e,n,i[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,s,o){const i=this.formatValueFuncs[t],n=this.columnDefinitionPropsPerDataType[s.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:s,colId:o,formatValue:i});Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),s=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:o=>lt(o.newValue&&String(o.newValue)),valueFormatter:o=>o.value==null?"":!(o.value instanceof Date)||isNaN(o.value.getTime())?t("invalidDate","Invalid Date"):ht(o.value,s)??"",dataTypeMatcher:o=>o instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:s=>lt(s)??void 0,dateFormatter:s=>ht(s??null,t)??void 0,valueParser:s=>on(String(s.newValue))?s.newValue:null,valueFormatter:s=>on(String(s.value))?String(s.value):"",dataTypeMatcher:s=>typeof s=="string"&&on(s)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>t.newValue?.trim?.()===""?null:Number(t.newValue),valueFormatter:t=>t.value==null?"":typeof t.value!="number"||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>typeof t=="number"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:Ca(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>t.newValue==null?t.newValue:t.newValue?.trim?.()===""?null:String(t.newValue).toLowerCase()==="true",valueFormatter:t=>t.value==null?"":String(t.value),dataTypeMatcher:t=>typeof t=="boolean"},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>typeof t=="string"&&dS(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>Ca(t.value)??""}}}destroyColumnStateUpdateListeners(){for(const e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function Md(e,t){const s={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(s.columnTypes=[...Tn(e.columnTypes),...Tn(t.columnTypes)]),s}function Id(e,t,s){return t?t.baseDataType!==e.baseDataType?(L(46),!1):!0:(L(45,{parentCellDataType:s}),!1)}function kd(e,t){if(e.valueFormatter)return s=>{if(s.node?.group){const o=(s.colDef.pivotValueColumn??s.column).getAggFunc();if(o){if(o==="first"||o==="last")return e.valueFormatter(s);if(e.baseDataType==="number"&&o!=="count"){if(typeof s.value=="number")return e.valueFormatter(s);if(typeof s.value=="object"){if(!s.value)return;if("toNumber"in s.value)return e.valueFormatter({...s,value:s.value.toNumber()});if("value"in s.value)return e.valueFormatter({...s,value:s.value.value})}}return}}else if(t.get("groupHideOpenParents")&&s.column.isRowGroupActive()&&typeof s.value=="string"&&!e.dataTypeMatcher?.(s.value))return;return e.valueFormatter(s)}}function FF(e,t,s,o){if(!t[s])return!1;const i=e[s];return i===null?(t[s]=!1,!1):o===void 0?!!i:i===o}function Yr(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([s,o])=>FF(e,t,s,o))}function EF(e,t){const s=ag(e);for(const o of t)delete s[o],o==="rowGroup"?delete s.rowGroupIndex:o==="pivot"&&delete s.pivotIndex;return s}var DF={moduleName:"DataType",version:G,beans:[xF],dependsOn:[X2]},PF={moduleName:"ColumnFlex",version:G,beans:[yF]},hp={moduleName:"ColumnApi",version:G,beans:[SF],apiFunctions:{getColumnDef:eF,getDisplayNameForColumn:sF,getColumn:oF,getColumns:iF,applyColumnState:nF,getColumnState:rF,resetColumnState:aF,isPinning:lF,isPinningLeft:cF,isPinningRight:dF,getDisplayedColAfter:uF,getDisplayedColBefore:hF,setColumnsVisible:gF,setColumnsPinned:pF,getAllGridColumns:fF,getDisplayedLeftColumns:mF,getDisplayedCenterColumns:CF,getDisplayedRightColumns:vF,getAllDisplayedColumns:wF,getAllDisplayedVirtualColumns:bF,getColumnDefs:tF}};function TF(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,s=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(s,"$1 $2$3").replace(/\./g," ").split(" ").map(i=>i.substring(0,1).toUpperCase()+(i.length>1?i.substring(1,i.length):"")).join(" ")}var MF=class extends T{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,s=!1){if(!e)return null;const o=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:i}=this.beans;return s&&i?i.getHeaderName(e,o):o}getDisplayNameForProvidedColumnGroup(e,t,s){const o=t?.getColGroupDef();return o?this.getHeaderName(o,null,e,t,s):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,s,o,i){const n=e.headerValueGetter;if(n){const r=X(this.gos,{colDef:e,column:t,columnGroup:s,providedColumnGroup:o,location:i});return typeof n=="function"?n(r):typeof n=="string"?this.beans.expressionSvc?.evaluate(n,r)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return TF(e.field)}return""}},IF=class extends T{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,s=!1){const{visibleCols:o}=this,i=o.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!i)){if(this.scrollWidth=e,this.scrollPosition=t,o.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=o.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(s)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(e,t){let s;switch(e){case"left":s=this.rowsOfHeadersToRenderLeft[t];break;case"right":s=this.rowsOfHeadersToRenderRight[t];break;default:s=this.rowsOfHeadersToRenderCenter[t];break}return s??[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||kF(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,s=t+e.getActualWidth(),o=this.viewportLeft-200,i=this.viewportRight+200,n=t<o&&s<o,r=t>i&&s>i;return!n&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=n=>{const r=n.getLeft();return V(r)&&r>this.viewportLeft},s=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:o}=this,i=o.centerCols;return o.getColsForRow(e,i,s,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const s=o=>{const i=new Set,n={};for(const r of o){let a=r.getParent();const l=r.isSpanHeaderHeight();for(;a&&!i.has(a);){if(l&&a.isPadding()){a=a.getParent();continue}const d=a.getProvidedColumnGroup().getLevel();n[d]??(n[d]=[]),n[d].push(a),i.add(a),a=a.getParent()}}return n};this.rowsOfHeadersToRenderLeft=s(e),this.rowsOfHeadersToRenderRight=s(t),this.rowsOfHeadersToRenderCenter=s(this.headerColsWithinViewport)}extractViewport(){const e=o=>`${o.getId()}-${o.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),s=this.colsWithinViewportHash!==t;return s&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),s}};function kF(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var AF=class extends T{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class s{refresh(){return!1}getGui(){return this.eGui}init(i){const n=t(i),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=ml("<span>"+n+"</span>");return}if(n==null){this.eGui=it({tag:"span"});return}this.eGui=n}}return s}},LF={moduleName:"CellRendererFunction",version:G,beans:[AF]},OF=class extends ay{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:s,dynamicBeans:o,selectors:i}=e;if(s){const n=(r,a,l,c)=>{this.agGridDefaults[r]=a,(l||c)&&(this.agGridDefaultOverrides[r]={params:l,processParams:c})};for(const r of Object.keys(s)){let a=s[r];if(nS(a)&&(a=a.getComp(this.beans)),typeof a=="object"){const{classImp:l,params:c,processParams:d}=a;n(r,l,c,d)}else n(r,a)}}this.registerDynamicBeans(o);for(const n of i??[])this.selectors[n.selector]=n;if(t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){const s=(a,l,c,d)=>({componentFromFramework:l,component:a,params:c,processParams:d}),{frameworkOverrides:o}=this.beans,i=o.frameworkComponent(t,this.gos.get("components"));if(i!=null)return s(i,!0);const n=this.jsComps[t];if(n){const a=o.isFrameworkComponent(n);return s(n,a)}const r=this.agGridDefaults[t];if(r){const a=this.agGridDefaultOverrides[t];return s(r,!1,a?.params,a?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){return t?Ht(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??Ht(256)}},NF=23,HF=class extends T{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(const e of this.readyCallbacks)e(this.params);this.readyCallbacks.length=0}},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===NF&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const s=this.readyCallbacks.indexOf(t);s>=0&&this.readyCallbacks.splice(s,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:s}=this.params;return[e,s,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},GF='.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-virtual-list-item{height:var(--ag-list-item-height);position:absolute;width:100%}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}',VF={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:ze,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},cellFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:vt,rangeSelectionBackgroundColor:It(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:It(.5),rangeHeaderHighlightColor:zS(.08),rowNumbersSelectedColor:It(.5),rowHoverColor:It(.08),columnHoverColor:It(.05),selectedRowBackgroundColor:It(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:ze,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:tt(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:tt(.1),iconButtonActiveColor:vt,iconButtonActiveBackgroundColor:It(.28),iconButtonActiveIndicatorColor:vt,menuBorder:{color:tt(.2)},menuBackgroundColor:qe(.03),menuTextColor:qe(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:tt(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:vt},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},dialogBorder:{color:tt(.2)},panelBackgroundColor:ze,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:tt(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:tt(.13)},selectCellBackgroundColor:tt(.07),selectCellBorder:{color:tt(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:ze,filterPanelApplyButtonBackgroundColor:vt,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:Ut,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:Ut,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:tt(.15),statusBarLabelColor:Ut,statusBarLabelFontWeight:500,statusBarValueColor:Ut,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"}},BF=".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}",gp={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},zF={...gp,cellBatchEditTextColor:"#f3d0b3"},WF=()=>ot({feature:"batchEditStyle",params:gp,css:BF}),_F=WF(),pp=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}",fp={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},jF=()=>ot({feature:"buttonStyle",params:{...fp,buttonBackgroundColor:ze,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:vt}},css:pp}),UF=jF(),$F=()=>ot({feature:"buttonStyle",params:{...fp,buttonBorder:{color:Ut,width:2,style:"outset"},buttonActiveBorder:{color:Ut,width:2,style:"inset"},buttonBackgroundColor:qe(.07),buttonHoverBackgroundColor:ze,buttonVerticalPadding:{calc:"spacing * 0.5"}},css:pp}),KF=$F(),qF=".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",YF=".ag-column-drop-vertical-empty-message{color:var(--ag-subtle-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600;padding-top:var(--ag-spacing)}:where(.ag-ltr) .ag-column-drop-vertical-empty-message{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing));padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-column-drop-vertical-empty-message{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing))}",ZF=()=>ot({feature:"columnDropStyle",css:qF}),mp=ZF(),QF=()=>ot({feature:"columnDropStyle",css:YF}),XF=QF(),JF={warn:(...e)=>{L(e[0],e[1])},error:(...e)=>{be(e[0],e[1])},preInitErr:(...e)=>{$o(e[0],e[2],e[1])}},Cp=()=>XS(JF).withParams(VF).withPart(UF).withPart(mp).withPart(_F),eE='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',tE=()=>ot({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:ze,checkboxUncheckedBorderColor:qe(.3),checkboxCheckedBackgroundColor:vt,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:ze,checkboxIndeterminateBackgroundColor:qe(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:ze,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:eE}),vp=tE(),$l=()=>({...An,...zF,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:qe(.05),rowHoverColor:It(.15),selectedRowBackgroundColor:It(.2),menuBackgroundColor:qe(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:Ut,findMatchColor:ze,findActiveMatchColor:ze,checkboxUncheckedBorderColor:qe(.4),toggleButtonOffBackgroundColor:qe(.4),rowBatchEditBackgroundColor:qe(.1)}),sE=()=>ot({feature:"colorScheme",params:$l()}),oE=sE(),iE=()=>({...$l(),backgroundColor:"#1f2836"}),nE=()=>ot({feature:"colorScheme",params:An,modeParams:{light:An,dark:$l(),"dark-blue":iE()}}),wp=nE(),rE=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M22 12h-2v-2h-8v.092c.056 1.352 3.426 2.598 4.472 4.404.682 1.174.438 2.754-.572 3.72C14.29 19.618 12 20.924 12 22h8v-2h2v4H10c0-1.586-.098-3.304 1.016-4.314 1.904-1.632 4.89-3.108 3.54-4.42-1.918-1.68-4.464-2.936-4.554-5.12L10 8h12z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='m6.414 17 2.294 2.292-1.416 1.416L2.586 16l4.706-4.708 1.416 1.416L6.414 15H15V6.414l-2.292 2.294-1.416-1.416L16 2.586l4.708 4.706-1.416 1.416L17 6.414V15h8.586l-2.294-2.292 1.416-1.416L29.414 16l-4.706 4.708-1.416-1.416L25.586 17H17v8.586l2.292-2.294 1.416 1.416L16 29.414l-4.708-4.706 1.416-1.416L15 25.586V17z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 4C9.378 4 4 9.378 4 16s5.378 12 12 12 12-5.378 12-12S22.622 4 16 4m0 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S6 21.52 6 16 10.48 6 16 6m0 8.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M14 25h-2V7h2zm6 0h-2V7h2zm6 0h-2V7h2zM8 25H6V7h2z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M21.929 27.999h-7.828a5.09 5.09 0 0 1-5.086-5.086v-9.812a5.087 5.087 0 0 1 5.086-5.086h7.828a5.09 5.09 0 0 1 5.086 5.086v9.812a5.087 5.087 0 0 1-5.086 5.086m.16-17.984h-8.088a2.94 2.94 0 0 0-2.938 2.938v10.132a2.94 2.94 0 0 0 2.938 2.938h8.088a2.94 2.94 0 0 0 2.936-2.938V12.953a2.94 2.94 0 0 0-2.936-2.938M7.041 26.013h-2.05a4 4 0 0 1-.006-.228V9.065a5.07 5.07 0 0 1 5.064-5.064h12.812q.069 0 .134.002v2.012H9.915a2.876 2.876 0 0 0-2.874 2.874z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 4 24 24'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m16 14.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14.703 15.096 6.215 4.719a1 1 0 1 1 1.548-1.267l13.058 15.965A5.001 5.001 0 0 1 28 23.916a5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 4.98 4.98 0 0 1 1.23-3.283l-3.238-3.958-3.272 4.001a4.98 4.98 0 0 1 1.265 3.323 5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 5 5 0 0 1 7.13-4.522zM8.991 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M23 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1m-5.723-8.852 1.292 1.579 7.205-8.808a1 1 0 0 0-1.548-1.267z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before,.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M9.304 7.89a15.2 15.2 0 0 1 6.404-1.638c.294-.002.292-.002.584 0 5.956.174 11.328 4.088 13.62 9.748 0 0-1.318 3.178-3.224 5.174a13.6 13.6 0 0 1-2.226 1.874L26.414 25 25 26.414l-2.336-2.336C17.866 26.396 11.776 26.15 7.36 22.96a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.218 2.002-3.718a14.6 14.6 0 0 1 3.442-3.334L5.586 7 7 5.586zm-.3 2.528c-2.038 1.344-3.708 3.246-4.724 5.508L4.248 16c2.46 5.762 9.622 9.064 15.63 7.15q.688-.219 1.342-.516l-.912-.912a6.96 6.96 0 0 1-4.19 1.394c-3.862 0-7-3.136-7-7 0-1.57.52-3.022 1.394-4.19zm14.032 11.204a13.25 13.25 0 0 0 4.684-5.548l.032-.074c-1.984-4.646-6.834-7.798-12.006-7.748-1.712.05-3.386.458-4.922 1.158l1.102 1.102a6.97 6.97 0 0 1 4.192-1.396 7.003 7.003 0 0 1 5.606 11.192zm-11.09-8.262a5.003 5.003 0 0 0 6.928 6.928zm8.342 5.514a5.002 5.002 0 0 0-6.928-6.928z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16.292 6.32c5.956.174 11.328 4.086 13.62 9.746 0 0-1.318 3.18-3.224 5.176-4.862 5.088-13.534 5.97-19.328 1.784a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.216 2.002-3.716 2.678-3.64 7.03-5.896 11.618-6.03.294-.004.292-.004.584 0m-.546 2c-4.896.142-9.458 3.202-11.466 7.672l-.032.074c2.46 5.762 9.622 9.066 15.63 7.152 3.458-1.102 6.342-3.738 7.842-7.076l.032-.076C25.768 11.42 20.918 8.27 15.746 8.32m.254.946c3.754 0 6.8 3.048 6.8 6.8 0 3.754-3.046 6.8-6.8 6.8s-6.8-3.046-6.8-6.8c0-3.752 3.046-6.8 6.8-6.8m5 6.768V16c0-2.76-2.24-5-5-5s-5 2.24-5 5v.066c0 2.76 2.24 5 5 5s5-2.24 5-5z'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M26 8.184c-.066 2.658-4.058 5.154-6.742 7.974a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h20zM8 8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.066-2.658 4.058-5.154 6.742-7.974.198-.23.258-.538.258-.842z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.354 8.708 17.06 16l7.294 7.292-1.416 1.416L14.232 16l8.706-8.708zM9.646 8v16h-2V8z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M14 21h-4v-2h4zm12 0H16v-2h10zm-12-4h-4v-2h4zm12 0H16v-2h10zm-16-4H6v-2h4zm16 0H12v-2h14z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m17.768 16-8.706 8.708-1.416-1.416L14.94 16 7.646 8.708l1.416-1.416zm6.586 8h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='m17.621 11-2 2h12.586v6H15.621l2 2-4.414 4.414L3.793 16l9.414-9.414zm-11 5 6.586 6.586L14.793 21l-4-4h15.414v-2H10.793l4-4-1.586-1.586z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M17.138 13.418a1.03 1.03 0 0 0-.298.658s.125.096.226.178c1.372 1.114 2.033 3.039 1.582 4.796a4.7 4.7 0 0 1-1.205 2.123c-1.145 1.151-2.296 2.294-3.445 3.441-1.241 1.232-3.185 1.691-4.864 1.105-1.546-.54-2.756-1.938-3.048-3.572-.267-1.496.246-3.108 1.319-4.186l.578-.578-.03-.092a10.5 10.5 0 0 1-.452-2.3v-.005c-.776.775-1.621 1.489-2.275 2.396-1.817 2.522-1.643 6.323.706 8.669 1.813 1.811 4.708 2.462 7.171 1.517a6.75 6.75 0 0 0 2.336-1.518l3.427-3.424c1.939-1.954 2.533-5.126 1.294-7.674a6.8 6.8 0 0 0-2.071-2.481l-.003-.002zM21.265 4a6.8 6.8 0 0 0-4.734 1.964l-3.427 3.424c-1.961 1.977-2.52 5.092-1.32 7.619a6.8 6.8 0 0 0 2.098 2.537l.003.002c.32-.32.643-.637.96-.96.167-.172.27-.401.286-.64l-.204-.167c-1.603-1.287-2.215-3.68-1.316-5.616a4.7 4.7 0 0 1 .918-1.32c1.145-1.151 2.296-2.294 3.445-3.441 1.239-1.23 3.178-1.694 4.864-1.105 1.83.639 3.16 2.498 3.12 4.493a4.8 4.8 0 0 1-1.391 3.265l-.578.578.03.092c.235.743.387 1.519.452 2.3v.005c.732-.731 1.521-1.406 2.162-2.244 1.192-1.559 1.643-3.651 1.204-5.575a6.8 6.8 0 0 0-3.98-4.703 6.8 6.8 0 0 0-2.529-.506h-.061z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='m7.54 17.4.1 6.98 6.96.1-2.24-2.24L16 18.6 13.4 16l-3.64 3.64zm16.92-2.8-.1-6.98-6.96-.1 2.24 2.24L16 13.4l2.6 2.6 3.64-3.64z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M26 23H6v-2h20zm0-6H6v-2h20zm0-6H6V9h20z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Cpath fill='%23000' d='M16 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='m14.8 24.26-.1-6.96-6.96-.1 2.24 2.24-3.64 3.64 2.6 2.6 3.64-3.64zm2.4-16.52.1 6.96 6.96.1-2.24-2.24 3.64-3.64-2.6-2.6-3.64 3.64z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142m-1.414 6.07h16.97v2.002H7.515z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='m10.044 21.258 4.478-4.198L16 18.444 9 25l-7-6.556 1.478-1.384 4.478 4.198V7h2.088zm14 3.742h-2.088V10.742l-4.478 4.198L16 13.556 23 7q3.5 3.28 7 6.556l-1.478 1.384-4.478-4.198z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16.186 3.646c8.188.154 14.898 9.796 11.17 17.78-3.298 7.066-13.932 9.374-19.848 3.87-3.9-3.632-5.076-9.896-2.684-14.708 2.082-4.19 6.588-6.974 11.362-6.942m-.298 1.998c-6.922.132-12.578 8.308-9.33 15.052 3.342 6.934 15.246 7.646 18.932 0 3.076-6.386-1.988-15.1-9.602-15.052m7.596 6.422c2.864 5.33-1.744 13.186-8.306 12.536a8.6 8.6 0 0 1-3.232-.998l-1.266-.706L22.778 10.8q.351.633.706 1.266m-9.422 10.276c3.296 1.028 7.246-1.006 8.216-4.418a6.6 6.6 0 0 0-.056-3.742zm2.104-14.696a8.8 8.8 0 0 1 3.936 1.038l1.266.706L9.27 21.488c-3.018-5.41-.99-13.37 6.318-13.834q.289-.01.578-.008m-.31 2c-4.06.154-7.23 4.614-6.03 8.46l8.16-8.16a6.8 6.8 0 0 0-2.13-.3'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M20 6.5c0-1-1-3-4-3s-4 2-4 3H8c-2.21 0-4 1.79-4 4v14c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-14c0-2.21-1.79-4-4-4zm-4 .546c.734 0 1.334.572 1.334 1.272S16.734 9.59 16 9.59s-1.334-.572-1.334-1.272.6-1.272 1.334-1.272M24 26.5H8a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2h2v4h12v-4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008c-1.358-.022-2.714-.026-4.07-.022v4.034h4.07z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142M15 15l-.001-7.485h2.002L17 15l7.485-.001v2.002L17 17l.001 7.485h-2.002L15 17l-7.485.001v-2.002z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m28.207 16-9.414 9.414L14.379 21l2-2H3.793v-6h12.586l-2-2 4.414-4.414zm-11-5 4 4H5.793v2h15.414l-4 4 1.586 1.586L25.379 16l-6.586-6.586z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='m24.708 19.645-1.416 1.416L16 13.767l-7.292 7.294-1.416-1.416L16 10.939z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='M24.708 10.855 13 22.561l-5.708-5.706 1.416-1.416L13 19.733 23.292 9.439z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6 15h20v2H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M5.35 3.999a.2.2 0 0 0-.14.058c-.388.38-.768.768-1.152 1.152a.21.21 0 0 0-.002.288c7.459 7.506 14.965 14.965 22.447 22.447a.21.21 0 0 0 .288.002q.576-.574 1.151-1.151a.21.21 0 0 0 .002-.288C20.484 19.002 12.979 11.542 5.497 4.06a.2.2 0 0 0-.146-.061zm.611 12.548c-1.933 1.939-2.538 5.119-1.289 7.688a6.79 6.79 0 0 0 4.891 3.672 6.82 6.82 0 0 0 5.893-1.866l1.984-1.984-1.438-1.438-1.986 1.986c-1.486 1.476-3.993 1.81-5.834.629a4.73 4.73 0 0 1-2.024-2.853 4.76 4.76 0 0 1 1.241-4.393l1.986-1.986-1.438-1.438-1.984 1.984zM21.273 3.999a6.78 6.78 0 0 0-4.727 1.963l-1.984 1.984L16 9.384l1.985-1.985a4.74 4.74 0 0 1 2.776-1.338c1.974-.224 4.045.926 4.845 2.834.712 1.699.329 3.778-1.004 5.12L22.616 16l1.439 1.438q1-1 2-2c2.012-2.031 2.557-5.368 1.112-7.982-1.144-2.07-3.432-3.441-5.834-3.459h-.061z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M23.182 5a3.82 3.82 0 0 1 2.83 6.383l-.131.137-2.09 2.088a1 1 0 0 1-.084.099 1 1 0 0 1-.098.084L12.533 24.869a3 3 0 0 1-1.245.746l-4.353 1.32-.003.002a1.5 1.5 0 0 1-1.87-1.867l.003-.004 1.32-4.352v-.003l.06-.174c.13-.344.321-.661.565-.936l.126-.135L18.209 8.39a1 1 0 0 1 .18-.181l2.092-2.09.137-.132A3.82 3.82 0 0 1 23.182 5M8.548 20.883a1 1 0 0 0-.25.415l-1.049 3.451 3.457-1.048.114-.042q.17-.076.301-.206l10.458-10.46-2.572-2.572zM23.182 7c-.482 0-.946.19-1.287.531v.001l-1.474 1.475 2.572 2.572 1.474-1.474.121-.133A1.82 1.82 0 0 0 23.182 7'/%3E%3C/svg%3E")}`,aE=ot({feature:"iconSet",css:rE}),bp={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},Sp={"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>'},lE=(e={})=>{let t="";for(const s of[...Object.keys(bp),...Object.keys(Sp)]){const o=cE(s,e.strokeWidth);t+=`.ag-icon-${s}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(o)}'); }
|
|
19
|
+
`}return t},cE=(e,t=1.5)=>{const s=Sp[e];if(s)return s;const o=bp[e];if(!o)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+o+"</svg>"},dE=(e={})=>ot({feature:"iconSet",css:()=>lE(e)}),uE=dE(),hE=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',gE=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}",pE={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},fE=()=>ot({feature:"inputStyle",params:{...pE,inputBackgroundColor:ze,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:vt},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:qe(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>hE+gE}),yp=fE(),Rp='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}',mE=".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:none;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}",xp={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},CE=()=>ot({feature:"tabStyle",params:{...xp,tabBarBorder:!0,tabBarBackgroundColor:tt(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:ze},css:Rp}),vE=CE(),wE=()=>ot({feature:"tabStyle",params:{...xp,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabBarHorizontalPadding:{ref:"spacing"},tabBarTopPadding:{ref:"spacing"},tabBarBorder:!0,tabHorizontalPadding:{calc:"spacing * 2"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:{ref:"spacing"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:ze},css:()=>Rp+mE}),bE=wE(),SE=()=>Cp().withPart(vp).withPart(wp).withPart(uE).withPart(vE).withPart(yp).withPart(mp).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),yE=SE(),RE=()=>Cp().withPart(KF).withPart(vp).withPart(wp).withPart(aE).withPart(bE).withPart(yp).withPart(XF).withParams({accentColor:"#0091ea",borderColor:tt(.2),spacing:4,widgetVerticalSpacing:{calc:"max(8px, spacing)"},borderRadius:2,wrapperBorderRadius:2,headerColumnResizeHandleColor:"transparent",headerColumnBorder:!0,headerColumnBorderHeight:"50%",oddRowBackgroundColor:{ref:"chromeBackgroundColor",mix:.5},checkboxBorderRadius:2,checkboxBorderWidth:1,checkboxUncheckedBackgroundColor:ze,checkboxUncheckedBorderColor:qe(.5),checkboxCheckedBackgroundColor:ze,checkboxCheckedBorderColor:vt,checkboxCheckedShapeColor:vt,checkboxIndeterminateBackgroundColor:ze,checkboxIndeterminateBorderColor:qe(.5),checkboxIndeterminateShapeColor:qe(.5),focusShadow:{radius:2,spread:1,color:vt},headerTextColor:tt(.6),iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",fontSize:12,tabSelectedBackgroundColor:ze,headerFontWeight:"bold",toggleButtonWidth:32,toggleButtonHeight:16,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:qe(.5),sideButtonBorder:!0,sideButtonBarTopPadding:{calc:"spacing * 4"},popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)",statusBarLabelColor:tt(.54),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,panelTitleBarIconColor:Ut,colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}),xE=RE(),FE={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},EE={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},DE={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},Ad={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},Ld={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},Od={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},Zr={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},Nd={cssName:"--ag-pinned-row-border",changeKey:"pinnedRowBorderWidthChanged",defaultValue:1,border:!0};function PE(e,t){for(const s of t.sort((o,i)=>o.moduleName.localeCompare(i.moduleName))){const o=s.css;o&&e.set(`module-${s.moduleName}`,o)}}var TE=class extends ry{constructor(){super(...arguments),this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1}initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(Ad),this.getSizeEl(Ld),this.getSizeEl(Od),this.getSizeEl(Zr),this.getSizeEl(Nd),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(Nd)}getRowBorderWidth(){return this.getCSSVariablePixelValue(Zr)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(Ad)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(Ld)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(FE)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(EE),s=this.getCSSVariablePixelValue(DE);return e-1+s*t}getCellPadding(){const e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(Od)}refreshRowHeightVariable(){const{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),s=this.gos.get("rowHeight");if(s==null||isNaN(s)||!isFinite(s))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const o=`${s}px`;return t!=o?(e.style.setProperty("--ag-line-height",o),s):t!=""?Number.parseFloat(t):-1}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const s=this.measureSizeEl(e);return s==="detached"||s==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,s),s)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const s=t.offsetWidth;return s===Qr?"no-styles":(this.sizesMeasured=!0,s)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=it({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const s=this.getMeasurementContainer();t=it({tag:"div"});const{border:o,noWarn:i}=e;o?(t.className="ag-measurement-element-border",t.style.setProperty("--ag-internal-measurement-border",`var(${e.cssName}, solid ${Qr}px)`)):t.style.width=`var(${e.cssName}, ${Qr}px)`,s.appendChild(t),this.sizeEls.set(e,t);let n=this.measureSizeEl(e);n==="no-styles"&&!i&&L(9,{variable:e});const r=es(this.beans,t,()=>{const a=this.measureSizeEl(e);a==="detached"||a==="no-styles"||(this.lastKnownValues.set(e,a),a!==n&&(n=a,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>r()),t}fireStylesChangedEvent(e){e==="rowBorderWidthChanged"&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(Zr);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&be(t?106:239)}getAdditionalCss(){const e=new Map;return e.set("core",[GF]),PE(e,Array.from(Db())),e}getDefaultTheme(){return yE}themeError(e){be(240,{theme:e})}},Qr=15538,ME=class extends ly{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function Fp(e,t,s){const o=e.visibleCols.headerGroupRowCount;if(s>=o)return{column:t,headerRowIndex:s};let i=t.getParent();for(;i&&i.getProvidedColumnGroup().getLevel()>s;)i=i.getParent();const n=t.isSpanHeaderHeight();return!i||n&&i.isPadding()?{column:t,headerRowIndex:o}:{column:i,headerRowIndex:i.getProvidedColumnGroup().getLevel()}}var IE=class extends T{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,s=>{this.gridBodyCon=s.gridBodyCtrl});const t=$e(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let s;const{colModel:o,colGroupSvc:i,ctrlsSvc:n}=this.beans;if(typeof e=="string"?(s=o.getCol(e),s||(s=i?.getColumnGroup(e)??null)):s=e,!s)return null;const a=n.getHeaderRowContainerCtrl()?.getAllCtrls(),l=ye(a||[]).type==="filter",c=Lt(this.beans)-1;let d=-1,u=s;for(;u;)d++,u=u.getParent();let h=d;return t&&l&&h===c-1&&h++,h===-1?null:{headerRowIndex:h,column:s}}navigateVertically(e,t){const{focusSvc:s,visibleCols:o}=this.beans,{focusedHeader:i}=s;if(!i)return!1;const{headerRowIndex:n}=i,r=i.column,a=Lt(this.beans),l=this.getHeaderRowType(n),c=o.headerGroupRowCount;let{headerRowIndex:d,column:u,headerRowIndexWithoutSpan:h}=e==="UP"?kE(l,r,n):AE(r,n,c),g=!1;return d<0&&(d=0,u=r,g=!0),d>=a?(d=-1,this.currentHeaderRowWithoutSpan=-1):h!==void 0&&(this.currentHeaderRowWithoutSpan=h),!g&&!u?!1:s.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,s){const{focusSvc:o,gos:i}=this.beans,n={...o.focusedHeader};let r,a;this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,e==="LEFT"!==i.get("enableRtl")?(a="Before",r=this.findHeader(n,a)):(a="After",r=this.findHeader(n,a));const l=i.getCallback("tabToNextHeader");if(t&&l){const c=o.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:r,direction:a});if(c){const{headerRowIndex:d}=o.focusedHeader||{};d!=null&&d!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=d)}return c}return r||!t?o.focusHeaderPosition({headerPosition:r,direction:a,fromTab:t,allowUserOverride:!0,event:s}):this.focusNextHeaderRow(n,a,s)}focusNextHeaderRow(e,t,s){const o=this.beans,i=e.headerRowIndex;let n=null,r;const a=Lt(o),l=this.beans.visibleCols.allCols;if(t==="Before"){if(i<=0)return!1;n=ye(l),r=i-1,this.currentHeaderRowWithoutSpan-=1}else n=l[0],r=i+1,this.currentHeaderRowWithoutSpan<a?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:c,headerRowIndex:d}=Fp(this.beans,n,r);return d>=a&&(d=-1),o.focusSvc.focusHeaderPosition({headerPosition:{column:c,headerRowIndex:d},direction:t,fromTab:!0,allowUserOverride:!0,event:s})}scrollToColumn(e,t="After"){if(e.getPinned())return;let s;if(Be(e)){const o=e.getDisplayedLeafColumns();s=t==="Before"?ye(o):o[0]}else s=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(s)}findHeader(e,t){const{colGroupSvc:s,visibleCols:o}=this.beans;let i=e.column;if(i instanceof vi){const l=i.getDisplayedLeafColumns();i=t==="Before"?l[0]:l[l.length-1]}const n=t==="Before"?o.getColBefore(i):o.getColAfter(i);if(!n)return;const r=o.headerGroupRowCount;if(e.headerRowIndex>=r)return{headerRowIndex:e.headerRowIndex,column:n};const a=s?.getColGroupAtLevel(n,e.headerRowIndex);return a?a.isPadding()&&n.isSpanHeaderHeight()?{headerRowIndex:o.headerGroupRowCount,column:n}:{headerRowIndex:e.headerRowIndex,column:a??n}:{headerRowIndex:n instanceof Zs&&n.isSpanHeaderHeight()?o.headerGroupRowCount:e.headerRowIndex,column:n}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function kE(e,t,s){const o=s-1;if(e!=="filter"){const i=t instanceof Zs&&t.isSpanHeaderHeight();let n=t.getParent();for(;n&&(n.getProvidedColumnGroup().getLevel()>o||i&&n.isPadding());)n=n.getParent();if(n)return i?{column:n,headerRowIndex:n.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:o}:{column:n,headerRowIndex:o,headerRowIndexWithoutSpan:o}}return{column:t,headerRowIndex:o,headerRowIndexWithoutSpan:o}}function AE(e,t,s){const o=t+1,i={column:e,headerRowIndex:o,headerRowIndexWithoutSpan:o};if(e instanceof vi){if(o>=s)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:s,headerRowIndexWithoutSpan:o};let r=e.getDisplayedChildren()[0];if(r instanceof vi&&r.isPadding()){const l=r.getDisplayedLeafColumns()[0];l.isSpanHeaderHeight()&&(r=l)}i.column=r,r instanceof Zs&&r.isSpanHeaderHeight()&&(i.headerRowIndex=s,i.headerRowIndexWithoutSpan=o)}return i}var LE=class extends T{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(pS(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(Ae(this.beans),Qg)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=Ae(this.beans);return this.isDomDataPresentInHierarchy(e,Ln)?!0:this.isDomDataPresentInHierarchy(e,On)}isDomDataPresentInHierarchy(e,t){let s=e;for(;s;){if(_h(this.gos,s,t))return!0;s=s.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:s,column:o}=e,i={rowIndex:t,rowPinned:s,column:o,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:s});return n&&(i.isFullWidthCell=n.isFullWidth()),i}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:s,rowPinned:o,forceBrowserFocus:i=!1,preventScrollOnBrowserFocus:n=!1,sourceEvent:r}=e,a=this.colModel.getCol(t);if(!a){this.focusedCell=null;return}this.focusedCell={rowIndex:s,rowPinned:Kt(o),column:a};const l=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...l,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:i,preventScrollOnBrowserFocus:n,sourceEvent:r}),this.previousCellFocusParams=l}isCellFocused(e){return this.focusedCell==null?!1:np(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:s,pinned:o}}=e,{column:i,headerRowIndex:n}=this.focusedHeader;return t===i&&s===n&&o==i.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),Os(this.beans))return!1;const{direction:t,fromTab:s,allowUserOverride:o,event:i,fromCell:n,rowWithoutSpanValue:r,scroll:a=!0}=e;let{headerPosition:l}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(l);if(o){const c=this.focusedHeader,d=Lt(this.beans);if(s){const u=this.gos.getCallback("tabToNextHeader");u&&(l=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:c,headerPosition:l,headerRowCount:d}))}else{const u=this.gos.getCallback("navigateToNextHeader");if(u&&i){const h={key:i.key,previousHeaderPosition:c,nextHeaderPosition:l,headerRowCount:d,event:i};l=u(h)}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:i,fromCell:n,rowWithoutSpanValue:r,scroll:a}):!1}focusHeaderPositionFromUserFunc(e){if(Os(this.beans))return!1;const{userFunc:t,headerPosition:s,direction:o,event:i}=e,n=this.focusedHeader,r=Lt(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:o,currentPosition:n,headerPosition:s,headerRowCount:r});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:o,event:i})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:s,currentPosition:o,headerPosition:i,headerRowCount:n}=e,a=t({backwards:s==="Before",previousHeaderPosition:o,nextHeaderPosition:i,headerRowCount:n});return a===!0?o:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:s,fromCell:o,rowWithoutSpanValue:i,event:n,scroll:r=!0}=e,{column:a,headerRowIndex:l}=t,{filterManager:c,ctrlsSvc:d,headerNavigation:u}=this.beans;if(this.focusedHeader&&AR(e.headerPosition,this.focusedHeader))return!1;if(l===-1)return c?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:a,event:n});r&&u?.scrollToColumn(a,s);const g=d.getHeaderRowContainerCtrl(a.getPinned())?.focusHeader(t.headerRowIndex,a,n)||!1;return u&&g&&(i!=null||o)&&(u.currentHeaderRowWithoutSpan=i??-1),g}focusFirstHeader(){if(this.overlays?.isExclusive()&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=Fp(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.isExclusive()&&this.focusOverlay(!0))return!0;const t=Lt(this.beans)-1,s=ye(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:s},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===Kt(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&js(t,e)}focusGridView(e){const{backwards:t=!1,canFocusOverlay:s=!0,event:o}=e;if(this.overlays?.isExclusive())return s&&this.focusOverlay(t);if(ir(this.beans))return t&&!Os(this.beans)?this.focusLastHeader():s&&this.focusOverlay(t)?!0:t?!1:Po(this.beans,t);const i=t?jx(this.beans):_x(this.beans);if(i){const n=e.column??this.focusedHeader?.column,{rowIndex:r,rowPinned:a}=i,l=Qt(this.beans,i);if(!n||!l||r==null)return!1;if(n.isSuppressNavigable(l)){const c=this.gos.get("enableRtl");let d;return!o||o.key===D.TAB?d=c?D.LEFT:D.RIGHT:d=o.key,this.beans.navigation?.navigateToNextCell(null,d,{rowIndex:r,column:n,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:r,column:n,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(i)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(i,t)||(this.setFocusedCell({rowIndex:r,column:n,rowPinned:Kt(a),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:r,rowPinned:a,column:n})),!0}return!!(s&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const s=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:s,headerRowIndex:Lt(this.beans)-1}}):this.focusGridView({column:s})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},OE=class extends T{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.horizontalScrollShowing=this.gos.get("alwaysShowHorizontalScroll")===!0,this.verticalScrollShowing=this.gos.get("alwaysShowVerticalScroll")===!0,this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),s=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==s)&&(this.horizontalScrollGap=t,this.verticalScrollGap=s,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),s=typeof e=="number"&&e>=0?e:aS();s!=null&&(this.scrollbarWidth=s,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},NE=class extends T{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:s}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),s.destroy(),super.destroy()}},dn=new Set(["gridPreDestroyed","fillStart","pasteStart"]),HE=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"],Kl=HE.reduce((e,t)=>(e[t]=Zb(t),e),{}),Wo=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),GE={tag:"span",cls:"ag-sort-indicator-container",children:[Wo("Order","order"),Wo("Asc","ascending-icon"),Wo("Desc","descending-icon"),Wo("Mixed","mixed-icon"),Wo("None","none-icon")]},ql=class extends Le{constructor(e){super(),this.eSortOrder=Z,this.eSortAsc=Z,this.eSortDesc=Z,this.eSortMixed=Z,this.eSortNone=Z,e||this.setTemplate(GE)}attachCustomElements(e,t,s,o,i){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=s,this.eSortMixed=o,this.eSortNone=i}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);const s=this.updateIcons.bind(this),o=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",s),this.addManagedEventListeners({newColumnsLoaded:s,sortChanged:o,columnRowGroupChanged:o}),this.onSortChanged()}addInIcon(e,t,s){if(t==null)return;const o=wt(e,this.beans,s);o&&t.appendChild(o)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortNone:s,column:o,gos:i,beans:n}=this,r=n.sortSvc.getDisplaySortForColumn(o);if(e&&ke(e,r==="asc",{skipAriaHidden:!0}),t&&ke(t,r==="desc",{skipAriaHidden:!0}),s){const a=!o.getColDef().unSortIcon&&!i.get("unSortIcon"),l=r==null;ke(s,!a&&l,{skipAriaHidden:!0})}}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:s}=this;this.addInIcon("sortUnSort",e,t);const o=t.getColDef().showRowGroup;kt(s)&&o&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:s}=this;if(e){const o=t.sortSvc.getDisplaySortForColumn(s)==="mixed";ke(e,o,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:s}}=this;if(!e)return;const o=s.getColumnsWithSortingOrdered(),i=s.getDisplaySortIndexForColumn(t)??-1,n=o.some(a=>s.getDisplaySortIndexForColumn(a)??!1),r=i>=0&&n;ke(e,r,{skipAriaHidden:!0}),i>=0?e.textContent=(i+1).toString():at(e)}},VE={selector:"AG-SORT-INDICATOR",component:ql},bi=["asc","desc",null],BE=class extends T{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,s){const o=this.getNextSortDirection(e);this.setSortForColumn(e,o,t,s)}progressSortFromEvent(e,t){const o=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,o,"uiColumnSorted")}setSortForColumn(e,t,s,o){t!=="asc"&&t!=="desc"&&(t=null);const{gos:i,showRowGroupCols:n}=this.beans,r=kt(i);let a=[e];if(r&&e.getColDef().showRowGroup){const u=n?.getSourceColumnsForGroupColumn?.(e)?.filter(h=>h.isSortable());u&&(a=[e,...u])}for(const d of a)this.setColSort(d,t,o);const l=(s||i.get("alwaysMultiSort"))&&!i.get("suppressMultiSort"),c=[];if(!l){const d=this.clearSortBarTheseColumns(a,o);c.push(...d)}this.updateSortIndex(e),c.push(...a),this.dispatchSortChangedEvents(o,c)}updateSortIndex(e){const{gos:t,colModel:s,showRowGroupCols:o}=this.beans,i=kt(t),n=o?.getShowRowGroupCol(e.getId()),r=i&&n||e,a=this.getColumnsWithSortingOrdered();s.forAllCols(d=>this.setColSortIndex(d,null));const l=a.filter(d=>i&&d.getColDef().showRowGroup?!1:d!==r);(r.getSort()?[...l,r]:l).forEach((d,u)=>this.setColSortIndex(d,u))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{t.getSort()&&(e=!0)}),e}dispatchSortChangedEvents(e,t){const s={type:"sortChanged",source:e};t&&(s.columns=t),this.eventSvc.dispatchEvent(s)}clearSortBarTheseColumns(e,t){const s=[];return this.beans.colModel.forAllCols(o=>{e.includes(o)||(o.getSort()&&s.push(o),this.setColSort(o,void 0,t))}),s}getNextSortDirection(e){const t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??bi,s=t.indexOf(e.getSort()),o=s<0,i=s==t.length-1;return o||i?t[0]:t[s+1]}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:s,rowGroupColsSvc:o}=this.beans;let i=[];if(t.forAllCols(c=>{c.getSort()&&i.push(c)}),t.isPivotMode()){const c=kt(e);i=i.filter(d=>{const u=!!d.getAggFunc(),h=!d.isPrimary(),g=c?s?.getShowRowGroupCol(d.getId()):d.getColDef().showRowGroup;return u||h||g})}const n=o?.columns.filter(c=>!!c.getSort())??[],r={};i.forEach((c,d)=>r[c.getId()]=d),i.sort((c,d)=>{const u=c.getSortIndex(),h=d.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){const g=r[c.getId()],f=r[d.getId()];return g>f?1:-1}else return h==null?-1:1});const a=kt(e)&&!!n.length;a&&(i=[...new Set(i.map(c=>s?.getShowRowGroupCol(c.getId())??c))]);const l=new Map;if(i.forEach((c,d)=>l.set(c,d)),a)for(const c of n){const d=s.getShowRowGroupCol(c.getId());l.set(c,l.get(d))}return l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).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=kt(this.gos),s=!!e.getColDef().showRowGroup;return t&&s}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSort();const o=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,i=o[0].getSort();return o.every(r=>r.getSort()==i)?i:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,s){let o=0;e.addManagedListeners(t,{movingChanged:()=>{o=Date.now()}}),s&&e.addManagedElementListeners(s,{click:n=>{const r=t.isMoving(),l=Date.now()-o<50;r||l||this.progressSortFromEvent(t,n)}});const i=()=>{const n=t.getSort();if(e.toggleCss("ag-header-cell-sorted-asc",n==="asc"),e.toggleCss("ag-header-cell-sorted-desc",n==="desc"),e.toggleCss("ag-header-cell-sorted-none",!n),t.getColDef().showRowGroup){const l=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(c=>t.getSort()==c.getSort());e.toggleCss("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:i,columnRowGroupChanged:i})}initCol(e){const{sort:t,initialSort:s,sortIndex:o,initialSortIndex:i}=e.colDef;t!==void 0?(t==="asc"||t==="desc")&&(e.sort=t):(s==="asc"||s==="desc")&&(e.sort=s),o!==void 0?o!==null&&(e.sortIndex=o):i!==null&&(e.sortIndex=i)}updateColSort(e,t,s){t!==void 0&&(t==="desc"||t==="asc"?this.setColSort(e,t,s):this.setColSort(e,void 0,s))}setColSort(e,t,s){e.sort!==t&&(e.sort=t,e.dispatchColEvent("sortChanged",s)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new ql(e)}getSortIndicatorSelector(){return VE}},bo={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agDateColumnFloatingFilter:"DateFilter",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function Hd(e){return`"${e}"`}var zE=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}}),WE={aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t})=>t?typeof e=="string"?bo[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:bo[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"?bo[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(s=>t.includes(s))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},_E=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:s})=>s?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,s)=>s.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:s})=>s==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:s})=>s==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:s})=>s==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const s=t.headerValueGetter;return typeof s=="function"||typeof s=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return Ht(262);if(t.smallLeft)return Ht(263);if(t.smallRight)return Ht(264)}return null}},sortingOrder:{validate:t=>{const s=t.sortingOrder;if(Array.isArray(s)&&s.length>0){const o=s.filter(i=>!bi.includes(i));if(o.length>0)return`sortingOrder must be an array with elements from [${bi.map(Rn).join()}], currently it includes [${o.map(Rn).join()}]`}else if(!Array.isArray(s)||s.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${s}`;return null}},type:{validate:t=>{const s=t.type;return s instanceof Array?s.some(i=>typeof i!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof s=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:s})=>s?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:s,cellSelection:o,suppressRowTransform:i,enableCellSpan:n,rowDragEntireRow:r,enableCellTextSelection:a})=>typeof s=="object"&&s?.mode==="singleRow"&&s?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":o?"colDef.spanRows is not supported with cellSelection.":i?"colDef.spanRows is not supported with suppressRowTransform.":n?r?"colDef.spanRows is not supported with rowDragEntireRow.":a?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:s={}},o){const i=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),n=[];for(const r of t.groupHierarchy??[]){if(typeof r=="object"){o.validation?.validateColDef(r);continue}!i.has(r)&&!(r in s)&&n.push(Hd(r))}if(n.length>0){const r=`The following parts of colDef.groupHierarchy are not recognised: ${n.join(", ")}.`,a=`Choose one of ${[...i].map(Hd).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${r}
|
|
20
|
+
${a}`}return null}}}),jE={headerName:void 0,columnGroupShow:void 0,headerStyle: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,headerTooltipValueGetter: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,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,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,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,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0},UE=()=>Object.keys(jE),$E=()=>({objectName:"colDef",allProperties:UE(),docsUrl:"column-properties/",deprecations:zE(),validations:_E()}),KE=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],qE=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],YE=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],Ep=["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","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],ZE=["theme","rowSelection"],QE=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],Dp=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows"],XE=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"],JE=()=>[...YE,...qE,...KE,...Ep,...XE,...Dp,...QE,...ZE],e3=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}});function Tt(e,t,s){return typeof t=="number"||t==null?t==null||t>=s?null:`${e}: value should be greater than or equal to ${s}`:`${e}: value should be a number`}var t3={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},s3=()=>{const e={autoSizePadding:{validate({autoSizePadding:s}){return Tt("autoSizePadding",s,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:s}){return Tt("cacheBlockSize",s,1)}},cacheOverflowSize:{validate({cacheOverflowSize:s}){return Tt("cacheOverflowSize",s,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:s=>{const o=s.domLayout,i=["autoHeight","normal","print"];return o&&!i.includes(o)?`domLayout must be one of [${i.join()}], currently it's ${o}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:s,pinnedTopRowData:o,pinnedBottomRowData:i}){return s&&(o||i)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:s,isRowPinnable:o,pinnedTopRowData:i,pinnedBottomRowData:n}){return o&&(i||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!s&&o?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:s,isRowPinned:o,pinnedTopRowData:i,pinnedBottomRowData:n}){return o&&(i||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!s&&o?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:s={}},o,i){for(const n of Object.keys(s))i.validation?.validateColDef(s[n]);return null}},icons:{validate:({icons:s})=>{if(s){if(s.smallDown)return Ht(262);if(s.smallLeft)return Ht(263);if(s.smallRight)return Ht(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:s}){return Tt("infiniteInitialRowCount",s,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:s=>{if(typeof s.ssrmExpandAllAffectsAllRows=="boolean"){if(s.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(s.ssrmExpandAllAffectsAllRows&&typeof s.getRowId!="function")return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:s}){return Tt("keepDetailRowsCount",s,1)}},paginationPageSize:{validate({paginationPageSize:s}){return Tt("paginationPageSize",s,1)}},paginationPageSizeSelector:{validate:s=>{const o=s.paginationPageSizeSelector;return typeof o=="boolean"||o==null||o.length?null:`'paginationPageSizeSelector' cannot be an empty array.
|
|
21
|
+
If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:s}){return Tt("rowBuffer",s,0)}},rowClass:{validate:s=>typeof s.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:s}){return s&&typeof s=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':s&&typeof s!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":s&&s.mode!=="multiRow"&&s.mode!=="singleRow"?`Selection mode "${s.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:s=>{const o=s.rowStyle;return o&&typeof o=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:s}){return Tt("serverSideInitialRowCount",s,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:s=>{const o=s.sortingOrder;if(Array.isArray(o)&&o.length>0){const i=o.filter(n=>!bi.includes(n));if(i.length>0)return`sortingOrder must be an array with elements from [${bi.map(Rn).join()}], currently it includes [${i.map(Rn).join()}]`}else if(!Array.isArray(o)||o.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${o}`;return null}},tooltipHideDelay:{validate:s=>s.tooltipHideDelay&&s.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:s=>s.tooltipShowDelay&&s.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:s=>{const o=s.rowModelType??"clientSide";switch(o){case"clientSide":{const{treeDataChildrenField:i,treeDataParentIdField:n,getDataPath:r,getRowId:a}=s;if(!i&&!n&&!r)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(i){if(r)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(n)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(n){if(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(r)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const i=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${o} row model.`;return s.isServerSideGroup&&s.getServerSideGroupKey?null:i}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:s}){return Tt("viewportRowModelBufferSize",s,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:s}){return Tt("viewportRowModelPageSize",s,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:s,showOpenedGroup:o}){return s?.field&&o?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":s?.valueGetter&&o?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}},renderingMode:{validate:s=>{const o=s.renderingMode,i=["default","legacy"];return o&&!i.includes(o)?`renderingMode must be one of [${i.join()}], currently it's ${o}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:s})=>{if(!s)return null;const o=["fitCellContents","fitGridWidth","fitProvidedWidth"],i=s.type;return i!=="fitCellContents"&&i!=="fitGridWidth"&&i!=="fitProvidedWidth"?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${o.map(n=>'"'+n+'"').join(", ")}, currently it's ${i}`:i==="fitProvidedWidth"&&typeof s.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${s.width}`:null}}},t={};for(const s of Dp)t[s]={expectedType:"boolean"};for(const s of Ep)t[s]={expectedType:"number"};return st(t,e),t},o3=()=>({objectName:"gridOptions",allProperties:[...JE(),...Object.values(Kl)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:e3(),validations:s3()}),i3=0,n3=0,Gd="__ag_grid_instance",r3=class extends T{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=n3++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new Bs,this.globalEventHandlerFactory=e=>(t,s)=>{if(!this.isAlive())return;const o=dn.has(t);if(o&&!e||!o&&e||!a3(t))return;const i=(n,r)=>{const a=Kl[n],l=this.gridOptions[a];typeof l=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(r))};if(this.gridReadyFired)i(t,s);else if(t==="gridReady"){i(t,s),this.gridReadyFired=!0;for(const n of this.queueEvents)i(n.eventName,n.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:s})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??kh[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return V(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(s=>e(this.addCommon(s)))}updateGridOptions({options:e,force:t,source:s="api"}){const o={id:i3++,properties:[]},i=[],{gridOptions:n,validation:r}=this;for(const a of Object.keys(e)){const l=Rl.applyGlobalGridOption(a,e[a]);r?.warnOnInitialPropertyUpdate(s,a);const c=t||typeof l=="object"&&s==="api",d=n[a];if(c||d!==l){n[a]=l;const u={type:a,currentValue:l,previousValue:d,changeSet:o,source:s};i.push(u)}}this.validateGridOptions(this.gridOptions),o.properties=i.map(a=>a.type);for(const a of i)Ws(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const s of Object.keys(e)){const o=e[s];if(o==null||o===!1)continue;let i=t[s];typeof i=="function"&&(i=i(e,this.gridOptions,this.beans)),i&&this.assertModuleRegistered(i,s)}}validateGridOptions(e){this.validateOptions(e,t3),this.validation?.processGridOptions(e)}validateColDef(e,t,s){(s||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,WE),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){const s=Array.isArray(e)?e.some(o=>this.isModuleRegistered(o)):this.isModuleRegistered(e);return s||be(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),s}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:xl(),rowModelType:this.get("rowModelType"),isUmd:Mb()}}isModuleRegistered(e){return ba(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[Gd]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const s=t[Gd];if(V(s))return s===this.instanceId;t=t.parentElement}return!1}};function a3(e){return!!Kl[e]}function Pp(e){const t={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:t},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:t},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:t},e?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var l3=Pp(!0),c3=Pp(!1),d3=class extends Le{constructor(){super(...arguments),this.eFilter=Z,this.eFilterButton=Z,this.eSortIndicator=Z,this.eMenu=Z,this.eLabel=Z,this.eText=Z,this.eSortOrder=Z,this.eSortAsc=Z,this.eSortDesc=Z,this.eSortMixed=Z,this.eSortNone=Z,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const s={...e};st(s,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(s)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const s=e.template;return s?s?.trim?s.trim():s:t?l3:c3}init(e){this.params=e;const{sortSvc:t,touchSvc:s,rowNumbersSvc:o,userCompFactory:i}=this.beans,n=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),s?.setupForHeader(this),this.setMenu(),this.setupSort(),o?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(i,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const s=$0(e,t,t);s&&(this.isLoadingInnerComponent=!0,s.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderComponent=o,this.eText&&this.eText.appendChild(o.getGui())):this.destroyBean(o))}))}setDisplayName(e){const{displayName:t}=e,s=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||s===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=Ao(t))}addInIcon(e,t,s){const o=wt(e,this.beans,s);o&&t.appendChild(o)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){hs(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:s}=this,o=ut(e);this.addInIcon(o?"menu":"menuAlt",t,s.column),t.classList.toggle("ag-header-menu-icon",!o);const i=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=i,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(i)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:s}=this;t||this.toggleMenuAlwaysShow(!0),s.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:s,beans:o,eMenu:i,eFilterButton:n}=this,r=t.column,a=ut(s);if(e&&!a){if(o.menuSvc?.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??i??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(i??n??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:s}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:o,eSortOrder:i,eSortAsc:n,eSortDesc:r,eSortMixed:a,eSortNone:l}=this;o.attachCustomElements(i,n,r,a,l)}this.eSortIndicator.setupSort(s),this.currentSort&&e.setupHeader(this,s,this.eLabel)}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;const s=()=>{const o=t.column.isFilterActive();ke(e,o,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,s,"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,s,o){if(!e)return hs(t),!1;const i=this.params.column;return this.addInIcon(o,t,i),this.addManagedListeners(i,{filterChanged:s}),s(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:s}=this;return e?t??s??this.getGui():s??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}},u3={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},h3=class extends Le{constructor(){super(u3),this.agOpened=Z,this.agClosed=Z,this.agLabel=Z,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:s}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),s?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&L(89)}workOutInnerHeaderGroupComponent(e,t){const s=q0(e,t,t);s&&(this.isLoadingInnerComponent=!0,s.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderGroupComponent=o,this.agLabel.appendChild(o.getGui())):this.destroyBean(o))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:s},beans:o}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const i=l=>{if(Zt(l))return;const c=!s.isExpanded();o.colGroupSvc.setColumnGroupOpened(s.getProvidedColumnGroup(),c,"uiColumnExpanded")};this.addTouchAndClickListeners(o,t,i),this.addTouchAndClickListeners(o,e,i);const n=l=>{Us(l)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:i}),this.updateIconVisibility();const r=s.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t,s){e.touchSvc?.setupForHeaderGroupElement(this,t,s),this.addManagedElementListeners(t,{click:s})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:s}}=this;if(s.isExpandable()){const o=s.isExpanded();ke(e,o),ke(t,!o)}else ke(e,!1),ke(t,!1)}addInIcon(e,t){const s=wt(e,this.beans,null);s&&t.appendChild(s)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:s}=this;ke(t,!1),ke(s,!1)}}setupLabel(e){const{displayName:t,columnGroup:s}=e,o=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;V(t)&&!o&&(this.agLabel.textContent=Ao(t)),this.toggleCss("ag-sticky-label",!s.getColGroupDef()?.suppressStickyLabel)}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},g3={moduleName:"ColumnHeaderComp",version:G,userComponents:{agColumnHeader:d3},icons:{menu:"menu",menuAlt:"menu-alt"}},p3={moduleName:"ColumnGroupHeaderComp",version:G,userComponents:{agColumnGroupHeader:h3},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},f3=class extends T{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&L(92)}createTask(e,t,s,o,i=!1){this.verify();let n=s;o&&this.batchFrameworkComps&&(n="f1");const r={task:e,index:t,createOrder:++this.taskCount,deferred:i};this.addTaskToList(this[n],r),this.schedule()}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((s,o)=>s.deferred!==o.deferred?s.deferred?-1:1:s.index!==o.index?t*(o.index-s.index):o.createOrder-s.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:s,f1:o,destroyTasks:i,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:a}=n,l=t.list,c=s.list,d=o.list,u=Date.now();let h=0;const g=e<=0,f=r.getScrollFeature();for(;g||h<e;){if(!f.scrollGridIfNeeded()){let v;if(l.length)this.sortTaskList(t),v=l.pop().task;else if(c.length)this.sortTaskList(s),v=c.pop().task;else if(d.length)a.wrapOutgoing(()=>{for(;(g||h<e)&&!f.scrollGridIfNeeded();){if(d.length)this.sortTaskList(o),v=d.pop().task,v();else break;h=Date.now()-u}}),v=()=>{};else if(i.length)v=i.pop();else break;v()}h=Date.now()-u}l.length||c.length||d.length||i.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);ts(this.beans,e)}isQueueEmpty(){return!this.ticking}},m3={moduleName:"AnimationFrame",version:G,beans:[f3]},C3=class extends T{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return wt(e,this.beans,t?.column)}},v3=class extends T{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!Ls())return;const t=(s,o,i)=>{const{rowCtrl:n,cellCtrl:r}=e.getControlsForEventTarget(i?.target??null);r?.column&&r.dispatchCellContextMenuEvent(i??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,i,n,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!Ls()||Dh("dblclick"))return!1;const o=Date.now(),i=o-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=o,i})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:s,menuSvc:o}=this.beans;if(t.get("suppressTouch"))return;const{params:i,eMenu:n,eFilterButton:r}=e,a=new Rs(e.getGui(),!0);e.addDestroyFunc(()=>a.destroy());const l=e.shouldSuppressMenuHide(),c=l&&V(n)&&i.enableMenu;let d=a;if(c&&(d=new Rs(n,!0),e.addDestroyFunc(()=>d.destroy())),i.enableMenu||o?.isHeaderContextMenuEnabled(i.column)){const u=c?"tap":"longTap",h=g=>i.showColumnMenuAfterMouseClick(g.touchStart);e.addManagedListeners(d,{[u]:h}),e.addManagedListeners(a,{longTap:h})}if(i.enableSorting){const u=h=>{const g=h.touchStart.target;l&&(n?.contains(g)||r?.contains(g))||s?.progressSort(i.column,!1,"uiColumnSorted")};e.addManagedListeners(a,{tap:u})}if(i.enableFilterButton&&r){const u=new Rs(r,!0);e.addManagedListeners(u,{tap:()=>i.showFilter(r)}),e.addDestroyFunc(()=>u.destroy())}}setupForHeaderGroup(e){const t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const s=new Rs(t.eGridHeader,!0),o=i=>t.showColumnMenuAfterMouseClick(i.touchStart);e.addManagedListeners(s,{longTap:o}),e.addDestroyFunc(()=>s.destroy())}}setupForHeaderGroupElement(e,t,s){const o=new Rs(t,!0);e.addManagedListeners(o,{tap:s}),e.addDestroyFunc(()=>o.destroy())}mockContextMenu(e,t,s){if(!Ls())return;const o=new Rs(t),i=n=>{pi(this.beans,n.touchEvent)&&s(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(o,{longTap:i}),e.addDestroyFunc(()=>o.destroy())}},w3={moduleName:"Touch",version:G,beans:[v3]},b3=class extends T{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,s=!1){return s?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const s=e===D.UP,o=e===D.DOWN,i=e===D.LEFT;let n,r;const{pageBounds:a,gos:l,visibleCols:c,pinnedRowModel:d}=this.beans,{rowPinned:u}=t;if(s||o)u&&d?s?r=0:r=u==="top"?d.getPinnedTopRowCount()-1:d.getPinnedBottomRowCount()-1:r=s?a.getFirstRow():a.getLastRow(),n=t.column;else{const h=l.get("enableRtl");r=t.rowIndex,n=(i!==h?c.allCols:[...c.allCols].reverse()).find(f=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:f}))}return n?{rowIndex:r,rowPinned:u,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let s=t,o=!1;for(;!o;){switch(e){case D.UP:s=this.getCellAbove(s);break;case D.DOWN:s=this.getCellBelow(s);break;case D.RIGHT:s=this.gos.get("enableRtl")?this.getCellToLeft(s):this.getCellToRight(s);break;case D.LEFT:s=this.gos.get("enableRtl")?this.getCellToRight(s):this.getCellToLeft(s);break;default:s=null,L(8,{key:e});break}s?o=this.isCellGoodToFocusOn(s):o=!0}return s}isCellGoodToFocusOn(e){const t=e.column;let s;const{pinnedRowModel:o,rowModel:i}=this.beans;switch(e.rowPinned){case"top":s=o?.getPinnedTopRow(e.rowIndex);break;case"bottom":s=o?.getPinnedBottomRow(e.rowIndex);break;default:s=i.getRow(e.rowIndex);break}return s?!this.isSuppressNavigable(t,s):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,s=xd(this.beans,t,!0);return s?{rowIndex:s.rowIndex,column:e.column,rowPinned:s.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,s=Nn(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);return s?{rowIndex:s.rowIndex,column:e.column,rowPinned:s.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:s}=this.beans,o=t.allCols;let i=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=o[0];const a=xd(this.beans,e,!0);if(Ie(a)||!a.rowPinned&&!(s?.isRowInPage(a.rowIndex)??!0))return null;i=a?a.rowIndex:null,n=a?a.rowPinned:null}return{rowIndex:i,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:s,pagination:o}=t,i=s.allCols;let n=e.rowIndex,r=e.rowPinned,a=s.getColBefore(e.column);if(!a){a=ye(i);const l=Nn(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(Ie(l)||!l.rowPinned&&!(o?.isRowInPage(l.rowIndex)??!0))return null;n=l?l.rowIndex:null,r=l?l.rowPinned:null}return{rowIndex:n,column:a,rowPinned:r}}isSuppressNavigable(e,t){const{suppressNavigable:s}=e.colDef;if(typeof s=="boolean")return s;if(typeof s=="function"){const o=e.createColumnFunctionCallbackParams(t);return s(o)}return!1}};function S3(e){return e.focusSvc.getFocusedCell()}function y3(e){return e.focusSvc.clearFocusedCell()}function R3(e,t,s,o){e.focusSvc.setFocusedCell({rowIndex:t,column:s,rowPinned:o,forceBrowserFocus:!0})}function x3(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function F3(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function E3(e,t,s=!1){const o=e.headerNavigation?.getHeaderPositionForColumn(t,s);o&&e.focusSvc.focusHeaderPosition({headerPosition:o})}var D3=class extends T{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new Tp,this.rowValidations=new Mp,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const s=this.getEditRow(e);t?s.delete(t):s.clear(),s.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;const s=e&&this.edits.get(e);if(s)return s;if(t.checkSiblings){const o=e.pinnedSibling;if(o)return this.getEditRow(o)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||this.edits.size===0)return;const s=this.getEditRow(e),o=e.pinnedSibling,i=t&&o&&this.getEditRow(o);if(!s&&!i)return;const n=Object.assign({},e.data),r=(a,l)=>a.forEach(({pendingValue:c},d)=>{c!==yt&&(l[d.getColId()]=c)});return s&&r(s,n),i&&r(i,n),n}getEdit(e,t){const s=this._getEdit(e);return t&&s?{...s}:s}_getEdit(e){if(!this.suspendEdits&&this.edits.size!==0)return e.rowNode&&e.column&&this.getEditRow(e.rowNode)?.get(e.column)}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach((s,o)=>{const i=new Map;s.forEach(({editorState:n,...r},a)=>i.set(a,{...r})),t.set(o,i)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,s)=>{const o=new Map;t.forEach((i,n)=>o.set(n,{...i})),this.edits.set(s,o)})}setEdit(e,t){(this.edits.size===0||!this.edits.has(e.rowNode))&&this.edits.set(e.rowNode,new Map);const s=this._getEdit(e),o=Object.assign({editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...s,...t});return this.getEditRow(e.rowNode).set(e.column,o),o}clearEditValue(e){const{rowNode:t,column:s}=e;if(t)if(s){const o=this._getEdit(e);o&&(o.editorValue=void 0,o.pendingValue=o.sourceValue,o.state="changed")}else this.getEditRow(t)?.forEach(o=>{o.editorValue=void 0,o.pendingValue=o.sourceValue,o.state="changed"})}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((s,o)=>{for(const i of s.keys()){const{editorState:n,...r}=s.get(i);t.push({rowNode:o,column:i,...r})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:s,column:o}=e,{withOpenEditor:i}=t;if(s){const n=this.getEditRow(s,t);return n?o?i?this.getEdit(e)?.state==="editing":n.has(o)??!1:n.size!==0?i?Array.from(n.values()).some(({state:r})=>r==="editing"):!0:!1:!1}return i?this.getEditPositions().some(({state:n})=>n==="editing"):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:s,column:o}=e;o&&!t.has(o)&&t.set(o,{editorValue:void 0,pendingValue:yt,sourceValue:this.beans.valueSvc.getValue(o,s,!1,"api"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(s,t)}stop(e){this.hasEdits(e)&&(e?this.removeEdits(e):this.clear())}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},Tp=class{constructor(){this.cellValidations=new Map}getCellValidation(e){const{rowNode:t,column:s}=e||{};return this.cellValidations?.get(t)?.get(s)}hasCellValidation(e){return!e?.rowNode||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){const{rowNode:s,column:o}=e;this.cellValidations.has(s)||this.cellValidations.set(s,new Map),this.cellValidations.get(s).set(o,t)}clearCellValidation(e){const{rowNode:t,column:s}=e;this.cellValidations.get(t)?.delete(s)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},Mp=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function Yl(e,t={}){const{rowIndex:s,rowId:o,rowCtrl:i,rowPinned:n}=t;if(i)return i;const{rowModel:r,rowRenderer:a}=e;let{rowNode:l}=t;return l||(o?l=Ux(e,o,n):s!=null&&(l=r.getRow(s))),a.getRowCtrls(l?[l]:[])?.[0]}function Me(e,t={}){const{cellCtrl:s,colId:o,columnId:i,column:n}=t;if(s)return s;const r=e.colModel.getCol(o??i??_a(n)),a=t.rowCtrl??Yl(e,t),l=a?.getCellCtrl(r)??void 0;if(l)return l;const c=t.rowNode??a?.rowNode;if(c)return e.rowRenderer.getCellCtrls([c],[r])?.[0]}function Vd(e){const{editSvc:t}=e;t?.isBatchEditing()?So(e):t?.stopEditing(void 0,{source:"api"})}function P3(e,t,s){const{gos:o,popupSvc:i}=t;if(!o.get("stopEditingWhenCellsLoseFocus"))return;const n=r=>{const a=r.relatedTarget;if(Pa(a)===null){Vd(t);return}let l=s.some(c=>c.contains(a))&&o.isElementInThisInstance(a);l||(l=!!i&&(i.getActivePopups().some(c=>c.contains(a))||i.isElementWithinCustomPopup(a))),l||Vd(t)};for(const r of s)e.addManagedElementListeners(r,{focusout:n})}function _a(e){if(e)return typeof e=="string"?e:e.getColId()}var yt=Symbol("unedited");function Ip(e,t={}){const s=[],o=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns);for(const i of o){const n=i.comp?.getCellEditor();n&&s.push({ctrl:i,editor:Ci(n)})}return s}var T3=(e,t={})=>Ip(e,t).map(s=>s.editor);function M3(e,t,s,o,i,n){t.length===0&&s?.rowNode&&s?.column&&To(e,s,{key:o,event:i,cellStartedEdit:n});const{valueSvc:r,editSvc:a,editModelSvc:l}=e,{rowNode:c,column:d}=s??{};for(const u of t){const{rowNode:h,column:g}=u,f=Me(e,u);if(!f){if(h&&g){const v=r.getValue(g,h,void 0,"api"),S=(s?.rowNode===h&&s?.column===g&&o||void 0)??a?.getCellDataValue(u,!1)??r.getValueForDisplay(g,h)?.value??v??yt;l?.setEdit(u,{pendingValue:S,sourceValue:v,state:"editing"})}continue}const m=n&&c===f.rowNode&&f.column===d;To(e,{rowNode:c,column:f.column},{key:m?o:null,event:m?i:null,cellStartedEdit:m&&n})}}function $t({pendingValue:e,sourceValue:t}){return e===yt&&(e=t),e!==t}function To(e,t,s){const o=e.gos.get("enableGroupEdit"),{key:i,event:n,cellStartedEdit:r,silent:a}=s??{},l=Me(e,t),c=l?.comp?.getCellEditor(),d=Ap(e,t,i,r&&!a),u=e.editModelSvc?.getEdit(t);let h=d.value;if(h===void 0&&(h=u?.sourceValue),e.editModelSvc?.setEdit(t,{editorValue:h,state:"editing"}),c){c.refresh?.(d);return}const g=t.column.getColDef(),f=ug(e.userCompFactory,g,d),m=f?.popupFromSelector!=null?f.popupFromSelector:!!g.cellEditorPopup,v=f?.popupPositionFromSelector!=null?f.popupPositionFromSelector:g.cellEditorPopupPosition;if(Lp(f.params,n),l){l.editCompDetails=f,l.onEditorAttachedFuncs.push(()=>l.rangeFeature?.unsetComp()),l.comp?.setEditDetails(f,m,v,e.gos.get("reactiveCustomComponents")),l?.rowCtrl?.refreshRow({suppressFlash:!0});const w=e.editModelSvc?.getEdit(t,!0);!a&&!w?.editorState?.cellStartedEditing&&(e.editSvc?.dispatchCellEvent(t,n,"cellEditingStarted",o?{value:h}:{}),e.editModelSvc?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}}function kp(e,t,s){const o={editorValueExists:!1};if(Zl(e)&&(t.getValidationErrors?.()?.length??0)>0||s?.isCancelling)return o;if(s?.isStopping){const n=t?.isCancelAfterEnd?.();if(n)return{...o,isCancelAfterEnd:n}}return{editorValue:t.getValue(),editorValueExists:!0}}function Ap(e,t,s,o){const{valueSvc:i,gos:n,editSvc:r}=e,a=e.gos.get("enableGroupEdit"),l=Me(e,t),c=t.rowNode?.rowIndex??void 0,d=r?.isBatchEditing(),u=e.colModel.getCol(t.column.getId()),{rowNode:h,column:g}=t,f=l.comp?.getCellEditor(),m=r?.getCellDataValue(t,!1)??(f?kp(e,f)?.editorValue:void 0),v=m===yt?i.getValueForDisplay(u,h)?.value:m;return X(n,{value:a?m:v,eventKey:s??null,column:g,colDef:g.getColDef(),rowIndex:c,node:h,data:h.data,cellStartedEdit:o??!1,onKeyDown:l?.onKeyDown.bind(l),stopEditing:w=>{r.stopEditing(t,{source:d?"ui":"api",suppressNavigateAfterEdit:w}),Hn(e,t)},eGridCell:l?.eGui,parseValue:w=>i.parseValue(u,h,w,l?.value),formatValue:l?.formatValue.bind(l),validate:()=>{r?.validateEdit()}})}function ja(e,t){const{editModelSvc:s}=e;s?.getEditMap().forEach((o,i)=>{o.forEach((n,r)=>{!t&&(n.state==="editing"||n.pendingValue===yt)||!$t(n)&&(n.state!=="editing"||t)&&s?.removeEdits({rowNode:i,column:r})})})}function I3(e,t){const s=t.comp?.getCellEditor();if(!s?.refresh)return;const{eventKey:o,cellStartedEdit:i}=t.editCompDetails.params,{column:n}=t,r=Ap(e,t,o,i),a=n.getColDef(),l=ug(e.userCompFactory,a,r);s.refresh(Lp(l.params,o))}function Lp(e,t){return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function Ps(e,t){for(const s of e.editModelSvc?.getEditPositions()??[]){const o=Me(e,s);if(!o)continue;const i=o.comp?.getCellEditor();if(!i)continue;const{editorValue:n,editorValueExists:r,isCancelAfterEnd:a}=kp(e,i,t);a&&e.editModelSvc?.setEdit(s,{editorState:{isCancelAfterEnd:a}}),un(e,s,n,void 0,!r,t)}}function un(e,t,s,o,i,n){const{editModelSvc:r,valueSvc:a}=e;if(!r)return;const{rowNode:l,column:c}=t;if(!(l&&c))return;let d=r.getEdit(t,!0);d?.sourceValue||(d=r.setEdit(t,{sourceValue:a.getValue(c,l,void 0,"api"),pendingValue:d?d.editorValue:yt})),r.setEdit(t,{editorValue:i?d.sourceValue:s}),n?.persist&&k3(e,t)}function k3(e,t){const{editModelSvc:s}=e,o=s?.getEdit(t,!0);s?.setEdit(t,{pendingValue:o?.editorValue})}function So(e,t,s){t||(t=e.editModelSvc?.getEditPositions());for(const o of t??[])Hn(e,o,s)}function Hn(e,t,s){const o=e.gos.get("enableGroupEdit"),{editModelSvc:i}=e,n=Me(e,t),r=i?.getEdit(t,!0);if(!n){r&&i?.setEdit(t,{state:"changed"});return}const{comp:a}=n;if(a&&!a.getCellEditor()){if(n?.refreshCell(),r){i?.setEdit(t,{state:"changed"});const c=o?Bd(s,r):{valueChanged:!1,newValue:void 0,oldValue:r.sourceValue};zd(e,t,c,s)}return}if(Zl(e)){const c=a?.getCellEditor()?.getValidationErrors?.(),d=i?.getCellValidationModel();c?.length?d?.setCellValidation(t,{errorMessages:c}):d?.clearCellValidation(t)}i?.setEdit(t,{state:"changed"}),a?.setEditDetails(),a?.refreshEditStyles(!1,!1),n?.refreshCell({force:!0,suppressFlash:!0});const l=i?.getEdit(t);if(l&&l.state==="changed"){const c=o?Bd(s,l):{valueChanged:$t(l)&&!s?.cancel,newValue:s?.cancel||l.editorState.isCancelAfterEnd?void 0:l?.editorValue??r?.pendingValue,oldValue:l?.sourceValue};zd(e,t,c,s)}}function Bd(e,t){return e?.cancel?{valueChanged:!1,oldValue:t.sourceValue,newValue:void 0,value:t.sourceValue}:{valueChanged:!1,oldValue:t.sourceValue,newValue:t.pendingValue,value:t.sourceValue}}function zd(e,t,s,{silent:o,event:i}={}){const{editSvc:n,editModelSvc:r}=e,a=r?.getEdit(t),{editorState:l}=a||{},{isCancelBeforeStart:c}=l||{};!o&&!c&&(n?.dispatchCellEvent(t,i,"cellEditingStopped",s),r?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function Zl(e){const{gos:t,colModel:s}=e,o=!!t.get("getFullRowEditValidationErrors"),i=s.getColumnDefs()?.filter(r=>r.editable).some(({cellEditorParams:r})=>{const{minLength:a,maxLength:l,getValidationErrors:c,min:d,max:u}=r||{};return a!==void 0||l!==void 0||c!==void 0||d!==void 0||u!==void 0}),n=e.gridApi.getCellEditorInstances().some(r=>r.getValidationElement||r.getValidationErrors);return i||o||n}function $s(e,t){if(!(t||Zl(e)))return;const s=Ip(e),o=new Tp,{ariaAnnounce:i,localeSvc:n,editModelSvc:r,gos:a}=e,l=a.get("editType")==="fullRow",d=Th(n)("ariaValidationErrorPrefix","Cell Editor Validation");for(const h of s){const{ctrl:g,editor:f}=h,{rowNode:m,column:v}=g,w=f.getValidationErrors?.()??[],b=f.getValidationElement?.(!1)||!f.isPopup?.()&&g.eGui;if(b){const S=w!=null&&w.length>0,R=S?w.join(". "):"";j1(b,S),S&&i.announceValue(`${d} ${w}`,"editorValidation"),b instanceof HTMLInputElement?b.setCustomValidity(R):b.classList.toggle("invalid",S)}w?.length>0&&o.setCellValidation({rowNode:m,column:v},{errorMessages:w})}Ps(e,{persist:!1}),r?.setCellValidationModel(o);const u=new Set;for(const{ctrl:h}of s)u.add(h.rowCtrl);if(l){const h=A3(e);r?.setRowValidationModel(h)}for(const h of u.values()){h.rowEditStyleFeature?.applyRowStyles();for(const g of h.getAllCellCtrls())g.tooltipFeature?.refreshTooltip(!0),g.editorTooltipFeature?.refreshTooltip(!0),g.editStyleFeature?.applyCellStyles?.()}}var A3=e=>{const t=new Mp,s=e.gos.get("getFullRowEditValidationErrors"),o=e.editModelSvc?.getEditMap();if(!o)return t;for(const i of o.keys()){const n=o.get(i);if(!n)continue;const r=[],{rowIndex:a,rowPinned:l}=i;for(const d of n.keys()){const u=n.get(d);if(!u)continue;const{editorValue:h,pendingValue:g,sourceValue:f}=u,m=h??(g===yt?void 0:g)??f;r.push({column:d,colId:d.getColId(),rowIndex:a,rowPinned:l,oldValue:f,newValue:m})}const c=s?.({editorsState:r})??[];c.length>0&&t.setRowValidation({rowNode:i},{errorMessages:c})}return t};function L3(e){$s(e,!0);const t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;const s=[];return t.forEach((o,i)=>{o.forEach(({errorMessages:n},r)=>{s.push({column:r,rowIndex:i.rowIndex,rowPinned:i.rowPinned,messages:n??null})})}),s}function O3(e,t,s,{rowNode:o,column:i},n){return X(e.gos,{type:s,node:o,data:o.data,value:n,column:i,colDef:i.getColDef(),rowPinned:o.rowPinned,event:t,rowIndex:o.rowIndex})}function N3(e,t=!1){return e===D.DELETE?!0:!t&&e===D.BACKSPACE?pg():!1}var H3=class extends T{constructor(e,t,s,o){super(),this.cellCtrl=e,this.rowNode=s,this.rowCtrl=o,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}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){const{cellCtrl:s,beans:o}=this;if(!o.editSvc?.isEditing(s,{withOpenEditor:!0})){if(e.shiftKey&&s.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const i=s.getFocusedCellPosition();o.navigation?.navigateToNextCell(e,t,i,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:s}=this.beans;if(!t)return;const o=t.extendLatestRangeInDirection(e);o&&(e.key===D.LEFT||e.key===D.RIGHT?s?.ensureColumnVisible(o.column):s?.ensureRowVisible(o.rowIndex))}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:s,beans:o,rowNode:i}=this,{gos:n,rangeSvc:r,eventSvc:a,editSvc:l}=o;if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),N3(e,n.get("enableCellEditingOnBackspace"))&&!l?.isEditing(s,{withOpenEditor:!0})){if(r&&ps(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(s.isCellEditable()){const{column:c}=s,d=this.beans.valueSvc.getDeleteValue(c,i);i.setDataValue(c,d,"cellClear")}}else l?.isEditing(s,{withOpenEditor:!0})||o.editSvc?.startEditing(s,{startedEdit:!0,event:t});a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){const{cellCtrl:t,beans:s}=this,{editSvc:o,navigation:i}=s,n=o?.isEditing(t,{withOpenEditor:!0}),r=t.rowNode,a=o?.isRowEditing(r,{withOpenEditor:!0}),l=c=>{o?.startEditing(c,{startedEdit:!0,event:e,source:"edit"})&&e.preventDefault()};if(n||a){if(this.isCtrlEnter(e)){o?.applyBulkEdit(t,s?.rangeSvc?.getCellRanges()||[]);return}if($s(s),o?.checkNavWithValidation(void 0,e)==="block-stop")return;o?.isEditing(t,{withOpenEditor:!0})?o?.stopEditing(t,{event:e,source:"edit"}):a&&!t.isCellEditable()?o?.stopEditing({rowNode:r},{event:e,source:"edit"}):l(t)}else if(s.gos.get("enterNavigatesVertically")){const c=e.shiftKey?D.UP:D.DOWN;i?.navigateToNextCell(null,c,t.cellPosition,!1)}else{if(o?.hasValidationErrors())return;o?.hasValidationErrors(t)&&o.revertSingleCellEdit(t,!0),l(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===D.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:s}}=this;s?.isEditing()&&($s(this.beans),s?.checkNavWithValidation(void 0,e)==="block-stop")||s?.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:s}}=this;s?.checkNavWithValidation(t,e)==="block-stop"&&s.revertSingleCellEdit(t),s?.stopEditing(t,{event:e,cancel:!0})}processCharacter(e){const s=e.target!==this.eGui,{beans:{editSvc:o},cellCtrl:i}=this;if(s||o?.isEditing(i,{withOpenEditor:!0}))return;if(e.key===D.SPACE)this.onSpaceKeyDown(e);else if(o?.isCellEditable(i,"ui")){if(o?.hasValidationErrors()&&!o?.hasValidationErrors(i))return;o?.startEditing(i,{startedEdit:!0,event:e,source:"api"}),!i.editCompDetails?.params?.suppressPreventDefault&&e.preventDefault()}}onSpaceKeyDown(e){const{gos:t,editSvc:s}=this.beans,{rowNode:o}=this.cellCtrl;!s?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&ks(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,o,"spaceKey"),e.preventDefault()}},G3=class extends T{constructor(e,t,s){super(),this.cellCtrl=e,this.column=s,this.beans=t}onMouseEvent(e,t){if(!Zt(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.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:s,editSvc:o,editModelSvc:i,frameworkOverrides:n,gos:r}=this.beans,a=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:c,cellPosition:d,rowNode:u}=l,h=rn(r,c,u,e);s&&a&&!h&&s.getCellRangeCount(d)>1&&s.intersectLastRange(!0);const g=l.createEvent(e,"cellClicked");g.isEventHandlingSuppressed=h,t.dispatchEvent(g);const f=c.getColDef();if(f.onCellClicked&&window.setTimeout(()=>{n.wrapOutgoing(()=>{f.onCellClicked(g)})},0),!h&&i?.getState(l)!=="editing"){const m=o?.isEditing(),v=i?.getCellValidationModel().getCellValidationMap().size??0,w=i?.getRowValidationModel().getRowValidationMap().size??0;if(m&&(v>0||w>0))return;o?.shouldStartEditing(l,e)?o?.startEditing(l,{event:e}):o?.shouldStopEditing(l,e)&&(this.beans.gos.get("editType")==="fullRow"?o?.stopEditing(l,{event:e,source:"edit"}):o?.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){const{column:t,beans:s,cellCtrl:o}=this,{eventSvc:i,frameworkOverrides:n,editSvc:r,editModelSvc:a,gos:l}=s,c=rn(l,o.column,o.rowNode,e),d=t.getColDef(),u=o.createEvent(e,"cellDoubleClicked");if(u.isEventHandlingSuppressed=c,i.dispatchEvent(u),typeof d.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{d.onCellDoubleClicked(u)})},0),!c&&r?.shouldStartEditing(o,e)&&a?.getState(o)!=="editing"){const h=r?.isEditing(),g=a?.getCellValidationModel().getCellValidationMap().size??0,f=a?.getRowValidationModel().getRowValidationMap().size??0;if(h&&(g>0||f>0))return;r?.startEditing(o,{event:e})}}onMouseDown(e){const{ctrlKey:t,metaKey:s,shiftKey:o}=e,i=e.target,{cellCtrl:n,beans:r}=this,{eventSvc:a,rangeSvc:l,rowNumbersSvc:c,focusSvc:d,gos:u,editSvc:h}=r,{column:g,rowNode:f,cellPosition:m}=n,v=rn(u,g,f,e),w=()=>{const y=n.createEvent(e,"cellMouseDown");y.isEventHandlingSuppressed=v,a.dispatchEvent(y)};if(v){w();return}if(this.isRightClickInExistingRange(e))return;const b=l&&!l.isEmpty(),S=this.containsWidget(i),R=qt(g);if(c&&R&&!c.handleMouseDownOnCell(m,e)){l&&e.preventDefault(),e.stopImmediatePropagation();return}if(!o||!b){const y=h?.isEditing(n),F=u.get("enableCellTextSelection")&&e.defaultPrevented,P=(vs()||F)&&!y&&!Zo(i)&&!S;n.focusCell(P,e)}if(o&&b&&!d.isCellFocused(m)){e.preventDefault();const y=d.getFocusedCell();if(y){const{column:x,rowIndex:F,rowPinned:P}=y;h?.isEditing(y)&&h?.stopEditing(y),d.setFocusedCell({column:x,rowIndex:F,rowPinned:P,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}if(!S){if(l){R&&e.preventDefault();const y=Uc(r,e)&&R;if(o)l.extendLatestRangeToCell(m);else if(!y){const x=t||s;l.setRangeToCell(m,x)}}w()}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const s=t.isCellInAnyRange(this.cellCtrl.cellPosition),o=Uc(this.beans,e);if(s&&o)return!0}return!1}containsWidget(e){return Ms(e,"ag-selection-checkbox",3)||Ms(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:s}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),s?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:s}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),s?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,s=t.contains(e.target),o=t.contains(e.relatedTarget);return s&&o}},V3=class extends T{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();Cs(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,s=e.getColSpan(t),o=[];if(s===1)o.push(e);else{let i=e;const n=e.getPinned();for(let r=0;i&&r<s&&(o.push(i),i=this.beans.visibleCols.getColAfter(i),!(!i||Ie(i)||n!==i.getPinned()));r++);}return o}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=ye(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,s=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const o=t.bodyWidth;return s+o+(e||0)}return s+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const s=As(this.beans)*this.rowSpan;this.eContent.style.height=`${s}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},B3="ag-cell",z3="ag-cell-auto-height",W3="ag-cell-normal-height",_3="ag-cell-focus",j3="ag-cell-first-right-pinned",U3="ag-cell-last-left-pinned",$3="ag-cell-not-inline-editing",K3="ag-cell-wrap-text",q3=0,yo=class extends T{constructor(e,t,s,o){super(),this.column=e,this.rowNode=t,this.rowCtrl=o,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=s,this.gos=s.gos,this.editSvc=s.editSvc,this.hasEdit=!!s.editSvc;const{colId:i}=e;this.instanceId=i+"-"+q3++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new V3(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this,e),this.editStyleFeature=e.editSvc?.createCellStyleFeature(this,e),this.mouseListener=new G3(this,e,this.column),this.keyboardListener=new H3(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&ps(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this)),qt(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),$s(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,s,o,i,n,r){if(this.comp=e,this.eGui=t,this.printLayout=i,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(o,r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.editStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer(),n&&this.isCellEditable()||this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0})?this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(const a of this.onCompAttachedFuncs)a();this.onCompAttachedFuncs=[]}}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){const{beans:e,column:t}=this,{userCompFactory:s,ctrlsSvc:o,eventSvc:i}=e,n=t.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const a=Qc(s,n,r);if(o.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let l;const c=new fe(u=>{l=u}),[d]=this.addManagedListeners(i,{bodyScrollEnd:()=>{l(),d()}});return{loadingComp:a,onReady:c}}return{loadingComp:a,onReady:fe.resolve()}}showValue(e,t){const{beans:s,column:o,rowNode:i,rangeFeature:n}=this,{userCompFactory:r}=s;let a=this.getValueToDisplay(),l;const c=i.stub&&i.groupData?.[o.getId()]==null,d=o.getColDef();if(c||this.isCellRenderer()){const u=this.createCellRendererParams();!c||qt(o)?l=Zc(r,d,u):l=Qc(r,d,u)}if(!l&&!c&&s.findSvc?.isMatch(i,o)){const u=this.createCellRendererParams();l=Zc(r,{...o.getColDef(),cellRenderer:"agFindCellRenderer"},u)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(i,{checkSiblings:!0})){const u=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:a});u&&(u.compDetails?l=u.compDetails:u.valueToDisplay&&(a=u.valueToDisplay))}this.comp.setRenderDetails(l,a,e),this.customRowDragComp?.refreshVisibility(),!t&&n&&ts(s,()=>n?.refreshHandle()),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){const e="ag-cell-value",t=this.column.getColDef().cellRenderer==="agCheckboxCellRenderer";let s="";return t&&(s=" ag-allow-overflow"),`${e}${s}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&Ii(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:s}=this.beans.gridOptions,o=xn(t),i=ss(this.column);return s==="custom"&&o!=="selectionColumn"&&i?!1:e.checkboxSelection||i&&typeof t=="object"&&fo(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),s=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),o=this.includeDndSource!=this.isIncludeControl(e.dndSource),i=this.isAutoHeight!=this.column.isAutoHeight();return t||s||o||i}onPopupEditorClosed(){const{editSvc:e}=this.beans;e?.isEditing(this,{withOpenEditor:!0})&&e?.stopEditing(this,{source:e?.isBatchEditing()?"ui":"api"})}stopEditing(e=!1){const{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:s,rowNode:o,comp:i,eGui:n,beans:{valueSvc:r,gos:a,editSvc:l}}=this;return X(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(s,o).value,setValue:d=>l?.setDataValue({rowNode:o,column:s},d)||o.setDataValue(s,d),formatValue:this.formatValue.bind(this),data:o.data,node:o,pinned:s.getPinned(),colDef:s.getColDef(),column:s,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:i.getParentOfValue(),registerRowDragger:(d,u,h,g)=>this.registerRowDragger(d,u,g),setTooltip:(d,u)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,u),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){const{editSvc:t,comp:s}=this;!s?.getCellEditor()&&t.isEditing(this,{withOpenEditor:!0})&&t.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell({force:e,suppressFlash:t,newData:s}={}){const{editStyleFeature:o,customStyleFeature:i,rowCtrl:{rowEditStyleFeature:n},beans:{cellFlashSvc:r,filterManager:a},column:l,comp:c,suppressRefreshCell:d,tooltipFeature:u}=this;if(d)return;const{field:h,valueGetter:g,showRowGroup:f,enableCellChangeFlash:m}=l.getColDef(),v=h==null&&g==null&&f==null,w=e||v||s,b=!!c,S=this.updateAndFormatValue(b),R=w||S;if(b){if(R){this.showValue(!!s,!1);const y=a?.isSuppressFlashingCellsBecauseFiltering();!t&&!y&&m&&r?.flashCell(this),o?.applyCellStyles?.(),i?.applyUserStyles(),i?.applyClassesFromColDef(),n?.applyRowStyles()}u?.refreshTooltip(),i?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,s=this.valueFormatted,{value:o,valueFormatted:i}=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode,!0);return this.value=o,this.valueFormatted=i,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=s:!0}valuesAreEqual(e,t){const s=this.column.getColDef();return s.equals?s.equals(e,t):e===t}addDomData(e){const t=this.eGui;_s(this.beans.gos,t,Ln,this),e.addDestroyFunc(()=>_s(this.beans.gos,t,Ln,null))}createEvent(e,t){const{rowNode:s,column:o,value:i,beans:n}=this;return O3(n,e,t,{rowNode:s,column:o},i)}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature?.getColSpanningList()??[]}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:s}=this;qg(e,t,s.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);wh(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){const s=this.editSvc?.allowedFocusTargetOnValidation(this);s&&s!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:s},comp:o}=this;if(!o||t?.isEditing(this)||!this.isCellFocused()||!s.shouldTakeFocus())return;const i=()=>{if(!this.isAlive())return;const n=o.getFocusableElement();this.isCellFocused()&&n.focus({preventScroll:!0})};if(e){setTimeout(i,0);return}i()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(qt(this.column)&&(e=!0),dt(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(j3,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(U3,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if(ir(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const s=this.isCellFocused(),o=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss(_3,s),s&&e?.forceBrowserFocus){let i=this.comp.getFocusableElement();if(o){const n=Co(i,null,!0);n.length&&(i=n[0])}i.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}s&&e&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:Kt(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(B3,!0),e.toggleCss($3,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(z3,t),e.toggleCss(W3,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(K3,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),s=this.createEvent(e,"cellContextMenu"),{beans:o}=this;o.eventSvc.dispatchEvent(s),t.onCellContextMenu&&window.setTimeout(()=>{o.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(s)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(Ae(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,s){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const o=this.createRowDragComp(e,t,s);o&&(this.customRowDragComp=o,this.addDestroyFunc(()=>{this.beans.context.destroyBean(o),this.customRowDragComp=null}),o.refreshVisibility())}createRowDragComp(e,t,s){const o=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,s);if(o)return this.beans.context.createBean(o),o}cellEditorAttached(){for(const e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}};function Ql(e,t,s,o,i,n){if(s==null&&t==null)return;const r={},a={},l=(c,d)=>{for(const u of c.split(" "))u.trim()!=""&&d(u)};if(s){const c=Object.keys(s);for(let d=0;d<c.length;d++){const u=c[d],h=s[u];let g;typeof h=="string"?g=e?e.evaluate(h,o):!0:typeof h=="function"&&(g=h(o)),l(u,f=>{g?r[f]=!0:a[f]=!0})}}if(t&&n)for(const c of Object.keys(t))l(c,d=>{r[d]||(a[d]=!0)});n&&Object.keys(a).forEach(n),Object.keys(r).forEach(i)}function Wd(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var Y3=class extends T{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const s=this.gos,o=r=>{if(typeof r=="string")e.push(r);else if(Array.isArray(r))for(const a of r)e.push(a)},i=s.get("rowClass");i&&o(i);const n=s.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},a=n(r);o(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,s=>{e.push(s)},()=>{})}processRowClassRules(e,t,s){const{gos:o,expressionSvc:i}=this.beans,n=X(o,{data:e.data,node:e,rowIndex:e.rowIndex});Ql(i,void 0,o.get("rowClassRules"),n,t,s)}processStylesFromGridOptions(e){const t=this.gos,s=t.get("rowStyle"),o=t.getCallback("getRowStyle");let i;if(o){const n={data:e.data,node:e,rowIndex:e.rowIndex};i=o(n)}if(i||s)return Object.assign({},s,i)}},Z3=0,Gn=class extends T{constructor(e,t,s,o,i){super(),this.rowNode=e,this.useAnimationFrameForCreate=o,this.printLayout=i,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.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+Z3++,this.rowId=Yo(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=Wd(this.rowNode),this.setRowType(),this.setAnimateFlags(s),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=t.editSvc?.createRowStyleFeature(this,t),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Yo(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,s,o){const{context:i,focusSvc:n}=this.beans;o=Ei(this,i,o);const r={rowComp:e,element:t,containerType:s,compBean:o};this.allRowGuis.push(r),this.updateGui(s,r),this.initialiseRowComp(r);const a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,c=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!c&&!a.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const d=this.fullWidthGui?.element;d&&!this.beans.editSvc?.isEditing(this)&&n.isRowFocused(a.rowIndex,a.rowPinned)&&n.shouldTakeFocus()&&setTimeout(()=>d.focus({preventScroll:!0}),0)}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";for(const s of this.allRowGuis)s.element.style.display=t}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),ks(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const s=e.rowComp,o=this.getInitialRowClasses(e.containerType);for(const i of o)s.toggleCss(i,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&va(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(s),this.setRowCompRowBusinessKey(s),_s(t,e.element,On,this),e.compBean.addDestroyFunc(()=>_s(t,e.element,On,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Yo(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(wa(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(wa(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const s=this.createBean(t,this.beans.context);this.rowDragComps.push(s),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(o=>o!==s),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(s,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),s=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(s)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={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)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:s,beans:{visibleCols:o}}=this,i=!!e||!o.isPinningLeft(),n=!!t,r=!!s||!o.isPinningRight();return i&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),s=this.gos.get("masterDetail")&&this.rowNode.detail,o=this.beans.colModel.isPivotMode(),i=Kh(this.gos,this.rowNode,o);e?this.rowType="FullWidthLoading":s?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":i?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:s}=this.beans;if(!s?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(s.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new yo(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,s=null){const o={list:[],map:{}},i=(c,d,u)=>{u!=null?o.list.splice(u,0,d):o.list.push(d),o.map[c]=d},n=[];for(const c of t){const d=c.getInstanceId();let u=e.map[d];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(c)),u&&i(d,u)}for(const c of e.list){const d=c.column.getInstanceId();if(o.map[d]!=null)continue;!this.isCellEligibleToBeRemoved(c,s)?n.push([d,c]):c.destroy()}if(n.length)for(const[c,d]of n){const u=o.list.findIndex(g=>g.column.getLeft()>d.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);i(c,d,h)}const{focusSvc:r,visibleCols:a}=this.beans,l=r.getFocusedCell();if(l&&l.column.getPinned()==s){const c=l.column.getInstanceId();if(!o.map[c]&&a.allCols.includes(l.column)){const u=this.createFocusedCellCtrl();if(u){const h=o.list.findIndex(f=>f.column.getLeft()>u.column.getLeft()),g=h===-1?void 0:Math.max(h-1,0);i(c,u,g)}}}return o}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,s=e.getFocusedCell();if(!s)return;const o=t?.getCellSpan(s.column,this.rowNode);if(o){if(o.firstNode!==this.rowNode||!o.doesSpanContain(s))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(s.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){for(const t of this.allRowGuis){const s=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(s,e)}}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const s=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,s);const o=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,o,"left");const i=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,i,"right")}}isCellEligibleToBeRemoved(e,t){const{column:i}=e;if(i.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{visibleCols:n,editSvc:r}=this.beans,a=r?.isEditing(e),l=e.isCellFocused();return a||l?!(n.allCols.indexOf(i)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||Ze(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=V(this.rowNode.oldRowTop),{visibleCols:s}=this.beans,o=s.isPinningLeft(),i=s.isPinningRight();if(t){const{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=o,n.right=i}else{const{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=o,n.right=i}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(r,a)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,a).params):!0,t=e(this.fullWidthGui,null),s=e(this.centerGui,null),o=e(this.leftGui,"left"),i=e(this.rightGui,"right");return t&&s&&o&&i}addListeners(){const{beans:e,gos:t,rowNode:s}=this,{expansionSvc:o,eventSvc:i,context:n,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...o?.getRowExpandedListeners(this)??{}}),s.detail&&this.addManagedListeners(s.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(s,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(i,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:a})=>{a&&!s.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,n),this.tooltipFeature=this.destroyBean(this.tooltipFeature,n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,n)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){for(const l of this.allRowGuis)this.addRowDraggerToRow(l);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,n)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(const e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(const t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}for(const s of this.getAllCellCtrls())s.refreshCell(e);for(const s of this.allRowGuis)this.setRowCompRowId(s.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(s.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=e?.row===this.rowNode?e.position:"none",s=t==="above",o=t==="inside",i=t==="below",r=this.gos.get("treeData")&&(i||s),a=this.rowNode.uiLevel.toString();for(const l of this.allRowGuis){const c=l.rowComp;c.toggleCss("ag-row-highlight-above",s),c.toggleCss("ag-row-highlight-inside",o),c.toggleCss("ag-row-highlight-below",i),c.toggleCss("ag-row-highlight-indent",r),r?l.element.style.setProperty("--ag-row-highlight-level",a):l.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){const e=this.rowNode.dragging;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Kt(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:s,column:o}=t;if(!(s.element===e.target))return;const r=this.rowNode,{focusSvc:a,navigation:l}=this.beans,c=a.getFocusedCell(),d={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:c?.column??o};l?.navigateToNextCell(e,e.key,d,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||Zt(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),s=t?t.element:null,o=s===e.target,i=Ae(this.beans);let n=!1;s&&i&&(n=s.contains(i)&&i.classList.contains("ag-cell"));let r=null;!o&&!n&&(r=Qs(this.beans,s,!1,e.shiftKey)),(this.isFullWidth()&&o||!r)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>Jt(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(const s of this.allRowGuis)dt(s.element,"tabindex",t)}onFullWidthRowFocused(e){const t=this.rowNode,s=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1;let o;if(this.fullWidthGui)o=this.fullWidthGui.element;else{const n=this.beans.colModel.getCol(e?.column)?.pinned;n?o=n==="right"?this.rightGui?.element:this.leftGui?.element:o=this.centerGui?.element}o&&(o.classList.toggle("ag-full-width-focus",s),s&&e?.forceBrowserFocus&&o.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const s={list:[],map:{}};for(const o of e.list)o!==t&&(s.list.push(o),s.map[o.column.getInstanceId()]=o);return s}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:s}=this;return X(this.gos,{type:e,node:s,data:s.data,rowIndex:s.rowIndex,rowPinned:s.rowPinned,event:t})}createRowEventWithSource(e,t){const s=this.createRowEvent(e,t);return s.source=this,s}onRowDblClick(e){if(Zt(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),s=this.getColumnForFullWidth(t);if(!(!t||!s))return{rowGui:t,column:s}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=Ms(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:s}=this.beans;t?.removeAllCellRanges();const o=this.findFullWidthInfoForEvent(e);if(!o)return;const{rowGui:i,column:n}=o,r=i.element,a=e.target,l=this.rowNode;let c=e.defaultPrevented||vs();r&&r.contains(a)&&Zo(a)&&(c=!1),s.setFocusedCell({rowIndex:l.rowIndex,column:n,rowPinned:l.rowPinned,forceBrowserFocus:c})}isSuppressMouseEvent(e){const{gos:t,rowNode:s}=this;if(this.isFullWidth()){const i=this.findFullWidthRowGui(e.target);return $y(t,i?.rowComp.getFullWidthCellRendererParams(),s,e)}const o=zl(t,e.target);return o!=null&&rn(t,o.column,s,e)}onRowClick(e){if(Zt(e)||this.lastMouseDownOnDragger)return;const s=this.isSuppressMouseEvent(e),{eventSvc:o,selectionSvc:i}=this.beans,n=this.createRowEventWithSource("rowClicked",e);n.isEventHandlingSuppressed=s,o.dispatchEvent(n),!s&&i?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:s,rowNode:o}=this,i=X(s,{fullWidth:!0,data:o.data,node:o,value:o.key,valueFormatted:o.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,a,l,c)=>this.addFullWidthRowDragging(r,a,l,c),setTooltip:(r,a)=>{s.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(r,a)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return X0(n,i);case"FullWidthGroup":{const{value:r,valueFormatted:a}=this.beans.valueSvc.getValueForDisplay(void 0,this.rowNode,!0);return i.value=r,i.valueFormatted=a,Q0(n,i)}case"FullWidthLoading":return Z0(n,i);default:return Y0(n,i)}}setupFullWidthRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,s="",o){const{rowDragSvc:i,context:n}=this.beans;if(!i||!this.isFullWidth())return;const r=i.createRowDragComp(()=>s,this.rowNode,void 0,e,t,o);this.createBean(r,n),this.addDestroyFunc(()=>{this.destroyBean(r,n)})}onUiLevelChanged(){const e=Wd(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,s="ag-row-level-"+this.rowLevel;for(const o of this.allRowGuis)o.rowComp.toggleCss(t,!0),o.rowComp.toggleCss(s,!1)}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(const s of this.allRowGuis)s.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(const s of this.allRowGuis)s.rowComp.toggleCss("ag-row-last",t)}}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 e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(const t of e)for(const s of this.allRowGuis)s.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!0)},e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,s=>s.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),s=this.isFullWidth(),{rowNode:o,beans:i}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&n.push("ag-opacity-zero"),n.push(o.rowIndex%2===0?"ag-row-even":"ag-row-odd"),o.isRowPinned()&&(n.push("ag-row-pinned"),i.pinnedRowModel?.isManual()&&n.push("ag-row-pinned-manual")),!o.isRowPinned()&&o.pinnedSibling&&n.push("ag-row-pinned-source"),o.isSelected()&&n.push("ag-row-selected"),o.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),o.stub&&n.push("ag-row-loading"),s&&n.push("ag-full-width-row"),i.expansionSvc?.addExpandedCss(n,o),o.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=i;return r&&(r.processClassesFromGridOptions(n,o),r.preProcessRowClassRules(n,o)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),s&&(t==="left"&&n.push("ag-cell-last-left-pinned"),t==="right"&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:s}=e,{rowNode:o,beans:i,gos:n}=this;s.addManagedListeners(t,{pointerenter:r=>{r.pointerType==="mouse"&&o.dispatchRowEvent("mouseEnter")},pointerleave:r=>{r.pointerType==="mouse"&&o.dispatchRowEvent("mouseLeave")}}),s.addManagedListeners(o,{mouseEnter:()=>{!i.dragSvc?.dragging&&!n.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),o.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(s=>s.element);for(const s of t)s.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),s=this.applyPaginationOffset(t.top,!0)-100,o=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(s,e),o)}forEachGui(e,t){if(e)t(e);else for(const s of this.allRowGuis)t(s)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,s=this.beans.environment.getDefaultRowHeight(),i=Wh(this.gos)?gs(this.beans,this.rowNode).height:void 0,n=i?`${Math.min(s,i)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,n&&r.element.style.setProperty("--ag-line-height",n)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&po(this.gos)&&!t.sticky)if(t.rowTop!=null){const i=this.roundRowTopToBounds(t.rowTop);this.setRowTop(i)}else for(const i of this.allRowGuis)i.rowComp.toggleCss("ag-opacity-zero",!0);this.fullWidthGui?.element.contains(Ae(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const s=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(s),this.beans.eventSvc.dispatchEvent(s),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;const e=t=>{for(const s of t.list)s.destroy();return{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const s=this.beans.pageBounds.getPixelOffset();return e+s*(t?1:-1)}setRowTop(e){if(!this.printLayout&&V(e)){const t=this.applyPaginationOffset(e),i=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(i)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let s;if(t.sticky)s=t.stickyRowTop;else{const o=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,i=this.applyPaginationOffset(o);s=t.isRowPinned()?i:this.beans.rowContainerHeight.getRealPixelPosition(i)}return s+"px"}setRowTopStyle(e){for(const t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let s=null;for(const o of this.getAllCellCtrls())o.column==e&&(s=o);if(s!=null||t)return s;for(const o of this.getAllCellCtrls())o?.getColSpanningList().indexOf(e)>=0&&(s=o);return s}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const s=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),o=this.rowNode.rowIndex%2===0,i=s+this.rowNode.rowIndex+1;this.forEachGui(e,n=>{n.rowComp.setRowIndex(t),n.rowComp.toggleCss("ag-row-even",o),n.rowComp.toggleCss("ag-row-odd",!o),vh(n.element,i)})}},Q3=class extends T{constructor(){super(),this.beanName="navigation",this.onPageDown=Bc(this.onPageDown,100),this.onPageUp=Bc(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const s=e.key,o=e.altKey,i=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=wR(this.gos,e);let a=!1;switch(s){case D.PAGE_HOME:case D.PAGE_END:!i&&!o&&(this.onHomeOrEndKey(s),a=!0);break;case D.LEFT:case D.RIGHT:case D.UP:case D.DOWN:if(!r)return!1;i&&!o&&!n&&(this.onCtrlUpDownLeftRight(s,r),a=!0);break;case D.PAGE_DOWN:case D.PAGE_UP:!i&&!o&&(a=this.handlePageUpDown(s,r,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,s){return s&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===D.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:s,focusIndex:o,focusColumn:i,isAsync:n,rowPinned:r}){const{scrollFeature:a}=this.gridBodyCon;V(s)&&!s.isPinned()&&a.ensureColumnVisible(s),V(e)&&a.ensureIndexVisible(e,t),n||a.ensureIndexVisible(o);const{focusSvc:l,rangeSvc:c}=this.beans;l.setFocusedCell({rowIndex:o,column:i,rowPinned:r,forceBrowserFocus:!0}),c?.setRangeToCell({rowIndex:o,rowPinned:r,column:i})}onPageDown(e){const t=this.beans,s=Xr(t),o=this.getViewportHeight(),{pageBounds:i,rowModel:n,rowAutoHeight:r}=t,a=i.getPixelOffset(),l=s.top+o,c=n.getRowIndexAtPixel(l+a);r?.active?this.navigateToNextPageWithAutoHeight(e,c):this.navigateToNextPage(e,c)}onPageUp(e){const t=this.beans,s=Xr(t),{pageBounds:o,rowModel:i,rowAutoHeight:n}=t,r=o.getPixelOffset(),a=s.top,l=i.getRowIndexAtPixel(a+r);n?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,s=!1){const{pageBounds:o,rowModel:i}=this.beans,n=this.getViewportHeight(),r=o.getFirstRow(),a=o.getLastRow(),l=o.getPixelOffset(),c=i.getRow(e.rowIndex),d=s?c?.rowHeight-n-l:n-l,u=c?.rowTop+d;let h=i.getRowIndexAtPixel(u+l);if(h===e.rowIndex){const f=s?-1:1;t=h=e.rowIndex+f}let g;s?(g="bottom",h<r&&(h=r),t<r&&(t=r)):(g="top",h>a&&(h=a),t>a&&(t=a)),this.isRowTallerThanView(i.getRow(h))&&(t=h,g="top"),this.navigateTo({scrollIndex:t,scrollType:g,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,s=!1){this.navigateTo({scrollIndex:t,scrollType:s?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const o=this.getNextFocusIndexForAutoHeight(e,s);this.navigateTo({scrollIndex:t,scrollType:s?"bottom":"top",scrollColumn:null,focusIndex:o,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const s=t?-1:1,o=this.getViewportHeight(),{pageBounds:i,rowModel:n}=this.beans,r=i.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=r;){const c=n.getRow(l);if(c){const d=c.rowHeight??0;if(a+d>o)break;a+=d}l+=s}return Math.max(0,Math.min(l,r))}getViewportHeight(){const e=this.beans,t=Xr(e),s=this.beans.scrollVisibleSvc.getScrollbarWidth();let o=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(o-=s),o}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const s=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),o=this.getNormalisedPosition(s),{rowIndex:i,rowPinned:n,column:r}=o??s,a=r;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:a,focusIndex:i,focusColumn:a,rowPinned:n})}onHomeOrEndKey(e){const t=e===D.PAGE_HOME,{visibleCols:s,pageBounds:o,rowModel:i}=this.beans,n=s.allCols,r=t?o.getFirstRow():o.getLastRow(),a=i.getRow(r);if(!a)return;const l=(t?n:[...n].reverse()).find(c=>!c.isSuppressNavigable(a));l&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:l,focusIndex:r,focusColumn:l})}onTabKeyDown(e,t){const s=t.shiftKey,o=this.tabToNextCellCommon(e,s,t),i=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:a,gos:l}=i;if(o!==!1){o?t.preventDefault():o===null&&n.get("gridCtrl").allowFocusForNextCoreContainer(s);return}if(s){const{rowIndex:c,rowPinned:d}=e.getRowPosition();(d?c===0:c===r.getFirstRow())&&(l.get("headerHeight")===0||Os(i)?Po(i,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof yo&&e.focusCell(!0),(a.focusOverlay(!1)||Po(i,s))&&t.preventDefault()}tabToNextCell(e,t){const s=this.beans,{focusSvc:o,rowRenderer:i}=s,n=o.getFocusedCell();if(!n)return!1;let r=uo(s,n);return!r&&(r=i.getRowByPosition(n),!r?.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t,"api")}tabToNextCellCommon(e,t,s,o="ui"){const{editSvc:i,focusSvc:n}=this.beans;let r;const a=e instanceof yo?e:e.getAllCellCtrls()?.[0];return i?.isEditing()?r=i?.moveToNextCell(a,t,s,o):r=this.moveToNextCellNotEditing(e,t,s),r===null?r:r||!!n.focusedHeader}moveToNextCellNotEditing(e,t,s){const o=this.beans.visibleCols.allCols;let i;if(e instanceof Gn){if(i={...e.getRowPosition(),column:t?o[0]:ye(o)},this.gos.get("embedFullWidthRows")&&s){const r=e.findFullWidthInfoForEvent(s);r&&(i.column=r.column)}}else i=e.getFocusedCellPosition();const n=this.findNextCellToFocusOn(i,{backwards:t,startEditing:!1});if(n===!1)return null;if(n instanceof yo)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return V(n)}findNextCellToFocusOn(e,{backwards:t,startEditing:s,skipToNextEditableCell:o}){let i=e;const n=this.beans,{cellNavigation:r,gos:a,focusSvc:l,rowRenderer:c,rangeSvc:d}=n;for(;;){e!==i&&(e=i),t||(i=this.getLastCellOfColSpan(i)),i=r.getNextTabbedCell(i,t);const u=a.getCallback("tabToNextCell");if(V(u)){const m=u({backwards:t,editing:s,previousCellPosition:e,nextCellPosition:i||null});if(m===!0)i=e;else{if(m===!1)return!1;i={rowIndex:m.rowIndex,column:m.column,rowPinned:m.rowPinned}}}if(!i)return null;if(i.rowIndex<0){const f=Lt(n);return l.focusHeaderPosition({headerPosition:{headerRowIndex:f+i.rowIndex,column:i.column},fromCell:!0}),null}const h=a.get("editType")==="fullRow";if(s&&(!h||o)&&!this.isCellEditable(i))continue;this.ensureCellVisible(i);const g=uo(n,i);if(!g){const f=c.getRowByPosition(i);if(!f||!f.isFullWidth()||s)continue;return{...f.getRowPosition(),column:i?.column}}if(!r.isSuppressNavigable(g.column,g.rowNode))return g.setFocusedCellPosition(i),d?.setRangeToCell(i),g}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:s,rowModel:o}=this.beans;return t==="top"?s?.getPinnedTopRow(e):t==="bottom"?s?.getPinnedBottomRow(e):o.getRow(e)}navigateToNextCell(e,t,s,o){let i=s,n=!1;const r=this.beans,{cellNavigation:a,focusSvc:l,gos:c}=r;for(;i&&(i===s||!this.isValidNavigateCell(i));)c.get("enableRtl")?t===D.LEFT&&(i=this.getLastCellOfColSpan(i)):t===D.RIGHT&&(i=this.getLastCellOfColSpan(i)),i=a.getNextCellToFocus(t,i),n=Ie(i);if(n&&e&&e.key===D.UP&&(i={rowIndex:-1,rowPinned:null,column:s.column}),o){const u=c.getCallback("navigateToNextCell");if(V(u)){const g=u({key:t,previousCellPosition:s,nextCellPosition:i||null,event:e});V(g)?i={rowPinned:g.rowPinned,rowIndex:g.rowIndex,column:g.column}:i=null}}if(!i)return;if(i.rowIndex<0){const u=Lt(r);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+i.rowIndex,column:s.column},event:e||void 0,fromCell:!0});return}const d=this.getNormalisedPosition(i);d?this.focusPosition(d):this.tryToFocusFullWidthRow(i)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const s=uo(this.beans,e);return s?(e=s.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:s,rowRenderer:o,focusSvc:i,eventSvc:n}=this.beans,r=s.allCols;if(!o.getRowByPosition(e)?.isFullWidth())return!1;const l=i.getFocusedCell(),c={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?ye(r):r[0])};this.focusPosition(c);const d=t??(l!=null&&zx(c,l));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:c.rowIndex,rowPinned:c.rowPinned,column:c.column,isFullWidthCell:!0,fromBelow:d}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:s}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),s?.setRangeToCell(e)}isValidNavigateCell(e){return!!Qt(this.beans,e)}getLastCellOfColSpan(e){const t=uo(this.beans,e);if(!t)return e;const s=t.getColSpanningList();return s.length===1?e:{rowIndex:e.rowIndex,column:ye(s),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=jh(this.gos),s=this.beans.rowModel.getRow(e.rowIndex),o=t&&s?.sticky,{scrollFeature:i}=this.gridBodyCon;!o&&Ie(e.rowPinned)&&i.ensureIndexVisible(e.rowIndex),e.column.isPinned()||i.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function Xr(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var X3={moduleName:"KeyboardNavigation",version:G,beans:[Q3,b3,IE],apiFunctions:{getFocusedCell:S3,clearFocusedCell:y3,setFocusedCell:R3,setFocusedHeader:E3,tabToNextCell:x3,tabToPreviousCell:F3}},J3=class extends T{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:s}=this.beans;t?t.calculatePages():e.calculateBounds(0,s.getRowCount()-1)}},eD=class extends T{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,s=e?.rowTop??0,o=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:s,pageLastPixel:o}}calculateBounds(e,t){const{rowModel:s}=this.beans,o=s.getRowBounds(e);o&&(o.rowIndex=e),this.topRowBounds=o;const i=s.getRowBounds(t);i&&(i.rowIndex=t),this.bottomRowBounds=i,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},tD=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",sD=class extends T{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const s of this.elements)s&&(ke(s,t),Nt(s,e))}},oD=class extends T{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:s}=this.beans,o=Ze(e,"print"),i=o?0:t.getColsLeftWidth(),n=o?0:t.getDisplayedColumnsRightWidth();i!=this.leftWidth&&(this.leftWidth=i,s.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,s.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=gi(e);if(t<=50)return;const s=this.getPinnedColumnsOverflowingViewport(t-50),o=this.gos.getCallback("processUnpinnedColumns"),{columns:i,hasLockedPinned:n}=s;let r=i;!r.length&&!n||(o&&(r=o({columns:r,viewportWidth:t})),r?.length&&(r=r.filter(a=>!qt(a)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new sD(e,t)}setColsPinned(e,t,s){const{colModel:o,colAnimation:i,visibleCols:n,gos:r}=this.beans;if(!o.cols||!e?.length)return;if(Ze(r,"print")){L(37);return}i?.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];for(const c of e){if(!c)continue;const d=o.getCol(c);d&&d.getPinned()!==a&&(this.setColPinned(d,a),l.push(d))}l.length&&(n.refresh(s),ng(this.eventSvc,l,s)),i?.finish()}initCol(e){const{pinned:t,initialPinned:s}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,s)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const s=e.pinned==="left",o=e.pinned==="right";e.hidden=!0;const i=()=>{const n=s?this.leftWidth:this.rightWidth;if(n==null)return;const r=n==0,a=e.hidden!==r,l=this.gos.get("enableRtl"),c=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(l&&s||!l&&o)?n+c:n;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),a&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:i,rightPinnedWidthChanged:i,scrollVisibilityChanged:i,scrollbarWidthChanged:i})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:o,rightWidth:i}=this,n=gi(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(o+i+e>n)if(n>o+i)e=n-o-i;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,s=this.leftWidth??0,o=t+s;let i=!1;if(o<e)return{columns:[],hasLockedPinned:i};const{visibleCols:n}=this.beans,r=[...n.leftCols],a=[...n.rightCols];let l=0,c=0;const d=0,u=[];let h=o-d-e;for(;(c<r.length||l<a.length)&&h>0;){if(l<a.length){const g=a[l++];if(g.colDef.lockPinned){i=!0;continue}h-=g.getActualWidth(),u.push(g)}if(c<r.length&&h>0){const g=r[c++];if(g.colDef.lockPinned){i=!0;continue}h-=g.getActualWidth(),u.push(g)}}return{columns:u,hasLockedPinned:i}}},iD={moduleName:"PinnedColumn",version:G,beans:[oD],css:[tD]},nD=class extends T{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=Ye(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=$e(e),s=this.descriptionContainer=t.createElement("div");s.classList.add("ag-aria-description-container"),mh(s,"polite"),_1(s,"additions text"),W1(s,!0),e.eGridDiv.appendChild(s)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(at(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},rD={moduleName:"Aria",version:G,beans:[nD]},aD=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",_d="ag-delay-render",lD=class extends T{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(_d)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;const{renderStatus:t,ctrlsSvc:s}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}s.getGridBodyCtrl().eGridBody.classList.remove(_d),this.alreadyRevealed=!0}},cD={moduleName:"ColumnDelayRender",version:G,beans:[lD],css:[aD]};function dD(e){e.overlays?.showLoadingOverlay()}function uD(e){e.overlays?.showNoRowsOverlay()}function hD(e){e.overlays?.hideOverlay()}var gD=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}",pD={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},Op=class extends Le{constructor(){super(pD),this.eOverlayWrapper=Z,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(gD)}handleKeyDown(e){if(e.key!==D.TAB||e.defaultPrevented||Zt(e))return;const t=this.beans;if(Qs(t,this.eOverlayWrapper,!1,e.shiftKey))return;let o=!1;e.shiftKey?o=t.focusSvc.focusGridView({column:ye(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):o=Po(t,!1),o&&e.preventDefault()}updateLayoutClasses(e,t){const s=this.eOverlayWrapper.classList,{AUTO_HEIGHT:o,NORMAL:i,PRINT:n}=nn;s.toggle(o,t.autoHeight),s.toggle(i,t.normal),s.toggle(n,t.print)}postConstruct(){this.createManagedBean(new Vl(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,s,o){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,!!e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),s&&this.isGridFocused()){const i=Ae(this.beans);i&&!hh(this.beans)&&(this.elToFocusAfter=i)}e.then(i=>{if(this.activePromise!==e){this.activeOverlay!==i&&(this.destroyBean(i),i=null);return}if(this.activePromise=null,!!i){if(this.activeOverlay!==i&&(this.eOverlayWrapper.appendChild(i.getGui()),this.activeOverlay=i,o)){const n=i;this.updateListenerDestroyFunc=this.addManagedPropertyListener(o,({currentValue:r})=>{n.refresh?.(X(this.gos,{...r??{}}))})}s&&this.isGridFocused()&&js(this.eOverlayWrapper)}})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.isGridFocused()&&(t=null);const s=this.updateListenerDestroyFunc;s&&(s(),this.updateListenerDestroyFunc=null),this.destroyBean(e),at(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=Ae(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},fD={selector:"AG-OVERLAY-WRAPPER",component:Op},mD=class extends T{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=Ne(this.gos),this.isServerSide=!this.isClientSide&&Ys(this.gos);const e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.refreshWrapperPadding.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.eWrapper=e,this.updateOverlayVisibility()}isVisible(){return this.state!==0&&!!this.eWrapper}isExclusive(){return this.state===1&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos,t=e.get("loading");!t&&(t!==void 0||e.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;e.get("loading")||e.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){L(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return fD}getOverlayWrapperCompClass(){return Op}updateOverlayVisibility(){if(!this.eWrapper){this.state=0;return}const{state:e,isClientSide:t,isServerSide:s,beans:{gos:o,colModel:i,rowModel:n}}=this;let r=this.gos.get("loading");r!==void 0&&(this.showInitialOverlay=!1),this.showInitialOverlay&&r===void 0&&!o.get("suppressLoadingOverlay")&&(r=!o.get("columnDefs")||!i.ready||!o.get("rowData")&&t),r?e!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&n.isEmpty()&&!o.get("suppressNoRowsOverlay")?e!==2&&this.doShowNoRowsOverlay():(e===1||!s&&e!==0)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(tS(this.beans.userCompFactory,X(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(sS(this.beans.userCompFactory,X(this.gos,{})),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(e,t,s){const o=e?.newAgStackInstance()??null;this.eWrapper?.showOverlay(o,t,this.isExclusive(),s),this.refreshWrapperPadding()}updateExclusive(){const e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}refreshWrapperPadding(){const e=this.eWrapper;if(!e)return;let t=0;this.state===2&&(t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0),this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}},CD={moduleName:"Overlay",version:G,userComponents:{agLoadingOverlay:zR,agNoRowsOverlay:_R},apiFunctions:{showLoadingOverlay:dD,showNoRowsOverlay:uD,hideOverlay:hD},beans:[mD]},vD=class extends T{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=rS(),Ws(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,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;Ws(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),s=e/t;return this.maxScrollY*s}},wD=400,bD=class extends T{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{for(const n of this.getAllCellCtrls())n.onCellSelectionChanged()},t=()=>{for(const n of this.getAllCellCtrls())n.updateRangeBordersIfRangeCount()},s=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},o=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>o()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{ps(this.gos)?s():o()}),ps(this.gos)&&s()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",o=>this.onSuppressCellFocusChanged(o.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:o,previousValue:i})=>{(!i&&o||i&&!o)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:s}=this.beans;if(s&&this.addManagedPropertyListener("showOpenedGroup",()=>{const o=s.getShowRowGroupCols();o.length&&this.refreshCells({columns:o,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const o=this.gridBodyCtrl;o.setStickyTopHeight(0),o.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=Ze(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new SD(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),s=this.cachedRowCtrls?.getEntries()??[];t.length>0||s.length>0?this.allRowCtrls=[...e,...t,...s]:this.allRowCtrls=e}isCellBeingRendered(e,t){const s=this.rowCtrlsByRowIndex[e];return!t||!s?!!s:s.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!s.getCellCtrl(t)||!s.isRowRendered()}updateCellFocus(e){for(const t of this.getAllCellCtrls())t.onCellFocused(e);for(const t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if(e?.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(const t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(const t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;if(t)for(const s of this.getAllCellCtrls())t.onFlashCells(s,e)},columnHoverChanged:()=>{for(const e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(const e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.getCols();for(const t of e){const s=l=>{for(const c of this.getAllCellCtrls())c.column===t&&l(c)},o=()=>{s(l=>l.onLeftChanged())},i=()=>{s(l=>l.onWidthChanged())},n=()=>{s(l=>l.onFirstRightPinnedChanged())},r=()=>{s(l=>l.onLastLeftPinnedChanged())},a=()=>{s(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",o),t.__addEventListener("widthChanged",i),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",o),t.__removeEventListener("widthChanged",i),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",a)})}}onDomLayoutChanged(){const e=Ze(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),s=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,s&&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)}getAllCellsNotSpanningForColumn(e){const t=[];for(const s of this.getAllRowCtrls()){const o=s.getCellCtrl(e,!0)?.eGui;o&&t.push(o)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,s){const{pinnedRowModel:o,beans:i,printLayout:n}=this,r=Object.fromEntries(e.map(l=>[l.rowNode.id,l]));o?.forEachPinnedRow(t,(l,c)=>{const d=e[c];d&&o.getPinnedRowById(d.rowNode.id,t)===void 0&&(d.destroyFirstPass(),d.destroySecondPass()),l.id in r&&s?(e[c]=r[l.id],delete r[l.id]):e[c]=new Gn(l,i,!1,!1,n)});const a=(t==="top"?o?.getPinnedTopRowCount():o?.getPinnedBottomRowCount())??0;e.length=a}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const s=o=>{const i=o[e.rowIndex];i&&i.rowNode===e&&(i.destroyFirstPass(),i.destroySecondPass(),o[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){const{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(const o of e??[])this.redrawRow(o,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const s=!e.domLayoutChanged&&!!e.recycleRows,o=e.animate&&po(this.gos),i=s?this.getRowsToRecycle():null;s||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n,gos:r}=this;if(n){n.checkStickyRows();const a=n.extraTopHeight+n.extraBottomHeight;a&&this.updateContainerHeights(a)}this.recycleRows(i,o),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(r.get("enableRowPinning")?s:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,s=this.gos.get("suppressScrollOnNewData");t&&!s&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let s=this.pageBounds.getCurrentPageHeight();s===0&&(s=1),t.setModelHeight(s+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(Ht(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,s=this.findPositionToFocus(e);if(!s){t.focusHeaderPosition({headerPosition:{headerRowIndex:Lt(this.beans)-1,column:e.column}});return}if(e.rowIndex!==s.rowIndex||e.rowPinned!=s.rowPinned){t.setFocusedCell({...s,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(X(this.gos,{...s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:s}=this.beans;let o=e;for(o.rowPinned==null&&t&&s&&!t.isRowInPage(o.rowIndex)&&(o={rowPinned:null,rowIndex:s.getFirstRow()});o;){if(o.rowPinned==null&&s)if(o.rowIndex<s.getFirstRow()){if(o=Nn(this.beans,{rowPinned:null,rowIndex:0}),!o)return null}else o.rowIndex>s.getLastRow()&&(o={rowPinned:null,rowIndex:s.getLastRow()});const i=this.getRowByPosition(o);if(i?.isAlive())return{...i.getRowPosition(),column:e.column};o=Nn(this.beans,o)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),s=t.length;for(let o=0;o<s;o++){const i=t[o].getAllCellCtrls(),n=i.length;for(let r=0;r<n;r++)e.push(i[r])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),s=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...s,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,s){const o=this.rowCtrlsByRowIndex[t];o&&o.addEventListener(e,s)}refreshCells({rowNodes:e,columns:t,force:s,suppressFlash:o}={}){const i={force:s,newData:!1,suppressFlash:o};for(const n of this.getCellCtrls(e,t))n.refreshOrDestroyCell(i);this.refreshFullWidth(e)}refreshRows(e={}){for(const t of this.getRowCtrls(e.rowNodes))t.refreshRow(e);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const s of this.getRowCtrls(e)){if(!s.isFullWidth())continue;s.refreshFullWidth()||(t=!0,this.redrawRow(s.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=Ua(e),s=this.getAllRowCtrls();return!e||!t?s:s.filter(o=>{const i=o.rowNode;return $a(i,t)})}getCellCtrls(e,t){let s;V(t)&&(s={},t.forEach(i=>{const n=this.colModel.getCol(i);V(n)&&(s[n.getId()]=!0)}));const o=[];for(const i of this.getRowCtrls(e))for(const n of i.getAllCellCtrls()){const r=n.column.getId();s&&!s[r]||o.push(n)}return o}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const s of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[s].rowNode.id==null&&e.push(s);this.removeRowCtrls(e);const t={};for(const s of Object.values(this.rowCtrlsByRowIndex)){const o=s.rowNode;t[o.id]=s}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(const s of e){const o=this.rowCtrlsByRowIndex[s];o&&(o.destroyFirstPass(t),o.destroySecondPass()),delete this.rowCtrlsByRowIndex[s]}}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:s}=this.beans,{afterScroll:o}=e;let i;const n=this.stickyRowFeature;n&&(i=t?.getFocusCellToUseAfterRefresh()||void 0);const r=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(n){l=n.checkStickyRows();const d=n.extraTopHeight+n.extraBottomHeight;d&&this.updateContainerHeights(d)}const c=this.firstRenderedRow!==r||this.lastRenderedRow!==a;if(!(o&&!l&&!c)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,o),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(o&&!l),i!=null)){const d=t?.getFocusCellToUseAfterRefresh();i!=null&&d==null&&(s?.flushAllFrames(),this.restoreFocusedCell(i))}}removeRowCompsNotToDraw(e,t){const s={};for(const n of e)s[n]=!0;const i=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!s[n]);this.removeRowCtrls(i,t)}calculateIndexesToDraw(e){const t=[];for(let r=this.firstRenderedRow;r<=this.lastRenderedRow;r++)t.push(r);const s=this.beans.pagination,o=this.beans.focusSvc?.getFocusedCell()?.rowIndex;o!=null&&(o<this.firstRenderedRow||o>this.lastRenderedRow)&&(!s||s.isRowInPage(o))&&o<this.rowModel.getRowCount()&&t.push(o);const i=r=>{const a=r.rowNode.rowIndex;a==null||a===o||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(a)};for(const r of Object.values(this.rowCtrlsByRowIndex))i(r);if(e)for(const r of Object.values(e))i(r);t.sort((r,a)=>r-a);const n=[];for(let r=0;r<t.length;r++){const a=t[r],l=this.rowModel.getRow(a);l&&!l.sticky&&n.push(a)}return n}recycleRows(e,t=!1,s=!1){const o=this.calculateIndexesToDraw(e);(this.printLayout||s)&&(t=!1),this.removeRowCompsNotToDraw(o,!t);for(const i of o)this.createOrUpdateRowCtrl(i,e,t,s);if(e){const{animationFrameSvc:i}=this.beans;i?.active&&s&&!this.printLayout?i.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),s=e.isPinningRight();(this.pinningLeft!==t||s!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=s,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];for(const t of this.getFullWidthRowCtrls()){const s=t.rowNode.rowIndex;e.push(s.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=Ua(e);return this.getAllRowCtrls().filter(s=>{if(!s.isFullWidth())return!1;const o=s.rowNode;return!(t!=null&&!$a(o,t))})}createOrUpdateRowCtrl(e,t,s,o){let i,n=this.rowCtrlsByRowIndex[e];if(n||(i=this.rowModel.getRow(e),V(i)&&V(t)&&t[i.id]&&i.alreadyRendered&&(n=t[i.id],t[i.id]=null)),!n)if(i||(i=this.rowModel.getRow(e)),V(i))n=this.createRowCon(i,s,o);else return;i&&(i.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n}destroyRowCtrls(e,t){const s=[];if(e){for(const o of Object.values(e))if(o){if(this.cachedRowCtrls&&o.isCacheable()){this.cachedRowCtrls.addRow(o);continue}if(o.destroyFirstPass(!t),t){const i=o.instanceId;this.zombieRowCtrls[i]=o,s.push(()=>{o.destroySecondPass(),delete this.zombieRowCtrls[i]})}else o.destroySecondPass()}}t&&(s.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(const o of s)o()},wD))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=As(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:s}=this;e.updateOffset();let o,i;if(!s.isRowsToRender())o=0,i=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),o=t.getFirstRow(),i=t.getLastRow();else{const d=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let g=!1,f,m;do{const R=t.getPixelOffset(),{pageFirstPixel:y,pageLastPixel:x}=t.getCurrentPagePixelRange(),F=e.divStretchOffset,P=u.getVScrollPosition(),M=P.top,A=P.bottom;h?(f=y+F,m=x+F):(f=Math.max(M+R-d,y)+F,m=Math.min(A+R+d,x)+F),this.firstVisibleVPixel=Math.max(M+R,y)+F,this.lastVisibleVPixel=Math.min(A+R,x)+F,g=this.ensureAllRowsInRangeHaveHeightsCalculated(f,m)}while(g);let v=s.getRowIndexAtPixel(f),w=s.getRowIndexAtPixel(m);const b=t.getFirstRow(),S=t.getLastRow();v<b&&(v=b),w>S&&(w=S),o=v,i=w}const n=Ze(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);n&&!r&&i-o>a&&(i=o+a);const l=o!==this.firstRenderedRow,c=i!==this.lastRenderedRow;(l||c)&&(this.firstRenderedRow=o,this.lastRenderedRow=i,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:o,lastRow:i}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,ts(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const s=this.pinnedRowModel?.ensureRowHeightsValid(),o=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:i,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,i.getFirstRow(),i.getLastRow());return(r||o)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),o||r||s?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const o=e.rowNode,i=this.focusSvc.isRowFocused(o.rowIndex,o.rowPinned),n=this.editSvc?.isEditing(e),r=o.detail;return i||n||r?!!this.isRowPresent(o):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,s){const o=this.cachedRowCtrls?.getRow(e)??null;if(o)return o;const i=s&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new Gn(e,this.beans,t,i,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(o=>o.rowNode),t=this.getStickyTopRowCtrls().map(o=>o.rowNode),s=this.getStickyBottomRowCtrls().map(o=>o.rowNode);return[...t,...e,...s]}getRowByPosition(e){let t;const{rowIndex:s}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[s];break;case"bottom":t=this.bottomRowCtrls[s];break;default:t=this.rowCtrlsByRowIndex[s],t||(t=this.getStickyTopRowCtrls().find(o=>o.rowNode.rowIndex===s)||null,t||(t=this.getStickyBottomRowCtrls().find(o=>o.rowNode.rowIndex===s)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const o=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!o}},SD=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.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?.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,s=this.entriesMap[t];delete this.entriesMap[t],Et(this.entriesList,s)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],Et(this.entriesList,e)}getEntries(){return this.entriesList}};function Ua(e){if(!e)return;const t={top:{},bottom:{},normal:{}};for(const s of e){const o=s.id;switch(s.rowPinned){case"top":t.top[o]=s;break;case"bottom":t.bottom[o]=s;break;default:t.normal[o]=s;break}}return t}function $a(e,t){const s=e.id;switch(e.rowPinned){case"top":return t.top[s]!=null;case"bottom":return t.bottom[s]!=null;default:return t.normal[s]!=null}}var yD=class extends T{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=kt(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=kt(e))}doFullSort(e,t){const s=e.map((o,i)=>({currentPos:i,rowNode:o}));return s.sort(this.compareRowNodes.bind(this,t)),s.map(o=>o.rowNode)}compareRowNodes(e,t,s){const o=t.rowNode,i=s.rowNode;for(let n=0,r=e.length;n<r;n++){const a=e[n],l=a.sort==="desc",c=this.getValue(o,a.column),d=this.getValue(i,a.column);let u;const h=this.getComparator(a,o);if(h?u=h(c,d,o,i,l):u=O1(c,d,this.isAccentedSort),!isNaN(u)&&u!==0)return a.sort==="asc"?u:u*-1}return t.currentPos-s.currentPos}getComparator(e,t){const s=e.column,o=s.getColDef().comparator;if(o!=null)return o;if(!s.getColDef().showRowGroup)return;const i=!t.group&&s.getColDef().field;if(!i)return;const n=this.beans.colModel.getColDefCol(i);if(n)return n.getColDef().comparator}getValue(e,t){const{valueSvc:s,colModel:o,showRowGroupCols:i,gos:n}=this.beans;if(!this.primaryColumnsSortGroups)return s.getValue(t,e,!1);if(e.rowGroupColumn===t){if($h(n,o.isPivotActive())){const c=e.data?e:Ag(e.childrenAfterGroup);return c&&s.getValue(t,c,!1)}const l=i?.getShowRowGroupCol(t.getId());return l?e.groupData?.[l.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return s.getValue(t,e,!1)}};function RD(e){e.sortSvc?.onSortChanged("api")}var Np={moduleName:"Sort",version:G,beans:[BE,yD],apiFunctions:{onSortChanged:RD},userComponents:{agSortIndicator:ql},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},xD=class extends T{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:s}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),s.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Ws(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,mo(e.source))}}};function FD(e){e.valueCache?.expire()}function ED(e,t){const{colKey:s,rowNode:o,useFormatter:i}=t,n=e.colModel.getColDefCol(s)??e.colModel.getCol(s);if(Ie(n))return null;const r=e.valueSvc.getValueForDisplay(n,o,i);return i?r.valueFormatted??Ao(r.value):r.value}var DD="paste",PD=class extends T{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;Ne(e)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:s}=this.beans;if(e.source===DD||t.get("suppressChangeDetection"))return;const o=e.node,i=[o],n=this.clientSideRowModel,r=n?.rootNode;if(r&&!o.isRowPinned()){const a=t.get("aggregateOnlyChangedColumns"),l=new wi(a,r);l.addParentNode(o.parent,[e.column]),n.doAggregate(l),l.forEachChangedNodeDepthFirst(c=>{i.push(c),c.sibling&&i.push(c.sibling)})}s.refreshCells({rowNodes:i})}},TD=class extends T{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);be(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(s){return be(16,{expression:e,params:t,e:s}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const s=this.createFunctionBody(e),o=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",s);return t[e]=o,o}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}},MD=class extends T{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,s){if(this.active){const o=this.cacheVersion;e.__cacheVersion!==o&&(e.__cacheVersion=o,e.__cacheData={}),e.__cacheData[t]=s}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},ID={moduleName:"ValueCache",version:G,beans:[MD],apiFunctions:{expireValueCache:FD}},kD={moduleName:"Expression",version:G,beans:[TD]},AD={moduleName:"ChangeDetection",version:G,beans:[PD]},LD={moduleName:"CellApi",version:G,apiFunctions:{getCellValue:ED}},OD=class extends T{constructor(){super(...arguments),this.beanName="valueSvc",this.hasEditSvc=!1,this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.hasEditSvc=!!e.editSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=Ys(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t,s=!1,o=!1,i="ui"){const{showRowGroupColValueSvc:n}=this.beans,r=!e&&t.group,a=e?.colDef.showRowGroup,l=!this.isTreeData||t.footer;if(n&&l&&(r||a)){const m=n.getGroupValue(t,e);if(m==null)return{value:null,valueFormatted:null};if(!s)return{value:m.value,valueFormatted:null};const v=n.formatAndPrefixGroupColValue(m,e,o);return{value:m.value,valueFormatted:v}}if(!e)return{value:t.key,valueFormatted:null};const c=t.leafGroup&&this.colModel.isPivotMode(),d=t.group&&t.expanded&&!t.footer&&!c,u=this.gos.get("groupSuppressBlankHeader")||!t.sibling,h=d&&!u,g=this.getValue(e,t,h,i),f=s&&!(o&&e.colDef.useValueFormatterForExport===!1);return{value:g,valueFormatted:f?this.formatValue(e,t,g):null}}getValue(e,t,s=!1,o="ui"){if(this.initialised||this.init(),!t)return;const i=e.getColDef(),n=i.field,r=e.getColId(),a=t.data;if(this.hasEditSvc&&o==="ui"){const m=this.editSvc;if(m.isEditing()){const v=m.getCellDataValue({rowNode:t,column:e},!0);if(v!==void 0)return v}}let l;const c=i.showRowGroup;if(typeof c=="string"&&(this.beans.rowGroupColsSvc?.getColumnIndex(c)??-1)>t.level)return null;const d=typeof c!="string"||!t.group,u=t.groupData&&r in t.groupData,h=!s&&t.aggData&&t.aggData[r]!==void 0,g=this.isSsrm&&s&&!!i.aggFunc,f=this.isSsrm&&t.footer&&t.field&&(i.showRowGroup===!0||i.showRowGroup===t.field);if(this.isTreeData&&h)l=t.aggData[r];else if(this.isTreeData&&i.valueGetter)l=this.executeValueGetter(i.valueGetter,a,e,t);else if(this.isTreeData&&n&&a)l=si(a,n,e.isFieldContainsDots());else if(u)l=t.groupData[r];else if(h)l=t.aggData[r];else if(i.valueGetter&&!g){if(!d)return l;l=this.executeValueGetter(i.valueGetter,a,e,t)}else if(f)l=si(a,t.field,e.isFieldContainsDots());else if(n&&a&&!g){if(!d)return l;l=si(a,n,e.isFieldContainsDots())}if(this.cellExpressions&&typeof l=="string"&&l.indexOf("=")===0){const m=l.substring(1);l=this.executeValueGetter(m,a,e,t)}return l}parseValue(e,t,s,o){const i=e.getColDef(),n=i.valueParser;if(V(n)){const r=X(this.gos,{node:t,data:t?.data,oldValue:o,newValue:s,colDef:i,column:e});return typeof n=="function"?n(r):this.expressionSvc?.evaluate(n,r)}return s}getDeleteValue(e,t){return V(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t).value)??null:null}formatValue(e,t,s,o,i=!0){const{expressionSvc:n}=this.beans;let r=null,a;const l=e.getColDef();if(o?a=o:i&&(a=l.valueFormatter),a){const c=t?t.data:null,d=X(this.gos,{value:s,node:t,data:c,colDef:l,column:e});typeof a=="function"?r=a(d):r=n?n.evaluate(a,d):null}else if(l.refData)return l.refData[s]||"";return r==null&&Array.isArray(s)&&(r=s.join(", ")),r}setValue(e,t,s,o){const i=this.colModel.getColDefCol(t);if(!e||!i)return!1;Ie(e.data)&&(e.data={});const{field:n,valueSetter:r}=i.getColDef();if(Ie(n)&&Ie(r))return L(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(i,s))return L(135),!1;const a=X(this.gos,{node:e,data:e.data,oldValue:this.getValue(i,e,void 0,o),newValue:s,colDef:i.getColDef(),column:i});a.newValue=s;let l;if(V(r)?typeof r=="function"?l=r(a):l=this.expressionSvc?.evaluate(r,a):l=this.setValueUsingField(e.data,n,s,i.isFieldContainsDots()),l===void 0&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const c=this.getValue(i,e);return this.dispatchCellValueChangedEvent(e,a,c,o),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,a,c,o),!0}dispatchCellValueChangedEvent(e,t,s,o){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:s,value:s,source:o})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,s,o){if(!t)return!1;let i=!1;if(!o)i=e[t]===s,i||(e[t]=s);else{const n=t.split(".");let r=e;for(;n.length>0&&r;){const a=n.shift();n.length===0?(i=r[a]===s,i||(r[a]=s)):r=r[a]}}return!i}executeValueGetterWithValueCache(e,t,s,o){const i=s.getColId(),n=this.valueCache.getValue(o,i);if(n!==void 0)return n;const r=this.executeValueGetterWithoutValueCache(e,t,s,o);return this.valueCache.setValue(o,i,r),r}executeValueGetterWithoutValueCache(e,t,s,o){const i=X(this.gos,{data:t,node:o,column:s,colDef:s.getColDef(),getValue:this.getValueCallback.bind(this,o)});let n;return typeof e=="function"?n=e(i):n=this.expressionSvc?.evaluate(e,i),n}getValueCallback(e,t){const s=this.colModel.getColDefCol(t);return s?this.getValue(s,e):null}getKeyForNode(e,t){const s=this.getValue(e,t),o=e.getColDef().keyCreator;let i=s;if(o){const n=X(this.gos,{value:s,colDef:e.getColDef(),column:e,node:t,data:t.data});i=o(n)}return typeof i=="string"||i==null||(i=String(i),i==="[object Object]"&&L(121)),i}},ND={moduleName:"CommunityCore",version:G,beans:[NE,yx,OF,E0,vD,K2,ME,r3,y0,eD,J3,bD,OD,LE,TE,OE,HF,xD,MF,IF,C3],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:Rx,destroy:xx,isDestroyed:Fx,getGridOption:Ex,setGridOption:Dx,updateGridOptions:ip,isModuleRegistered:Px},dependsOn:[DF,F2,k2,Np,g3,Y2,p3,CD,AD,m3,X3,iD,rD,w3,LF,PF,kD,J2,cD]},Hp={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1},Jr=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],HD={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:Jr,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...Jr,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...Jr,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},GD={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function VD(e,t){const s=[];for(const o of Array.isArray(e)?e:[e]){const i=HD[o];if(i)for(const n of i){const r=GD[n];(!r||r===t)&&s.push(n)}else s.push(o)}return s}var Gp=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
|
|
22
|
+
|
|
23
|
+
import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
|
|
24
|
+
|
|
25
|
+
ModuleRegistry.registerModules([ AllCommunityModule ]);
|
|
26
|
+
`,BD=e=>{const t=e.map(o=>`import { ${oi(o)} } from '${Hp[o]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(o=>o==="IntegratedCharts"||o==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community';
|
|
27
|
+
${t.join(`
|
|
28
|
+
`)}
|
|
29
|
+
|
|
30
|
+
ModuleRegistry.registerModules([ ${e.map(o=>oi(o,!0)).join(", ")} ]);
|
|
31
|
+
|
|
32
|
+
For more info see: ${go}/modules/`};function oi(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function zD(e,t){const s=t.filter(n=>n==="IntegratedCharts"||n==="Sparklines");let o="";return!globalThis?.agCharts&&s.length>0?o=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
|
|
33
|
+
`:t.some(n=>Hp[n])&&(o=o+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
|
|
34
|
+
`),o}function Vp({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var jd=({reasonOrId:e,moduleName:t,gridScoped:s,gridId:o,rowModelType:i,additionalText:n,isUmd:r})=>{const a=VD(t,i),l=typeof e=="string"?e:UD[e];if(r)return zD(l,a);const c=a.filter(h=>h==="IntegratedCharts"||h==="Sparklines"),d=c.length>0?`${c.map(h=>oi(h)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${a.length>1?"one of "+a.map(h=>oi(h)).join(", "):oi(a[0])} is not registered${s?" for gridId: "+o:""}. ${d} Check if you have registered the module:
|
|
35
|
+
`}
|
|
36
|
+
${BD(a)}`+(n?`
|
|
37
|
+
|
|
38
|
+
${n}`:"")},Ud=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
|
|
39
|
+
|
|
40
|
+
import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
|
|
41
|
+
import { ModuleRegistry } from 'ag-grid-community';
|
|
42
|
+
import { ${e} } from 'ag-grid-enterprise';
|
|
43
|
+
|
|
44
|
+
ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
|
|
45
|
+
`,WD=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,_D={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:s})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",s],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions:
|
|
46
|
+
"alignedGrids: () => [linkedGrid]"`,21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed.
|
|
47
|
+
Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
|
|
48
|
+
To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"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.",33:()=>"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.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"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.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}
|
|
49
|
+
${WD(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e})=>`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`,49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:s,pageSizeOptions:o})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${s?"":" the default"} paginationPageSizeSelector=[${o?.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:e,componentName:t,agGridDefaults:s,jsComps:o})=>{const i=[],n=[...Object.keys(s??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(o??[]).filter(a=>!!o[a])],r=Ma({inputValue:t,allSuggestions:n,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return i.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
|
|
50
|
+
`),r.length>0&&i.push(` Did you mean: [${r.slice(0,3)}]?
|
|
51
|
+
`),i.push("If using a custom component check it has been registered correctly."),i},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${go}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{const s=Ma({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,s.length>0?` Did you mean: [${s.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join(`
|
|
52
|
+
`)},110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"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 (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
|
|
53
|
+
Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:s})=>["duplicate group keys for row data, keys should be unique",e,t,...s??[]],187:({rowId:e,firstData:t,secondData:s})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",s],188:e=>`getRowId callback must be provided for Server Side Row Model ${e?.feature||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:jd,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${go}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,229:({index:e})=>["invalid row index for ensureIndexVisible: ",e],230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.
|
|
54
|
+
Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows.
|
|
55
|
+
Your code probably called a grid API method while the grid was in the render stage.
|
|
56
|
+
To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
|
|
57
|
+
To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>Ud("IntegratedChartsModule"),258:()=>Ud("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:s,gridId:o,rowModelType:i})=>jd({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:bo[t],gridId:o,gridScoped:s,rowModelType:i}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${go}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>Gp(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},275:Vp,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`};function jD(e,t){const s=_D[e];if(!s)return[`Missing error text for error id ${e}!`];const o=s(t),n=`
|
|
58
|
+
See ${Bh(e,t)}`;return Array.isArray(o)?o.concat(n):[o,n]}var UD={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},$d=new WeakMap,Kd=new WeakMap,$D=1,KD=class{create(e,t,s,o,i,n){const r=Rl.applyGlobalGridOptions(t),a=r.gridId??String($D++),l=this.getRegisteredModules(i,a,r.rowModelType),c=this.createBeansList(r.rowModelType,l,a),d=this.createProvidedBeans(e,r,i);if(!c)return;const h={providedBeanInstances:d,beanClasses:c,id:a,beanInitComparator:vx,beanDestroyComparator:wx,derivedBeans:[mx],destroyCallback:()=>{Kd.delete(f),$d.delete(e),Fb(a),n?.()}},g=new iy(h);this.registerModuleFeatures(g,l),s(g),g.getBean("syncSvc").start(),o?.(g);const f=g.getBean("gridApi");return $d.set(e,f),Kd.set(f,e),f}getRegisteredModules(e,t,s){return fi(ND,void 0,!0),e?.modules?.forEach(o=>fi(o,t)),Eb(t,qd(s))}registerModuleFeatures(e,t){const s=e.getBean("registry"),o=e.getBean("apiFunctionSvc");for(const i of t){s.registerModule(i);const n=i.apiFunctions;if(n){const r=Object.keys(n);for(const a of r)o?.addFunction(a,n[a])}}}createProvidedBeans(e,t,s){let o=s?s.frameworkOverrides:null;Ie(o)&&(o=new sp);const i={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:s?s.globalListener:null,globalSyncListener:s?s.globalSyncListener:null,frameworkOverrides:o};return s?.providedBeanInstances&&Object.assign(i,s.providedBeanInstances),i}createBeansList(e,t,s){const o={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},i=qd(e),n=o[i];if(!n){$o(201,{rowModelType:i},`Unknown rowModelType ${i}.`);return}if(!Tb()){$o(272,void 0,Gp());return}if(!e){const a=Object.entries(o).filter(([l,c])=>ba(c,s,l));if(a.length==1){const[l,c]=a[0];if(l!==i){const d={moduleName:c,rowModelType:l};$o(275,d,Vp(d));return}}}if(!ba(n,s,i)){$o(200,{reasonOrId:`rowModelType = '${i}'`,moduleName:n,gridScoped:xl(),gridId:s,rowModelType:i},`Missing module ${n}Module for rowModelType ${i}.`);return}const r=new Set;for(const a of t)for(const l of a.beans??[])r.add(l);return Array.from(r)}};function qd(e){return e??"clientSide"}function ws(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function rr(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function qD(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var YD=class extends T{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?pb(t):fb(e.get("localeText"))}};function ZD(e,t=!1){const s=[],o=[],i=[],n=[],r=[],a=[],l=[],c=[],d=[];let u=0;for(let h=0;h<e.length;h++){const{colId:g,sort:f,sortIndex:m,rowGroup:v,rowGroupIndex:w,aggFunc:b,pivot:S,pivotIndex:R,pinned:y,hide:x,width:F,flex:P}=e[h];d.push(g),f&&(s[m??u++]={colId:g,sort:f}),v&&(o[w??0]=g),typeof b=="string"&&i.push({colId:g,aggFunc:b}),S&&(n[R??0]=g),y&&(y==="right"?a:r).push(g),x&&l.push(g),(P!=null||F)&&c.push({colId:g,flex:P??void 0,width:F})}return{sort:s.length?{sortModel:ea(s)}:void 0,rowGroup:o.length?{groupColIds:ea(o)}:void 0,aggregation:i.length?{aggregationModel:i}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:ea(n)}:void 0,columnPinning:r.length||a.length?{leftColIds:r,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:c.length?{columnSizingModel:c}:void 0,columnOrder:d.length?{orderedColIds:d}:void 0}}function ea(e){return e.filter(t=>t!=null)}function QD(e){const t=[];for(const{groupId:s,open:o}of e)o&&t.push(s);return t.length?{openColumnGroupIds:t}:void 0}var XD=class{wrap(e,t,s,o){const i=this.createWrapper(e,o);for(const n of t??[])this.createMethod(i,n,!0);for(const n of s??[])this.createMethod(i,n,!1);return i}createMethod(e,t,s){e.addMethod(t,this.createMethodProxy(e,t,s))}createMethodProxy(e,t,s){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(s&&L(49,{methodName:t}),null)}}};function ta(e){return e.get("tooltipShowMode")==="whenTruncated"}function JD(e,t){if(typeof e!="number")return"";const s=t(),o=s("thousandSeparator",","),i=s("decimalSeparator",".");return e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${o}`)}var eP=class extends T{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},tP=class{constructor(e){const{colModel:t,rowGroupColsSvc:s,colNames:o,valueSvc:i,gos:n,processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c}=e;this.colModel=t,this.rowGroupColsSvc=s,this.colNames=o,this.valueSvc=i,this.gos=n,this.processCellCallback=r,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=c}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,s,o,i){const n=t===0&&Kh(this.gos,i,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||i.group)&&(e.isRowGroupDisplayed(i.rowGroupColumn?.getColId()??"")||n))return{value:this.processRowGroupCallback(X(this.gos,{column:e,node:i}))??""};if(this.processCellCallback)return{value:this.processCellCallback(X(this.gos,{accumulatedRowIndex:s,column:e,node:i,value:this.valueSvc.getValueForDisplay(e,i,void 0,void 0).value,type:o,parseValue:h=>this.valueSvc.parseValue(e,i,h,this.valueSvc.getValue(e,i,void 0)),formatValue:h=>this.valueSvc.formatValue(e,i,h)??h}))??""};const r=this.gos.get("treeData"),a=this.valueSvc,l=i.level===-1&&i.footer,c=e.colDef.showRowGroup===!0&&(i.group||r);if(!l&&(n||c)){let h="",g=i;for(;g&&g.level!==-1;){const{value:f,valueFormatted:m}=a.getValueForDisplay(n?void 0:e,g,!0,!0);h=` -> ${m??f??""}${h}`,g=g.parent}return{value:h,valueFormatted:h}}const{value:d,valueFormatted:u}=a.getValueForDisplay(e,i,!0,!0);return{value:d??"",valueFormatted:u}}getHeaderName(e,t){return e?e(X(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}};function sP(e,t){const s=document.defaultView||window;if(!s){L(52);return}const o=document.createElement("a"),i=s.URL.createObjectURL(t);o.setAttribute("href",i),o.setAttribute("download",e),o.style.display="none",document.body.appendChild(o),o.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:s})),o.remove(),s.setTimeout(()=>{s.URL.revokeObjectURL(i)},0)}var oP={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,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},nt="clientSide",Qe="serverSide",oo="infinite",iP={onGroupExpandedOrCollapsed:[nt],refreshClientSideRowModel:[nt],isRowDataEmpty:[nt],forEachLeafNode:[nt],forEachNodeAfterFilter:[nt],forEachNodeAfterFilterAndSort:[nt],resetRowHeights:[nt,Qe],applyTransaction:[nt],applyTransactionAsync:[nt],flushAsyncTransactions:[nt],getBestCostNodeSelection:[nt],getServerSideSelectionState:[Qe],setServerSideSelectionState:[Qe],applyServerSideTransaction:[Qe],applyServerSideTransactionAsync:[Qe],applyServerSideRowData:[Qe],retryServerSideLoads:[Qe],flushServerSideAsyncTransactions:[Qe],refreshServerSide:[Qe],getServerSideGroupLevelState:[Qe],refreshInfiniteCache:[oo],purgeInfiniteCache:[oo],getInfiniteRowCount:[oo],isLastRowIndexKnown:[oo,Qe],expandAll:[nt,Qe],collapseAll:[nt,Qe],onRowHeightChanged:[nt,Qe],setRowCount:[oo,Qe],getCacheBlockState:[oo,Qe]},nP={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function rP(e,t,s){const o=nP[e];if(o){const{version:n,new:r,old:a,message:l}=o,c=a??e;return(...d)=>{const u=r?`Please use ${r} instead. `:"";return Jo(`Since ${n} api.${c} is deprecated. ${u}${l??""}`),t.apply(t,d)}}const i=iP[e];return i?(...n)=>{const r=s.rowModel.getType();if(!i.includes(r)){ho(`api.${e} can only be called when gridOptions.rowModelType is ${i.join(" or ")}`);return}return t.apply(t,n)}:t}var aP={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},lP={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},cP={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},dP=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),uP=class extends T{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,kb(jD)}warnOnInitialPropertyUpdate(e,t){e==="api"&&oP[t]&&L(22,{key:t})}processGridOptions(e){this.processOptions(e,o3())}validateApiFunction(e,t){return rP(e,t,this.beans)}missingUserComponent(e,t,s,o){const i=bo[t];i?this.gos.assertModuleRegistered(i,`AG Grid '${e}' component: ${t}`):L(101,{propertyName:e,componentName:t,agGridDefaults:s,jsComps:o})}missingDynamicBean(e){const t=aP[e];return t?Ht(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){gP.has(e)&&L(10,{eventType:e})}validateIcon(e){if(dP.has(e)&&L(43,{iconName:e}),lP[e])return;const t=cP[e];if(t){be(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:xl(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}L(134,{iconName:e})}isProvidedUserComp(e){return!!bo[e]}validateColDef(e){this.processOptions(e,$E())}processOptions(e,t){const{validations:s,deprecations:o,allProperties:i,propertyExceptions:n,objectName:r,docsUrl:a}=t;i&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(o)],i,r,a);const l=new Set;if(Object.keys(e).forEach(d=>{const u=o[d];if(u){const{message:b,version:S}=u;l.add(`As of v${S}, ${String(d)} is deprecated. ${b??""}`)}const h=e[d];if(h==null||h===!1)return;const g=s[d];if(!g)return;const{dependencies:f,validate:m,supportedRowModels:v,expectedType:w}=g;if(w){const b=typeof h;if(b!==w){l.add(`${String(d)} should be of type '${w}' but received '${b}' (${h}).`);return}}if(v){const b=this.gridOptions.rowModelType??"clientSide";if(!v.includes(b)){l.add(`${String(d)} is not supported with the '${b}' row model. It is only valid with: ${v.join(", ")}.`);return}}if(f){const b=this.checkForRequiredDependencies(d,f,e);if(b){l.add(b);return}}if(m){const b=m(e,this.gridOptions,this.beans);if(b){l.add(b);return}}}),l.size>0)for(const d of l)Jo(d)}checkForRequiredDependencies(e,t,s){const i=Object.entries(t).filter(([n,r])=>{const a=s[n];return!r.required.includes(a)});return i.length===0?null:i.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${r.reason??""}`).join(`
|
|
59
|
+
`)}checkProperties(e,t,s,o,i){const n=["__ob__","__v_skip","__metadata__"],r=hP(Object.getOwnPropertyNames(e),[...n,...t,...s],s),a=Object.keys(r);for(const l of a){const c=r[l];let d=`invalid ${o} property '${l}' did you mean any of these: ${c.slice(0,8).join(", ")}.`;s.includes("context")&&(d+=`
|
|
60
|
+
If you are trying to annotate ${o} with application data, use the '${o}.context' property instead.`),Jo(d)}if(a.length>0&&i){const l=this.beans.frameworkOverrides.getDocLink(i);Jo(`to see all the valid ${o} properties please check: ${l}`)}}};function hP(e,t,s){const o={},i=e.filter(n=>!t.some(r=>r===n));if(i.length>0)for(const n of i)o[n]=Ma({inputValue:n,allSuggestions:s}).values;return o}var gP=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),pP={moduleName:"Validation",version:G,beans:[uP]};function Bp(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var fP=class extends T{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){const t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const s=(o,i)=>{o.hasChildren()&&e&&!i?o.childrenAfterFilter=o.childrenAfterGroup.filter(n=>{const r=n.childrenAfterFilter&&n.childrenAfterFilter.length>0,a=n.data&&this.filterManager.doesRowPassFilter({rowNode:n});return r||a}):o.childrenAfterFilter=o.childrenAfterGroup,Bp(o)};if(this.doingTreeDataFiltering()){const o=(n,r)=>{if(n.childrenAfterGroup)for(let a=0;a<n.childrenAfterGroup.length;a++){const l=n.childrenAfterGroup[a],c=r||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?o(n.childrenAfterGroup[a],c):s(l,c)}s(n,r)},i=n=>o(n,!1);t.executeFromRootNode(i)}else{const o=i=>s(i,!1);t.forEachChangedNodeDepthFirst(o,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},mP=class extends Ul{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,s,o,i){this.comp=e;const n=Ei(this,this.beans.context,i);this.eButtonShowMainFilter=s,this.eFloatingFilterBody=o,this.setGui(t,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n);const r=()=>this.onColDefChanged(n);n.addManagedListeners(this.column,{colDefChanged:r}),n.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&r()}}),n.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.colDef;return X(t.gos,{colDef:s,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,s=!!e.floatingFilter;this.active=t&&s}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=wt("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new Oo(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.getLocaleTextFunc();xo(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(Ae(t)===this.eGui)return;const i=Qs(t,this.eGui,null,e.shiftKey);if(i){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),i.focus();return}const n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let s=this.column;do if(s=e?t.getColBefore(s):t.getColAfter(s),!s)break;while(!s.getColDef().filter||!s.getColDef().floatingFilter);return s}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case D.UP:case D.DOWN:case D.LEFT:case D.RIGHT:if(t)return;Us(e);case D.ENTER:t&&js(this.eGui)&&e.preventDefault();break;case D.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const s=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),o=!!e.relatedTarget&&Ms(e.relatedTarget,"ag-floating-filter");if(s&&o&&e.target===this.eGui){const i=this.lastFocusEvent,n=!!(i&&i.key===D.TAB);if(i&&n){const r=i.shiftKey;js(this.eGui,r)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new jl(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!ut(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.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.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:s,gos:o}=this,i=n=>{if(n?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const r=this.comp.getFloatingFilterComp();r&&r.then(a=>{if(a){if(o.get("enableFilterHandlers")){const d=n;let u="filter";d?.afterFloatingFilter?u="ui":d?.afterDataChange?u="dataChanged":n?.source==="api"&&(u="api"),this.updateFloatingFilterParams(this.userCompDetails,u);return}const l=t?.getCurrentFloatingFilterParentModel(s),c=n?{...n,columns:n.columns??[],source:n.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,c)}})};[this.destroySyncListener]=e.addManagedListeners(s,{filterChanged:i}),t?.isFilterActive(s)&&i(null)}setupWidth(e){const t=()=>{const s=`${this.column.getActualWidth()}px`;this.comp.setWidth(s)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){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(e){const t=this.active;this.setupActive();const s=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const o=this.beans.colFilter,i=this.active?o?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,n=this.comp.getFloatingFilterComp();!n||!i?this.updateCompDetails(e,i,s):n.then(r=>{!r||o?.areFilterCompsDifferent(this.userCompDetails??null,i)?this.updateCompDetails(e,i,s):this.updateFloatingFilterParams(i,"colDef")})}updateCompDetails(e,t,s){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),s&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let s=e.params;this.comp.getFloatingFilterComp()?.then(o=>{typeof o?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(s={...s,model:Ue(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),o.refresh(s))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function CP(e,t){const s=e.colModel.getCol(t);if(!s){be(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:s,positionBy:"auto"})}function vP(e){e.menuSvc?.hidePopupMenu()}var wP={moduleName:"SharedMenu",version:G,beans:[VR],apiFunctions:{showColumnMenu:CP,hidePopupMenu:vP}},bP=class extends py{postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getDefaultPopupParent(){return this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:s,event:o}=e,i=t.getBoundingClientRect(),n=this.getParentRect();this.setAlignedTo(t,s);let r=!1;const a=()=>{const l=this.keepXYWithinBounds(s,i.top-n.top,0),c=s.clientWidth>0?s.clientWidth:200;r||(s.style.minWidth=`${c}px`,r=!0);const u=n.right-n.left-c;let h;return this.gos.get("enableRtl")?(h=f(),h<0&&(h=g(),this.setAlignedStyles(s,"left")),h>u&&(h=0,this.setAlignedStyles(s,"right"))):(h=g(),h>u&&(h=f(),this.setAlignedStyles(s,"right")),h<0&&(h=0,this.setAlignedStyles(s,"left"))),{x:h,y:l};function g(){return i.right-n.left-2}function f(){return i.left-n.left-c}};this.positionPopup({ePopup:s,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e,"subMenu",s,t,o instanceof MouseEvent?o:void 0)})}callPostProcessPopup(e,t,s,o,i){const n=this.gos.getCallback("postProcessPopup");if(n){const{column:r,rowNode:a}=e;n({column:r,rowNode:a,ePopup:s,type:t,eventSource:o,mouseEvent:i})}}getActivePopups(){return this.popupList.map(e=>e.element)}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const s of this.popupList)t.applyThemeClasses(s.wrapper)}}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return Zt(e)}},ar={moduleName:"Popup",version:G,beans:[bP]},SP=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function yP(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function RP(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function xP(e,t){const s=e.colModel.getColDefCol(t);if(s)return e.colFilter?.destroyFilter(s,"api")}function FP(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function EP(e){return e.filterManager?.getFilterModel()??{}}function DP(e,t,s){const{gos:o,colModel:i,colFilter:n}=e;s&&!o.get("enableFilterHandlers")&&(L(288),s=!1);const r=i.getColDefCol(t);return r?n?.getModelForColumn(r,s)??null:null}function PP(e,t,s){return e.filterManager?.setColumnFilterModel(t,s)??Promise.resolve()}function TP(e,t){const s=e.colModel.getCol(t);if(!s){be(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:s,containerType:"columnFilter",positionBy:"auto"})}function MP(e){e.menuSvc?.hideFilterMenu()}function IP(e,t){const s=e.colModel.getCol(t);if(!s){be(12,{colKey:t});return}return e.colFilter?.getHandler(s,!0)}function kP(e,t){const{colModel:s,colFilter:o,gos:i}=e;if(!i.get("enableFilterHandlers")){L(287);return}const{colId:n,action:r}=t;if(n){const a=s.getColById(n);a&&o?.updateModel(a,r)}else o?.updateAllModels(r)}var AP={filterHandler:()=>({doesFilterPass:()=>!0})},LP=class extends T{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...Lg},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)});const e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",s){const{colModel:o,dataTypeSvc:i,filterManager:n}=this.beans;if(i?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const r=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((c,d)=>{const u=e[d];r.push(this.setModelOnFilterWrapper(c,u)),l.delete(d)}),l.forEach(c=>{const d=o.getColDefCol(c)||o.getCol(c);if(!d){L(62,{colId:c});return}if(!d.isFilterAllowed()){L(63,{colId:c});return}const u=this.getOrCreateFilterWrapper(d,!0);if(!u){L(64,{colId:c});return}r.push(this.setModelOnFilterWrapper(u,e[c],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{r.push(this.setModelOnFilterWrapper(l,null))});fe.all(r).then(()=>{const l=this.getModel(!0),c=[];this.allColumnFilters.forEach((d,u)=>{const h=a?a[u]:null,g=l?l[u]:null;di(h,g)||c.push(d.column)}),c.length>0?n?.onFilterChanged({columns:c,source:t}):s&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:s,initialModel:o,beans:{colModel:i}}=this;if(s.forEach((n,r)=>{const a=this.getModelFromFilterWrapper(n);V(a)&&(t[r]=a)}),!e)for(const n of Object.keys(o)){const r=o[n];V(r)&&!s.has(n)&&i.getCol(n)?.isFilterAllowed()&&(t[n]=r)}return t}setState(e,t,s="api"){if(this.state.clear(),t)for(const o of Object.keys(t)){const i=t[o];this.state.set(o,{model:Ue(this.model,o),state:i})}this.setModel(e,s,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let s=!1;return e.forEach((o,i)=>{const n=o.state;n!=null&&(s=!0,t[i]=n)}),s?t:void 0}getModelFromFilterWrapper(e){const s=e.column.getColId();if(e.isHandler)return Ue(this.model,s);const o=e.filter;return o?typeof o.getModel!="function"?(L(66),null):o.getModel():Ue(this.initialModel,s)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=c=>c?c.isFilterActive?c.isFilterActive():(L(67),!1):!1,{colModel:t,gos:s}=this.beans,o=!!Ra(s),i=c=>{if(!c.isPrimary())return!0;const u=!t.isPivotActive();return!c.isValueActive()||!u?!1:t.isPivotMode()?!0:o},n=[],r=[],a=(c,d,u)=>{d&&(i(c)?n.push(u):r.push(u))},l=[];return this.allColumnFilters.forEach(c=>{const d=c.column,u=d.getColId();if(c.isHandler)l.push(fe.resolve().then(()=>{a(d,this.isHandlerActive(d),{colId:u,isHandler:!0,handler:c.handler,handlerParams:c.handlerParams})}));else{const h=ns(c);h&&l.push(h.then(g=>{a(d,e(g),{colId:u,isHandler:!1,comp:g})}))}}),fe.all(l).then(()=>{this.activeAggregateFilters=n,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){const s=[];return this.allColumnFilters.forEach(o=>{const i=o.column;if(o.isHandler)s.push(fe.resolve().then(()=>{this.setColFilterActive(i,this.isHandlerActive(i),e,t)}));else{const n=ns(o);n&&s.push(n.then(r=>{this.setColFilterActive(i,r.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),fe.all(s)}doFiltersPass(e,t,s){const{data:o,aggData:i}=e,n=s?this.activeAggregateFilters:this.activeColumnFilters,r=s?i:o,a=this.model;for(let l=0;l<n.length;l++){const c=n[l],{colId:d,isHandler:u}=c;if(d!==t)if(u){const{handler:h,handlerParams:g}=c;if(!h.doesFilterPass({node:e,data:r,model:Ue(a,d),handlerParams:g}))return!1}else{const h=c.comp;if(typeof h.doesFilterPass!="function"){be(91);continue}if(!h.doesFilterPass({node:e,data:r}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:s}=this.beans,o=()=>{this.isAlive()&&s?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(o,0):o()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:s}=e,o=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",s).then(()=>{this.allColumnFilters.forEach(i=>{const{column:n,isHandler:r}=i;o!==n.getColId()&&(r&&i.handler.onAnyFilterChanged?.(),ns(i,r)?.then(a=>{typeof a?.onAnyFilterChanged=="function"&&a.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(s=>{const o=s.isHandler;o&&s.handler.onNewRowsLoaded?.();const i=ns(s,o);i&&t.push(i.then(n=>{n.onNewRowsLoaded?.()}))}),fe.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:s,colModel:o}=this.beans;return(i,n)=>{const r=n?o.getCol(n):e;return r?s.getValue(r,i,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const s=t?.filter;return s?s.isFilterActive():Ue(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=V(Ue(this.model,e.getColId()));if(t)return t;const s=this.beans.groupFilter;return s?.isGroupFilter(e)?s.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?ns(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const s=ns(t);return s?s.then(o=>({comp:o,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const s=this.getOrCreateFilterWrapper(e,t);return s?.isHandler?s.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let s=this.cachedFilter(e);return!s&&t&&(s=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,s)),s}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return qb(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":Gy(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,s,o,i,n){const r=()=>{const c=this.createFilterCompParams(e,i,n),d=o(c,i);return J0(this.beans.userCompFactory,t,d,s)},a=r();return a?{compDetails:a,createFilterUi:c=>(c?r():a).newAgStackInstance()}:null}createFilterInstance(e,t,s,o){const i=this.beans.selectableFilter;i?.isSelectable(t)&&(t=i.getFilterDef(e,t));const{handler:n,handlerParams:r,handlerGenerator:a}=this.createHandler(e,t,s)??{},l=this.createFilterComp(e,t,s,o,!!n,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:n,handlerGenerator:a,handlerParams:r};const{compDetails:c,createFilterUi:d}=l;return this.isGlobalButtons&&(c.params?.buttons?.length||L(281,{colId:e.getColId()})),{compDetails:c,handler:n,handlerGenerator:a,handlerParams:r,createFilterUi:d}}createBaseFilterParams(e,t){const{filterManager:s,rowModel:o}=this.beans;return X(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:i=>s?.doesRowPassOtherFilters(e.getColId(),i)??!0,rowModel:o})}createFilterCompParams(e,t,s,o){const i=this.filterChangedCallbackFactory(e),n=this.createBaseFilterParams(e,o);if(n.filterChangedCallback=i,n.filterModifiedCallback=o?()=>{}:r=>this.filterModified(e,r),t){const r=n,a=e.getColId(),l=Ue(this.model,a);r.model=l,r.state=this.state.get(a)??{model:l},r.onModelChange=(c,d)=>{this.updateStoredModel(a,c),this.refreshHandlerAndUi(e,c,"ui",!1,d).then(()=>{i({...d,source:"columnFilter"})})},r.onStateChange=c=>{this.updateState(e,c),this.updateOrRefreshFilterUi(e)},r.onAction=(c,d,u)=>{this.updateModel(e,c,d),this.dispatchLocalEvent({type:"filterAction",column:e,action:c,event:u})},r.getHandler=()=>this.getHandler(e,!0),r.onUiChange=c=>this.filterUiChanged(e,c),r.source=s}return n}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,s){const o=t(),i={created:!0,create:t,filterParams:e.params,compDetails:e,promise:o};return o.then(s),i}createFilterWrapper(e){const{compDetails:t,handler:s,handlerGenerator:o,handlerParams:i,createFilterUi:n}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),r=e.getColId();if(s)return delete this.initialModel[r],s.init?.({...i,source:"init",model:Ue(this.model,r)}),{column:e,isHandler:!0,handler:s,handlerGenerator:o,handlerParams:i,filterUi:this.createFilterUiForHandler(t,n)};if(n){const a={column:e,filterUi:null,isHandler:!1};return a.filterUi=this.createFilterUiLegacy(t,n,l=>{a.filter=l??void 0}),a}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,s){const{gos:o,frameworkOverrides:i,registry:n}=this.beans;let r;const a=g=>{const f=g.filter;if(cg(f)){const m=f.handler;return m||(r=f.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return typeof f=="string"?f:void 0},l=o.get("enableFilterHandlers"),c=l?a(t):void 0,d=g=>()=>this.createBean(n.createDynamicBean(g,!0));let u,h;if(typeof c=="string"){const g=o.get("filterHandlers")?.[c];g!=null?u=g:Ey.has(c)&&(u=d(c),h=c)}else u=c;if(!u){let g;const{compName:f,jsComp:m,fwComp:v}=hg(i,t);f?g=f:m==null&&v==null&&t.filter===!0&&(g=s),h=this.handlerMap[g],h&&(u=d(h))}return u?{filterHandler:u,handlerNameOrCallback:r??h}:l?(Ne(o)&&L(277,{colId:e.getColId()}),AP):void 0}createHandler(e,t,s){const o=this.createHandlerFunc(e,t,s);if(!o)return;const i=Pr(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:n,filterHandler:r}=o,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,r,i);return{handler:a,handlerParams:l,handlerGenerator:n??r}}createHandlerFromFunc(e,t,s){const o=e.getColDef(),i=t(X(this.gos,{column:e,colDef:o})),n=this.createHandlerParams(e,s);return{handler:i,handlerParams:n}}createHandlerParams(e,t){const s=e.getColDef(),o=e.getColId(),i=this.filterChangedCallbackFactory(e);return X(this.gos,{colDef:s,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:n=>this.beans.filterManager?.doesRowPassOtherFilters(o,n)??!0,onModelChange:(n,r)=>{this.updateStoredModel(o,n),this.refreshHandlerAndUi(e,n,"handler",!1,r).then(()=>{i({...r,source:"columnFilter"})})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:s,groupFilter:o}=this.beans;this.allColumnFilters.forEach((n,r)=>{let a;n.column.isPrimary()?a=t.getColDefCol(r):a=t.getCol(r),!(a&&a===n.column)&&(e.push(n.column),this.disposeFilterWrapper(n,"columnChanged"),this.disposeColumnListener(r))});const i=o&&e.every(n=>o.isGroupFilter(n));e.length>0&&!i&&s?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const s=this.beans.groupFilter;return s?.isGroupFilter(e)?s.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:s,frameworkOverrides:o,selectableFilter:i}=this.beans,n=h=>{const g=this.getOrCreateFilterUi(e);g?.then(f=>{h(Ci(f))})},r=e.getColDef(),a=i?.isSelectable(r)?i.getFilterDef(e,r):r,l=_y(o,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",c=this.gos.get("enableFilterHandlers"),d=Pr(s,a,this.createFilterCompParams(e,c,"init",!0)),u=X(this.gos,{column:e,filterParams:d,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:n,showParentFilter:t});if(c){const h=u,g=e.getColId(),f=this.filterChangedCallbackFactory(e);h.onUiChange=m=>this.floatingFilterUiChanged(e,m),h.model=Ue(this.model,g),h.onModelChange=(m,v)=>{this.updateStoredModel(g,m),this.refreshHandlerAndUi(e,m,"floating",!0,v).then(()=>{f({...v,source:"columnFilter"})})},h.getHandler=()=>this.getHandler(e,!0),h.source="init"}return iS(s,r,u,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,s,o){const i="paramsUpdated";if(e.isHandler){const n=t.getColId();delete this.initialModel[n],this.state.delete(n);const r=e.filterUi,a=this.createFilterUiForHandler(s,o);e.filterUi=a;const l=this.eventSvc;r?.created?r.promise.then(c=>{this.destroyBean(c),l.dispatchEvent({type:"filterDestroyed",source:i,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:i,column:t})}else this.destroyFilter(t,i)}destroyFilter(e,t="api"){const s=e.getColId(),o=this.allColumnFilters.get(s);this.disposeColumnListener(s),delete this.initialModel[s],o&&this.disposeFilterWrapper(o,t).then(i=>{i&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let s=!1;const{column:o,isHandler:i,filterUi:n}=e,r=o.getColId();i&&(s=this.isHandlerActive(o),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const a=()=>{this.setColFilterActive(o,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:o})};if(n){if(n.created)return n.promise.then(l=>(s=i?s:!!l?.isFilterActive(),this.destroyBean(l),a(),s));a()}return fe.resolve(s)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const s=this.allColumnFilters.get(e);if(!s)return;const o=this.beans,i=s.column,n=i.getColDef(),r=i.isFilterAllowed(),a=this.getDefaultFilter(i),l=o.selectableFilter,c=l?.isSelectable(n)?l.getFilterDef(i,n):n,d=r?this.createHandlerFunc(i,c,this.getDefaultFilter(i)):void 0,u=!!d,h=s.isHandler;if(h!=u){this.destroyFilter(i,"paramsUpdated");return}const{compDetails:g,createFilterUi:f}=(r?this.createFilterComp(i,c,a,v=>v,u,"colDef"):null)??{compDetails:null,createFilterUi:null},m=g?.params??Pr(o.userCompFactory,c,this.createFilterCompParams(i,u,"colDef"));if(h){const v=d?.handlerNameOrCallback??d?.filterHandler,w=Ue(this.model,e);if(s.handlerGenerator!=v){const b=s.handler,{handler:S,handlerParams:R}=this.createHandlerFromFunc(i,d.filterHandler,m);s.handler=S,s.handlerParams=R,s.handlerGenerator=v,delete this.model[e],S.init?.({...R,source:"init",model:null}),this.destroyBean(b),w!=null&&this.beans.filterManager?.onFilterChanged({columns:[i],source:t})}else{const b=this.createHandlerParams(i,g?.params);s.handlerParams=b,s.handler.refresh?.({...b,source:"colDef",model:w})}}if(this.areFilterCompsDifferent(s.filterUi?.compDetails??null,g)||!s.filterUi||!g){this.destroyFilterUi(s,i,g,f);return}s.filterUi.filterParams=m,ns(s,h)?.then(v=>{(v?.refresh?v.refresh(m):!0)===!1?this.destroyFilterUi(s,i,g,f):this.dispatchLocalEvent({type:"filterParamsChanged",column:i,params:m})})}refreshHandlerAndUi(e,t,s,o,i){const n=this.cachedFilter(e);if(!n)return o&&this.getOrCreateFilterWrapper(e,!0),fe.resolve();if(!n.isHandler)return fe.resolve();const{filterUi:r,handler:a,handlerParams:l}=n;return Dy(()=>{if(r){const{created:c,filterParams:d}=r;if(c)return r.promise.then(u=>u?{filter:u,filterParams:d}:void 0);r.refreshed=!0}return fe.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},s,i)}setColumnFilterWrapper(e,t){const s=e.getColId();this.allColumnFilters.set(s,t),this.allColumnListeners.set(s,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(s)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:s}=e,{componentClass:o}=t;return!(s===o||s?.render&&o?.render&&s.render===o.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const s=this.getOrCreateFilterUi(t);return s?new Promise(o=>{s.then(i=>{o(Ci(i))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:s})=>{this.setModelForColumn(e,t).then(()=>s())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:o,model:i}=this,n=e.getColId(),r=o.get(n);return r?r.model??null:Ue(i,n)}const s=this.cachedFilter(e);return s?this.getModelFromFilterWrapper(s):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let s=()=>{};const o=new Promise(i=>{s=i});return this.columnModelUpdates.push({key:e,model:t,resolve:s}),o}return new Promise(s=>{this.setModelForColumnLegacy(e,t).then(o=>s(o))})}getStateForColumn(e){return this.state.get(e)??{model:Ue(this.model,e)}}setModelForColumnLegacy(e,t){const s=this.beans.colModel.getColDefCol(e),o=s?this.getOrCreateFilterWrapper(s,!0):null;return o?this.setModelOnFilterWrapper(o,t):fe.resolve()}setColDefPropsForDataType(e,t,s){const o=e.filter,i=o===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):o;if(typeof i!="string")return;let n,r;const a=this.beans,{filterParams:l,filterValueGetter:c}=e;i==="agMultiColumnFilter"?{filterParams:n,filterValueGetter:r}=a.multiFilter?.getParamsForDataType(l,c,t,s)??{}:{filterParams:n,filterValueGetter:r}=Oy(i,l,c,t,s,a,this.getLocaleTextFunc()),e.filterParams=n,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,s,o){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",s)),e.dispatchColEvent("filterChanged",s,o)}setModelOnFilterWrapper(e,t,s){return new fe(o=>{if(e.isHandler){const n=e.column,r=n.getColId(),a=this.model[r];if(this.updateStoredModel(r,t),s&&t===a){o();return}this.refreshHandlerAndUi(n,t,"api").then(()=>o());return}const i=ns(e);if(i){i.then(n=>{if(typeof n?.setModel!="function"){L(65),o();return}(n.setModel(t)||fe.resolve()).then(()=>o())});return}o()})}updateStoredModel(e,t){V(t)?this.model[e]=t:delete this.model[e];const s=this.state.get(e),o={model:t,state:s?.state};this.state.set(e,o)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(s=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:s,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,s){const o=e.getColId(),i=this.cachedFilter(e),n=()=>i?.filterUi;rd(t,n,()=>Ue(this.model,o),()=>this.state.get(o),r=>this.updateState(e,r),r=>n()?.filterParams?.onModelChange(r,s),i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0)}updateAllModels(e,t){const s=[];this.allColumnFilters.forEach((o,i)=>{const n=this.beans.colModel.getColDefCol(i);n&&rd(e,()=>o.filterUi,()=>Ue(this.model,i),()=>this.state.get(i),r=>this.updateState(n,r),r=>{this.updateStoredModel(i,r),this.dispatchLocalEvent({type:"filterAction",column:n,action:e}),s.push(this.refreshHandlerAndUi(n,r,"ui"))},o?.isHandler?o.handler.processModelToApply?.bind(o.handler):void 0)}),s.length&&fe.all(s).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();Ng(()=>this.cachedFilter(e)?.filterUi,()=>Ue(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:s}=this;for(const i of s)if(i.source==="COLUMN_MENU")return!1;let o=!1;for(const i of e.keys()){const n=e.get(i);if(n.valid===!1)return!1;(n.model??null)!==Ue(t,i)&&(o=!0)}return o}hasUnappliedModel(e){const{model:t,state:s}=this;return(s.get(e)?.model??null)!==Ue(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const s=this.beans.filterPanelSvc;return s?.isActive?!!s.getState(e.getColId()):!1}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function OP(e){return!!e.filterManager?.isAnyFilterPresent()}function NP(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var HP=class extends T{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:o})=>this.onAdvFilterEnabledChanged(o),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:s}=this;this.alwaysPassFilter=s.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=s.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,s="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,s)}setFilterModel(e,t="api",s){if(this.isAdvFilterEnabled()){s||this.warnAdvFilters();return}this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){Ra(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:s,columns:o=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):fe.resolve()).then(()=>{const i={source:t,type:"filterChanged",columns:o};s&&st(i,s),this.eventSvc.dispatchEvent(i),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Ra(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){L(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}},GP=class extends T{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,s,o){e&&!e.isColumn||this.showPopup(e,i=>{this.popupSvc?.positionPopupUnderMouseEvent({column:e,type:s,mouseEvent:t,ePopup:i})},s,t.target,ut(this.gos),o)}showMenuAfterButtonClick(e,t,s,o){if(e&&!e.isColumn)return;let i=-1,n="left";const r=ut(this.gos);!r&&this.gos.get("enableRtl")&&(i=1,n="right");const a=r?void 0:4*i,l=r?void 0:4;this.showPopup(e,c=>{this.popupSvc?.positionPopupByComponent({type:s,eventSource:t,ePopup:c,nudgeX:a,nudgeY:l,alignSide:n,keepWithinBounds:!0,position:"under",column:e})},s,t,r,o)}showPopup(e,t,s,o,i,n){const r=e?this.createBean(new Ay(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){be(57);return}const a=it({tag:"div",cls:`ag-menu${i?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:m=>this.trapFocusWithin(m,a)}),a.appendChild(r?.getGui());let l;const c=()=>r?.afterGuiDetached(),d=Yb(this.gos)?o??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=m=>{pd(e,!1,"contextMenu");const v=m instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),v&&o&&Jt(o)&&vg(o)?.focus({preventScroll:!0}),c(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,s,e),n?.()},h=this.getLocaleTextFunc(),g=i&&s!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),f=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(a),anchorToElement:d,ariaLabel:g});f&&(this.hidePopup=l=f.hideFunc),r.afterInit().then(()=>{t(a),r.afterGuiAttached({container:s,hidePopup:l})}),pd(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,s,e)}trapFocusWithin(e,t){e.key!==D.TAB||e.defaultPrevented||Qs(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),js(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,s){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:s??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},VP=class extends T{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,s){if(!t)return;const o=e.getColDef(),{selectableFilter:i,valueSvc:n}=this.beans,r=s??i?.getFilterValueGetter(e.getColId())??o.filterValueGetter;return r?this.executeFilterValueGetter(r,t.data,e,t,o):n.getValue(e,t)}executeFilterValueGetter(e,t,s,o,i){const{expressionSvc:n,valueSvc:r}=this.beans,a=X(this.gos,{data:t,node:o,column:s,colDef:i,getValue:r.getValueCallback.bind(r,o)});return typeof e=="function"?e(a):n?.evaluate(e,a)}},BP={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},zP=class extends Le{constructor(){super(BP,[tr]),this.eFloatingFilterText=Z}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const s=e,o=s.getHandler();if(o.getModelAsString){const i=o.getModelAsString(s.model);this.eFloatingFilterText.setValue(i)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const s=t.getModelAsString(e);this.eFloatingFilterText.setValue(s)}})}refresh(e){this.init(e)}},Xl=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const s=e.filterOptions??t;this.filterOptions!==s&&(this.filterOptions=s,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const s=[["displayKey"],["displayName"],["predicate","test"]],o=i=>i.some(n=>t[n]!=null)?!0:(L(72,{keys:i}),!1);if(!s.every(o)){this.filterOptions=e.filter(i=>i===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const s=t[0];if(typeof s=="string")return s;if(s.displayKey)return s.displayKey;L(73)}else L(74)}getCustomOption(e){return this.customFilterOptions[e]}};function ii(e,t,s){return s==null?e.splice(t):e.splice(t,s)}function Vn(e){return e==null||typeof e=="string"&&e.trim().length===0}function WP(e){return e==="AND"||e==="OR"?e:"AND"}function _P(e,t,s){if(e==null)return;const{predicate:o}=e;if(o!=null&&!t.some(i=>i==null))return o(t,s)}function jP(e,t){let s=e.length;return s>t&&(e.splice(t),L(78),s=t),s}function Si(e,t){const s=t.getCustomOption(e);if(s){const{numberOfInputs:i}=s;return i??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:e==="inRange"?2:1}var Jl=class extends Wy{constructor(e,t,s){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=s,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new Xl;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=WP(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions();const t=this.getGui();this.isReadOnly()?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,s)=>{const o=s===0?e:this.optionsFactory.defaultOption;t.setValue(o,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const s=!e.operator,o=!t.operator;if(!s&&o||s&&!o)return!1;let n;if(s){const r=e,a=t;n=this.areSimpleModelsEqual(r,a)}else{const r=e,a=t;n=r.operator===a.operator&&Cs(r.conditions,a.conditions,(l,c)=>this.areSimpleModelsEqual(l,c))}return n}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),fe.resolve();if(e.operator){const o=e;let i=o.conditions;i==null&&(i=[],L(77));const n=jP(i,this.maxNumConditions),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 a=o.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),i.forEach((l,c)=>{this.eTypes[c].setValue(l.type,!0),this.setConditionIntoUi(l,c)})}else{const o=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(o.type,!0),this.setConditionIntoUi(o,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),fe.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(L(79),t=1),this.maxNumConditions=t;let s=e.numAlwaysVisibleConditions??1;s<1&&(L(80),s=1),s>t&&(L(81),s=t),this.numAlwaysVisibleConditions=s}createOption(){const e=this.getGui(),t=this.createManagedBean(new Al);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const s=this.createEValue();this.eConditionBodies.push(s),e.appendChild(s),this.putOptionsIntoDropdown(t),this.resetType(t);const o=this.getNumConditions()-1;this.forEachPositionInput(o,i=>this.resetInput(i)),this.addChangedListeners(t,o)}createJoinOperatorPanel(){const e=it({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),s=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const o=this.eJoinPanels.length-1,i=this.joinOperatorId++;this.resetJoinOperatorAnd(t,o,i),this.resetJoinOperatorOr(s,o,i),this.isReadOnly()||(t.onValueChange(this.listener),s.onValueChange(this.listener))}createJoinOperator(e,t,s){const o=this.createManagedBean(new wS);e.push(o);const i="ag-filter-condition-operator";return o.addCss(i),o.addCss(`${i}-${s}`),t.appendChild(o.getGui()),o}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const s of t)e.addOption(s);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,s=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:s?this.getLocaleTextFunc()(s.displayKey,s.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let s=0;s<this.getNumConditions();s++)this.isConditionUiComplete(s)?e=s:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const s=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<s){this.removeConditionsAndOperators(s+1);const o=e+1,i=s-o;i>0&&this.removeConditionsAndOperators(o,i),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((o,i)=>{const n=this.isConditionDisabled(i,e);o.setDisabled(n||this.filterListOptions.length<=1),i===1&&(hi(this.eJoinPanels[0],n),this.eJoinAnds[0].setDisabled(n),this.eJoinOrs[0].setDisabled(n))}),this.eConditionBodies.forEach((o,i)=>{ke(o,this.isConditionBodyVisible(i))});const s=(t??this.getJoinOperator())==="OR";for(const o of this.eJoinAnds)o.setValue(!s,!0);for(const o of this.eJoinOrs)o.setValue(s,!0);this.forEachInput((o,i,n,r)=>{this.setElementDisplayed(o,i<r),this.setElementDisabled(o,this.isConditionDisabled(n,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:s,eConditionBodies:o,eJoinPanels:i,eJoinAnds:n,eJoinOrs:r}=this;this.removeComponents(s,e,t),this.removeElements(o,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(i,a,t),this.removeComponents(n,a,t),this.removeComponents(r,a,t)}removeElements(e,t,s){const o=ii(e,t,s);for(const i of o)hs(i)}removeComponents(e,t,s){const o=ii(e,t,s);for(const i of o)hs(i.getGui()),this.destroyBean(i)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const s=this.getInputs(0)[0];s instanceof Ds&&this.isConditionBodyVisible(0)?t=s.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column))return;e.onStateChange({model:e.model});let t=-1,s=-1,o=!1;const i=this.getJoinOperator();for(let r=this.getNumConditions()-1;r>=0;r--)if(this.isConditionUiComplete(r))t===-1&&(t=r,s=r);else{const a=r>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(r-1),l=r<t;(a||l)&&(this.removeConditionsAndOperators(r,1),o=!0,l&&s--)}let n=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),n=!0),this.shouldAddNewConditionAtEnd(s===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),n=!0),n&&this.updateConditionStatusesAndValues(s,i),o&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=s}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}getPlaceholderText(e,t){let s=this.translate(e);if(typeof this.filterPlaceholder=="function"){const o=this.eTypes[t].getValue(),i=this.translate(o);s=this.filterPlaceholder({filterOptionKey:o,filterOption:i,placeholder:s})}else typeof this.filterPlaceholder=="string"&&(s=this.filterPlaceholder);return s}resetPlaceholder(){const e=this.getLocaleTextFunc();this.forEachInput((t,s,o,i)=>{if(!(t instanceof Ds))return;const n=s===0&&i>1?"inRangeStart":s===0?"filterOoo":"inRangeEnd",r=s===0&&i>1?e("ariaFilterFromValue","Filter from value"):s===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(n,o)),t.setInputAriaLabel(r)})}setElementValue(e,t,s){e instanceof Ds&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){Yc(e)&&ke(e.getGui(),t)}setElementDisabled(e,t){Yc(e)&&hi(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Ds&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,s)=>{this.forEachPositionTypeInput(s,t,e)})}forEachPositionInput(e,t){const s=this.getConditionType(e);this.forEachPositionTypeInput(e,s,t)}forEachPositionTypeInput(e,t,s){const o=Si(t,this.optionsFactory),i=this.getInputs(e);for(let n=0;n<i.length;n++){const r=i[n];r!=null&&s(r,n,e,o)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return Si(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(s=>s==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,s)=>this.resetJoinOperatorAnd(t,s,this.joinOperatorId+s)),this.eJoinOrs.forEach((t,s)=>this.resetJoinOperatorOr(t,s,this.joinOperatorId+s)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const s=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(s).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,s){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),s)}resetJoinOperatorOr(e,t,s){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),s)}resetJoinOperator(e,t,s,o,i){this.updateJoinOperatorDisabled(e.setValue(s,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${i}`).setLabel(o),t)}updateJoinOperatorsDisabled(){const e=(t,s)=>this.updateJoinOperatorDisabled(t,s);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const s=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((o,i,n)=>{n===t&&this.setElementValue(o,s[i]!=null?s[i]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,s,o)=>{this.setElementValue(t,s===0&&o===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,s=>{this.attachElementOnChange(s,this.listener)}))}hasInvalidInputs(){return!1}isReadOnly(){return!!this.params.readOnly}},zp=class{constructor(e,t,s,o,i,n){this.alive=!0,this.context=e,this.eParent=i;const r=eS(t,s,o);r&&r.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;i.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:c}=this;l&&a.setDate(l),c!=null&&a.setDisabled?.(c),n?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){ke(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}},ec=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function Wp(e,t){const{dateFrom:s,dateTo:o,type:i}=e||{};return[s&<(s,void 0,!0)||null,o&<(o,void 0,!0)||null].slice(0,Si(i,t))}var Yd=1e3,Zd=1/0,UP=class extends Jl{constructor(){super("dateFilter",Wp,ec),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=Yd,this.maxValidYear=Zd,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,c)=>{const d=e[l];if(d!=null)if(isNaN(d))L(82,{param:l});else return d==null?c:Number(d);return c},s=t("minValidYear",Yd),o=t("maxValidYear",Zd);this.minValidYear=s,this.maxValidYear=o,s>o&&L(83);const{minValidDate:i,maxValidDate:n}=e,r=i instanceof Date?i:lt(i);this.minValidDate=r;const a=n instanceof Date?n:lt(n);this.maxValidDate=a,r&&a&&r>a&&L(84)}createDateCompWrapper(e){const{beans:{userCompFactory:t,context:s,gos:o},params:i}=this,n=new zp(s,t,i.colDef,X(o,{onDateChanged:()=>this.onUiChanged(),filterParams:i,location:"filter"}),e);return this.addDestroyFunc(()=>n.destroy()),n}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=it({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,s,o){const i=it({tag:"div",cls:`ag-filter-${o} ag-filter-date-${o}`});t.push(i),e.appendChild(i),s.push(this.createDateCompWrapper(i))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),ii(this.eConditionPanelsFrom,e,t),ii(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,s){const o=ii(e,t,s);for(const i of o)i.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:s,minValidYear:o,maxValidYear:i}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<o)return!1;if(s){if(e>s)return!1}else if(e.getUTCFullYear()>i)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((s,o,i,n)=>{i!==e||!t||o>=n||(t=t&&this.isValidDateValue(s.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),s={},o=this.getValues(e),i=this.params.useIsoSeparator?"T":" ";return o.length>0&&(s.dateFrom=ht(o[0],!0,i)),o.length>1&&(s.dateTo=ht(o[1],!0,i)),{dateFrom:null,dateTo:null,filterType:this.filterType,type:t,...s}}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),s=e("ariaFilterValue","Filter Value");this.forEachInput(o=>{o.setInputPlaceholder(t),o.setInputAriaLabel(s)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(s,o,i,n)=>{o<n&&t.push(s.getDate())}),t}translate(e){return e==="lessThan"?super.translate("before"):e==="greaterThan"?super.translate("after"):super.translate(e)}},_p=class extends T{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,s=new Xl;this.optionsFactory=s,s.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(s,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,s=this.optionsFactory;s.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:s,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:s}=t,o=[];if(s){const r=t;o.push(...r.conditions??[])}else o.push(t);const i=s&&s==="OR"?"some":"every",n=this.params.getValue(e.node);return o[i](r=>this.individualConditionPasses(e,r,n))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:s,maxNumConditions:o}}=e;if(t==null)return;let n=Vg(t)?t.conditions:[t];const r=s?.map(d=>typeof d=="string"?d:d.displayKey)??this.defaultOptions;if(!(!n||n.every(d=>r.find(u=>u===d.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const c=this.filterType;if((n&&!n.every(d=>d.filterType===c)||t.filterType!==c)&&(n=n.map(d=>({...d,filterType:c})),l=!0),typeof o=="number"&&n&&n.length>o&&(n=n.slice(0,o),l=!0),l){const d=n.length>1?{...t,filterType:c,conditions:n}:{...n[0],filterType:c};this.params={...e,model:d},e.onModelChange(d)}}individualConditionPasses(e,t,s){const o=this.optionsFactory,i=this.mapValuesFromModel(t,o),n=o.getCustomOption(t.type),r=_P(n,i,s);return r??(s==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(i,s,t,e))}},jp=class extends _p{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:s,includeBlanksInGreaterThan:o,includeBlanksInLessThan:i,includeBlanksInRange:n}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(s)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(o)return!0;break;case"lessThan":case"lessThanOrEqual":if(i)return!0;break;case"inRange":if(n)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,s){const o=s.type;if(!this.isValid(t))return o==="notEqual"||o==="notBlank";const i=this.comparator(),n=e[0]!=null?i(e[0],t):0;switch(o){case"equals":return n===0;case"notEqual":return n!==0;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{const r=i(e[1],t);return this.params.filterParams.inRangeInclusive?n>=0&&r<=0:n>0&&r<0}case"blank":return Vn(t);case"notBlank":return!Vn(t);default:return L(76,{filterModelType:o}),!0}}},Up={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},$P={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},tc=class extends T{constructor(e,t,s){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=s}getModelAsString(e,t){const s=this.getLocaleTextFunc(),o=t==="filterToolPanel";if(!e)return o?ds(this,"filterSummaryInactive"):null;if(e.operator!=null){const n=e,a=(n.conditions??[]).map(c=>this.getModelAsString(c,t)),l=n.operator==="AND"?"andCondition":"orCondition";return a.join(` ${ds(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return o?ds(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):s(e.type,e.type);{const n=e,r=this.optionsFactory.getCustomOption(n.type),{displayKey:a,displayName:l,numberOfInputs:c}=r||{};return a&&l&&c===0?s(a,l):this.conditionToString(n,o,n.type==="inRange"||c===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:s}=e;this.optionsFactory=t,this.filterParams=s}conditionForToolPanel(e,t,s,o,i,n){let r;const a=this.getTypeKey(e);return a&&(r=ds(this,a)),i&&n&&(r=this.getLocaleTextFunc()(i,n)),r!=null?t?`${r} ${ds(this,"filterSummaryInRangeValues",[s(),o()])}`:`${r} ${s()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},$p=class extends tc{constructor(e,t){super(e,t,s=>{const{dataTypeSvc:o,valueSvc:i}=this.beans,n=t.column,r=o?.getDateFormatterFunction(n),a=r?r(s??void 0):s;return i.formatValue(n,null,a)}),this.filterTypeKeys=Up}conditionToString(e,t,s,o,i){const{type:n}=e,r=lt(e.dateFrom),a=lt(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,c=t?this.formatValue.bind(this):h=>Ta(h,l),d=()=>r!==null?c(r):"null",u=()=>a!==null?c(a):"null";if(t){const h=this.conditionForToolPanel(n,s,d,u,o,i);if(h!=null)return h}return s?`${d()}-${u()}`:r!=null?c(r):`${n}`}};function KP(e,t){const s=t;return s<e?-1:s>e?1:0}var qP=class extends jp{constructor(){super(Wp,ec),this.filterType="date",this.FilterModelFormatterClass=$p}comparator(){return this.params.filterParams.comparator??KP}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}},Kp=class extends Le{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let s;t?s=e.conditions[0]:s=e,this.lastType=s.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const s=e;return this.isTypeEditable(s.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const s=e;this.onModelUpdated(s.model)}}setParams(e){const t=new Xl;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const s=this.optionsFactory.defaultOption;t||(this.lastType=s),this.readOnly=!!e.filterParams.readOnly;const o=this.isTypeEditable(s);this.setEditable(o)}refresh(e){this.params=e;const t=e,s=this.reactive;if((!s||t.source==="colDef")&&this.updateParams(e),s){const{source:o,model:i}=t;if(o==="dataChanged"||o==="ui")return;this.onModelUpdated(i)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}hasSingleInput(e){const t=this.optionsFactory.getCustomOption(e)?.numberOfInputs;return t==null||t==1}isTypeEditable(e){const t=["inRange","empty","blank","notBlank"];return!!e&&!this.readOnly&&this.hasSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},YP={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},ZP=class extends Kp{constructor(){super(YP,[tr]),this.eReadOnlyText=Z,this.eDateWrapper=Z,this.FilterModelFormatterClass=$p,this.filterType="date",this.defaultOptions=ec}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const s=e?lt(e.dateFrom):null;this.dateComp.setDate(s),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){ke(this.eDateWrapper,e),ke(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const s=t.model,o=ht(e),i=o==null?null:{...s??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:o};t.onModelChange(i,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=Gl(e,this.defaultDebounceMs);return X(this.gos,{onDateChanged:Ye(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:s,params:o}=this;this.dateComp=new zp(e,t,o.column.getColDef(),this.getDateComponentParams(),s,i=>{i.setInputAriaLabel(this.getAriaLabel(o))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},QP={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},XP=class extends Le{constructor(){super(QP,[tr]),this.eDateInput=Z,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}setParams(e){const t=this.eDateInput.getInputElement(),s=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=s&&vs();const{minValidYear:o,maxValidYear:i,minValidDate:n,maxValidDate:r,buttons:a,includeTime:l,colDef:c}=e.filterParams||{},d=this.beans.dataTypeSvc,u=l??d?.getDateIncludesTimeFlag?.(c.cellDataType)??!1;if(s?u?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text",n&&o&&L(85),r&&i&&L(86),n&&r){const[h,g]=[n,r].map(f=>f instanceof Date?f:lt(f));h&&g&&h.getTime()>g.getTime()&&L(87)}n?n instanceof Date?t.min=Ta(n):t.min=n:o&&(t.min=`${o}-01-01`),r?r instanceof Date?t.max=Ta(r):t.max=r:i&&(t.max=`${i}-12-31`),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return lt(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,s=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(ht(e,s))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}},sc=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function Ka(e){const{allowedCharPattern:t}=e??{};return t??null}function qa(e){return e==null||isNaN(e)?null:e}function qp(e,t){const{filter:s,filterTo:o,type:i}=e||{};return[qa(s),qa(o)].slice(0,Si(i,t))}var JP=class extends Jl{constructor(){super("numberFilter",qp,sc),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}setElementValue(e,t,s){const{numberFormatter:o}=this.params,i=!s&&o?o(t??null):t;super.setElementValue(e,i)}createEValue(){const e=Ka(this.params),t=it({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,s,o){const i=this.createManagedBean(o?new Xs({allowedCharPattern:o}):new kl);i.addCss(`ag-filter-${s}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}removeEValues(e,t){const s=o=>this.removeComponents(o,e,t);s(this.eValuesFrom),s(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(s,o,i,n)=>{o<n&&t.push(qa(this.stringToFloat(s.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}stringToFloat(e){if(typeof e=="number")return e;let t=Kt(e);t!=null&&t.trim()===""&&(t=null);const s=this.params.numberParser;return s?s(t):t==null||t.trim()==="-"?null:Number.parseFloat(t)}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(s.filter=o[0]),o.length>1&&(s.filterTo=o[1]),s}getInputs(e){const{eValuesFrom:t,eValuesTo:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{t.getInputElement().validity.valid||(e=!0)}),e}},Yp=class extends tc{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=Up}conditionToString(e,t,s,o,i){const{filter:n,filterTo:r,type:a}=e,l=this.formatValue.bind(this);if(t){const c=this.conditionForToolPanel(a,s,()=>l(n),()=>l(r),o,i);if(c!=null)return c}return s?`${l(n)}-${l(r)}`:n!=null?l(n):`${a}`}},e5=class extends jp{constructor(){super(qp,sc),this.filterType="number",this.FilterModelFormatterClass=Yp}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},Zp=class extends T{constructor(e){super(),this.params=e,this.eInput=Z,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new Xs(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const s=o=>this.onValueChanged(o);this.addManagedListeners(t,{input:s,keydown:s})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t}){const{eInput:s}=this;s.setInputAriaLabel(e),t!==void 0&&s.setAutoComplete(t)}};function Ya(e){const t=e?.trim();return t===""?e:t}function Qp(e,t){const{filter:s,filterTo:o,type:i}=e||{};return[s||null,o||null].slice(0,Si(i,t))}var t5={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},Xp=class extends Kp{constructor(){super(...arguments),this.eFloatingFilterInputContainer=Z,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(t5)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const t=e.browserAutoComplete??!1,{inputSvc:s,defaultDebounceMs:o,readOnly:i}=this;if(s.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=or(e.filterParams),!i){const n=Gl(e.filterParams,o),r=Ye(this,this.syncUpWithParentFilter.bind(this),n);s.setValueChangedListener(r)}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,s=t.getValue();at(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(s,!0)}syncUpWithParentFilter(e){const t=e.key===D.ENTER,s=this.reactive;if(s&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:o,params:i,lastType:n}=this;let r=o.getValue();if(i.filterParams.trimInput&&(r=Ya(r),o.setValue(r,!0)),s){const a=i,l=a.model,c=this.convertValue(r),d=c==null?null:{...l??{filterType:this.filterType,type:n??this.optionsFactory.defaultOption},filter:c};a.onModelChange(d,{afterFloatingFilter:!0})}else i.parentFilterInstance(a=>{a?.onFloatingFilterChanged(n||null,r||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},s5=class extends T{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new kl),this.eTextInput=this.createManagedBean(new Xs),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),s=this.eTextInput.getGui();e.appendChild(t),e.appendChild(s),this.setupListeners(t,o=>this.onValueChanged(o)),this.setupListeners(s,o=>this.onValueChanged(o))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},o5=class extends Xp{constructor(){super(...arguments),this.FilterModelFormatterClass=Yp,this.filterType="number",this.defaultOptions=sc}updateParams(e){Ka(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=Ka(e.filterParams),this.allowedCharPattern?this.createManagedBean(new Zp({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new s5)}convertValue(e){return e?Number(e):null}},oc=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],i5=class extends Jl{constructor(){super("textFilter",Qp,oc),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(s.filter=o[0]),o.length>1&&(s.filterTo=o[1]),s}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(s,o,i,n)=>{o<n&&t.push(Kt(s.getValue()))}),t}createEValue(){const e=it({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:s}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,s,"to"),e}createFromToElement(e,t,s){const o=this.createManagedBean(new Xs);o.addCss(`ag-filter-${s}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeEValues(e,t){const s=n=>this.removeComponents(n,e,t),{eValuesFrom:o,eValuesTo:i}=this;s(o),s(i)}},Jp=class extends tc{constructor(){super(...arguments),this.filterTypeKeys=$P}conditionToString(e,t,s,o,i){const{filter:n,filterTo:r,type:a}=e;if(t){const l=d=>()=>ds(this,"filterSummaryTextQuote",[d]),c=this.conditionForToolPanel(a,s,l(n),l(r),o,i);if(c!=null)return c}return s?`${n}-${r}`:n!=null?`${n}`:`${a}`}},n5=({filterOption:e,value:t,filterText:s})=>{if(s==null)return!1;switch(e){case"contains":return t.includes(s);case"notContains":return!t.includes(s);case"equals":return t===s;case"notEqual":return t!=s;case"startsWith":return t.indexOf(s)===0;case"endsWith":{const o=t.lastIndexOf(s);return o>=0&&o===t.length-s.length}default:return!1}},r5=e=>e,a5=e=>e==null?null:e.toString().toLowerCase(),l5=class extends _p{constructor(){super(Qp,oc),this.filterType="text",this.FilterModelFormatterClass=Jp}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??n5,this.formatter=t.textFormatter??(t.caseSensitive?r5:a5)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,s,o){const i=e.map(h=>this.formatter(h))||[],n=this.formatter(t),{api:r,colDef:a,column:l,context:c,filterParams:{textFormatter:d}}=this.params;if(s.type==="blank")return Vn(t);if(s.type==="notBlank")return!Vn(t);const u={api:r,colDef:a,column:l,context:c,node:o.node,data:o.data,filterOption:s.type,value:n,textFormatter:d};return i.some(h=>this.matcher({...u,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=s=>{const o={...s},{filter:i,filterTo:n}=s;return i&&(o.filter=Ya(i)??null),n&&(o.filterTo=Ya(n)??null),o};return Vg(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},c5=class extends Xp{constructor(){super(...arguments),this.FilterModelFormatterClass=Jp,this.filterType="text",this.defaultOptions=oc}createFloatingFilterInputService(){return this.createManagedBean(new Zp)}};function d5(e){return!!e.quickFilter?.isFilterPresent()}function u5(e){return e.quickFilter?.getText()}function h5(e){e.quickFilter?.resetCache()}var g5=class extends T{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",s=>this.setFilter(s.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:s,pivotResultCols:o}=this.beans,i=t.isPivotMode(),n=e?.getColumns(),r=t.getColDefCols();let a=(i&&!s.get("applyQuickFilterBeforePivotOrAgg")?o?.getPivotResultCols()?.list:r)??[];n&&(a=a.concat(n)),this.colsToUse=s.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(s=>t?this.doesRowPassCache(e,s):this.doesRowPassNoCache(e,s))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return V(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){L(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),s=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,s&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(s=>{const o=this.getTextForColumn(s,e);return V(o)&&o.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let s;e?(this.checkGenerateAggText(t),s=t.quickFilterAggregateText):s=this.getAggText(t);const{quickFilterParts:o,matcher:i}=this;return i(o,s)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let s=this.beans.filterValueSvc.getValue(e,t);const o=e.getColDef();if(o.getQuickFilterText){const i=X(this.gos,{value:s,node:t,data:t.data,column:e,colDef:o});s=o.getQuickFilterText(i)}return V(s)?s.toString().toUpperCase():null}getAggText(e){const t=[];for(const s of this.colsToUse){const o=this.getTextForColumn(s,e);V(o)&&t.push(o)}return t.join(`
|
|
61
|
+
`)}},p5={moduleName:"ClientSideRowModelFilter",version:G,rowModels:["clientSide"],beans:[fP]},ic={moduleName:"FilterCore",version:G,beans:[HP],apiFunctions:{isAnyFilterPresent:OP,onFilterChanged:NP},css:[SP],dependsOn:[p5]},ef={moduleName:"FilterValue",version:G,beans:[VP]},lr={moduleName:"ColumnFilter",version:G,beans:[LP,GP],dynamicBeans:{headerFilterCellCtrl:mP},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:yP,getColumnFilterInstance:RP,destroyFilter:xP,setFilterModel:FP,getFilterModel:EP,getColumnFilterModel:DP,setColumnFilterModel:PP,showColumnFilter:TP,hideColumnFilter:MP,getColumnFilterHandler:IP,doFilterAction:kP},dependsOn:[ic,ar,ef,wP]},f5={moduleName:"CustomFilter",version:G,userComponents:{agReadOnlyFloatingFilter:zP},dependsOn:[lr]},m5={moduleName:"TextFilter",version:G,dependsOn:[lr],userComponents:{agTextColumnFilter:{classImp:i5,params:{useForm:!0}},agTextColumnFloatingFilter:c5},dynamicBeans:{agTextColumnFilterHandler:l5}},C5={moduleName:"NumberFilter",version:G,dependsOn:[lr],userComponents:{agNumberColumnFilter:{classImp:JP,params:{useForm:!0}},agNumberColumnFloatingFilter:o5},dynamicBeans:{agNumberColumnFilterHandler:e5}},v5={moduleName:"DateFilter",version:G,dependsOn:[lr],userComponents:{agDateColumnFilter:{classImp:UP,params:{useForm:!0}},agDateInput:XP,agDateColumnFloatingFilter:ZP},dynamicBeans:{agDateColumnFilterHandler:qP}},w5={moduleName:"QuickFilterCore",version:G,rowModels:["clientSide"],beans:[g5],dependsOn:[ic,ef]},b5={moduleName:"QuickFilter",version:G,apiFunctions:{isQuickFilterPresent:d5,getQuickFilter:u5,resetQuickFilter:h5},dependsOn:[w5]},S5={moduleName:"ExternalFilter",version:G,dependsOn:[ic]},y5=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",sa=(e,t,s)=>{const{editModelSvc:o}=e,i=o?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,n=o?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=i||n;return r?.length?r.join(s("tooltipValidationErrorSeparator",". ")):void 0},R5=class extends T{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,s,o){e&&t.destroyBean(e);const i=this.gos,n=ta(i),{column:r,eGui:a}=t,l=r.getColDef();!o&&n&&!l.headerComponent&&(o=Qi(()=>a.querySelector(".ag-header-cell-text")));const c="header",u=this.beans.colNames.getDisplayNameForColumn(r,"header",!0),h=s??u,g={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>s??l?.headerTooltipValueGetter?.(X(i,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:o,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})};let f=this.createTooltipFeature(g);return f&&(f=t.createBean(f),t.setRefreshFunction("tooltip",()=>f.refreshTooltip())),f}setupHeaderGroupTooltip(e,t,s,o){e&&t.destroyBean(e);const i=this.gos,n=ta(i),{column:r,eGui:a}=t,l=r.getColGroupDef();!o&&n&&!l?.headerGroupComponent&&(o=Qi(()=>a.querySelector(".ag-header-group-text")));const c="headerGroup",u=this.beans.colNames.getDisplayNameForColumnGroup(r,"header"),h=s??u,g={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>s??l?.headerTooltipValueGetter?.(X(i,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:o,getAdditionalParams:()=>{const m={column:r};return l&&(m.colDef=l),m}},f=this.createTooltipFeature(g);return f&&t.createBean(f)}enableCellTooltipFeature(e,t,s){const{beans:o}=this,{gos:i,editSvc:n}=o,{column:r,rowNode:a}=e;let l="cell";const c=()=>{const g=!!!n?.isEditing(e)&&sa(o,e,this.getLocaleTextFunc());if(g)return l="cellEditor",g;l="cell";const f=r.getColDef(),m=a.data;if(f.tooltipField&&V(m))return si(m,f.tooltipField,r.isTooltipFieldContainsDots());const v=f.tooltipValueGetter;return v?v(X(i,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,value:e.value,valueFormatted:e.valueFormatted})):null},d=ta(i);s||(d&&!e.isCellRenderer()?s=()=>{const h=!!n?.isEditing(e);if(!h&&sa(o,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const m=Qi(()=>{const v=e.eGui;return v.children.length===0?v:v.querySelector(".ag-cell-value")});return!h&&m()}:s=()=>!n?.isEditing(e));const u={getGui:()=>e.eGui,getLocation:()=>l,getTooltipValue:t!=null?()=>t:c,shouldDisplayTooltip:s,getAdditionalParams:()=>({column:r,colDef:r.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(u,o)}setupFullWidthRowTooltip(e,t,s,o){const i={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>s,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:o},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(i,n);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){const{beans:s}=this,{context:o}=s,i=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!i)return;const n={getGui:()=>i,getTooltipValue:()=>sa(s,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:a}=s,l=a?.getRowValidationModel()?.getRowValidationMap(),c=a?.getCellValidationModel()?.getCellValidationMap(),d=!!l&&l.size>0,u=!!c&&c.size>0;return d||u}},r=this.createTooltipFeature(n,s);if(r)return e.createBean(r,o)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=V(t.tooltipField)||V(t.tooltipValueGetter)||V(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},x5=class extends uy{createTooltipComp(e,t){oS(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},tf={moduleName:"Tooltip",version:G,beans:[R5],dynamicBeans:{tooltipFeature:Tg,highlightTooltipFeature:hy,tooltipStateManager:x5},userComponents:{agTooltipComponent:fy},dependsOn:[ar],css:[y5]},ro=class{constructor(e){this.cellValueChanges=e}},oa=class extends ro{constructor(e,t,s,o){super(e),this.initialRange=t,this.finalRange=s,this.ranges=o}},F5=10,Qd=class{constructor(e){this.actionStack=[],this.maxStackSize=e||F5,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},E5=class extends T{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},s=this.activeCellEdit!==null&&np(this.activeCellEdit,t),o=this.activeRowEdit!==null&&Wx(this.activeRowEdit,t);if(!(s||o||this.isPasting||this.isRangeInAction))return;const{rowPinned:n,rowIndex:r,column:a,oldValue:l,value:c}=e,d={rowPinned:n,rowIndex:r,columnId:a.getColId(),newValue:c,oldValue:l};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const s=e.get("undoRedoCellEditingLimit");if(s<=0)return;this.undoStack=new Qd(s),this.redoStack=new Qd(s),this.addListeners();const o=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:i=>{i.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:o,newColumnsLoaded:o,columnGroupOpened:o,columnRowGroupChanged:o,columnMoved:o,columnPinned:o,columnVisible:o,rowDragEnd:o}),t.whenReady(this,i=>{this.gridBodyCtrl=i.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:s,redoStack:o}=this;t.dispatchEvent({type:"undoStarted",source:e});const i=this.undoRedo(s,o,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:i})}redo(e){const{eventSvc:t,undoStack:s,redoStack:o}=this;t.dispatchEvent({type:"redoStarted",source:e});const i=this.undoRedo(o,s,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:i})}undoRedo(e,t,s,o,i){if(!e)return!1;const n=e.pop();return n?.cellValueChanges?(this.processAction(n,r=>r[o],i),n instanceof oa?this.processRange(n.ranges||[n[s]]):this.processCell(n.cellValueChanges),t.push(n),!0):!1}processAction(e,t,s){for(const o of e.cellValueChanges){const{rowIndex:i,rowPinned:n,columnId:r}=o,a={rowIndex:i,rowPinned:n},l=Qt(this.beans,a);l.displayed&&l.setDataValue(r,t(o),s)}}processRange(e){let t;const s=this.beans.rangeSvc;s.removeAllCellRanges(!0),e.forEach((o,i)=>{if(!o)return;const n=o.startRow,r=o.endRow;i===e.length-1&&(t={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:o.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:o.startColumn,columns:o.columns};s.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:s,rowPinned:o}=t,i={rowIndex:s,rowPinned:o},n=Qt(this.beans,i),r={rowPinned:t.rowPinned,rowIndex:n.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:s,rowPinned:o}=e,{colModel:i,focusSvc:n,rangeSvc:r}=this.beans,a=i.getCol(s);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const c={rowIndex:t,column:a,rowPinned:o};n.setFocusedCell({...c,forceBrowserFocus:!0}),r?.setRangeToCell(c)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new ro(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const s=new ro(this.cellValueChanges);this.pushActionsToUndoStack(s)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new ro(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new oa(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:s}=this.beans;t&&ps(s)?e=new oa(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new ro(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;const s=new ro(t??[]);this.pushActionsToUndoStack(s),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},D5=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",P5={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},T5=class extends nr{constructor(){super(P5,[Il]),this.eEditor=Z}initialiseEditor(e){const t=e.value??void 0,s=this.eEditor;s.setValue(t),s.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(s,{fieldValueChanged:i=>this.setAriaLabel(i.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),s=Jn(t,e),o=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${o} (${s})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,s=this.getValue();return t?t({value:s,internalErrors:null,cellEditorParams:e}):null}},cr=class extends nr{constructor(e){super(),this.cellEditorInput=e,this.eEditor=Z}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:s}=this,{cellStartedEdit:o,eventKey:i,suppressPreventDefault:n}=e;s.getInputElement().setAttribute("title",""),t.init(s,e);let r,a=!0;o?(this.focusAfterAttached=!0,i===D.BACKSPACE||i===D.DELETE?r="":i&&i.length===1?n?a=!1:r=i:(r=t.getStartValue(),i!==D.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),a&&r!=null&&s.setStartValue(r),this.addGuiEventListener("keydown",l=>{const{key:c}=l;(c===D.PAGE_UP||c===D.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;vs()||t.getFocusableElement().focus();const s=t.getInputElement();this.highlightAllOnFocus?s.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),s=e.getInputElement();t.focus(),s.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},M5={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},I5=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return M5}getAgComponents(){return[bg]}init(e,t){this.eEditor=e,this.params=t;const{min:s,max:o,step:i,colDef:n}=t;s!=null&&e.setMin(s),o!=null&&e.setMax(o),i!=null&&e.setStep(i),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:s}=this,{min:o,max:i,getValidationErrors:n}=s;let r=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(o){const l=o instanceof Date?o:new Date(o);if(t<l){const c=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${c}`,[c]))}}if(i){const l=i instanceof Date?i:new Date(i);if(t>l){const c=l.toLocaleDateString();r.push(a("maxDateValidation",`Date must be before ${c}`,[c]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:s,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,s=e.getDate();return!V(s)&&!V(t.value)?t.value:s??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return ht(e,this.includeTime??!1)}},k5=class extends cr{constructor(){super(new I5(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},A5={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},L5=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return A5}getAgComponents(){return[bg]}init(e,t){this.eEditor=e,this.params=t;const{min:s,max:o,step:i,colDef:n}=t;s!=null&&e.setMin(s),o!=null&&e.setMax(o),i!=null&&e.setStep(i),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,s=e.getInputElement().value,o=this.formatDate(this.parseDate(s??void 0)),{min:i,max:n,getValidationErrors:r}=t;let a=[];if(o){const l=new Date(o),c=this.getLocaleTextFunc();if(i){const d=new Date(i);if(l<d){const u=d.toLocaleDateString();a.push(c("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const d=new Date(n);if(l>d){const u=d.toLocaleDateString();a.push(c("maxDateValidation",`Date must be before ${u}`,[u]))}}}return a.length||(a=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,s=this.formatDate(t.getDate());return!V(s)&&!V(e.value)?e.value:e.parseValue(s??"")}getStartValue(){return ht(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):lt(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):ht(e??null,this.includeTime??!1)??void 0}},O5=class extends cr{constructor(){super(new L5(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},N5={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},H5=class extends nr{constructor(){super(N5,[SS]),this.eEditor=Z}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:s,eventKey:o,maxLength:i,cols:n,rows:r}=e;this.focusAfterAttached=s,t.getInputElement().setAttribute("title",""),t.setMaxLength(i||200).setCols(n||60).setRows(r||10);let a;s?(this.focusAfterAttached=!0,o===D.BACKSPACE||o===D.DELETE?a="":o&&o.length===1?a=o:(a=this.getStartValue(e),o!==D.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}onKeyDown(e){const t=e.key;(t===D.LEFT||t===D.UP||t===D.RIGHT||t===D.DOWN||e.shiftKey&&t===D.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:s}=this,o=this.getLocaleTextFunc();e.setInputAriaLabel(o("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),s&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:s}=t,o=e.getValue();return!V(o)&&!V(s)?s:t.parseValue(o)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:s}=e,o=this.getLocaleTextFunc(),i=this.getValue();let n=[];return typeof i=="string"&&t!=null&&i.length>t&&n.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),s?s({value:i,internalErrors:n,cellEditorParams:e}):n}},G5={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},V5=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return G5}getAgComponents(){return[yS]}init(e,t){this.eEditor=e,this.params=t;const{max:s,min:o,precision:i,step:n}=t;s!=null&&e.setMax(s),o!=null&&e.setMin(o),i!=null&&e.setPrecision(i),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:s,getValidationErrors:o}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let a=[];return typeof n=="number"&&(t!=null&&n<t&&a.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),s!=null&&n>s&&a.push(r("maxValueValidation",`Must be less than or equal to ${s}.`,[String(s)]))),a.length||(a=null),o?o({value:n,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===D.UP||e.key===D.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,s=e.getValue();if(!V(s)&&!V(t.value))return t.value;let o=t.parseValue(s);if(o==null)return o;if(typeof o=="string"){if(o==="")return null;o=Number(o)}return isNaN(o)?null:o}getStartValue(){return this.params.value}setCaret(){vs()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},B5=class extends cr{constructor(){super(new V5(()=>this.getLocaleTextFunc()))}},z5={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},W5=class extends nr{constructor(){super(z5,[AS]),this.eEditor=Z,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:s,gos:o}=this,{values:i,value:n,eventKey:r}=e;if(Ie(i)){L(58);return}this.startedByEnter=r!=null?r===D.ENTER:!1;let a=!1;i.forEach(u=>{const h={value:u},g=s.formatValue(e.column,null,u),f=g!=null;h.text=f?g:u,t.addOption(h),a=a||n===u}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:d}=e;l!=null&&t.setPickerGap(l),d!=null&&t.setPickerMaxHeight(d),c!=null&&t.setPickerMaxWidth(c),o.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:s}=e,o=this.getValue();let i=[];if(t&&!t.includes(o)){const n=this.getLocaleTextFunc();i.push(n("invalidSelectionValidation","Invalid selection."))}else i=null;return s?s({value:o,internalErrors:i,cellEditorParams:e}):i}},_5={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},j5=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return _5}getAgComponents(){return[tr]}init(e,t){this.eEditor=e,this.params=t;const s=t.maxLength;s!=null&&e.setMaxLength(s)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:s}=e,o=this.getValue(),i=this.getLocaleTextFunc();let n=[];return t!=null&&typeof o=="string"&&o.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),s?s({value:o,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,s=e.getValue();return!V(s)&&!V(t.value)?t.value:t.parseValue(s)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){vs()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),s=V(t)&&t.length||0;s&&e.getInputElement().setSelectionRange(s,s)}},Xd=class extends cr{constructor(){super(new j5(()=>this.getLocaleTextFunc()))}};function U5(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function $5(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function sf(e,t,s="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,s),"ensureVisible")}function of(e,t,s){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,s),"ensureVisible")}function K5(e,t,s=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,s),"ensureVisible")}function q5(e){e.undoRedo?.undo("api")}function Y5(e){e.undoRedo?.redo("api")}function Z5(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function Q5(e){const t=e.editModelSvc?.getEditMap(),s=[];return t?.forEach((o,i)=>{const{rowIndex:n,rowPinned:r}=i;o.forEach((a,l)=>{const{editorValue:c,pendingValue:d,sourceValue:u,state:h}=a,g=$t(a);let f=c??d;f===yt&&(f=void 0);const m={newValue:f,oldValue:u,state:h,column:l,colId:l.getColId(),colKey:l.getColId(),rowIndex:n,rowPinned:r};(h==="editing"||h==="changed"&&g)&&s.push(m)})}),s}function X5(e,t=!1){const{editSvc:s}=e;if(s?.isBatchEditing()){if(t)for(const o of e.editModelSvc?.getEditPositions()??[])o.state==="editing"&&s.revertSingleCellEdit(o);else Ps(e,{persist:!0});So(e,void 0,{cancel:t})}else s?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function J5(e,t){const s=Me(e,t);return e.editSvc?.isEditing(s)??!1}function e4(e,t){const{key:s,colKey:o,rowIndex:i,rowPinned:n}=t,{editSvc:r,colModel:a}=e,l=a.getCol(o);if(!l){L(12,{colKey:o});return}const d=Qt(e,{rowIndex:i,rowPinned:n||null});if(!d){L(290,{rowIndex:i,rowPinned:n});return}if(!l.isCellEditable(d))return;n==null&&of(e,i),sf(e,o),r?.startEditing({rowNode:d,column:l},{event:s?new KeyboardEvent("keydown",{key:s}):void 0,source:"api"})}function t4(e){return e.editSvc?.validateEdit()||null}function s4(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function o4(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var i4={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},n4=class extends Pl{constructor(e){super(i4),this.params=e}postConstruct(){_s(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,s=o=>{Na(this.gos,o,t.node,t.column,!0)||t.onKeyDown(o)};this.addManagedElementListeners(e,{keydown:s})}};function r4(e,{column:t},s,o,i="ui"){if(s instanceof KeyboardEvent&&(s.key===D.TAB||s.key===D.ENTER||s.key===D.F2||s.key===D.BACKSPACE&&o))return!0;if(s?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const r=t?.getColDef(),a=a4(e.gos,r),l=s?.type;return l==="click"&&s?.detail===1&&a===1||l==="dblclick"&&s?.detail===2&&a===2?!0:i==="api"?o??!1:!1}function a4(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function Za(e,{rowNode:t,column:s},o="ui"){const i=s.getColDef().editable,n=e.editModelSvc;return s.isColumnFunc(t,i)||!!n&&n.hasEdits({rowNode:t,column:s},{withOpenEditor:!0})}function l4(e,t,s="ui"){const o=Za(e,t,s);return o===!0||s==="ui"?o:e.colModel.getCols().some(n=>Za(e,{rowNode:t.rowNode,column:n},s))}var Bn=(e,t=!1)=>{if(e!==void 0)return $t(e)||t&&e.state==="editing"};function nf(e,t,s=!1){return Bn(e.editModelSvc?.getEdit(t),s)}var rf=(e,t,s)=>{if(e)for(let o=0,i=e.length;o<i;++o){const n=e[o];if(n.data&&(Bn(t?.getEdit({rowNode:n,column:s}))||Bn(t?.getEdit({rowNode:n.pinnedSibling,column:s})))||rf(n.childrenAfterGroup,t,s))return!0}};function af(e,t){const{column:s,rowNode:o}=t;return e.gos.get("groupTotalRow")&&!o?.footer?!1:rf(o?.childrenAfterGroup,e.editModelSvc,s)}function lf(e,{rowNode:t,column:s}){if(t=t.pinnedSibling,!!t)return Bn(e.editModelSvc?.getEdit({rowNode:t,column:s}))}var c4=class extends T{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){const{cellCtrl:e,editSvc:t,beans:s}=this;if(t?.isBatchEditing()&&t.isEditing()){const i=nf(s,e)||af(s,e)||lf(s,e);this.applyBatchingStyle(i)}else this.applyBatchingStyle(!1);const o=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",o)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},d4=class extends T{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){const{rowCtrl:e,editModelSvc:t,beans:s}=this;let o=e.rowNode,i=t?.getEditRow(o);const n=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:o});if(!i&&o.pinnedSibling&&(o=o.pinnedSibling,i=t?.getEditRow(o)),i){const r=Array.from(i.keys()).some(a=>{const l={rowNode:o,column:a};return nf(s,l,!0)||af(s,l)||lf(s,l)});this.applyStyle(n,r);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){const s=this.editSvc?.isBatchEditing()??!1,o=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:i})=>{i.toggleCss("ag-row-editing",o&&t),i.toggleCss("ag-row-batch-edit",o&&t&&s),i.toggleCss("ag-row-inline-editing",t),i.toggleCss("ag-row-not-inline-editing",!t),i.toggleCss("ag-row-editing-invalid",o&&t&&e)})}},u4=({rowModel:e,pinnedRowModel:t,editModelSvc:s},o)=>{const i=new Set;e.forEachNode(n=>o.has(n)&&i.add(n)),t?.forEachPinnedRow("top",n=>o.has(n)&&i.add(n)),t?.forEachPinnedRow("bottom",n=>o.has(n)&&i.add(n));for(const n of o)i.has(n)||s.removeEdits({rowNode:n});return i},h4=({editModelSvc:e},t,s)=>{for(const o of t)e?.getEditRow(o)?.forEach((i,n)=>!s.has(n)&&e.removeEdits({rowNode:o,column:n}))},g4=e=>()=>{const t=new Set(e.colModel.getCols()),s=e.editModelSvc.getEditMap(!0),o=new Set(s.keys());h4(e,u4(e,o),t)},p4=new Set(["undo","redo","paste","bulk","rangeSvc"]),f4=new Set(["ui","api"]),cf={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},m4=new Set(Object.keys(cf)),C4=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),qi={cancel:!0,source:"api"},v4={cancel:!1,source:"api"},io={checkSiblings:!0},_o={force:!0,suppressFlash:!0},w4=class extends T{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1,this.stopping=!1,this.committing=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:o})=>{this.stopEditing(void 0,qi),this.createStrategy(o)});const t=g4(e),s=()=>{const o=this.model.getCellValidationModel().getCellValidationMap().size>0,i=this.model.getRowValidationModel().getRowValidationMap().size>0;return o||i?this.stopEditing(void 0,qi):this.isEditing()&&(this.isBatchEditing()?So(e,this.model.getEditPositions()):this.stopEditing(void 0,v4)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:s,filterChanged:s,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,qi)):(this.stopEditing(void 0,qi),this.batch=!1)}createStrategy(e){const{beans:t,gos:s,strategy:o}=this,i=Jd(s,e);if(o){if(o.beanName===i)return o;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(i,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,s,o="ui"){const i=r4(this.beans,e,t,s,o);return i&&(this.strategy??(this.strategy=this.createStrategy())),i}shouldStopEditing(e,t,s="ui"){return this.strategy?.shouldStop(e,t,s)??null}shouldCancelEditing(e,t,s="ui"){return this.strategy?.shouldCancel(e,t,s)??null}validateEdit(){return L3(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??io)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){const{startedEdit:s=!0,event:o=null,source:i="ui",ignoreEventKey:n=!1,silent:r}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const a=Me(this.beans,e);if(a&&!a.comp){a.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=this.shouldStartEditing(e,o,s,i);if(l===!1&&i!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,i)&&!t.continueEditing&&this.stopEditing(void 0,{source:i}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start({position:e,event:o,source:i,ignoreEventKey:n,startedEdit:s,silent:r})}stopEditing(e,t){const{event:s,cancel:o,source:i="ui",forceCancel:n,forceStop:r}=t||{},{beans:a,model:l}=this;if(m4.has(i)&&this.isBatchEditing())return this.bulkRefresh(e),!1;const c=this.committing?cf[i]:i;if(!(this.committing||this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,io))||!this.strategy||this.stopping)return!1;this.stopping=!0;const u=Me(a,e);u&&(u.onEditorAttachedFuncs=[]);let h=l.getEditMap(!0),g=!1;const f=!o&&(!!this.shouldStopEditing(e,s,c)||this.committing&&!this.batch)||(r??!1),m=o&&!!this.shouldCancelEditing(e,s,c)||(n??!1);if(f||m){Ps(a,{persist:!0,isCancelling:m||o,isStopping:f});const v=l.getEditMap(),w=this.processEdits(v,o,i);this.strategy?.stop(o,s);for(const b of w)l.clearEditValue(b);this.bulkRefresh(void 0,h);for(const b of l.getEditPositions(v)){const S=Me(a,b),R=$t(b);S?.refreshCell({force:!0,suppressFlash:!R})}h=v,g||(g=f)}else if(s instanceof KeyboardEvent&&this.batch&&this.strategy?.midBatchInputsAllowed(e)&&this.isEditing(e,{withOpenEditor:!0})){const{key:v}=s,w=v===D.ENTER,b=v===D.ESCAPE,S=v===D.TAB;(w||S||b)&&(w||S?Ps(a,{persist:!0}):b&&this.revertSingleCellEdit(u),this.isBatchEditing()?this.strategy?.cleanupEditors():So(a,l.getEditPositions(),{event:s,cancel:b}),s.preventDefault(),this.bulkRefresh(e,h,{suppressFlash:!0}),h=l.getEditMap())}else Ps(a,{persist:!0}),h=l.getEditMap();return g&&e&&this.model.removeEdits(e),this.navigateAfterEdit(t,u?.cellPosition),ja(a),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),m&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(h.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),g&&f&&this.dispatchBatchEvent("batchEditingStopped",h)),this.stopping=!1,g}navigateAfterEdit(e,t){if(!e||!t)return;const{event:s,suppressNavigateAfterEdit:o}=e;if(!(s instanceof KeyboardEvent)||o)return;const{key:n,shiftKey:r}=s,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(n!==D.ENTER||!a)return;const l=r?D.UP:D.DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}processEdits(e,t=!1,s){const o=Array.from(e.keys()),i=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const r of o){const a=e.get(r);for(const l of a.keys()){const c=a.get(l),d={rowNode:r,column:l},u=$t(c);!t&&u&&!i&&(this.setNodeDataValue(r,l,c.pendingValue,void 0,s)||n.push(d))}}return n}setNodeDataValue(e,t,s,o,i="edit"){const{beans:n}=this,r=Me(n,{rowNode:e,column:t}),a=f4.has(i)?"edit":i;r&&(r.suppressRefreshCell=!0),this.commitNextEdit();const l=e.setDataValue(t,s,a);return r&&(r.suppressRefreshCell=!1),o&&r?.refreshCell(_o),l}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefresh();let s=_o;t?.forceRefreshOfEditCellsOnly&&(s={...b4(e),..._o}),this.beans.rowRenderer.refreshCells(s)}dispatchEditValuesChanged({rowNode:e,column:t},s={}){if(!e||!t||!s)return;const{pendingValue:o,sourceValue:i}=s,{rowIndex:n,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:a,newValue:o,oldValue:i,value:o,colDef:t.getColDef()})}bulkRefresh(e={},t,s={}){const{beans:o,gos:i}=this,{editModelSvc:n,rowModel:r}=o;Ne(i)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),s):t&&n?.getEditMap(!1)?.forEach((a,l)=>{for(const c of a.keys())this.refCell({rowNode:l,column:c},a.get(c),s)}))}refCell({rowNode:e,column:t},s,o={}){const{beans:i,gos:n}=this,r=new Set([e]),a=new Set,l=e.pinnedSibling;l&&r.add(l);const c=e.sibling;c&&a.add(c);let d=e.parent;for(;d;)d.sibling?.footer&&n.get("groupTotalRow")||!d.parent&&d.sibling&&n.get("grandTotalRow")?a.add(d.sibling):a.add(d),d=d.parent;for(const u of r)this.dispatchEditValuesChanged({rowNode:u,column:t},s);for(const u of r)Me(i,{rowNode:u,column:t})?.refreshCell(o);for(const u of a)Me(i,{rowNode:u,column:t})?.refreshCell(o)}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{rowNode:s}=e,{gos:o,beans:i}=this;if(s.group){if(o.get("treeData")){if(!s.data&&!o.get("enableGroupEdit"))return!1}else if(!o.get("enableGroupEdit"))return!1}const n=Jd(o)==="fullRow"?l4(i,e,t):Za(i,e,t);return n&&(this.strategy??(this.strategy=this.createStrategy())),n}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,s=!0){if(this.hasValidationErrors(e)){const o=Me(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),s&&(!o?.hasBrowserFocus()&&o?.focusCell(),o?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(o&&this.revertSingleCellEdit(o),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const s=Me(this.beans,e);s?.comp?.getCellEditor()&&(So(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),To(this.beans,e,{silent:!0}),$s(this.beans),s?.refreshCell(_o),t&&(s?.focusCell(),s?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){$s(this.beans);const t=Me(this.beans,e);t&&(t.refreshCell(_o),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let s=!1;return e?.rowNode?(s||(s=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(s||(s=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(s||(s=this.model.getCellValidationModel().getCellValidationMap().size>0),s||(s=this.model.getRowValidationModel().getRowValidationMap().size>0)),s}moveToNextCell(e,t,s,o="ui"){let i;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,s)==="block-stop";return e instanceof yo&&n&&(i=this.strategy?.moveToNextEditingCell(e,t,s,o,r)),i===null||(i=i||!!this.beans.focusSvc.focusedHeader,i===!1&&!r&&this.stopEditing()),i}getCellDataValue({rowNode:e,column:t},s=!0){if(!e||!t)return;let o=this.model.getEdit({rowNode:e,column:t});const i=e.pinnedSibling;if(i){const r=this.model.getEdit({rowNode:i,column:t});r&&(o=r)}const n=s?o?.editorValue??o?.pendingValue:o?.pendingValue;return n===yt||!o?o?.sourceValue??this.valueSvc.getValue(t,e,!1,"api"):n}addStopEditingWhenGridLosesFocus(e){P3(this,this.beans,e)}createPopupEditorWrapper(e){return new n4(e)}commitNextEdit(){this.committing=!0}setDataValue(e,t,s){try{if((!this.isEditing()||this.committing)&&!C4.has(s))return;const{beans:o}=this;this.strategy??(this.strategy=this.createStrategy());const i=this.isBatchEditing()?"ui":this.committing?s??"api":"api";if(!s||p4.has(s))return un(o,e,t,s,void 0,{persist:!0}),this.setNodeDataValue(e.rowNode,e.column,t,!0,s);const n=this.model.getEdit(e);if(n){if(n.pendingValue===t)return!1;if(n.sourceValue!==t)return un(o,e,t,s,void 0,{persist:!0}),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0;if(n.sourceValue===t)return o.editModelSvc?.removeEdits(e),this.dispatchEditValuesChanged(e,{...n,pendingValue:t}),!0}return un(o,e,t,s,void 0,{persist:!0}),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}handleColDefChanged(e){I3(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,io))return;const{rowNode:o,column:i}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:l}=n;return l.data=this.model.getEditRowDataValue(o,io),{compDetails:n}}const a=this.model.getEditRow(e.rowNode,io);if(r!==void 0&&a?.has(i))return{valueToDisplay:this.valueSvc.getValue(i,o)}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,s,o){this.strategy?.dispatchCellEvent(e,t,s,o)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return X(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},s){if(!s||s.length===0)return;const{beans:o,rangeSvc:i,valueSvc:n}=this;Ps(o,{persist:!0});const r=this.model.getEditMap(!0),a=r.get(e)?.get(t)?.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),s.forEach(c=>{if(i?.forEachRowInRange(c,d=>{const u=Qt(o,d);if(u===void 0)return;const h=r.get(u)??new Map;for(const g of c.columns)if(g&&this.isCellEditable({rowNode:u,column:g},"api")){const f=n.getValue(g,u,!0,"api");let m=n.parseValue(g,u??null,a,f);Number.isNaN(m)&&(m=null),h.set(g,{editorValue:void 0,pendingValue:m,sourceValue:f,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}h.size>0&&r.set(u,h)}),this.setEditMap(r),this.batch){this.cleanupEditors(),ja(o),this.bulkRefresh();return}this.commitNextEdit(),this.stopEditing(void 0,{source:"bulk"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const l=Me(o,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new c4(e,t)}createRowStyleFeature(e,t){return new d4(e,t)}setEditingCells(e,t){const{beans:s}=this,{colModel:o,valueSvc:i}=s,n=new Map;for(let{colId:r,column:a,colKey:l,rowIndex:c,rowPinned:d,newValue:u,state:h}of e){const g=r?o.getCol(r):l?o.getCol(l):a;if(!g)continue;const f=Qt(s,{rowIndex:c,rowPinned:d});if(!f)continue;const m=i.getValue(g,f,!0,"api");if(!t?.forceRefreshOfEditCellsOnly&&!$t({pendingValue:u,sourceValue:m})&&h!=="editing")continue;let v=n.get(f);v||(v=new Map,n.set(f,v)),u===void 0&&(u=yt),v.set(g,{editorValue:void 0,pendingValue:u,sourceValue:m,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(n,t)}onCellFocused(e){const t=Me(this.beans,e);if(!t||!this.isEditing(t,io))return;const s=this.model.getEdit(t);if(!s||!$t(s))return;const i=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(i,"pendingChange")}allowedFocusTargetOnValidation(e){return Me(this.beans,e)}};function b4(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function Jd(e,t){return t??e.get("editType")??"singleCell"}var df=class extends T{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const s=e.previousParams,{editSvc:o,beans:i}=this,n=e.type==="cellFocused"?e.sourceEvent:null;s&&(t=Me(i,s));const{gos:r,editModelSvc:a}=i,l=e.type==="cellFocusCleared";if(o.isEditing(void 0,{withOpenEditor:!0})){const{column:c,rowIndex:d,rowPinned:u}=e,h={column:c,rowNode:Qt(i,{rowIndex:d,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const f=!g,m=!!a?.getCellValidationModel().hasCellValidation(h),v=f&&m;(s||l?o.stopEditing(void 0,{cancel:v,source:l&&f?"api":void 0,event:n}):!0)||(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stop(e,t){const s=this.model.getEditPositions(),o={all:[],pass:[],fail:[]};for(const i of s){if(o.all.push(i),(this.model.getCellValidationModel().getCellValidation(i)?.errorMessages?.length??0)>0){o.fail.push(i);continue}o.pass.push(i)}if(e)for(const i of s)Hn(this.beans,i,{cancel:e}),this.model.stop(i);else{const i=this.processValidationResults(o);if(i.destroy.length>0)for(const n of i.destroy)Hn(this.beans,n,{event:t,cancel:e}),this.model.stop(n);if(i.keep.length>0)for(const n of i.keep){const r=Me(this.beans,n);this.editSvc?.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}}return!0}cleanupEditors({rowNode:e}={},t){Ps(this.beans,{persist:!1});const s=this.model.getEditPositions(),o=[];if(e)for(const i of s)i.rowNode!==e&&o.push(i);else for(const i of s)o.push(i);So(this.beans,o),ja(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,s=t?.getCellEditor();if(s?.focusIn)s.focusIn();else{const o=this.beans.gos.get("editType")==="fullRow";e.focusCell(o),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:s=!1,startedEdit:o,position:i,cells:n=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!s&&t.key||void 0;M3(this.beans,n,i,r,t,o)}dispatchCellEvent(e,t,s,o){const i=Me(this.beans,e);i&&this.eventSvc.dispatchEvent({...i.createEvent(t??null,s),...o})}dispatchRowEvent(e,t,s){if(s)return;const o=Yl(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStop(e,t,s="ui"){const o=this.editSvc.isBatchEditing();return o&&s==="api"?!0:o&&(s==="ui"||s==="edit")?!1:s==="api"?!0:t instanceof KeyboardEvent&&!o?t.key===D.ENTER:null}shouldCancel(e,t,s="ui"){const o=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!o&&t.key===D.ESCAPE||o&&s==="api"||s==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const s=[];if(e.forEach((o,i)=>{o.forEach((n,r)=>{n.state==="editing"&&s.push({...n,rowNode:i,column:r})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),s.length>0){const o=s.at(-1),i=o.pendingValue===yt?void 0:o.pendingValue;this.start({position:o,event:new KeyboardEvent("keydown",{key:i}),source:"api"});const n=Me(this.beans,o);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},S4=class extends df{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,s="ui"){const{rowNode:o}=e||{};if(!Yl(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,s);return n!==null?n:this.rowNode?o!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:s,startedEdit:o,event:i,ignoreEventKey:n}=e,{rowNode:r}=t;this.rowNode!==r&&super.cleanupEditors(t),this.dispatchRowEvent({rowNode:r},"rowEditingStarted",s),this.startedRows.push(r);const a=this.beans.visibleCols.allCols,l=[];for(const c of a){if(!c.isCellEditable(r))continue;const d={rowNode:r,column:c};l.push(d),this.model.hasEdits(d)||this.model.start(d)}this.rowNode=r,this.setupEditors({cells:l,position:t,startedEdit:o,event:i,ignoreEventKey:n})}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){const{rowNode:s}=this;if(s&&!this.model.hasRowEdits(s))return!1;const o=[];if(e||this.model.getEditMap().forEach((i,n)=>{if(!(!i||i.size===0)){for(const r of i.values())if($t(r)){o.push(n);break}}}),$s(this.beans),!e&&this.editSvc?.checkNavWithValidation({rowNode:s})==="block-stop")return!1;super.stop(e,t);for(const i of o)this.dispatchRowEvent({rowNode:i},"rowValueChanged");return this.cleanupEditors({rowNode:s},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,s=e.previousParams;if(s?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const o=Me(this.beans,s);this.gos.get("invalidEditValueMode")==="block"&&o&&(this.model.getCellValidationModel().getCellValidation(o)||this.model.getRowValidationModel().getRowValidation(o))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);for(const s of this.startedRows)this.dispatchRowEvent({rowNode:s},"rowEditingStopped");this.startedRows.length=0}moveToNextEditingCell(e,t,s,o="ui",i=!1){const n=e.cellPosition;let r;this.model.suspend(!0);try{r=this.beans.navigation?.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const a=r.cellPosition,l=e.isCellEditable(),c=r.isCellEditable(),d=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;l&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return c&&!i?u?r.focusCell(!0,s):(r.comp?.getCellEditor()||To(this.beans,r,{event:s,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,s)):(c&&i&&this.setFocusInOnEditor(r),r.focusCell(!0,s)),!d&&!i&&(this.editSvc?.stopEditing({rowNode:e.rowNode},{event:s}),this.cleanupEditors(r,!0),u?r.focusCell(!0,s):this.editSvc.startEditing(r,{startedEdit:!0,event:s,source:o,ignoreEventKey:!0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:s},o)=>{if(s!=="editing")return;const i=Me(this.beans,{rowNode:t,column:o});i&&!i.comp?.getCellEditor()&&To(this.beans,i,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},y4=class extends df{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,s="ui"){const o=super.shouldStop(e,t,s);if(o!==null)return o;const{rowNode:i,column:n}=e||{};return(!this.rowNode||!this.column)&&i&&n?null:this.rowNode!==i||this.column!==n}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:s,event:o,ignoreEventKey:i}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:s,event:o,ignoreEventKey:i})}dispatchRowEvent(e,t,s){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:s}=this.beans,{rowIndex:o,column:i,rowPinned:n}=e,r=Qt(this.beans,{rowIndex:o,rowPinned:n}),a=_a(i),l=t.getCol(a),c=e.previousParams;if(c){const d=_a(c.column);if(c?.rowIndex===o&&d===a&&c?.rowPinned===n)return}s?.isEditing({rowNode:r,column:l},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,s,o="ui",i=!1){const n=this.beans.focusSvc.getFocusedCell();n&&(e=uo(this.beans,n)??e);const r=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),i||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:s}));try{a=this.beans.navigation?.findNextCellToFocusOn(r,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const c=a.cellPosition,d=e.isCellEditable(),u=a.isCellEditable(),h=c&&r.rowIndex===c.rowIndex&&r.rowPinned===c.rowPinned;d&&!i&&this.setFocusOutOnEditor(e);const g=this.gos.get("suppressStartEditOnTab");if(!h&&!i&&(super.cleanupEditors(a,!0),g?a.focusCell(!0,s):this.editSvc.startEditing(a,{startedEdit:!0,event:s,source:o,ignoreEventKey:!0})),u&&!i){if(a.focusCell(!1,s),g)a.focusCell(!0,s);else if(!a.comp?.getCellEditor()){const f=this.editSvc?.isEditing(a,{withOpenEditor:!0});To(this.beans,a,{event:s,cellStartedEdit:!0,silent:f}),this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else u&&i&&this.setFocusInOnEditor(a),a.focusCell(!0,s);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},bs={moduleName:"EditCore",version:G,beans:[D3,w4],apiFunctions:{getEditingCells:Q5,getEditRowValues:Z5,getCellEditorInstances:T3,startEditingCell:e4,stopEditing:X5,isEditing:J5,validateEdit:t4},dynamicBeans:{singleCell:y4,fullRow:S4},dependsOn:[ar,tf],css:[D5]},R4={moduleName:"UndoRedoEdit",version:G,beans:[E5],apiFunctions:{undoCellEditing:q5,redoCellEditing:Y5,getCurrentUndoSize:s4,getCurrentRedoSize:o4},dependsOn:[bs]},x4={moduleName:"TextEditor",version:G,userComponents:{agCellEditor:Xd,agTextCellEditor:Xd},dependsOn:[bs]},F4={moduleName:"NumberEditor",version:G,userComponents:{agNumberCellEditor:{classImp:B5}},dependsOn:[bs]},E4={moduleName:"DateEditor",version:G,userComponents:{agDateCellEditor:k5,agDateStringCellEditor:O5},dependsOn:[bs]},D4={moduleName:"CheckboxEditor",version:G,userComponents:{agCheckboxCellEditor:T5},dependsOn:[bs]},P4={moduleName:"SelectEditor",version:G,userComponents:{agSelectCellEditor:W5},dependsOn:[bs]},T4={moduleName:"LargeTextEditor",version:G,userComponents:{agLargeTextCellEditor:H5},dependsOn:[bs]},M4={moduleName:"CustomEditor",version:G,dependsOn:[bs]},I4=class extends T{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,mo(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),n0(e))}createColumns(e,t){const s=()=>{Pn(this.beans,this.columns?.tree),this.columns=null},o=e.treeDepth,n=(this.columns?.treeDepth??-1)==o,r=this.generateSelectionCols();if(i0(r,this.columns?.list??[])&&n)return;s();const{colGroupSvc:l}=this.beans,c=l?.findDepth(e.tree)??0,d=l?.balanceTreeForAutoCols(r,c)??[];this.columns={list:r,tree:d,treeDepth:c,map:{}},t(h=>{if(!h)return null;const g=h.filter(f=>!ss(f));return[...r,...g]})}updateColumns(e){const t=mo(e.source);for(const s of this.columns?.list??[]){const o=this.createSelectionColDef(e.currentValue);s.setColDef(o,null,t),xt(this.beans,{state:[{...o,colId:s.getColId()}]},t)}}getColumn(e){return this.columns?.list.find(t=>ei(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,s=e.get("rowSelection");if(typeof s!="object"||!ks(e))return!1;const o=(t.autoColSvc?.getColumns()?.length??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&o)return!1;const i=!!fo(s),n=en(s);return i||n}createSelectionColDef(e){const{gos:t}=this,s=e??t.get("selectionColumnDef"),o=t.get("enableRtl"),{rowSpan:i,spanRows:n,...r}=s??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:o?"right":"left",comparator(a,l,c,d){const u=c.isSelected(),h=d.isSelected();return u===h?0:u?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...r,colId:Qh,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const s=new Zs(e,null,t,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(e,t,s){const o=t&&typeof t!="string"?fo(t):void 0,i=e&&typeof e!="string"?fo(e):void 0,n=o!==i,r=t&&typeof t!="string"?en(t):void 0,a=e&&typeof e!="string"?en(e):void 0,l=r!==a,c=xn(e),d=xn(t);(n||l||c!==d)&&this.beans.colModel.refreshAll(s)}destroy(){Pn(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,s){if(!this.columns?.list.length)return;const o=e.length+t.length+s.length;if(o===0)return;const i=this.columns.list[0];if(!i.isVisible())return;const n=()=>{let l;switch(i.pinned){case"left":case!0:l=e;break;case"right":l=s;break;default:l=t}l&&Et(l,i)};(this.beans.rowNumbersSvc?.getColumn(Xh)?2:1)===o&&n()}};function k4(e,t){if(!t.nodes.every(r=>r.rowPinned&&!Ii(r)?(L(59),!1):r.id===void 0?(L(60),!1):!0))return;const{nodes:o,source:i,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:o,source:i??"api",newValue:n})}function A4(e,t,s="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:s,selectAll:t})}function L4(e,t,s="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:s,selectAll:t})}function O4(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function N4(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function H4(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function G4(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function V4(e){return e.selectionSvc?.getSelectedNodes()??[]}function B4(e){return e.selectionSvc?.getSelectedRows()??[]}var z4=class extends cx{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=Fn(e),this.groupSelectsDescendants=mi(e),this.groupSelectsFiltered=Dn(e)==="filteredDescendants",this.masterSelectsDetail=jc(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=mi(e),s=Fn(e),o=Dn(e)==="filteredDescendants";this.masterSelectsDetail=jc(e)==="detail",(t!==this.groupSelectsDescendants||o!==this.groupSelectsFiltered||s!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=o,this.mode=s)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,s){if(this.isRowSelectionBlocked(t))return 0;const o=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,s);if(o==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in o)return o.reset?this.resetNodes():this.selectRange(o.deselect,!1,s),this.selectRange(o.select,!0,s);{const i=o.checkFilteredNodes?hf(o.node):o.newValue;return this.setNodesSelected({nodes:[o.node],newValue:i,clearSelection:o.clearSelection,keepDescendants:o.keepDescendants,event:e,source:s})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:s,nodes:o,event:i,source:n,keepDescendants:r=!1}){if(o.length===0)return 0;const{gos:a}=this;if(!ks(a)&&e)return L(132),0;if(o.length>1&&!this.isMultiSelect())return L(130),0;let l=0;for(let c=0;c<o.length;c++){const d=o[c],u=no(d);if(u.rowPinned&&!Ii(u)){L(59);continue}if(u.id===void 0){L(60);continue}this.groupSelectsFiltered&&u.group&&!a.get("treeData")||this.selectRowNode(u,e,i,n)&&(this.detailSelection.delete(u.id),l++),this.groupSelectsDescendants&&u.childrenAfterGroup?.length&&(l+=this.selectChildren(u,e,n))}return s||(o.length===1&&n==="api"&&this.selectionCtx.setRoot(no(o[0])),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(no(o[0]),r,n)),l>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),l}selectRange(e,t,s){let o=0;return e.forEach(i=>{const n=no(i);if(n.group&&this.groupSelectsDescendants)return;this.selectRowNode(n,t,void 0,s)&&o++}),o>0&&(this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)),o}selectChildren(e,t,s){const o=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return o?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:s,nodes:o}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((s,o)=>{e(s)&&t.set(o,s)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:s,rowModel:o}=this.beans;if(!Ne(s))return!1;const i=o.rootNode;if(!i)return!1;t||(t=new wi(!0,i),t.active=!1);let n=!1;return t.forEachChangedNodeDepthFirst(r=>{if(r!==i){const a=this.calculateSelectedFromChildren(r);n=this.selectRowNode(r,a===null?!1:a,void 0,e)||n}}),n}clearOtherNodes(e,t,s){const o=new Map;let i=0;return this.selectedNodes.forEach(n=>{const r=n.id==e.id;if((t?!_4(e,n):!0)&&!r){const l=this.selectedNodes.get(n.id);i+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:s}),this.groupSelectsDescendants&&n.parent&&o.set(n.parent.id,n.parent)}}),o.forEach(n=>{const r=this.calculateSelectedFromChildren(n);this.selectRowNode(n,r===null?!1:r,void 0,s)}),i}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&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)}createDaemonNode(e){if(!e.id)return;const t=new ms(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!Ne(e))return;const s=t.getTopLevelNodes();if(s===null)return;const o=[];function i(n){for(let r=0,a=n.length;r<a;r++){const l=n[r];l.isSelected()?o.push(l):l.group&&l.childrenAfterGroup&&i(l.childrenAfterGroup)}}return i(s),o}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const s=Ne(this.gos);let o=!1;const i=n=>{const r=this.selectRowNode(no(n),!1,void 0,e);o||(o=r)};if(t==="currentPage"||t==="filtered"){if(!s){be(102);return}this.getNodesToSelect(t).forEach(i)}else this.selectedNodes.forEach(i),this.reset(e);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const n=this.updateGroupsFromChildrenSelections(e);o||(o=n)}o&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,s=0;return this.getNodesToSelect(e).forEach(o=>{this.groupSelectsDescendants&&o.group||(o.isSelected()?t++:o.selectable&&s++)}),{selectedCount:t,notSelectedCount:s}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:s}=this.getSelectedCounts(e);return uf(t,s)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],s=i=>t.push(i);if(e==="currentPage")return this.forEachNodeOnPage(i=>{if(!i.group){s(i);return}if(!i.expanded&&!i.footer){const n=r=>{s(r),r.childrenAfterFilter?.forEach(n)};n(i);return}this.groupSelectsDescendants||s(i)}),t;const o=this.beans.rowModel;return e==="filtered"?(o.forEachNodeAfterFilter(s),t):(o.forEachNode(s),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:s}=this.beans,o=t.getFirstRow(),i=t.getLastRow();for(let n=o;n<=i;n++){const r=s.getRow(n);r&&e(r)}}selectAllRowNodes(e){const{gos:t,selectionCtx:s}=this;if(!ks(t)){L(132);return}if(_b(t)&&!En(t)){L(130);return}if(!this.canSelectAll())return;const{source:o,selectAll:i}=e;let n=!1;if(this.getNodesToSelect(i).forEach(r=>{const a=this.selectRowNode(no(r),!0,void 0,o);n||(n=a)}),s.selectAll=!0,Ne(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(o);n||(n=r)}n&&this.dispatchSelectionChanged(o)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,s){if(e||(e=[]),!Array.isArray(e)){be(103);return}const o=new Set(e),i=[];this.beans.rowModel.forEachNode(n=>{o.has(n.id)&&i.push(n)}),s&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:i,source:t})}canSelectAll(){return Ne(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:s}=this.beans;if(!ks(t))return;const o="selectableChanged",i=e!==void 0,n=Ne(t)&&this.groupSelectsDescendants,r=[],a=l=>{if(i&&!l.group)return;if(n&&l.group){const d=l.childrenAfterGroup?.some(u=>u.selectable)??!1;this.setRowSelectable(l,d,!0);return}!this.updateRowSelectable(l,!0)&&l.isSelected()&&r.push(l)};if(n){if(e===void 0){const l=s.rootNode;e=l?new wi(!1,l):void 0}e?.forEachChangedNodeDepthFirst(a,!i,!i)}else s.forEachNode(a);r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:o}),!i&&n&&this.updateGroupsFromChildrenSelections?.(o)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const s=e.detailNode?.detailGridInfo?.api;if(!s)return;const o=W4(s);if(e.isSelected()!==o&&this.selectRowNode(e,o,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!o){const n=this.detailSelection.get(e.id)??new Set;for(const r of s.getSelectedNodes())n.add(r.id);this.detailSelection.set(e.id,n)}}setDetailSelectionState(e,t,s){if(this.masterSelectsDetail){if(!En(t)){L(269);return}switch(e.isSelected()){case!0:{s.selectAll();break}case!1:{s.deselectAll();break}case void 0:{const o=this.detailSelection.get(e.id);if(o){const i=[];for(const n of o){const r=s.getRowNode(n);r&&i.push(r)}s.setNodesSelected({nodes:i,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function no(e){return Ii(e)?e.pinnedSibling:e.footer?e.sibling:e}function W4(e){let t=0,s=0;return e.forEachNode(o=>{o.isSelected()?t++:o.selectable&&s++}),uf(t,s)}function uf(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function _4(e,t){let s=t.parent;for(;s;){if(s===e)return!0;s=s.parent}return!1}function hf(e){const t=e.isSelected()===!1,s=e.childrenAfterFilter?.some(hf)??!1;return t||s}var j4={moduleName:"SharedRowSelection",version:G,beans:[I4],apiFunctions:{setNodesSelected:k4,selectAll:A4,deselectAll:L4,selectAllFiltered:O4,deselectAllFiltered:N4,selectAllOnCurrentPage:H4,deselectAllOnCurrentPage:G4,getSelectedNodes:V4,getSelectedRows:B4}},U4={moduleName:"RowSelection",version:G,rowModels:["clientSide","infinite","viewport"],beans:[z4],dependsOn:[j4]};function $4(e){e.expansionSvc?.expandAll(!0)}function K4(e){e.expansionSvc?.expandAll(!1)}function gf(e){e.rowModel?.onRowHeightChanged()}function pf(e){if(e.rowAutoHeight?.active){L(3);return}e.rowModel?.resetRowHeights()}function q4(e,t,s){const o=qD(e);if(o){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){be(238);return}o.setRowCount(t,s);return}be(28);return}rr(e)?.setRowCount(t,s)}function Y4(e){return Ys(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function Z4(e){return e.rowModel.isLastRowIndexKnown()}var Q4={moduleName:"CsrmSsrmSharedApi",version:G,apiFunctions:{expandAll:$4,collapseAll:K4}},X4={moduleName:"RowModelSharedApi",version:G,apiFunctions:{onRowHeightChanged:gf,resetRowHeights:pf}},J4={moduleName:"SsrmInfiniteSharedApi",version:G,apiFunctions:{setRowCount:q4,getCacheBlockState:Y4,isLastRowIndexKnown:Z4}},eT=class extends T{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(o=>{if(!o){be(18),t||be(20);return}if(this.isGridApi(o))return o;const i=o;return"current"in i?i.current?.api:(i.api||be(19),i.api)}).filter(o=>!!o&&!o.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const s=[];return e.columns?e.columns.forEach(o=>{s.push(t(o))}):e.column&&s.push(t(e.column)),s}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":L(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const s of e.columnGroups){let o=null;s&&(o=t.getProvidedColGroup(s.getGroupId())),!(s&&!o)&&t.setColumnGroupOpened(o,s.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let s=null;const o=this.beans,{colResize:i,ctrlsSvc:n,colModel:r}=o;if(t&&(s=r.getColDefCol(t.getColId())),t&&!s)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const u=e.api.getColumnState().map(h=>({colId:h.colId}));xt(o,{state:u,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const u=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));xt(o,{state:u},"alignedGridChanged")}break;case"columnPinned":{const u=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));xt(o,{state:u},"alignedGridChanged")}break;case"columnResized":{const d=e,u={};for(const h of a)u[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(const h of d.flexColumns??[])u[h.getId()]&&delete u[h.getId()];i?.setColumnWidths(Object.values(u),!1,d.finished,"alignedGridChanged");break}}const c=n.getGridBodyCtrl().isVerticalScrollShowing();for(const d of this.getAlignedGridApis())d.setGridOption("alwaysShowVerticalScroll",c)}},tT={moduleName:"AlignedGrids",version:G,beans:[eT],dependsOn:[hp]},sT=class extends T{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},eu(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){const{selectionSvc:t,pinnedRowModel:s,groupStage:o}=this.beans;t?.reset("rowDataChanged"),s?.isManual()&&s.reset(),this.dispatchRowDataUpdateStarted(e),this.allNodesMap=Object.create(null),this.nextId=0;const i=eu(this.rootNode),n=new Array(e.length);i._leafs=n;let r=0;const a=o?.getNestedDataGetter(),l=a?new Set:null,c=(d,u)=>{const h=d.level+1;for(let g=0,f=u.length;g<f;++g){const m=u[g];if(!m)continue;const v=this.createRowNode(m,h);if(v.sourceRowIndex=r,n[r++]=v,l&&!l.has(m)){l.add(m),v.treeParent=d;const w=a(m);w&&c(v,w)}}};c(i,e),n.length=r}setImmutableRowData(e,t){const{rootNode:s,gos:o}=this;this.dispatchRowDataUpdateStarted(t);const i=Fo(o),n=e.changedRowNodes,{adds:r,updates:a}=n,l=new Set,c=[],d=this.beans.groupStage?.getNestedDataGetter();let u=o.get("suppressMaintainUnsortedOrder")?void 0:!1,h=-1,g=!1;const f=(w,b)=>{if(!u&&u!==void 0){const S=w.sourceRowIndex;u=S<=h,h=S}w.data!==b&&(w.updateData(b),r.has(w)||a.add(w),!w.selectable&&w.isSelected()&&c.push(w))},m=(w,b,S)=>{for(let R=0,y=b.length;R<y;++R){const x=b[R];if(!x)continue;let F=this.getRowNode(i({data:x,level:S}));if(F?(f(F,x),g||(g=!!d&&F.treeParent!==w)):(F=this.createRowNode(x,S),r.add(F)),!d||l.has(F)){l.add(F);continue}l.add(F),F.treeParent=w;const P=d(x);P&&m(F,P,S+1)}};m(s,t,0);const v=this.deleteUnusedNodes(l,n,c)||u||r.size>0;if(v){const w=s._leafs??(s._leafs=[]);u===void 0?aT(w,l,n):rT(w,l)&&(n.reordered=!0)}(v||g||a.size)&&(e.rowDataUpdated=!0,this.deselect(c))}deleteUnusedNodes(e,{removals:t},s){const o=this.rootNode._leafs;for(let i=0,n=o.length;i<n;i++){const r=o[i];e.has(r)||(t.add(r),r.isSelected()&&s.push(r),this.deleteNode(r))}return t.size>0}updateRowData(e,t){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return L(268),{remove:[],update:[],add:[]};const s=[],o=Fo(this.gos),i=this.executeRemove(o,e,t,s),n=this.executeUpdate(o,e,t,s),r=this.executeAdd(e,t);return this.deselect(s),{remove:i,update:n,add:r}}executeRemove(e,{remove:t},{adds:s,updates:o,removals:i},n){const r=this.rootNode._leafs,a=r?.length,l=t?.length;if(!l||!a)return[];let c=0,d=a,u=0,h;const g=new Array(l);for(let f=0;f<l;++f){const m=this.lookupNode(e,t[f]);if(!m)continue;const v=m.sourceRowIndex;v<d&&(d=v),v>u&&(u=v),m.isSelected()&&n.push(m),this.deleteNode(m),s.delete(m)?(h??(h=new Set),h.add(m)):(o.delete(m),i.add(m)),g[c++]=m}return g.length=c,c&&nT(r,d,u,i,h),g}executeUpdate(e,{update:t},{adds:s,updates:o},i){const n=t?.length;if(!n)return[];const r=new Array(n);let a=0;for(let l=0;l<n;l++){const c=t[l],d=this.lookupNode(e,c);d&&(d.updateData(c),!d.selectable&&d.isSelected()&&i.push(d),r[a++]=d,s.has(d)||o.add(d))}return r.length=a,r}executeAdd(e,t){var s;const o=(s=this.rootNode)._leafs??(s._leafs=[]),i=o.length,n=e.add,r=n?.length;if(!r)return[];const a=i+r;let l=this.sanitizeAddIndex(o,e.addIndex);if(l<i){for(let u=i-1,h=a-1;u>=l;--u){const g=o[u];g.sourceRowIndex=h,o[h--]=g}t.reordered=!0}o.length=a;const c=new Array(r),d=t.adds;for(let u=0;u<r;u++){const h=this.createRowNode(n[u],0);d.add(h),h.sourceRowIndex=l,o[l]=h,c[u]=h,l++}return c}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselect(e){const t="rowDataChanged",s=this.beans.selectionSvc;e.length&&s?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),s?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:s?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t){const s=new ms(this.beans);s.parent=this.rootNode,s.level=t,s.group=!1,s.expanded=!1,s.setDataAndId(e,String(this.nextId++));const o=s.id,i=this.allNodesMap;return i[o]&&L(2,{nodeId:o}),i[o]=s,s}deleteNode(e){e.clearRowTopAndRowIndex();const t=e.id,s=this.allNodesMap;s[t]===e&&delete s[t];const o=e.pinnedSibling;o&&this.beans.pinnedRowModel?.pinRow(o,null)}lookupNode(e,t){if(!e)return iT(this.rootNode._leafs,t);const s=e({data:t,level:0}),o=this.allNodesMap[s];return o||(be(4,{id:s}),null)}sanitizeAddIndex(e,t){const s=e.length;if(typeof t!="number"||t<0||t>=s||Number.isNaN(t))return s;t=Math.ceil(t);const o=this.gos;return t>0&&o.get("treeData")&&o.get("getDataPath")&&(t=oT(e,t)),t}},oT=(e,t)=>{for(let s=0,o=e.length;s<o;s++)if(e[s]?.rowIndex==t-1)return s+1;return t},eu=e=>{e.group=!0,e.level=-1,e.id="ROOT_NODE_ID",e._leafs?.length!==0&&(e._leafs=[]);const t=[],s=[],o=[],i=[];e.childrenAfterGroup=t,e.childrenAfterSort=s,e.childrenAfterAggFilter=o,e.childrenAfterFilter=i;const n=e.sibling;return n&&(n.childrenAfterGroup=t,n.childrenAfterSort=s,n.childrenAfterAggFilter=o,n.childrenAfterFilter=i,n.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},iT=(e,t)=>{if(e)for(let s=0,o=e.length;s<o;s++){const i=e[s];if(i.data===t)return i}return be(5,{data:t}),null},nT=(e,t,s,o,i)=>{t=Math.max(0,t);for(let n=t,r=e.length;n<r;++n){const a=e[n];n<=s&&(o.has(a)||i?.has(a))||(a.sourceRowIndex=t,e[t++]=a)}e.length=t},rT=(e,t)=>{const s=t.size;e.length=s;let o=0,i=!1,n=!1;for(const r of t){const a=r.sourceRowIndex;a===o?n||(n=i):(a>=0?n=!0:i=!0,r.sourceRowIndex=o,e[o]=r),++o}return n},aT=(e,t,{removals:s,adds:o})=>{const i=e.length;e.length=t.size;let n=0;for(let r=0;r<i;++r){const a=e[r];s.has(a)||(n!==r&&(a.sourceRowIndex=n,e[n]=a),++n)}for(const r of o)r.sourceRowIndex<0&&(r.sourceRowIndex=n,e[n++]=r);e.length=n},ff=e=>{const t=e.childrenAfterSort,s=e.sibling;if(s&&(s.childrenAfterSort=t),!!t)for(let o=0,i=t.length-1;o<=i;o++){const n=t[o],r=o===0,a=o===i;n.firstChild!==r&&(n.firstChild=r,n.dispatchRowEvent("firstChildChanged")),n.lastChild!==a&&(n.lastChild=a,n.dispatchRowEvent("lastChildChanged")),n.childIndex!==o&&(n.childIndex=o,n.dispatchRowEvent("childIndexChanged"))}},lT=class extends T{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e){const t=this.beans.sortSvc.getSortOptions(),s=t.length>0&&!!e.changedRowNodes&&this.gos.get("deltaSort");this.sort(t,s,e.changedRowNodes,e.changedPath)}sort(e,t,s,o){const{gos:i,colModel:n,rowGroupColsSvc:r,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:c}=this.beans,d=i.get("groupMaintainOrder"),u=n.getCols().some(b=>b.isRowGroupActive()),h=r?.columns,g=n.isPivotMode(),f=i.getCallback("postSortRows");let m=!1,v;const w=b=>{const S=g&&b.leafGroup;let R=d&&u&&!b.leafGroup;R&&(v??(v=this.shouldSortContainsGroupCols(e)),R&&(R=!v));let y=null;if(R){let x=!1;if(h){const F=b.level+1;F<h.length&&(x=h[F].getSort()===null)}x||(y=uT(b))}else!e.length||S||(t&&s?y=cT(a,b,s,o,e):y=a.doFullSort(b.childrenAfterAggFilter,e));if(y||(y=b.childrenAfterAggFilter?.slice(0)??[]),m||(m=b.childrenAfterSort?.[0]!==y[0]),b.childrenAfterSort=y,ff(b),f){const x={nodes:b.childrenAfterSort};f(x)}};if(o?.forEachChangedNodeDepthFirst(w),m&&i.get("groupHideOpenParents")){const b=c?.getShowRowGroupCols();b?.length&&l.refreshCells({columns:b,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(kt(this.gos)){for(let s=0;s<t;++s){const o=e[s].column;if(o.isPrimary()&&o.isRowGroupActive())return!0}return!1}for(let s=0;s<t;++s)if(e[s].column.getColDef().showRowGroup)return!0;return!1}},cT=(e,t,s,o,i)=>{const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,i);const a=new Set,l=[],{updates:c,adds:d}=s;for(let h=0,g=n.length;h<g;++h){const f=n[h];c.has(f)||d.has(f)||o&&!o.canSkip(f)?l.push({currentPos:l.length,rowNode:f}):a.add(f)}const u=r.filter(h=>a.has(h)).map((h,g)=>({currentPos:g,rowNode:h}));return l.sort((h,g)=>e.compareRowNodes(i,h,g)),dT(e,i,l,u)},dT=(e,t,s,o)=>{let i=0,n=0;const r=s.length,a=o.length,l=new Array(r+a);let c=0;for(;i<r&&n<a;){const d=s[i],u=o[n];e.compareRowNodes(t,d,u)<0?(l[c++]=d.rowNode,++i):(l[c++]=u.rowNode,++n)}for(;i<r;)l[c++]=s[i++].rowNode;for(;n<a;)l[c++]=o[n++].rowNode;return l},uT=e=>{const t=e.childrenAfterSort,s=e.childrenAfterAggFilter,o=t?.length,i=s?.length;if(!o||!i)return null;const n=new Array(i),r=new Set;for(let l=0;l<i;++l)r.add(s[l]);let a=0;for(let l=0;l<o;++l){const c=t[l];r.delete(c)&&(n[a++]=c)}if(r.size===0&&a===o)return t;for(const l of r)n[a++]=l;return n.length=a,n},hT=class extends T{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.rowDataUpdatedPending=!1,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingModel=!1,this.rowNodesCountReady=!1,this.stages=[],this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=Ye(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new ms(e);this.rootNode=t,this.nodeManager=this.createBean(new sT(t));const s=this.refreshModel.bind(this,{step:"group"}),o=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:o,columnRowGroupChanged:s,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:s,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,s=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(o=>!!o);this.stages=s;for(let o=s.length-1;o>=0;--o)for(const i of s[o].refreshProps)t.set(i,o);this.addManagedPropertyListeners([...t.keys()],o=>{const i=o.changeSet?.properties;i&&this.onPropChange(i)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,s,o){let i,n=!1;do{i=!1;const r=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(r,s),c=Math.min(a,o);for(let d=l;d<=c;d++){const u=this.getRow(d);if(u.rowHeightEstimated){const h=gs(this.beans,u);u.setRowHeight(h.height),i=!0,n=!0}}i&&this.setRowTopAndRowIndex()}while(i);return n}onPropChange(e){const{nodeManager:t,gos:s,beans:o}=this,i=o.groupStage;if(!t)return;const n=new Set(e),r=i?.onPropChange(n);let a;n.has("rowData")?a=s.get("rowData"):r&&(a=i?.extractData()),a&&!Array.isArray(a)&&(a=null,L(1));const l={step:"nothing",changedProps:n};a&&(!r&&!this.isEmpty()&&a.length>0&&s.exists("getRowId")&&!s.get("resetRowDataOnUpdate")?(l.keepRenderedRows=!0,l.animate=!s.get("suppressAnimationFrame"),l.changedRowNodes=new ln,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0));const c=l.rowDataUpdated?"group":this.getRefreshedStage(e);c&&(l.step=c,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:s}=this,o=t.length;let i=o;for(let n=0,r=e.length;n<r&&i;++n)i=Math.min(i,s.get(e[n])??i);return i<o?t[i].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:s}=this,o=t.environment.getDefaultRowHeight();let i=0;const n=Ze(this.gos,"normal");for(let r=0,a=s.length;r<a;++r){const l=s[r],c=l.id;if(c!=null&&e?.add(c),l.rowHeight==null){const d=gs(t,l,n,o);l.setRowHeight(d.height,d.estimated)}l.setRowTop(i),l.setRowIndex(r),i+=l.rowHeight}}clearRowTopAndRowIndex(e,t){const s=e.active,o=r=>{r?.id!=null&&!t.has(r.id)&&r.clearRowTopAndRowIndex()},i=r=>{o(r),o(r.detailNode),o(r.sibling);const a=r.childrenAfterGroup;if(!r.hasChildren()||!a)return;const l=r.level==-1;if(!(s&&!l&&!r.expanded))for(let d=0,u=a.length;d<u;++d)i(a[d])},n=this.rootNode;n&&i(n)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const o=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+o}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:s,rowsToDisplay:o}=this;if(!s||!o.length||o[0]===s)return e;const n=s.childrenAfterSort,r=l=>{let c=n[l];if(this.gos.get("groupHideOpenParents"))for(;c.expanded&&c.childrenAfterSort&&c.childrenAfterSort.length>0;)c=c.childrenAfterSort[0];return c.rowIndex},a=t.footerSvc;return a?a?.getTopDisplayIndex(o,e,n,r):r(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:s}=this;if(!t||!s.length||s[0]===t)return e;let i=this.getRow(e);i.footer&&(i=i.sibling);let n=i.parent;for(;n&&n!==t;)i=n,n=i.parent;const r=t.childrenAfterSort?.indexOf(i)??-1;return r>=0?r:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:po(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const o=t.length===0||t.some(i=>i.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:o,keepRenderedRows:!0,animate:po(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:po(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new wi(!1,this.rootNode);return t.active=e,t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:s,rowDataUpdated:o}=e;return!(!t||s||!o||t.removals.size||t.adds.size)}refreshModel(e){const{nodeManager:t,beans:s,eventSvc:o,started:i,refreshingModel:n}=this;if(!t)return;const r=!!e.rowDataUpdated,a=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&r));if(i&&r&&o.dispatchEvent({type:"rowDataUpdated"}),!i||n||s.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)){this.rowDataUpdatedPending||(this.rowDataUpdatedPending=r);return}switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.refreshingModel=!0,s.masterDetailSvc?.refreshModel(e),r&&e.step!=="group"&&s.colFilter?.refreshModel(),e.step){case"group":this.doGrouping(e);case"filter":this.doFilter(a);case"pivot":this.doPivot(a);case"aggregate":this.doAggregate(a);case"filter_aggregates":this.doFilterAggregates(a);case"sort":this.doSort(e.changedRowNodes,a);case"map":this.doRowsToDisplay()}const l=new Set;this.setRowTopAndRowIndex(l),this.clearRowTopAndRowIndex(a,l),this.refreshingModel=!1,o.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let s=!1,o=!1;const i=[],n=mi(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(o)return;if(s&&(r===t||r===e)&&(o=!0,n&&r.group)){mf(i,r);return}if(!s){if(r!==t&&r!==e)return;s=!0,t===e&&(o=!0)}(!r.group||!n)&&i.push(r)}),i}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,s=t.length;if(this.isEmpty()||s===0)return-1;let o=0,i=s-1;if(e<=0)return 0;if(t[i].rowTop<=e)return i;let r=-1,a=-1;for(;;){const l=Math.floor((o+i)/2),c=t[l];if(this.isRowInPixel(c,e)||(c.rowTop<e?o=l+1:c.rowTop>e&&(i=l-1),r===o&&a===i))return l;r=o,a=i}}isRowInPixel(e,t){const s=e.rowTop,o=s+e.rowHeight;return s<=t&&o>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let s=0,o=t.length;s<o;++s)e(t[s],s)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let s=0,o=t.length;s<o;++s)e(t[s],s)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,s=>s.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,s=>s.childrenAfterSort)}forEachPivotNode(e,t,s){const{colModel:o,rowGroupColsSvc:i}=this.beans;if(!o.isPivotMode())return;if(!i?.columns.length){e(this.rootNode,0);return}const n=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,r=>r.leafGroup?null:r[n])}depthFirstSearchRowNodes(e,t=!1,s=n=>n.childrenAfterGroup,o=this.rootNode,i=0){let n=i;if(!o)return n;const r=o===this.rootNode;if(r||e(o,n++),o.hasChildren()&&!o.footer){const a=s(o);if(a){const l=this.beans.footerSvc;n=l?.addTotalRows(n,o,e,t,r,"top")??n;for(const c of a)n=this.depthFirstSearchRowNodes(e,t,s,c,n);return l?.addTotalRows(n,o,e,t,r,"bottom")??n}}return n}doAggregate(e){const t=this.rootNode;t&&this.beans.aggStage?.execute({rowNode:t,changedPath:e})}doFilterAggregates(e){const t=this.rootNode,s=this.beans.filterAggStage;if(s){s.execute({rowNode:t,changedPath:e});return}t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){const s=this.beans.sortStage;if(s){s.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t});return}t.forEachChangedNodeDepthFirst(o=>{o.childrenAfterSort=o.childrenAfterAggFilter.slice(0),ff(o)})}doGrouping(e){const t=this.rootNode,o=this.beans.groupStage?.execute({rowNode:t,changedRowNodes:e.changedRowNodes,changedPath:e.changedPath,afterColumnsChanged:!!e.afterColumnsChanged});if(o===void 0){const i=t._leafs;t.childrenAfterGroup=i,t.updateHasChildren();const n=t.sibling;n&&(n.childrenAfterGroup=i)}(o||e.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute({rowNode:this.rootNode,changedPath:e});return}e.forEachChangedNodeDepthFirst(s=>{s.childrenAfterFilter=s.childrenAfterGroup,Bp(s)},!0)}doPivot(e){this.beans.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){const t=this.nodeManager?.getRowNode(e);return typeof t=="object"?t:typeof e=="string"&&e.indexOf(Aa)===0?this.beans.groupStage?.getNode(e):void 0}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const s=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),s)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:s,asyncTransactions:o}=this;if(!e)return;t.valueCache?.onDataChanged();const i=[],n=[],r=new ln;for(const{rowDataTransaction:a,callback:l}of o??[]){this.rowNodesCountReady=!0;const c=e.updateRowData(a,r);i.push(c),l&&n.push(l.bind(null,c))}this.commitTransactions(r),n.length>0&&setTimeout(()=>{for(let a=0,l=n.length;a<l;a++)n[a]()},0),i.length>0&&s.dispatchEvent({type:"asyncTransactionsFlushed",results:i}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const s=new ln,o=t.updateRowData(e,s);return this.commitTransactions(s),o}commitTransactions(e){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{beans:e,rootNode:t}=this,s=e.flattenStage;if(s){this.rowsToDisplay=s.execute({rowNode:t});return}const o=this.rootNode.childrenAfterSort??[];for(const i of o)i.setUiLevel(0);this.rowsToDisplay=o}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const s=e.sibling;s?.setRowHeight(s.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const s=t.detailNode;s?.setRowHeight(s.rowHeight,!0);const o=t.sibling;o?.setRowHeight(o.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},mf=(e,t)=>{const s=t.childrenAfterGroup;if(s)for(let o=0,i=s.length;o<i;++o){const n=s[o];n.data&&e.push(n),n.group&&mf(e,n)}};function gT(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function pT(e,t){const s=ws(e);s&&((!t||t==="everything")&&(t="group"),s.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function fT(e){return ws(e)?.isEmpty()??!0}function mT(e,t){ws(e)?.forEachLeafNode(t)}function CT(e,t){ws(e)?.forEachNodeAfterFilter(t)}function vT(e,t){ws(e)?.forEachNodeAfterFilterAndSort(t)}function wT(e,t){return e.frameworkOverrides.wrapIncoming(()=>ws(e)?.updateRowData(t))}function bT(e,t,s){e.frameworkOverrides.wrapIncoming(()=>ws(e)?.batchUpdateRowData(t,s))}function ST(e){e.frameworkOverrides.wrapIncoming(()=>ws(e)?.flushAsyncTransactions())}function yT(e){return e.selectionSvc?.getBestCostNodeSelection()}var RT={moduleName:"ClientSideRowModel",version:G,rowModels:["clientSide"],beans:[hT,lT],dependsOn:[Np]},xT={moduleName:"ClientSideRowModelApi",version:G,apiFunctions:{onGroupExpandedOrCollapsed:gT,refreshClientSideRowModel:pT,isRowDataEmpty:fT,forEachLeafNode:mT,forEachNodeAfterFilter:CT,forEachNodeAfterFilterAndSort:vT,applyTransaction:wT,applyTransactionAsync:bT,flushAsyncTransactions:ST,getBestCostNodeSelection:yT,resetRowHeights:pf,onRowHeightChanged:gf},dependsOn:[Q4,X4]},FT=class extends T{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:s,columnKeys:o,skipRowGroups:i,exportRowNumbers:n}=t,r=this.getColumnsToExport({allColumns:s,skipRowGroups:i,columnKeys:o,exportRowNumbers:n});return[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)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,s,o){const i=t.shouldRowBeSkipped||(()=>!1),r=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!r,l=this.colModel.isPivotMode()?o.leafGroup:!o.group,c=!!o.footer,d=o.allChildrenCount===1&&o.childrenAfterGroup?.length===1&&zb(this.gos,o);if(!l&&!c&&(t.skipRowGroups||d||a)||t.onlySelected&&!o.isSelected()||t.skipPinnedTop&&o.rowPinned==="top"||t.skipPinnedBottom&&o.rowPinned==="bottom"||o.stub||o.level===-1&&!l&&!c||i(X(this.gos,{node:o})))return;const g=e.onNewBodyRow(o);if(s.forEach((f,m)=>{g.onColumn(f,m,o)}),t.getCustomContentBelowRow){const f=t.getCustomContentBelowRow(X(this.gos,{node:o}));f&&e.addCustomContent(f)}}appendContent(e){return t=>{const s=e.appendContent;return s&&t.addCustomContent(s),t}}prependContent(e){return t=>{const s=e.prependContent;return s&&t.addCustomContent(s),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return s=>{if(!e.skipColumnGroupHeaders){const o=new lg,{colGroupSvc:i}=this.beans,n=i?i.createColumnGroups({columns:t,idCreator:o,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(n,s,e.processGroupHeaderCallback)}return s}}exportHeaders(e,t){return s=>{if(!e.skipColumnHeaders){const o=s.onNewHeaderRow();t.forEach((i,n)=>{o.onColumn(i,n,void 0)})}return s}}processPinnedTopRows(e,t){return s=>{const o=this.processRow.bind(this,s,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="top").sort((i,n)=>i.rowIndex-n.rowIndex).map(i=>this.pinnedRowModel?.getPinnedTopRow(i.rowIndex)).forEach(o):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",o),s}}processRows(e,t){return s=>{const o=this.rowModel,i=Ne(this.gos),n=Ys(this.gos),r=!i&&e.onlySelected,a=this.processRow.bind(this,s,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(c=>c.rowPinned==null).sort((c,d)=>c.rowIndex-d.rowIndex).map(c=>o.getRow(c.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())i?o.forEachPivotNode(a,!0,l==="filteredAndSorted"):n?o.forEachNodeAfterFilterAndSort(a,!0):o.forEachNode(a);else if(e.onlySelectedAllPages||r){const c=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(c),c.forEach(a)}else l==="all"?o.forEachNode(a):i||n?o.forEachNodeAfterFilterAndSort(a,!0):o.forEachNode(a);return s}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:s}=this.beans;if(!t||!s)return;const o=t.getSortOptions(),i=(n,r)=>n.rowIndex!=null&&r.rowIndex!=null?n.rowIndex-r.rowIndex:n.level===r.level?n.parent?.id===r.parent?.id?s.compareRowNodes(o,{rowNode:n,currentPos:n.rowIndex??-1},{rowNode:r,currentPos:r.rowIndex??-1}):i(n.parent,r.parent):n.level>r.level?i(n.parent,r):i(n,r.parent);e.sort(i)}processPinnedBottomRows(e,t){return s=>{const o=this.processRow.bind(this,s,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="bottom").sort((i,n)=>i.rowIndex-n.rowIndex).map(i=>this.pinnedRowModel?.getPinnedBottomRow(i.rowIndex)).forEach(o):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",o),s}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:s=!1,exportRowNumbers:o=!1,columnKeys:i}=e,{colModel:n,gos:r,visibleCols:a}=this,l=n.isPivotMode(),c=h=>ss(h)?!1:!qt(h)||o;if(i?.length)return n.getColsForKeys(i).filter(c);const d=r.get("treeData");let u=[];return t&&!l?u=n.getCols():u=a.allCols,u=u.filter(h=>c(h)&&(s&&!d?!El(h):!0)),u}recursivelyAddHeaderGroups(e,t,s){const o=[];for(const i of e){const n=i;if(n.getChildren)for(const r of n.getChildren()??[])o.push(r)}e.length>0&&Be(e[0])&&this.doAddHeaderHeader(t,e,s),o&&o.length>0&&this.recursivelyAddHeaderGroups(o,t,s)}doAddHeaderHeader(e,t,s){const o=e.onNewHeaderGroupingRow();let i=0;for(const n of t){const r=n;let a;s?a=s(X(this.gos,{columnGroup:r})):a=this.beans.colNames.getDisplayNameForColumnGroup(r,"header");const c=(r.isExpandable()?r.getLeafColumns():[]).reduce((d,u,h,g)=>{let f=ye(d);return u.getColumnGroupShow()==="open"?(!f||f[1]!=null)&&(f=[h],d.push(f)):f&&f[1]==null&&(f[1]=h-1),h===g.length-1&&f&&f[1]==null&&(f[1]=h),d},[]);o.onColumn(r,a||"",i++,r.getLeafColumns().length-1,c)}}},ET={moduleName:"SharedExport",version:G,beans:[FT]},tu=`\r
|
|
62
|
+
`,DT=class extends tP{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:s}=e;this.suppressQuotes=t,this.columnSeparator=s}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,tu),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((s,o)=>{o!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(s.data.value||""),s.mergeAcross&&this.appendEmptyCells(s.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,s,o){s!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}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,s){t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue(e,t,t,"csv",s);this.result+=this.putInQuotes(o.valueFormatted??o.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():(L(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=tu),this.isFirstLine=!1}},PT=class extends eP{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){L(51);return}const t=this.getMergedParams(e),s=this.getData(t),o=new Blob(["\uFEFF",s],{type:"text/plain"}),i=typeof t.fileName=="function"?t.fileName(X(this.gos,{})):t.fileName;sP(this.getFileName(i),o)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const s=t?Object.assign({},e):this.getMergedParams(e);return this.getData(s)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:s,rowGroupColsSvc:o,valueSvc:i,gos:n}=this,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:u}=e;return new DT({colModel:t,colNames:s,valueSvc:i,gos:n,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:u||",",rowGroupColsSvc:o})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function TT(e,t){return e.csvCreator?.getDataAsCsv(t)}function MT(e,t){e.csvCreator?.exportDataAsCsv(t)}var IT={moduleName:"CsvExport",version:G,beans:[PT],apiFunctions:{getDataAsCsv:TT,exportDataAsCsv:MT},dependsOn:[ET]},kT=class extends T{constructor(e,t,s){super(),this.id=e,this.parentCache=t,this.params=s,this.state="needsLoading",this.version=0,this.startRow=e*s.blockSize,this.endRow=this.startRow+s.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,s){this.successCommon(e,{rowData:t,rowCount:s})}isRequestMostRecentAndLive(e){const t=e===this.version,s=this.isAlive();return t&&s}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:s,beans:o,rowNodes:i}=this;for(let n=0;n<e;n++){const r=s+n,a=new ms(o);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),i.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:s,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:s,pageStatus:o}}}setDataAndId(e,t,s){V(t)?e.setDataAndId(t,s.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Ie(this.params.datasource.getRows)){L(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:s,params:{sortModel:o,filterModel:i},gos:n}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,s),failCallback:this.pageLoadFailed.bind(this,s),sortModel:o,filterModel:i,context:X(n,{}).context}}forEachNode(e,t,s){this.rowNodes.forEach((o,i)=>{this.startRow+i<s&&e(o,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const s=e-this.startRow;return this.rowNodes[s]}processServerResult(e){const{rowNodes:t,beans:s}=this;t.forEach((i,n)=>{const r=e.rowData?e.rowData[n]:void 0;!i.id&&i.alreadyRendered&&r&&(t[n]=new ms(s),t[n].setRowIndex(i.rowIndex),t[n].setRowTop(i.rowTop),t[n].setRowHeight(i.rowHeight),i.clearRowTopAndRowIndex()),this.setDataAndId(t[n],r,this.startRow+n)});const o=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},AT=2,LT=class extends T{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const s=Math.floor(e/this.params.blockSize);let o=this.blocks[s];if(!o){if(t)return;o=this.createBlock(s)}return o.getRow(e)}createBlock(e){const t=this.params,s=this.createBean(new kT(e,this,t));return this.blocks[s.id]=s,this.blockCount++,this.purgeBlocksIfNeeded(s),t.rowNodeBlockLoader.addBlock(s),s}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Ws(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(r=>r!=e),s=(r,a)=>a.lastAccessed-r.lastAccessed;t.sort(s);const o=this.params.maxBlocksInCache>0,i=o?this.params.maxBlocksInCache-1:null,n=AT-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=n,c=o?a>=i:!1;if(l||c){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:s,endRow:o}=e;return t.rowIndex>=s&&t.rowIndex<o}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:s}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,s-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:s,overflowSize:o}=this.params,n=(e.id+1)*s+o;this.rowCount<n&&(this.rowCount=n)}}setRowCount(e,t){this.rowCount=e,V(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const s of this.getBlocksInOrder())s.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(s,o)=>s.id-o.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const s=[];let o=-1,i=!1;const n={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(i&&o+1!==l.id){r=!0;continue}o=l.id,l.forEachNode(c=>{const d=c===e||c===t;(i||d)&&s.push(c),d&&(i=!i)},n,this.rowCount)}return r||i?[]:s}},OT=class extends T{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new ms(e);this.rootNode=t,t.level=-1,this.rowHeight=As(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=As(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!di(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}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?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;Fo(this.gos)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:s,rowNodeBlockLoader:o,eventSvc:i,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:s?.getSortModel()??[],rowNodeBlockLoader:o,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:As(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new LT(this.cacheParams)),i.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(s=>{s.id===e&&(t=s)}),t}forEachNode(e){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),s=this.getRowCount()-1;return t>s?s:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function NT(e){rr(e)?.refreshCache()}function HT(e){rr(e)?.purgeCache()}function GT(e){return rr(e)?.getRowCount()}var VT=class extends T{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=Wb(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Ye(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Et(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Ws(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(s=>s.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const s of t)s.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:s,state:o}=t.getBlockStateJson();e[s]=o}),e}printCacheStatus(){Ws(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},BT={moduleName:"InfiniteRowModelCore",version:G,rowModels:["infinite"],beans:[OT,VT]},zT={moduleName:"InfiniteRowModel",version:G,apiFunctions:{refreshInfiniteCache:NT,purgeInfiniteCache:HT,getInfiniteRowCount:GT},dependsOn:[BT,J4]},WT="↑",_T="↓",jT={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},UT=class extends Le{constructor(){super(jT),this.eValue=Z,this.eDelta=Z,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const s=Math.abs(t),o=e.formatValue(s),i=V(o)?o:s,n=t>=0,r=this.eDelta;n?r.textContent=WT+i:r.textContent=_T+i,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),at(this.eDelta)}refresh(e,t=!1){const{value:s,valueFormatted:o}=e,{eValue:i,lastValue:n,beans:r}=this;if(s===n||(V(o)?i.textContent=o:V(s)?i.textContent=s:at(i),r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=s&&typeof s=="object"&&"toNumber"in s?s.toNumber():s,l=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return n&&i.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=s,!0}},$T=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",KT={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},qT=class extends Le{constructor(){super(KT),this.eCurrent=Z,this.refreshCount=0,this.registerCSS($T)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:s}=this,o=it({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=s.textContent,this.getGui().insertBefore(o,s),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let s=e.value;if(Ie(s)&&(s=""),s===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=s;const o=this.eCurrent;return V(e.valueFormatted)?o.textContent=e.valueFormatted:V(e.value)?o.textContent=s:at(o),!0}},YT=class extends T{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,s=this.beans.gos.get("cellFlashDuration"),o=this.beans.gos.get("cellFadeDuration")){const i=this.animations[t];i.delete(e);const n=Date.now(),r=n+s,a=n+s+o,l={phase:"flash",flashEndTime:r,fadeEndTime:a};i.set(e,l);const c=`ag-cell-${t}`,d=`${c}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(c,!0),u.toggleCss(d,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),s)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const s of Object.keys(this.animations)){const o=this.animations[s],i=`ag-cell-${s}`,n=`${i}-animation`;for(const[r,a]of o){if(!r.isAlive()||!r.comp){o.delete(r);continue}const{phase:l,flashEndTime:c,fadeEndTime:d}=a,u=l==="flash"?c:d;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:f}}=r;switch(l){case"flash":g.toggleCss(i,!1),g.toggleCss(n,!0),f.transition=`background-color ${d-c}ms`,f.transitionDelay=`${c-e}ms`,t=Math.min(d,t??1/0),a.phase="fade";break;case"fade":g.toggleCss(i,!1),g.toggleCss(n,!1),f.removeProperty("transition"),f.removeProperty("transition-delay"),o.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const s=Bx(e.cellPosition);t.cells[s]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function ZT(e,t={}){const{cellFlashSvc:s}=e;s&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))s.flashCell(o,t)})}var QT={moduleName:"HighlightChanges",version:G,beans:[YT],userComponents:{agAnimateShowChangeCellRenderer:UT,agAnimateSlideCellRenderer:qT},apiFunctions:{flashCells:ZT}};function XT(e){return e.stateSvc?.getState()??{}}function JT(e,t,s){return e.stateSvc?.setState(t,s)}function su(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=eM(e)),e.version=G,e}function eM(e){return e.cellSelection=tM(e,"rangeSelection"),e}function tM(e,t){if(e&&typeof e=="object")return e[t]}var sM=class extends T{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Ye(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Ye(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=Ye(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:s}=this.beans;this.isClientSideRowModel=Ne(e);const o=su(e.get("initialState")??{}),i=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;const n=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>n(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&s?.hideColumns("columnState");const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:c})=>{c==="gridInitializing"&&(r(),n(()=>{this.setupStateOnColumnsInitialised(o,!!i),s?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),n(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{l?.(),n(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const s=su(e);delete s.partialColumnState,this.cachedState=s,this.startSuppressEvents();const o="api",i=t?new Set(t):void 0;this.setGridReadyState(s,o,i),this.setColumnsInitialisedState(s,o,!!i,i),this.setRowCountState(s,o,i),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(s,o,i),this.stopSuppressEvents(o)})}setGridReadyState(e,t,s){t==="api"&&!s?.has("sideBar")&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,s,o){this.setColumnState(e,t,s,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const s=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:s("aggregation"),columnMoved:s("columnOrder"),columnPinned:s("columnPinning"),columnResized:s("columnSizing"),columnVisible:s("columnVisibility"),columnPivotChanged:s("pivot"),columnPivotModeChanged:s("pivot"),columnRowGroupChanged:s("rowGroup"),sortChanged:s("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,s){const{filter:o,rowGroupExpansion:i,ssrmRowGroupExpansion:n,rowSelection:r,pagination:a}=e,l=(d,u)=>!s?.has(d)&&(u||t==="api");l("filter",o)&&this.setFilterState(o),l("rowGroupExpansion",i)&&this.setRowGroupExpansionState(n,i,t),l("rowSelection",r)&&this.setRowSelectionState(r,t),l("pagination",a)&&this.setPaginationState(a,t);const c=this.updateCachedState.bind(this);c("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(c("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),c("rowGroupExpansion",void 0)):(c("rowGroupExpansion",this.getRowGroupExpansionState()),c("ssrmRowGroupExpansion",void 0)),c("rowSelection",this.getRowSelectionState()),c("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),s=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},o=()=>t("filter",this.getFilterState()),{gos:i,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:s,columnRowGroupChanged:s,rowDataUpdated:()=>{(i.get("groupDefaultExpanded")!==0||i.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(s)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:o})}setFirstDataRenderedState(e,t,s){const{scroll:o,cellSelection:i,focusedCell:n,columnOrder:r,rowPinning:a}=e,l=(u,h)=>!s?.has(u)&&(h||t==="api");l("focusedCell",n)&&this.setFocusedCellState(n),l("cellSelection",i)&&this.setCellSelectionState(i),l("scroll",o)&&this.setScrollState(o),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!r?.orderedColIds,t);const c=this.updateCachedState.bind(this);c("sideBar",this.getSideBarState()),c("focusedCell",this.getFocusedCellState());const d=this.getRangeSelectionState();c("rangeSelection",d),c("cellSelection",d),c("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),s=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:s,cellFocusCleared:s,cellSelectionChanged:o=>{if(o.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return ZD(Mn(e),e.colModel.isPivotMode())}setColumnState(e,t,s,o){const{sort:i,rowGroup:n,aggregation:r,pivot:a,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:u}=e;let h=!1;const g=(E,I)=>{const O=!o?.has(E)&&!!(I||t==="api");return h||(h=O),O},f={},m=E=>{let I=f[E];return I||(I={colId:E},f[E]=I,I)},v={},w=g("sort",i);w&&i?.sortModel.forEach(({colId:E,sort:I},O)=>{const K=m(E);K.sort=I,K.sortIndex=O}),(w||!s)&&(v.sort=null,v.sortIndex=null);const b=g("rowGroup",n);b&&n?.groupColIds.forEach((E,I)=>{const O=m(E);O.rowGroup=!0,O.rowGroupIndex=I}),(b||!s)&&(v.rowGroup=null,v.rowGroupIndex=null);const S=g("aggregation",r);S&&r?.aggregationModel.forEach(({colId:E,aggFunc:I})=>{m(E).aggFunc=I}),(S||!s)&&(v.aggFunc=null);const R=g("pivot",a);R&&(a?.pivotColIds.forEach((E,I)=>{const O=m(E);O.pivot=!0,O.pivotIndex=I}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(R||!s)&&(v.pivot=null,v.pivotIndex=null);const y=g("columnPinning",l);if(y){for(const E of l?.leftColIds??[])m(E).pinned="left";for(const E of l?.rightColIds??[])m(E).pinned="right"}(y||!s)&&(v.pinned=null);const x=g("columnVisibility",c);if(x)for(const E of c?.hiddenColIds??[])m(E).hide=!0;(x||!s)&&(v.hide=null);const F=g("columnSizing",d);if(F)for(const{colId:E,flex:I,width:O}of d?.columnSizingModel??[]){const K=m(E);K.flex=I??null,K.width=O}(F||!s)&&(v.flex=null);const P=u?.orderedColIds,M=!!P?.length&&!o?.has("columnOrder"),A=M?P.map(E=>m(E)):Object.values(f);(A.length||h)&&(this.columnStates=A,xt(this.beans,{state:A,applyOrder:M,defaultState:v},t))}setColumnPivotState(e,t){const s=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const i=this.beans,{pivotResultCols:n,colGroupSvc:r}=i;if(n?.isPivotResultColsPresent()){if(s){const a=[];for(const l of s)n.getPivotResultCol(l.colId)&&a.push(l);xt(i,{state:a,applyOrder:e},t)}o&&r?.setColumnGroupState(o,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return QD(t)}setColumnGroupState(e,t,s){const o=this.beans.colGroupSvc;if(!o||s?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const i=new Set(e.columnGroup?.openColumnGroupIds),r=o.getColumnGroupState().map(({groupId:a})=>{const l=i.has(a);return l&&i.delete(a),{groupId:a,open:l}});for(const a of i)r.push({groupId:a,open:!0});r.length&&(this.columnGroupStates=r),o.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e?.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const s=e?.getFilterState(),o=e?.getAdvFilterModel()??void 0;return t||o||s?{filterModel:t,columnFilterState:s,advancedFilterModel:o}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:s,columnFilterState:o,advancedFilterModel:i}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(s!==void 0||o!==void 0)&&t?.setFilterState(s??null,o??null,"columnFilter"),i!==void 0&&t?.setAdvFilterModel(i??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:s,type:o,startRow:i,endRow:n,columns:r,startColumn:a}=t;return{id:s,type:o,startRow:i,endRow:n,colIds:r.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:s,colModel:o,visibleCols:i}=this.beans;if(!ps(t)||!s)return;const n=[];for(const r of e?.cellRanges??[]){const a=[];for(const c of r.colIds){const d=o.getCol(c);d&&a.push(d)}if(!a.length)continue;let l=o.getCol(r.startColId);if(!l){const c=i.allCols,d=new Set(a);l=c.find(u=>d.has(u))}n.push({...r,columns:a,startColumn:l})}s.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:s}=e?.getVScrollPosition()??{top:0};return s||t?{top:s,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:s}=e??{top:0,left:0},{frameworkOverrides:o,rowRenderer:i,animationFrameSvc:n,ctrlsSvc:r}=this.beans;o.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(s),r.getScrollFeature()?.setVerticalScrollPosition(t),i.redraw({afterScroll:!0}),n?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:s,rowPinned:o}=e;return{colId:t.getColId(),rowIndex:s,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:s}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:o,rowIndex:i,rowPinned:n}=e;t.setFocusedCell({column:s.getCol(o),rowIndex:i,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const s=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!s&&!o))return{page:s,pageSize:o}}setPaginationState(e,t){const{pagination:s,gos:o}=this.beans;if(!s)return;const{pageSize:i,page:n}=e??{page:0,pageSize:o.get("paginationPageSize")},r=t==="gridInitializing";i&&!o.get("paginationAutoPageSize")&&s.setPageSize(i,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?s.setPage(n):s.goToPage(n))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,s){const o=this.beans.expansionSvc;if(!o)return;const i=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};o.setExpansionState(i,s)}updateColumnState(e){const t=this.getColumnState();let s=!1;const o=this.cachedState;for(const i of Object.keys(t)){const n=t[i];di(n,o[i])||(s=!0)}this.cachedState={...o,...t},s&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const s=this.cachedState[e];this.setCachedStateValue(e,t),di(t,s)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},oM={moduleName:"GridState",version:G,beans:[sM],apiFunctions:{getState:XT,setState:JT}};function iM(e){return e.rowModel.isLastRowIndexKnown()}function nM(e){return e.pagination?.getPageSize()??100}function rM(e){return e.pagination?.getCurrentPage()??0}function aM(e){return e.pagination?.getTotalPages()??1}function lM(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function cM(e){e.pagination?.goToNextPage()}function dM(e){e.pagination?.goToPreviousPage()}function uM(e){e.pagination?.goToFirstPage()}function hM(e){e.pagination?.goToLastPage()}function gM(e,t){e.pagination?.goToPage(t)}var pM=class extends T{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,s=()=>{const o=Math.max(As(t),1),i=Math.floor(e/o);t.pagination.setPageSize(i,"autoCalculated")};this.isBodyRendered?Ye(this,s,50)():(s(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},jo="paginationPageSizeSelector",fM={tag:"span",cls:"ag-paging-page-size"},mM=class extends Le{constructor(){super(fM),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.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(jo,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){at(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(jo)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),s=!t||!e.includes(t);if(s){const i=this.gos.exists("paginationPageSize"),n=this.gos.get(jo)!==!0;L(94,{pageSizeSet:i,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||L(95,{paginationPageSizeOption:t,paginationPageSizeSelector:jo}),e.unshift("")}const o=String(s?"":t);this.selectPageSizeComp?(Cs(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=s}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const s=this.getLocaleTextFunc(),o=s("pageSizeSelectorLabel","Page Size:"),i=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Al).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(i).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(jo);return!Array.isArray(t)||!t?.length?e:[...t].sort((s,o)=>s-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},CM={selector:"AG-PAGE-SIZE-SELECTOR",component:mM},vM=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",wM=class extends ux{constructor(){super(),this.btFirst=Z,this.btPrevious=Z,this.btNext=Z,this.btLast=Z,this.lbRecordCount=Z,this.lbFirstRowOnPage=Z,this.lbLastRowOnPage=Z,this.lbCurrent=Z,this.lbTotal=Z,this.pageSizeComp=Z,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(vM)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[CM]);const{btFirst:t,btPrevious:s,btNext:o,btLast:i}=this;this.activateTabIndex([t,s,o,i]),t.insertAdjacentElement("afterbegin",wt(e?"last":"first",this.beans)),s.insertAdjacentElement("afterbegin",wt(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",wt(e?"previous":"next",this.beans)),i.insertAdjacentElement("afterbegin",wt(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n):TR(this.beans,n),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{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)}]){const{el:t,fn:s}=e;this.addManagedListeners(t,{click:s,keydown:o=>{(o.key===D.ENTER||o.key===D.SPACE)&&(o.preventDefault(),s())}})}PR(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):JD(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),s=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const o=this.isZeroPagesToDisplay(),i=e===s-1;this.nextButtonDisabled=i||o,this.lastButtonDisabled=!t||o||e===s-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){U1(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),s=this.pagination.getMasterRowCount(),o=e?s:null,i=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=n*i+1,a=r+n-1,e&&a>o&&(a=o));const l=r+n-1,c=!e&&s<l,d=this.formatNumber(r);this.lbFirstRowOnPage.textContent=d;let u;const h=this.getLocaleTextFunc();c?u=h("pageLastRowUnknown","?"):u=this.formatNumber(a),this.lbLastRowOnPage.textContent=u;const f=t>0?i+1:0,m=this.formatNumber(f);this.lbCurrent.textContent=m;let v,w;if(e)v=this.formatNumber(t),w=this.formatNumber(o);else{const b=h("more","more");v=b,w=b}this.lbTotal.textContent=v,this.lbRecordCount.textContent=w,this.announceAriaStatus(d,u,w,m,v)}announceAriaStatus(e,t,s,o,i){const n=this.getLocaleTextFunc(),r=n("page","Page"),a=n("to","to"),l=n("of","of"),c=`${e} ${a} ${t} ${l} ${s}`,d=`${r} ${o} ${l} ${i}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,this.ariaAnnounce?.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnounce?.announceValue(d,"paginationPage"))}},bM={selector:"AG-PAGINATION",component:wM},SM=class extends T{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return bM}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:s}=this.beans;s?.isEditing()&&(s.isBatchEditing()?s.cleanupEditors():s.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.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 V(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:V(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:V(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:V(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const s=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}s!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const s=this.pageSize,o=t-1;this.totalPages=Math.floor(o/s)+1,this.adjustCurrentPageIfInvalid();const i=this.currentPage,n=s*i;let r=s*(i+1)-1;if(r>o&&(r=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:s}=this,o=e-1;this.totalPages=Math.floor(o/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*s,this.bottomDisplayedRowIndex=t*(s+1)-1,this.bottomDisplayedRowIndex>o&&(this.bottomDisplayedRowIndex=o)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:s=!1,newPageSize:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:s,newPageSize:o,keepRenderedRows:t})}},yM={moduleName:"Pagination",version:G,beans:[SM,pM],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:iM,paginationGetPageSize:nM,paginationGetCurrentPage:rM,paginationGetTotalPages:aM,paginationGetRowCount:lM,paginationGoToNextPage:cM,paginationGoToPreviousPage:dM,paginationGoToFirstPage:uM,paginationGoToLastPage:hM,paginationGoToPage:gM},dependsOn:[ar]};function RM(e,t={}){const s=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(s))}function Cf(e,t,s,o,i){t&&(o&&t.parent&&t.parent.level!==-1&&Cf(e,t.parent,s,o,i),t.setExpanded(s,void 0,i))}function xM(e,t){return e.rowModel.getRowNode(t)}function FM(e,t,s,o){e.rowRenderer.addRenderedRowListener(t,s,o)}function EM(e){return e.rowRenderer.getRenderedNodes()}function DM(e,t,s){e.rowModel.forEachNode(t,s)}function PM(e){return e.rowRenderer.firstRenderedRow}function TM(e){return e.rowRenderer.lastRenderedRow}function MM(e,t){return e.rowModel.getRow(t)}function IM(e){return e.rowModel.getRowCount()}var kM={moduleName:"RowApi",version:G,apiFunctions:{redrawRows:RM,setRowNodeExpanded:Cf,getRowNode:xM,addRenderedRowListener:FM,getRenderedNodes:EM,forEachNode:DM,getFirstDisplayedRowIndex:PM,getLastDisplayedRowIndex:TM,getDisplayedRowAtIndex:MM,getDisplayedRowCount:IM}},AM={moduleName:"ScrollApi",version:G,apiFunctions:{getVerticalPixelRange:U5,getHorizontalPixelRange:$5,ensureColumnVisible:sf,ensureIndexVisible:of,ensureNodeVisible:K5}};function LM(e,t,s){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridBody,i=`aria-${t}`;s===null?o.removeAttribute(i):o.setAttribute(i,s)}function OM(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function NM(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function HM(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function GM(e){e.animationFrameSvc?.flushAllFrames()}function VM(e){return{rowHeight:As(e),headerHeight:Mi(e)}}function BM(e,t={}){const s=[];for(const n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const r=n.getCellRenderer();r!=null&&s.push(Ci(r))}if(t.columns?.length)return s;const o=[],i=Ua(t.rowNodes);for(const n of e.rowRenderer.getAllRowCtrls()){if(i&&!$a(n.rowNode,i)||!n.isFullWidth())continue;const r=n.getFullWidthCellRenderers();for(let a=0;a<r.length;a++){const l=r[a];l!=null&&o.push(Ci(l))}}return[...o,...s]}var zM={moduleName:"RenderApi",version:G,apiFunctions:{setGridAriaProperty:LM,refreshCells:OM,refreshHeader:NM,isAnimationFrameQueueEmpty:HM,flushAllAnimationFrames:GM,getSizesForCurrentTheme:VM,getCellRendererInstances:BM}};function WM(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function vf({colAutosize:e,visibleCols:t},s,o){Array.isArray(s)?e?.autoSizeCols({colKeys:s,skipHeader:o,source:"api"}):e?.autoSizeCols({...s,colKeys:s.colIds??t.allCols,source:"api"})}function _M(e,t){t&&typeof t=="object"?vf(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}var jM=class extends T{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let s=!1;const o=t.type;if(o==="fitGridWidth"||o==="fitProvidedWidth")s=!0;else if(o==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const i=e.get("rowData");s=i!=null&&i.length>0&&Ne(e)}s&&this.beans.colDelayRenderSvc?.hideColumns(o)}}autoSizeCols(e){const{eventSvc:t,visibleCols:s}=this.beans;this.innerAutoSizeCols(e).then(o=>{const i=c=>Eo(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return i(o);const n=ou(this.beans),r=c=>s.leftCols.some(d=>ei(d,c)),a=c=>s.rightCols.some(d=>ei(d,c)),l=e.colKeys.filter(c=>!ss(c)&&!qt(c)&&!r(c)&&!a(c));this.sizeColumnsToFit(n,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(c=>({...c,key:c.colId})),colKeys:l,onlyScaleUp:!0}),i(o)})}innerAutoSizeCols(e){return new Promise((t,s)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,s));const{colKeys:o,skipHeader:i,skipHeaderGroups:n,stopAtGroup:r,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:c=[],source:d="api"}=e,{animationFrameSvc:u,renderStatus:h,colModel:g,autoWidthCalc:f,visibleCols:m}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,s)});return}this.timesDelayed=0;const v=new Set;let w=-1;const b=Object.fromEntries(c.map(({colId:y,...x})=>[y,x])),S=i??this.gos.get("skipHeaderOnAutoSize"),R=n??S;for(;w!==0;){w=0;const y=[];for(const x of o){if(!x||o0(x))continue;const F=g.getCol(x);if(!F||v.has(F))continue;const P=f.getPreferredWidthForColumn(F,S);if(P>0){const M=b[F.colId]??{};M.minWidth??(M.minWidth=l),M.maxWidth??(M.maxWidth=a);const A=UM(F,P,M);F.setActualWidth(A,d),v.add(F),w++}y.push(F)}y.length&&m.refresh(d)}R||this.autoSizeColumnGroupsByColumns(o,d,r),t(v)})}autoSizeColumn(e,t,s){this.autoSizeCols({colKeys:[e],skipHeader:s,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,s){const{colModel:o,ctrlsSvc:i}=this.beans,n=new Set,r=o.getColsForKeys(e);for(const l of r){let c=l.getParent();for(;c&&c!=s;)c.isPadding()||n.add(c),c=c.getParent()}let a;for(const l of n){for(const c of i.getHeaderRowContainerCtrls())if(a=c.getHeaderCtrlForColumn(l),a)break;a?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const s=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",s)};e.addEventListener("dblclick",o);const i=new Rs(e);return i.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),i.destroy()}}addColumnGroupResize(e,t,s){const o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{const n=[],r=t.getDisplayedLeafColumns();for(const a of r)a.getColDef().suppressAutoSize||n.push(a.getColId());n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),s()};return e.addEventListener("dblclick",i),()=>e.removeEventListener("dblclick",i)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const s=ou(this.beans);if(s>0){this.sizeColumnsToFit(s,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):L(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",s,o){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,s,o));return}const i={};for(const{key:f,...m}of o?.columnLimits??[])i[typeof f=="string"?f:f.getColId()]=m;const n=this.beans.visibleCols.allCols;if(e<=0||!n.length)return;const r=jt(n);if(o?.onlyScaleUp&&r>e||e===r&&n.every(m=>{if(m.colDef.suppressSizeToFit)return!0;const v=i?.[m.getId()],w=v?.minWidth??o?.defaultMinWidth,b=v?.maxWidth??o?.defaultMaxWidth,S=m.getActualWidth();return(w==null||S>=w)&&(b==null||S<=b)}))return;const l=[],c=[];for(const f of n){const m=o?.colKeys?.some(v=>ei(f,v))??!0;f.getColDef().suppressSizeToFit||!m?c.push(f):l.push(f)}const d=l.slice(0);let u=!1;const h=f=>{Et(l,f),c.push(f)};for(const f of l){f.resetActualWidth(t);const m=i?.[f.getId()],v=m?.minWidth??o?.defaultMinWidth,w=m?.maxWidth??o?.defaultMaxWidth,b=f.getActualWidth();typeof v=="number"&&b<v?f.setActualWidth(v,t,!0):typeof w=="number"&&b>w&&f.setActualWidth(w,t,!0)}for(;!u;){u=!0;const f=e-jt(c);if(f<=0)for(const m of l){const v=i?.[m.getId()]?.minWidth??o?.defaultMinWidth??m.minWidth;m.setActualWidth(v,t,!0)}else{const m=f/jt(l);let v=f;for(let w=l.length-1;w>=0;w--){const b=l[w],S=i?.[b.getId()],R=S?.minWidth??o?.defaultMinWidth,y=S?.maxWidth??o?.defaultMaxWidth,x=b.getMinWidth(),F=b.getMaxWidth(),P=typeof R=="number"&&R>x?R:x,M=typeof y=="number"&&y<F?y:F;let A=Math.round(b.getActualWidth()*m);A<P?(A=P,h(b),u=!1):A>M?(A=M,h(b),u=!1):w===0&&(A=v),b.setActualWidth(A,t,!0),v-=A}}}for(const f of d)f.fireColumnWidthChangedEvent(t);const g=this.beans.visibleCols;g.setLeftValues(t),g.updateBodyWidths(),!s&&Eo(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,s=e.get("autoSizeStrategy");s?.type!=="fitGridWidth"&&s?.type!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const o=s.type;if(o==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:n,defaultMaxWidth:r}=s,a=i?.map(({colId:l,minWidth:c,maxWidth:d})=>({key:l,minWidth:c,maxWidth:d}));this.sizeColumnsToFitGridBody({defaultMinWidth:n,defaultMaxWidth:r,columnLimits:a})}else o==="fitProvidedWidth"&&this.sizeColumnsToFit(s.width,"sizeColumnsToFit");t?.revealColumns(o)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;const s="autosizeColumns";e?this.autoSizeCols({...t,source:s,colKeys:e}):this.autoSizeAllColumns({...t,source:s}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function UM(e,t,s={}){const o=s.minWidth??e.getMinWidth();t<o&&(t=o);const i=s.maxWidth??e.getMaxWidth();return t>i&&(t=i),t}function ou({ctrlsSvc:e,scrollVisibleSvc:t}){const s=e.getGridBodyCtrl(),i=s.isVerticalScrollShowing()?t.getScrollbarWidth():0;return gi(s.eGridBody)-i}var $M={moduleName:"ColumnAutoSize",version:G,beans:[jM],apiFunctions:{sizeColumnsToFit:WM,autoSizeColumns:vf,autoSizeAllColumns:_M},dependsOn:[up]},KM=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function qM(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function YM(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function ZM(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function QM(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function XM(e,t,s){return e.pinnedRowModel?.forEachPinnedRow(t,s)}var JM={moduleName:"PinnedRow",version:G,beans:[ix],css:[KM],apiFunctions:{getPinnedTopRowCount:qM,getPinnedBottomRowCount:YM,getPinnedTopRow:ZM,getPinnedBottomRow:QM,forEachPinnedRow:XM},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},e6=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(const s of this.spannedNodes)s!==this.lastNode&&(t+=s.rowHeight);return e-t}},t6=class extends T{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:s,pinnedRowModel:o,rowModel:i,valueSvc:n,pagination:r}}=this,{colDef:a}=t,l=this.getNodeMap(e),c=new Map,d=s.getCallback("isFullWidthRow"),u=a.equals,h=a.spanRows,g=typeof h=="function";let f=null,m=null,v;const w=(S,R)=>{f=S,m=null,v=R},b=S=>{const R=!S.isExpandable()&&!S.group&&!S.detail&&(d?!d({rowNode:S}):!0);if(S.rowIndex==null||!R){w(null,null);return}if(f==null||S.level!==f.level||S.footer||m&&S.rowIndex-1!==m?.getLastNode().rowIndex){w(S,n.getValue(t,S));return}const y=n.getValue(t,S);if(g){const x=X(s,{valueA:v,nodeA:f,valueB:y,nodeB:S,column:t,colDef:a});if(!h(x)){w(S,y);return}}else if(u?!u(v,y):v!==y){w(S,y);return}if(!m){const x=l?.get(f);x?.firstNode===f?(x.reset(),m=x):m=new e6(t,f),c.set(f,m)}m.addSpannedNode(S),c.set(S,m)};switch(e){case"center":i.forEachDisplayedNode?.(S=>{(!r||r.isRowInPage(S.rowIndex))&&b(S)}),this.centerValueNodeMap=c;break;case"top":o?.forEachPinnedRow("top",b),this.topValueNodeMap=c;break;case"bottom":o?.forEachPinnedRow("bottom",b),this.bottomValueNodeMap=c;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},s6=class extends T{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=Ye(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=Ye(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const s=this.createManagedBean(new t6(e));this.spanningColumns.set(e,s),s.buildCache("top"),s.buildCache("bottom"),s.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const s=this.spanningColumns.get(e);return s?s.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:s}=this.beans,o=e.column,i=e.rowIndex,n=this.spanningColumns.get(o);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(i);break;case"bottom":r=t?.getPinnedBottomRow(i);break;default:r=s.getRow(i)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const s=this.spanningColumns.get(e);if(s)return s.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[s,o]of this.spanningColumns)if(o.isCellSpanning(e)){const i=o.getCellSpan(e);t(s,i)}}destroy(){super.destroy(),this.spanningColumns.clear()}},o6=class extends yo{constructor(e,t,s){super(e.col,e.firstNode,s,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,s,o,i,n,r){this.eWrapper=s,super.setComp(e,t,s,o,i,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||vh(e,t.rowIndex)}setAriaRowSpan(){Y1(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(ir(t)){this.focusedCellPosition=void 0;return}const s=this.isCellFocused();s||(this.focusedCellPosition=void 0),e&&s&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},i6=class extends Gn{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new o6(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},n6=class extends T{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,s=this.getCtrlsMap(e),o=s.size,i=this.getAllRelevantRowControls(e),n=new Map;let r=!1;for(const l of i)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(c,d)=>{if(n.has(d.firstNode))return;const u=s.get(d.firstNode);if(u){n.set(d.firstNode,u),s.delete(d.firstNode);return}r=!0;const h=new i6(d.firstNode,this.beans,!1,!1,!1);n.set(d.firstNode,h)});this.setCtrlsMap(e,n);const a=n.size===o;if(!(!r&&a)){for(const l of s.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,s=t?.getCellSpanByPosition(e);if(!s)return;const o=this.getCtrlsMap(e.rowPinned).get(s.firstNode);if(o)return o.getAllCellCtrls().find(i=>i.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},r6={moduleName:"CellSpan",version:G,beans:[s6,n6]},a6=class extends T{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,s=e.colDef,o=s.cellClassRules,i=this.getCellClassParams(e,s);Ql(this.beans.expressionSvc,o===this.cellClassRules?void 0:this.cellClassRules,o,i,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=o}applyUserStyles(){const e=this.column,t=e.colDef,s=t.cellStyle;if(!s)return;let o;if(typeof s=="function"){const i=this.getCellClassParams(e,t);o=s(i)}else o=s;o&&this.cellComp.setUserStyles(o)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,s=e.colDef,o=this.getCellClassParams(e,s);for(const n of this.staticClasses)t.toggleCss(n,!1);const i=this.beans.cellStyles.getStaticCellClasses(s,o);this.staticClasses=i;for(const n of i)t.toggleCss(n,!0)}getCellClassParams(e,t){const{value:s,rowNode:o}=this.cellCtrl;return X(this.beans.gos,{value:s,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},l6=class extends T{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,s,o){Ql(this.beans.expressionSvc,void 0,e.cellClassRules,t,s,o),this.processStaticCellClasses(e,t,s)}getStaticCellClasses(e,t){const{cellClass:s}=e;if(!s)return[];let o;return typeof s=="function"?o=s(t):o=s,typeof o=="string"&&(o=[o]),o||[]}createCellCustomStyleFeature(e,t){return new a6(e,t)}processStaticCellClasses(e,t,s){this.getStaticCellClasses(e,t).forEach(i=>{s(i)})}},c6={moduleName:"CellStyle",version:G,beans:[l6]},d6={moduleName:"RowStyle",version:G,beans:[Y3]};function u6(e,t){return!!e.colHover?.isHovered(t)}var h6=class extends T{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=s=>{const{beans:o,gos:i,element:n,columns:r}=this,a=o.colHover;if(s??!!i.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:a.setMouseOver.bind(a,r),mouseout:a.clearMouseOver.bind(a)});else{for(const c of this.destroyManagedListeners)c();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},g6="ag-column-hover",p6=class extends T{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,s){const o=()=>{const i=this.isHovered(s);t.toggleCss("ag-column-hover",i)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const s=this.isHovered(e);t.toggleCss(g6,s)}addHeaderFilterColumnHoverListener(e,t,s,o){this.createHoverFeature(e,[s],o);const i=()=>{const n=this.isHovered(s);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:i}),i()}createHoverFeature(e,t,s){e.createManagedBean(new h6(t,s))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},f6={moduleName:"ColumnHover",version:G,beans:[p6],apiFunctions:{isColumnHovered:u6}},m6=class extends T{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const s=this.wrapSvc?.wrap(e,t)??t,o=!dn.has(e),i=o?this.asyncListeners:this.syncListeners;i.has(e)||i.set(e,new Set),i.get(e).add(s),this.eventSvc.addListener(e,s,o)}removeListener(e,t){const s=this.wrapSvc?.unwrap(e,t)??t,i=!!this.asyncListeners.get(e)?.delete(s);i||this.syncListeners.get(e)?.delete(s),this.eventSvc.removeListener(e,s,i)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,s=(n,r)=>{dn.has(n)&&t(n,r)},o=(n,r)=>{dn.has(n)||t(n,r)};this.globalListenerPairs.set(e,{syncListener:s,asyncListener:o});const i=this.eventSvc;i.addGlobalListener(s,!1),i.addGlobalListener(o,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:s,globalListenerPairs:o}=this,i=s?.unwrapGlobal(e)??e;if(o.has(i)){const{syncListener:r,asyncListener:a}=o.get(i);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),o.delete(e)}else this.syncGlobalListeners.delete(i),t.removeGlobalListener(i,!1)}destroyEventListeners(e,t){e.forEach((s,o)=>{s.forEach(i=>this.eventSvc.removeListener(o,i,t)),s.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const s of e)this.eventSvc.removeGlobalListener(s,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:s,asyncListener:o})=>{t.removeGlobalListener(s,!1),t.removeGlobalListener(o,!0)}),e.clear()}};function C6(e,t,s){e.apiEventSvc?.addListener(t,s)}function v6(e,t,s){e.apiEventSvc?.removeListener(t,s)}function w6(e,t){e.apiEventSvc?.addGlobalListener(t)}function b6(e,t){e.apiEventSvc?.removeGlobalListener(t)}var S6={moduleName:"EventApi",version:G,apiFunctions:{addEventListener:C6,addGlobalListener:w6,removeEventListener:v6,removeGlobalListener:b6},beans:[m6]},y6={moduleName:"Locale",version:G,beans:[YD]},R6=class extends T{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=Ye(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:s,pinnedRowModel:o}=this.beans,i=e.autoHeightCols;let n=!1;const r=a=>{const l=a.__autoHeights;let c=gs(this.beans,a).height;for(const d of i){let u=l?.[d.getColId()];const h=s?.getCellSpan(d,a);if(h){if(h.getLastNode()!==a)continue;if(u=s?.getCellSpan(d,a)?.getLastNodeAutoHeight(),!u)return}if(u==null){if(this.colSpanSkipCell(d,a))continue;return}c=Math.max(u,c)}c!==a.rowHeight&&(a.setRowHeight(c),n=!0)};o?.forEachPinnedRow?.("top",r),o?.forEachPinnedRow?.("bottom",r),t.forEachDisplayedNode?.(r),n&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,s){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[s.getId()];return}const o=e.__autoHeights[s.getId()];e.__autoHeights[s.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:s,colViewport:o,visibleCols:i}=this.beans;if(!s.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=i.getLeftColsForRow(t);break;case"right":n=i.getRightColsForRow(t);break;case null:n=o.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,s){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const o=t.parentElement,{rowNode:i,column:n}=e,r=this.beans,a=d=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!s.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:f}=qs(o),m=u+h+g+f,w=t.offsetHeight+m;if(d<5){const S=!$e(r)?.contains(t),R=w==0;if(S||R){window.setTimeout(()=>a(d+1),0);return}}this.setRowAutoHeight(i,w,n)},l=()=>a(0);l();const c=es(r,t,l);return s.addDestroyFunc(()=>{c(),this.setRowAutoHeight(i,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:s}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(s).filter(i=>i.isAutoHeight())),t.length!==0){if(!s.__autoHeights)return!1;for(const o of t){const i=s.__autoHeights[o.getColId()];if(!i||s.rowHeight<i)return!1}}return!0}},x6={moduleName:"RowAutoHeight",version:G,beans:[R6]},F6={moduleName:"AllCommunity",version:G,dependsOn:[RT,IT,zT,pP,x4,F4,E4,D4,P4,T4,M4,R4,m5,C5,v5,f5,b5,S5,oM,tT,yM,hp,kM,AM,zM,$M,s2,JM,U4,ID,c6,f6,d6,S6,LD,QT,tf,y6,x6,t2,xT,r6]},Je=p.createContext({}),wf=p.createContext("default"),ki=(e,t,s,o)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const n=e.newAgStackInstance();let r,a,l=!1;return n.then(c=>{if(l){t.destroyBean(c);return}r=c,a=r.getGui(),s.appendChild(a),iu(o,r)}),()=>{l=!0,r&&(a?.remove(),t.destroyBean(r),o&&iu(o,void 0))}},iu=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const s=e;s.current=t}},mt=(...e)=>e.filter(s=>s!=null&&s!=="").join(" "),bt=class bf{constructor(...t){this.classesMap={};for(const s of t)this.classesMap[s]=!0}setClass(t,s){if(!!this.classesMap[t]==s)return this;const i=new bf;return i.classesMap={...this.classesMap},i.classesMap[t]=s,i}toString(){return Object.keys(this.classesMap).filter(s=>this.classesMap[s]).join(" ")}},No=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,s=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===s()},Qa=p.version?.split(".")[0],Sf=Qa==="16"||Qa==="17";function E6(){return Qa==="19"}var hn=!1;function D6(e){return hn||setTimeout(()=>hn=!1,0),hn=!0,e()}var yi=(e,t)=>{!Sf&&e&&!hn?_n.flushSync(t):t()},P6=e=>{Sf?e():p.startTransition(e)};function T6(e,t,s){return p.useSyncExternalStore?p.useSyncExternalStore(e,t):s}function zn(e,t,s){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(s||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const o=[],i=[],n=new Map,r=new Map;for(let a=0;a<t.length;a++){const l=t[a];r.set(l.instanceId,l)}for(let a=0;a<e.length;a++){const l=e[a];n.set(l.instanceId,l),r.has(l.instanceId)&&o.push(l)}for(let a=0;a<t.length;a++){const l=t[a],c=l.instanceId;n.has(c)||i.push(l)}return o.length===e.length&&i.length===0?e:o.length===0&&i.length===t.length?t:o.length===0?i:i.length===0?o:[...o,...i]}var yf=p.forwardRef((e,t)=>{const{registry:s,context:o}=p.useContext(Je),i=p.useRef(null),n=p.useRef(null),r=p.useRef(null),a=p.useRef(null),l=p.useRef(null),c=p.useRef(),[d,u]=p.useState(),[h,g]=p.useState(),[f,m]=p.useState(),[v,w]=p.useState(()=>new bt),[b,S]=p.useState(()=>new bt("ag-hidden")),[R,y]=p.useState(()=>new bt("ag-hidden")),[x,F]=p.useState(()=>new bt("ag-invisible"));p.useImperativeHandle(t,()=>({refresh(){return!1}})),p.useLayoutEffect(()=>ki(d,o,n.current),[d]);const P=p.useCallback(Q=>{if(i.current=Q,!Q||o.isDestroyed()){c.current=o.destroyBean(c.current);return}const k={setInnerRenderer:(B,_)=>{u(B),m(_)},setChildCount:B=>g(B),toggleCss:(B,_)=>w(U=>U.setClass(B,_)),setContractedDisplayed:B=>y(_=>_.setClass("ag-hidden",!B)),setExpandedDisplayed:B=>S(_=>_.setClass("ag-hidden",!B)),setCheckboxVisible:B=>F(_=>_.setClass("ag-invisible",!B)),setCheckboxSpacing:B=>F(_=>_.setClass("ag-group-checkbox-spacing",B))},ee=s.createDynamicBean("groupCellRendererCtrl",!0);ee&&(c.current=o.createBean(ee),c.current.init(k,Q,r.current,a.current,l.current,yf,e))},[]),M=p.useMemo(()=>`ag-cell-wrapper ${v.toString()}`,[v]),A=p.useMemo(()=>`ag-group-expanded ${b.toString()}`,[b]),E=p.useMemo(()=>`ag-group-contracted ${R.toString()}`,[R]),I=p.useMemo(()=>`ag-group-checkbox ${x.toString()}`,[x]),O=d?.componentFromFramework,K=O?d.componentClass:void 0,N=d==null&&f!=null,ie=Ao(f);return p.createElement("span",{className:M,ref:P,...e.colDef?{}:{role:c.current?.getCellAriaRole()}},p.createElement("span",{className:A,ref:a}),p.createElement("span",{className:E,ref:l}),p.createElement("span",{className:I,ref:r}),p.createElement("span",{className:"ag-group-value",ref:n},N?ie:O?p.createElement(K,{...d.params}):null),p.createElement("span",{className:"ag-group-child-count"},h))}),nu=yf,nc=p.createContext({setMethods:()=>{}}),M6=e=>{const{initialProps:t,addUpdateCallback:s,CustomComponentClass:o,setMethods:i}=e,[{key:n,...r},a]=p.useState(t);return p.useEffect(()=>{s(l=>a(l))},[]),p.createElement(nc.Provider,{value:{setMethods:i}},p.createElement(o,{key:n,...r}))},I6=p.memo(M6),k6=0;function ru(){return`agPortalKey_${++k6}`}var Rf=class{constructor(e,t,s,o){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=s,this.suppressFallbackMethods=!!o,this.statelessComponent=this.isStateless(this.reactComponent),this.key=ru(),this.portalKey=ru(),this.instanceCreated=this.isStatelessComponent()?fe.resolve(!1):new fe(i=>{this.resolveInstanceCreated=i})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){this.componentInstance&&typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy();const e=this.portal;e&&this.portalManager.destroyPortal(e)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),s=document.createElement(t||"div");return s.classList.add("ag-react-container"),e.reactContainer=s,s}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 s=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!s){setTimeout(()=>this.callMethod(e,t));return}const o=s[e];if(o)return o.apply(s,t);if(this.fallbackMethodAvailable(e))return this.fallbackMethod(e,t&&t[0]?t[0]:{})}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.createOrUpdatePortal(e),new fe(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{this.componentInstance=t,this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=_n.createPortal(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return p.createElement(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,e)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!!(!this.isStatelessComponent()&&this.getFrameworkComponentInstance())}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const s=this[`${e}Component`];if(!this.suppressFallbackMethods&&s)return s.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function dr(e,t,s){for(const o of e){const i=t[o];i&&(s[o]=i)}}var gt=class extends Rf{constructor(){super(...arguments),this.awaitUpdateCallback=new fe(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=I6}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:s=>this.setMethods(s),addUpdateCallback:s=>{this.updateCallback=()=>(s(this.getProps()),new fe(o=>{setTimeout(()=>{o()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,dr(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new fe(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},A6=class extends gt{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},L6=class extends gt{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}},O6=class extends gt{constructor(){super(...arguments),this.label="",this.icon=null,this.shake=!1}setIcon(e,t){this.icon=e,this.shake=t,this.refreshProps()}setLabel(e){this.label=e,this.refreshProps()}getProps(){const e=super.getProps(),{label:t,icon:s,shake:o}=this;return e.label=t,e.icon=s,e.shake=o,e}},N6=class extends gt{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterModifiedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1,this.awaitSetMethodsCallback=new fe(e=>{this.resolveSetMethodsCallback=e})}isFilterActive(){return this.model!=null}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.expectingNewMethods=!0,this.model=e,this.hasBeenActive||(this.hasBeenActive=this.isFilterActive()),this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}setMethods(e){this.expectingNewMethods===!1&&this.hasBeenActive&&this.providedMethods?.doesFilterPass!==e?.doesFilterPass&&setTimeout(()=>{this.sourceParams.filterChangedCallback()}),this.expectingNewMethods=!1,super.setMethods(e),this.resolveSetMethodsCallback(),this.resolveFilterPassCallback?.(),this.resolveFilterPassCallback=void 0}updateModel(e){this.resolveFilterPassCallback?.();const t=new fe(s=>{this.resolveFilterPassCallback=s});this.setModel(e).then(()=>{t.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,e}},H6=class extends gt{constructor(){super(...arguments),this.awaitSetMethodsCallback=new fe(e=>{this.resolveSetMethodsCallback=e})}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","onAnyFilterChanged"]}setMethods(e){super.setMethods(e),this.resolveSetMethodsCallback()}};function xf(e,t){e.parentFilterInstance(s=>{(s.setModel(t)||fe.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var G6=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=s=>this.updateModel(s)}getProps(){return{...this.floatingFilterParams,model:this.model,onModelChange:this.onModelChange}}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){dr(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),xf(this.floatingFilterParams,e)}},V6=class extends gt{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(),xf(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},B6=class extends gt{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},z6=class extends gt{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},W6=class extends gt{refresh(e){this.sourceParams=e,this.refreshProps()}},_6=class extends gt{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}},j6=class extends gt{refresh(e){this.sourceParams=e,this.refreshProps()}},U6=class extends gt{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},$6=class extends gt{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}};function rc(){L(231)}var K6=1e3,q6=class{constructor(e,t,s){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=s||K6}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter(t=>t!==e),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,s){this.portals=[...this.portals,e],this.waitForInstance(t,s),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(e,t,s=Date.now()){if(this.destroyed){t(null);return}if(e.rendered())t(e);else{if(Date.now()-s>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate){yi(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,s)})}}},Y6=({ctrl:e})=>{const t=e.isAlive(),{context:s}=p.useContext(Je),[o,i]=p.useState(),[n,r]=p.useState(),a=p.useRef(),l=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(),h=p.useRef();t&&!h.current&&(h.current=new Di(()=>l.current));const g=p.useCallback(w=>{if(l.current=w,!w||!e.isAlive()||s.isDestroyed()){a.current=s.destroyBean(a.current);return}a.current=s.createBean(new Lo);const b=()=>{const R=e.getSelectAllGui();R&&(c.current?.insertAdjacentElement("afterend",R),a.current.addDestroyFunc(()=>R.remove()))},S={setWidth:R=>{l.current&&(l.current.style.width=R)},toggleCss:(R,y)=>h.current.toggleCss(R,y),setUserStyles:R=>r(R),setAriaSort:R=>{l.current&&(R?X1(l.current,R):J1(l.current))},setUserCompDetails:R=>i(R),getUserCompInstance:()=>u.current||void 0,refreshSelectAllGui:b,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()};e.setComp(S,w,c.current,d.current,a.current),b()},[]);p.useLayoutEffect(()=>ki(o,s,d.current,u),[o]),p.useEffect(()=>{e.setDragSource(l.current)},[o]);const f=p.useMemo(()=>!!(o?.componentFromFramework&&No(o.componentClass)),[o]),m=o?.componentFromFramework,v=o?.componentClass;return p.createElement("div",{ref:g,style:n,className:"ag-header-cell",role:"columnheader"},p.createElement("div",{ref:c,className:"ag-header-cell-resize",role:"presentation"}),p.createElement("div",{ref:d,className:"ag-header-cell-comp-wrapper",role:"presentation"},m?f?p.createElement(v,{...o.params}):p.createElement(v,{...o.params,ref:u}):null))},Z6=p.memo(Y6),Q6=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){dr(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}},X6=({ctrl:e})=>{const{context:t,gos:s}=p.useContext(Je),[o,i]=p.useState(),[n,r]=p.useState(()=>new bt("ag-header-cell","ag-floating-filter")),[a,l]=p.useState(()=>new bt),[c,d]=p.useState(()=>new bt("ag-floating-filter-button","ag-hidden")),[u,h]=p.useState("false"),[g,f]=p.useState(),[,m]=p.useState(1),v=p.useRef(),w=p.useRef(null),b=p.useRef(null),S=p.useRef(null),R=p.useRef(null),y=p.useRef(),x=p.useRef(),F=B=>{B!=null&&y.current&&y.current(B)},P=p.useCallback(B=>{if(w.current=B,!B||!e.isAlive()||t.isDestroyed()){v.current=t.destroyBean(v.current);return}v.current=t.createBean(new Lo),x.current=new fe(U=>{y.current=U});const _={toggleCss:(U,z)=>r(ne=>ne.setClass(U,z)),setUserStyles:U=>i(U),addOrRemoveBodyCssClass:(U,z)=>l(ne=>ne.setClass(U,z)),setButtonWrapperDisplayed:U=>{d(z=>z.setClass("ag-hidden",!U)),h(U?"false":"true")},setWidth:U=>{w.current&&(w.current.style.width=U)},setCompDetails:U=>f(U),getFloatingFilterComp:()=>x.current?x.current:null,setMenuIcon:U=>R.current?.appendChild(U)};e.setComp(_,B,R.current,b.current,v.current)},[]);p.useLayoutEffect(()=>ki(g,t,b.current,F),[g]);const M=p.useMemo(()=>n.toString(),[n]),A=p.useMemo(()=>a.toString(),[a]),E=p.useMemo(()=>c.toString(),[c]),I=p.useMemo(()=>!!(g&&g.componentFromFramework&&No(g.componentClass)),[g]),O=p.useMemo(()=>s.get("reactiveCustomComponents"),[]),K=p.useMemo(()=>s.get("enableFilterHandlers"),[]),[N,ie]=p.useState();p.useEffect(()=>{if(g?.componentFromFramework)if(O){const B=K?Q6:G6,_=new B(g.params,()=>m(U=>U+1));F(_),ie(_)}else rc()},[g]);const Q=N?.getProps(),k=g?.componentFromFramework,ee=g?.componentClass;return p.createElement("div",{ref:P,style:o,className:M,role:"gridcell"},p.createElement("div",{ref:b,className:A,role:"presentation"},k?O?Q&&p.createElement(nc.Provider,{value:{setMethods:B=>N.setMethods(B)}},p.createElement(ee,{...Q})):p.createElement(ee,{...g.params,ref:I?()=>{}:F}):null),p.createElement("div",{ref:S,"aria-hidden":u,className:E,role:"presentation"},p.createElement("button",{ref:R,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},J6=p.memo(X6),eI=({ctrl:e})=>{const{context:t}=p.useContext(Je),[s,o]=p.useState(),[i,n]=p.useState(()=>new bt),[r,a]=p.useState(()=>new bt),[l,c]=p.useState("false"),[d,u]=p.useState(),[h,g]=p.useState(),f=p.useRef(),m=p.useRef(null),v=p.useRef(null),w=p.useRef(null),b=p.useRef(),S=p.useCallback(M=>{if(m.current=M,!M||!e.isAlive()||t.isDestroyed()){f.current=t.destroyBean(f.current);return}f.current=t.createBean(new Lo);const A={setWidth:E=>{m.current&&(m.current.style.width=E)},toggleCss:(E,I)=>n(O=>O.setClass(E,I)),setUserStyles:E=>o(E),setHeaderWrapperHidden:E=>{const I=w.current;I&&(E?I.style.setProperty("display","none"):I.style.removeProperty("display"))},setHeaderWrapperMaxHeight:E=>{const I=w.current;I&&(E!=null?I.style.setProperty("max-height",`${E}px`):I.style.removeProperty("max-height"),I.classList.toggle("ag-header-cell-comp-wrapper-limited-height",E!=null))},setUserCompDetails:E=>g(E),setResizableDisplayed:E=>{a(I=>I.setClass("ag-hidden",!E)),c(E?"false":"true")},setAriaExpanded:E=>u(E),getUserCompInstance:()=>b.current||void 0};e.setComp(A,M,v.current,w.current,f.current)},[]);p.useLayoutEffect(()=>ki(h,t,w.current),[h]),p.useEffect(()=>{m.current&&e.setDragSource(m.current)},[h]);const R=p.useMemo(()=>!!(h?.componentFromFramework&&No(h.componentClass)),[h]),y=p.useMemo(()=>"ag-header-group-cell "+i.toString(),[i]),x=p.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),F=h?.componentFromFramework,P=h?.componentClass;return p.createElement("div",{ref:S,style:s,className:y,role:"columnheader","aria-expanded":d},p.createElement("div",{ref:w,className:"ag-header-cell-comp-wrapper",role:"presentation"},F?R?p.createElement(P,{...h.params}):p.createElement(P,{...h.params,ref:b}):null),p.createElement("div",{ref:v,"aria-hidden":l,className:x}))},tI=p.memo(eI),sI=({ctrl:e})=>{const{gos:t,context:s}=p.useContext(Je),{topOffset:o,rowHeight:i}=p.useMemo(()=>e.getTopAndHeight(),[]),n=p.useMemo(()=>t.get("tabIndex"),[]),[r,a]=p.useState(()=>e.getAriaRowIndex()),l=e.headerRowClass,[c,d]=p.useState(()=>i+"px"),[u,h]=p.useState(()=>o+"px"),g=p.useRef(null),[f,m]=p.useState(()=>e.getUpdatedHeaderCtrls()),v=p.useRef(),w=p.useRef(null),b=p.useCallback(y=>{if(w.current=y,!y||!e.isAlive()||s.isDestroyed()){v.current=s.destroyBean(v.current);return}v.current=s.createBean(new Lo);const x={setHeight:F=>d(F),setTop:F=>h(F),setHeaderCtrls:(F,P,M)=>{const A=g.current,E=zn(A,F,P);E!==A&&(g.current=E,yi(M,()=>m(E)))},setWidth:F=>{w.current&&(w.current.style.width=F)},setRowIndex:F=>{a(F)}};e.setComp(x,v.current,!1)},[]),S=p.useMemo(()=>({height:c,top:u}),[c,u]),R=p.useCallback(y=>{switch(e.type){case"group":return p.createElement(tI,{ctrl:y,key:y.instanceId});case"filter":return p.createElement(J6,{ctrl:y,key:y.instanceId});default:return p.createElement(Z6,{ctrl:y,key:y.instanceId})}},[]);return p.createElement("div",{ref:b,className:l,role:"row",style:S,tabIndex:n,"aria-rowindex":r},f.map(R))},oI=p.memo(sI),iI=({pinned:e})=>{const[t,s]=p.useState(!0),[o,i]=p.useState([]),{context:n}=p.useContext(Je),r=p.useRef(null),a=p.useRef(null),l=p.useRef(),c=e==="left",d=e==="right",u=!c&&!d,h=p.useCallback(m=>{if(r.current=m,!m||n.isDestroyed()){l.current=n.destroyBean(l.current);return}l.current=n.createBean(new GR(e));const v={setDisplayed:s,setCtrls:w=>i(w),setCenterWidth:w=>{a.current&&(a.current.style.width=w)},setViewportScrollLeft:w=>{r.current&&(r.current.scrollLeft=w)},setPinnedContainerWidth:w=>{r.current&&(r.current.style.width=w,r.current.style.minWidth=w,r.current.style.maxWidth=w)}};l.current.setComp(v,r.current)},[]),g=t?"":"ag-hidden",f=()=>o.map(m=>p.createElement(oI,{ctrl:m,key:m.instanceId}));return c?p.createElement("div",{ref:h,className:"ag-pinned-left-header "+g,"aria-hidden":!t,role:"rowgroup"},f()):d?p.createElement("div",{ref:h,className:"ag-pinned-right-header "+g,"aria-hidden":!t,role:"rowgroup"},f()):u?p.createElement("div",{ref:h,className:"ag-header-viewport "+g,role:"rowgroup",tabIndex:-1},p.createElement("div",{ref:a,className:"ag-header-container",role:"presentation"},f())):null},ia=p.memo(iI),nI=()=>{const[e,t]=p.useState(()=>new bt),[s,o]=p.useState(),{context:i}=p.useContext(Je),n=p.useRef(null),r=p.useRef(),a=p.useCallback(d=>{if(n.current=d,!d||i.isDestroyed()){r.current=i.destroyBean(r.current);return}r.current=i.createBean(new LR);const u={toggleCss:(h,g)=>t(f=>f.setClass(h,g)),setHeightAndMinHeight:h=>o(h)};r.current.setComp(u,d,d)},[]),l=p.useMemo(()=>"ag-header "+e.toString(),[e]),c=p.useMemo(()=>({height:s,minHeight:s}),[s]);return p.createElement("div",{ref:a,className:l,style:c,role:"presentation"},p.createElement(ia,{pinned:"left"}),p.createElement(ia,{pinned:null}),p.createElement(ia,{pinned:"right"}))},rI=p.memo(nI),aI=(e,t)=>{p.useEffect(()=>{const s=t.current;if(s){const o=s.parentElement;if(o){const i=document.createComment(e);return o.insertBefore(i,s),()=>{i.remove()}}}},[e])},xs=aI,lI=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new fe(s=>{this.resolveInstanceCreated=s}),this.onValueChange=s=>this.updateValue(s),this.value=e.value}getProps(){return{...this.cellEditorParams,initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange}}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){dr(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){this.componentInstance=e,this.resolveInstanceCreated?.(),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isCancelBeforeStart","isCancelAfterEnd","focusIn","focusOut","afterGuiAttached","getValidationErrors","getValidationElement"]}updateValue(e){this.value=e,this.refreshProps()}},cI=e=>{const t=p.useRef(e),s=p.useRef(),o=p.useRef(!1),i=p.useRef(!1),[,n]=p.useState(0);o.current&&(i.current=!0),p.useEffect(()=>(o.current||(s.current=t.current(),o.current=!0),n(r=>r+1),()=>{i.current&&s.current?.()}),[])},dI=e=>{const[t,s]=p.useState(),o=p.useContext(Je),{context:i,popupSvc:n,gos:r,editSvc:a}=o,{editDetails:l,cellCtrl:c,eParentCell:d}=e;return cI(()=>{const{compDetails:u}=l,h=r.get("stopEditingWhenCellsLoseFocus");let g,f;if(!i.isDestroyed()){f=i.createBean(a.createPopupEditorWrapper(u.params));const m=f.getGui();if(e.jsChildComp){const y=e.jsChildComp.getGui();y&&m.appendChild(y)}const{column:v,rowNode:w}=c,b={column:v,rowNode:w,type:"popupCellEditor",eventSource:d,ePopup:m,position:l.popupPosition,keepWithinBounds:!0},S=n?.positionPopupByComponent.bind(n,b),R=n?.addPopup({modal:h,eChild:m,closeOnEsc:!0,closedCallback:()=>{c.onPopupEditorClosed()},anchorToElement:d,positionCallback:S,ariaOwns:d});g=R?R.hideFunc:void 0,s(f),e.jsChildComp?.afterGuiAttached?.()}return()=>{g?.(),i.destroyBean(f)}}),p.useLayoutEffect(()=>()=>{c.isCellFocused()&&t?.getGui().contains(Ae(o))&&d.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?_n.createPortal(e.wrappedContent,t.getGui()):null},au=p.memo(dI),uI=(e,t,s)=>{const{compProxy:o}=e;s(o);const i=o.getProps(),n=No(t);return p.createElement(nc.Provider,{value:{setMethods:r=>o.setMethods(r)}},n?p.createElement(t,{...i}):p.createElement(t,{...i,ref:r=>o.setRef(r)}))},lu=(e,t,s)=>e.compProxy?uI(e,t,s):p.createElement(t,{...e.compDetails.params,ref:s}),hI=(e,t,s,o,i)=>{const n=e.compDetails,r=n.componentClass,a=n.componentFromFramework&&!e.popup,l=n.componentFromFramework&&e.popup,c=!n.componentFromFramework&&e.popup;return a?lu(e,r,t):l?p.createElement(au,{editDetails:e,cellCtrl:o,eParentCell:s,wrappedContent:lu(e,r,t)}):c&&i?p.createElement(au,{editDetails:e,cellCtrl:o,eParentCell:s,jsChildComp:i}):null},gI=(e,t,s,o,i,n)=>{const{context:r}=p.useContext(Je),a=p.useCallback(()=>{const l=i.current;if(!l)return;const c=l.getGui();c&&c.parentElement&&c.remove(),r.destroyBean(l),i.current=void 0},[]);p.useEffect(()=>{const l=e!=null,c=e?.compDetails&&!e.compDetails.componentFromFramework,d=t&&s==null;if(!(l&&c&&!d)){a();return}const h=e.compDetails;if(i.current){const f=i.current,v=f.refresh!=null&&e.force==!1?f.refresh(h.params):!1;if(v===!0||v===void 0)return;a()}h.newAgStackInstance().then(f=>{if(!f)return;const m=f.getGui();if(!m)return;(t?s:n.current).appendChild(m),i.current=f})},[e,t,o]),p.useEffect(()=>a,[])},Ff=gI,pI=({cellCtrl:e,parent:t})=>{const s=p.useRef(),o=p.useMemo(()=>{const{loadingComp:i}=e.getDeferLoadingCellRenderer();return i?{value:void 0,compDetails:i,force:!1}:void 0},[e]);if(Ff(o,!1,void 0,1,s,t),o?.compDetails?.componentFromFramework){const i=o.compDetails.componentClass;return p.createElement(i,{...o.compDetails.params})}return p.createElement(p.Fragment,null)},fI=({cellCtrl:e,printLayout:t,editingCell:s})=>{const o=p.useContext(Je),{context:i}=o,{column:{colIdSanitised:n},instanceId:r}=e,a=p.useRef(),[l,c]=p.useState(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[d,u]=p.useState(),[h,g]=p.useState(1),[f,m]=p.useState(),[v,w]=p.useState(!1),[b,S]=p.useState(!1),[R,y]=p.useState(!1),[x,F]=p.useState(),P=p.useMemo(()=>e.isForceWrapper(),[e]),M=p.useMemo(()=>e.getCellAriaRole(),[e]),A=p.useRef(null),E=p.useRef(null),I=p.useRef(null),O=p.useRef(),K=p.useRef(),N=p.useRef(),ie=p.useRef([]),Q=p.useRef(),k=p.useRef(),[ee,B]=p.useState(0),_=p.useCallback(te=>{k.current=te,B(de=>de+1)},[]),U=l!=null&&(v||R||b)&&(d==null||!!d.popup),z=P||U,ne=p.useMemo(()=>e.getCellValueClass(),[e]),ve=p.useCallback(te=>{if(K.current=te,te){const de=te.isCancelBeforeStart&&te.isCancelBeforeStart();setTimeout(()=>{de?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(te))})}},[e]),W=p.useRef();W.current||(W.current=new Di(()=>A.current)),Ff(l,z,k.current,ee,O,A);const J=p.useRef();p.useLayoutEffect(()=>{const te=J.current,de=l;if(J.current=l,te==null||te.compDetails==null||de==null||de.compDetails==null)return;Q.current?.refreshVisibility();const Ge=te.compDetails,Oe=de.compDetails;if(Ge.componentClass!=Oe.componentClass||I.current?.refresh==null)return;I.current.refresh(Oe.params)!=!0&&g(Ce=>Ce+1)},[l]),p.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework)||i.isDestroyed())return;const de=d.compDetails,Ge=d.popup===!0,Oe=de.newAgStackInstance();return Oe.then(ae=>{if(!ae)return;const Ce=ae.getGui();ve(ae),Ge||((P?N:A).current?.appendChild(Ce),ae.afterGuiAttached?.()),F(ae)}),()=>{Oe.then(ae=>{const Ce=ae.getGui();e.disableEditorTooltipFeature(),i.destroyBean(ae),ve(void 0),F(void 0),Ce?.remove()})}},[d]);const xe=p.useCallback(te=>{if(N.current=te,!te||i.isDestroyed()||!e.isAlive()){const Oe=ie.current;ie.current=[];for(const ae of Oe)ae();return}let de;const Ge=Oe=>{Oe&&(te.insertAdjacentElement("afterbegin",Oe.getGui()),ie.current.push(()=>{hs(Oe.getGui()),i.destroyBean(Oe),Q.current===de&&(Q.current=void 0)}))};v&&Ge(e.createSelectionCheckbox()),R&&Ge(e.createDndSource()),b&&(de=e.createRowDragComp(),Q.current=de,de&&(Ge(de),de.refreshVisibility()))},[e,i,R,b,v]),we=p.useCallback(()=>{const te=!e.isCellSpanning()||E.current,de=A.current;if(!de||!te||!e||!e.isAlive()||i.isDestroyed()){a.current=i.destroyBean(a.current);return}a.current=i.createBean(new Lo);const Ge={toggleCss:(ae,Ce)=>W.current.toggleCss(ae,Ce),setUserStyles:ae=>m(ae),getFocusableElement:()=>A.current,setIncludeSelection:ae=>w(ae),setIncludeRowDrag:ae=>S(ae),setIncludeDndSource:ae=>y(ae),getCellEditor:()=>K.current??null,getCellRenderer:()=>I.current??O.current,getParentOfValue:()=>k.current??N.current??A.current,setRenderDetails:(ae,Ce,We)=>{const he=()=>{c(Se=>Se?.compDetails!==ae||Se?.value!==Ce||Se?.force!==We?{value:Ce,compDetails:ae,force:We}:Se)};if(ae?.params?.deferRender&&!e.rowNode.group){const{loadingComp:Se,onReady:os}=e.getDeferLoadingCellRenderer();if(Se){c({value:void 0,compDetails:Se,force:!1}),os.then(()=>P6(he));return}}he()},setEditDetails:(ae,Ce,We,he)=>{if(ae){let Se;ae.componentFromFramework&&(he?Se=new lI(ae.params,()=>g(os=>os+1)):rc()),u({compDetails:ae,popup:Ce,popupPosition:We,compProxy:Se}),Ce||c(void 0)}else e.hasBrowserFocus()&&Ge.getFocusableElement().focus({preventScroll:!0}),K.current=void 0,u(void 0)},refreshEditStyles:(ae,Ce)=>{if(!A.current)return;const{current:We}=W;We.toggleCss("ag-cell-value",!z),We.toggleCss("ag-cell-inline-editing",!!ae&&!Ce),We.toggleCss("ag-cell-popup-editing",!!ae&&!!Ce),We.toggleCss("ag-cell-not-inline-editing",!ae||!!Ce)}},Oe=N.current||void 0;e.setComp(Ge,de,E.current??void 0,Oe,t,s,a.current)},[]),oe=p.useCallback(te=>{A.current=te,we()},[]),He=p.useCallback(te=>{E.current=te,we()},[]),Fe=p.useMemo(()=>!!(l?.compDetails?.componentFromFramework&&No(l.compDetails.componentClass)),[l]);p.useLayoutEffect(()=>{if(!A.current)return;const{current:te}=W;te.toggleCss("ag-cell-value",!z),te.toggleCss("ag-cell-inline-editing",!!d&&!d.popup),te.toggleCss("ag-cell-popup-editing",!!d&&!!d.popup),te.toggleCss("ag-cell-not-inline-editing",!d||!!d.popup)});const je=()=>{const{compDetails:te,value:de}=l;if(!te)return de?.toString?.()??de;if(te.componentFromFramework){const Ge=te.componentClass;return p.createElement(p.Suspense,{fallback:p.createElement(pI,{cellCtrl:e,parent:A})},Fe?p.createElement(Ge,{...te.params,key:h}):p.createElement(Ge,{...te.params,key:h,ref:I}))}},H=()=>{const te=()=>l==null?null:z?p.createElement("span",{role:"presentation",id:`cell-${r}`,className:ne,ref:_},je()):je(),de=Ge=>hI(Ge,ve,A.current,e,x);return d!=null?d.popup?p.createElement(p.Fragment,null,te(),de(d)):de(d):te()},pe=()=>p.createElement("div",{ref:oe,style:f,role:M,"col-id":n},z?p.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:xe},H()):H());return e.isCellSpanning()?p.createElement("div",{ref:He,className:"ag-spanned-cell-wrapper",role:"presentation"},pe()):pe()},mI=p.memo(fI),CI=({rowCtrl:e,containerType:t})=>{const{context:s,gos:o,editSvc:i}=p.useContext(Je),n=p.useContext(wf)==="default",r=p.useRef(),a=p.useRef(e.getDomOrder()),l=e.isFullWidth(),c=e.rowNode.displayed,[d,u]=p.useState(()=>c?e.rowNode.getRowIndexString():null),[h,g]=p.useState(()=>e.rowId),[f,m]=p.useState(()=>e.businessKey),[v,w]=p.useState(()=>e.rowStyles),b=p.useRef(null),[S,R]=p.useState(()=>null),[y,x]=p.useState(),[F,P]=p.useState(()=>c?e.getInitialRowTop(t):void 0),[M,A]=p.useState(()=>c?e.getInitialTransform(t):void 0),E=p.useRef(null),I=p.useRef(),O=p.useRef(),K=p.useRef(!1),[N,ie]=p.useState(0);p.useEffect(()=>{if(K.current||!y||N>10)return;const oe=E.current?.firstChild;oe?(e.setupDetailRowAutoHeight(oe),K.current=!0):ie(He=>He+1)},[y,N]);const Q=p.useRef();Q.current||(Q.current=new Di(()=>E.current));const k=p.useRef(()=>{}),ee=p.useCallback(oe=>(k.current=oe,()=>{k.current=()=>{}}),[]),B=T6(ee,()=>b.current,[]),_=n?B:S,U=p.useCallback(oe=>{if(E.current=oe,r.current=oe?s.createBean(new Lo):s.destroyBean(r.current),!oe){e.unsetComp(t);return}if(!e.isAlive()||s.isDestroyed())return;const He={setTop:P,setTransform:A,toggleCss:(Fe,je)=>Q.current.toggleCss(Fe,je),setDomOrder:Fe=>a.current=Fe,setRowIndex:u,setRowId:g,setRowBusinessKey:m,setUserStyles:w,setCellCtrls:(Fe,je)=>{const H=b.current,pe=zn(H,Fe,a.current);pe!==H&&(b.current=pe,n?k.current():yi(je,()=>R(pe)))},showFullWidth:Fe=>{O.current=Fe.params,x(Fe)},getFullWidthCellRenderer:()=>I.current,getFullWidthCellRendererParams:()=>O.current,refreshFullWidth:Fe=>{const je=Fe();return O.current=je,J.current?(x(H=>({...H,params:je})),!0):!I.current||!I.current.refresh?!1:I.current.refresh(je)}};e.setComp(He,oe,t,r.current)},[]);p.useLayoutEffect(()=>ki(y,s,E.current,I),[y]);const z=p.useMemo(()=>{const oe={top:F,transform:M};return Object.assign(oe,v),oe},[F,M,v]),ne=l&&y?.componentFromFramework,ve=!l&&_!=null,W=p.useMemo(()=>!!(y?.componentFromFramework&&No(y.componentClass)),[y]),J=p.useRef(!1);p.useEffect(()=>{J.current=W&&!!y&&!!o.get("reactiveCustomComponents")},[W,y]);const xe=()=>_?.map(oe=>p.createElement(mI,{cellCtrl:oe,editingCell:i?.isEditing(oe,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:oe.instanceId})),we=()=>{const oe=y.componentClass;return W?p.createElement(oe,{...y.params}):p.createElement(oe,{...y.params,ref:I})};return p.createElement("div",{ref:U,role:"row",style:z,"row-index":d,"row-id":h,"row-business-key":f},ve?xe():ne?we():null)},cu=p.memo(CI),vI=({name:e})=>{const{context:t,gos:s}=p.useContext(Je),o=p.useMemo(()=>Ti(e),[e]),i=p.useRef(null),n=p.useRef(null),r=p.useRef(null),a=p.useRef([]),l=p.useRef([]),[c,d]=p.useState(()=>[]),u=!!s.get("enableCellSpan")&&!!o.getSpannedRowCtrls,h=p.useRef([]),g=p.useRef([]),[f,m]=p.useState(()=>[]),v=p.useRef(!1),w=p.useRef(),b=p.useMemo(()=>mt("ag-viewport",_g(e)),[e]),S=p.useMemo(()=>mt(an(e)),[e]),R=p.useMemo(()=>mt("ag-spanning-container",iR(e)),[e]),y=o.type==="center"||u,x=y?i:n;xs(" AG Row Container "+e+" ",x);const F=p.useCallback(()=>{const N=!y||i.current!=null,ie=n.current!=null,Q=!u||r.current!=null;return N&&ie&&Q},[]),P=p.useCallback(()=>i.current==null&&n.current==null&&r.current==null,[]),M=p.useCallback(()=>{if(P()&&(w.current=t.destroyBean(w.current)),!t.isDestroyed()&&F()){const N=k=>{const ee=zn(l.current,a.current,v.current);ee!==l.current&&(l.current=ee,yi(k,()=>d(ee)))},ie=k=>{const ee=zn(g.current,h.current,v.current);ee!==g.current&&(g.current=ee,yi(k,()=>m(ee)))},Q={setHorizontalScroll:k=>{i.current&&(i.current.scrollLeft=k)},setViewportHeight:k=>{i.current&&(i.current.style.height=k)},setRowCtrls:({rowCtrls:k,useFlushSync:ee})=>{const B=!!ee&&a.current.length>0&&k.length>0;a.current=k,N(B)},setSpannedRowCtrls:(k,ee)=>{const B=!!ee&&h.current.length>0&&k.length>0;h.current=k,ie(B)},setDomOrder:k=>{v.current!=k&&(v.current=k,N(!1))},setContainerWidth:k=>{n.current&&(n.current.style.width=k)},setOffsetTop:k=>{n.current&&(n.current.style.transform=`translateY(${k})`)}};w.current=t.createBean(new pR(e)),w.current.setComp(Q,n.current,r.current??void 0,i.current)}},[F,P]),A=p.useCallback(N=>{n.current=N,M()},[M]),E=p.useCallback(N=>{r.current=N,M()},[M]),I=p.useCallback(N=>{i.current=N,M()},[M]),O=()=>p.createElement("div",{className:S,ref:A,role:y?"presentation":"rowgroup"},c.map(N=>p.createElement(cu,{rowCtrl:N,containerType:o.type,key:N.instanceId})));if(!y)return O();const K=()=>p.createElement("div",{className:R,ref:E,role:"presentation"},f.map(N=>p.createElement(cu,{rowCtrl:N,containerType:o.type,key:N.instanceId})));return p.createElement("div",{className:b,ref:I,role:"rowgroup"},O(),u?K():null)},wI=p.memo(vI),bI=()=>{const e=p.useContext(Je),{context:t,overlays:s}=e,[o,i]=p.useState(""),[n,r]=p.useState(0),[a,l]=p.useState(0),[c,d]=p.useState("0px"),[u,h]=p.useState("0px"),[g,f]=p.useState("100%"),[m,v]=p.useState("0px"),[w,b]=p.useState("0px"),[S,R]=p.useState("100%"),[y,x]=p.useState(!0),[F,P]=p.useState(!0),[M,A]=p.useState(null),[E,I]=p.useState(""),[O,K]=p.useState(null),[N,ie]=p.useState("ag-layout-normal"),Q=p.useRef();Q.current||(Q.current=new Di(()=>k.current));const k=p.useRef(null),ee=p.useRef(null),B=p.useRef(null),_=p.useRef(null),U=p.useRef(null),z=p.useRef(null),ne=p.useRef(null),ve=p.useRef([]),W=p.useRef([]);xs(" AG Grid Body ",k),xs(" AG Pinned Top ",ee),xs(" AG Sticky Top ",B),xs(" AG Middle ",z),xs(" AG Pinned Bottom ",ne);const J=p.useCallback(Ce=>{if(k.current=Ce,!Ce||t.isDestroyed()){ve.current=t.destroyBeans(ve.current);for(const Pe of W.current)Pe();W.current=[];return}const We=(Pe,et)=>{Pe.appendChild(et),W.current.push(()=>et.remove())},he=Pe=>{const et=t.createBean(new Pe);return ve.current.push(et),et},Se=(Pe,et,hr)=>{We(Pe,document.createComment(hr)),We(Pe,he(et).getGui())};Se(Ce,SR," AG Fake Horizontal Scroll ");const os=s?.getOverlayWrapperCompClass();os&&Se(Ce,os," AG Overlay Wrapper "),U.current&&Se(U.current,RR," AG Fake Vertical Scroll ");const ur={setRowAnimationCssOnBodyViewport:i,setColumnCount:Pe=>{k.current&&Z1(k.current,Pe)},setRowCount:Pe=>{k.current&&q1(k.current,Pe)},setTopHeight:r,setBottomHeight:l,setStickyTopHeight:d,setStickyTopTop:h,setStickyTopWidth:f,setTopInvisible:x,setBottomInvisible:P,setColumnMovingCss:(Pe,et)=>Q.current.toggleCss(Pe,et),updateLayoutClasses:ie,setAlwaysVerticalScrollClass:A,setPinnedTopBottomOverflowY:I,setCellSelectableCss:(Pe,et)=>K(et?Pe:null),setBodyViewportWidth:Pe=>{z.current&&(z.current.style.width=Pe)},registerBodyViewportResizeListener:Pe=>{if(z.current){const et=es(e,z.current,Pe);W.current.push(()=>et())}},setStickyBottomHeight:v,setStickyBottomBottom:b,setStickyBottomWidth:R,setGridRootRole:Pe=>Ce.setAttribute("role",Pe)},Ai=t.createBean(new vR);ve.current.push(Ai),Ai.setComp(ur,Ce,z.current,ee.current,ne.current,B.current,_.current)},[]),xe=p.useMemo(()=>mt("ag-root","ag-unselectable",N),[N]),we=p.useMemo(()=>mt("ag-body-viewport",o,N,M,O),[o,N,M,O]),oe=p.useMemo(()=>mt("ag-body",N),[N]),He=p.useMemo(()=>mt("ag-floating-top",y?"ag-invisible":null,O),[O,y]),Fe=p.useMemo(()=>mt("ag-sticky-top",O),[O]),je=p.useMemo(()=>mt("ag-sticky-bottom",m==="0px"?"ag-invisible":null,O),[O,m]),H=p.useMemo(()=>mt("ag-floating-bottom",F?"ag-invisible":null,O),[O,F]),pe=p.useMemo(()=>({height:n,minHeight:n,overflowY:E}),[n,E]),te=p.useMemo(()=>({height:c,top:u,width:g}),[c,u,g]),de=p.useMemo(()=>({height:m,bottom:w,width:S}),[m,w,S]),Ge=p.useMemo(()=>({height:a,minHeight:a,overflowY:E}),[a,E]),Oe=Ce=>p.createElement(wI,{name:Ce,key:`${Ce}-container`}),ae=({section:Ce,children:We,className:he,style:Se})=>p.createElement("div",{ref:Ce,className:he,role:"presentation",style:Se},We.map(Oe));return p.createElement("div",{ref:J,className:xe},p.createElement(rI,null),ae({section:ee,className:He,style:pe,children:["topLeft","topCenter","topRight","topFullWidth"]}),p.createElement("div",{className:oe,ref:U,role:"presentation"},ae({section:z,className:we,children:["left","center","right","fullWidth"]})),ae({section:B,className:Fe,style:te,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),ae({section:_,className:je,style:de,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),ae({section:ne,className:H,style:Ge,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},SI=p.memo(bI),yI=(e,t)=>{const{children:s,eFocusableElement:o,onTabKeyDown:i,gridCtrl:n,forceFocusOutWhenTabGuardsAreEmpty:r,isEmpty:a}=e,{context:l}=p.useContext(Je),c=p.useRef(null),d=p.useRef(null),u=p.useRef(),h=w=>{const b=w==null?void 0:parseInt(w,10).toString();for(const S of[c,d])b===void 0?S.current?.removeAttribute("tabindex"):S.current?.setAttribute("tabindex",b)};p.useImperativeHandle(t,()=>({forceFocusOutOfContainer(w){u.current?.forceFocusOutOfContainer(w)}}));const g=p.useCallback(()=>{const w=c.current,b=d.current;if(!w&&!b||l.isDestroyed()){u.current=l.destroyBean(u.current);return}if(w&&b){const S={setTabIndex:h};u.current=l.createBean(new tp({comp:S,eTopGuard:w,eBottomGuard:b,eFocusableElement:o,onTabKeyDown:i,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:R=>n.focusInnerElement(R),isEmpty:a}))}},[]),f=p.useCallback(w=>{c.current=w,g()},[g]),m=p.useCallback(w=>{d.current=w,g()},[g]),v=w=>{const b=w==="top"?wo.TAB_GUARD_TOP:wo.TAB_GUARD_BOTTOM;return p.createElement("div",{className:`${wo.TAB_GUARD} ${b}`,role:"presentation",ref:w==="top"?f:m})};return p.createElement(p.Fragment,null,v("top"),s,v("bottom"))},RI=p.forwardRef(yI),xI=p.memo(RI),FI=({context:e})=>{const[t,s]=p.useState(""),[o,i]=p.useState(""),[n,r]=p.useState(null),[a,l]=p.useState(null),[c,d]=p.useState(!1),[u,h]=p.useState(),g=p.useRef(),f=p.useRef(null),m=p.useRef(),[v,w]=p.useState(null),b=p.useRef(()=>{}),S=p.useRef(),R=p.useRef([]),y=p.useCallback(()=>{},[]);xs(" AG Grid ",f);const x=p.useCallback(I=>{if(f.current=I,g.current=I?e.createBean(new bx):e.destroyBean(g.current),!I||e.isDestroyed())return;const O=g.current;b.current=O.focusInnerElement.bind(O);const K={destroyGridUi:()=>{},setRtlClass:s,forceFocusOutOfContainer:N=>{if(!N&&S.current?.isDisplayed()){S.current.forceFocusOutOfContainer(N);return}m.current?.forceFocusOutOfContainer(N)},updateLayoutClasses:i,getFocusableContainers:()=>{const N=[],ie=f.current?.querySelector(".ag-root");ie&&N.push({getGui:()=>ie});for(const Q of R.current)Q.isDisplayed()&&N.push(Q);return N},setCursor:r,setUserSelect:l};O.setComp(K,I,I),d(!0)},[]);p.useEffect(()=>{const I=g.current,O=f.current;if(!u||!I||!v||!O||e.isDestroyed())return;const K=[],{watermarkSelector:N,paginationSelector:ie,sideBarSelector:Q,statusBarSelector:k,gridHeaderDropZonesSelector:ee}=I.getOptionalSelectors(),B=[];if(ee){const U=e.createBean(new ee.component),z=U.getGui();O.insertAdjacentElement("afterbegin",z),B.push(z),K.push(U)}if(Q){const U=e.createBean(new Q.component),z=U.getGui(),ne=v.querySelector(".ag-tab-guard-bottom");ne&&(ne.insertAdjacentElement("beforebegin",z),B.push(z)),K.push(U),R.current.push(U)}const _=U=>{const z=e.createBean(new U),ne=z.getGui();return O.insertAdjacentElement("beforeend",ne),B.push(ne),K.push(z),z};if(k&&_(k.component),ie){const U=_(ie.component);S.current=U,R.current.push(U)}return N&&_(N.component),()=>{e.destroyBeans(K);for(const U of B)U.remove()}},[u,v,e]);const F=p.useMemo(()=>mt("ag-root-wrapper",t,o),[t,o]),P=p.useMemo(()=>mt("ag-root-wrapper-body","ag-focus-managed",o),[o]),M=p.useMemo(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:n??""}),[a,n]),A=p.useCallback(I=>{m.current=I,h(I!==null)},[]),E=p.useCallback(()=>!g.current?.isFocusable(),[]);return p.createElement("div",{ref:x,className:F,style:M,role:"presentation"},p.createElement("div",{className:P,ref:w,role:"presentation"},c&&v&&!e.isDestroyed()&&p.createElement(Je.Provider,{value:e.getBeans()},p.createElement(xI,{ref:A,eFocusableElement:v,onTabKeyDown:y,gridCtrl:g.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:E},p.createElement(SI,null)))))},EI=p.memo(FI),DI=class extends T{postConstruct(){if(this.beans.colAutosize){const e=this.queueResizeOperationsForTick.bind(this);this.addManagedEventListeners({rowExpansionStateChanged:e,expandOrCollapseAll:e,cellValueChanged:e,rowNodeDataChanged:e,rowDataUpdated:e})}}queueResizeOperationsForTick(){const e=this.beans.colAutosize;e.shouldQueueResizeOperations=!0,setTimeout(()=>{e.processResizeOperations()},0)}areHeaderCellsRendered(){return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(t=>t.areCellsRendered()))}areCellsRendered(){return this.beans.rowRenderer.getAllRowCtrls().every(e=>e.isRowRendered()&&e.getAllCellCtrls().every(t=>!!t.eGui))}},Ef={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},PI={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...Ef},Df=new Set(Object.keys(PI)),TI=new Set(Object.keys(Ef)),Pf=e=>{const t=p.useRef(),s=p.useRef(null),o=p.useRef(null),i=p.useRef([]),n=p.useRef([]),r=p.useRef(e),a=p.useRef(),l=p.useRef(),c=p.useRef(!1),[d,u]=p.useState(void 0),[,h]=p.useState(0),g=p.useCallback(w=>{if(s.current=w,!w){for(const E of i.current)E();i.current.length=0;return}const b=e.modules||[];o.current||(o.current=new q6(()=>h(E=>E+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),i.current.push(()=>{o.current?.destroy(),o.current=null}));const S=Qb(e.gridOptions,e,Object.keys(e).filter(E=>!Df.has(E))),R=()=>{if(c.current){const E=()=>a.current?.shouldQueueUpdates()?void 0:n.current.shift();let I=E();for(;I;)I(),I=E()}},y=new AI(R);a.current=y;const x=new DI,F={providedBeanInstances:{frameworkCompWrapper:new II(o.current,S),renderStatus:x},modules:b,frameworkOverrides:y,setThemeOnGridDiv:!0},P=E=>{u(E),E.createBean(x),i.current.push(()=>{E.destroy()}),E.getBean("ctrlsSvc").whenReady({addDestroyFunc:I=>{i.current.push(I)}},()=>{if(E.isDestroyed())return;const I=t.current;I&&e.passGridApi?.(I)})},M=E=>{E.getBean("ctrlsSvc").whenReady({addDestroyFunc:I=>{i.current.push(I)}},()=>{for(const I of n.current)I();n.current.length=0,c.current=!0})},A=new KD;S.gridId??(S.gridId=l.current),t.current=A.create(w,S,P,M,F),i.current.push(()=>{t.current=void 0}),t.current&&(l.current=t.current.getGridId())},[]),f=p.useMemo(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),m=p.useCallback(w=>{c.current&&!a.current?.shouldQueueUpdates()?w():n.current.push(w)},[]);p.useEffect(()=>{const w=MI(r.current,e);r.current=e,m(()=>{t.current&&Xb(w,t.current)})},[e]);const v=!p.useSyncExternalStore||tn(e,"renderingMode")==="legacy"?"legacy":"default";return p.createElement("div",{style:f,className:e.className,ref:g},p.createElement(wf.Provider,{value:v},d&&!d.isDestroyed()?p.createElement(EI,{key:d.instanceId,context:d}):null,o.current?.getPortals()??null))};function MI(e,t){const s={};for(const o of Object.keys(t)){if(Df.has(o)){TI.has(o)&&L(274,{prop:o});continue}const i=t[o];e[o]!==i&&(s[o]=i)}return s}var II=class extends XD{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const s=this.gridOptions;if(tn(s,"reactiveCustomComponents")){const r=(a=>{switch(a){case"filter":return tn(s,"enableFilterHandlers")?H6:N6;case"floatingFilterComponent":return tn(s,"enableFilterHandlers")?B6:V6;case"dateComponent":return L6;case"dragAndDropImageComponent":return O6;case"loadingOverlayComponent":return W6;case"noRowsOverlayComponent":return j6;case"statusPanel":return U6;case"toolPanel":return $6;case"menuItem":return _6;case"cellRenderer":return A6;case"innerHeaderComponent":return z6}})(t.name);if(r)return new r(e,this.parent,t)}else switch(t.name){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":rc();break}const i=!t.cellRenderer&&t.name!=="toolPanel";return new Rf(e,this.parent,t,i)}},kI=p.forwardRef((e,t)=>{const s=p.useContext(Je),{registry:o,context:i,gos:n,rowModel:r}=s,[a,l]=p.useState(()=>new bt),[c,d]=p.useState(()=>new bt),[u,h]=p.useState(),[g,f]=p.useState(),m=p.useRef(),v=p.useRef(null),w=p.useRef(),b=p.useMemo(()=>Pb(e.api.getGridId(),u?.rowModelType??"clientSide"),[e]),S=p.useMemo(()=>a.toString()+" ag-details-row",[a]),R=p.useMemo(()=>c.toString()+" ag-details-grid",[c]);t&&p.useImperativeHandle(t,()=>({refresh(){return m.current?.refresh()??!1}})),e.template&&L(230);const y=p.useCallback(F=>{if(v.current=F,!F||i.isDestroyed()){m.current=i.destroyBean(m.current),w.current?.();return}const P={toggleCss:(A,E)=>l(I=>I.setClass(A,E)),toggleDetailGridCss:(A,E)=>d(I=>I.setClass(A,E)),setDetailGrid:A=>h(A),setRowData:A=>f(A),getGui:()=>v.current},M=o.createDynamicBean("detailCellRendererCtrl",!0);if(M&&(i.createBean(M),M.init(P,e),m.current=M,n.get("detailRowAutoHeight"))){const A=()=>{if(v.current==null)return;const E=v.current.clientHeight;E!=null&&E>0&&setTimeout(()=>{e.node.setRowHeight(E),(Ne(n)||Ys(n))&&r.onRowHeightChanged()},0)};w.current=es(s,F,A),A()}},[]),x=p.useCallback(F=>{m.current?.registerDetailWithMaster(F)},[]);return p.createElement("div",{className:S,ref:y},u&&p.createElement(Pf,{className:R,...u,modules:b,rowData:g,passGridApi:x}))}),AI=class extends sp{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:nu,agGroupRowRenderer:nu,agDetailCellRenderer:kI},this.wrapIncoming=(t,s)=>s==="ensureVisible"?D6(t):t()}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}getLockOnRefresh(){this.queueUpdates=!0}releaseLockOnRefresh(){this.queueUpdates=!1,this.processQueuedUpdates()}shouldQueueUpdates(){return this.queueUpdates}runWhenReadyAsync(){return E6()}},LI=class extends p.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e;for(const t of this.apiListeners)t(e)}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return p.createElement(Pf,{...this.props,passGridApi:this.setGridApi})}};const OI="h-full",na={accentColor:"var(--controls-bg-accent, #5C8DEA)",backgroundColor:"var(--bg-layer-2, #141A23)",oddRowBackgroundColor:"var(--bg-layer-3, #222932)",borderColor:"var(--bg-layer-4, #333942)",rowBorder:"1px solid var(--border-tertiary, #090D13)",borderRadius:3,browserColorScheme:"dark",chromeBackgroundColor:"var(--bg-layer-1, #090D13)",foregroundColor:"var(--text-primary, #F3F4F6)",headerFontSize:14,headerFontWeight:600,headerTextColor:"var(--text-secondary, #7F8792)",spacing:4,wrapperBorderRadius:3,fontSize:14,fontFamily:{googleFont:"var(--theme-font, var(--font-inter))"},cellStyle:{textAlign:"center"}},ra=40,NI=(e,t,s,o,i)=>{const n=typeof e=="string"?e.toLowerCase():e,r=typeof t=="string"?t.toLowerCase():t;return n===r?0:n?r?n>r?1:-1:i?1:-1:i?-1:1},HI=({selectedRowIds:e,onSelectionChange:t,rowData:s,getRowId:o})=>{const[i,n]=p.useState(new Set),r=e??i,a=p.useCallback(g=>{if(t&&e!==void 0){const f=(s||[]).filter(m=>g.has(o(m)));try{t(g,f)}catch{}}else n(g)},[t,e,s,o]),l=p.useCallback((g,f)=>{const m=new Set(r);f?m.add(g):m.delete(g),a(m)},[r,a]),c=s?.length||0,d=r.size,u=p.useMemo(()=>d===0?"unchecked":d===c?"checked":"indeterminate",[d,c]),h=p.useCallback(()=>{if(u==="checked")a(new Set);else{const g=new Set((s||[]).map(o));a(g)}},[u,a,s,o]);return{currentSelectedIds:r,handleSelectionToggle:l,headerCheckboxState:u,handleHeaderCheckboxChange:h}};Ib.registerModules([F6]);const GI=({columnDefs:e,rowData:t,additionalGridOptions:s,getContextMenuItems:o,cssClass:i,ariaLabel:n="Data grid",withSelectionColumn:r=!0,wrapCustomCellRenderers:a=!0,selectedRowIds:l,onSelectionChange:c,getRowId:d=v=>String(v.id||JSON.stringify(v)),alternateOddRowColors:u=!1,filterPlaceholder:h="Enter value",emptyStateIcon:g,emptyStateTitle:f="No results found",emptyStateDescription:m="Sorry, we couldn't find any results for your search."})=>{const[v,w]=p.useState(ra),[b,S]=p.useState(),R=p.useId(),{currentSelectedIds:y,handleSelectionToggle:x,headerCheckboxState:F,handleHeaderCheckboxChange:P}=HI({selectedRowIds:l,onSelectionChange:c,rowData:t,getRowId:d}),M=p.useMemo(()=>({...na,oddRowBackgroundColor:u?na.oddRowBackgroundColor:na.backgroundColor}),[u]),A=p.useCallback(_=>{_.api.sizeColumnsToFit(),w(ra)},[]),E=p.useCallback(_=>{if(_.data){const U=d(_.data);return y.has(U)?"ag-row-selected":""}},[y,d]),I=p.useCallback(()=>{const _=F==="checked",U=F==="indeterminate";return C.jsx("div",{className:"flex items-center justify-center h-full header-checkbox-container",children:C.jsx(ni,{id:"header-select-all",ariaLabel:"Select all rows",checked:_,indeterminate:U,cssClass:`dial-header-select ${F}`,onChange:P})})},[F,P]),O=p.useCallback(_=>{if(_.data){const U=o?.(_.data)??[],z=_.value==null?"":String(_.value);return C.jsx(St,{trigger:[Rt.ContextMenu],menu:{items:U},anchorToMouse:!0,matchReferenceWidth:!0,cssClass:"w-full",children:C.jsx("span",{className:"block min-w-0 h-full max-w-full",children:C.jsx(Ft,{text:z,cssClass:"max-w-full h-full"})})})}},[o]),K=p.useCallback(_=>{if(!_.data)return null;const U=d(_.data),z=y.has(U),ne=`row-select-${U}`;return C.jsx("div",{className:"flex items-center justify-center h-full",children:C.jsx(ni,{id:ne,ariaLabel:"Select row",checked:z,cssClass:"dial-row-select",onChange:ve=>{x(U,!!ve)}},`${U}-${z}`)})},[y,d,x]),N=p.useCallback(_=>{const U=typeof a=="function"?a(_):!!a;if(!_.cellRenderer)return{..._,cellRenderer:O};if(!U)return _;const z=_.cellRenderer;return{..._,cellRenderer:ve=>{const W=ve.data?o?.(ve.data)??[]:[];let J=null;if(typeof z=="function"){const xe=z;J=C.jsx(xe,{...ve})}else J=O(ve);return C.jsx(St,{trigger:[Rt.ContextMenu],menu:{items:W},anchorToMouse:!0,matchReferenceWidth:!0,cssClass:"w-full h-full",children:C.jsx("span",{className:"block min-w-0 max-w-full",children:J})})}}},[o,O,a]),ie=p.useMemo(()=>({colId:"__select",headerName:"",width:40,minWidth:40,suppressSizeToFit:!0,lockPosition:!0,sortable:!1,resizable:!1,filter:!1,floatingFilter:!1,suppressMenu:!0,borderless:!0,cellRenderer:K,headerComponent:I}),[K,I]),Q=p.useMemo(()=>{const _=(e??[]).map(N);return r?[ie,..._]:_},[e,ie,r,N]),k=p.useMemo(()=>({minWidth:150,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:h,buttons:["reset"]},comparator:NI.bind(void 0)}),[h]),ee=_=>{const U=Q.map(z=>({...z,sort:void 0}));_.api.updateGridOptions({columnDefs:U,rowData:t}),_.api.sizeColumnsToFit(),S(_.api),s?.onGridReady?.(_)};p.useEffect(()=>{b&&b.redrawRows()},[b,y]);const B=p.useCallback(()=>C.jsx(Un,{title:f,description:m,containerCssClass:"gap-3",titleCssClass:"mt-2 !text-lg",icon:g||C.jsx(j.IconZoomCancel,{size:100,stroke:.5,className:"text-secondary"})}),[f,m,g]);return C.jsx("div",{className:$(OI,i,r&&"with-selection-column"),"aria-label":n,role:"region",children:C.jsx("div",{className:"ag-theme-balham-dark h-full overflow-x-auto",role:"table","aria-describedby":R,children:C.jsx(LI,{rowModelType:"clientSide",headerHeight:ra,rowHeight:v,cellSelection:!1,getRowClass:E,theme:xE.withPart(oE).withParams({...M}),autoSizeStrategy:{type:"fitGridWidth"},columnDefs:Q,defaultColDef:k,onGridSizeChanged:A,onGridReady:ee,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:B,rowData:t,...s})})})};var Wn=(e=>(e.MyFiles="my_files",e.Shared="shared",e.Organization="organization",e))(Wn||{}),rt=(e=>(e.Duplicate="duplicate",e.Copy="copy",e.Move="move",e.Rename="rename",e.Download="download",e.Delete="delete",e))(rt||{});const Tf=()=>{const[e,t]=p.useState(Ec());return p.useEffect(()=>{const s=()=>t(Ec());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},VI=({tabs:e,activeTab:t,onTabChange:s,areHiddenFilesVisible:o,onToggleHiddenFiles:i,isCreateButtonVisible:n,createButtonVariant:r=De.Secondary,createButtonDropdownItems:a=[],createButtonLabel:l="Create",hiddenFilesSwitcherLabel:c="Hidden files",showHiddenFilesLabel:d="Show hidden files",hideHiddenFilesLabel:u="Hide hidden files"})=>{const h=Tf(),g=p.useMemo(()=>[{key:"hidden-files-switch",label:o?u:d,icon:o?C.jsx(j.IconEyeOff,{...me,className:"text-secondary"}):C.jsx(j.IconEye,{...me,className:"text-secondary"}),onClick:()=>i?.(!o)}],[o,u,d,i]),f=()=>e&&t&&s?C.jsx(_u,{tabs:e,activeTab:t,onClick:w=>s(w),smallScreenThreshold:pn.Tablet,smallScreenContainerCssClass:"w-fit bg-transparent h-[38px]",smallScreenDropdownItemCssClass:"px-3 h-[38px]"}):null,m=()=>C.jsxs(C.Fragment,{children:[C.jsx(dl,{switchId:"hidden-files-switch",title:c,isOn:o,onChange:i}),n&&C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"h-6 border-l border-primary"}),C.jsx(ma,{title:l,variant:r,items:a})]})]}),v=()=>C.jsxs(C.Fragment,{children:[C.jsx(St,{menu:{items:g},allowedPlacements:["bottom","bottom-start"],children:C.jsx(Re,{cssClass:"h-[38px]",iconBefore:C.jsx(j.IconDotsVertical,{...me,className:"text-secondary hover:text-accent-primary"})})}),n?C.jsx(ma,{title:l,variant:r,items:a}):null]});return C.jsxs("div",{className:"flex w-full justify-between gap-4 items-center overflow-x-auto",children:[C.jsx("div",{className:"flex-1 min-w-0",children:f()}),C.jsx("div",{className:"flex gap-4 flex-shrink-0 items-center",children:h?v():m()})]})},BI=12,zI=8;var Ts=(e=>(e.Normal="normal",e.Reverse="reverse",e))(Ts||{});function WI({actions:e,direction:t=Ts.Normal,moreButtonWidth:s=ao,actionsGap:o=8,containerPadding:i=8,dependencies:n=[]}){const r=p.useRef(null),a=p.useRef(null),l=p.useRef(null),c=p.useRef(null),d=p.useRef([]),[u,h]=p.useState(e.length);p.useLayoutEffect(()=>{if(!a.current)return;const m=Array.from(a.current.children);d.current=m.map(v=>Math.ceil(v.getBoundingClientRect().width))},[e,...n]),p.useEffect(()=>{if(!r.current)return;let m=null;const v=()=>{m&&cancelAnimationFrame(m),m=requestAnimationFrame(()=>{const b=r.current,S=l.current?.offsetWidth??0,R=c.current?.offsetWidth??0,y=S+R,F=b.getBoundingClientRect().width-y-s-o*2-i*2,P=d.current;let M=0,A=0;if(t===Ts.Reverse)for(let E=P.length-1;E>=0&&(M+=P[E]+o,!(M>F));E--)A++;else for(const E of P){if(M+=E+o,M>F)break;A++}h(A)})},w=new ResizeObserver(v);return w.observe(r.current),v(),()=>{m&&cancelAnimationFrame(m),w.disconnect()}},[e.length,t,...n]);const g=t===Ts.Reverse?e.slice(0,e.length-u):e.slice(u);return{visibleActions:t===Ts.Reverse?e.slice(e.length-u):e.slice(0,u),hiddenActions:g,refs:{containerRef:r,measureRef:a,leftSectionRef:l,rightSectionRef:c}}}const _I=({selectionLabel:e,onClearSelection:t,actions:s})=>{const o=Tf(),{refs:{containerRef:i,leftSectionRef:n,measureRef:r},visibleActions:a,hiddenActions:l}=WI({actions:s,direction:Ts.Reverse,dependencies:[o],actionsGap:BI,containerPadding:zI});return C.jsxs(C.Fragment,{children:[C.jsx("div",{ref:r,className:"absolute top-0 left-0 invisible pointer-events-none overflow-hidden whitespace-nowrap flex gap-3",children:s.map(({key:c,icon:d,title:u})=>C.jsx(Re,{iconBefore:d,title:u,variant:De.Secondary,hideTitleOnMobile:!0},c))}),C.jsxs("div",{ref:i,className:"rounded bg-layer-0 p-2 flex justify-between items-center w-full",role:"toolbar","aria-label":"File bulk actions",children:[C.jsx("div",{ref:n,children:C.jsx(Re,{title:e,onClick:t,textCssClass:"text-accent-primary whitespace-nowrap",variant:De.Tertiary,iconBefore:C.jsx(j.IconX,{...me,className:"text-accent-primary"})})}),C.jsxs("div",{className:"flex flex-1 w-full gap-3 items-center justify-end",children:[l.length>0&&C.jsx(St,{menu:{items:l},allowedPlacements:["bottom","bottom-start"],children:C.jsx(Re,{cssClass:"h-[38px]",iconBefore:C.jsx(j.IconDotsVertical,{...me,className:"text-secondary hover:text-accent-primary"})})}),a.map(({key:c,icon:d,title:u,onClick:h,disabled:g})=>C.jsx(Re,{cssClass:"!p-[9px]",iconBefore:d,title:u,variant:De.Secondary,hideTitleOnMobile:!0,disable:g,onClick:f=>h?.({key:c,domEvent:f})},c))]})]})]})},jI=e=>re.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},re.createElement("path",{d:"M3.009 12.5527C2.77901 12.4216 2.5877 12.2321 2.45443 12.0034C2.32116 11.7746 2.25064 11.5147 2.25 11.25V3.75C2.25 2.925 2.925 2.25 3.75 2.25H11.25C11.8125 2.25 12.1185 2.53875 12.375 3M10.5 15.75H7.25025C6.98757 15.75 6.72747 15.6983 6.48479 15.5977C6.24211 15.4972 6.0216 15.3499 5.83586 15.1641C5.65012 14.9784 5.50278 14.7579 5.40226 14.5152C5.30174 14.2725 5.25 14.0124 5.25 13.7498V7.25025C5.25 6.71975 5.46074 6.21098 5.83586 5.83586C6.21098 5.46074 6.71975 5.25 7.25025 5.25H13.7498C14.0124 5.25 14.2725 5.30174 14.5152 5.40226C14.7579 5.50278 14.9784 5.65012 15.1641 5.83586C15.3499 6.0216 15.4972 6.24211 15.5977 6.48479C15.6983 6.72747 15.75 6.98757 15.75 7.25025V10.5M12.75 16.5L16.5 12.75M16.5 12.75V16.125M16.5 12.75H13.125",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),UI=e=>re.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},re.createElement("path",{d:"M9.75 14.25H3.75C3.35218 14.25 2.97064 14.092 2.68934 13.8107C2.40804 13.5294 2.25 13.1478 2.25 12.75V4.5C2.25 4.10218 2.40804 3.72064 2.68934 3.43934C2.97064 3.15804 3.35218 3 3.75 3H6.75L9 5.25H14.25C14.6478 5.25 15.0294 5.40804 15.3107 5.68934C15.592 5.97064 15.75 6.35218 15.75 6.75V9.75M12 16.5L15.75 12.75M15.75 12.75V16.125M15.75 12.75H12.375",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),$I=e=>{const[t,s]=p.useState(e?.showHiddenFiles??!1),o=!!e?.onShowHiddenFilesChange,i=o?e.showHiddenFiles??!1:t,n=p.useCallback(a=>{o?e?.onShowHiddenFilesChange?.(a):s(a)},[o,e]),r=p.useCallback(()=>{const a=!i;o?e?.onShowHiddenFilesChange?.(a):s(a)},[i,o,e]);return{areHiddenFilesVisible:i,toggleHiddenFilesVisibility:r,setAreHiddenFilesVisible:n}},KI=e=>{const[t,s]=p.useState(e?.collapsed??!1),o=!!e?.onCollapseChange,i=o?e.collapsed??!1:t,n=p.useCallback(a=>{o?e?.onCollapseChange?.(a):s(a)},[o,e]),r=p.useCallback(()=>{const a=!i;o?e?.onCollapseChange?.(a):s(a)},[i,o,e]);return{isTreeCollapsed:i,toggleTreeCollapse:r,setIsTreeCollapsed:n}},qI=(e,t)=>{if(!t.has(e))return e;const s=e.lastIndexOf("."),o=s>0,i=o?e.substring(0,s):e,n=o?e.substring(s):"";let r=1,a;do a=`${i} (${r})${n}`,r++;while(t.has(a));return a},YI=e=>e.name,aa=(e,t,s,o=!1)=>{const i=new Set(s.map(YI));return t.map(n=>{const r=n.name,a=o?r:qI(r,i);return o||i.add(a),{sourceUrl:n.path,destinationUrl:`${e}/${a}`,overwrite:o,nodeType:n.nodeType??Gt.ITEM}})},ZI=({getDestinationFiles:e,onCopyFiles:t,onMoveToFiles:s})=>{const[o,i]=p.useState(!1),[n,r]=p.useState([]),[a,l]=p.useState([]),[c,d]=p.useState("copy"),u=p.useCallback(S=>{const R=e(S),y=aa(S,n,R,!1);t?.(y,S)},[e,t,n]),h=p.useCallback((S,R)=>{const y=e(S),x=aa(S,a,y,!0);s?.(x,R,S)},[e,s,a]),g=p.useCallback(S=>{const R=S.at(0)?.parentPath??"/",y=e(R),x=aa(R,S,y,!1);t?.(x,R)},[t,e]),f=p.useCallback(S=>{d(S),i(!0)},[]),m=p.useCallback(()=>{r([]),l([])},[]),v=p.useCallback(()=>{i(!1),m()},[m]),w=p.useCallback(S=>{r(S)},[]),b=p.useCallback(S=>{l(S)},[]);return{handleDuplicate:g,handleCloseDestinationFolderPopup:v,handleOpenDestinationFolderPopup:f,handleCopyTo:u,handleMoveTo:h,openDestinationFolderPopup:o,destinationFolderMode:c,handleSetCopiedFiles:w,handleSetMovedFiles:b,clearState:m}},QI=({path:e,onPathChange:t,onSelectionClear:s})=>{const[o,i]=p.useState(e);p.useEffect(()=>{i(e),s?.()},[e,s]);const n=p.useCallback(r=>{i(r),t?.(r),s?.()},[t,s]);return{currentPath:o,setCurrentPath:i,handlePathChange:n}},XI=({onDeleteFiles:e})=>{const[t,s]=p.useState(!1),[o,i]=p.useState([]),[n,r]=p.useState(""),a=p.useCallback((d,u)=>{i(d),r(u),s(!0)},[]),l=p.useCallback(()=>{s(!1),i([])},[]),c=p.useCallback(()=>{if(e&&o.length>0){const d=o.map(u=>({sourceUrl:u.path,nodeType:u.nodeType}));e(d,n)}l()},[o,e,l,n]);return{deleteConfirmationOpen:t,itemsToDelete:o,openDeleteConfirmation:a,closeDeleteConfirmation:l,confirmDelete:c}},JI=({onDownloadFiles:e})=>({handleDownloadFiles:p.useCallback(s=>{e&&s.length>0&&e(s)},[e])}),Mf=p.createContext(void 0);function If(e,t,s){const o=e.path.replace(t,s),i={sourceUrl:e.path,destinationUrl:o,nodeType:e.nodeType};if(!e.items||e.items.length===0)return[i];const n=e.items.flatMap(r=>If(r,t,s));return[i,...n]}function ek(e,t){const s=e.replace(/\/+$/,"").split("/");return s[s.length-1]=t,s.join("/")}const tk=({items:e,onRename:t,onRenameSave:s,onRenameCancel:o,onRenameValidate:i,onMoveToFiles:n})=>{const[r,a]=p.useState(),l=p.useCallback(h=>{t?.(h),a(h)},[t]),c=p.useCallback(()=>{a(void 0),o?.()},[o]),d=p.useCallback(h=>{if(n&&r){const g=ek(r,h),f=Cn(e,r);if(f){const m=If(f,r,g);n(m,r,g)}}a(void 0),s?.(h)},[s,r,n,e]),u=p.useCallback((h,g)=>i?.(h,g)??null,[i]);return{renamedPath:r,renameHandler:l,renameSaveHandler:d,renameCancelHandler:c,renameValidateHandler:u}},sk=e=>{if(!e||e<=0)return"-";const t=1024,s=t*1024;return e>=s?`${(e/s).toFixed(1)} MB`:e>=t?`${(e/t).toFixed(0)} KB`:`${e} bytes`},kf=({children:e,cssClass:t,items:s=[],rootItem:o,path:i,showHiddenFiles:n,onShowHiddenFilesChange:r,treeOptions:a,navigationPanelOptions:l,deleteConfirmationOptions:c,gridOptions:d,toolbarOptions:u,bulkActionsToolbarOptions:h,destinationFolderPopupOptions:g,onPathChange:f,onTableFileClick:m,onCopyFiles:v,onMoveToFiles:w,onDeleteFiles:b,onDownloadFiles:S,onRename:R,onRenameSave:y,onRenameCancel:x,onRenameValidate:F})=>{const[P,M]=p.useState(new Set),A=p.useCallback(()=>M(new Set),[]),{currentPath:E,setCurrentPath:I,handlePathChange:O}=QI({path:i,onPathChange:f,onSelectionClear:A}),[K,N]=p.useState(),ie=g?.destinationFolderPath??K,Q=p.useCallback(Ve=>{g?.setDestinationFolderPath?g.setDestinationFolderPath(Ve):N(Ve)},[g]),{areHiddenFilesVisible:k,toggleHiddenFilesVisibility:ee}=$I({showHiddenFiles:n,onShowHiddenFilesChange:r}),{isTreeCollapsed:B,toggleTreeCollapse:_,setIsTreeCollapsed:U}=KI({collapsed:a?.collapsed,onCollapseChange:a?.onCollapseChange}),{renamedPath:z,renameHandler:ne,renameSaveHandler:ve,renameCancelHandler:W,renameValidateHandler:J}=tk({items:s,onRename:R,onRenameSave:y,onRenameCancel:x,onRenameValidate:F,onMoveToFiles:w}),[xe,we]=p.useState("");p.useEffect(()=>{const Ve=l?.value;Ve!=null&&we(String(Ve))},[l?.value]);const oe=String(l?.value??xe??"").trim(),He=p.useMemo(()=>Nc(s,E)??s[0],[s,E]),{handleCopyTo:Fe,handleMoveTo:je,handleDuplicate:H,handleOpenDestinationFolderPopup:pe,handleCloseDestinationFolderPopup:te,openDestinationFolderPopup:de,handleSetCopiedFiles:Ge,handleSetMovedFiles:Oe,destinationFolderMode:ae}=ZI({getDestinationFiles:Ve=>Nc(s,Ve)?.items??[],onCopyFiles:v,onMoveToFiles:w});p.useEffect(()=>{de&&!ie&&Q(E??o?.path??"/")},[de,ie,E,o?.path,Q]),p.useEffect(()=>{de||Q(void 0)},[de,Q]);const{deleteConfirmationOpen:Ce,itemsToDelete:We,openDeleteConfirmation:he,closeDeleteConfirmation:Se,confirmDelete:os}=XI({onDeleteFiles:b}),{handleDownloadFiles:ur}=JI({onDownloadFiles:S}),Ai=p.useMemo(()=>{const Ve=Zi(oe).trim(),Ho=He?.items??[];let gr=Ve?E1(He):Ho;k||(gr=gr.filter(Ke=>!dh(Ke)));const ac=gr.map(Ke=>({id:Ke.id??Ke.path,name:Ke.name??Ke.path.split("/").pop()??"",updatedAt:Ke.updatedAt,size:Ke.nodeType===Gt.ITEM?sk(Ke.contentLength):"-",author:Ke.author,path:Ke.path,nodeType:Ke.nodeType,extension:Ke.extension}));if(!Ve)return ac;const Hf=Ve.split(/\s+/).filter(Boolean);return ac.filter(Ke=>{const Gf=Zi(Ke.name),Vf=Zi(Ke.author),Bf=F1(Ke.extension);return Hf.every(pr=>Gf.includes(pr)||Vf.includes(pr)||Bf.includes(pr))})},[He,oe,k]),Pe=p.useCallback(Ve=>{O(Ve.path)},[O]),et=p.useCallback(Ve=>{O(Ve)},[O]),hr=p.useCallback(Ve=>{const Ho=String(Ve??"");we(Ho),l?.onSearchChange?.(Ho)},[l]),Of=p.useCallback(Ve=>{Ve.nodeType===Gt.FOLDER?O(Ve.path):m?.(Ve)},[O,m]),Nf={cssClass:t,items:s,rootItem:o,treeOptions:a,navigationPanelOptions:l,gridOptions:d,toolbarOptions:u,bulkActionsToolbarOptions:h,deleteConfirmationOptions:c,destinationFolderPopupOptions:{destinationFolderPath:ie,setDestinationFolderPath:Q},currentPath:E,setCurrentPath:I,searchValue:xe,effectiveSearchValue:oe,setSearchValue:we,areHiddenFilesVisible:k,toggleHiddenFilesVisibility:ee,isTreeCollapsed:B,toggleTreeCollapse:_,setIsTreeCollapsed:U,selectedIds:P,setSelectedIds:M,clearSelection:A,currentFolder:He,gridRows:Ai,handleCopyTo:Fe,handleMoveTo:je,handleDuplicate:H,handleSetCopiedFiles:Ge,handleSetMovedFiles:Oe,openDestinationFolderPopup:de,handleCloseDestinationFolderPopup:te,handleOpenDestinationFolderPopup:pe,destinationFolderMode:ae,handleDownloadFiles:ur,renamedPath:z,onRename:ne,onRenameSave:ve,onRenameCancel:W,onRenameValidate:J,openDeleteConfirmation:he,closeDeleteConfirmation:Se,confirmDelete:os,deleteConfirmationOpen:Ce,itemsToDelete:We,handlePathChange:O,handleTreeItemClick:Pe,handleBreadcrumbItemClick:et,handleSearchChange:hr,handleTableRowClick:Of,onTableFileClick:m};return C.jsx(Mf.Provider,{value:Nf,children:e})},Af=()=>{const e=p.useContext(Mf);if(!e)throw new Error("useFileManagerContext must be used within <FileManagerProvider>");return e},ok=({open:e,itemsToDelete:t,onClose:s,onConfirm:o,cancelLabel:i="Cancel",confirmLabel:n="Delete",titleRenderer:r,contentRenderer:a})=>{const l=t.map(g=>g.name),d=r?.(l)||"Confirm Deleting Items",u=C.jsxs("div",{className:"px-6 py-3 dial-small",children:[C.jsx("p",{className:"text-secondary mb-3",children:t.length===1?C.jsxs(C.Fragment,{children:["Do you want to delete file or folder"," ",C.jsxs("span",{className:"text-primary",children:['"',t[0].name,'"']}),"?"]}):C.jsxs(C.Fragment,{children:["Do you want to delete the following"," ",C.jsx("span",{className:"text-primary",children:t.length})," item",t.length!==1?"s":"","?"]})}),t.length>1&&C.jsx(C.Fragment,{children:t.length<=10?C.jsx("ul",{className:"space-y-1 text-primary list-none",children:t.map(g=>C.jsx("li",{className:"truncate",children:g.name},g.path))}):C.jsxs(C.Fragment,{children:[C.jsx("ul",{className:"space-y-1 text-primary list-none mb-2",children:t.slice(0,10).map(g=>C.jsx("li",{className:"truncate",children:g.name},g.path))}),C.jsxs("p",{className:"text-secondary italic",children:["... and ",t.length-10," more"]})]})})]}),h=a?.(l)||u;return C.jsx(Qu,{open:e,title:d,confirmLabel:n,cancelLabel:i,variant:Ro.Danger,onClose:s,onConfirm:o,children:h})},ik=({onClose:e,onConfirm:t,open:s,copyLabel:o="Copy",moveLabel:i="Move",addFolderLabel:n="Add folder",mode:r="copy",hiddenFilesSwitcherLabel:a="Show hidden files",...l})=>{const[c,d]=p.useState(!1),u=p.useCallback(h=>{d(h)},[]);return C.jsx(xi,{open:s,onClose:()=>{e()},size:Ot.Lg,footer:C.jsxs("div",{className:"flex justify-between space-x-2 py-4 px-6",children:[C.jsxs("div",{className:"flex space-x-4",children:[C.jsx(Re,{title:n,variant:De.Tertiary,iconBefore:C.jsx(j.IconFolderPlus,{...me})}),C.jsx("div",{className:"border border-l border-primary my-2"}),C.jsx("div",{className:"inline-flex items-center cursor-pointer",onClick:h=>{h.stopPropagation(),u(!c)},children:C.jsx(dl,{title:a,isOn:c,onChange:u,switchId:"hidden-files-switch"})})]}),C.jsxs("div",{className:"flex space-x-4",children:[C.jsx(Re,{onClick:e,title:"Cancel",variant:De.Secondary}),C.jsx(Re,{onClick:t,title:r==="copy"?o:i,variant:De.Primary})]})]}),children:C.jsx(Lf,{...l,showHiddenFiles:c,onShowHiddenFilesChange:u,treeOptions:{...l.treeOptions,collapsed:!0,expandedPaths:new Set([l.rootItem?.path||"/"])}})})},Lf=e=>C.jsx(kf,{...e,children:C.jsx(nk,{})}),nk=()=>{const{cssClass:e,items:t,rootItem:s,treeOptions:o,navigationPanelOptions:i,gridOptions:n,toolbarOptions:r,bulkActionsToolbarOptions:a,deleteConfirmationOptions:l,destinationFolderPopupOptions:c,areHiddenFilesVisible:d,toggleHiddenFilesVisibility:u,isTreeCollapsed:h,toggleTreeCollapse:g,currentPath:f,gridRows:m,selectedIds:v,setSelectedIds:w,clearSelection:b,effectiveSearchValue:S,handleBreadcrumbItemClick:R,handleSearchChange:y,handleTreeItemClick:x,handleTableRowClick:F,handleOpenDestinationFolderPopup:P,handleCloseDestinationFolderPopup:M,openDestinationFolderPopup:A,destinationFolderMode:E,handleSetCopiedFiles:I,handleSetMovedFiles:O,handleDuplicate:K,handleCopyTo:N,handleMoveTo:ie,handleDownloadFiles:Q,openDeleteConfirmation:k,closeDeleteConfirmation:ee,confirmDelete:B,deleteConfirmationOpen:_,itemsToDelete:U,renamedPath:z,onRename:ne,onRenameSave:ve,onRenameCancel:W,onRenameValidate:J}=Af(),{width:xe=S1,title:we=y1,containerCssClass:oe=w1,additionalButtons:He,...Fe}=o??{},{columnDefs:je,filterable:H=!0,dateLocale:pe,dateOptions:te,...de}=n??{},Ge=p.useMemo(()=>[{field:"name",headerName:"Name",flex:1,minWidth:200,cellRenderer:he=>he.data?.nodeType===Gt.FOLDER?C.jsx(al,{name:he.data.name}):C.jsx(rl,{name:he.data.name})},{field:"updatedAt",headerName:"Modified Date",width:168,suppressSizeToFit:!0,cellRenderer:zu,cellRendererParams:{locale:pe,emptyPlaceholder:"—",options:te}},{field:"size",headerName:"Size",width:120,suppressSizeToFit:!0}],[pe,te]),Oe=je??Ge,ae=p.useMemo(()=>H?Oe:Oe.map(he=>({...he,filter:!1,floatingFilter:!1})),[Oe,H]),Ce=he=>{const Se=[];return o?.actionLabels&&(o.actionLabels[rt.Duplicate]&&Se.push({key:"duplicate",label:o.actionLabels[rt.Duplicate],icon:C.jsx(j.IconCopy,{...me,className:"text-secondary"}),onClick:()=>K([he])}),o.actionLabels[rt.Copy]&&Se.push({key:"copy",label:o.actionLabels[rt.Copy],icon:C.jsx(jI,{width:me.size,height:me.size,className:"text-secondary"}),onClick:()=>{I([he]),P("copy")}}),o.actionLabels[rt.Move]&&Se.push({key:"move",label:o.actionLabels[rt.Move],icon:C.jsx(UI,{width:me.size,height:me.size,className:"text-secondary"}),onClick:()=>{O([he]),P("move")}}),o.actionLabels[rt.Download]&&Se.push({key:"download",label:o.actionLabels[rt.Download],icon:C.jsx(j.IconDownload,{...me,className:"text-secondary"}),onClick:()=>Q([he])}),o.actionLabels[rt.Rename]&&Se.push({key:"rename",label:o.actionLabels[rt.Rename],icon:C.jsx(j.IconPencilMinus,{...me,className:"text-secondary"}),onClick:()=>ne(he.path)}),o.actionLabels[rt.Delete]&&Se.push({key:"delete",label:o.actionLabels[rt.Delete],icon:C.jsx(j.IconTrashX,{...me,className:"text-secondary"}),onClick:()=>k([he],he.parentPath??"")})),Se},We=he=>{w(he)};return C.jsxs("section",{className:ue(m1,{"gap-3 pt-4":a&&v.size>0},e),children:[r&&v.size===0&&C.jsx("div",{className:Oc,role:"toolbar","aria-label":"File Manager Toolbar",children:C.jsx(VI,{...r,areHiddenFilesVisible:d,onToggleHiddenFiles:u})}),v.size>0&&a&&C.jsx("div",{className:Oc,role:"toolbar","aria-label":"File Manager Toolbar",children:C.jsx(_I,{...a,onClearSelection:b,selectionLabel:`${v.size} ${a.selectionLabel}`})}),C.jsxs("div",{className:C1,children:[C.jsx("aside",{role:"region","aria-label":"File Manager Tree Navigation",className:"min-h-0 min-w-0 h-full flex-none",children:C.jsx(Du,{width:xe,title:we,containerCssClass:oe,additionalButtons:He,isOpened:h,onToggle:g,children:C.jsx(M1,{...Fe,items:t,selectedPath:f,onItemClick:x,areHiddenFilesVisible:d,getContextMenuItems:Ce,renamedPath:z,onRenameSave:ve,onRenameCancel:W,onRenameValidate:J})})}),C.jsxs("div",{className:v1,children:[C.jsx(L1,{...i??{},path:f,onItemClick:R,makeHref:he=>"/"+he.join("/"),rootItemPath:s?.path,rootItemLabel:s?.breadcrumbLabel,value:S,onSearchChange:y}),C.jsx("section",{role:"region","aria-label":"File Manager Grid View",className:b1,children:C.jsx(GI,{columnDefs:ae,rowData:m,getRowId:he=>he.path,...de,additionalGridOptions:{...de.additionalGridOptions,onCellClicked:he=>{he.colDef.colId!=="__select"&&he.data&&F(he.data)}},selectedRowIds:v,onSelectionChange:We})})]})]}),C.jsx(ok,{open:_,itemsToDelete:U,onClose:ee,onConfirm:B,cancelLabel:l?.cancelLabel,confirmLabel:l?.confirmLabel,titleRenderer:l?.titleRenderer,contentRenderer:l?.contentRenderer}),C.jsx(ik,{open:A,onClose:M,onConfirm:()=>{const he=c?.destinationFolderPath??"/";E==="copy"?N(he):ie(he,f??"/"),M()},mode:E,items:t,rootItem:s,onPathChange:c?.setDestinationFolderPath,path:c?.destinationFolderPath,addFolderLabel:c?.addFolderLabel,copyLabel:c?.copyLabel,moveLabel:c?.moveLabel,hiddenFilesSwitcherLabel:c?.hiddenFilesSwitcherLabel,gridOptions:{columnDefs:ae}})]})},rk=e=>{const[t,s]=p.useState(Wn.MyFiles),o=n=>{s(n)},i=p.useMemo(()=>{if(e)return Object.values(Wn).map(n=>({id:n,name:e?.[n]||n.replace("_"," ")}))},[e]);return{activeTab:t,handleTabChange:o,tabs:i}};exports.AlertVariant=Fs;exports.ButtonVariant=De;exports.ConfirmationPopupVariant=Ro;exports.DialAlert=Tm;exports.DialAutocompleteInput=Ww;exports.DialAutocompleteInputValue=ul;exports.DialBreadcrumb=Ku;exports.DialBreadcrumbItem=Uo;exports.DialButton=Re;exports.DialButtonDropdown=ma;exports.DialCheckbox=ni;exports.DialCloseButton=cl;exports.DialCollapsibleSidebar=Du;exports.DialConfirmationPopup=Qu;exports.DialDateCellRenderer=zu;exports.DialDraggableItem=Kv;exports.DialDropdown=St;exports.DialEllipsisTooltip=Ft;exports.DialErrorText=us;exports.DialFieldLabel=Ks;exports.DialFileIcon=nl;exports.DialFileManager=Lf;exports.DialFileManagerActions=rt;exports.DialFileManagerTabs=Wn;exports.DialFileName=rl;exports.DialFileNodeType=Gt;exports.DialFilePermission=ch;exports.DialFileResourceType=lh;exports.DialFolderName=al;exports.DialFormItem=jn;exports.DialFormPopup=Hw;exports.DialIcon=Ee;exports.DialInput=Gs;exports.DialInputPopup=Xu;exports.DialItemType=Vs;exports.DialLabelledText=_m;exports.DialLoadFileAreaField=g1;exports.DialLoader=Ri;exports.DialNoDataContent=Un;exports.DialNumberInputField=yw;exports.DialPasswordInput=Ju;exports.DialPasswordInputField=Bw;exports.DialPopup=xi;exports.DialRadioButton=Fu;exports.DialRadioGroup=Eu;exports.DialRadioGroupPopupField=Aw;exports.DialRemoveButton=qu;exports.DialSearch=hl;exports.DialSelect=th;exports.DialSelectField=Yw;exports.DialSharedEntityIndicator=li;exports.DialSteps=Hm;exports.DialSwitch=dl;exports.DialTabs=_u;exports.DialTag=Kn;exports.DialTagInput=_w;exports.DialTextAreaField=xw;exports.DialTextInputField=Rw;exports.DialTextarea=Yu;exports.DialTooltip=Xt;exports.DropdownItemType=ll;exports.DropdownTrigger=Rt;exports.DropdownType=Wu;exports.FileManagerProvider=kf;exports.FlexibleActionsDirection=Ts;exports.FormItemOrientation=ri;exports.PopupSize=Ot;exports.RadioGroupOrientation=ai;exports.SearchSize=ci;exports.SelectSize=fn;exports.SelectVariant=mn;exports.StepStatus=ct;exports.TabOrientation=gn;exports.TagVariant=$n;exports.mergeClasses=ue;exports.useDialFileManagerTabs=rk;exports.useEditableItem=uh;exports.useFileManagerContext=Af;
|