@epam/ai-dial-ui-kit 0.10.0-dev.18 → 0.10.0-dev.19

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.
@@ -3,7 +3,7 @@
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
5
5
  let props = %s;
6
- <%s key={someKey} {...props} />`,ie,ne,Me,ne),I[ne+ie]=!0)}if(ne=null,q!==void 0&&(s(q),ne=""+q),r(V)&&(s(V.key),ne=""+V.key),"key"in V){q={};for(var X in V)X!=="key"&&(q[X]=V[X])}else q=V;return ne&&a(q,typeof k=="function"?k.displayName||k.name||"Unknown":k),c(k,ne,q,o(),ve,O)}function u(k){h(k)?k._store&&(k._store.validated=1):typeof k=="object"&&k!==null&&k.$$typeof===D&&(k._payload.status==="fulfilled"?h(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function h(k){return typeof k=="object"&&k!==null&&k.$$typeof===m}var p=g,m=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),y=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),M=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,K=Array.isArray,L=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(k){return k()}};var H,G={},_=p.react_stack_bottom_frame.bind(p,n)(),te=L(i(n)),I={};Zn.Fragment=C,Zn.jsx=function(k,V,q){var ie=1e4>M.recentlyCreatedOwnerStacks++;return d(k,V,q,!1,ie?Error("react-stack-top-frame"):_,ie?L(i(k)):te)},Zn.jsxs=function(k,V,q){var ie=1e4>M.recentlyCreatedOwnerStacks++;return d(k,V,q,!0,ie?Error("react-stack-top-frame"):_,ie?L(i(k)):te)}})()),Zn}var eg;function s0(){return eg||(eg=1,process.env.NODE_ENV==="production"?Fa.exports=e0():Fa.exports=t0()),Fa.exports}var f=s0();const i0=(e,t)=>{const s=new Array(e.length+t.length);for(let i=0;i<e.length;i++)s[i]=e[i];for(let i=0;i<t.length;i++)s[e.length+i]=t[i];return s},o0=(e,t)=>({classGroupId:e,validator:t}),Mm=(e=new Map,t=null,s)=>({nextPart:e,validators:t,classGroupId:s}),dl="-",tg=[],n0="arbitrary..",r0=e=>{const t=l0(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return a0(r);const a=r.split(dl),l=a[0]===""&&a.length>1?1:0;return Am(a,l,t)},getConflictingClassGroupIds:(r,a)=>{if(a){const l=i[r],c=s[r];return l?c?i0(c,l):l:c||tg}return s[r]||tg}}},Am=(e,t,s)=>{if(e.length-t===0)return s.classGroupId;const o=e[t],n=s.nextPart.get(o);if(n){const c=Am(e,t+1,n);if(c)return c}const r=s.validators;if(r===null)return;const a=t===0?e.join(dl):e.slice(t).join(dl),l=r.length;for(let c=0;c<l;c++){const d=r[c];if(d.validator(a))return d.classGroupId}},a0=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),s=t.indexOf(":"),i=t.slice(0,s);return i?n0+i:void 0})(),l0=e=>{const{theme:t,classGroups:s}=e;return c0(s,t)},c0=(e,t)=>{const s=Mm();for(const i in e){const o=e[i];rh(o,s,i,t)}return s},rh=(e,t,s,i)=>{const o=e.length;for(let n=0;n<o;n++){const r=e[n];d0(r,t,s,i)}},d0=(e,t,s,i)=>{if(typeof e=="string"){u0(e,t,s);return}if(typeof e=="function"){h0(e,t,s,i);return}p0(e,t,s,i)},u0=(e,t,s)=>{const i=e===""?t:Lm(t,e);i.classGroupId=s},h0=(e,t,s,i)=>{if(g0(e)){rh(e(i),t,s,i);return}t.validators===null&&(t.validators=[]),t.validators.push(o0(s,e))},p0=(e,t,s,i)=>{const o=Object.entries(e),n=o.length;for(let r=0;r<n;r++){const[a,l]=o[r];rh(l,Lm(t,a),s,i)}},Lm=(e,t)=>{let s=e;const i=t.split(dl),o=i.length;for(let n=0;n<o;n++){const r=i[n];let a=s.nextPart.get(r);a||(a=Mm(),s.nextPart.set(r,a)),s=a}return s},g0=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,f0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),i=Object.create(null);const o=(n,r)=>{s[n]=r,t++,t>e&&(t=0,i=s,s=Object.create(null))};return{get(n){let r=s[n];if(r!==void 0)return r;if((r=i[n])!==void 0)return o(n,r),r},set(n,r){n in s?s[n]=r:o(n,r)}}},au="!",sg=":",m0=[],ig=(e,t,s,i,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:i,isExternal:o}),v0=e=>{const{prefix:t,experimentalParseClassName:s}=e;let i=o=>{const n=[];let r=0,a=0,l=0,c;const d=o.length;for(let v=0;v<d;v++){const C=o[v];if(r===0&&a===0){if(C===sg){n.push(o.slice(l,v)),l=v+1;continue}if(C==="/"){c=v;continue}}C==="["?r++:C==="]"?r--:C==="("?a++:C===")"&&a--}const u=n.length===0?o:o.slice(l);let h=u,p=!1;u.endsWith(au)?(h=u.slice(0,-1),p=!0):u.startsWith(au)&&(h=u.slice(1),p=!0);const m=c&&c>l?c-l:void 0;return ig(n,p,h,m)};if(t){const o=t+sg,n=i;i=r=>r.startsWith(o)?n(r.slice(o.length)):ig(m0,!1,r,void 0,!0)}if(s){const o=i;i=n=>s({className:n,parseClassName:o})}return i},C0=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((s,i)=>{t.set(s,1e6+i)}),s=>{const i=[];let o=[];for(let n=0;n<s.length;n++){const r=s[n],a=r[0]==="[",l=t.has(r);a||l?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(r)):o.push(r)}return o.length>0&&(o.sort(),i.push(...o)),i}},w0=e=>({cache:f0(e.cacheSize),parseClassName:v0(e),sortModifiers:C0(e),...r0(e)}),b0=/\s+/,x0=(e,t)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:n}=t,r=[],a=e.trim().split(b0);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:u,modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}=s(d);if(u){l=d+(l.length>0?" "+l:l);continue}let C=!!v,w=i(C?m.substring(0,v):m);if(!w){if(!C){l=d+(l.length>0?" "+l:l);continue}if(w=i(m),!w){l=d+(l.length>0?" "+l:l);continue}C=!1}const b=h.length===0?"":h.length===1?h[0]:n(h).join(":"),x=p?b+au:b,y=x+w;if(r.indexOf(y)>-1)continue;r.push(y);const S=o(w,C);for(let E=0;E<S.length;++E){const F=S[E];r.push(x+F)}l=d+(l.length>0?" "+l:l)}return l},y0=(...e)=>{let t=0,s,i,o="";for(;t<e.length;)(s=e[t++])&&(i=Om(s))&&(o&&(o+=" "),o+=i);return o},Om=e=>{if(typeof e=="string")return e;let t,s="";for(let i=0;i<e.length;i++)e[i]&&(t=Om(e[i]))&&(s&&(s+=" "),s+=t);return s},S0=(e,...t)=>{let s,i,o,n;const r=l=>{const c=t.reduce((d,u)=>u(d),e());return s=w0(c),i=s.cache.get,o=s.cache.set,n=a,a(l)},a=l=>{const c=i(l);if(c)return c;const d=x0(l,s);return o(l,d),d};return n=r,(...l)=>n(y0(...l))},R0=[],dt=e=>{const t=s=>s[e]||R0;return t.isThemeGetter=!0,t},Nm=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Hm=/^\((?:(\w[\w-]*):)?(.+)\)$/i,F0=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,E0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,D0=/\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$/,P0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,T0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,k0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ai=e=>F0.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),li=e=>!!e&&Number.isInteger(Number(e)),sd=e=>e.endsWith("%")&&Le(e.slice(0,-1)),_s=e=>E0.test(e),Bm=()=>!0,I0=e=>D0.test(e)&&!P0.test(e),ah=()=>!1,M0=e=>T0.test(e),A0=e=>k0.test(e),L0=e=>!fe(e)&&!me(e),O0=e=>Ti(e,zm,ah),fe=e=>Nm.test(e),Vi=e=>Ti(e,Wm,I0),og=e=>Ti(e,j0,Le),N0=e=>Ti(e,_m,Bm),H0=e=>Ti(e,jm,ah),ng=e=>Ti(e,Gm,ah),B0=e=>Ti(e,Vm,A0),Ea=e=>Ti(e,Um,M0),me=e=>Hm.test(e),Xn=e=>xo(e,Wm),G0=e=>xo(e,jm),rg=e=>xo(e,Gm),V0=e=>xo(e,zm),z0=e=>xo(e,Vm),Da=e=>xo(e,Um,!0),W0=e=>xo(e,_m,!0),Ti=(e,t,s)=>{const i=Nm.exec(e);return i?i[1]?t(i[1]):s(i[2]):!1},xo=(e,t,s=!1)=>{const i=Hm.exec(e);return i?i[1]?t(i[1]):s:!1},Gm=e=>e==="position"||e==="percentage",Vm=e=>e==="image"||e==="url",zm=e=>e==="length"||e==="size"||e==="bg-size",Wm=e=>e==="length",j0=e=>e==="number",jm=e=>e==="family-name",_m=e=>e==="number"||e==="weight",Um=e=>e==="shadow",_0=()=>{const e=dt("color"),t=dt("font"),s=dt("text"),i=dt("font-weight"),o=dt("tracking"),n=dt("leading"),r=dt("breakpoint"),a=dt("container"),l=dt("spacing"),c=dt("radius"),d=dt("shadow"),u=dt("inset-shadow"),h=dt("text-shadow"),p=dt("drop-shadow"),m=dt("blur"),v=dt("perspective"),C=dt("aspect"),w=dt("ease"),b=dt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...y(),me,fe],E=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],R=()=>[me,fe,l],D=()=>[ai,"full","auto",...R()],T=()=>[li,"none","subgrid",me,fe],P=()=>["auto",{span:["full",li,me,fe]},li,me,fe],M=()=>[li,"auto",me,fe],N=()=>["auto","min","max","fr",me,fe],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...R()],G=()=>[ai,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],_=()=>[ai,"screen","full","dvw","lvw","svw","min","max","fit",...R()],te=()=>[ai,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],I=()=>[e,me,fe],k=()=>[...y(),rg,ng,{position:[me,fe]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",V0,O0,{size:[me,fe]}],ie=()=>[sd,Xn,Vi],ve=()=>["","none","full",c,me,fe],O=()=>["",Le,Xn,Vi],ne=()=>["solid","dashed","dotted","double"],Me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[Le,sd,rg,ng],oe=()=>["","none",m,me,fe],U=()=>["none",Le,me,fe],he=()=>["none",Le,me,fe],z=()=>[Le,me,fe],ce=()=>[ai,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_s],breakpoint:[_s],color:[Bm],container:[_s],"drop-shadow":[_s],ease:["in","out","in-out"],font:[L0],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_s],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_s],shadow:[_s],spacing:["px",Le],text:[_s],"text-shadow":[_s],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ai,fe,me,C]}],container:["container"],columns:[{columns:[Le,fe,me,a]}],"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:S()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[li,"auto",me,fe]}],basis:[{basis:[ai,"full","auto",a,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,ai,"auto","initial","none",fe]}],grow:[{grow:["",Le,me,fe]}],shrink:[{shrink:["",Le,me,fe]}],order:[{order:[li,"first","last","none",me,fe]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mbs:[{mbs:H()}],mbe:[{mbe:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",..._()]}],"min-inline-size":[{"min-inline":["auto",..._()]}],"max-inline-size":[{"max-inline":["none",..._()]}],"block-size":[{block:["auto",...te()]}],"min-block-size":[{"min-block":["auto",...te()]}],"max-block-size":[{"max-block":["none",...te()]}],w:[{w:[a,"screen",...G()]}],"min-w":[{"min-w":[a,"screen","none",...G()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[r]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",s,Xn,Vi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,W0,N0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",sd,fe]}],"font-family":[{font:[G0,H0,t]}],"font-features":[{"font-features":[fe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,me,fe]}],"line-clamp":[{"line-clamp":[Le,"none",me,og]}],leading:[{leading:[n,...R()]}],"list-image":[{"list-image":["none",me,fe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,fe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",me,Vi]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Le,"auto",me,fe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,fe]}],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",me,fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},li,me,fe],radial:["",me,fe],conic:[li,me,fe]},z0,B0]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:ve()}],"rounded-s":[{"rounded-s":ve()}],"rounded-e":[{"rounded-e":ve()}],"rounded-t":[{"rounded-t":ve()}],"rounded-r":[{"rounded-r":ve()}],"rounded-b":[{"rounded-b":ve()}],"rounded-l":[{"rounded-l":ve()}],"rounded-ss":[{"rounded-ss":ve()}],"rounded-se":[{"rounded-se":ve()}],"rounded-ee":[{"rounded-ee":ve()}],"rounded-es":[{"rounded-es":ve()}],"rounded-tl":[{"rounded-tl":ve()}],"rounded-tr":[{"rounded-tr":ve()}],"rounded-br":[{"rounded-br":ve()}],"rounded-bl":[{"rounded-bl":ve()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-bs":[{"border-bs":O()}],"border-w-be":[{"border-be":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":O()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,me,fe]}],"outline-w":[{outline:["",Le,Xn,Vi]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",d,Da,Ea]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",u,Da,Ea]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Le,Vi]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",h,Da,Ea]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Le,me,fe]}],"mix-blend":[{"mix-blend":[...Me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Me()}],"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":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[me,fe]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":y()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,fe]}],filter:[{filter:["","none",me,fe]}],blur:[{blur:oe()}],brightness:[{brightness:[Le,me,fe]}],contrast:[{contrast:[Le,me,fe]}],"drop-shadow":[{"drop-shadow":["","none",p,Da,Ea]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Le,me,fe]}],"hue-rotate":[{"hue-rotate":[Le,me,fe]}],invert:[{invert:["",Le,me,fe]}],saturate:[{saturate:[Le,me,fe]}],sepia:[{sepia:["",Le,me,fe]}],"backdrop-filter":[{"backdrop-filter":["","none",me,fe]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[Le,me,fe]}],"backdrop-contrast":[{"backdrop-contrast":[Le,me,fe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,me,fe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,me,fe]}],"backdrop-invert":[{"backdrop-invert":["",Le,me,fe]}],"backdrop-opacity":[{"backdrop-opacity":[Le,me,fe]}],"backdrop-saturate":[{"backdrop-saturate":[Le,me,fe]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,me,fe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,fe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",me,fe]}],ease:[{ease:["linear","initial",w,me,fe]}],delay:[{delay:[Le,me,fe]}],animate:[{animate:["none",b,me,fe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,me,fe]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:U()}],"rotate-x":[{"rotate-x":U()}],"rotate-y":[{"rotate-y":U()}],"rotate-z":[{"rotate-z":U()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:z()}],"skew-x":[{"skew-x":z()}],"skew-y":[{"skew-y":z()}],transform:[{transform:[me,fe,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"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",me,fe]}],"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":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",me,fe]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Le,Xn,Vi,og]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]}},U0=S0(_0);function se(...e){return U0(ae(e))}var ul=(e=>(e.Description="description",e.Error="error",e))(ul||{});const Gr=({text:e,className:t,variant:s=ul.Description,...i})=>e?f.jsx("span",{...i,role:"alert",className:se("dial-tiny-text",s===ul.Error?"text-error":"text-secondary",t),children:e}):null,ds=({...e})=>f.jsx(Gr,{...e,variant:ul.Error});var Ke=(e=>(e.Primary="primary",e.Neutral="neutral",e.Error="error",e.Success="Success",e.Secondary="secondary",e.Tertiary="tertiary",e))(Ke||{}),Oe=(e=>(e.Solid="solid",e.Outlined="outlined",e.Ghost="ghost",e.Link="link",e))(Oe||{});const ag={[Ke.Primary]:{[Oe.Solid]:"dial-primary-solid-button",[Oe.Ghost]:"dial-primary-ghost-button",[Oe.Link]:"dial-primary-link-button"},[Ke.Neutral]:{[Oe.Outlined]:"dial-neutral-outlined-button"},[Ke.Error]:{[Oe.Solid]:"dial-error-solid-button",[Oe.Ghost]:"dial-error-ghost-button"},[Ke.Success]:{[Oe.Ghost]:"dial-success-ghost-button"},[Ke.Secondary]:{[Oe.Ghost]:"dial-secondary-ghost-button"},[Ke.Tertiary]:{[Oe.Ghost]:"dial-tertiary-ghost-button"}},$m=(e=Ke.Primary,t=Oe.Solid)=>{const s=ag[e]?.[t];return s||(console.warn(`Could not find Button styles for variant: ${e} and appearance: ${t}. Using default primary solid button styles.`),ag[Ke.Primary][Oe.Solid])},$0=7,q0=2,qm=g.createContext(null),Km=()=>{const e=g.useContext(qm);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e},K0=({initialOpen:e=!1,placement:t="bottom",isTriggerClickable:s=!1,open:i,onOpenChange:o}={})=>{const[n,r]=g.useState(e),a=g.useRef(null),l=i??n,c=o??r,d=Re.useFloating({placement:t,open:l,onOpenChange:c,whileElementsMounted:Re.autoUpdate,middleware:[Re.offset($0+q0),Re.flip({crossAxis:t.includes("-"),fallbackAxisSideDirection:"start",padding:5}),Re.shift({padding:5}),Re.arrow({element:a})]}),u=Re.useHover(d.context,{move:!1,enabled:i==null,mouseOnly:s,delay:{open:500,close:0}}),h=Re.useFocus(d.context,{enabled:i==null}),p=Re.useDismiss(d.context),m=Re.useRole(d.context,{role:"tooltip"}),v=Re.useInteractions([u,h,p,m]);return g.useEffect(()=>{if(!l)return;const C=d.refs.reference.current;if(!(C instanceof Element))return;const w=new IntersectionObserver(([b])=>{b.isIntersecting||c(!1)},{root:null,threshold:0});return w.observe(C),()=>w.disconnect()},[l,d.refs.reference,c]),g.useMemo(()=>({open:l,setOpen:c,arrowRef:a,...v,...d}),[l,c,v,d])},lh=({children:e,...t})=>{const s=K0(t);return f.jsx(qm.Provider,{value:s,children:e})},ch=({style:e,...t})=>{const s=Km(),i=g.useRef(null),o=Re.useMergeRefs([s.refs.setFloating,i]);return s.open?f.jsx(Re.FloatingPortal,{id:"tooltip-portal",children:f.jsxs("div",{ref:o,style:{...s.floatingStyles,...e},...s.getFloatingProps(t),className:ae("z-[55] whitespace-pre-wrap break-words rounded border border-primary bg-layer-0 px-2 py-1 dial-tiny-text shadow max-w-[300px]",s.getFloatingProps(t).className),children:[t.children,f.jsx(Re.FloatingArrow,{ref:s.arrowRef,context:s.context,fill:"currentColor",strokeWidth:1,className:"stroke-primary text-[var(--bg-layer-0,_#000000)]"})]})}):null},dh=({children:e,asChild:t=!1,...s})=>{const i=Km(),o=t&&g.isValidElement(e),n=o?e.props?.ref:null,r=Re.useMergeRefs([i.refs.setReference,...n?[n]:[]]);return o?g.cloneElement(e,i.getReferenceProps({...e.props,...s,ref:r})):f.jsx("span",{ref:r,...i.getReferenceProps(s),className:s.className??"dial-tooltip-trigger text-left",children:e})},Wt=({hideTooltip:e,tooltip:t,children:s,triggerClassName:i,contentClassName:o,...n})=>f.jsxs(lh,{...n,children:[f.jsx(dh,{className:ae(i,"truncate"),children:s}),f.jsx(ch,{className:ae("text-primary",o,"max-w-[300px]",(e||!t)&&"hidden"),children:t})]});var wt=(e=>(e.Small="small",e.Standard="standard",e))(wt||{});const ki=({variant:e,appearance:t=Oe.Solid,size:s=wt.Standard,className:i,icon:o,tooltipProps:n,type:r="button",...a})=>{const l=se(e&&$m(e,t),s===wt.Small?"h-[24px] w-[24px]":"h-[40px] w-[40px]","dial-icon-button disabled:cursor-not-allowed focus-visible:outline outline-offset-0 disabled:text-controls-secondary-disable",i),c=f.jsx("button",{...a,type:r,className:l,"aria-label":a["aria-label"],children:o});return n?f.jsx(Wt,{...n,children:c}):c},Y0="w-[24px] h-[24px] border border-solid rounded-[6px] border-transparent flex items-center justify-center text-secondary hover:text-controls-accent-primary-hover active:text-controls-accent-primary-active focus-within:border-focus";var xt=(e=>(e[e.LG=24]="LG",e[e.MD=20]="MD",e[e.SM=16]="SM",e))(xt||{});const qt=18,J={size:qt,stroke:2},Ym=({caption:e,onClick:t})=>{if(!e)return null;const s=f.jsx(ki,{"aria-label":e,className:Y0,icon:f.jsx(j.IconInfoCircle,{size:xt.SM}),onClick:t});return e?f.jsx(Wt,{tooltip:e,triggerClassName:"flex justify-center items-center",children:s}):s},yo=({label:e,required:t,className:s,caption:i,...o})=>e?f.jsxs("label",{...o,className:se("dial-tiny-text text-secondary flex items-center gap-1",s),children:[typeof e=="string"?f.jsx("span",{className:"min-h-4",children:e}):e,t&&f.jsx("span",{className:"text-accent-primary",children:"*"}),f.jsx(Ym,{caption:i})]}):null,ze=({icon:e,className:t})=>e?f.jsx("span",{className:ae("flex-shrink-0",t),children:e}):null,us=({label:e,variant:t,appearance:s=Oe.Solid,size:i=wt.Standard,className:o,textClassName:n,iconAfter:r,iconBefore:a,hideTitleOnMobile:l,type:c="button",tooltipProps:d,...u})=>{const h=ae(l?"hidden sm:inline":"inline",n),p=se(t&&$m(t,s),i===wt.Small?"dial-tiny-semi-text":"dial-small-semi-text",s!==Oe.Link&&(i===wt.Small?"h-[24px] px-2":"h-[40px] px-3"),"disabled:cursor-not-allowed focus-visible:outline outline-offset-0",o),m=f.jsxs("button",{...u,type:c,className:p,"aria-label":typeof e=="string"&&e||u["aria-label"],children:[f.jsx(ze,{icon:a}),e&&f.jsx("span",{className:h,children:e}),f.jsx(ze,{icon:r})]});return d?f.jsx(Wt,{...d,children:m}):m};var Cs=(e=>(e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e))(Cs||{});const Z0=e=>({info:f.jsx(j.IconInfoCircle,{...e}),error:f.jsx(j.IconAlertCircle,{...e}),warning:f.jsx(j.IconAlertTriangle,{...e}),success:f.jsx(j.IconCircleCheck,{...e})}),X0={[Cs.Info]:"bg-info border-info text-info",[Cs.Success]:"bg-success border-success text-success",[Cs.Warning]:"bg-warning border-warning text-warning",[Cs.Error]:"bg-error border-error text-error"},Q0="items-center justify-between gap-2 p-3 border border-solid dial-small-text-150 rounded flex",Zm=({variant:e=Cs.Info,message:t,className:s,iconSize:i=24,iconStroke:o=2,closable:n=!1,onClose:r,children:a,...l})=>{const c=g.useMemo(()=>Z0({size:i,stroke:o})[e],[e,i,o]);return f.jsxs("div",{...l,role:"alert",className:se(Q0,X0[e],s),children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(ze,{icon:c}),f.jsx("div",{className:"text-primary",children:t})]}),a,n&&f.jsx(us,{className:"ml-2 text-secondary hover:text-primary","aria-label":"Close alert",iconBefore:f.jsx(j.IconX,{size:xt.SM}),onClick:r})]})},J0="flex items-center justify-center text-secondary",ex="shrink-0 grow-0 basis-auto animate-spin-steps",tx=e=>xe.createElement("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.createElement("path",{d:"M24 39V46.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),xe.createElement("path",{opacity:.4,d:"M9 24H1.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),xe.createElement("path",{opacity:.5,d:"M8.0918 8.0918L13.3994 13.3994",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),xe.createElement("path",{opacity:.6,d:"M24 1.5V9",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),xe.createElement("path",{opacity:.7,d:"M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),xe.createElement("path",{opacity:.8,d:"M46.5 24H39",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),xe.createElement("path",{opacity:.9,d:"M34.6055 34.6055L39.9082 39.9082",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),xe.createElement("path",{opacity:.3,d:"M13.3936 34.6055L8.08594 39.9131",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})),Vr=({size:e=18,className:t,iconClassName:s,fullWidth:i=!0,ariaLabel:o="Loading"})=>f.jsx("div",{role:"status",className:ae({[J0]:!0,"w-full h-full":i,[t||""]:!!t}),children:f.jsx(ze,{icon:f.jsx(tx,{width:e,height:e,className:ae(ex,s),role:"img","aria-label":o})})}),sx="text-primary",gt=({text:e,className:t,contentClassName:s,hideTooltip:i,id:o,customTooltipContent:n,...r})=>{const a=g.useRef(null),[l,c]=g.useState(!1),[d,u]=g.useState(""),h=g.useRef(null),p=()=>{const w=a.current;if(!w)return;u(w.textContent??"");const b=w.clientWidth,x=w.scrollWidth,y=Math.ceil(w.getBoundingClientRect().width);c(x>b||x>y)},m=g.useCallback(()=>{h.current&&cancelAnimationFrame(h.current),h.current=requestAnimationFrame(p)},[]);g.useEffect(()=>{m();const w=()=>m();window.addEventListener("resize",w);let b=null;return"ResizeObserver"in window&&a.current&&(b=new ResizeObserver(()=>m()),b.observe(a.current)),()=>{window.removeEventListener("resize",w),b&&b.disconnect(),h.current&&cancelAnimationFrame(h.current)}},[e,m]);const v=g.useMemo(()=>typeof e=="string"?e:d,[d,e]),C=g.useMemo(()=>i?"":n||(l?v:""),[n,v,i,l]);return f.jsxs(lh,{...r,children:[f.jsx(dh,{asChild:!0,onMouseEnter:m,onFocusCapture:m,children:f.jsx("span",{id:o,className:se("block truncate flex-1 min-w-0 max-w-full text-left",t),"aria-label":l?v:void 0,onMouseEnter:m,onFocus:m,ref:a,children:e})}),f.jsx(ch,{className:se(sx,s,!C&&"hidden"),children:C})]})},lu="checkbox-container",cu=({label:e,id:t,checked:s,indeterminate:i,disabled:o,ariaLabel:n,onChange:r,className:a,...l})=>{const c=g.useCallback(p=>{r?.(p.target.checked,t)},[r,t]),d=ae("flex flex-row items-center cursor-pointer text-accent-primary small-medium min-w-0",`${s||i?"":'before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:border before:border-hover before:rounded'}`,o?"pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4":"",a),u=ae("border rounded",o?"bg-layer-4 border-icon-secondary":""),h=()=>i?f.jsx(j.IconMinus,{className:u,...J}):s?f.jsx(j.IconCheck,{className:u,...J}):null;return f.jsxs("label",{...l,className:d,htmlFor:t,"aria-description":l["aria-description"]||lu,children:[h(),e&&(typeof e=="string"?f.jsx(gt,{text:e,className:"ml-2 text-primary"}):e),f.jsx("input",{type:"checkbox",role:"checkbox",name:t,onChange:c,id:t,checked:s,"aria-checked":i?"mixed":s,"aria-disabled":o||void 0,"aria-label":e?void 0:n,className:"invisible size-0"})]})};var Zt=(e=>(e.VALID="valid",e.ERROR="error",e))(Zt||{});const ix=(e,t)=>{if(t===e.id)switch(e.status){case Zt.VALID:return"border-accent-secondary text-primary";case Zt.ERROR:return"border-red-900 text-primary";default:return"border-accent-primary text-primary"}switch(e.status){case Zt.VALID:return"border-primary text-primary";case Zt.ERROR:return"border-red-900 text-error";default:return"border-primary text-secondary"}},ox=(e,t)=>{if(t===e.id)switch(e.status){case Zt.VALID:return"bg-accent-secondary";case Zt.ERROR:return"bg-red-400";default:return"bg-accent-primary"}switch(e.status){case Zt.VALID:return"bg-accent-secondary";case Zt.ERROR:return"bg-red-400";default:return"bg-layer-4"}},nx=({step:e,index:t,currentStep:s,onChangeStep:i})=>{const o="h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny-text 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===Zt.ERROR?f.jsx(j.IconExclamationCircle,{stroke:2,size:xt.SM}):s!==e.id&&e.status===Zt.VALID?f.jsx(j.IconCheck,{stroke:2,size:xt.SM}):t+1;return f.jsxs("button",{className:ae(o,ix(e,s)),onClick:()=>i(e.id),children:[f.jsx("span",{className:ae(n,ox(e,s)),children:r()}),f.jsx("span",{children:e.name})]})},rx=({steps:e,currentStep:t,onChangeStep:s})=>{const i=o=>{const n=e.findIndex(a=>a.id===t),r=e.findIndex(a=>a.id===o);(o!==t&&e[n].status===Zt.VALID||r<n)&&s(o)};return f.jsx("div",{id:"steps",className:"flex gap-x-3",children:e.map((o,n)=>f.jsx(nx,{currentStep:t,onChangeStep:i,step:o,index:n},o.id))})},Xi=({name:e,value:t,label:s,description:i,checked:o=!1,inputId:n,className:r,labelClassName:a,disabled:l,onChange:c,descriptionClassName:d,caption:u})=>{const h=`${n}-desc`,p=ae("dial-small-text cursor-pointer py-[1px]",l?"text-secondary":"text-primary",a),m=ae("cursor-pointer dial-input-radio",!!s&&"mr-2",r),v=ae("flex flex-col",!!i&&"mb-2"),C=ae("dial-tiny-text mt-2 ml-[26px] text-secondary",d),w=b=>{l||b.target.checked&&c?.(t)};return f.jsxs("div",{className:v,children:[f.jsxs("div",{className:ae("flex flex-row",!u&&"items-center"),children:[f.jsx("input",{type:"radio",id:n,name:e,value:t,checked:o,disabled:l,"aria-describedby":o&&i?h:void 0,className:m,onChange:w}),(s||u)&&f.jsxs("div",{className:"flex flex-col gap-1",children:[s&&f.jsx("label",{className:p,htmlFor:n,"aria-describedby":u?"caption":"",children:s}),u&&f.jsx("span",{id:"caption",className:"dial-tiny-text text-secondary",children:u})]})]}),o&&i&&f.jsx("div",{id:h,className:C,children:i})]})};var yr=(e=>(e.Vertical="vertical",e.Horizontal="horizontal",e))(yr||{});const ax="w-full flex gap-2",lx={[yr.Vertical]:"flex-col",[yr.Horizontal]:"flex-row items-end"},Kl=({id:e,label:t,required:s,description:i,error:o,orientation:n=yr.Vertical,labelVisuallyHidden:r=!1,className:a,labelClassName:l,errorClassName:c,childrenClassName:d,captionDescription:u,readonly:h,value:p,defaultEmptyText:m,children:v})=>{const C=`${e}-label`,w=i?`${e}-desc`:void 0,b=o?`${e}-err`:void 0,x=`${e}-caption-desc`,y=[w,b].filter(Boolean).join(" ")||void 0,S=g.useCallback(()=>typeof o=="boolean"?null:typeof o=="string"||typeof o>"u"?o?f.jsx("div",{id:b,"aria-live":"polite",className:c,children:f.jsx(ds,{text:o})}):null:f.jsx("div",{id:b,role:"alert","aria-live":"polite",className:c,children:o}),[o,c,b]),E=g.useCallback(()=>p?typeof p=="string"||typeof p=="number"?f.jsx("span",{"aria-readonly":"true",children:p}):p:f.jsx("span",{className:"flex min-h-4","aria-readonly":"true",children:m??"None"}),[p,m]);return f.jsxs("div",{role:"group","aria-labelledby":t?C:void 0,"aria-describedby":y,className:se(ax,lx[n],a),children:[t&&f.jsx("div",{id:C,className:se(n==="horizontal"&&"shrink-0"),children:f.jsx(yo,{htmlFor:e,label:t,required:s,className:se(r&&"sr-only",l),caption:i})}),f.jsxs("div",{className:se("min-w-0 w-full",d),children:[h?f.jsx("div",{className:"dial-input px-3 py-2",children:E()}):v,u&&f.jsx("div",{id:x,className:se({"dial-tiny-text text-secondary mt-1":!0,"text-error":!!o}),children:u}),S()]})]})};var no=(e=>(e.Row="Row",e.Column="Column",e))(no||{});const cx="flex",dx="pb-1 mt-2",ux={[no.Column]:"flex-col gap-y-3",[no.Row]:"flex-row gap-x-6"},hl=({fieldTitle:e,radioClassName:t,containerClassName:s,selectedItemClassName:i,selectedLabelClassName:o,radioGroupClassName:n,inputContainerClassName:r,selectedInputContainerClassName:a,groupLabelClassName:l,formItemChildrenClassName:c,labelClassName:d,disabled:u,elementId:h,radioButtons:p,activeRadioButton:m,orientation:v,onChange:C})=>f.jsx(Kl,{id:h,label:e,labelClassName:l||d,className:s,childrenClassName:c,children:f.jsx("div",{role:"radiogroup","aria-label":e,"aria-disabled":u||void 0,className:se(cx,ux[v],n),children:p.map(w=>f.jsxs("div",{className:se("flex flex-col",r,w.id===m&&a),children:[f.jsx(Xi,{name:h,value:w.id,inputId:`${h}-${w.id}`,disabled:u,className:t,labelClassName:se(d,w.id===m&&o),label:w.name,caption:w.caption,checked:w.id===m,onChange:()=>C(w.id)}),w.id===m&&w.content?f.jsx("div",{className:se(dx,i),children:w.content}):null]},w.id))})}),zr=({icon:e,title:t,description:s,containerClassName:i,titleClassName:o,descriptionClassName:n})=>f.jsxs("div",{className:se("h-full w-full flex flex-col items-center justify-center text-secondary",i),"aria-label":"no-data-container",children:[e||f.jsx(j.IconClipboardX,{width:60,height:60,stroke:.5}),f.jsx("span",{className:se("dial-small-text mt-2 text-primary",o),"aria-label":"no-results-title",children:t}),s&&f.jsx("span",{className:se("mt-1 text-primary",n),"aria-label":"no-results-description",children:s})]}),id=48,Xm=({containerClassName:e,children:t,width:s=280,title:i,iconSize:o=24,iconStroke:n=1.5,titleClassName:r,additionalButtons:a,isOpened:l,onToggle:c})=>{const[d,u]=g.useState(s),[h,p]=g.useState(!0),m=g.useMemo(()=>typeof l=="boolean",[l]),v=m?l:h;g.useEffect(()=>{m&&u(l?s:id)},[m,l,s]);const C=se(["transform rotate-180 [writing-mode:tb-rl] py-4 px-3",v&&"hidden",r]),w=se(["flex flex-row gap-2 cursor-pointer text-secondary py-2 items-center",v?"justify-end px-4":"justify-center"]),b=x=>{const y=!v;if(m){u(y?s:id),c?.(y,x);return}u(y?s:id),p(y)};return f.jsxs("div",{className:se(["rounded flex flex-col justify-between",e]),style:{width:`${d}px`},"aria-label":"collapsible-sidebar",children:[f.jsx("div",{className:se(["flex-1 p-4 min-h-0 overflow-auto",!v&&"hidden"]),children:t}),f.jsx("div",{className:C,children:i}),f.jsxs("div",{className:se("border-t border-tertiary h-12",w),children:[v&&a,f.jsx(ki,{className:"hover:text-accent-primary",onClick:b,"aria-label":"sidebar-state",size:wt.Small,icon:v?f.jsx(j.IconChevronsLeft,{size:o,stroke:n}):f.jsx(j.IconChevronsRight,{size:o,stroke:n})})]})]})},hx=({label:e,text:t,tooltip:s,children:i,postfix:o,className:n})=>f.jsxs("div",{className:se("flex flex-col",i?"":"max-w-[200px]",n),children:[e&&f.jsx("label",{className:"dial-tiny-text mb-2 text-secondary",children:e}),i||f.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[f.jsx(Wt,{triggerClassName:"text-primary flex-1 min-w-0",tooltip:s||t,children:t}),o||null]})]});var Yl=(e=>(e.Default="default",e))(Yl||{});const px={[Yl.Default]:"border-icon-secondary bg-layer-3"},Qo=({tag:e,className:t,remove:s,variant:i=Yl.Default,iconBefore:o,bordered:n=!0})=>{const r=px[i],a=se("flex items-center gap-1 dial-tiny-text rounded p-1 h-[22px] text-primary",r,n?"border":"border-transparent",t);return f.jsxs("div",{className:a,children:[f.jsx(ze,{icon:o}),f.jsx(gt,{text:e}),s&&f.jsx(us,{className:"p-0",iconAfter:f.jsx(j.IconX,{size:xt.SM}),onClick:l=>s(l)})]},e)},Qm=g.createContext({dragDropManager:void 0});function ss(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 lg=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),cg=function(){return Math.random().toString(36).substring(7).split("").join(".")},dg={INIT:"@@redux/INIT"+cg(),REPLACE:"@@redux/REPLACE"+cg()};function gx(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 fx(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(Cx(e))return"date";if(vx(e))return"error";var s=mx(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 mx(e){return typeof e.constructor=="function"?e.constructor.name:null}function vx(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Cx(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function jo(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=fx(e)),t}function Jm(e,t,s){var i;if(typeof t=="function"&&typeof s=="function"||typeof s=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?ss(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"?ss(1):"Expected the enhancer to be a function. Instead, received: '"+jo(s)+"'");return s(Jm)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?ss(2):"Expected the root reducer to be a function. Instead, received: '"+jo(e)+"'");var o=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"?ss(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(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?ss(4):"Expected the listener to be a function. Instead, received: '"+jo(v)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?ss(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 C=!0;return c(),a.push(v),function(){if(C){if(l)throw new Error(process.env.NODE_ENV==="production"?ss(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.");C=!1,c();var b=a.indexOf(v);a.splice(b,1),r=null}}}function h(v){if(!gx(v))throw new Error(process.env.NODE_ENV==="production"?ss(7):"Actions must be plain objects. Instead, the actual type was: '"+jo(v)+"'. 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 v.type>"u")throw new Error(process.env.NODE_ENV==="production"?ss(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"?ss(9):"Reducers may not dispatch actions.");try{l=!0,n=o(n,v)}finally{l=!1}for(var C=r=a,w=0;w<C.length;w++){var b=C[w];b()}return v}function p(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?ss(10):"Expected the nextReducer to be a function. Instead, received: '"+jo(v));o=v,h({type:dg.REPLACE})}function m(){var v,C=u;return v={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?ss(11):"Expected the observer to be an object. Instead, received: '"+jo(b)+"'");function x(){b.next&&b.next(d())}x();var y=C(x);return{unsubscribe:y}}},v[lg]=function(){return this},v}return h({type:dg.INIT}),i={dispatch:h,subscribe:u,getState:d,replaceReducer:p},i[lg]=m,i}function Ie(e,t,...s){if(wx()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let i;if(t===void 0)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let o=0;i=new Error(t.replace(/%s/g,function(){return s[o++]})),i.name="Invariant Violation"}throw i.framesToPop=1,i}}function wx(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function bx(e,t,s){return t.split(".").reduce((i,o)=>i&&i[o]?i[o]:s||null,e)}function xx(e,t){return e.filter(s=>s!==t)}function ev(e){return typeof e=="object"}function yx(e,t){const s=new Map,i=n=>{s.set(n,s.has(n)?s.get(n)+1:1)};e.forEach(i),t.forEach(i);const o=[];return s.forEach((n,r)=>{n===1&&o.push(r)}),o}function Sx(e,t){return e.filter(s=>t.indexOf(s)>-1)}const uh="dnd-core/INIT_COORDS",Zl="dnd-core/BEGIN_DRAG",hh="dnd-core/PUBLISH_DRAG_SOURCE",Xl="dnd-core/HOVER",Ql="dnd-core/DROP",Jl="dnd-core/END_DRAG";function ug(e,t){return{type:uh,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const Rx={type:uh,payload:{clientOffset:null,sourceClientOffset:null}};function Fx(e){return function(s=[],i={publishSource:!0}){const{publishSource:o=!0,clientOffset:n,getSourceClientOffset:r}=i,a=e.getMonitor(),l=e.getRegistry();e.dispatch(ug(n)),Ex(s,a,l);const c=Tx(s,a);if(c==null){e.dispatch(Rx);return}let d=null;if(n){if(!r)throw new Error("getSourceClientOffset must be defined");Dx(r),d=r(c)}e.dispatch(ug(n,d));const h=l.getSource(c).beginDrag(a,c);if(h==null)return;Px(h),l.pinSource(c);const p=l.getSourceType(c);return{type:Zl,payload:{itemType:p,item:h,sourceId:c,clientOffset:n||null,sourceClientOffset:d||null,isSourcePublic:!!o}}}}function Ex(e,t,s){Ie(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(i){Ie(s.getSource(i),"Expected sourceIds to be registered.")})}function Dx(e){Ie(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Px(e){Ie(ev(e),"Item must be an object.")}function Tx(e,t){let s=null;for(let i=e.length-1;i>=0;i--)if(t.canDragSource(e[i])){s=e[i];break}return s}function kx(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Ix(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.forEach(function(o){kx(e,o,s[o])})}return e}function Mx(e){return function(s={}){const i=e.getMonitor(),o=e.getRegistry();Ax(i),Nx(i).forEach((r,a)=>{const l=Lx(r,a,o,i),c={type:Ql,payload:{dropResult:Ix({},s,l)}};e.dispatch(c)})}}function Ax(e){Ie(e.isDragging(),"Cannot call drop while not dragging."),Ie(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Lx(e,t,s,i){const o=s.getTarget(e);let n=o?o.drop(i,e):void 0;return Ox(n),typeof n>"u"&&(n=t===0?{}:i.getDropResult()),n}function Ox(e){Ie(typeof e>"u"||ev(e),"Drop result must either be an object or undefined.")}function Nx(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Hx(e){return function(){const s=e.getMonitor(),i=e.getRegistry();Bx(s);const o=s.getSourceId();return o!=null&&(i.getSource(o,!0).endDrag(s,o),i.unpinSource()),{type:Jl}}}function Bx(e){Ie(e.isDragging(),"Cannot call endDrag while not dragging.")}function du(e,t){return t===null?e===null:Array.isArray(e)?e.some(s=>s===t):e===t}function Gx(e){return function(s,{clientOffset:i}={}){Vx(s);const o=s.slice(0),n=e.getMonitor(),r=e.getRegistry(),a=n.getItemType();return Wx(o,r,a),zx(o,n,r),jx(o,n,r),{type:Xl,payload:{targetIds:o,clientOffset:i||null}}}}function Vx(e){Ie(Array.isArray(e),"Expected targetIds to be an array.")}function zx(e,t,s){Ie(t.isDragging(),"Cannot call hover while not dragging."),Ie(!t.didDrop(),"Cannot call hover after drop.");for(let i=0;i<e.length;i++){const o=e[i];Ie(e.lastIndexOf(o)===i,"Expected targetIds to be unique in the passed array.");const n=s.getTarget(o);Ie(n,"Expected targetIds to be registered.")}}function Wx(e,t,s){for(let i=e.length-1;i>=0;i--){const o=e[i],n=t.getTargetType(o);du(n,s)||e.splice(i,1)}}function jx(e,t,s){e.forEach(function(i){s.getTarget(i).hover(t,i)})}function _x(e){return function(){if(e.getMonitor().isDragging())return{type:hh}}}function Ux(e){return{beginDrag:Fx(e),publishDragSource:_x(e),hover:Gx(e),drop:Mx(e),endDrag:Hx(e)}}class $x{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 i(n){return(...r)=>{const a=n.apply(t,r);typeof a<"u"&&s(a)}}const o=Ux(this);return Object.keys(o).reduce((n,r)=>{const a=o[r];return n[r]=i(a),n},{})}dispatch(t){this.store.dispatch(t)}constructor(t,s){this.isSetUp=!1,this.handleRefCountChange=()=>{const i=this.store.getState().refCount>0;this.backend&&(i&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!i&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=s,t.subscribe(this.handleRefCountChange)}}function qx(e,t){return{x:e.x+t.x,y:e.y+t.y}}function tv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Kx(e){const{clientOffset:t,initialClientOffset:s,initialSourceClientOffset:i}=e;return!t||!s||!i?null:tv(qx(t,i),s)}function Yx(e){const{clientOffset:t,initialClientOffset:s}=e;return!t||!s?null:tv(t,s)}const lr=[],ph=[];lr.__IS_NONE__=!0;ph.__IS_ALL__=!0;function Zx(e,t){return e===lr?!1:e===ph||typeof t>"u"?!0:Sx(t,e).length>0}class Xx{subscribeToStateChange(t,s={}){const{handlerIds:i}=s;Ie(typeof t=="function","listener must be a function."),Ie(typeof i>"u"||Array.isArray(i),"handlerIds, when specified, must be an array of strings.");let o=this.store.getState().stateId;const n=()=>{const r=this.store.getState(),a=r.stateId;try{a===o||a===o+1&&!Zx(r.dirtyHandlerIds,i)||t()}finally{o=a}};return this.store.subscribe(n)}subscribeToOffsetChange(t){Ie(typeof t=="function","listener must be a function.");let s=this.store.getState().dragOffset;const i=()=>{const o=this.store.getState().dragOffset;o!==s&&(s=o,t())};return this.store.subscribe(i)}canDragSource(t){if(!t)return!1;const s=this.registry.getSource(t);return Ie(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(Ie(s,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const i=this.registry.getTargetType(t),o=this.getItemType();return du(i,o)&&s.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const s=this.registry.getSource(t,!0);if(Ie(s,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const i=this.registry.getSourceType(t),o=this.getItemType();return i!==o?!1:s.isDragging(this,t)}isOverTarget(t,s={shallow:!1}){if(!t)return!1;const{shallow:i}=s;if(!this.isDragging())return!1;const o=this.registry.getTargetType(t),n=this.getItemType();if(n&&!du(o,n))return!1;const r=this.getTargetIds();if(!r.length)return!1;const a=r.indexOf(t);return i?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 Kx(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Yx(this.store.getState().dragOffset)}constructor(t,s){this.store=t,this.registry=s}}const hg=typeof global<"u"?global:self,sv=hg.MutationObserver||hg.WebKitMutationObserver;function iv(e){return function(){const s=setTimeout(o,0),i=setInterval(o,50);function o(){clearTimeout(s),clearInterval(i),e()}}}function Qx(e){let t=1;const s=new sv(e),i=document.createTextNode("");return s.observe(i,{characterData:!0}),function(){t=-t,i.data=t}}const Jx=typeof sv=="function"?Qx:iv;class ey{enqueueTask(t){const{queue:s,requestFlush:i}=this;s.length||(i(),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 i=0,o=t.length-this.index;i<o;i++)t[i]=t[i+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=Jx(this.flush),this.requestErrorThrow=iv(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class ty{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 sy{create(t){const s=this.freeTasks,i=s.length?s.pop():new ty(this.onError,o=>s[s.length]=o);return i.task=t,i}constructor(t){this.onError=t,this.freeTasks=[]}}const ov=new ey,iy=new sy(ov.registerPendingError);function oy(e){ov.enqueueTask(iy.create(e))}const gh="dnd-core/ADD_SOURCE",fh="dnd-core/ADD_TARGET",mh="dnd-core/REMOVE_SOURCE",ec="dnd-core/REMOVE_TARGET";function ny(e){return{type:gh,payload:{sourceId:e}}}function ry(e){return{type:fh,payload:{targetId:e}}}function ay(e){return{type:mh,payload:{sourceId:e}}}function ly(e){return{type:ec,payload:{targetId:e}}}function cy(e){Ie(typeof e.canDrag=="function","Expected canDrag to be a function."),Ie(typeof e.beginDrag=="function","Expected beginDrag to be a function."),Ie(typeof e.endDrag=="function","Expected endDrag to be a function.")}function dy(e){Ie(typeof e.canDrop=="function","Expected canDrop to be a function."),Ie(typeof e.hover=="function","Expected hover to be a function."),Ie(typeof e.drop=="function","Expected beginDrag to be a function.")}function uu(e,t){if(t&&Array.isArray(e)){e.forEach(s=>uu(s,!1));return}Ie(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 ns;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(ns||(ns={}));let uy=0;function hy(){return uy++}function py(e){const t=hy().toString();switch(e){case ns.SOURCE:return`S${t}`;case ns.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function pg(e){switch(e[0]){case"S":return ns.SOURCE;case"T":return ns.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function gg(e,t){const s=e.entries();let i=!1;do{const{done:o,value:[,n]}=s.next();if(n===t)return!0;i=!!o}while(!i);return!1}class gy{addSource(t,s){uu(t),cy(s);const i=this.addHandler(ns.SOURCE,t,s);return this.store.dispatch(ny(i)),i}addTarget(t,s){uu(t,!0),dy(s);const i=this.addHandler(ns.TARGET,t,s);return this.store.dispatch(ry(i)),i}containsHandler(t){return gg(this.dragSources,t)||gg(this.dropTargets,t)}getSource(t,s=!1){return Ie(this.isSourceId(t),"Expected a valid source ID."),s&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return Ie(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return Ie(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return Ie(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return pg(t)===ns.SOURCE}isTargetId(t){return pg(t)===ns.TARGET}removeSource(t){Ie(this.getSource(t),"Expected an existing source."),this.store.dispatch(ay(t)),oy(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){Ie(this.getTarget(t),"Expected an existing target."),this.store.dispatch(ly(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const s=this.getSource(t);Ie(s,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=s}unpinSource(){Ie(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,s,i){const o=py(t);return this.types.set(o,s),t===ns.SOURCE?this.dragSources.set(o,i):t===ns.TARGET&&this.dropTargets.set(o,i),o}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const fy=(e,t)=>e===t;function my(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function vy(e,t,s=fy){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(!s(e[i],t[i]))return!1;return!0}function Cy(e=lr,t){switch(t.type){case Xl:break;case gh:case fh:case ec:case mh:return lr;case Zl:case hh:case Jl:case Ql:default:return ph}const{targetIds:s=[],prevTargetIds:i=[]}=t.payload,o=yx(s,i);if(!(o.length>0||!vy(s,i)))return lr;const r=i[i.length-1],a=s[s.length-1];return r!==a&&(r&&o.push(r),a&&o.push(a)),o}function wy(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function by(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.forEach(function(o){wy(e,o,s[o])})}return e}const fg={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function xy(e=fg,t){const{payload:s}=t;switch(t.type){case uh:case Zl:return{initialSourceClientOffset:s.sourceClientOffset,initialClientOffset:s.clientOffset,clientOffset:s.clientOffset};case Xl:return my(e.clientOffset,s.clientOffset)?e:by({},e,{clientOffset:s.clientOffset});case Jl:case Ql:return fg;default:return e}}function yy(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function _o(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.forEach(function(o){yy(e,o,s[o])})}return e}const Sy={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ry(e=Sy,t){const{payload:s}=t;switch(t.type){case Zl:return _o({},e,{itemType:s.itemType,item:s.item,sourceId:s.sourceId,isSourcePublic:s.isSourcePublic,dropResult:null,didDrop:!1});case hh:return _o({},e,{isSourcePublic:!0});case Xl:return _o({},e,{targetIds:s.targetIds});case ec:return e.targetIds.indexOf(s.targetId)===-1?e:_o({},e,{targetIds:xx(e.targetIds,s.targetId)});case Ql:return _o({},e,{dropResult:s.dropResult,didDrop:!0,targetIds:[]});case Jl:return _o({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Fy(e=0,t){switch(t.type){case gh:case fh:return e+1;case mh:case ec:return e-1;default:return e}}function Ey(e=0){return e+1}function Dy(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Py(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.forEach(function(o){Dy(e,o,s[o])})}return e}function Ty(e={},t){return{dirtyHandlerIds:Cy(e.dirtyHandlerIds,{type:t.type,payload:Py({},t.payload,{prevTargetIds:bx(e,"dragOperation.targetIds",[])})}),dragOffset:xy(e.dragOffset,t),refCount:Fy(e.refCount,t),dragOperation:Ry(e.dragOperation,t),stateId:Ey(e.stateId)}}function ky(e,t=void 0,s={},i=!1){const o=Iy(i),n=new Xx(o,new gy(o)),r=new $x(o,n),a=e(r,t,s);return r.receiveBackend(a),r}function Iy(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Jm(Ty,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function My(e,t){if(e==null)return{};var s=Ay(e,t),i,o;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(s[i]=e[i])}return s}function Ay(e,t){if(e==null)return{};var s={},i=Object.keys(e),o,n;for(n=0;n<i.length;n++)o=i[n],!(t.indexOf(o)>=0)&&(s[o]=e[o]);return s}let mg=0;const Ka=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Ly=g.memo(function(t){var{children:s}=t,i=My(t,["children"]);const[o,n]=Oy(i);return g.useEffect(()=>{if(n){const r=nv();return++mg,()=>{--mg===0&&(r[Ka]=null)}}},[]),f.jsx(Qm.Provider,{value:o,children:s})});function Oy(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=Ny(e.backend,e.context,e.options,e.debugMode),s=!e.context;return[t,s]}function Ny(e,t=nv(),s,i){const o=t;return o[Ka]||(o[Ka]={dragDropManager:ky(e,t,s,i)}),o[Ka]}function nv(){return typeof global<"u"?global:window}var od,vg;function Hy(){return vg||(vg=1,od=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 i,o,n;if(Array.isArray(t)){if(i=t.length,i!=s.length)return!1;for(o=i;o--!==0;)if(!e(t[o],s[o]))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),i=n.length,i!==Object.keys(s).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(s,n[o]))return!1;for(o=i;o--!==0;){var r=n[o];if(!e(t[r],s[r]))return!1}return!0}return t!==t&&s!==s}),od}var By=Hy();const Gy=Qb(By),ro=typeof window<"u"?g.useLayoutEffect:g.useEffect;function Vy(e,t,s){const[i,o]=g.useState(()=>t(e)),n=g.useCallback(()=>{const r=t(e);Gy(i,r)||(o(r),s&&s())},[i,e,s]);return ro(n),[i,n]}function zy(e,t,s){const[i,o]=Vy(e,t,s);return ro(function(){const r=e.getHandlerId();if(r!=null)return e.subscribeToStateChange(o,{handlerIds:[r]})},[e,o]),i}function rv(e,t,s){return zy(t,e||(()=>({})),()=>s.reconnect())}function av(e,t){const s=[...t||[]];return t==null&&typeof e!="function"&&s.push(e),g.useMemo(()=>typeof e=="function"?e():e,s)}function Wy(e){return g.useMemo(()=>e.hooks.dragSource(),[e])}function jy(e){return g.useMemo(()=>e.hooks.dragPreview(),[e])}let nd=!1,rd=!1;class _y{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){Ie(!nd,"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 nd=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{nd=!1}}isDragging(){if(!this.sourceId)return!1;Ie(!rd,"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 rd=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{rd=!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 ad=!1;class Uy{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,s){return this.internalMonitor.subscribeToStateChange(t,s)}canDrop(){if(!this.targetId)return!1;Ie(!ad,"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 ad=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{ad=!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 $y(e,t,s){const i=s.getRegistry(),o=i.addTarget(e,t);return[o,()=>i.removeTarget(o)]}function qy(e,t,s){const i=s.getRegistry(),o=i.addSource(e,t);return[o,()=>i.removeSource(o)]}function hu(e,t,s,i){let o;if(o!==void 0)return!!o;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(o=void 0,o===!1||o===void 0&&d!==u)return!1}return!0}function pu(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ky(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 Yy(e){return(t=null,s=null)=>{if(!g.isValidElement(t)){const n=t;return e(n,s),n}const i=t;return Ky(i),Zy(i,s?n=>e(n,s):e)}}function lv(e){const t={};return Object.keys(e).forEach(s=>{const i=e[s];if(s.endsWith("Ref"))t[s]=e[s];else{const o=Yy(i);t[s]=()=>o}}),t}function Cg(e,t){typeof e=="function"?e(t):e.current=t}function Zy(e,t){const s=e.ref;return Ie(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?g.cloneElement(e,{ref:i=>{Cg(s,i),Cg(t,i)}}):g.cloneElement(e,{ref:t})}class Xy{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,i=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(i&&this.disconnectDragPreview(),!!this.handlerId){if(!s){this.lastConnectedDragPreview=s;return}i&&(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!hu(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!hu(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=lv({dragSource:(s,i)=>{this.clearDragSource(),this.dragSourceOptions=i||null,pu(s)?this.dragSourceRef=s:this.dragSourceNode=s,this.reconnectDragSource()},dragPreview:(s,i)=>{this.clearDragPreview(),this.dragPreviewOptions=i||null,pu(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 Qy{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!hu(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=lv({dropTarget:(s,i)=>{this.clearDropTarget(),this.dropTargetOptions=i,pu(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 Pn(){const{dragDropManager:e}=g.useContext(Qm);return Ie(e!=null,"Expected drag drop context"),e}function Jy(e,t){const s=Pn(),i=g.useMemo(()=>new Xy(s.getBackend()),[s]);return ro(()=>(i.dragSourceOptions=e||null,i.reconnect(),()=>i.disconnectDragSource()),[i,e]),ro(()=>(i.dragPreviewOptions=t||null,i.reconnect(),()=>i.disconnectDragPreview()),[i,t]),i}function eS(){const e=Pn();return g.useMemo(()=>new _y(e),[e])}class tS{beginDrag(){const t=this.spec,s=this.monitor;let i=null;return typeof t.item=="object"?i=t.item:typeof t.item=="function"?i=t.item(s):i={},i??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 i=this.spec,o=this.monitor,{isDragging:n}=i;return n?n(o):s===t.getSourceId()}endDrag(){const t=this.spec,s=this.monitor,i=this.connector,{end:o}=t;o&&o(s.getItem(),s),i.reconnect()}constructor(t,s,i){this.spec=t,this.monitor=s,this.connector=i}}function sS(e,t,s){const i=g.useMemo(()=>new tS(e,t,s),[t,s]);return g.useEffect(()=>{i.spec=e},[e]),i}function iS(e){return g.useMemo(()=>{const t=e.type;return Ie(t!=null,"spec.type must be defined"),t},[e])}function oS(e,t,s){const i=Pn(),o=sS(e,t,s),n=iS(e);ro(function(){if(n!=null){const[a,l]=qy(n,o,i);return t.receiveHandlerId(a),s.receiveHandlerId(a),l}},[i,t,s,o,n])}function nS(e,t){const s=av(e,t);Ie(!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 i=eS(),o=Jy(s.options,s.previewOptions);return oS(s,i,o),[rv(s.collect,i,o),Wy(o),jy(o)]}function rS(e){return g.useMemo(()=>e.hooks.dropTarget(),[e])}function aS(e){const t=Pn(),s=g.useMemo(()=>new Qy(t.getBackend()),[t]);return ro(()=>(s.dropTargetOptions=e||null,s.reconnect(),()=>s.disconnectDropTarget()),[e]),s}function lS(){const e=Pn();return g.useMemo(()=>new Uy(e),[e])}function cS(e){const{accept:t}=e;return g.useMemo(()=>(Ie(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class dS{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 uS(e,t){const s=g.useMemo(()=>new dS(e,t),[t]);return g.useEffect(()=>{s.spec=e},[e]),s}function hS(e,t,s){const i=Pn(),o=uS(e,t),n=cS(e);ro(function(){const[a,l]=$y(n,o,i);return t.receiveHandlerId(a),s.receiveHandlerId(a),l},[i,t,o,s,n.map(r=>r.toString()).join("|")])}function cv(e,t){const s=av(e,t),i=lS(),o=aS(s.options);return hS(s,i,o),[rv(s.collect,i,o),rS(o)]}const wg="column",pS="flex items-center",gS="mr-3 cursor-move text-secondary",fS=({id:e,children:t,className:s,onFind:i,onMove:o,ariaLabel:n="Drag item"})=>{const r=g.useRef(null),a=g.useRef(null),l=typeof i=="function"?i(e):-1,[{isDragging:c},d,u]=nS(()=>({type:wg,item:{id:e,originalIndex:l},collect:p=>{const m=p.getItem();return{isDragging:p.isDragging()&&m?.id===e}},end:(p,m)=>{if(!p)return;!m.didDrop()&&typeof o=="function"&&p.originalIndex>-1&&o(p.id,p.originalIndex)}}),[e,l,o]),[,h]=cv(()=>({accept:wg,hover:p=>{if(!(!p||p.id===e)&&typeof i=="function"&&typeof o=="function"){const m=i(e);o(p.id,m)}}}),[i,o,e]);return u(h(a)),d(r),f.jsxs("div",{ref:a,className:se(pS,s),style:{opacity:c?0:1},"aria-roledescription":"Draggable item",children:[f.jsx("div",{ref:r,className:gS,"aria-label":n,children:f.jsx(j.IconGripVertical,{...J})}),t]})},mS=e=>xe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.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"}),xe.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"}),xe.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"}),xe.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"})),vS=e=>xe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.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"}),xe.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"})),CS=e=>xe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.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"}),xe.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"}),xe.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"})),wS=e=>xe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.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"}),xe.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"}),xe.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"}),xe.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"})),bS=e=>xe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.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"}),xe.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"}),xe.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"}),xe.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"}),xe.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"})),xS=e=>xe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.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"}),xe.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"}),xe.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"})),yS=e=>xe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.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"}),xe.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"}),xe.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"})),Qe=(e,t)=>f.jsx(e,{size:t.size??J.size,stroke:t.stroke??J.stroke,className:t.className}),zi=(e,t)=>f.jsx(e,{width:Number(t.size??J.size),height:Number(t.size??J.size),className:t.className}),bg={".bmp":e=>Qe(j.IconFileTypeBmp,e),".cpp":e=>zi(mS,e),".c":e=>zi(vS,e),".cs":e=>zi(CS,e),".css":e=>Qe(j.IconFileTypeCss,e),".csv":e=>Qe(j.IconFileTypeCsv,e),".doc":e=>Qe(j.IconFileTypeDoc,e),".docx":e=>Qe(j.IconFileTypeDocx,e),".html":e=>Qe(j.IconFileTypeHtml,e),".ini":e=>zi(wS,e),".jpg":e=>Qe(j.IconFileTypeJpg,e),".js":e=>Qe(j.IconFileTypeJs,e),".json":e=>zi(bS,e),".jsx":e=>Qe(j.IconFileTypeJsx,e),".md":e=>zi(xS,e),".pdf":e=>Qe(j.IconFileTypePdf,e),".php":e=>Qe(j.IconFileTypePhp,e),".png":e=>Qe(j.IconFileTypePng,e),".ppt":e=>Qe(j.IconFileTypePpt,e),".py":e=>zi(yS,e),".rs":e=>Qe(j.IconFileTypeRs,e),".sql":e=>Qe(j.IconFileTypeSql,e),".svg":e=>Qe(j.IconFileTypeSvg,e),".ts":e=>Qe(j.IconFileTypeTs,e),".tsx":e=>Qe(j.IconFileTypeTsx,e),".txt":e=>Qe(j.IconFileTypeTxt,e),".vue":e=>Qe(j.IconFileTypeVue,e),".xls":e=>Qe(j.IconFileTypeXls,e),".xml":e=>Qe(j.IconFileTypeXml,e),".zip":e=>Qe(j.IconFileTypeZip,e),default:e=>Qe(j.IconFile,e)},vh=({extension:e,size:t=J.size,stroke:s=J.stroke,className:i,decorative:o=!1,label:n,indicator:r})=>{const a=(()=>{if(!e)return"";const u=e.trim().toLowerCase();return u.startsWith(".")?u:`.${u}`})(),c=(bg[a]??bg.default)({size:t,stroke:s}),d=typeof n=="string"?n:`${a.slice(1).toUpperCase()} file icon`;return f.jsxs("span",{className:ae("inline-flex relative",i),...o?{"aria-hidden":!0}:{role:"img","aria-label":d},children:[f.jsx(ze,{icon:c,className:"inline-block align-middle"}),r&&f.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:r})]})},Sr=({label:e="Shared entity",size:t=14,className:s,containerClassName:i,stroke:o=1.5,sharedIndicatorTooltip:n})=>f.jsx(Wt,{tooltip:n||"Shared",children:f.jsx(ze,{className:se("text-accent-primary flex bg-layer-3",i),icon:f.jsx(j.IconArrowUpRight,{size:t,stroke:o,"aria-label":typeof e=="string"?e:void 0,className:s,role:"img"})})}),tc=({name:e,className:t,shared:s=!1,iconSize:i=qt,details:o,sharedIndicatorClassName:n,sharedIndicatorTooltip:r,fileExtension:a,hideTooltip:l=!1,isInvalidName:c=!1,tooltipContent:d})=>{const u=a||(e.includes(".")?e.split(".").pop():void 0);return f.jsxs("div",{className:se("flex items-center gap-2 w-full",t),children:[f.jsx(vh,{extension:u,size:i,className:"text-secondary",indicator:s?f.jsx(Sr,{className:n,sharedIndicatorTooltip:r}):null,label:"File type icon"}),f.jsxs("div",{className:ae(["w-full flex min-w-0",o&&"flex-col gap-1"]),children:[f.jsx(gt,{className:ae(["dial-small-text flex-1 min-w-0",c?"text-secondary":"text-primary"]),text:e,id:"name",hideTooltip:l,customTooltipContent:d}),o]})]})},sc=({name:e,className:t,shared:s=!1,loading:i=!1,iconSize:o=qt,sharedIndicatorClassName:n,sharedIndicatorTooltip:r,hideTooltip:a=!1,isInvalidName:l=!1,tooltipContent:c})=>{const d=()=>i?f.jsx(Vr,{size:o}):f.jsx(ze,{icon:f.jsx(j.IconFolder,{...J,size:o}),className:"inline-block align-middle"});return f.jsxs("div",{className:se("flex items-center gap-2 w-full",t),children:[f.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[d(),s&&f.jsx("span",{className:"absolute z-50 -bottom-0.5 -left-0.5",children:f.jsx(Sr,{className:n,sharedIndicatorTooltip:r})})]}),f.jsx(gt,{className:ae("dial-small-text flex-1 min-w-0",l?"text-secondary":"text-primary"),text:e,id:"name",hideTooltip:a,customTooltipContent:c})]})};var Rr=(e=>(e.Left="left",e.Right="right",e))(Rr||{}),at=function(){return at=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++){t=arguments[s];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},at.apply(this,arguments)},xg={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},yg={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Pa={width:"20px",height:"20px",position:"absolute",zIndex:1},SS={top:at(at({},xg),{top:"-5px"}),right:at(at({},yg),{left:void 0,right:"-5px"}),bottom:at(at({},xg),{top:void 0,bottom:"-5px"}),left:at(at({},yg),{left:"-5px"}),topRight:at(at({},Pa),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:at(at({},Pa),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:at(at({},Pa),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:at(at({},Pa),{left:"-10px",top:"-10px",cursor:"nw-resize"})},RS=g.memo(function(e){var t=e.onResizeStart,s=e.direction,i=e.children,o=e.replaceStyles,n=e.className,r=g.useCallback(function(c){t(c,s)},[t,s]),a=g.useCallback(function(c){t(c,s)},[t,s]),l=g.useMemo(function(){return at(at({position:"absolute",userSelect:"none"},SS[s]),o??{})},[o,s]);return f.jsx("div",{className:n||void 0,style:l,onMouseDown:r,onTouchStart:a,children:i})}),FS=(function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(i[n]=o[n])},e(t,s)};return function(t,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(t,s);function i(){this.constructor=t}t.prototype=s===null?Object.create(s):(i.prototype=s.prototype,new i)}})(),Ps=function(){return Ps=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++){t=arguments[s];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ps.apply(this,arguments)},ES={width:"auto",height:"auto"},Ta=function(e,t,s){return Math.max(Math.min(e,s),t)},Sg=function(e,t,s){var i=Math.round(e/t);return i*t+s*(i-1)},Uo=function(e,t){return new RegExp(e,"i").test(t)},ka=function(e){return!!(e.touches&&e.touches.length)},DS=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},Rg=function(e,t,s){s===void 0&&(s=0);var i=t.reduce(function(n,r,a){return Math.abs(r-e)<Math.abs(t[n]-e)?a:n},0),o=Math.abs(t[i]-e);return s===0||o<s?t[i]:e},ld=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},Ia=function(e,t,s,i){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var o=Number(e.replace("%",""))/100;return t*o}if(e.endsWith("vw")){var o=Number(e.replace("vw",""))/100;return s*o}if(e.endsWith("vh")){var o=Number(e.replace("vh",""))/100;return i*o}}return e},PS=function(e,t,s,i,o,n,r){return i=Ia(i,e.width,t,s),o=Ia(o,e.height,t,s),n=Ia(n,e.width,t,s),r=Ia(r,e.height,t,s),{maxWidth:typeof i>"u"?void 0:Number(i),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof n>"u"?void 0:Number(n),minHeight:typeof r>"u"?void 0:Number(r)}},TS=function(e){return Array.isArray(e)?e:[e,e]},kS=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Fg="__resizable_base__",IS=(function(e){FS(t,e);function t(s){var i,o,n,r,a=e.call(this,s)||this;return a.ratio=1,a.resizable=null,a.parentLeft=0,a.parentTop=0,a.resizableLeft=0,a.resizableRight=0,a.resizableTop=0,a.resizableBottom=0,a.targetLeft=0,a.targetTop=0,a.delta={width:0,height:0},a.appendBase=function(){if(!a.resizable||!a.window)return null;var l=a.parentNode;if(!l)return null;var c=a.window.document.createElement("div");return c.style.width="100%",c.style.height="100%",c.style.position="absolute",c.style.transform="scale(0, 0)",c.style.left="0",c.style.flex="0 0 100%",c.classList?c.classList.add(Fg):c.className+=Fg,l.appendChild(c),c},a.removeBase=function(l){var c=a.parentNode;c&&c.removeChild(l)},a.state={isResizing:!1,width:(o=(i=a.propsSize)===null||i===void 0?void 0:i.width)!==null&&o!==void 0?o:"auto",height:(r=(n=a.propsSize)===null||n===void 0?void 0:n.height)!==null&&r!==void 0?r:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},a.onResizeStart=a.onResizeStart.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.onMouseUp=a.onMouseUp.bind(a),a}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||ES},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var s=0,i=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,n=this.resizable.offsetHeight,r=this.resizable.style.position;r!=="relative"&&(this.resizable.style.position="relative"),s=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,i=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:n,this.resizable.style.position=r}return{width:s,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var s=this,i=this.props.size,o=function(a){var l;if(typeof s.state[a]>"u"||s.state[a]==="auto")return"auto";if(s.propsSize&&s.propsSize[a]&&(!((l=s.propsSize[a])===null||l===void 0)&&l.toString().endsWith("%"))){if(s.state[a].toString().endsWith("%"))return s.state[a].toString();var c=s.getParentSize(),d=Number(s.state[a].toString().replace("px","")),u=d/c[a]*100;return"".concat(u,"%")}return ld(s.state[a])},n=i&&typeof i.width<"u"&&!this.state.isResizing?ld(i.width):o("width"),r=i&&typeof i.height<"u"&&!this.state.isResizing?ld(i.height):o("height");return{width:n,height:r}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var s=this.appendBase();if(!s)return{width:0,height:0};var i=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(i=!0,this.parentNode.style.flexWrap="wrap"),s.style.position="relative",s.style.minWidth="100%",s.style.minHeight="100%";var n={width:s.offsetWidth,height:s.offsetHeight};return i&&(this.parentNode.style.flexWrap=o),this.removeBase(s),n},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var s=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:s.flexBasis!=="auto"?s.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(s,i){var o=this.propsSize&&this.propsSize[i];return this.state[i]==="auto"&&this.state.original[i]===s&&(typeof o>"u"||o==="auto")?"auto":s},t.prototype.calculateNewMaxFromBoundary=function(s,i){var o=this.props.boundsByDirection,n=this.state.direction,r=o&&Uo("left",n),a=o&&Uo("top",n),l,c;if(this.props.bounds==="parent"){var d=this.parentNode;d&&(l=r?this.resizableRight-this.parentLeft:d.offsetWidth+(this.parentLeft-this.resizableLeft),c=a?this.resizableBottom-this.parentTop:d.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=r?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=r?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(s=s&&s<l?s:l),c&&Number.isFinite(c)&&(i=i&&i<c?i:c),{maxWidth:s,maxHeight:i}},t.prototype.calculateNewSizeFromDirection=function(s,i){var o=this.props.scale||1,n=TS(this.props.resizeRatio||1),r=n[0],a=n[1],l=this.state,c=l.direction,d=l.original,u=this.props,h=u.lockAspectRatio,p=u.lockAspectRatioExtraHeight,m=u.lockAspectRatioExtraWidth,v=d.width,C=d.height,w=p||0,b=m||0;return Uo("right",c)&&(v=d.width+(s-d.x)*r/o,h&&(C=(v-b)/this.ratio+w)),Uo("left",c)&&(v=d.width-(s-d.x)*r/o,h&&(C=(v-b)/this.ratio+w)),Uo("bottom",c)&&(C=d.height+(i-d.y)*a/o,h&&(v=(C-w)*this.ratio+b)),Uo("top",c)&&(C=d.height-(i-d.y)*a/o,h&&(v=(C-w)*this.ratio+b)),{newWidth:v,newHeight:C}},t.prototype.calculateNewSizeFromAspectRatio=function(s,i,o,n){var r=this.props,a=r.lockAspectRatio,l=r.lockAspectRatioExtraHeight,c=r.lockAspectRatioExtraWidth,d=typeof n.width>"u"?10:n.width,u=typeof o.width>"u"||o.width<0?s:o.width,h=typeof n.height>"u"?10:n.height,p=typeof o.height>"u"||o.height<0?i:o.height,m=l||0,v=c||0;if(a){var C=(h-m)*this.ratio+v,w=(p-m)*this.ratio+v,b=(d-v)/this.ratio+m,x=(u-v)/this.ratio+m,y=Math.max(d,C),S=Math.min(u,w),E=Math.max(h,b),F=Math.min(p,x);s=Ta(s,y,S),i=Ta(i,E,F)}else s=Ta(s,d,u),i=Ta(i,h,p);return{newWidth:s,newHeight:i}},t.prototype.setBoundingClientRect=function(){var s=1/(this.props.scale||1);if(this.props.bounds==="parent"){var i=this.parentNode;if(i){var o=i.getBoundingClientRect();this.parentLeft=o.left*s,this.parentTop=o.top*s}}if(this.props.bounds&&typeof this.props.bounds!="string"){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left*s,this.targetTop=n.top*s}if(this.resizable){var r=this.resizable.getBoundingClientRect(),a=r.left,l=r.top,c=r.right,d=r.bottom;this.resizableLeft=a*s,this.resizableRight=c*s,this.resizableTop=l*s,this.resizableBottom=d*s}},t.prototype.onResizeStart=function(s,i){if(!(!this.resizable||!this.window)){var o=0,n=0;if(s.nativeEvent&&DS(s.nativeEvent)?(o=s.nativeEvent.clientX,n=s.nativeEvent.clientY):s.nativeEvent&&ka(s.nativeEvent)&&(o=s.nativeEvent.touches[0].clientX,n=s.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var r=this.props.onResizeStart(s,i,this.resizable);if(r===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var a,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var c=this.parentNode;if(c){var d=this.window.getComputedStyle(c).flexDirection;this.flexDir=d.startsWith("row")?"row":"column",a=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var u={original:{x:o,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Ps(Ps({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(s.target).cursor||"auto"}),direction:i,flexBasis:a};this.setState(u)}},t.prototype.onMouseMove=function(s){var i=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&ka(s))try{s.preventDefault(),s.stopPropagation()}catch{}var o=this.props,n=o.maxWidth,r=o.maxHeight,a=o.minWidth,l=o.minHeight,c=ka(s)?s.touches[0].clientX:s.clientX,d=ka(s)?s.touches[0].clientY:s.clientY,u=this.state,h=u.direction,p=u.original,m=u.width,v=u.height,C=this.getParentSize(),w=PS(C,this.window.innerWidth,this.window.innerHeight,n,r,a,l);n=w.maxWidth,r=w.maxHeight,a=w.minWidth,l=w.minHeight;var b=this.calculateNewSizeFromDirection(c,d),x=b.newHeight,y=b.newWidth,S=this.calculateNewMaxFromBoundary(n,r);this.props.snap&&this.props.snap.x&&(y=Rg(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(x=Rg(x,this.props.snap.y,this.props.snapGap));var E=this.calculateNewSizeFromAspectRatio(y,x,{width:S.maxWidth,height:S.maxHeight},{width:a,height:l});if(y=E.newWidth,x=E.newHeight,this.props.grid){var F=Sg(y,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),R=Sg(x,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),D=this.props.snapGap||0,T=D===0||Math.abs(F-y)<=D?F:y,P=D===0||Math.abs(R-x)<=D?R:x;y=T,x=P}var M={width:y-p.width,height:x-p.height};if(this.delta=M,m&&typeof m=="string"){if(m.endsWith("%")){var N=y/C.width*100;y="".concat(N,"%")}else if(m.endsWith("vw")){var K=y/this.window.innerWidth*100;y="".concat(K,"vw")}else if(m.endsWith("vh")){var L=y/this.window.innerHeight*100;y="".concat(L,"vh")}}if(v&&typeof v=="string"){if(v.endsWith("%")){var N=x/C.height*100;x="".concat(N,"%")}else if(v.endsWith("vw")){var K=x/this.window.innerWidth*100;x="".concat(K,"vw")}else if(v.endsWith("vh")){var L=x/this.window.innerHeight*100;x="".concat(L,"vh")}}var H={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(x,"height")};this.flexDir==="row"?H.flexBasis=H.width:this.flexDir==="column"&&(H.flexBasis=H.height);var G=this.state.width!==H.width,_=this.state.height!==H.height,te=this.state.flexBasis!==H.flexBasis,I=G||_||te;I&&Dn.flushSync(function(){i.setState(H)}),this.props.onResize&&I&&this.props.onResize(s,h,this.resizable,M)}},t.prototype.onMouseUp=function(s){var i,o,n=this.state,r=n.isResizing,a=n.direction;n.original,!(!r||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(s,a,this.resizable,this.delta),this.props.size&&this.setState({width:(i=this.props.size.width)!==null&&i!==void 0?i:"auto",height:(o=this.props.size.height)!==null&&o!==void 0?o:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Ps(Ps({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(s){var i,o;this.setState({width:(i=s.width)!==null&&i!==void 0?i:"auto",height:(o=s.height)!==null&&o!==void 0?o:"auto"})},t.prototype.renderResizer=function(){var s=this,i=this.props,o=i.enable,n=i.handleStyles,r=i.handleClasses,a=i.handleWrapperStyle,l=i.handleWrapperClass,c=i.handleComponent;if(!o)return null;var d=Object.keys(o).map(function(u){return o[u]!==!1?f.jsx(RS,{direction:u,onResizeStart:s.onResizeStart,replaceStyles:n&&n[u],className:r&&r[u],children:c&&c[u]?c[u]:null},u):null});return f.jsx("div",{className:l,style:a,children:d})},t.prototype.render=function(){var s=this,i=Object.keys(this.props).reduce(function(r,a){return kS.indexOf(a)!==-1||(r[a]=s.props[a]),r},{}),o=Ps(Ps(Ps({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var n=this.props.as||"div";return f.jsxs(n,Ps({style:o,className:this.props.className},i,{ref:function(r){r&&(s.resizable=r)},children:[this.state.isResizing&&f.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t})(g.PureComponent);const MS=({side:e,className:t})=>{const s=e===Rr.Left,i=s?j.IconChevronLeft:j.IconChevronRight;return f.jsx("div",{className:t,children:f.jsx(i,{className:ae("h-full",s&&"-ml-6")})})},AS=({side:e,isResizing:t,customHandler:s,handlerClassName:i})=>{const o=se("invisible h-full w-0.5 group-hover:visible bg-accent-primary text-accent-primary cursor-col-resize transition-opacity",t&&"visible",i),n=f.jsx(MS,{side:e,className:o});return s?f.jsx("div",{className:o,children:s}):n},dv=({children:e,minWidth:t,maxWidth:s,width:i,defaultWidth:o,onResizeStop:n,onResize:r,side:a=Rr.Right,resizeHandlerClassName:l,resizeHandler:c})=>{const[d,u]=g.useState(!1),[h,p]=g.useState(o),m=i!==void 0,v=m?i:h,C=g.useRef(null),w=g.useCallback(()=>{u(!0)},[]),b=g.useCallback(()=>{u(!1);const y=C.current?.resizable?.getBoundingClientRect(),S=y?Math.round(y.width):t;m||p(S),n?.(S)},[n,m,t]),x=g.useMemo(()=>{const y=a===Rr.Left,S=f.jsx(AS,{side:a,isResizing:d,customHandler:c,handlerClassName:l});return{size:m?{width:v,height:"100%"}:void 0,defaultSize:m?void 0:{width:v,height:"100%"},minWidth:t,maxWidth:s,enable:{left:y,right:!y},handleClasses:{right:"group",left:"group"},handleStyles:{right:{right:"-8px",zIndex:10},left:{left:0,zIndex:10}},handleComponent:{left:y?S:void 0,right:y?void 0:S},onResizeStart:w,onResize:(E,F,R)=>{const D=Math.round(R.offsetWidth);r?.(D)},onResizeStop:b}},[a,m,v,t,s,c,l,d,w,b,r]);return f.jsx(IS,{ref:C,...x,children:f.jsx("div",{className:"group flex size-full flex-col bg-layer-3 divide-y divide-tertiary transition-all",children:e})})},uv=({enabled:e=!0,children:t,...s})=>e?f.jsx(dv,{...s,children:t}):t;var as=(e=>(e.Default="default",e.Text="text",e.Circular="circular",e.Rectangular="rectangular",e))(as||{}),cr=(e=>(e.Small="small",e.Default="default",e.Large="large",e))(cr||{}),pl=(e=>(e.Circle="circle",e.Square="square",e))(pl||{});const LS=e=>{if(typeof e=="number")return e;switch(e){case cr.Small:return 32;case cr.Large:return 64;case cr.Default:default:return 40}},Ko=({active:e=!0,paragraph:t=!0,avatar:s=!1,showTitle:i=!0,loading:o=!0,children:n,variant:r=as.Default,width:a,height:l,className:c,...d})=>{if(!o&&n)return f.jsx(f.Fragment,{children:n});const u=se("bg-layer-3",e&&"animate-pulse",c);if(r!==as.Default){const R=se(u,r===as.Circular&&"rounded-full",r===as.Rectangular&&"rounded",r===as.Text&&"rounded"),D={};return a&&(D.width=typeof a=="number"?`${a}px`:a),l&&(D.height=typeof l=="number"?`${l}px`:l),f.jsx("div",{className:R,style:D,...d})}const h=!!s,p=!!i,m=!!t,v=typeof s=="object"?s:{},C=typeof i=="object"?i:{},w=typeof t=="object"?t:{},b=LS(v.size),x=v.shape??pl.Circle,y=C.width??"38%",S=w.rows??3,E=w.width,F=R=>E?Array.isArray(E)?E[R]??"100%":E:R===S-1?"61%":"100%";return f.jsxs("div",{...d,className:se("flex gap-4",c),children:[h&&f.jsx("div",{className:se(u,x===pl.Circle?"rounded-full":"rounded","flex-shrink-0"),style:{width:b,height:b}}),f.jsxs("div",{className:"flex-1 flex flex-col gap-3",children:[p&&f.jsx("div",{className:se(u,"h-4 rounded"),style:{width:y}}),m&&f.jsx("div",{className:"flex flex-col gap-3",children:Array.from({length:S}).map((R,D)=>f.jsx("div",{className:se(u,"h-4 rounded"),style:{width:F(D)}},D))})]})]})};function Ue(e){if(e?.length)return e[e.length-1]}function Ii(e,t,s){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const i=e.length;if(i!==t.length)return!1;for(let o=0;o<i;o++)if(e[o]!==t[o]&&!s?.(e[o],t[o]))return!1;return!0}function Qn(e,t){if(e){for(const s of e)if(t(s))return!0}}function Ns(e,t){const s=e.indexOf(t);s>=0&&e.splice(s,1)}function OS(e,t){let s=0,i=0;for(;s<e.length;s++)t.includes(e[s])||(e[i]=e[s],i++);for(;i<e.length;)e.pop()}function Eg(e,t,s){for(let i=0;i<t.length;i++)Ns(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(s,0,t[i])}var Ks=e=>e==null||e===""?null:e;function ee(e){return e!=null&&e!==""}function tt(e){return!ee(e)}var gu=e=>e!=null&&typeof e.toString=="function"?e.toString():null,Fr=(e,t)=>{const s=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return s===i},NS=(e,t,s=!1)=>e==null?t==null?0:-1:t==null?1:(typeof e=="object"&&e.toNumber&&(e=e.toNumber()),typeof t=="object"&&t.toNumber&&(t=t.toNumber()),!s||typeof e!="string"?e>t?1:e<t?-1:0:e.localeCompare(t)),ao=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 i=t?this.allAsyncListeners:this.allSyncListeners;let o=i.get(e);return!o&&s&&(o=new Set,i.set(e,o)),o}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 i=this.getListeners(e,s,!1);i&&(i.delete(t),i.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:i}=this,o=a=>{const l=i?()=>i.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)&&o(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)o(()=>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)},s=this.frameworkOverrides;s?s.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}},HS=/[&<>"']/g,BS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Tn(e){return e?.toString().toString()??null}function dr(e){return Tn(e)?.replace(HS,t=>BS[t])??null}function Dg(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function GS(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(o=>o.substring(0,1).toUpperCase()+(o.length>1?o.substring(1,o.length):"")).join(" ")}function fs(e){return e.eRootDiv.getRootNode()}function Je(e){return fs(e).activeElement}function ft(e){const{gos:t,eRootDiv:s}=e;let i=null;const o=t.get("getDocument");return o&&ee(o)?i=o():s&&(i=s.ownerDocument),i&&ee(i)?i:document}function Ch(e){const t=Je(e);return t===null||t===ft(e).body}function wh(e){return ft(e).defaultView||window}function bh(e){let t=null,s=null;try{t=ft(e).fullscreenElement}catch{}finally{t||(t=fs(e));const i=t.querySelector("body");i?s=i:t instanceof ShadowRoot?s=t:t instanceof Document?s=t?.documentElement:s=t}return s}function VS(e){return bh(e)?.clientWidth??(window.innerWidth||-1)}function zS(e){return bh(e)?.clientHeight??(window.innerHeight||-1)}function ys(e,t,s){s==null||typeof s=="string"&&s==""?hv(e,t):Ss(e,t,s)}function Ss(e,t,s){e.setAttribute(pv(t),s.toString())}function hv(e,t){e.removeAttribute(pv(t))}function pv(e){return`aria-${e}`}function lo(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function WS(e){const t=e?.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function jS(e){return e.getAttribute("aria-label")}function Cn(e,t){ys(e,"label",t)}function Er(e,t){ys(e,"labelledby",t)}function gv(e,t){ys(e,"live",t)}function _S(e,t){ys(e,"atomic",t)}function US(e,t){ys(e,"relevant",t)}function xh(e,t){ys(e,"invalid",t)}function $S(e,t){ys(e,"disabled",t)}function fv(e,t){ys(e,"hidden",t)}function fu(e,t){Ss(e,"expanded",t)}function qS(e,t){Ss(e,"setsize",t)}function KS(e,t){Ss(e,"posinset",t)}function YS(e,t){Ss(e,"rowcount",t)}function yh(e,t){Ss(e,"rowindex",t)}function ZS(e,t){Ss(e,"rowspan",t)}function XS(e,t){Ss(e,"colcount",t)}function mv(e,t){Ss(e,"colindex",t)}function QS(e,t){Ss(e,"colspan",t)}function JS(e,t){Ss(e,"sort",t)}function e2(e){hv(e,"sort")}function vv(e,t){ys(e,"selected",t)}function t2(e,t){ys(e,"controls",t)}function s2(e,t){t2(e,t.id),Er(t,e.id)}function Pg(e,t){ys(e,"owns",t)}function ic(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var i2="[tabindex], input, select, button, textarea, [href]",Cv="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function ur(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(Cv)?!1:xs(e)}function qe(e,t,s={}){const{skipAriaHidden:i}=s;e.classList.toggle("ag-hidden",!t),i||fv(e,!t)}function o2(e,t,s={}){const{skipAriaHidden:i}=s;e.classList.toggle("ag-invisible",!t),i||fv(e,!t)}function Dr(e,t){const s="disabled",i=t?n=>n.setAttribute(s,""):n=>n.removeAttribute(s);i(e);const o=e.querySelectorAll("input")??[];for(const n of o)i(n)}function Qi(e,t,s){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof s=="number"){if(++i>s)break}else if(e===s)break}return!1}function So(e){const{height:t,width:s,borderTopWidth:i,borderRightWidth:o,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:h,marginBottom:p,marginLeft:m,boxSizing:v}=window.getComputedStyle(e),C=Number.parseFloat;return{height:C(t||"0"),width:C(s||"0"),borderTopWidth:C(i||"0"),borderRightWidth:C(o||"0"),borderBottomWidth:C(n||"0"),borderLeftWidth:C(r||"0"),paddingTop:C(a||"0"),paddingRight:C(l||"0"),paddingBottom:C(c||"0"),paddingLeft:C(d||"0"),marginTop:C(u||"0"),marginRight:C(h||"0"),marginBottom:C(p||"0"),marginLeft:C(m||"0"),boxSizing:v}}function Sh(e){const t=So(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Pr(e){const t=So(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function wv(e){const{height:t,marginBottom:s,marginTop:i}=So(e);return Math.floor(t+s+i)}function gl(e){const{width:t,marginLeft:s,marginRight:i}=So(e);return Math.floor(t+s+i)}function bv(e){const t=e.getBoundingClientRect(),{borderTopWidth:s,borderLeftWidth:i,borderRightWidth:o,borderBottomWidth:n}=So(e);return{top:t.top+(s||0),left:t.left+(i||0),right:t.right+(o||0),bottom:t.bottom+(n||0)}}function fl(e,t){let s=e.scrollLeft;return t&&(s=Math.abs(s)),s}function ml(e,t,s){s&&(t*=-1),e.scrollLeft=t}function jt(e){for(;e?.firstChild;)e.firstChild.remove()}function Qs(e){e?.parentNode&&e.remove()}function xv(e){return!!e.offsetParent}function xs(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!xv(e)||window.getComputedStyle(e).visibility!=="visible")}function Rh(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Tr(e){return()=>{const t=e();return t?yv(t)||n2(t):!0}}function yv(e){return e.clientWidth<e.scrollWidth}function n2(e){return e.clientHeight<e.scrollHeight}function vl(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):As(e,t)}function As(e,t){t=Fh(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function hr(e,t){t=Fh(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Fh(e){return typeof e=="number"?`${e}px`:e}function Eh(e){return e instanceof Node||e instanceof HTMLElement}function Gt(e,t,s){s==null||s===""?e.removeAttribute(t):e.setAttribute(t,s.toString())}function r2(e,t){if(!t.isContentEditable)return;const s=wh(e).getSelection();if(!s)return;const i=ft(e).createRange();i.selectNodeContents(t),i.collapse(!1),s.removeAllRanges(),s.addRange(i)}function si(e,t,s){const o=wh(e).ResizeObserver,n=o?new o(s):null;return n?.observe(t),()=>n?.disconnect()}function ii(e,t){const s=wh(e);s.requestAnimationFrame?s.requestAnimationFrame(t):s.webkitRequestAnimationFrame?s.webkitRequestAnimationFrame(t):s.setTimeout(t,0)}var Sv="data-ref",cd;function Tg(){return cd??(cd=document.createTextNode(" ")),cd.cloneNode()}function co(e){const{attrs:t,children:s,cls:i,ref:o,role:n,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),o&&a.setAttribute(Sv,o),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(Tg()),l=!1),a.append(co(c)),a.appendChild(Tg())))}return a}var a2=["touchstart","touchend","touchmove","touchcancel","scroll"],l2=["wheel"],dd={},Cl=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return s=>{if(typeof dd[s]=="boolean")return dd[s];const i=document.createElement(e[s]||"div");return s="on"+s,dd[s]=s in i}})();function c2(e,t){return!t||!e?!1:u2(t).indexOf(e)>=0}function d2(e){const t=[];let s=e.target;for(;s;)t.push(s),s=s.parentElement;return t}function u2(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():d2(t)}function h2(e,t,s){const i=p2(t);let o;i!=null&&(o={passive:i}),e.addEventListener(t,s,o)}var p2=e=>{const t=a2.includes(e),s=l2.includes(e);if(t)return!0;if(s)return!1};function Rv(e,t,s){if(s===0)return!1;const i=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(i,o)<=s}var nn=(e,t)=>{const s=e.identifier;for(let i=0,o=t.length;i<o;++i){const n=t[i];if(n.identifier===s)return n}return null};function kr(e,t){return e.gos.isElementInThisInstance(t.target)}function g2(e,t,s){const o=e.getBoundingClientRect().height,n=VS(s)-2,r=zS(s)-2;if(!e.offsetParent)return;const l=bv(e.offsetParent),{clientY:c,clientX:d}=t;let u=c-l.top-o/2,h=d-l.left-10;const p=ft(s),m=p.defaultView||window,v=m.pageYOffset||p.documentElement.scrollTop,C=m.pageXOffset||p.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+C&&(h=n+C-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+v&&(u=r+v-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}var Ya=(e,...t)=>{for(const s of t){const[i,o,n,r]=s;i.addEventListener(o,n,r),e.push(s)}},Dh=e=>{if(e){for(const[t,s,i,o]of e)t.removeEventListener(s,i,o);e.length=0}},mi=e=>{e.cancelable&&e.preventDefault()};function f2(e,t){return t}function Fv(e){return e?.getLocaleTextFunc()??f2}function m2(e,t,s,i){const o=t[s];return e.getLocaleTextFunc()(s,typeof o=="function"?o(i):o,i)}function v2(e){return(t,s,i)=>e({key:t,defaultValue:s,variableValues:i})}function C2(e){return(t,s,i)=>{let o=e?.[t];if(o&&i?.length){let n=0;for(;!(n>=i.length||o.indexOf("${variable}")===-1);)o=o.replace("${variable}",i[n++])}return o??s}}var Ot=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 ao),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 i of Object.keys(t)){const o=t[i];o&&s.push(this._setupListener(e,i,o))}return s}_setupListener(e,t,s){if(this.destroyed)return()=>null;let i;if(w2(e))e.__addEventListener(t,s),i=()=>(e.__removeEventListener(t,s),null);else{const o=b2(e);e instanceof HTMLElement?h2(e,t,s):o?e.addListener(t,s):e.addEventListener(t,s),i=o?()=>(e.removeListener(t,s),null):()=>(e.removeEventListener(t,s),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),null)}setupPropertyListener(e,t){const{gos:s}=this;s.addPropertyEventListener(e,t);const i=()=>(s.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),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++,i=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[s])return;this.lastChangeSetIdLookup[s]=o.changeSet.id}const n={type:"propertyChanged",changeSet:o.changeSet,source:o.source};t(n)};for(const o of e)this.setupPropertyListener(o,i)}getLocaleTextFunc(){return Fv(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 w2(e){return e.__addEventListener!==void 0}function b2(e){return e.eventServiceType==="global"}var B=class extends Ot{},mu=new Set,oc=(e,t)=>{mu.has(t)||(mu.add(t),e())};oc._set=mu;var x2={pending:!1,funcs:[]},y2={pending:!1,funcs:[]};function vu(e,t="setTimeout",s){const i=t==="raf"?y2:x2;if(i.funcs.push(e),i.pending)return;i.pending=!0;const o=()=>{const n=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of n)r()};t==="raf"?ii(s,o):window.setTimeout(o,0)}function lt(e,t,s){let i;return function(...o){const n=this;return window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(n,o)},s),i}}function kg(e,t){let s=0;return function(...i){const o=this,n=Date.now();n-s<t||(s=n,e.apply(o,i))}}function S2(e,t,s,i=100){const o=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()-o>i;(t()||c)&&(s(),r=!0,a())};l(),r||(n=window.setInterval(l,10))}var Ev=new Set(["__proto__","constructor","prototype"]);function R2(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(i=>!Ev.has(i)))t(s,e[s])}}function kt(e,t,s=!0,i=!1){ee(t)&&R2(t,(o,n)=>{let r=e[o];r!==n&&(i&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[o]=r),Ig(n)&&Ig(r)&&!Array.isArray(r)?kt(r,n,s,i):(s||n!==void 0)&&(e[o]=n))})}function Ig(e){return typeof e=="object"&&e!==null}var Ph=class Us{static applyGlobalGridOptions(t){if(!Us.gridOptions)return{...t};let s={};return kt(s,Us.gridOptions,!0,!0),Us.mergeStrategy==="deep"?kt(s,t,!0,!0):s={...s,...t},Us.gridOptions.context&&(s.context=Us.gridOptions.context),t.context&&(Us.mergeStrategy==="deep"&&s.context&&kt(t.context,s.context,!0,!0),s.context=t.context),s}static applyGlobalGridOption(t,s){if(Us.mergeStrategy==="deep"){const i=Dv(t);if(i&&typeof i=="object"&&typeof s=="object")return Us.applyGlobalGridOptions({[t]:s})[t]}return s}};Ph.gridOptions=void 0;Ph.mergeStrategy="shallow";var Th=Ph;function Dv(e){return Th.gridOptions?.[e]}var Pv={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,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,refreshAfterGroupEdit:!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,groupHideColumnsUntilExpanded:!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,enableFilterHandlers:!1},Tv="https://www.ag-grid.com";function uo(e,t,...s){e.get("debug")&&console.log("AG Grid: "+t,...s)}function pr(e,...t){oc(()=>kv(e,...t),e+t?.join(""))}function rn(e,...t){oc(()=>F2(e,...t),e+t?.join(""))}function F2(e,...t){console.error("AG Grid: "+e,...t)}function kv(e,...t){console.warn("AG Grid: "+e,...t)}var Iv=new Set,wl={},Ji={},Za,Mv=!1,Av=!1,E2=!1;function D2(e){const[t,s]=e.version.split(".")||[],[i,o]=Za.split(".")||[];return t===i&&s===o}function P2(e){Za||(Za=e.version);const t=i=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${i} Please update all modules to the same version.`;e.version?D2(e)||rn(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Za}.`)):rn(t(`'${e.moduleName}' is incompatible.`));const s=e.validate?.();s&&!s.isValid&&rn(`${s.message}`)}function Ir(e,t,s=!1){s||(Mv=!0),P2(e);const i=e.rowModels??["all"];Iv.add(e);let o;t!==void 0?(Av=!0,Ji[t]===void 0&&(Ji[t]={}),o=Ji[t]):o=wl;for(const n of i)o[n]===void 0&&(o[n]={}),o[n][e.moduleName]=e;if(e.dependsOn)for(const n of e.dependsOn)Ir(n,t,s)}function T2(e){delete Ji[e]}function Cu(e,t,s){const i=o=>!!wl[o]?.[e]||!!Ji[t]?.[o]?.[e];return i(s)||i("all")}function kh(){return Av}function k2(e,t){const s=Ji[e]??{};return[...Object.values(wl.all??{}),...Object.values(s.all??{}),...Object.values(wl[t]??{}),...Object.values(s[t]??{})]}function I2(){return new Set(Iv)}function M2(e,t){const s=Ji[e]??{};return[...Object.values(s.all??{}),...Object.values(s[t]??{})]}function A2(){return Mv}function Lv(){return E2}var Ov=class{static register(e){Ir(e,void 0)}static registerModules(e){for(const t of e)Ir(t,void 0)}};function Nv(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const s=Nv(t.dependsOn);if(s)return s}}}var Q="35.2.1",Mg=2e3,Ag=100,Hv="_version_",Bv=null,an=`${Tv}/javascript-data-grid`;function L2(e){Bv=e}function O2(e){an=e}function Gv(e,t,s){return Bv?.(e,t)??[G2(e,t,s)]}function Ih(e,t,s,i,o){e(`${i?"warning":"error"} #${t}`,...Gv(t,s,o))}function N2(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 H2(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=N2(e)),t}function Xa(e){return e===void 0?"undefined":e===null?"null":e}function wu(e,t){return`${e}?${t.toString()}`}function B2(e,t,s){const i=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let o=wu(e,t);for(const[n,r]of i){if(n===Hv)continue;const a=o.length-s;if(a<=0)break;const l="...",c=a+l.length,d=r.length-c>Ag?r.slice(0,r.length-c)+l:r.slice(0,Ag)+l;t.set(n,d),o=wu(e,t)}return o}function Vv(e,t){const s=new URLSearchParams;if(s.append(Hv,Q),t)for(const n of Object.keys(t))s.append(n,H2(t[n]));const i=`${an}/errors/${e}`,o=wu(i,s);return o.length<=Mg?o:B2(i,s,Mg)}var G2=(e,t,s)=>{const i=Vv(e,t);return`${`${s?s+`
6
+ <%s key={someKey} {...props} />`,ie,ne,Me,ne),I[ne+ie]=!0)}if(ne=null,q!==void 0&&(s(q),ne=""+q),r(V)&&(s(V.key),ne=""+V.key),"key"in V){q={};for(var X in V)X!=="key"&&(q[X]=V[X])}else q=V;return ne&&a(q,typeof k=="function"?k.displayName||k.name||"Unknown":k),c(k,ne,q,o(),ve,O)}function u(k){h(k)?k._store&&(k._store.validated=1):typeof k=="object"&&k!==null&&k.$$typeof===D&&(k._payload.status==="fulfilled"?h(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function h(k){return typeof k=="object"&&k!==null&&k.$$typeof===m}var p=g,m=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),y=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),M=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,K=Array.isArray,L=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(k){return k()}};var H,G={},_=p.react_stack_bottom_frame.bind(p,n)(),te=L(i(n)),I={};Zn.Fragment=C,Zn.jsx=function(k,V,q){var ie=1e4>M.recentlyCreatedOwnerStacks++;return d(k,V,q,!1,ie?Error("react-stack-top-frame"):_,ie?L(i(k)):te)},Zn.jsxs=function(k,V,q){var ie=1e4>M.recentlyCreatedOwnerStacks++;return d(k,V,q,!0,ie?Error("react-stack-top-frame"):_,ie?L(i(k)):te)}})()),Zn}var eg;function s0(){return eg||(eg=1,process.env.NODE_ENV==="production"?Fa.exports=e0():Fa.exports=t0()),Fa.exports}var f=s0();const i0=(e,t)=>{const s=new Array(e.length+t.length);for(let i=0;i<e.length;i++)s[i]=e[i];for(let i=0;i<t.length;i++)s[e.length+i]=t[i];return s},o0=(e,t)=>({classGroupId:e,validator:t}),Mm=(e=new Map,t=null,s)=>({nextPart:e,validators:t,classGroupId:s}),dl="-",tg=[],n0="arbitrary..",r0=e=>{const t=l0(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return a0(r);const a=r.split(dl),l=a[0]===""&&a.length>1?1:0;return Am(a,l,t)},getConflictingClassGroupIds:(r,a)=>{if(a){const l=i[r],c=s[r];return l?c?i0(c,l):l:c||tg}return s[r]||tg}}},Am=(e,t,s)=>{if(e.length-t===0)return s.classGroupId;const o=e[t],n=s.nextPart.get(o);if(n){const c=Am(e,t+1,n);if(c)return c}const r=s.validators;if(r===null)return;const a=t===0?e.join(dl):e.slice(t).join(dl),l=r.length;for(let c=0;c<l;c++){const d=r[c];if(d.validator(a))return d.classGroupId}},a0=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),s=t.indexOf(":"),i=t.slice(0,s);return i?n0+i:void 0})(),l0=e=>{const{theme:t,classGroups:s}=e;return c0(s,t)},c0=(e,t)=>{const s=Mm();for(const i in e){const o=e[i];rh(o,s,i,t)}return s},rh=(e,t,s,i)=>{const o=e.length;for(let n=0;n<o;n++){const r=e[n];d0(r,t,s,i)}},d0=(e,t,s,i)=>{if(typeof e=="string"){u0(e,t,s);return}if(typeof e=="function"){h0(e,t,s,i);return}p0(e,t,s,i)},u0=(e,t,s)=>{const i=e===""?t:Lm(t,e);i.classGroupId=s},h0=(e,t,s,i)=>{if(g0(e)){rh(e(i),t,s,i);return}t.validators===null&&(t.validators=[]),t.validators.push(o0(s,e))},p0=(e,t,s,i)=>{const o=Object.entries(e),n=o.length;for(let r=0;r<n;r++){const[a,l]=o[r];rh(l,Lm(t,a),s,i)}},Lm=(e,t)=>{let s=e;const i=t.split(dl),o=i.length;for(let n=0;n<o;n++){const r=i[n];let a=s.nextPart.get(r);a||(a=Mm(),s.nextPart.set(r,a)),s=a}return s},g0=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,f0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),i=Object.create(null);const o=(n,r)=>{s[n]=r,t++,t>e&&(t=0,i=s,s=Object.create(null))};return{get(n){let r=s[n];if(r!==void 0)return r;if((r=i[n])!==void 0)return o(n,r),r},set(n,r){n in s?s[n]=r:o(n,r)}}},au="!",sg=":",m0=[],ig=(e,t,s,i,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:i,isExternal:o}),v0=e=>{const{prefix:t,experimentalParseClassName:s}=e;let i=o=>{const n=[];let r=0,a=0,l=0,c;const d=o.length;for(let v=0;v<d;v++){const C=o[v];if(r===0&&a===0){if(C===sg){n.push(o.slice(l,v)),l=v+1;continue}if(C==="/"){c=v;continue}}C==="["?r++:C==="]"?r--:C==="("?a++:C===")"&&a--}const u=n.length===0?o:o.slice(l);let h=u,p=!1;u.endsWith(au)?(h=u.slice(0,-1),p=!0):u.startsWith(au)&&(h=u.slice(1),p=!0);const m=c&&c>l?c-l:void 0;return ig(n,p,h,m)};if(t){const o=t+sg,n=i;i=r=>r.startsWith(o)?n(r.slice(o.length)):ig(m0,!1,r,void 0,!0)}if(s){const o=i;i=n=>s({className:n,parseClassName:o})}return i},C0=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((s,i)=>{t.set(s,1e6+i)}),s=>{const i=[];let o=[];for(let n=0;n<s.length;n++){const r=s[n],a=r[0]==="[",l=t.has(r);a||l?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(r)):o.push(r)}return o.length>0&&(o.sort(),i.push(...o)),i}},w0=e=>({cache:f0(e.cacheSize),parseClassName:v0(e),sortModifiers:C0(e),...r0(e)}),b0=/\s+/,x0=(e,t)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:n}=t,r=[],a=e.trim().split(b0);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:u,modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}=s(d);if(u){l=d+(l.length>0?" "+l:l);continue}let C=!!v,w=i(C?m.substring(0,v):m);if(!w){if(!C){l=d+(l.length>0?" "+l:l);continue}if(w=i(m),!w){l=d+(l.length>0?" "+l:l);continue}C=!1}const b=h.length===0?"":h.length===1?h[0]:n(h).join(":"),x=p?b+au:b,y=x+w;if(r.indexOf(y)>-1)continue;r.push(y);const S=o(w,C);for(let E=0;E<S.length;++E){const F=S[E];r.push(x+F)}l=d+(l.length>0?" "+l:l)}return l},y0=(...e)=>{let t=0,s,i,o="";for(;t<e.length;)(s=e[t++])&&(i=Om(s))&&(o&&(o+=" "),o+=i);return o},Om=e=>{if(typeof e=="string")return e;let t,s="";for(let i=0;i<e.length;i++)e[i]&&(t=Om(e[i]))&&(s&&(s+=" "),s+=t);return s},S0=(e,...t)=>{let s,i,o,n;const r=l=>{const c=t.reduce((d,u)=>u(d),e());return s=w0(c),i=s.cache.get,o=s.cache.set,n=a,a(l)},a=l=>{const c=i(l);if(c)return c;const d=x0(l,s);return o(l,d),d};return n=r,(...l)=>n(y0(...l))},R0=[],dt=e=>{const t=s=>s[e]||R0;return t.isThemeGetter=!0,t},Nm=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Hm=/^\((?:(\w[\w-]*):)?(.+)\)$/i,F0=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,E0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,D0=/\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$/,P0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,T0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,k0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ai=e=>F0.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),li=e=>!!e&&Number.isInteger(Number(e)),sd=e=>e.endsWith("%")&&Le(e.slice(0,-1)),_s=e=>E0.test(e),Bm=()=>!0,I0=e=>D0.test(e)&&!P0.test(e),ah=()=>!1,M0=e=>T0.test(e),A0=e=>k0.test(e),L0=e=>!fe(e)&&!me(e),O0=e=>Ti(e,zm,ah),fe=e=>Nm.test(e),Vi=e=>Ti(e,Wm,I0),og=e=>Ti(e,j0,Le),N0=e=>Ti(e,_m,Bm),H0=e=>Ti(e,jm,ah),ng=e=>Ti(e,Gm,ah),B0=e=>Ti(e,Vm,A0),Ea=e=>Ti(e,Um,M0),me=e=>Hm.test(e),Xn=e=>xo(e,Wm),G0=e=>xo(e,jm),rg=e=>xo(e,Gm),V0=e=>xo(e,zm),z0=e=>xo(e,Vm),Da=e=>xo(e,Um,!0),W0=e=>xo(e,_m,!0),Ti=(e,t,s)=>{const i=Nm.exec(e);return i?i[1]?t(i[1]):s(i[2]):!1},xo=(e,t,s=!1)=>{const i=Hm.exec(e);return i?i[1]?t(i[1]):s:!1},Gm=e=>e==="position"||e==="percentage",Vm=e=>e==="image"||e==="url",zm=e=>e==="length"||e==="size"||e==="bg-size",Wm=e=>e==="length",j0=e=>e==="number",jm=e=>e==="family-name",_m=e=>e==="number"||e==="weight",Um=e=>e==="shadow",_0=()=>{const e=dt("color"),t=dt("font"),s=dt("text"),i=dt("font-weight"),o=dt("tracking"),n=dt("leading"),r=dt("breakpoint"),a=dt("container"),l=dt("spacing"),c=dt("radius"),d=dt("shadow"),u=dt("inset-shadow"),h=dt("text-shadow"),p=dt("drop-shadow"),m=dt("blur"),v=dt("perspective"),C=dt("aspect"),w=dt("ease"),b=dt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...y(),me,fe],E=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],R=()=>[me,fe,l],D=()=>[ai,"full","auto",...R()],T=()=>[li,"none","subgrid",me,fe],P=()=>["auto",{span:["full",li,me,fe]},li,me,fe],M=()=>[li,"auto",me,fe],N=()=>["auto","min","max","fr",me,fe],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...R()],G=()=>[ai,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],_=()=>[ai,"screen","full","dvw","lvw","svw","min","max","fit",...R()],te=()=>[ai,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],I=()=>[e,me,fe],k=()=>[...y(),rg,ng,{position:[me,fe]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",V0,O0,{size:[me,fe]}],ie=()=>[sd,Xn,Vi],ve=()=>["","none","full",c,me,fe],O=()=>["",Le,Xn,Vi],ne=()=>["solid","dashed","dotted","double"],Me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[Le,sd,rg,ng],oe=()=>["","none",m,me,fe],U=()=>["none",Le,me,fe],he=()=>["none",Le,me,fe],z=()=>[Le,me,fe],ce=()=>[ai,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_s],breakpoint:[_s],color:[Bm],container:[_s],"drop-shadow":[_s],ease:["in","out","in-out"],font:[L0],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_s],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_s],shadow:[_s],spacing:["px",Le],text:[_s],"text-shadow":[_s],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ai,fe,me,C]}],container:["container"],columns:[{columns:[Le,fe,me,a]}],"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:S()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[li,"auto",me,fe]}],basis:[{basis:[ai,"full","auto",a,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,ai,"auto","initial","none",fe]}],grow:[{grow:["",Le,me,fe]}],shrink:[{shrink:["",Le,me,fe]}],order:[{order:[li,"first","last","none",me,fe]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mbs:[{mbs:H()}],mbe:[{mbe:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",..._()]}],"min-inline-size":[{"min-inline":["auto",..._()]}],"max-inline-size":[{"max-inline":["none",..._()]}],"block-size":[{block:["auto",...te()]}],"min-block-size":[{"min-block":["auto",...te()]}],"max-block-size":[{"max-block":["none",...te()]}],w:[{w:[a,"screen",...G()]}],"min-w":[{"min-w":[a,"screen","none",...G()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[r]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",s,Xn,Vi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,W0,N0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",sd,fe]}],"font-family":[{font:[G0,H0,t]}],"font-features":[{"font-features":[fe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,me,fe]}],"line-clamp":[{"line-clamp":[Le,"none",me,og]}],leading:[{leading:[n,...R()]}],"list-image":[{"list-image":["none",me,fe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,fe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",me,Vi]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Le,"auto",me,fe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,fe]}],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",me,fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},li,me,fe],radial:["",me,fe],conic:[li,me,fe]},z0,B0]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:ve()}],"rounded-s":[{"rounded-s":ve()}],"rounded-e":[{"rounded-e":ve()}],"rounded-t":[{"rounded-t":ve()}],"rounded-r":[{"rounded-r":ve()}],"rounded-b":[{"rounded-b":ve()}],"rounded-l":[{"rounded-l":ve()}],"rounded-ss":[{"rounded-ss":ve()}],"rounded-se":[{"rounded-se":ve()}],"rounded-ee":[{"rounded-ee":ve()}],"rounded-es":[{"rounded-es":ve()}],"rounded-tl":[{"rounded-tl":ve()}],"rounded-tr":[{"rounded-tr":ve()}],"rounded-br":[{"rounded-br":ve()}],"rounded-bl":[{"rounded-bl":ve()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-bs":[{"border-bs":O()}],"border-w-be":[{"border-be":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":O()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,me,fe]}],"outline-w":[{outline:["",Le,Xn,Vi]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",d,Da,Ea]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",u,Da,Ea]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Le,Vi]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",h,Da,Ea]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Le,me,fe]}],"mix-blend":[{"mix-blend":[...Me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Me()}],"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":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[me,fe]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":y()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,fe]}],filter:[{filter:["","none",me,fe]}],blur:[{blur:oe()}],brightness:[{brightness:[Le,me,fe]}],contrast:[{contrast:[Le,me,fe]}],"drop-shadow":[{"drop-shadow":["","none",p,Da,Ea]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Le,me,fe]}],"hue-rotate":[{"hue-rotate":[Le,me,fe]}],invert:[{invert:["",Le,me,fe]}],saturate:[{saturate:[Le,me,fe]}],sepia:[{sepia:["",Le,me,fe]}],"backdrop-filter":[{"backdrop-filter":["","none",me,fe]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[Le,me,fe]}],"backdrop-contrast":[{"backdrop-contrast":[Le,me,fe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,me,fe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,me,fe]}],"backdrop-invert":[{"backdrop-invert":["",Le,me,fe]}],"backdrop-opacity":[{"backdrop-opacity":[Le,me,fe]}],"backdrop-saturate":[{"backdrop-saturate":[Le,me,fe]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,me,fe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,fe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",me,fe]}],ease:[{ease:["linear","initial",w,me,fe]}],delay:[{delay:[Le,me,fe]}],animate:[{animate:["none",b,me,fe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,me,fe]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:U()}],"rotate-x":[{"rotate-x":U()}],"rotate-y":[{"rotate-y":U()}],"rotate-z":[{"rotate-z":U()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:z()}],"skew-x":[{"skew-x":z()}],"skew-y":[{"skew-y":z()}],transform:[{transform:[me,fe,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"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",me,fe]}],"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":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",me,fe]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Le,Xn,Vi,og]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]}},U0=S0(_0);function se(...e){return U0(ae(e))}var ul=(e=>(e.Description="description",e.Error="error",e))(ul||{});const Gr=({text:e,className:t,variant:s=ul.Description,...i})=>e?f.jsx("span",{...i,role:"alert",className:se("dial-tiny-text",s===ul.Error?"text-error":"text-secondary",t),children:e}):null,ds=({...e})=>f.jsx(Gr,{...e,variant:ul.Error});var Ke=(e=>(e.Primary="primary",e.Neutral="neutral",e.Error="error",e.Success="Success",e.Secondary="secondary",e.Tertiary="tertiary",e))(Ke||{}),Oe=(e=>(e.Solid="solid",e.Outlined="outlined",e.Ghost="ghost",e.Link="link",e))(Oe||{});const ag={[Ke.Primary]:{[Oe.Solid]:"dial-primary-solid-button",[Oe.Ghost]:"dial-primary-ghost-button",[Oe.Link]:"dial-primary-link-button"},[Ke.Neutral]:{[Oe.Outlined]:"dial-neutral-outlined-button"},[Ke.Error]:{[Oe.Solid]:"dial-error-solid-button",[Oe.Ghost]:"dial-error-ghost-button"},[Ke.Success]:{[Oe.Ghost]:"dial-success-ghost-button"},[Ke.Secondary]:{[Oe.Ghost]:"dial-secondary-ghost-button"},[Ke.Tertiary]:{[Oe.Ghost]:"dial-tertiary-ghost-button"}},$m=(e=Ke.Primary,t=Oe.Solid)=>{const s=ag[e]?.[t];return s||(console.warn(`Could not find Button styles for variant: ${e} and appearance: ${t}. Using default primary solid button styles.`),ag[Ke.Primary][Oe.Solid])},$0=7,q0=2,qm=g.createContext(null),Km=()=>{const e=g.useContext(qm);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e},K0=({initialOpen:e=!1,placement:t="bottom",isTriggerClickable:s=!1,open:i,onOpenChange:o}={})=>{const[n,r]=g.useState(e),a=g.useRef(null),l=i??n,c=o??r,d=Re.useFloating({placement:t,open:l,onOpenChange:c,whileElementsMounted:Re.autoUpdate,middleware:[Re.offset($0+q0),Re.flip({crossAxis:t.includes("-"),fallbackAxisSideDirection:"start",padding:5}),Re.shift({padding:5}),Re.arrow({element:a})]}),u=Re.useHover(d.context,{move:!1,enabled:i==null,mouseOnly:s,delay:{open:500,close:0}}),h=Re.useFocus(d.context,{enabled:i==null}),p=Re.useDismiss(d.context),m=Re.useRole(d.context,{role:"tooltip"}),v=Re.useInteractions([u,h,p,m]);return g.useEffect(()=>{if(!l)return;const C=d.refs.reference.current;if(!(C instanceof Element))return;const w=new IntersectionObserver(([b])=>{b.isIntersecting||c(!1)},{root:null,threshold:0});return w.observe(C),()=>w.disconnect()},[l,d.refs.reference,c]),g.useMemo(()=>({open:l,setOpen:c,arrowRef:a,...v,...d}),[l,c,v,d])},lh=({children:e,...t})=>{const s=K0(t);return f.jsx(qm.Provider,{value:s,children:e})},ch=({style:e,...t})=>{const s=Km(),i=g.useRef(null),o=Re.useMergeRefs([s.refs.setFloating,i]);return s.open?f.jsx(Re.FloatingPortal,{id:"tooltip-portal",children:f.jsxs("div",{ref:o,style:{...s.floatingStyles,...e},...s.getFloatingProps(t),className:ae("z-[55] whitespace-pre-wrap break-words rounded border border-primary bg-layer-0 px-2 py-1 dial-tiny-text shadow max-w-[300px]",s.getFloatingProps(t).className),children:[t.children,f.jsx(Re.FloatingArrow,{ref:s.arrowRef,context:s.context,fill:"currentColor",strokeWidth:1,className:"stroke-primary text-[var(--bg-layer-0,_#000000)]"})]})}):null},dh=({children:e,asChild:t=!1,...s})=>{const i=Km(),o=t&&g.isValidElement(e),n=o?e.props?.ref:null,r=Re.useMergeRefs([i.refs.setReference,...n?[n]:[]]);return o?g.cloneElement(e,i.getReferenceProps({...e.props,...s,ref:r})):f.jsx("span",{ref:r,...i.getReferenceProps(s),className:s.className??"dial-tooltip-trigger text-left",children:e})},Wt=({hideTooltip:e,tooltip:t,children:s,triggerClassName:i,contentClassName:o,...n})=>f.jsxs(lh,{...n,children:[f.jsx(dh,{className:ae(i,"truncate"),children:s}),f.jsx(ch,{className:ae("text-primary",o,"max-w-[300px]",(e||!t)&&"hidden"),children:t})]});var wt=(e=>(e.Small="small",e.Standard="standard",e))(wt||{});const ki=({variant:e,appearance:t=Oe.Solid,size:s=wt.Standard,className:i,icon:o,tooltipProps:n,type:r="button",...a})=>{const l=se(e&&$m(e,t),s===wt.Small?"h-[24px] w-[24px]":"h-[40px] w-[40px]","dial-icon-button disabled:cursor-not-allowed focus-visible:outline outline-offset-0 disabled:text-controls-secondary-disable",i),c=f.jsx("button",{...a,type:r,className:l,"aria-label":a["aria-label"],children:o});return n?f.jsx(Wt,{...n,children:c}):c},Y0="w-[24px] h-[24px] border border-solid rounded-[6px] border-transparent flex items-center justify-center text-secondary hover:text-controls-accent-primary-hover active:text-controls-accent-primary-active focus-within:border-focus";var xt=(e=>(e[e.LG=24]="LG",e[e.MD=20]="MD",e[e.SM=16]="SM",e))(xt||{});const qt=18,J={size:qt,stroke:2},Ym=({caption:e,onClick:t})=>{if(!e)return null;const s=f.jsx(ki,{"aria-label":e,className:Y0,icon:f.jsx(j.IconInfoCircle,{size:xt.SM}),onClick:t});return e?f.jsx(Wt,{tooltip:e,triggerClassName:"flex justify-center items-center",children:s}):s},yo=({label:e,required:t,className:s,caption:i,...o})=>e?f.jsxs("label",{...o,className:se("dial-tiny-text text-secondary flex items-center gap-1",s),children:[typeof e=="string"?f.jsx("span",{className:"min-h-4",children:e}):e,t&&f.jsx("span",{className:"text-accent-primary",children:"*"}),f.jsx(Ym,{caption:i})]}):null,ze=({icon:e,className:t})=>e?f.jsx("span",{className:ae("flex-shrink-0",t),children:e}):null,us=({label:e,variant:t,appearance:s=Oe.Solid,size:i=wt.Standard,className:o,textClassName:n,iconAfter:r,iconBefore:a,hideTitleOnMobile:l,type:c="button",tooltipProps:d,...u})=>{const h=ae(l?"hidden sm:inline":"inline",n),p=se(t&&$m(t,s),i===wt.Small?"dial-tiny-semi-text":"dial-small-semi-text",s!==Oe.Link&&(i===wt.Small?"h-[24px] px-2":"h-[40px] px-3"),"disabled:cursor-not-allowed focus-visible:outline outline-offset-0",o),m=f.jsxs("button",{...u,type:c,className:p,"aria-label":typeof e=="string"&&e||u["aria-label"],children:[f.jsx(ze,{icon:a}),e&&f.jsx("span",{className:h,children:e}),f.jsx(ze,{icon:r})]});return d?f.jsx(Wt,{...d,children:m}):m};var Cs=(e=>(e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e))(Cs||{});const Z0=e=>({info:f.jsx(j.IconInfoCircle,{...e}),error:f.jsx(j.IconAlertCircle,{...e}),warning:f.jsx(j.IconAlertTriangle,{...e}),success:f.jsx(j.IconCircleCheck,{...e})}),X0={[Cs.Info]:"bg-info border-info text-info",[Cs.Success]:"bg-success border-success text-success",[Cs.Warning]:"bg-warning border-warning text-warning",[Cs.Error]:"bg-error border-error text-error"},Q0="items-center justify-between gap-2 p-3 border border-solid dial-small-text-150 rounded flex",Zm=({variant:e=Cs.Info,message:t,className:s,iconSize:i=24,iconStroke:o=2,closable:n=!1,onClose:r,children:a,...l})=>{const c=g.useMemo(()=>Z0({size:i,stroke:o})[e],[e,i,o]);return f.jsxs("div",{...l,role:"alert",className:se(Q0,X0[e],s),children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(ze,{icon:c}),f.jsx("div",{className:"text-primary",children:t})]}),a,n&&f.jsx(us,{className:"ml-2 text-secondary hover:text-primary","aria-label":"Close alert",iconBefore:f.jsx(j.IconX,{size:xt.SM}),onClick:r})]})},J0="flex items-center justify-center text-secondary",ex="shrink-0 grow-0 basis-auto animate-spin-steps",tx=e=>xe.createElement("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.createElement("path",{d:"M24 39V46.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),xe.createElement("path",{opacity:.4,d:"M9 24H1.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),xe.createElement("path",{opacity:.5,d:"M8.0918 8.0918L13.3994 13.3994",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),xe.createElement("path",{opacity:.6,d:"M24 1.5V9",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),xe.createElement("path",{opacity:.7,d:"M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),xe.createElement("path",{opacity:.8,d:"M46.5 24H39",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),xe.createElement("path",{opacity:.9,d:"M34.6055 34.6055L39.9082 39.9082",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),xe.createElement("path",{opacity:.3,d:"M13.3936 34.6055L8.08594 39.9131",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})),Vr=({size:e=18,className:t,iconClassName:s,fullWidth:i=!0,ariaLabel:o="Loading"})=>f.jsx("div",{role:"status",className:ae({[J0]:!0,"w-full h-full":i,[t||""]:!!t}),children:f.jsx(ze,{icon:f.jsx(tx,{width:e,height:e,className:ae(ex,s),role:"img","aria-label":o})})}),sx="text-primary",gt=({text:e,className:t,contentClassName:s,hideTooltip:i,id:o,customTooltipContent:n,...r})=>{const a=g.useRef(null),[l,c]=g.useState(!1),[d,u]=g.useState(""),h=g.useRef(null),p=()=>{const w=a.current;if(!w)return;u(w.textContent??"");const b=w.clientWidth,x=w.scrollWidth,y=Math.ceil(w.getBoundingClientRect().width);c(x>b||x>y)},m=g.useCallback(()=>{h.current&&cancelAnimationFrame(h.current),h.current=requestAnimationFrame(p)},[]);g.useEffect(()=>{m();const w=()=>m();window.addEventListener("resize",w);let b=null;return"ResizeObserver"in window&&a.current&&(b=new ResizeObserver(()=>m()),b.observe(a.current)),()=>{window.removeEventListener("resize",w),b&&b.disconnect(),h.current&&cancelAnimationFrame(h.current)}},[e,m]);const v=g.useMemo(()=>typeof e=="string"?e:d,[d,e]),C=g.useMemo(()=>i?"":n||(l?v:""),[n,v,i,l]);return f.jsxs(lh,{...r,children:[f.jsx(dh,{asChild:!0,onMouseEnter:m,onFocusCapture:m,children:f.jsx("span",{id:o,className:se("block truncate flex-1 min-w-0 max-w-full text-left",t),"aria-label":l?v:void 0,onMouseEnter:m,onFocus:m,ref:a,children:e})}),f.jsx(ch,{className:se(sx,s,!C&&"hidden"),children:C})]})},lu="checkbox-container",cu=({label:e,id:t,checked:s,indeterminate:i,disabled:o,ariaLabel:n,onChange:r,className:a,...l})=>{const c=g.useCallback(p=>{r?.(p.target.checked,t)},[r,t]),d=ae("flex flex-row items-center cursor-pointer text-accent-primary small-medium min-w-0",`${s||i?"":'before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:border before:border-hover before:rounded'}`,o?"pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4":"",a),u=ae("border rounded",o?"bg-layer-4 border-icon-secondary":""),h=()=>i?f.jsx(j.IconMinus,{className:u,...J}):s?f.jsx(j.IconCheck,{className:u,...J}):null;return f.jsxs("label",{...l,className:d,htmlFor:t,"aria-description":l["aria-description"]||lu,children:[h(),e&&(typeof e=="string"?f.jsx(gt,{text:e,className:"ml-2 text-primary"}):e),f.jsx("input",{type:"checkbox",role:"checkbox",name:t,onChange:c,id:t,checked:s,"aria-checked":i?"mixed":s,"aria-disabled":o||void 0,"aria-label":e?void 0:n,className:"invisible size-0"})]})};var Zt=(e=>(e.VALID="valid",e.ERROR="error",e))(Zt||{});const ix=(e,t)=>{if(t===e.id)switch(e.status){case Zt.VALID:return"border-accent-secondary text-primary";case Zt.ERROR:return"border-red-900 text-primary";default:return"border-accent-primary text-primary"}switch(e.status){case Zt.VALID:return"border-primary text-primary";case Zt.ERROR:return"border-red-900 text-error";default:return"border-primary text-secondary"}},ox=(e,t)=>{if(t===e.id)switch(e.status){case Zt.VALID:return"bg-accent-secondary";case Zt.ERROR:return"bg-red-400";default:return"bg-accent-primary"}switch(e.status){case Zt.VALID:return"bg-accent-secondary";case Zt.ERROR:return"bg-red-400";default:return"bg-layer-4"}},nx=({step:e,index:t,currentStep:s,onChangeStep:i})=>{const o="h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny-text 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===Zt.ERROR?f.jsx(j.IconExclamationCircle,{stroke:2,size:xt.SM}):s!==e.id&&e.status===Zt.VALID?f.jsx(j.IconCheck,{stroke:2,size:xt.SM}):t+1;return f.jsxs("button",{className:ae(o,ix(e,s)),onClick:()=>i(e.id),children:[f.jsx("span",{className:ae(n,ox(e,s)),children:r()}),f.jsx("span",{children:e.name})]})},rx=({steps:e,currentStep:t,onChangeStep:s})=>{const i=o=>{const n=e.findIndex(a=>a.id===t),r=e.findIndex(a=>a.id===o);(o!==t&&e[n].status===Zt.VALID||r<n)&&s(o)};return f.jsx("div",{id:"steps",className:"flex gap-x-3",children:e.map((o,n)=>f.jsx(nx,{currentStep:t,onChangeStep:i,step:o,index:n},o.id))})},Xi=({name:e,value:t,label:s,description:i,checked:o=!1,inputId:n,className:r,labelClassName:a,disabled:l,onChange:c,descriptionClassName:d,caption:u})=>{const h=`${n}-desc`,p=ae("dial-small-text cursor-pointer py-[1px]",l?"text-secondary":"text-primary",a,l&&"cursor-not-allowed"),m=ae("cursor-pointer dial-input-radio",!!s&&"mr-2",r,l&&"!cursor-not-allowed"),v=ae("flex flex-col",!!i&&"mb-2",l&&"cursor-not-allowed"),C=ae("dial-tiny-text mt-2 ml-[26px] text-secondary",d,l&&"cursor-not-allowed"),w=b=>{l||b.target.checked&&c?.(t)};return f.jsxs("div",{className:v,children:[f.jsxs("div",{className:ae("flex flex-row",!u&&"items-center"),children:[f.jsx("input",{type:"radio",id:n,name:e,value:t,checked:o,disabled:l,"aria-describedby":o&&i?h:void 0,className:m,onChange:w}),(s||u)&&f.jsxs("div",{className:"flex flex-col gap-1",children:[s&&f.jsx("label",{className:p,htmlFor:n,"aria-describedby":u?"caption":"",children:s}),u&&f.jsx("span",{id:"caption",className:"dial-tiny-text text-secondary",children:u})]})]}),o&&i&&f.jsx("div",{id:h,className:C,children:i})]})};var yr=(e=>(e.Vertical="vertical",e.Horizontal="horizontal",e))(yr||{});const ax="w-full flex gap-2",lx={[yr.Vertical]:"flex-col",[yr.Horizontal]:"flex-row items-end"},Kl=({id:e,label:t,required:s,description:i,error:o,orientation:n=yr.Vertical,labelVisuallyHidden:r=!1,className:a,labelClassName:l,errorClassName:c,childrenClassName:d,captionDescription:u,readonly:h,value:p,defaultEmptyText:m,children:v})=>{const C=`${e}-label`,w=i?`${e}-desc`:void 0,b=o?`${e}-err`:void 0,x=`${e}-caption-desc`,y=[w,b].filter(Boolean).join(" ")||void 0,S=g.useCallback(()=>typeof o=="boolean"?null:typeof o=="string"||typeof o>"u"?o?f.jsx("div",{id:b,"aria-live":"polite",className:c,children:f.jsx(ds,{text:o})}):null:f.jsx("div",{id:b,role:"alert","aria-live":"polite",className:c,children:o}),[o,c,b]),E=g.useCallback(()=>p?typeof p=="string"||typeof p=="number"?f.jsx("span",{"aria-readonly":"true",children:p}):p:f.jsx("span",{className:"flex min-h-4","aria-readonly":"true",children:m??"None"}),[p,m]);return f.jsxs("div",{role:"group","aria-labelledby":t?C:void 0,"aria-describedby":y,className:se(ax,lx[n],a),children:[t&&f.jsx("div",{id:C,className:se(n==="horizontal"&&"shrink-0"),children:f.jsx(yo,{htmlFor:e,label:t,required:s,className:se(r&&"sr-only",l),caption:i})}),f.jsxs("div",{className:se("min-w-0 w-full",d),children:[h?f.jsx("div",{className:"dial-input px-3 py-2",children:E()}):v,u&&f.jsx("div",{id:x,className:se({"dial-tiny-text text-secondary mt-1":!0,"text-error":!!o}),children:u}),S()]})]})};var no=(e=>(e.Row="Row",e.Column="Column",e))(no||{});const cx="flex",dx="pb-1 mt-2",ux={[no.Column]:"flex-col gap-y-3",[no.Row]:"flex-row gap-x-6"},hl=({fieldTitle:e,radioClassName:t,containerClassName:s,selectedItemClassName:i,selectedLabelClassName:o,radioGroupClassName:n,inputContainerClassName:r,selectedInputContainerClassName:a,groupLabelClassName:l,formItemChildrenClassName:c,labelClassName:d,disabled:u,elementId:h,radioButtons:p,activeRadioButton:m,orientation:v,onChange:C})=>f.jsx(Kl,{id:h,label:e,labelClassName:l||d,className:s,childrenClassName:c,children:f.jsx("div",{role:"radiogroup","aria-label":e,"aria-disabled":u||void 0,className:se(cx,ux[v],n),children:p.map(w=>f.jsxs("div",{className:se("flex flex-col",r,w.id===m&&a),children:[f.jsx(Xi,{name:h,value:w.id,inputId:`${h}-${w.id}`,disabled:u,className:t,labelClassName:se(d,w.id===m&&o),label:w.name,caption:w.caption,checked:w.id===m,onChange:()=>C(w.id)}),w.id===m&&w.content?f.jsx("div",{className:se(dx,i),children:w.content}):null]},w.id))})}),zr=({icon:e,title:t,description:s,containerClassName:i,titleClassName:o,descriptionClassName:n})=>f.jsxs("div",{className:se("h-full w-full flex flex-col items-center justify-center text-secondary",i),"aria-label":"no-data-container",children:[e||f.jsx(j.IconClipboardX,{width:60,height:60,stroke:.5}),f.jsx("span",{className:se("dial-small-text mt-2 text-primary",o),"aria-label":"no-results-title",children:t}),s&&f.jsx("span",{className:se("mt-1 text-primary",n),"aria-label":"no-results-description",children:s})]}),id=48,Xm=({containerClassName:e,children:t,width:s=280,title:i,iconSize:o=24,iconStroke:n=1.5,titleClassName:r,additionalButtons:a,isOpened:l,onToggle:c})=>{const[d,u]=g.useState(s),[h,p]=g.useState(!0),m=g.useMemo(()=>typeof l=="boolean",[l]),v=m?l:h;g.useEffect(()=>{m&&u(l?s:id)},[m,l,s]);const C=se(["transform rotate-180 [writing-mode:tb-rl] py-4 px-3",v&&"hidden",r]),w=se(["flex flex-row gap-2 cursor-pointer text-secondary py-2 items-center",v?"justify-end px-4":"justify-center"]),b=x=>{const y=!v;if(m){u(y?s:id),c?.(y,x);return}u(y?s:id),p(y)};return f.jsxs("div",{className:se(["rounded flex flex-col justify-between",e]),style:{width:`${d}px`},"aria-label":"collapsible-sidebar",children:[f.jsx("div",{className:se(["flex-1 p-4 min-h-0 overflow-auto",!v&&"hidden"]),children:t}),f.jsx("div",{className:C,children:i}),f.jsxs("div",{className:se("border-t border-tertiary h-12",w),children:[v&&a,f.jsx(ki,{className:"hover:text-accent-primary",onClick:b,"aria-label":"sidebar-state",size:wt.Small,icon:v?f.jsx(j.IconChevronsLeft,{size:o,stroke:n}):f.jsx(j.IconChevronsRight,{size:o,stroke:n})})]})]})},hx=({label:e,text:t,tooltip:s,children:i,postfix:o,className:n})=>f.jsxs("div",{className:se("flex flex-col",i?"":"max-w-[200px]",n),children:[e&&f.jsx("label",{className:"dial-tiny-text mb-2 text-secondary",children:e}),i||f.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[f.jsx(Wt,{triggerClassName:"text-primary flex-1 min-w-0",tooltip:s||t,children:t}),o||null]})]});var Yl=(e=>(e.Default="default",e))(Yl||{});const px={[Yl.Default]:"border-icon-secondary bg-layer-3"},Qo=({tag:e,className:t,remove:s,variant:i=Yl.Default,iconBefore:o,bordered:n=!0})=>{const r=px[i],a=se("flex items-center gap-1 dial-tiny-text rounded p-1 h-[22px] text-primary",r,n?"border":"border-transparent",t);return f.jsxs("div",{className:a,children:[f.jsx(ze,{icon:o}),f.jsx(gt,{text:e}),s&&f.jsx(us,{className:"p-0",iconAfter:f.jsx(j.IconX,{size:xt.SM}),onClick:l=>s(l)})]},e)},Qm=g.createContext({dragDropManager:void 0});function ss(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 lg=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),cg=function(){return Math.random().toString(36).substring(7).split("").join(".")},dg={INIT:"@@redux/INIT"+cg(),REPLACE:"@@redux/REPLACE"+cg()};function gx(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 fx(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(Cx(e))return"date";if(vx(e))return"error";var s=mx(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 mx(e){return typeof e.constructor=="function"?e.constructor.name:null}function vx(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Cx(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function jo(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=fx(e)),t}function Jm(e,t,s){var i;if(typeof t=="function"&&typeof s=="function"||typeof s=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?ss(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"?ss(1):"Expected the enhancer to be a function. Instead, received: '"+jo(s)+"'");return s(Jm)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?ss(2):"Expected the root reducer to be a function. Instead, received: '"+jo(e)+"'");var o=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"?ss(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(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?ss(4):"Expected the listener to be a function. Instead, received: '"+jo(v)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?ss(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 C=!0;return c(),a.push(v),function(){if(C){if(l)throw new Error(process.env.NODE_ENV==="production"?ss(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.");C=!1,c();var b=a.indexOf(v);a.splice(b,1),r=null}}}function h(v){if(!gx(v))throw new Error(process.env.NODE_ENV==="production"?ss(7):"Actions must be plain objects. Instead, the actual type was: '"+jo(v)+"'. 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 v.type>"u")throw new Error(process.env.NODE_ENV==="production"?ss(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"?ss(9):"Reducers may not dispatch actions.");try{l=!0,n=o(n,v)}finally{l=!1}for(var C=r=a,w=0;w<C.length;w++){var b=C[w];b()}return v}function p(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?ss(10):"Expected the nextReducer to be a function. Instead, received: '"+jo(v));o=v,h({type:dg.REPLACE})}function m(){var v,C=u;return v={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?ss(11):"Expected the observer to be an object. Instead, received: '"+jo(b)+"'");function x(){b.next&&b.next(d())}x();var y=C(x);return{unsubscribe:y}}},v[lg]=function(){return this},v}return h({type:dg.INIT}),i={dispatch:h,subscribe:u,getState:d,replaceReducer:p},i[lg]=m,i}function Ie(e,t,...s){if(wx()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let i;if(t===void 0)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let o=0;i=new Error(t.replace(/%s/g,function(){return s[o++]})),i.name="Invariant Violation"}throw i.framesToPop=1,i}}function wx(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function bx(e,t,s){return t.split(".").reduce((i,o)=>i&&i[o]?i[o]:s||null,e)}function xx(e,t){return e.filter(s=>s!==t)}function ev(e){return typeof e=="object"}function yx(e,t){const s=new Map,i=n=>{s.set(n,s.has(n)?s.get(n)+1:1)};e.forEach(i),t.forEach(i);const o=[];return s.forEach((n,r)=>{n===1&&o.push(r)}),o}function Sx(e,t){return e.filter(s=>t.indexOf(s)>-1)}const uh="dnd-core/INIT_COORDS",Zl="dnd-core/BEGIN_DRAG",hh="dnd-core/PUBLISH_DRAG_SOURCE",Xl="dnd-core/HOVER",Ql="dnd-core/DROP",Jl="dnd-core/END_DRAG";function ug(e,t){return{type:uh,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const Rx={type:uh,payload:{clientOffset:null,sourceClientOffset:null}};function Fx(e){return function(s=[],i={publishSource:!0}){const{publishSource:o=!0,clientOffset:n,getSourceClientOffset:r}=i,a=e.getMonitor(),l=e.getRegistry();e.dispatch(ug(n)),Ex(s,a,l);const c=Tx(s,a);if(c==null){e.dispatch(Rx);return}let d=null;if(n){if(!r)throw new Error("getSourceClientOffset must be defined");Dx(r),d=r(c)}e.dispatch(ug(n,d));const h=l.getSource(c).beginDrag(a,c);if(h==null)return;Px(h),l.pinSource(c);const p=l.getSourceType(c);return{type:Zl,payload:{itemType:p,item:h,sourceId:c,clientOffset:n||null,sourceClientOffset:d||null,isSourcePublic:!!o}}}}function Ex(e,t,s){Ie(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(i){Ie(s.getSource(i),"Expected sourceIds to be registered.")})}function Dx(e){Ie(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Px(e){Ie(ev(e),"Item must be an object.")}function Tx(e,t){let s=null;for(let i=e.length-1;i>=0;i--)if(t.canDragSource(e[i])){s=e[i];break}return s}function kx(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Ix(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.forEach(function(o){kx(e,o,s[o])})}return e}function Mx(e){return function(s={}){const i=e.getMonitor(),o=e.getRegistry();Ax(i),Nx(i).forEach((r,a)=>{const l=Lx(r,a,o,i),c={type:Ql,payload:{dropResult:Ix({},s,l)}};e.dispatch(c)})}}function Ax(e){Ie(e.isDragging(),"Cannot call drop while not dragging."),Ie(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Lx(e,t,s,i){const o=s.getTarget(e);let n=o?o.drop(i,e):void 0;return Ox(n),typeof n>"u"&&(n=t===0?{}:i.getDropResult()),n}function Ox(e){Ie(typeof e>"u"||ev(e),"Drop result must either be an object or undefined.")}function Nx(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Hx(e){return function(){const s=e.getMonitor(),i=e.getRegistry();Bx(s);const o=s.getSourceId();return o!=null&&(i.getSource(o,!0).endDrag(s,o),i.unpinSource()),{type:Jl}}}function Bx(e){Ie(e.isDragging(),"Cannot call endDrag while not dragging.")}function du(e,t){return t===null?e===null:Array.isArray(e)?e.some(s=>s===t):e===t}function Gx(e){return function(s,{clientOffset:i}={}){Vx(s);const o=s.slice(0),n=e.getMonitor(),r=e.getRegistry(),a=n.getItemType();return Wx(o,r,a),zx(o,n,r),jx(o,n,r),{type:Xl,payload:{targetIds:o,clientOffset:i||null}}}}function Vx(e){Ie(Array.isArray(e),"Expected targetIds to be an array.")}function zx(e,t,s){Ie(t.isDragging(),"Cannot call hover while not dragging."),Ie(!t.didDrop(),"Cannot call hover after drop.");for(let i=0;i<e.length;i++){const o=e[i];Ie(e.lastIndexOf(o)===i,"Expected targetIds to be unique in the passed array.");const n=s.getTarget(o);Ie(n,"Expected targetIds to be registered.")}}function Wx(e,t,s){for(let i=e.length-1;i>=0;i--){const o=e[i],n=t.getTargetType(o);du(n,s)||e.splice(i,1)}}function jx(e,t,s){e.forEach(function(i){s.getTarget(i).hover(t,i)})}function _x(e){return function(){if(e.getMonitor().isDragging())return{type:hh}}}function Ux(e){return{beginDrag:Fx(e),publishDragSource:_x(e),hover:Gx(e),drop:Mx(e),endDrag:Hx(e)}}class $x{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 i(n){return(...r)=>{const a=n.apply(t,r);typeof a<"u"&&s(a)}}const o=Ux(this);return Object.keys(o).reduce((n,r)=>{const a=o[r];return n[r]=i(a),n},{})}dispatch(t){this.store.dispatch(t)}constructor(t,s){this.isSetUp=!1,this.handleRefCountChange=()=>{const i=this.store.getState().refCount>0;this.backend&&(i&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!i&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=s,t.subscribe(this.handleRefCountChange)}}function qx(e,t){return{x:e.x+t.x,y:e.y+t.y}}function tv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Kx(e){const{clientOffset:t,initialClientOffset:s,initialSourceClientOffset:i}=e;return!t||!s||!i?null:tv(qx(t,i),s)}function Yx(e){const{clientOffset:t,initialClientOffset:s}=e;return!t||!s?null:tv(t,s)}const lr=[],ph=[];lr.__IS_NONE__=!0;ph.__IS_ALL__=!0;function Zx(e,t){return e===lr?!1:e===ph||typeof t>"u"?!0:Sx(t,e).length>0}class Xx{subscribeToStateChange(t,s={}){const{handlerIds:i}=s;Ie(typeof t=="function","listener must be a function."),Ie(typeof i>"u"||Array.isArray(i),"handlerIds, when specified, must be an array of strings.");let o=this.store.getState().stateId;const n=()=>{const r=this.store.getState(),a=r.stateId;try{a===o||a===o+1&&!Zx(r.dirtyHandlerIds,i)||t()}finally{o=a}};return this.store.subscribe(n)}subscribeToOffsetChange(t){Ie(typeof t=="function","listener must be a function.");let s=this.store.getState().dragOffset;const i=()=>{const o=this.store.getState().dragOffset;o!==s&&(s=o,t())};return this.store.subscribe(i)}canDragSource(t){if(!t)return!1;const s=this.registry.getSource(t);return Ie(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(Ie(s,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const i=this.registry.getTargetType(t),o=this.getItemType();return du(i,o)&&s.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const s=this.registry.getSource(t,!0);if(Ie(s,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const i=this.registry.getSourceType(t),o=this.getItemType();return i!==o?!1:s.isDragging(this,t)}isOverTarget(t,s={shallow:!1}){if(!t)return!1;const{shallow:i}=s;if(!this.isDragging())return!1;const o=this.registry.getTargetType(t),n=this.getItemType();if(n&&!du(o,n))return!1;const r=this.getTargetIds();if(!r.length)return!1;const a=r.indexOf(t);return i?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 Kx(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Yx(this.store.getState().dragOffset)}constructor(t,s){this.store=t,this.registry=s}}const hg=typeof global<"u"?global:self,sv=hg.MutationObserver||hg.WebKitMutationObserver;function iv(e){return function(){const s=setTimeout(o,0),i=setInterval(o,50);function o(){clearTimeout(s),clearInterval(i),e()}}}function Qx(e){let t=1;const s=new sv(e),i=document.createTextNode("");return s.observe(i,{characterData:!0}),function(){t=-t,i.data=t}}const Jx=typeof sv=="function"?Qx:iv;class ey{enqueueTask(t){const{queue:s,requestFlush:i}=this;s.length||(i(),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 i=0,o=t.length-this.index;i<o;i++)t[i]=t[i+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=Jx(this.flush),this.requestErrorThrow=iv(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class ty{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 sy{create(t){const s=this.freeTasks,i=s.length?s.pop():new ty(this.onError,o=>s[s.length]=o);return i.task=t,i}constructor(t){this.onError=t,this.freeTasks=[]}}const ov=new ey,iy=new sy(ov.registerPendingError);function oy(e){ov.enqueueTask(iy.create(e))}const gh="dnd-core/ADD_SOURCE",fh="dnd-core/ADD_TARGET",mh="dnd-core/REMOVE_SOURCE",ec="dnd-core/REMOVE_TARGET";function ny(e){return{type:gh,payload:{sourceId:e}}}function ry(e){return{type:fh,payload:{targetId:e}}}function ay(e){return{type:mh,payload:{sourceId:e}}}function ly(e){return{type:ec,payload:{targetId:e}}}function cy(e){Ie(typeof e.canDrag=="function","Expected canDrag to be a function."),Ie(typeof e.beginDrag=="function","Expected beginDrag to be a function."),Ie(typeof e.endDrag=="function","Expected endDrag to be a function.")}function dy(e){Ie(typeof e.canDrop=="function","Expected canDrop to be a function."),Ie(typeof e.hover=="function","Expected hover to be a function."),Ie(typeof e.drop=="function","Expected beginDrag to be a function.")}function uu(e,t){if(t&&Array.isArray(e)){e.forEach(s=>uu(s,!1));return}Ie(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 ns;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(ns||(ns={}));let uy=0;function hy(){return uy++}function py(e){const t=hy().toString();switch(e){case ns.SOURCE:return`S${t}`;case ns.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function pg(e){switch(e[0]){case"S":return ns.SOURCE;case"T":return ns.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function gg(e,t){const s=e.entries();let i=!1;do{const{done:o,value:[,n]}=s.next();if(n===t)return!0;i=!!o}while(!i);return!1}class gy{addSource(t,s){uu(t),cy(s);const i=this.addHandler(ns.SOURCE,t,s);return this.store.dispatch(ny(i)),i}addTarget(t,s){uu(t,!0),dy(s);const i=this.addHandler(ns.TARGET,t,s);return this.store.dispatch(ry(i)),i}containsHandler(t){return gg(this.dragSources,t)||gg(this.dropTargets,t)}getSource(t,s=!1){return Ie(this.isSourceId(t),"Expected a valid source ID."),s&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return Ie(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return Ie(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return Ie(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return pg(t)===ns.SOURCE}isTargetId(t){return pg(t)===ns.TARGET}removeSource(t){Ie(this.getSource(t),"Expected an existing source."),this.store.dispatch(ay(t)),oy(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){Ie(this.getTarget(t),"Expected an existing target."),this.store.dispatch(ly(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const s=this.getSource(t);Ie(s,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=s}unpinSource(){Ie(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,s,i){const o=py(t);return this.types.set(o,s),t===ns.SOURCE?this.dragSources.set(o,i):t===ns.TARGET&&this.dropTargets.set(o,i),o}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const fy=(e,t)=>e===t;function my(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function vy(e,t,s=fy){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(!s(e[i],t[i]))return!1;return!0}function Cy(e=lr,t){switch(t.type){case Xl:break;case gh:case fh:case ec:case mh:return lr;case Zl:case hh:case Jl:case Ql:default:return ph}const{targetIds:s=[],prevTargetIds:i=[]}=t.payload,o=yx(s,i);if(!(o.length>0||!vy(s,i)))return lr;const r=i[i.length-1],a=s[s.length-1];return r!==a&&(r&&o.push(r),a&&o.push(a)),o}function wy(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function by(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.forEach(function(o){wy(e,o,s[o])})}return e}const fg={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function xy(e=fg,t){const{payload:s}=t;switch(t.type){case uh:case Zl:return{initialSourceClientOffset:s.sourceClientOffset,initialClientOffset:s.clientOffset,clientOffset:s.clientOffset};case Xl:return my(e.clientOffset,s.clientOffset)?e:by({},e,{clientOffset:s.clientOffset});case Jl:case Ql:return fg;default:return e}}function yy(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function _o(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.forEach(function(o){yy(e,o,s[o])})}return e}const Sy={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ry(e=Sy,t){const{payload:s}=t;switch(t.type){case Zl:return _o({},e,{itemType:s.itemType,item:s.item,sourceId:s.sourceId,isSourcePublic:s.isSourcePublic,dropResult:null,didDrop:!1});case hh:return _o({},e,{isSourcePublic:!0});case Xl:return _o({},e,{targetIds:s.targetIds});case ec:return e.targetIds.indexOf(s.targetId)===-1?e:_o({},e,{targetIds:xx(e.targetIds,s.targetId)});case Ql:return _o({},e,{dropResult:s.dropResult,didDrop:!0,targetIds:[]});case Jl:return _o({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Fy(e=0,t){switch(t.type){case gh:case fh:return e+1;case mh:case ec:return e-1;default:return e}}function Ey(e=0){return e+1}function Dy(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Py(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},i=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.forEach(function(o){Dy(e,o,s[o])})}return e}function Ty(e={},t){return{dirtyHandlerIds:Cy(e.dirtyHandlerIds,{type:t.type,payload:Py({},t.payload,{prevTargetIds:bx(e,"dragOperation.targetIds",[])})}),dragOffset:xy(e.dragOffset,t),refCount:Fy(e.refCount,t),dragOperation:Ry(e.dragOperation,t),stateId:Ey(e.stateId)}}function ky(e,t=void 0,s={},i=!1){const o=Iy(i),n=new Xx(o,new gy(o)),r=new $x(o,n),a=e(r,t,s);return r.receiveBackend(a),r}function Iy(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Jm(Ty,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function My(e,t){if(e==null)return{};var s=Ay(e,t),i,o;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(s[i]=e[i])}return s}function Ay(e,t){if(e==null)return{};var s={},i=Object.keys(e),o,n;for(n=0;n<i.length;n++)o=i[n],!(t.indexOf(o)>=0)&&(s[o]=e[o]);return s}let mg=0;const Ka=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Ly=g.memo(function(t){var{children:s}=t,i=My(t,["children"]);const[o,n]=Oy(i);return g.useEffect(()=>{if(n){const r=nv();return++mg,()=>{--mg===0&&(r[Ka]=null)}}},[]),f.jsx(Qm.Provider,{value:o,children:s})});function Oy(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=Ny(e.backend,e.context,e.options,e.debugMode),s=!e.context;return[t,s]}function Ny(e,t=nv(),s,i){const o=t;return o[Ka]||(o[Ka]={dragDropManager:ky(e,t,s,i)}),o[Ka]}function nv(){return typeof global<"u"?global:window}var od,vg;function Hy(){return vg||(vg=1,od=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 i,o,n;if(Array.isArray(t)){if(i=t.length,i!=s.length)return!1;for(o=i;o--!==0;)if(!e(t[o],s[o]))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),i=n.length,i!==Object.keys(s).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(s,n[o]))return!1;for(o=i;o--!==0;){var r=n[o];if(!e(t[r],s[r]))return!1}return!0}return t!==t&&s!==s}),od}var By=Hy();const Gy=Qb(By),ro=typeof window<"u"?g.useLayoutEffect:g.useEffect;function Vy(e,t,s){const[i,o]=g.useState(()=>t(e)),n=g.useCallback(()=>{const r=t(e);Gy(i,r)||(o(r),s&&s())},[i,e,s]);return ro(n),[i,n]}function zy(e,t,s){const[i,o]=Vy(e,t,s);return ro(function(){const r=e.getHandlerId();if(r!=null)return e.subscribeToStateChange(o,{handlerIds:[r]})},[e,o]),i}function rv(e,t,s){return zy(t,e||(()=>({})),()=>s.reconnect())}function av(e,t){const s=[...t||[]];return t==null&&typeof e!="function"&&s.push(e),g.useMemo(()=>typeof e=="function"?e():e,s)}function Wy(e){return g.useMemo(()=>e.hooks.dragSource(),[e])}function jy(e){return g.useMemo(()=>e.hooks.dragPreview(),[e])}let nd=!1,rd=!1;class _y{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){Ie(!nd,"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 nd=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{nd=!1}}isDragging(){if(!this.sourceId)return!1;Ie(!rd,"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 rd=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{rd=!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 ad=!1;class Uy{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,s){return this.internalMonitor.subscribeToStateChange(t,s)}canDrop(){if(!this.targetId)return!1;Ie(!ad,"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 ad=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{ad=!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 $y(e,t,s){const i=s.getRegistry(),o=i.addTarget(e,t);return[o,()=>i.removeTarget(o)]}function qy(e,t,s){const i=s.getRegistry(),o=i.addSource(e,t);return[o,()=>i.removeSource(o)]}function hu(e,t,s,i){let o;if(o!==void 0)return!!o;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(o=void 0,o===!1||o===void 0&&d!==u)return!1}return!0}function pu(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ky(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 Yy(e){return(t=null,s=null)=>{if(!g.isValidElement(t)){const n=t;return e(n,s),n}const i=t;return Ky(i),Zy(i,s?n=>e(n,s):e)}}function lv(e){const t={};return Object.keys(e).forEach(s=>{const i=e[s];if(s.endsWith("Ref"))t[s]=e[s];else{const o=Yy(i);t[s]=()=>o}}),t}function Cg(e,t){typeof e=="function"?e(t):e.current=t}function Zy(e,t){const s=e.ref;return Ie(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?g.cloneElement(e,{ref:i=>{Cg(s,i),Cg(t,i)}}):g.cloneElement(e,{ref:t})}class Xy{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,i=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(i&&this.disconnectDragPreview(),!!this.handlerId){if(!s){this.lastConnectedDragPreview=s;return}i&&(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!hu(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!hu(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=lv({dragSource:(s,i)=>{this.clearDragSource(),this.dragSourceOptions=i||null,pu(s)?this.dragSourceRef=s:this.dragSourceNode=s,this.reconnectDragSource()},dragPreview:(s,i)=>{this.clearDragPreview(),this.dragPreviewOptions=i||null,pu(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 Qy{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!hu(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=lv({dropTarget:(s,i)=>{this.clearDropTarget(),this.dropTargetOptions=i,pu(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 Pn(){const{dragDropManager:e}=g.useContext(Qm);return Ie(e!=null,"Expected drag drop context"),e}function Jy(e,t){const s=Pn(),i=g.useMemo(()=>new Xy(s.getBackend()),[s]);return ro(()=>(i.dragSourceOptions=e||null,i.reconnect(),()=>i.disconnectDragSource()),[i,e]),ro(()=>(i.dragPreviewOptions=t||null,i.reconnect(),()=>i.disconnectDragPreview()),[i,t]),i}function eS(){const e=Pn();return g.useMemo(()=>new _y(e),[e])}class tS{beginDrag(){const t=this.spec,s=this.monitor;let i=null;return typeof t.item=="object"?i=t.item:typeof t.item=="function"?i=t.item(s):i={},i??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 i=this.spec,o=this.monitor,{isDragging:n}=i;return n?n(o):s===t.getSourceId()}endDrag(){const t=this.spec,s=this.monitor,i=this.connector,{end:o}=t;o&&o(s.getItem(),s),i.reconnect()}constructor(t,s,i){this.spec=t,this.monitor=s,this.connector=i}}function sS(e,t,s){const i=g.useMemo(()=>new tS(e,t,s),[t,s]);return g.useEffect(()=>{i.spec=e},[e]),i}function iS(e){return g.useMemo(()=>{const t=e.type;return Ie(t!=null,"spec.type must be defined"),t},[e])}function oS(e,t,s){const i=Pn(),o=sS(e,t,s),n=iS(e);ro(function(){if(n!=null){const[a,l]=qy(n,o,i);return t.receiveHandlerId(a),s.receiveHandlerId(a),l}},[i,t,s,o,n])}function nS(e,t){const s=av(e,t);Ie(!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 i=eS(),o=Jy(s.options,s.previewOptions);return oS(s,i,o),[rv(s.collect,i,o),Wy(o),jy(o)]}function rS(e){return g.useMemo(()=>e.hooks.dropTarget(),[e])}function aS(e){const t=Pn(),s=g.useMemo(()=>new Qy(t.getBackend()),[t]);return ro(()=>(s.dropTargetOptions=e||null,s.reconnect(),()=>s.disconnectDropTarget()),[e]),s}function lS(){const e=Pn();return g.useMemo(()=>new Uy(e),[e])}function cS(e){const{accept:t}=e;return g.useMemo(()=>(Ie(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class dS{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 uS(e,t){const s=g.useMemo(()=>new dS(e,t),[t]);return g.useEffect(()=>{s.spec=e},[e]),s}function hS(e,t,s){const i=Pn(),o=uS(e,t),n=cS(e);ro(function(){const[a,l]=$y(n,o,i);return t.receiveHandlerId(a),s.receiveHandlerId(a),l},[i,t,o,s,n.map(r=>r.toString()).join("|")])}function cv(e,t){const s=av(e,t),i=lS(),o=aS(s.options);return hS(s,i,o),[rv(s.collect,i,o),rS(o)]}const wg="column",pS="flex items-center",gS="mr-3 cursor-move text-secondary",fS=({id:e,children:t,className:s,onFind:i,onMove:o,ariaLabel:n="Drag item"})=>{const r=g.useRef(null),a=g.useRef(null),l=typeof i=="function"?i(e):-1,[{isDragging:c},d,u]=nS(()=>({type:wg,item:{id:e,originalIndex:l},collect:p=>{const m=p.getItem();return{isDragging:p.isDragging()&&m?.id===e}},end:(p,m)=>{if(!p)return;!m.didDrop()&&typeof o=="function"&&p.originalIndex>-1&&o(p.id,p.originalIndex)}}),[e,l,o]),[,h]=cv(()=>({accept:wg,hover:p=>{if(!(!p||p.id===e)&&typeof i=="function"&&typeof o=="function"){const m=i(e);o(p.id,m)}}}),[i,o,e]);return u(h(a)),d(r),f.jsxs("div",{ref:a,className:se(pS,s),style:{opacity:c?0:1},"aria-roledescription":"Draggable item",children:[f.jsx("div",{ref:r,className:gS,"aria-label":n,children:f.jsx(j.IconGripVertical,{...J})}),t]})},mS=e=>xe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.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"}),xe.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"}),xe.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"}),xe.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"})),vS=e=>xe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.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"}),xe.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"})),CS=e=>xe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.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"}),xe.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"}),xe.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"})),wS=e=>xe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.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"}),xe.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"}),xe.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"}),xe.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"})),bS=e=>xe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.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"}),xe.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"}),xe.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"}),xe.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"}),xe.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"})),xS=e=>xe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.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"}),xe.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"}),xe.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"})),yS=e=>xe.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},xe.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"}),xe.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"}),xe.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"})),Qe=(e,t)=>f.jsx(e,{size:t.size??J.size,stroke:t.stroke??J.stroke,className:t.className}),zi=(e,t)=>f.jsx(e,{width:Number(t.size??J.size),height:Number(t.size??J.size),className:t.className}),bg={".bmp":e=>Qe(j.IconFileTypeBmp,e),".cpp":e=>zi(mS,e),".c":e=>zi(vS,e),".cs":e=>zi(CS,e),".css":e=>Qe(j.IconFileTypeCss,e),".csv":e=>Qe(j.IconFileTypeCsv,e),".doc":e=>Qe(j.IconFileTypeDoc,e),".docx":e=>Qe(j.IconFileTypeDocx,e),".html":e=>Qe(j.IconFileTypeHtml,e),".ini":e=>zi(wS,e),".jpg":e=>Qe(j.IconFileTypeJpg,e),".js":e=>Qe(j.IconFileTypeJs,e),".json":e=>zi(bS,e),".jsx":e=>Qe(j.IconFileTypeJsx,e),".md":e=>zi(xS,e),".pdf":e=>Qe(j.IconFileTypePdf,e),".php":e=>Qe(j.IconFileTypePhp,e),".png":e=>Qe(j.IconFileTypePng,e),".ppt":e=>Qe(j.IconFileTypePpt,e),".py":e=>zi(yS,e),".rs":e=>Qe(j.IconFileTypeRs,e),".sql":e=>Qe(j.IconFileTypeSql,e),".svg":e=>Qe(j.IconFileTypeSvg,e),".ts":e=>Qe(j.IconFileTypeTs,e),".tsx":e=>Qe(j.IconFileTypeTsx,e),".txt":e=>Qe(j.IconFileTypeTxt,e),".vue":e=>Qe(j.IconFileTypeVue,e),".xls":e=>Qe(j.IconFileTypeXls,e),".xml":e=>Qe(j.IconFileTypeXml,e),".zip":e=>Qe(j.IconFileTypeZip,e),default:e=>Qe(j.IconFile,e)},vh=({extension:e,size:t=J.size,stroke:s=J.stroke,className:i,decorative:o=!1,label:n,indicator:r})=>{const a=(()=>{if(!e)return"";const u=e.trim().toLowerCase();return u.startsWith(".")?u:`.${u}`})(),c=(bg[a]??bg.default)({size:t,stroke:s}),d=typeof n=="string"?n:`${a.slice(1).toUpperCase()} file icon`;return f.jsxs("span",{className:ae("inline-flex relative",i),...o?{"aria-hidden":!0}:{role:"img","aria-label":d},children:[f.jsx(ze,{icon:c,className:"inline-block align-middle"}),r&&f.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:r})]})},Sr=({label:e="Shared entity",size:t=14,className:s,containerClassName:i,stroke:o=1.5,sharedIndicatorTooltip:n})=>f.jsx(Wt,{tooltip:n||"Shared",children:f.jsx(ze,{className:se("text-accent-primary flex bg-layer-3",i),icon:f.jsx(j.IconArrowUpRight,{size:t,stroke:o,"aria-label":typeof e=="string"?e:void 0,className:s,role:"img"})})}),tc=({name:e,className:t,shared:s=!1,iconSize:i=qt,details:o,sharedIndicatorClassName:n,sharedIndicatorTooltip:r,fileExtension:a,hideTooltip:l=!1,isInvalidName:c=!1,tooltipContent:d})=>{const u=a||(e.includes(".")?e.split(".").pop():void 0);return f.jsxs("div",{className:se("flex items-center gap-2 w-full",t),children:[f.jsx(vh,{extension:u,size:i,className:"text-secondary",indicator:s?f.jsx(Sr,{className:n,sharedIndicatorTooltip:r}):null,label:"File type icon"}),f.jsxs("div",{className:ae(["w-full flex min-w-0",o&&"flex-col gap-1"]),children:[f.jsx(gt,{className:ae(["dial-small-text flex-1 min-w-0",c?"text-secondary":"text-primary"]),text:e,id:"name",hideTooltip:l,customTooltipContent:d}),o]})]})},sc=({name:e,className:t,shared:s=!1,loading:i=!1,iconSize:o=qt,sharedIndicatorClassName:n,sharedIndicatorTooltip:r,hideTooltip:a=!1,isInvalidName:l=!1,tooltipContent:c})=>{const d=()=>i?f.jsx(Vr,{size:o}):f.jsx(ze,{icon:f.jsx(j.IconFolder,{...J,size:o}),className:"inline-block align-middle"});return f.jsxs("div",{className:se("flex items-center gap-2 w-full",t),children:[f.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[d(),s&&f.jsx("span",{className:"absolute z-50 -bottom-0.5 -left-0.5",children:f.jsx(Sr,{className:n,sharedIndicatorTooltip:r})})]}),f.jsx(gt,{className:ae("dial-small-text flex-1 min-w-0",l?"text-secondary":"text-primary"),text:e,id:"name",hideTooltip:a,customTooltipContent:c})]})};var Rr=(e=>(e.Left="left",e.Right="right",e))(Rr||{}),at=function(){return at=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++){t=arguments[s];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},at.apply(this,arguments)},xg={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},yg={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Pa={width:"20px",height:"20px",position:"absolute",zIndex:1},SS={top:at(at({},xg),{top:"-5px"}),right:at(at({},yg),{left:void 0,right:"-5px"}),bottom:at(at({},xg),{top:void 0,bottom:"-5px"}),left:at(at({},yg),{left:"-5px"}),topRight:at(at({},Pa),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:at(at({},Pa),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:at(at({},Pa),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:at(at({},Pa),{left:"-10px",top:"-10px",cursor:"nw-resize"})},RS=g.memo(function(e){var t=e.onResizeStart,s=e.direction,i=e.children,o=e.replaceStyles,n=e.className,r=g.useCallback(function(c){t(c,s)},[t,s]),a=g.useCallback(function(c){t(c,s)},[t,s]),l=g.useMemo(function(){return at(at({position:"absolute",userSelect:"none"},SS[s]),o??{})},[o,s]);return f.jsx("div",{className:n||void 0,style:l,onMouseDown:r,onTouchStart:a,children:i})}),FS=(function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(i[n]=o[n])},e(t,s)};return function(t,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(t,s);function i(){this.constructor=t}t.prototype=s===null?Object.create(s):(i.prototype=s.prototype,new i)}})(),Ps=function(){return Ps=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++){t=arguments[s];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ps.apply(this,arguments)},ES={width:"auto",height:"auto"},Ta=function(e,t,s){return Math.max(Math.min(e,s),t)},Sg=function(e,t,s){var i=Math.round(e/t);return i*t+s*(i-1)},Uo=function(e,t){return new RegExp(e,"i").test(t)},ka=function(e){return!!(e.touches&&e.touches.length)},DS=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},Rg=function(e,t,s){s===void 0&&(s=0);var i=t.reduce(function(n,r,a){return Math.abs(r-e)<Math.abs(t[n]-e)?a:n},0),o=Math.abs(t[i]-e);return s===0||o<s?t[i]:e},ld=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},Ia=function(e,t,s,i){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var o=Number(e.replace("%",""))/100;return t*o}if(e.endsWith("vw")){var o=Number(e.replace("vw",""))/100;return s*o}if(e.endsWith("vh")){var o=Number(e.replace("vh",""))/100;return i*o}}return e},PS=function(e,t,s,i,o,n,r){return i=Ia(i,e.width,t,s),o=Ia(o,e.height,t,s),n=Ia(n,e.width,t,s),r=Ia(r,e.height,t,s),{maxWidth:typeof i>"u"?void 0:Number(i),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof n>"u"?void 0:Number(n),minHeight:typeof r>"u"?void 0:Number(r)}},TS=function(e){return Array.isArray(e)?e:[e,e]},kS=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Fg="__resizable_base__",IS=(function(e){FS(t,e);function t(s){var i,o,n,r,a=e.call(this,s)||this;return a.ratio=1,a.resizable=null,a.parentLeft=0,a.parentTop=0,a.resizableLeft=0,a.resizableRight=0,a.resizableTop=0,a.resizableBottom=0,a.targetLeft=0,a.targetTop=0,a.delta={width:0,height:0},a.appendBase=function(){if(!a.resizable||!a.window)return null;var l=a.parentNode;if(!l)return null;var c=a.window.document.createElement("div");return c.style.width="100%",c.style.height="100%",c.style.position="absolute",c.style.transform="scale(0, 0)",c.style.left="0",c.style.flex="0 0 100%",c.classList?c.classList.add(Fg):c.className+=Fg,l.appendChild(c),c},a.removeBase=function(l){var c=a.parentNode;c&&c.removeChild(l)},a.state={isResizing:!1,width:(o=(i=a.propsSize)===null||i===void 0?void 0:i.width)!==null&&o!==void 0?o:"auto",height:(r=(n=a.propsSize)===null||n===void 0?void 0:n.height)!==null&&r!==void 0?r:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},a.onResizeStart=a.onResizeStart.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.onMouseUp=a.onMouseUp.bind(a),a}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||ES},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var s=0,i=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,n=this.resizable.offsetHeight,r=this.resizable.style.position;r!=="relative"&&(this.resizable.style.position="relative"),s=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,i=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:n,this.resizable.style.position=r}return{width:s,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var s=this,i=this.props.size,o=function(a){var l;if(typeof s.state[a]>"u"||s.state[a]==="auto")return"auto";if(s.propsSize&&s.propsSize[a]&&(!((l=s.propsSize[a])===null||l===void 0)&&l.toString().endsWith("%"))){if(s.state[a].toString().endsWith("%"))return s.state[a].toString();var c=s.getParentSize(),d=Number(s.state[a].toString().replace("px","")),u=d/c[a]*100;return"".concat(u,"%")}return ld(s.state[a])},n=i&&typeof i.width<"u"&&!this.state.isResizing?ld(i.width):o("width"),r=i&&typeof i.height<"u"&&!this.state.isResizing?ld(i.height):o("height");return{width:n,height:r}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var s=this.appendBase();if(!s)return{width:0,height:0};var i=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(i=!0,this.parentNode.style.flexWrap="wrap"),s.style.position="relative",s.style.minWidth="100%",s.style.minHeight="100%";var n={width:s.offsetWidth,height:s.offsetHeight};return i&&(this.parentNode.style.flexWrap=o),this.removeBase(s),n},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var s=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:s.flexBasis!=="auto"?s.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(s,i){var o=this.propsSize&&this.propsSize[i];return this.state[i]==="auto"&&this.state.original[i]===s&&(typeof o>"u"||o==="auto")?"auto":s},t.prototype.calculateNewMaxFromBoundary=function(s,i){var o=this.props.boundsByDirection,n=this.state.direction,r=o&&Uo("left",n),a=o&&Uo("top",n),l,c;if(this.props.bounds==="parent"){var d=this.parentNode;d&&(l=r?this.resizableRight-this.parentLeft:d.offsetWidth+(this.parentLeft-this.resizableLeft),c=a?this.resizableBottom-this.parentTop:d.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=r?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=r?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(s=s&&s<l?s:l),c&&Number.isFinite(c)&&(i=i&&i<c?i:c),{maxWidth:s,maxHeight:i}},t.prototype.calculateNewSizeFromDirection=function(s,i){var o=this.props.scale||1,n=TS(this.props.resizeRatio||1),r=n[0],a=n[1],l=this.state,c=l.direction,d=l.original,u=this.props,h=u.lockAspectRatio,p=u.lockAspectRatioExtraHeight,m=u.lockAspectRatioExtraWidth,v=d.width,C=d.height,w=p||0,b=m||0;return Uo("right",c)&&(v=d.width+(s-d.x)*r/o,h&&(C=(v-b)/this.ratio+w)),Uo("left",c)&&(v=d.width-(s-d.x)*r/o,h&&(C=(v-b)/this.ratio+w)),Uo("bottom",c)&&(C=d.height+(i-d.y)*a/o,h&&(v=(C-w)*this.ratio+b)),Uo("top",c)&&(C=d.height-(i-d.y)*a/o,h&&(v=(C-w)*this.ratio+b)),{newWidth:v,newHeight:C}},t.prototype.calculateNewSizeFromAspectRatio=function(s,i,o,n){var r=this.props,a=r.lockAspectRatio,l=r.lockAspectRatioExtraHeight,c=r.lockAspectRatioExtraWidth,d=typeof n.width>"u"?10:n.width,u=typeof o.width>"u"||o.width<0?s:o.width,h=typeof n.height>"u"?10:n.height,p=typeof o.height>"u"||o.height<0?i:o.height,m=l||0,v=c||0;if(a){var C=(h-m)*this.ratio+v,w=(p-m)*this.ratio+v,b=(d-v)/this.ratio+m,x=(u-v)/this.ratio+m,y=Math.max(d,C),S=Math.min(u,w),E=Math.max(h,b),F=Math.min(p,x);s=Ta(s,y,S),i=Ta(i,E,F)}else s=Ta(s,d,u),i=Ta(i,h,p);return{newWidth:s,newHeight:i}},t.prototype.setBoundingClientRect=function(){var s=1/(this.props.scale||1);if(this.props.bounds==="parent"){var i=this.parentNode;if(i){var o=i.getBoundingClientRect();this.parentLeft=o.left*s,this.parentTop=o.top*s}}if(this.props.bounds&&typeof this.props.bounds!="string"){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left*s,this.targetTop=n.top*s}if(this.resizable){var r=this.resizable.getBoundingClientRect(),a=r.left,l=r.top,c=r.right,d=r.bottom;this.resizableLeft=a*s,this.resizableRight=c*s,this.resizableTop=l*s,this.resizableBottom=d*s}},t.prototype.onResizeStart=function(s,i){if(!(!this.resizable||!this.window)){var o=0,n=0;if(s.nativeEvent&&DS(s.nativeEvent)?(o=s.nativeEvent.clientX,n=s.nativeEvent.clientY):s.nativeEvent&&ka(s.nativeEvent)&&(o=s.nativeEvent.touches[0].clientX,n=s.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var r=this.props.onResizeStart(s,i,this.resizable);if(r===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var a,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var c=this.parentNode;if(c){var d=this.window.getComputedStyle(c).flexDirection;this.flexDir=d.startsWith("row")?"row":"column",a=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var u={original:{x:o,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Ps(Ps({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(s.target).cursor||"auto"}),direction:i,flexBasis:a};this.setState(u)}},t.prototype.onMouseMove=function(s){var i=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&ka(s))try{s.preventDefault(),s.stopPropagation()}catch{}var o=this.props,n=o.maxWidth,r=o.maxHeight,a=o.minWidth,l=o.minHeight,c=ka(s)?s.touches[0].clientX:s.clientX,d=ka(s)?s.touches[0].clientY:s.clientY,u=this.state,h=u.direction,p=u.original,m=u.width,v=u.height,C=this.getParentSize(),w=PS(C,this.window.innerWidth,this.window.innerHeight,n,r,a,l);n=w.maxWidth,r=w.maxHeight,a=w.minWidth,l=w.minHeight;var b=this.calculateNewSizeFromDirection(c,d),x=b.newHeight,y=b.newWidth,S=this.calculateNewMaxFromBoundary(n,r);this.props.snap&&this.props.snap.x&&(y=Rg(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(x=Rg(x,this.props.snap.y,this.props.snapGap));var E=this.calculateNewSizeFromAspectRatio(y,x,{width:S.maxWidth,height:S.maxHeight},{width:a,height:l});if(y=E.newWidth,x=E.newHeight,this.props.grid){var F=Sg(y,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),R=Sg(x,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),D=this.props.snapGap||0,T=D===0||Math.abs(F-y)<=D?F:y,P=D===0||Math.abs(R-x)<=D?R:x;y=T,x=P}var M={width:y-p.width,height:x-p.height};if(this.delta=M,m&&typeof m=="string"){if(m.endsWith("%")){var N=y/C.width*100;y="".concat(N,"%")}else if(m.endsWith("vw")){var K=y/this.window.innerWidth*100;y="".concat(K,"vw")}else if(m.endsWith("vh")){var L=y/this.window.innerHeight*100;y="".concat(L,"vh")}}if(v&&typeof v=="string"){if(v.endsWith("%")){var N=x/C.height*100;x="".concat(N,"%")}else if(v.endsWith("vw")){var K=x/this.window.innerWidth*100;x="".concat(K,"vw")}else if(v.endsWith("vh")){var L=x/this.window.innerHeight*100;x="".concat(L,"vh")}}var H={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(x,"height")};this.flexDir==="row"?H.flexBasis=H.width:this.flexDir==="column"&&(H.flexBasis=H.height);var G=this.state.width!==H.width,_=this.state.height!==H.height,te=this.state.flexBasis!==H.flexBasis,I=G||_||te;I&&Dn.flushSync(function(){i.setState(H)}),this.props.onResize&&I&&this.props.onResize(s,h,this.resizable,M)}},t.prototype.onMouseUp=function(s){var i,o,n=this.state,r=n.isResizing,a=n.direction;n.original,!(!r||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(s,a,this.resizable,this.delta),this.props.size&&this.setState({width:(i=this.props.size.width)!==null&&i!==void 0?i:"auto",height:(o=this.props.size.height)!==null&&o!==void 0?o:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Ps(Ps({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(s){var i,o;this.setState({width:(i=s.width)!==null&&i!==void 0?i:"auto",height:(o=s.height)!==null&&o!==void 0?o:"auto"})},t.prototype.renderResizer=function(){var s=this,i=this.props,o=i.enable,n=i.handleStyles,r=i.handleClasses,a=i.handleWrapperStyle,l=i.handleWrapperClass,c=i.handleComponent;if(!o)return null;var d=Object.keys(o).map(function(u){return o[u]!==!1?f.jsx(RS,{direction:u,onResizeStart:s.onResizeStart,replaceStyles:n&&n[u],className:r&&r[u],children:c&&c[u]?c[u]:null},u):null});return f.jsx("div",{className:l,style:a,children:d})},t.prototype.render=function(){var s=this,i=Object.keys(this.props).reduce(function(r,a){return kS.indexOf(a)!==-1||(r[a]=s.props[a]),r},{}),o=Ps(Ps(Ps({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var n=this.props.as||"div";return f.jsxs(n,Ps({style:o,className:this.props.className},i,{ref:function(r){r&&(s.resizable=r)},children:[this.state.isResizing&&f.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t})(g.PureComponent);const MS=({side:e,className:t})=>{const s=e===Rr.Left,i=s?j.IconChevronLeft:j.IconChevronRight;return f.jsx("div",{className:t,children:f.jsx(i,{className:ae("h-full",s&&"-ml-6")})})},AS=({side:e,isResizing:t,customHandler:s,handlerClassName:i})=>{const o=se("invisible h-full w-0.5 group-hover:visible bg-accent-primary text-accent-primary cursor-col-resize transition-opacity",t&&"visible",i),n=f.jsx(MS,{side:e,className:o});return s?f.jsx("div",{className:o,children:s}):n},dv=({children:e,minWidth:t,maxWidth:s,width:i,defaultWidth:o,onResizeStop:n,onResize:r,side:a=Rr.Right,resizeHandlerClassName:l,resizeHandler:c})=>{const[d,u]=g.useState(!1),[h,p]=g.useState(o),m=i!==void 0,v=m?i:h,C=g.useRef(null),w=g.useCallback(()=>{u(!0)},[]),b=g.useCallback(()=>{u(!1);const y=C.current?.resizable?.getBoundingClientRect(),S=y?Math.round(y.width):t;m||p(S),n?.(S)},[n,m,t]),x=g.useMemo(()=>{const y=a===Rr.Left,S=f.jsx(AS,{side:a,isResizing:d,customHandler:c,handlerClassName:l});return{size:m?{width:v,height:"100%"}:void 0,defaultSize:m?void 0:{width:v,height:"100%"},minWidth:t,maxWidth:s,enable:{left:y,right:!y},handleClasses:{right:"group",left:"group"},handleStyles:{right:{right:"-8px",zIndex:10},left:{left:0,zIndex:10}},handleComponent:{left:y?S:void 0,right:y?void 0:S},onResizeStart:w,onResize:(E,F,R)=>{const D=Math.round(R.offsetWidth);r?.(D)},onResizeStop:b}},[a,m,v,t,s,c,l,d,w,b,r]);return f.jsx(IS,{ref:C,...x,children:f.jsx("div",{className:"group flex size-full flex-col bg-layer-3 divide-y divide-tertiary transition-all",children:e})})},uv=({enabled:e=!0,children:t,...s})=>e?f.jsx(dv,{...s,children:t}):t;var as=(e=>(e.Default="default",e.Text="text",e.Circular="circular",e.Rectangular="rectangular",e))(as||{}),cr=(e=>(e.Small="small",e.Default="default",e.Large="large",e))(cr||{}),pl=(e=>(e.Circle="circle",e.Square="square",e))(pl||{});const LS=e=>{if(typeof e=="number")return e;switch(e){case cr.Small:return 32;case cr.Large:return 64;case cr.Default:default:return 40}},Ko=({active:e=!0,paragraph:t=!0,avatar:s=!1,showTitle:i=!0,loading:o=!0,children:n,variant:r=as.Default,width:a,height:l,className:c,...d})=>{if(!o&&n)return f.jsx(f.Fragment,{children:n});const u=se("bg-layer-3",e&&"animate-pulse",c);if(r!==as.Default){const R=se(u,r===as.Circular&&"rounded-full",r===as.Rectangular&&"rounded",r===as.Text&&"rounded"),D={};return a&&(D.width=typeof a=="number"?`${a}px`:a),l&&(D.height=typeof l=="number"?`${l}px`:l),f.jsx("div",{className:R,style:D,...d})}const h=!!s,p=!!i,m=!!t,v=typeof s=="object"?s:{},C=typeof i=="object"?i:{},w=typeof t=="object"?t:{},b=LS(v.size),x=v.shape??pl.Circle,y=C.width??"38%",S=w.rows??3,E=w.width,F=R=>E?Array.isArray(E)?E[R]??"100%":E:R===S-1?"61%":"100%";return f.jsxs("div",{...d,className:se("flex gap-4",c),children:[h&&f.jsx("div",{className:se(u,x===pl.Circle?"rounded-full":"rounded","flex-shrink-0"),style:{width:b,height:b}}),f.jsxs("div",{className:"flex-1 flex flex-col gap-3",children:[p&&f.jsx("div",{className:se(u,"h-4 rounded"),style:{width:y}}),m&&f.jsx("div",{className:"flex flex-col gap-3",children:Array.from({length:S}).map((R,D)=>f.jsx("div",{className:se(u,"h-4 rounded"),style:{width:F(D)}},D))})]})]})};function Ue(e){if(e?.length)return e[e.length-1]}function Ii(e,t,s){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const i=e.length;if(i!==t.length)return!1;for(let o=0;o<i;o++)if(e[o]!==t[o]&&!s?.(e[o],t[o]))return!1;return!0}function Qn(e,t){if(e){for(const s of e)if(t(s))return!0}}function Ns(e,t){const s=e.indexOf(t);s>=0&&e.splice(s,1)}function OS(e,t){let s=0,i=0;for(;s<e.length;s++)t.includes(e[s])||(e[i]=e[s],i++);for(;i<e.length;)e.pop()}function Eg(e,t,s){for(let i=0;i<t.length;i++)Ns(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(s,0,t[i])}var Ks=e=>e==null||e===""?null:e;function ee(e){return e!=null&&e!==""}function tt(e){return!ee(e)}var gu=e=>e!=null&&typeof e.toString=="function"?e.toString():null,Fr=(e,t)=>{const s=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return s===i},NS=(e,t,s=!1)=>e==null?t==null?0:-1:t==null?1:(typeof e=="object"&&e.toNumber&&(e=e.toNumber()),typeof t=="object"&&t.toNumber&&(t=t.toNumber()),!s||typeof e!="string"?e>t?1:e<t?-1:0:e.localeCompare(t)),ao=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 i=t?this.allAsyncListeners:this.allSyncListeners;let o=i.get(e);return!o&&s&&(o=new Set,i.set(e,o)),o}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 i=this.getListeners(e,s,!1);i&&(i.delete(t),i.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:i}=this,o=a=>{const l=i?()=>i.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)&&o(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)o(()=>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)},s=this.frameworkOverrides;s?s.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}},HS=/[&<>"']/g,BS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Tn(e){return e?.toString().toString()??null}function dr(e){return Tn(e)?.replace(HS,t=>BS[t])??null}function Dg(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function GS(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(o=>o.substring(0,1).toUpperCase()+(o.length>1?o.substring(1,o.length):"")).join(" ")}function fs(e){return e.eRootDiv.getRootNode()}function Je(e){return fs(e).activeElement}function ft(e){const{gos:t,eRootDiv:s}=e;let i=null;const o=t.get("getDocument");return o&&ee(o)?i=o():s&&(i=s.ownerDocument),i&&ee(i)?i:document}function Ch(e){const t=Je(e);return t===null||t===ft(e).body}function wh(e){return ft(e).defaultView||window}function bh(e){let t=null,s=null;try{t=ft(e).fullscreenElement}catch{}finally{t||(t=fs(e));const i=t.querySelector("body");i?s=i:t instanceof ShadowRoot?s=t:t instanceof Document?s=t?.documentElement:s=t}return s}function VS(e){return bh(e)?.clientWidth??(window.innerWidth||-1)}function zS(e){return bh(e)?.clientHeight??(window.innerHeight||-1)}function ys(e,t,s){s==null||typeof s=="string"&&s==""?hv(e,t):Ss(e,t,s)}function Ss(e,t,s){e.setAttribute(pv(t),s.toString())}function hv(e,t){e.removeAttribute(pv(t))}function pv(e){return`aria-${e}`}function lo(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function WS(e){const t=e?.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function jS(e){return e.getAttribute("aria-label")}function Cn(e,t){ys(e,"label",t)}function Er(e,t){ys(e,"labelledby",t)}function gv(e,t){ys(e,"live",t)}function _S(e,t){ys(e,"atomic",t)}function US(e,t){ys(e,"relevant",t)}function xh(e,t){ys(e,"invalid",t)}function $S(e,t){ys(e,"disabled",t)}function fv(e,t){ys(e,"hidden",t)}function fu(e,t){Ss(e,"expanded",t)}function qS(e,t){Ss(e,"setsize",t)}function KS(e,t){Ss(e,"posinset",t)}function YS(e,t){Ss(e,"rowcount",t)}function yh(e,t){Ss(e,"rowindex",t)}function ZS(e,t){Ss(e,"rowspan",t)}function XS(e,t){Ss(e,"colcount",t)}function mv(e,t){Ss(e,"colindex",t)}function QS(e,t){Ss(e,"colspan",t)}function JS(e,t){Ss(e,"sort",t)}function e2(e){hv(e,"sort")}function vv(e,t){ys(e,"selected",t)}function t2(e,t){ys(e,"controls",t)}function s2(e,t){t2(e,t.id),Er(t,e.id)}function Pg(e,t){ys(e,"owns",t)}function ic(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var i2="[tabindex], input, select, button, textarea, [href]",Cv="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function ur(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(Cv)?!1:xs(e)}function qe(e,t,s={}){const{skipAriaHidden:i}=s;e.classList.toggle("ag-hidden",!t),i||fv(e,!t)}function o2(e,t,s={}){const{skipAriaHidden:i}=s;e.classList.toggle("ag-invisible",!t),i||fv(e,!t)}function Dr(e,t){const s="disabled",i=t?n=>n.setAttribute(s,""):n=>n.removeAttribute(s);i(e);const o=e.querySelectorAll("input")??[];for(const n of o)i(n)}function Qi(e,t,s){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof s=="number"){if(++i>s)break}else if(e===s)break}return!1}function So(e){const{height:t,width:s,borderTopWidth:i,borderRightWidth:o,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:h,marginBottom:p,marginLeft:m,boxSizing:v}=window.getComputedStyle(e),C=Number.parseFloat;return{height:C(t||"0"),width:C(s||"0"),borderTopWidth:C(i||"0"),borderRightWidth:C(o||"0"),borderBottomWidth:C(n||"0"),borderLeftWidth:C(r||"0"),paddingTop:C(a||"0"),paddingRight:C(l||"0"),paddingBottom:C(c||"0"),paddingLeft:C(d||"0"),marginTop:C(u||"0"),marginRight:C(h||"0"),marginBottom:C(p||"0"),marginLeft:C(m||"0"),boxSizing:v}}function Sh(e){const t=So(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Pr(e){const t=So(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function wv(e){const{height:t,marginBottom:s,marginTop:i}=So(e);return Math.floor(t+s+i)}function gl(e){const{width:t,marginLeft:s,marginRight:i}=So(e);return Math.floor(t+s+i)}function bv(e){const t=e.getBoundingClientRect(),{borderTopWidth:s,borderLeftWidth:i,borderRightWidth:o,borderBottomWidth:n}=So(e);return{top:t.top+(s||0),left:t.left+(i||0),right:t.right+(o||0),bottom:t.bottom+(n||0)}}function fl(e,t){let s=e.scrollLeft;return t&&(s=Math.abs(s)),s}function ml(e,t,s){s&&(t*=-1),e.scrollLeft=t}function jt(e){for(;e?.firstChild;)e.firstChild.remove()}function Qs(e){e?.parentNode&&e.remove()}function xv(e){return!!e.offsetParent}function xs(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!xv(e)||window.getComputedStyle(e).visibility!=="visible")}function Rh(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Tr(e){return()=>{const t=e();return t?yv(t)||n2(t):!0}}function yv(e){return e.clientWidth<e.scrollWidth}function n2(e){return e.clientHeight<e.scrollHeight}function vl(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):As(e,t)}function As(e,t){t=Fh(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function hr(e,t){t=Fh(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Fh(e){return typeof e=="number"?`${e}px`:e}function Eh(e){return e instanceof Node||e instanceof HTMLElement}function Gt(e,t,s){s==null||s===""?e.removeAttribute(t):e.setAttribute(t,s.toString())}function r2(e,t){if(!t.isContentEditable)return;const s=wh(e).getSelection();if(!s)return;const i=ft(e).createRange();i.selectNodeContents(t),i.collapse(!1),s.removeAllRanges(),s.addRange(i)}function si(e,t,s){const o=wh(e).ResizeObserver,n=o?new o(s):null;return n?.observe(t),()=>n?.disconnect()}function ii(e,t){const s=wh(e);s.requestAnimationFrame?s.requestAnimationFrame(t):s.webkitRequestAnimationFrame?s.webkitRequestAnimationFrame(t):s.setTimeout(t,0)}var Sv="data-ref",cd;function Tg(){return cd??(cd=document.createTextNode(" ")),cd.cloneNode()}function co(e){const{attrs:t,children:s,cls:i,ref:o,role:n,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),o&&a.setAttribute(Sv,o),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(Tg()),l=!1),a.append(co(c)),a.appendChild(Tg())))}return a}var a2=["touchstart","touchend","touchmove","touchcancel","scroll"],l2=["wheel"],dd={},Cl=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return s=>{if(typeof dd[s]=="boolean")return dd[s];const i=document.createElement(e[s]||"div");return s="on"+s,dd[s]=s in i}})();function c2(e,t){return!t||!e?!1:u2(t).indexOf(e)>=0}function d2(e){const t=[];let s=e.target;for(;s;)t.push(s),s=s.parentElement;return t}function u2(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():d2(t)}function h2(e,t,s){const i=p2(t);let o;i!=null&&(o={passive:i}),e.addEventListener(t,s,o)}var p2=e=>{const t=a2.includes(e),s=l2.includes(e);if(t)return!0;if(s)return!1};function Rv(e,t,s){if(s===0)return!1;const i=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(i,o)<=s}var nn=(e,t)=>{const s=e.identifier;for(let i=0,o=t.length;i<o;++i){const n=t[i];if(n.identifier===s)return n}return null};function kr(e,t){return e.gos.isElementInThisInstance(t.target)}function g2(e,t,s){const o=e.getBoundingClientRect().height,n=VS(s)-2,r=zS(s)-2;if(!e.offsetParent)return;const l=bv(e.offsetParent),{clientY:c,clientX:d}=t;let u=c-l.top-o/2,h=d-l.left-10;const p=ft(s),m=p.defaultView||window,v=m.pageYOffset||p.documentElement.scrollTop,C=m.pageXOffset||p.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+C&&(h=n+C-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+v&&(u=r+v-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}var Ya=(e,...t)=>{for(const s of t){const[i,o,n,r]=s;i.addEventListener(o,n,r),e.push(s)}},Dh=e=>{if(e){for(const[t,s,i,o]of e)t.removeEventListener(s,i,o);e.length=0}},mi=e=>{e.cancelable&&e.preventDefault()};function f2(e,t){return t}function Fv(e){return e?.getLocaleTextFunc()??f2}function m2(e,t,s,i){const o=t[s];return e.getLocaleTextFunc()(s,typeof o=="function"?o(i):o,i)}function v2(e){return(t,s,i)=>e({key:t,defaultValue:s,variableValues:i})}function C2(e){return(t,s,i)=>{let o=e?.[t];if(o&&i?.length){let n=0;for(;!(n>=i.length||o.indexOf("${variable}")===-1);)o=o.replace("${variable}",i[n++])}return o??s}}var Ot=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 ao),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 i of Object.keys(t)){const o=t[i];o&&s.push(this._setupListener(e,i,o))}return s}_setupListener(e,t,s){if(this.destroyed)return()=>null;let i;if(w2(e))e.__addEventListener(t,s),i=()=>(e.__removeEventListener(t,s),null);else{const o=b2(e);e instanceof HTMLElement?h2(e,t,s):o?e.addListener(t,s):e.addEventListener(t,s),i=o?()=>(e.removeListener(t,s),null):()=>(e.removeEventListener(t,s),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),null)}setupPropertyListener(e,t){const{gos:s}=this;s.addPropertyEventListener(e,t);const i=()=>(s.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),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++,i=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[s])return;this.lastChangeSetIdLookup[s]=o.changeSet.id}const n={type:"propertyChanged",changeSet:o.changeSet,source:o.source};t(n)};for(const o of e)this.setupPropertyListener(o,i)}getLocaleTextFunc(){return Fv(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 w2(e){return e.__addEventListener!==void 0}function b2(e){return e.eventServiceType==="global"}var B=class extends Ot{},mu=new Set,oc=(e,t)=>{mu.has(t)||(mu.add(t),e())};oc._set=mu;var x2={pending:!1,funcs:[]},y2={pending:!1,funcs:[]};function vu(e,t="setTimeout",s){const i=t==="raf"?y2:x2;if(i.funcs.push(e),i.pending)return;i.pending=!0;const o=()=>{const n=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of n)r()};t==="raf"?ii(s,o):window.setTimeout(o,0)}function lt(e,t,s){let i;return function(...o){const n=this;return window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(n,o)},s),i}}function kg(e,t){let s=0;return function(...i){const o=this,n=Date.now();n-s<t||(s=n,e.apply(o,i))}}function S2(e,t,s,i=100){const o=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()-o>i;(t()||c)&&(s(),r=!0,a())};l(),r||(n=window.setInterval(l,10))}var Ev=new Set(["__proto__","constructor","prototype"]);function R2(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(i=>!Ev.has(i)))t(s,e[s])}}function kt(e,t,s=!0,i=!1){ee(t)&&R2(t,(o,n)=>{let r=e[o];r!==n&&(i&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[o]=r),Ig(n)&&Ig(r)&&!Array.isArray(r)?kt(r,n,s,i):(s||n!==void 0)&&(e[o]=n))})}function Ig(e){return typeof e=="object"&&e!==null}var Ph=class Us{static applyGlobalGridOptions(t){if(!Us.gridOptions)return{...t};let s={};return kt(s,Us.gridOptions,!0,!0),Us.mergeStrategy==="deep"?kt(s,t,!0,!0):s={...s,...t},Us.gridOptions.context&&(s.context=Us.gridOptions.context),t.context&&(Us.mergeStrategy==="deep"&&s.context&&kt(t.context,s.context,!0,!0),s.context=t.context),s}static applyGlobalGridOption(t,s){if(Us.mergeStrategy==="deep"){const i=Dv(t);if(i&&typeof i=="object"&&typeof s=="object")return Us.applyGlobalGridOptions({[t]:s})[t]}return s}};Ph.gridOptions=void 0;Ph.mergeStrategy="shallow";var Th=Ph;function Dv(e){return Th.gridOptions?.[e]}var Pv={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,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,refreshAfterGroupEdit:!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,groupHideColumnsUntilExpanded:!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,enableFilterHandlers:!1},Tv="https://www.ag-grid.com";function uo(e,t,...s){e.get("debug")&&console.log("AG Grid: "+t,...s)}function pr(e,...t){oc(()=>kv(e,...t),e+t?.join(""))}function rn(e,...t){oc(()=>F2(e,...t),e+t?.join(""))}function F2(e,...t){console.error("AG Grid: "+e,...t)}function kv(e,...t){console.warn("AG Grid: "+e,...t)}var Iv=new Set,wl={},Ji={},Za,Mv=!1,Av=!1,E2=!1;function D2(e){const[t,s]=e.version.split(".")||[],[i,o]=Za.split(".")||[];return t===i&&s===o}function P2(e){Za||(Za=e.version);const t=i=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${i} Please update all modules to the same version.`;e.version?D2(e)||rn(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Za}.`)):rn(t(`'${e.moduleName}' is incompatible.`));const s=e.validate?.();s&&!s.isValid&&rn(`${s.message}`)}function Ir(e,t,s=!1){s||(Mv=!0),P2(e);const i=e.rowModels??["all"];Iv.add(e);let o;t!==void 0?(Av=!0,Ji[t]===void 0&&(Ji[t]={}),o=Ji[t]):o=wl;for(const n of i)o[n]===void 0&&(o[n]={}),o[n][e.moduleName]=e;if(e.dependsOn)for(const n of e.dependsOn)Ir(n,t,s)}function T2(e){delete Ji[e]}function Cu(e,t,s){const i=o=>!!wl[o]?.[e]||!!Ji[t]?.[o]?.[e];return i(s)||i("all")}function kh(){return Av}function k2(e,t){const s=Ji[e]??{};return[...Object.values(wl.all??{}),...Object.values(s.all??{}),...Object.values(wl[t]??{}),...Object.values(s[t]??{})]}function I2(){return new Set(Iv)}function M2(e,t){const s=Ji[e]??{};return[...Object.values(s.all??{}),...Object.values(s[t]??{})]}function A2(){return Mv}function Lv(){return E2}var Ov=class{static register(e){Ir(e,void 0)}static registerModules(e){for(const t of e)Ir(t,void 0)}};function Nv(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const s=Nv(t.dependsOn);if(s)return s}}}var Q="35.2.1",Mg=2e3,Ag=100,Hv="_version_",Bv=null,an=`${Tv}/javascript-data-grid`;function L2(e){Bv=e}function O2(e){an=e}function Gv(e,t,s){return Bv?.(e,t)??[G2(e,t,s)]}function Ih(e,t,s,i,o){e(`${i?"warning":"error"} #${t}`,...Gv(t,s,o))}function N2(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 H2(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=N2(e)),t}function Xa(e){return e===void 0?"undefined":e===null?"null":e}function wu(e,t){return`${e}?${t.toString()}`}function B2(e,t,s){const i=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let o=wu(e,t);for(const[n,r]of i){if(n===Hv)continue;const a=o.length-s;if(a<=0)break;const l="...",c=a+l.length,d=r.length-c>Ag?r.slice(0,r.length-c)+l:r.slice(0,Ag)+l;t.set(n,d),o=wu(e,t)}return o}function Vv(e,t){const s=new URLSearchParams;if(s.append(Hv,Q),t)for(const n of Object.keys(t))s.append(n,H2(t[n]));const i=`${an}/errors/${e}`,o=wu(i,s);return o.length<=Mg?o:B2(i,s,Mg)}var G2=(e,t,s)=>{const i=Vv(e,t);return`${`${s?s+`
7
7
  `:""}Visit ${i}`}${s?"":`
8
8
  Alternatively register the ValidationModule to see the full message in the console.`}`};function $(...e){Ih(pr,e[0],e[1],!0)}function je(...e){Ih(rn,e[0],e[1],!1)}function or(e,t,s){Ih(rn,e,t,!1,s)}function V2(e,t){const s=t[0];return`error #${s} `+Gv(s,t[1],e).join(" ")}function Ls(...e){return V2(void 0,e)}function zv(e,t){return e.get("rowModelType")===t}function st(e,t){return zv(e,"clientSide")}function kn(e,t){return zv(e,"serverSide")}function bt(e,t){return e.get("domLayout")===t}function eo(e){return yl(e)!==void 0}function Wv(e){return typeof e.get("getRowHeight")=="function"}function z2(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function W2({gos:e,formula:t}){const s=e.get("rowNumbers");return s||!!t?.active&&s!==!1}function Si(e,t,s=!1,i){const{gos:o,environment:n}=e;if(i==null&&(i=n.getDefaultRowHeight()),Wv(o)){if(s)return{height:i,estimated:!0};const l={node:t,data:t.data},c=o.getCallback("getRowHeight")(l);if(bu(c))return c===0&&$(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&o.get("masterDetail"))return j2(o);const r=o.get("rowHeight");return{height:r&&bu(r)?r:i,estimated:!1}}function j2(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return bu(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function to(e){const{environment:t,gos:s}=e,i=s.get("rowHeight");if(!i||tt(i))return t.getDefaultRowHeight();const o=t.refreshRowHeightVariable();return o!==-1?o:($(24),t.getDefaultRowHeight())}function bu(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function jv(e,t,s){const i=t[e.getDomDataKey()];return i?i[s]:void 0}function ho(e,t,s,i){const o=e.getDomDataKey();let n=t[o];tt(n)&&(n={},t[o]=n),n[s]=i}function ln(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function _v(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||bt(e,"print"))}function qs(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function bl(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function Uv(e){return e.get("grandTotalRow")}function _2(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function U2(e){return _2(e)&&e.get("groupHideColumnsUntilExpanded")&&st(e)}function $v(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function qv(e,t,s){return!!t.group&&!t.footer&&$v(e,s)}function wn(e){const t=e.getCallback("getRowId");return t===void 0?t:s=>{let i=t(s);return typeof i!="string"&&(oc(()=>$(25,{id:i}),"getRowIdString"),i=String(i)),i}}function $2(e,t){const s=e.get("groupHideParentOfSingleChild");return!!(s===!0||s==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function q2(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function cn(e){return e?.checkboxes??!0}function Qa(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function xl(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function ud(e){return e?.hideDisabledCheckboxes??!1}function K2(e){return typeof e.get("rowSelection")!="string"}function Ri(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function dn(e){const t=e.get("cellSelection")??!1;return(typeof t=="object"&&t.enableColumnSelection)??!1}function Kv(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const s=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return s&&i?!1:s?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Y2(e){const t=Kv(e);return t===!0||t==="enableSelection"}function Z2(e){const t=Kv(e);return t===!0||t==="enableDeselection"}function xu(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function yl(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 Sl(e){return yl(e)==="multiRow"}function X2(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Rl(e){const t=e.get("rowSelection");if(typeof t=="string"){const s=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return s&&i?"filteredDescendants":s?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function Yv(e,t=!0){const s=e.get("rowSelection");return typeof s!="object"?t?"all":void 0:s.mode==="multiRow"?s.selectAll:"all"}function Q2(e){const t=e.get("rowSelection");return typeof t=="string"?!1:t?.mode==="multiRow"?t.ctrlASelectsRows??!1:!1}function Mr(e){const t=Rl(e);return t==="descendants"||t==="filteredDescendants"}function Lg(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function J2(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Vt(e){return e.get("columnMenu")==="legacy"}function eR(e){return!Vt(e)}function tR(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function sR(e,t,s){typeof e!="object"&&(e={});const i={...e};for(const o of s){const n=t[o];typeof n<"u"&&(i[o]=n)}return i}function iR(e,t){if(!e)return;const s={};let i=!1;for(const r of Object.keys(e))s[r]=e[r],i=!0;if(!i)return;const o={type:"gridOptionsChanged",options:s};t.dispatchEvent(o);const n={type:"componentStateChanged",...s};t.dispatchEvent(n)}function be(e,t){return e.addCommon(t)}function Ja(e,t){return e[t]??e.gridOptions?.[t]??Dv(t)??Pv[t]}function oR({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var nR={resizable:!0,sortable:!0},rR=0;function Zv(){return rR++}function Fi(e){return e instanceof Ro}var aR=["asc","desc",null],lR=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],Ro=class extends B{constructor(e,t,s,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=s,this.primary=i,this.isColumn=!0,this.instanceId=Zv(),this.autoHeaderHeight=null,this.sortDef=ls(),this._wasSortExplicitlyRemoved=!1,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.formulaRef=null,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new ao,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=dr(s)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:s,colFlex:i}}=this;t?.initCol(this);const o=e.hide;o!==void 0?this.visible=!o:this.visible=!e.initialHide,s?.initCol(this),i?.initCol(this)}setColDef(e,t,s){const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&(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.initState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:s}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=ee(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=ee(s)&&s.includes(".")&&!i}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 i=e.recreateColDef(this.colDef);this.setColDef(i,i,s.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){const t=e.width??e.initialWidth??200;return 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 be(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]??nR[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 be(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sortDef.direction}getSortDef(){return this.sortDef.direction?this.sortDef:null}getColDefAllowedSortTypes(){const e=[],{sort:t,initialSort:s}=this.colDef,i=t===null?t:Js(t?.type),o=s===null?s:Js(s?.type);return i&&e.push(i),o&&e.push(o),e}getSortingOrder(){const e=this.getColDefAllowedSortTypes().includes("absolute")?lR:aR;return(this.colDef.sortingOrder??this.gos.get("sortingOrder")??e).map(t=>ls(t))}getAvailableSortTypes(){const e=this.getSortingOrder().reduce((t,s)=>(s.direction&&t.push(s.type),t),this.getColDefAllowedSortTypes());return new Set(e)}get wasSortExplicitlyRemoved(){return this._wasSortExplicitlyRemoved}setSortDef(e,t=!1){t||(this._wasSortExplicitlyRemoved=!e.direction),this.sortDef=e}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.getSort()==="asc"}isSortDescending(){return this.getSort()==="desc"}isSortNone(){return tt(this.getSort())}isSorting(){return ee(this.getSort())}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 $(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 be(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(tt(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),s=this.colDef.colSpan(t);return Math.max(s,1)}getRowSpan(e){if(tt(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}isAllowFormula(){return this.colDef.allowFormula===!0}dispatchColEvent(e,t,s){const i=this.createColumnEvent(e,t);s&&kt(i,s),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function ls(e){return un(e)?{direction:e.direction,type:e.type}:{direction:nc(e),type:Js(e)}}function xi(e){return e==="asc"||e==="desc"||e===null}function Mh(e){return e==="default"||e==="absolute"}function un(e){if(!e||typeof e!="object")return!1;const t=e;return Mh(t.type)&&xi(t.direction)}function el(e,t){return e?t?e.type===t.type&&e.direction===t.direction:e?e.direction===null:!0:t?t.direction===null:!0}function nc(e){return xi(e)?e:null}function Js(e){return Mh(e)?e:"default"}function cR(e,t,s){const o=s?.()??t.sortSvc.getDisplaySortForColumn(e),n=Js(o?.type),r=nc(o?.direction),a=e.getAvailableSortTypes(),l=a.has("default"),c=a.has("absolute");return{isDefaultSortAllowed:l,isAbsoluteSortAllowed:c,isAbsoluteSort:n==="absolute",isDefaultSort:n==="default",isAscending:r==="asc",isDescending:r==="desc",direction:r}}function Et(e){return e instanceof tl}var tl=class extends B{constructor(e,t,s,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=s,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=Zv(),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)Fi(t)?e(t):Et(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)Fi(t)?e.push(t):Et(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 i=this.findChildrenRemovingPadding();for(let n=0,r=i.length;n<r;n++){const a=i[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 o=e&&t&&s;this.expandable!==o&&(this.expandable=o,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=s=>{for(const i of s)Et(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},dR={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Og(e,t,s){const i={},o=e.gos;return Object.assign(i,o.get("defaultColGroupDef")),Object.assign(i,t),o.validateColDef(i,s),i}var uR=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=gu(e);let s=0;for(;;){let i=e??t;if(i?s!==0&&(i+="_"+s):i=s,!this.existingKeys[i]){const o=String(i);return e&&s>0&&$(273,{providedId:e,usedId:o}),this.existingKeys[o]=!0,o}s++}}},hR=(e,t)=>{Et(e)&&e.setupExpandable(),e.originalParent=t};function pR(e,t=null,s,i,o){const n=new uR,{existingCols:r,existingGroups:a,existingColKeys:l}=gR(i);n.addExistingKeys(l);const c=Xv(e,t,0,s,r,n,a,o),{colGroupSvc:d}=e,u=d?.findMaxDepth(c,0)??0,h=d?d.balanceColumnTree(c,0,u,n):c;return Ys(null,h,hR),{columnTree:h,treeDepth:u}}function gR(e){const t=[],s=[],i=[];return e&&Ys(null,e,o=>{if(Et(o)){const n=o;s.push(n)}else{const n=o;i.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:s,existingColKeys:i}}function Xv(e,t,s,i,o,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&&bR(u)?c[d]=l.createProvidedColumnGroup(i,u,s,o,n,r,a):c[d]=fR(e,i,u,o,n,a)}return c}function fR(e,t,s,i,o,n){const r=vR(s,i);r&&i?.splice(r.idx,1);let a=r?.column;if(a){const l=yu(e,s,a.getColId());a.setColDef(l,s,n),mR(e,a,l,n)}else{const l=o.getUniqueKey(s.colId,s.field),c=yu(e,s,l);a=new Ro(c,s,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function Qv(e,t,s,i,o,n,r,a){const{sortSvc:l,pinnedCols:c,colFlex:d}=e;s!==void 0&&t.setVisible(!s,a),l&&(l.updateColSort(t,i,a),o!==void 0&&l.setColSortIndex(t,o)),n!==void 0&&c?.setColPinned(t,n),r!==void 0&&d?.setColFlex(t,r)}function mR(e,t,s,i){Qv(e,t,s.hide,s.sort,s.sortIndex,s.pinned,s.flex,i);const o=t.getFlex();if(!(o!=null&&o>0))if(s.width!=null)t.setActualWidth(s.width,i);else{const n=t.getActualWidth();t.setActualWidth(n,i)}}function vR(e,t){if(t)for(let s=0;s<t.length;s++){const i=t[s].getUserProvidedColDef();if(!i)continue;if(e.colId!=null){if(t[s].getId()===e.colId)return{idx:s,column:t[s]};continue}if(e.field!=null){if(i.field===e.field)return{idx:s,column:t[s]};continue}if(i===e)return{idx:s,column:t[s]}}}function yu(e,t,s,i){const{gos:o,dataTypeSvc:n}=e,r={},a=o.get("defaultColDef");kt(r,a,!1,!0);const l=CR(e,r,t,s);l&&wR(e,l,r);const c=r.cellDataType;kt(r,t,!1,!0),c!==void 0&&(r.cellDataType=c);const d=o.get("autoGroupColumnDef"),u=qs(o);return t.rowGroup&&d&&u&&kt(r,{sort:d.sort,initialSort:d.initialSort},!1,!0),n?.postProcess(r),n?.validateColDef(r,t,a,s),o.validateColDef(r,s,i),r}function CR(e,t,s,i){const o=e.dataTypeSvc?.updateColDefAndGetColumnType(t,s,i),n=s.type??o??t.type;return t.type=n,n?El(n):void 0}function wR(e,t,s){if(!t.length)return;const i=Object.assign({},dR),o=e.gos.get("columnTypes")||{};for(const n of Object.keys(o)){const r=o[n];n in i?$(34,{key:n}):(r.type&&$(35),i[n]=r)}for(const n of t){const r=i[n.trim()];r?kt(s,r,!1,!0):$(36,{t:n})}}function bR(e){return e.children!==void 0}function Ys(e,t,s){if(t)for(let i=0;i<t.length;i++){const o=t[i];Et(o)&&Ys(o,o.getChildren(),s),s(o,e)}}var vi="ag-Grid-AutoColumn",Ah="ag-Grid-SelectionColumn",Lh="ag-Grid-RowNumbersColumn";function Jv(e){const t=[],s=i=>{for(let o=0;o<i.length;o++){const n=i[o];Fi(n)?t.push(n):Et(n)&&s(n.getChildren())}};return s(e),t}function $s(e){return e.reduce((t,s)=>t+s.getActualWidth(),0)}function Fl(e,t,s){const i={};if(!t)return;Ys(null,t,n=>{i[n.getInstanceId()]=n}),s&&Ys(null,s,n=>{i[n.getInstanceId()]=null});const o=Object.values(i).filter(n=>n!=null);e.context.destroyBeans(o)}function Oh(e){return e.getId().startsWith(vi)}function Mi(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Ah)??!1}function It(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Lh)??!1}function xR(e){return Mi(e)||It(e)}function El(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function yR(e,t){return Ii(e,t,(s,i)=>s.getColId()===i.getColId())}function SR(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function hn(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function gr(e,t){return e===t||e.colId==t||e.getColDef()===t}var RR=(e,t)=>(s,i)=>{const o={value1:void 0,value2:void 0};let n=!1;return e&&(e[s]!==void 0&&(o.value1=e[s],n=!0),ee(i)&&e[i]!==void 0&&(o.value2=e[i],n=!0)),!n&&t&&(t[s]!==void 0&&(o.value1=t[s]),ee(i)&&t[i]!==void 0&&(o.value2=t[i])),o};function FR(e,t){const s={...e,sort:void 0,colId:t},i=eC(e);return i&&(s.sort=i.direction,s.sortType=i.type),s}function eC(e){const{sort:t,initialSort:s}=e,i=un(t)||xi(t),o=un(s)||xi(s);return i?ls(t):o?ls(s):null}function tC(e,t){return e+"_"+t}function nt(e){return e instanceof Ar}var Ar=class extends B{constructor(e,t,s,i){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=s,this.pinned=i,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=dr(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return tC(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)nt(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=Ue(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??[])Fi(t)?e.push(t):nt(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])Fi(t)?e.push(t):nt(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(nt(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"})}},A={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"},ER=65,DR=67,PR=86,TR=68,kR=90,IR=89;function sC(e){const{keyCode:t}=e;let s;switch(t){case ER:s=A.A;break;case DR:s=A.C;break;case PR:s=A.V;break;case TR:s=A.D;break;case kR:s=A.Z;break;case IR:s=A.Y;break;default:s=e.code}return s}function MR(e,t){return new He(s=>{s(window.setInterval(e,t))})}var He=class nr{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 nr(s=>{let i=t.length;const o=new Array(i);t.forEach((n,r)=>{n.then(a=>{o[r]=a,i--,i===0&&s(o)})})}):nr.resolve()}static resolve(t=null){return new nr(s=>s(t))}then(t){return new nr(s=>{this.status===1?s(t(this.resolution)):this.waiters.push(i=>s(t(i)))})}onDone(t){this.status=1,this.resolution=t;for(const s of this.waiters)s(t)}onReject(t){}},AR=class extends Ot{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.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.externalDropZoneCount=0,this.lastDropTarget=null}addDragSource(e,t=!1){const s={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:i=>this.onDragStart(e,i),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;for(let i=0,o=t.length;i<o;i++)if(t[i].dragSource===e){const n=t[i];s.dragSvc?.removeDragSource(n),t.splice(i,1);break}}destroy(){const{dragSourceAndParamsList:e,dropTargets:t,beans:s}=this,i=s.dragSvc;for(const o of e)i?.removeDragSource(o);e.length=0,t.length=0,this.externalDropZoneCount=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 i=this.dropTargetEvent(s,e,!1);s.onDragStop?.(i)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t,lastMouseEvent:s}=this;if(e?.onDragCancelled?.(),t&&s){const i=this.dropTargetEvent(t,s,!1);t.onDragCancel?.(i)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);const s=this.findCurrentDropTarget(e),{lastDropTarget:i,dragSource:o,dragItem:n}=this;let r=!1;if(s!==i){if(r=!0,i){const a=this.dropTargetEvent(i,e,t);i.onDragLeave?.(a)}if(i!==null&&!s?this.handleExit(o,n):i===null&&s&&this.handleEnter(o,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.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.getContainer(),s=e.getSecondaryContainers?.(),i=s?.length;if(!i)return[[t]];const o=new Array(i+1);o[0]=[t];for(let n=0;n<i;++n)o[n+1]=s[n];return o}isMouseOnDropTarget(e,t){const s=this.getAllContainersFromDropTarget(t);let i=!1;const o=(a,l)=>{for(const c of l){const{width:d,height:u,left:h,right:p,top:m,bottom:v}=c.getBoundingClientRect();if(d===0||u===0)return!1;const C=a.clientX>=h&&a.clientX<p,w=a.clientY>=m&&a.clientY<v;if(!C||!w)return!1}return!0};for(const a of s)if(o(e,a)){i=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:i&&t.isInterestedIn(r,n)}findCurrentDropTarget(e){const t=[],s=this.dropTargets;for(let r=0,a=s.length;r<a;++r){const l=s[r];this.isMouseOnDropTarget(e,l)&&t.push(l)}const i=t.length;if(i===0)return null;if(i===1)return t[0];const n=fs(this.beans).elementsFromPoint(e.clientX,e.clientY);for(let r=0,a=n.length;r<a;++r){const l=n[r];for(let c=0,d=t.length;c<d;c++){const u=t[c],h=this.getAllContainersFromDropTarget(u);let p=!1;for(let m=0,v=h.length;m<v&&!p;m++){const C=h[m];for(let w=0,b=C.length;w<b;w++)if(C[w]===l){p=!0;break}}if(p)return u}}return null}addDropTarget(e){this.dropTargets.push(e),e.external&&this.externalDropZoneCount++}removeDropTarget(e){const t=e.getContainer(),s=this.dropTargets;let i=0;for(let o=0,n=s.length;o<n;++o){const r=s[o];if(r.getContainer()===t){r.external&&--this.externalDropZoneCount;continue}i!==o&&(s[i]=r),++i}s.length=i}hasExternalDropZones(){return this.externalDropZoneCount>0}findExternalZone(e){const t=this.dropTargets;for(let s=0,i=t.length;s<i;++s){const o=t[s];if(o.external&&o.getContainer()===e)return o}return null}dropTargetEvent(e,t,s){const{dragSource:i,dragItem:o,lastDraggingEvent:n,lastMouseEvent:r,dragInitialSourcePointerOffsetX:a,dragInitialSourcePointerOffsetY:l}=this,c=e.getContainer(),d=c.getBoundingClientRect(),{clientX:u,clientY:h}=t,p=u-(r?.clientX||0),m=h-(r?.clientY||0),v=this.createEvent({event:t,x:u-d.left,y:h-d.top,vDirection:m>0?"down":m<0?"up":null,hDirection:p<0?"left":p>0?"right":null,initialSourcePointerOffsetX:a,initialSourcePointerOffsetY:l,dragSource:i,fromNudge:s,dragItem:o,dropZoneTarget:c,dropTarget:n?.dropTarget??null,changed:!!n?.changed});return this.lastDraggingEvent=v,v}positionDragImageComp(e){const t=this.dragImageComp?.getGui();t&&g2(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=>{const i=this.lastMouseEvent;if(t!==this.dragImageCompPromise||!i||!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(),this.positionDragImageComp(i))})}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 i=bh(this.beans);i?i.appendChild(t):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:e,dragSource:t,lastDropTarget:s,lastDraggingEvent:i,dragImageLastLabel:o}=this;if(!e)return;this.setDragImageCompIcon(s?.getIconName?.(i)??null);let n=t?.dragItemName;typeof n=="function"&&(n=n(i)),n||(n=""),o!==n&&(this.dragImageLastLabel=n,e.setLabel(n))}};function iC(e){return typeof e=="object"&&!!e.component}function LR(e){return e?e.prototype&&"getGui"in e.prototype:!1}function oC(e,t,s,i){const{name:o}=s;let n,r,a,l,c,d;if(t){const u=t,h=u[o+"Selector"],p=h?h(i):null,m=v=>{typeof v=="string"?n=v:v!=null&&v!==!0&&(e.isFrameworkComponent(v)?a=v:r=v)};p?(m(p.component),l=p.params,c=p.popup,d=p.popupPosition):m(u[o])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:d}}var OR=class extends B{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,i=!1){return this.getCompDetails(this.gridOptions,e,t,s,i)}getCompDetails(e,t,s,i,o=!1){const{name:n,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:d,popupFromSelector:u,popupPositionFromSelector:h}=oC(this.beans.frameworkOverrides,e,t,i),p,m;const v=x=>{const y=this.registry.getUserComponent(n,x);y&&(l=y.componentFromFramework?void 0:y.component,c=y.componentFromFramework?y.component:void 0,p=y.params,m=y.processParams)};if(a!=null&&v(a),l==null&&c==null&&s!=null&&v(s),l&&r&&!LR(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!c){const{validation:x}=this.beans;o&&(a!==s||!s)?a?x?.isProvidedUserComp(a)||je(50,{compName:a}):s?x||je(260,{...this.gos.getModuleErrorParams(),propName:n,compName:s}):je(216,{name:n}):s&&!x&&je(146,{comp:s});return}const C=this.mergeParams(e,t,i,d,p,m),w=l==null,b=l??c;return{componentFromFramework:w,componentClass:b,params:C,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(b,w,C,t)}}newAgStackInstance(e,t,s,i){const o=!t;let n;o?n=new e:n=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(n);const r=n.init?.(s);return r==null?He.resolve(n):r.then(()=>n)}mergeParams(e,t,s,i=null,o,n){const r={...s,...o},l=e?.[t.name+"Params"];if(typeof l=="function"){const c=l(s);kt(r,c)}else typeof l=="object"&&kt(r,l);return kt(r,i),n?n(r):r}},NR={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},HR={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},BR={name:"headerComponent",optionalMethods:["refresh"]},GR={name:"innerHeaderComponent"},VR={name:"innerHeaderGroupComponent"},zR={name:"headerGroupComponent"},WR={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},jR={name:"loadingCellRenderer",cellRenderer:!0},_R={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},UR={name:"tooltipComponent"},Nh={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},$R={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},qR={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},KR={name:"loadingCellRenderer",cellRenderer:!0},YR={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},ZR={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function XR(e,t){return e.getCompDetailsFromGridOptions(HR,"agDragAndDropImage",t,!0)}function QR(e,t,s){return e.getCompDetails(t,BR,"agColumnHeader",s)}function JR(e,t,s){return e.getCompDetails(t,GR,void 0,s)}function e3(e,t){const s=t.columnGroup.getColGroupDef();return e.getCompDetails(s,zR,"agColumnGroupHeader",t)}function t3(e,t,s){return e.getCompDetails(t,VR,void 0,s)}function s3(e,t){return e.getCompDetailsFromGridOptions(qR,void 0,t,!0)}function i3(e,t){return e.getCompDetailsFromGridOptions(KR,"agLoadingCellRenderer",t,!0)}function o3(e,t){return e.getCompDetailsFromGridOptions(YR,"agGroupRowRenderer",t,!0)}function n3(e,t){return e.getCompDetailsFromGridOptions(ZR,"agDetailCellRenderer",t,!0)}function Ng(e,t,s){return e.getCompDetails(t,WR,void 0,s)}function Hg(e,t,s){return e.getCompDetails(t,jR,"agSkeletonCellRenderer",s,!0)}function nC(e,t,s){return e.getCompDetails(t,_R,"agCellEditor",s,!0)}function r3(e,t,s,i){const o=t.filter;return iC(o)&&(t={filter:o.component,filterParams:t.filterParams}),e.getCompDetails(t,Nh,i,s,!0)}function a3(e,t,s){return e.getCompDetails(t,NR,"agDateInput",s,!0)}function l3(e,t){return e.getCompDetails(t.colDef,UR,"agTooltipComponent",t,!0)}function c3(e,t,s,i){return e.getCompDetails(t,$R,i,s)}function rC(e,t){return oC(e,t,Nh)}function hd(e,t,s){return e.mergeParams(t,Nh,s)}var d3=class extends AR{createEvent(e){return be(this.gos,e)}createDragImageComp(e){const{gos:t,beans:s}=this;return XR(s.userCompFactory,be(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){$(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const s={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(s),t.addDestroyFunc(()=>this.removeDropTarget(s))}};function aC(e){return!!e.operator}var lC="ag-resizer-wrapper",ci=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),u3={tag:"div",cls:lC,children:[ci("eTopLeft","topLeft"),ci("eTop","top"),ci("eTopRight","topRight"),ci("eRight","right"),ci("eBottomRight","bottomRight"),ci("eBottom","bottom"),ci("eBottomLeft","bottomLeft"),ci("eLeft","left")]},h3=class extends Ot{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={popup:!1,...t}}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){const{clientHeight:t,clientWidth:s}=this.offsetParent,i=s/2-this.getWidth()/2,o=t/2-this.getHeight()/2;this.offsetElement(i,o,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:s,minWidth:i,width:o,minHeight:n,height:r,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let c=0,d=0;const u=xs(this.element);if(u){const h=this.findBoundaryElement(),p=window.getComputedStyle(h);if(p.minWidth!=null){const m=h.offsetWidth-this.element.offsetWidth;d=Number.parseInt(p.minWidth,10)-m}if(p.minHeight!=null){const m=h.offsetHeight-this.element.offsetHeight;c=Number.parseInt(p.minHeight,10)-m}}if(this.minHeight=n||c,this.minWidth=i||d,o&&this.setWidth(o),r&&this.setHeight(r),(!o||!r)&&this.refreshSize(),t)this.center(e);else if(a||l)this.offsetElement(a,l,e);else if(u&&s){let h=this.boundaryEl,p=!0;if(h||(h=this.findBoundaryElement(),p=!1),h){const m=Number.parseFloat(h.style.top),v=Number.parseFloat(h.style.left);p?this.offsetElement(Number.isNaN(v)?0:v,Number.isNaN(m)?0:m,e):this.setPosition(v,m)}}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}}for(const t of Object.keys(e)){const s=!!e[t],i=this.getResizerElement(t),o={dragStartPixels:0,eElement:i,onDragStart:n=>this.onResizeStart(n,t),onDragging:this.onResize.bind(this),onDragStop:n=>this.onResizeEnd(n,t)};(s||!this.isAlive()&&!s)&&(s?(this.dragSvc?.addDragSource(o),this.resizeListeners.push(o),i.style.pointerEvents="all"):i.style.pointerEvents="none",this.resizable[t]=s)}}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,s=this.element;let i=!1;if(typeof e=="string"&&e.includes("%"))hr(s,e),e=wv(s),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const o=this.getAvailableHeight();o&&e>o&&(e=o)}this.getHeight()!==e&&(i?(s.style.maxHeight="unset",s.style.minHeight="unset"):t?hr(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 i=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:i.top,r=e?0:o.top;let a=0;if(t){const c=this.element.parentElement;if(c){const{bottom:d}=c.getBoundingClientRect();a=d-i.bottom}}return s+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:s}=this.config;let i=!1;if(typeof e=="string"&&e.includes("%"))As(t,e),e=gl(t),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:o}=this.offsetParent,n=s?this.position.x:this.element.getBoundingClientRect().left;o&&e+n>o&&(e=o-n)}this.getWidth()!==e&&(i?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?As(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:i}=this.config,o=i?this.boundaryEl:this.element;o&&(this.popupSvc?.positionPopup({ePopup:o,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:s}),this.setPosition(Number.parseFloat(o.style.left),Number.parseFloat(o.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=si(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:i,anywhereWithin:o,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!s,!!o,r)?0:r,c=this.shouldSkipY(t,!!i,n,a)?0:a;return{movementX:l,movementY:c}}shouldSkipX(e,t,s,i){const o=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:o.left;let l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return l?!0:(t?l=i<0&&e.clientX>a+n.left||i>0&&e.clientX<a+n.left:s?l=i<0&&e.clientX>r.right||i>0&&e.clientX<a+n.left:l=i<0&&e.clientX>r.right||i>0&&e.clientX<r.right,l)}shouldSkipY(e,t,s=0,i){const o=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:o.top;let l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return l?!0:(t?l=i<0&&e.clientY>a+n.top+s||i>0&&e.clientY<a+n.top:l=i<0&&e.clientY>r.bottom||i>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(co(u3)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${lC}`)?.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:i}=this.config;!s&&!i&&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(const i of e){const o=!!i.style.flex&&i.style.flex!=="0 0 auto";if(i===this.element)continue;let n=this.minHeight||0,r=this.minWidth||0;if(o){const a=window.getComputedStyle(i);a.minHeight&&(n=Number.parseInt(a.minHeight,10)),a.minWidth&&(r=Number.parseInt(a.minWidth,10))}else n=i.offsetHeight,r=i.offsetWidth;t+=n,s+=r}return{height:t,width:s}}applySizeToSiblings(e){let t=null;const s=this.getSiblings();if(s){for(let i=0;i<s.length;i++){const o=s[i];o!==t&&(e?o.style.height=`${o.offsetHeight}px`:o.style.width=`${o.offsetWidth}px`,o.style.flex="0 0 auto",o===this.element&&(t=s[i+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:i,isRight:o,isBottom:n,isLeft:r}=this.currentResizer,a=o||r,l=n||i,{movementX:c,movementY:d}=this.calculateMouseMovement({e,isLeft:r,isTop:i}),u=this.position.x,h=this.position.y;let p=0,m=0;if(a&&c){const v=r?-1:1,C=this.getWidth(),w=C+c*v;let b=!1;r&&(p=C-w,(u+p<=0||w<=this.minWidth)&&(b=!0,p=0)),b||this.setWidth(w)}if(l&&d){const v=i?-1:1,C=this.getHeight(),w=C+d*v;let b=!1;i?(m=C-w,(h+m<=0||w<=this.minHeight)&&(b=!0,m=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&C<w&&this.getMinSizeOfSiblings().height+w>this.element.parentElement.offsetHeight&&(b=!0),b||this.setHeight(w)}this.updateDragStartPosition(e.clientX,e.clientY),((t||s)&&p||m)&&this.offsetElement(u+p,h+m)}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 i;this.config.calculateTopBuffer&&(i=this.config.calculateTopBuffer());const{movementX:o,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:i});this.offsetElement(t+o,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()}},p3=class extends h3{},ue=null;function Bg(e){return typeof e?.getGui=="function"}var Wr=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(!e)return;if(e.includes(" ")){const i=(e||"").split(" ");if(i.length>1){for(const o of i)this.toggleCss(o,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}},g3=0,In=class extends Ot{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=g3++,this.cssManager=new Wr(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(s=>[s.selector,s])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui()),this.addGlobalCss()}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(Sv):null}applyElementsToComponent(e,t,s,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const o=this[t];if(o===ue)this[t]=i??e;else{const n=s?.[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${o}`)}}}createChildComponentsFromTags(e,t){const s=[];for(const i of e.childNodes??[])s.push(i);for(const i of s){if(!(i instanceof HTMLElement))continue;const o=this.createComponentFromElement(i,n=>{const r=n.getGui();if(r)for(const a of i.attributes??[])r.setAttribute(a.name,a.value)},t);if(o){if(o.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const n=Array.prototype.slice.call(i.children);o.addItems(n)}this.swapComponentForNode(o,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)}}createComponentFromElement(e,t,s){const i=e.nodeName,o=this.getDataRefAttribute(e),n=i.indexOf("AG-")===0,r=n?this.componentSelectors.get(i):null;let a=null;if(r){const l=s&&o?s[o]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,o,s,a),a}swapComponentForNode(e,t,s){const i=e.getGui();t.replaceChild(i,s),t.insertBefore(document.createComment(s.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e,t){const s=t??this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const i of e)i.setAttribute("tabindex",s.toString())}setTemplate(e,t,s){let i;typeof e=="string"||e==null?i=Rh(e):i=co(e),this.setTemplateFromElement(i,t,s)}setTemplateFromElement(e,t,s,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let o=0;o<t.length;o++){const n=t[o];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),Eh(e)?{element:e,parent:s}:{element:e.getGui(),parent:s})}prependChild(e,t){const{element:s,parent:i}=this.getContainerAndElement(e,t)||{};!s||!i||i.prepend(s)}appendChild(e,t){const{element:s,parent:i}=this.getContainerAndElement(e,t)||{};!s||!i||i.appendChild(s)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:s}=t;o2(this.eGui,e,{skipAriaHidden:s})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:s}=t;qe(this.eGui,e,{skipAriaHidden:s});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}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===Gg?(this.css=[e],this.addGlobalCss()):(this.css||(this.css=[]),this.css.push(e))}addGlobalCss(){if(Array.isArray(this.css)){const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(const t of this.css??[])this.beans.environment.addGlobalCSS(t,e)}this.css=Gg}},Gg=Symbol(),it=class extends In{},pd,gd,fd,md,Su,Ru,vd;function Ai(){return pd===void 0&&(pd=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),pd}function bn(){return gd===void 0&&(gd=/(firefox)/i.test(navigator.userAgent)),gd}function cC(){return fd===void 0&&(fd=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),fd}function so(){return md===void 0&&(md=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),md}function Fu(e){if(!e)return null;const t=e.tabIndex,s=e.getAttribute("tabIndex");return t===-1&&(s===null||s===""&&!bn())?null:t.toString()}function f3(){if(vd!==void 0)return vd;if(!document.body)return-1;let e=1e6;const t=bn()?6e6:1e9,s=document.createElement("div");for(document.body.appendChild(s);;){const i=e*2;if(s.style.height=i+"px",i>t||s.clientHeight!==i)break;e=i}return s.remove(),vd=e,e}function Hh(){return Ru==null&&dC(),Ru}function dC(){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&&(Ru=s,Su=s===0)}function uC(){return Su==null&&dC(),Su}var Eu=!1,Dl=0;function m3(e){Dl>0||(e.addEventListener("keydown",Pl),e.addEventListener("mousedown",Pl))}function v3(e){Dl>0||(e.removeEventListener("keydown",Pl),e.removeEventListener("mousedown",Pl))}function Pl(e){const t=Eu,s=e.type==="keydown";s&&(e.ctrlKey||e.metaKey||e.altKey)||t!==s&&(Eu=s)}function C3(e){const t=ft(e);return m3(t),Dl++,()=>{Dl--,v3(t)}}function hC(){return Eu}function io(e,t,s=!1){const i=i2;let o=Cv;t&&(o+=", "+t),s&&(o+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>xs(l)),r=Array.prototype.slice.apply(e.querySelectorAll(o));return r.length?((l,c)=>l.filter(d=>c.indexOf(d)===-1))(n,r):n}function po(e,t=!1,s=!1,i=!1){const o=io(e,i?".ag-tab-guard":null,s),n=t?Ue(o):o[0];return n?(n.focus({preventScroll:!0}),!0):!1}function Fo(e,t,s,i){const o=io(t,s?':not([tabindex="-1"])':null),n=Je(e);let r;s?r=o.findIndex(l=>l.contains(n)):r=o.indexOf(n);const a=r+(i?-1:1);return a<0||a>=o.length?null:o[a]}function pC(e,t=5){let s=0;for(;e&&Fu(e)===null&&++s<=t;)e=e.parentElement;return Fu(e)===null?null:e}var w3="ag-focus-managed",gC=class extends Ot{constructor(e,t={isStopPropagation:()=>!1,stopPropagation:()=>{}},s={}){super(),this.eFocusable=e,this.stopPropagationCallbacks=t,this.callbacks=s,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:i=>{if(i.defaultPrevented)return;const o=Fo(this.beans,this.eFocusable,!1,i.shiftKey);o&&(o.focus(),i.preventDefault())},...s}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:s}}=this;e.classList.add(w3),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||this.stopPropagationCallbacks.isStopPropagation(t))return;const{callbacks:s}=this;if(s.shouldStopEventPropagation(t)){this.stopPropagationCallbacks.stopPropagation(t);return}t.key===A.TAB?s.onTabKeyDown(t):s.handleKeyDown&&s.handleKeyDown(t)}})}},fC="__ag_Grid_Stop_Propagation";function go(e){e[fC]=!0}function Zs(e){return e[fC]===!0}var Bh={isStopPropagation:Zs,stopPropagation:go},jr=class extends gC{constructor(e,t){super(e,Bh,t)}},b3={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",bigintFilter:"BigInt 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",yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",last7Days:"Last 7 Days",lastWeek:"Last Week",thisWeek:"This Week",nextWeek:"Next Week",last30Days:"Last 30 Days",lastMonth:"Last Month",thisMonth:"This Month",nextMonth:"Next Month",last90Days:"Last 90 Days",lastQuarter:"Last Quarter",thisQuarter:"This Quarter",nextQuarter:"Next Quarter",lastYear:"Last Year",thisYear:"This Year",yearToDate:"Year To Date",nextYear:"Next Year",last6Months:"Last 6 Months",last12Months:"Last 12 Months",last24Months:"Last 24 Months",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`,minDateValidation:e=>`Date must be after ${e[0]}`,maxDateValidation:e=>`Date must be before ${e[0]}`,strictMinValueValidation:e=>`Must be greater than ${e[0]}`,strictMaxValueValidation:e=>`Must be less than ${e[0]}`};function vs(e,t,s){return m2(e,b3,t,s)}function Gh(e,t){const{debounceMs:s}=e;return rc(e)?(s!=null&&$(71),0):s??t}function rc(e){return(e.buttons?.indexOf("apply")??-1)>=0}function mC(e,t,s,i){let o=vs(e,s);if(typeof t=="function"){const n=vs(e,i);o=t({filterOptionKey:i,filterOption:n,placeholder:o})}else typeof t=="string"&&(o=t);return o}var x3=class extends it{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 jr(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new p3(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(e,t){return e===t}refresh(e){const t=e,s=this.params;this.params=t;const{source:i,state:o,additionalEventAttributes:n}=t;i==="colDef"&&this.updateParams(t,s);const r=this.state;this.state=o;const a=n?.fromAction;return(a&&a!=="apply"||o.model!==r.model||!this.areStatesEqual(o.state,r.state))&&this.setModelIntoUi(o.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=rc(e),this.setupApplyDebounced()}doesFilterPass(e){$(283);const{getHandler:t,model:s,column:i}=this.params;return t().doesFilterPass({...e,model:s,handlerParams:this.beans.colFilter.getHandlerParams(i)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return $(284),this.params.model!=null}setupApplyDebounced(){const e=Gh(this.params,this.defaultDebounceMs),t=lt(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return $(285),this.params.model}setModel(e){$(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:{valid:s=!0,model:i}}=this;if(!s)return!1;const o=!this.areModelsEqual(t.model,i);return o&&t.onAction("apply",e),o}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const s=this.getModelFromUi(),i={model:s,state:this.getState(),valid:this.canApply(s)};this.state=i;const{params:o,gos:n,eventSvc:r,applyActive:a}=this;o.onStateChange(i),o.onUiChange(this.getUiChangeEventParams()),n.get("enableFilterHandlers")||r.dispatchEvent({type:"filterModified",column:o.column,filterInstance:this}),i.valid&&(e??(e=a?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 i=e==="floatingFilter"||e==="columnFilter";i?(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(i)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return vs(this,e,t)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}},Vh=class extends In{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()}},ac=class extends Vh{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.eEditor.destroy(),this.errorMessages=null,super.destroy()}};function Vs(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function lc(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function y3(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var Vg="row-group-",zh="t-",Wh="b-",S3=0,Ei=class{constructor(e){this.id=void 0,this.destroyed=!1,this._groupData=void 0,this.master=!1,this.detail=void 0,this.rowIndex=null,this.field=null,this.rowGroupColumn=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenAfterGroup=null,this.childrenAfterFilter=null,this.childrenAfterAggFilter=null,this.childrenAfterSort=null,this.allChildrenCount=null,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this._expanded=void 0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=S3++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){const e=this._groupData;return e!==void 0?e:this.footer?this.sibling?.groupData:this.beans.groupStage?.loadGroupData(this)??null}set groupData(e){this._groupData=e}get primaryRow(){let e=this.footer&&this.sibling?this.sibling:this;const{pinnedSibling:t}=e;return t&&e.rowPinned&&(e=t,e.footer&&e.sibling&&(e=e.sibling)),e}get allLeafChildren(){const e=this._leafs;return e===void 0?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}get expanded(){const e=this.beans.expansionSvc;return e?e.isExpanded(this):this.level===-1?!0:!!this._expanded}set expanded(e){this._expanded=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:s,eventSvc:i}=this.beans,o=this.data;this.data=e,s?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,o,t);if(this.__localEventService?.dispatchEvent(n),this.sibling){this.sibling.data=e;const a=this.sibling.createDataChangedEvent(e,o,t);this.sibling.__localEventService?.dispatchEvent(a)}i.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,r.__localEventService?.dispatchEvent(r.createDataChangedEvent(e,o,t)),i.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?(je(13),null):this.rowPinned==="top"?zh+this.rowIndex:this.rowPinned==="bottom"?Wh+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:s}=this.beans,i=s?.createDaemonNode?.(this),o=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),s&&(s.updateRowSelectable(this),s.syncInRowNode(this,i));const n=this.createDataChangedEvent(e,o,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=wn(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(Vg)&&je(14,{groupPrefix:Vg})}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:i,valueSvc:o,gos:n,editSvc:r}=this.beans;if(e==null)return!1;let a=i.getCol(e)??i.getColDefCol(e);if(!a)return!1;if(!this.group){const d=a.getColDef();d.pivotValueColumn&&(a=d.pivotValueColumn)}const l=o.getValueForDisplay({column:a,node:this,from:"data"}).value;if(n.get("readOnlyEdit")){const{beans:{eventSvc:d},data:u,rowIndex:h,rowPinned:p}=this;return d.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:p,column:a,colDef:a.colDef,data:u,node:this,oldValue:l,newValue:t,value:t,source:s}),!1}if(s!=="data"&&r&&!r.committing){const d=r.setDataValue({rowNode:this,column:a},t,s);if(d!=null)return d}const c=o.setValue(this,a,t,s);return this.dispatchCellChangedEvent(a,t,l),c&&this.pinnedSibling?.dispatchCellChangedEvent(a,t,l),c}getDataValue(e,t="data"){const{colModel:s,valueSvc:i,formula:o}=this.beans;if(e==null)return;const n=s.getCol(e)??s.getColDefCol(e);if(!n)return;const r=t==="data-raw",a=r||t==="value"?"data":t;let l=i.getValue(n,this,a,r);if(!r&&(o&&n.isAllowFormula()&&o.isFormula(l)&&(l=o.resolveValue(n,this)),t!=="data"&&n.getAggFunc()&&typeof l=="object"&&l!=null)){if(typeof l.toNumber=="function")return l.toNumber();if("value"in l)return l.value}return l}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 i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:s};this.__localEventService?.dispatchEvent(i)}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,i=t.length;s<i;++s)t[s].depthFirstSearch(e);e(this)}getAggregatedChildren(e,t){const s=this.beans;return s.aggChildrenSvc?.getAggregatedChildren(this,s.colModel.getCol(e),t)??[]}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 ao)).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 ao);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,s);const i=this.frameworkEventListenerService?.wrap(e,t)??t;s.addEventListener(e,i)}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($(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}_destroy(e){if(this.destroyed)return!1;this.destroyed=!0;const t=this.pinnedSibling;if(t?.rowPinned&&!this.rowPinned&&this.beans.pinnedRowModel?.pinRow(t,null),e?this.clearRowTopAndRowIndex():(this.setRowTop(null),this.setRowIndex(null)),!this.footer){const s=this.detailNode;s&&s._destroy(e);const i=this.sibling;i&&i._destroy(e)}return!0}};function R3(e,t,s){return be(t,{type:s,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var F3=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_groupData","_leafs","childStore","groupValue","oldRowTop","sticky","treeNodeFlags","treeParent"]),E3=(e,t)=>{const s=new Ei(t);for(const i of Object.keys(e))F3.has(i)||(s[i]=e[i]);return s.oldRowTop=null,s},Du=(e,t,s)=>{if(!s)return;let i=s.rowIndex;if(i==null)return;i+=t;const o=e.getRowCount();for(;i>=0&&i<o;){const n=e.getRow(i);if(!n||!n.footer&&!n.detail)return n;i+=t}},zg=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:i}=this;t.has(e)||(t.add(e),s.add(e),i.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),Ns(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:i}=this;e.clear(),i.clear(),t.clear(),s.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:s}=this.beans,i=e?.getSortOptions()??[],o=this.order,n=T3(o);if(o.sort((a,l)=>t?.compareRowNodes(i,a,l)||(a.pinnedSibling?.rowIndex??0)-(l.pinnedSibling?.rowIndex??0)),!n)return;const r=Uv(s);r==="bottom"||r==="pinnedBottom"?this.order.push(n):this.order.unshift(n)}hide(e){const{all:t,visible:s}=this,i=s.size;return t.forEach(o=>e(o)?s.delete(o):s.add(o)),this.order=Array.from(s),this.sort(),i!=s.size}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function vC(e){if(e.level===-1)return!0;const t=e.parent;return t?.childrenAfterSort?.some(s=>s==e)?vC(t):!1}function Cd(e,t){const{gos:s,rowModel:i,filterManager:o}=e;return kn(s)?!i.getRowNode(t.id):o?.isAnyFilterPresent()?!vC(t):s.get("pivotMode")?!t.group:!1}function D3(e){return!!e.footer&&e.level===-1}function P3(e){return!!e.pinnedSibling&&D3(e.pinnedSibling)}function T3(e){const t=e.findIndex(P3);if(t>-1)return e.splice(t,1)?.[0]}var Wg=class extends B{constructor(){super(...arguments),this.csrm=null}postConstruct(){const{gos:e,beans:t}=this;this.top=new zg(t,"top"),this.bottom=new zg(t,"bottom"),this.csrm=Vs(t)??null;const s=o=>Cd(t,o.pinnedSibling),i=()=>{const o=e.get("isRowPinned");o&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,o(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:o})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let n=!1;this.forContainers(a=>{n||(n=a.hide(s))});const r=this.refreshRowPositions();(!o||r||n)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(I3),this.refreshRowPositions()},rowNodeDataChanged:({node:o})=>{(e.get("isRowPinnable")?.(o)??!0)||this.pinRow(o,null)},firstDataRendered:i}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(o=>o.hide(s)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:o})=>{this._grandTotalPinned=o==="pinnedBottom"?"bottom":o==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",i)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const s=[];t.forEach(i=>s.push(i)),s.forEach(i=>this.pinRow(i,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,s){if(t!=null&&e.destroyed)return;if(e.footer){const r=e.level;if(r>-1)return;if(r===-1){this._grandTotalPinned=t,this.csrm?.reMapRows();return}}const i=e.rowPinned??e.pinnedSibling?.rowPinned;if(i!=null&&t!=null&&t!=i){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&&M3(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;wd(r),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(l)}else{const r=jg(this.beans,e,t),a=this.getContainer(t);a.add(r),Cd(this.beans,e)&&a.hide(l=>Cd(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=i=>{if(i.rowHeightEstimated){const o=Si(this.beans,i);i.setRowTop(t),i.setRowHeight(o.height),t+=o.height,e=!0}};return this.bottom.forEach(s),t=0,this.top.forEach(s),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return _g(this.top)}getPinnedBottomTotalHeight(){return _g(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,i=>{const o=i.pinnedSibling?.id;o!=null&&s.push(o)}),s};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,s)=>{for(const i of e[s]){const o=this.beans.rowModel.getRowNode(i);o?this.pinRow(o,s):t.queue(i)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const s=new Set;e.forEachQueued(i=>{const o=this.beans.rowModel.getRowNode(i);o&&s.add(o)});for(const i of s)e.unqueue(i.id),this.pinRow(i,t)})}pinGrandTotalRow(){const{csrm:e,beans:t,_grandTotalPinned:s}=this;if(!e)return;const i=e.rootNode?.sibling;if(!i)return;const o=i.pinnedSibling,n=o&&this.findPinnedRowNode(o);if(s){if(n&&n.floating!==s&&(wd(o),n.delete(o)),!n||n.floating!==s){const r=jg(t,i,s);this.getContainer(s).add(r)}}else{if(!n)return;wd(o),n.delete(o)}}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=i=>k3(this.beans,i);if(e)return t(this.getContainer(e));let s=!1;return this.forContainers(i=>{const o=t(i);s||(s=o)}),s}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function k3(e,t){let s=0,i=!1;return t.forEach((o,n)=>{if(i||(i=o.rowTop!==s),o.setRowTop(s),o.rowHeightEstimated||o.rowHeight==null){const r=Si(e,o).height;i||(i=o.rowHeight!==r),o.setRowHeight(r)}o.setRowIndex(n),s+=o.rowHeight}),i}function jg(e,t,s){if(t.pinnedSibling)return t.pinnedSibling;const i=E3(t,e);i.setRowTop(null),i.setRowIndex(null),i.rowPinned=s;const o=s==="top"?zh:Wh;return i.id=`${o}${s}-${t.id}`,i.pinnedSibling=t,t.pinnedSibling=i,i}function wd(e){if(!e.pinnedSibling)return;e.rowPinned=null,e._destroy(!1);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function I3(e){const t=new Set;e.forEach(s=>{s.group&&t.add(s)}),t.forEach(s=>e.delete(s))}function M3(e,t,s){const{rowSpanSvc:i}=e,o=(s&&i?.isCellSpanning(s,t))??!1;if(s&&o)return i?.getCellSpan(s,t)?.spannedNodes}function _g(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}var Ug=class extends B{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({stylesChanged: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)};Jn(this.pinnedBottomRows,t),Jn(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const s=i=>{if(i.rowHeightEstimated){const o=Si(this.beans,i);i.setRowTop(t),i.setRowHeight(o.height),t+=o.height,e=!0}};return Jn(this.pinnedBottomRows,s),t=0,Jn(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 i=wn(this.gos),o=t==="top"?zh:Wh,n=new Set(s.order),r=[],a=new Set;let l=0,c=-1;for(const d of e){const u=i?.({data:d,level:0,rowPinned:t})??o+this.nextId++;if(a.has(u)){$(96,{id:u,data:d});continue}c++,a.add(u),r.push(u);const h=fr(s,u);if(h!==void 0)h.data!==d&&h.updateData(d),l+=this.setRowTopAndRowIndex(h,l,c),n.delete(u);else{const p=new Ei(this.beans);p.id=u,p.data=d,p.rowPinned=t,l+=this.setRowTopAndRowIndex(p,l,c),s.cache[u]=p,s.order.push(u)}}for(const d of n)fr(s,d)?.clearRowTopAndRowIndex(),delete s.cache[d];s.order=r}setRowTopAndRowIndex(e,t,s){return e.setRowTop(t),e.setRowHeight(Si(this.beans,e).height),e.setRowIndex(s),e.rowHeight}getPinnedTopTotalHeight(){return $g(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return $g(this.pinnedBottomRows)}getPinnedTopRowCount(){return Tu(this.pinnedTopRows)}getPinnedBottomRowCount(){return Tu(this.pinnedBottomRows)}getPinnedTopRow(e){return Pu(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Pu(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return fr(this.getCache(t),e)}forEachPinnedRow(e,t){return Jn(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function $g(e){const t=Tu(e);if(t===0)return 0;const s=Pu(e,t-1);return s===void 0?0:s.rowTop+s.rowHeight}function fr(e,t){return e.cache[t]}function Pu(e,t){return fr(e,e.order[t])}function Jn(e,t){e.order.forEach((s,i)=>{const o=fr(e,s);o&&t(o,i)})}function Tu(e){return e.order.length}var A3=class extends B{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const s=e.get("enableRowPinning"),i=Uv(e),n=!!s||(i==="pinnedBottom"||i==="pinnedTop"),r=n?this.inner instanceof Ug:this.inner instanceof Wg;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(n?new Wg:new Ug))};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()}},L3=500,O3=550,Ma,N3=e=>{if(!Ma)Ma=new WeakSet;else if(Ma.has(e))return!1;return Ma.add(e),!0},_i=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 ao;const i=this.onTouchStart.bind(this);this.startListener=i,this.eElement.addEventListener("touchstart",i,{passive:!0})}s.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!N3(e))return;const t=e.touches[0];this.touchStart=t;const s=this.handlers;if(!s.length){const i=this.eElement,o=i.ownerDocument,n=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this),a=this.onTouchCancel.bind(this),l={passive:!0},c={passive:!1};Ya(s,[i,"touchmove",n,l],[o,"touchcancel",a,l],[o,"touchend",r,c],[o,"contextmenu",mi,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}))},O3)}onTouchMove(e){const{moved:t,touchStart:s}=this;if(!t&&s){const i=nn(s,e.touches);i&&!Rv(i,s,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;!t||!nn(t,e.changedTouches)||(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&mi(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;!t||!nn(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now();const s=this.lastTapTime;s&&t-s>L3&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),Dh(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}},H3=1,B3=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=H3++,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:i}=t(this);this.beans[s]=i,this.createdBeans.push(i)}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 i of e)i.preWireBeans?.(s),i.wireBeans?.(s);for(const i of e)i.preConstruct?.();t&&e.forEach(t);for(const i of e)i.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}};function G3(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var V3=["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"],qg=Object.fromEntries(V3.map((e,t)=>[e,t]));function z3(e,t){const s=(e.beanName?qg[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,i=(t.beanName?qg[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return s-i}function W3(e,t){return e?.beanName==="gridDestroySvc"?-1:t?.beanName==="gridDestroySvc"?1:0}function j3(e){const{rowIndex:t,rowPinned:s,column:i}=e;return`${t}.${s??"null"}.${i.getId()}`}function jh(e,t){const s=e.column===t.column,i=e.rowPinned===t.rowPinned,o=e.rowIndex===t.rowIndex;return s&&i&&o}function _3(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(ee(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function U3(e,t){return!e&&!t?!0:!e||!t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function Kg(e){let t=0,s;const{pinnedRowModel:i,rowModel:o,pageBounds:n}=e;return i?.getPinnedTopRowCount()?s="top":o.getRowCount()?(s=null,t=n.getFirstRow()):i?.getPinnedBottomRowCount()&&(s="bottom"),s===void 0?null:{rowIndex:t,rowPinned:s}}function Yg(e){let t,s=null;const{pinnedRowModel:i,pageBounds:o}=e,n=i?.getPinnedBottomRowCount(),r=i?.getPinnedTopRowCount();return n?(s="bottom",t=n-1):e.rowModel.getRowCount()?t=o.getLastRow():r&&(s="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:s}}function Hs(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 Jo(e,t){const s=e.spannedRowRenderer?.getCellByPosition(t);if(s)return s;const i=e.rowRenderer.getRowByPosition(t);return i?i.getCellCtrl(t.column):null}function $3(e,t,s){const{rowModel:i,pinnedRowModel:o}=e;let n;return n??(n=i?.getRowNode(t)),s?n??(n=o?.getPinnedRowById(t,s)):(n??(n=o?.getPinnedRowById(t,"top")),n??(n=o?.getPinnedRowById(t,"bottom"))),n}function Tl(e,t,s=!1){const{rowIndex:i,rowPinned:o}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(i===0)return o==="top"?null:o==="bottom"&&a.isRowsToRender()?{rowIndex:n.getLastRow(),rowPinned:null}:r?.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null;if(s){const l=o?void 0:a.getRow(i);return CC(e,l,!0)??{rowIndex:i-1,rowPinned:o}}return{rowIndex:i-1,rowPinned:o}}function Zg(e,t,s=!1){const{rowIndex:i,rowPinned:o}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(q3(e,t))return o==="bottom"?null:o==="top"&&a.isRowsToRender()?{rowIndex:n.getFirstRow(),rowPinned:null}:r?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;if(s){const l=o?void 0:a.getRow(i);return CC(e,l)??{rowIndex:i+1,rowPinned:o}}return{rowIndex:i+1,rowPinned:o}}function CC(e,t,s=!1){const{gos:i,rowRenderer:o}=e;if(!t?.sticky||!_v(i))return;const n=o.getStickyTopRowCtrls(),r=o.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 q3(e,t){const{rowPinned:s,rowIndex:i}=t,{pinnedRowModel:o,pageBounds:n}=e;return s==="top"?(o?.getPinnedTopRowCount()??0)-1<=i:s==="bottom"?(o?.getPinnedBottomRowCount()??0)-1<=i:n.getLastRow()<=i}function K3(e,t,s){t.addManagedElementListeners(s,{keydown:i=>{if(!i.defaultPrevented&&!J3(i)&&i.key===A.TAB){const o=i.shiftKey;Fo(e,s,!1,o)||xn(e,o)&&i.preventDefault()}}})}function Y3(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function ms(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.exclusive}function Lr(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.exclusive}function xn(e,t,s=!1){const i=e.ctrlsSvc.get("gridCtrl"),o=i.focusNextInnerContainer(t);return o===!0?!0:o===!1?o:((s||!t&&!i.isDetailGrid()&&i.isFocusInsideGridBody())&&i.forceFocusOutOfContainer(t),!1)}function Z3(e,t){const s=e.focusSvc,i=s.getFocusedCell();if(i&&t&&jh(i,t)){const{rowIndex:o,rowPinned:n,column:r}=t;Ch(e)&&s.setFocusedCell({rowIndex:o,column:r,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!hC()})}}function X3(e,t){const s=e.getFocusableContainerName();return s==="gridBody"?t():wC(e,()=>io(e.getGui(),".ag-tab-guard").length>0)?s:null}function wC(e,t){e.setAllowFocus?.(!0);try{return t()}finally{e.setAllowFocus?.(!1)}}var Q3="__ag_Grid_Skip_Focusable_Container";function J3(e){return e[Q3]===!0}function rs(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function _h(e){const t=[],s=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const i of s){if(!i)continue;const o=i.getGroupRowCount()||0;for(let n=0;n<o;n++){const r=i.getGroupRowCtrlAtIndex(n),a=t[n];if(r){const l=eF(e,r);(a==null||l>a)&&(t[n]=l)}}}return t}function eF(e,t){let i=e.colModel.isPivotMode()?sF(e):xC(e);const o=t.getHeaderCellCtrls();for(const n of o){const{column:r}=n,a=r.getAutoHeaderHeight();a!=null&&a>i&&r.isAutoHeaderHeight()&&(i=a)}return i}function Uh(e){let s=e.colModel.isPivotMode()?tF(e):_r(e);return e.colModel.forAllCols(i=>{const o=i.getAutoHeaderHeight();o!=null&&o>s&&i.isAutoHeaderHeight()&&(s=o)}),s}function _r(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function bC(e){return e.gos.get("floatingFiltersHeight")??_r(e)}function xC(e){return e.gos.get("groupHeaderHeight")??_r(e)}function tF(e){return e.gos.get("pivotHeaderHeight")??_r(e)}function sF(e){return e.gos.get("pivotGroupHeaderHeight")??xC(e)}function iF(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}function oF(e){return e?.headerRowIndex!=null}var nF=class extends B{setComp(e,t,s){this.comp=e,this.eGui=t;const{beans:i}=this,{headerNavigation:o,touchSvc:n,ctrlsSvc:r}=i;o&&this.createManagedBean(new jr(s,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,i),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,i)}),this.onPivotModeChanged(i),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:()=>ii(this.beans,()=>e()),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const s=_h(e).reduce((r,a)=>r+a,0),i=Uh(e);e.filterManager?.hasFloatingFilters()&&(t+=bC(e)),t+=s,t+=i;const o=e.environment.getHeaderRowBorderWidth(),n=t+o;if(this.headerHeightWithBorder!==n){this.headerHeightWithBorder=n;const r=`${n}px`;this.comp.setHeightAndMinHeight(r)}this.headerHeight!==t&&(this.headerHeight=t,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(i=>i.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",s)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),s=e.shiftKey,i=s!==t?"LEFT":"RIGHT",{beans:o}=this,{headerNavigation:n,focusSvc:r}=o;(n.navigateHorizontally(i,!0,e)||!s&&r.focusOverlay(!1)||xn(o,s,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:s}=this.beans;switch(e.key){case A.LEFT:t="LEFT";case A.RIGHT:{ee(t)||(t="RIGHT"),s.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case A.UP:t="UP";case A.DOWN:{ee(t)||(t="DOWN"),s.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:s,beans:i}=this;!t&&s.contains(Je(i))||s.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,s){const{menuSvc:i,ctrlsSvc:o}=this.beans;if(!e&&!s||!i?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===o.getHeaderRowContainerCtrl()?.eViewport)&&i.showHeaderContextMenu(void 0,e,s)}},$h=class extends B{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=bt(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:s}=this.beans,i=t.bodyWidth,o=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=i+o+n:(r=i,this.addSpacer&&(this.gos.get("enableRtl")?o:n)===0&&s.verticalScrollShowing&&(r+=s.getScrollbarWidth())),this.callback(r)}},Mn=class extends B{};function Ur(e,t,s){return s&&e.addDestroyFunc(()=>t.destroyBean(s)),s??e}var qh=class extends B{constructor(e,t,s,i){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=i,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?Ue(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"),i=ee(this.columnOrGroup.getOldLeft());t?.isActive()&&i&&!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:i}=this.beans;if(!bt(s,"print")||e.getPinned()==="left")return t;const n=i.getColsLeftWidth();if(e.getPinned()==="right"){const r=i.bodyWidth;return n+r+t}return n+t}setLeft(e){if(ee(e)&&(this.eCell.style.left=`${e}px`),nt(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&QS(this.ariaEl,t.length)}}},rF="ag-column-first",aF="ag-column-last";function yC(e,t,s,i){return tt(e)?[]:cF(e.headerClass,e,t,s,i)}function SC(e,t,s){e.toggleCss(rF,s.isColAtEdge(t,"first")),e.toggleCss(aF,s.isColAtEdge(t,"last"))}function lF(e,t,s,i){return be(t,{colDef:e,column:s,columnGroup:i})}function cF(e,t,s,i,o){if(tt(e))return[];let n;if(typeof e=="function"){const r=lF(t,s,i,o);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}var dF=0,RC="headerCtrl",Kh=class extends B{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()+"-"+dF++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,s,i,o){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,s,i,o),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:s}=this.beans.focusSvc.focusedHeader,i=s.getDefinition(),o=i?.suppressHeaderKeyboardEvent;if(!ee(o))return!1;const n=be(this.gos,{colDef:i,column:s,headerRowIndex:t,event:e});return!!o(n)}getWrapperHasFocus(){return Je(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 i=this.getHeaderClassParams();s=t(i)}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:i}=e,{beans:o}=this,n=u=>{if(!this.isAlive()||!i.isAlive())return;const{paddingTop:h,paddingBottom:p,borderBottomWidth:m,borderTopWidth:v}=So(this.eGui),C=h+p+m+v,b=t.offsetHeight+C;if(u<5){const y=!ft(o)?.contains(t),S=b==0;if(y||S){vu(()=>n(u+1),"raf",o);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=si(this.beans,t,()=>n(0))},d=()=>{r=!1,a&&a(),this.comp.toggleCss("ag-header-cell-auto-height",!1),a=void 0};l(),i.addDestroyFunc(()=>d()),i.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),i.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),s&&s(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:s,eGui:i}=this;!e||!t||!i||(SC(e,t,s.visibleCols),mv(i,s.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=ms(this.beans);this.eGui&&Gt(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=Je(this.beans),s=e.key===A.LEFT||e.key===A.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey)return;if((this.isResizing||s)&&(e.preventDefault(),e.stopImmediatePropagation()),(e.ctrlKey||e.metaKey)&&sC(e)===A.C)return this.beans.clipboardSvc?.copyToClipboard();if(!s)return;const n=e.key===A.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const r=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(r,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(n)}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 i=e.key===A.LEFT!==t.get("enableRtl");const o=s.getPinned(),n=t.get("enableRtl");return o&&n!==(o==="right")&&(i=!i),(i?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case A.PAGE_DOWN:case A.PAGE_UP:case A.PAGE_HOME:case A.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=RC,{eGui:s,gos:i}=this;ho(i,s,t,this),e.addDestroyFunc(()=>ho(i,s,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus()):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 i=e??t,{menuSvc:o,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&i.preventDefault(),o?.isHeaderContextMenuEnabled(s)&&o.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}},uF=class extends Kh{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,s,i,o){this.comp=e;const{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:c,colHover:d,rangeSvc:u}=a,h=Ur(this,c,o);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:i,checkMeasuringCallback:m=>this.setRefreshFunction("measuring",m),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)):qe(s,!1),d?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new qh(r,t,a)),h.createManagedBean(new jr(t,{shouldStopEventPropagation:m=>this.shouldStopEventPropagation(m),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(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const p=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:p,columnRowGroupChanged:p,columnPivotChanged:p,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 be(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 QR(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:s,gos:i}=this.beans;return be(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!s&&(!this.openFilterEnabled||Vt(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,ls(n),!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{i.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===A.SPACE?this.selectAllFeature?.onSpaceKeyDown(e):e.key===A.ENTER?this.onEnterKeyDown(e):e.key===A.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){const{column:t,gos:s,sortable:i,beans:o}=this;let n=!1;(e.ctrlKey||e.metaKey)&&(n=this.showMenuOnKeyPress(e,!0)),n||(!e.altKey&&dn(s)?o.rangeSvc?.handleColumnSelection(t,e):i&&o.sortSvc?.progressSort(t,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const s=this.comp.getUserCompInstance();return Xg(s)&&s.onMenuKeyboardShortcut(t)?(e.preventDefault(),!0):!1}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),hC()&&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=yC(t,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(s);for(const o of s)i.has(o)?i.delete(o):this.comp.toggleCss(o,!0);for(const o of i)this.comp.toggleCss(o,!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:i}=this,o=_h(this.beans),n=o.reduce((h,p)=>h+p,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=Uh(i);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=o.length-c;let u=0;for(let h=0;h<d;h++)u+=o[o.length-1-h];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${l+u}px`)}refreshAriaSort(){let e=null;const{beans:t,column:s,comp:i,sortable:o}=this;if(o){const n=this.getLocaleTextFunc(),r=t.sortSvc?.getDisplaySortForColumn(s)??null;i.setAriaSort(WS(r)),e=n("ariaSortableColumn","Press ENTER to sort")}else i.setAriaSort();this.setAriaDescriptionProperty("sort",e)}refreshAriaMenu(){let e=null;this.menuEnabled&&(e=this.getLocaleTextFunc()("ariaMenuColumn","Press ALT DOWN to open column menu")),this.setAriaDescriptionProperty("menu",e)}refreshAriaFilterButton(){let e=null;const{openFilterEnabled:t,gos:s}=this;t&&!Vt(s)&&(e=this.getLocaleTextFunc()("ariaFilterColumn","Press CTRL ENTER to open filter")),this.setAriaDescriptionProperty("filterButton",e)}refreshAriaFiltered(){let e=null;this.column.isFilterActive()&&(e=this.getLocaleTextFunc()("ariaColumnFiltered","Column Filtered")),this.setAriaDescriptionProperty("filter",e)}refreshAriaCellSelection(){let e=null;const{gos:t,column:s}=this;dn(t)&&!It(s)&&(e=this.getLocaleTextFunc()("ariaColumnCellSelection","Press Enter to toggle selection for all visible cells in this column")),this.setAriaDescriptionProperty("cellSelection",e)}setAriaDescriptionProperty(e,t){const s=this.ariaDescriptionProperties;t!=null?s.set(e,t):s.delete(e)}announceAriaDescription(){const{beans:e,eGui:t,ariaDescriptionProperties:s}=this;if(!t.contains(Je(e)))return;const i=Array.from(s.keys()).sort((o,n)=>o==="filter"?-1:n.charCodeAt(0)-o.charCodeAt(0)).map(o=>s.get(o)).join(". ");e.ariaAnnounce?.announceValue(i,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaCellSelection()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=o=>this.handleMouseOverChange(o.type==="mouseenter"),s=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},i=o=>this.handleContextMenuMouseEvent(o,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:s,contextmenu:i})}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 Xg(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Xg(e){return typeof e?.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var hF=0,bd=class extends B{constructor(e,t,s){super(),this.rowIndex=e,this.pinned=t,this.type=s,this.instanceId=hF++,this.comp=null,this.allCtrls=[];let i="ag-header-row-column";s==="group"?i="ag-header-row-group":s==="filter"&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=bt(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=Ur(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:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",s),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=bt(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=_h(this.beans);for(let o=0;o<t.length;o++){if(o===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[o]};e+=t[o]}const s=Uh(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:s};e+=s;const i=bC(this.beans);return{topOffset:e,rowHeight:i}}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 i of t)this.recycleAndCreateHeaderCtrls(i,this.ctrlsById,e);const s=i=>{const{focusSvc:o,visibleCols:n}=this.beans;return o.isHeaderWrapperFocused(i)?n.isVisible(i.column):!1};if(e)for(const[i,o]of e)s(o)?this.ctrlsById.set(i,o):this.destroyBean(o);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,s){if(e.isEmptyGroup())return;const i=e.getUniqueId();let o;if(s&&(o=s.get(i),s.delete(i)),o&&o.column!=e&&(this.destroyBean(o),o=void 0),o==null)switch(this.type){case"filter":{o=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":o=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:o=this.createBean(new uF(e,this));break}t.set(i,o)}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(o=>o.column==e);return s?s.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},pF=class extends B{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:i,colModel:o,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`;i.register(a,this),o.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:i}=this.beans;let o=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=i.headerGroupRowCount;o=u,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const h=this.groupsRowCtrls.length;if(h!==u){if(h>u){for(let p=u;p<h;p++)this.destroyBean(this.groupsRowCtrls[p]);this.groupsRowCtrls.length=u;return}for(let p=h;p<u;p++){const m=this.createBean(new bd(p,this.pinned,"group"));this.groupsRowCtrls.push(m)}}},a=()=>{const u=o++;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 bd(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=o++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new bd(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(i=>i.column===e);if(Fi(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let s=0;s<this.groupsRowCtrls.length;s++){const i=t(this.groupsRowCtrls[s]);if(i)return i}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,s){const o=this.getAllCtrls()[e];return o?o.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 $h(e=>this.comp.setCenterWidth(`${e}px`),!0))}},sl={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},Yh=class extends B{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?sl.AUTO_HEIGHT:t.print?sl.PRINT:sl.NORMAL;this.view.updateLayoutClasses(s,t)}},FC=class extends it{constructor(e,t){super(),this.direction=t,this.eViewport=ue,this.eContainer=ue,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",cC()||so())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=uC(),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(),ii(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;S2(this,()=>xs(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},gF={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"}]},fF=class extends FC{constructor(){super(gF,"horizontal"),this.eLeftSpacer=ue,this.eRightSpacer=ue,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 $h(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,i=this.scrollVisibleSvc.getScrollbarWidth();s&&(t+=i),As(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let o=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(o+=i),As(this.eLeftSpacer,o),this.eLeftSpacer.classList.toggle("ag-scroller-corner",o<=i)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,s=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=s?0:i===0&&t?16:i,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),hr(this.getGui(),n),hr(this.eViewport,n),hr(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 fl(this.eViewport,this.enableRtl)}setScrollPosition(e){xs(this.eViewport)||this.attemptSettingScrollPosition(e),ml(this.eViewport,e,this.enableRtl)}},EC=class extends B{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)}},mF={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"}]}]},vF=class extends FC{constructor(){super(mF,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new EC(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,i=t&&e.getScrollbarWidth()||0,o=i===0&&s?16:i;this.toggleCss("ag-scrollbar-invisible",s),As(this.getGui(),o),As(this.eViewport,o),As(this.eContainer,o),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const s=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),o=s.scrollTop;i!=o&&this.setScrollPosition(o,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!xs(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},di="Viewport",Qg="fakeVScrollComp",xd=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],Jg=100,yd=150,CF=class extends B{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=lt(this,()=>this.lastScrollSource[1]=null,yd),this.resetLastVScrollDebounced=lt(this,()=>this.lastScrollSource[0]=null,yd)}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.fakeVScrollComp=s.fakeVScrollComp,this.fakeHScrollComp=s.fakeHScrollComp,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,di)});for(const e of xd){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.gos.get("debounceVerticalScrollbar"),t=e?lt(this,this.onVScroll.bind(this,di),Jg):this.onVScroll.bind(this,di),s=e?lt(this,this.onVScroll.bind(this,Qg),Jg):this.onVScroll.bind(this,Qg);this.addManagedElementListeners(this.eBodyViewport,{scroll:t}),this.registerScrollPartner(this.fakeVScrollComp,s)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...xd,di]){if(this.lastScrollSource[1]===t)continue;const s=this.getViewportForSource(t);ml(s,e,this.enableRtl)}}getViewportForSource(e){return e===di?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 i=fl(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;const t=e===di?this.eBodyViewport.scrollTop:this.fakeVScrollComp.getScrollPosition();let s=t;if(this.shouldBlockScrollUpdate(0,s,!0))return;e===di?this.fakeVScrollComp.setScrollPosition(s):(this.eBodyViewport.scrollTop=t,s=this.eBodyViewport.scrollTop,this.invalidateVerticalScroll(),s!==t&&this.fakeVScrollComp.setScrollPosition(s,!0));const{animationFrameSvc:i}=this;i?.setScrollTop(s),this.nextScrollTop=s,i?.active?i.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.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"})},yd)}shouldBlockScrollUpdate(e,t,s=!1){return s&&!so()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Sh(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 xd)if(this.getViewportForSource(s).scrollLeft!==e){t=!0;break}t&&this.onHScroll(di)}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 i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:i:e=Math.min(Math.max(e,0),i)),ml(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:i}=this;return{top:i,bottom:i+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.setVerticalScrollPosition(0)}ensureNodeVisible(e,t=null){const{rowModel:s}=this.beans,i=s.getRowCount();let o=-1;for(let n=0;n<i;n++){const r=s.getRow(n);if(typeof e=="function"){if(r&&e(r)){o=n;break}}else if(e===r||e===r.data){o=n;break}}o>=0&&this.ensureIndexVisible(o,t)}ensureIndexVisible(e,t,s=0){if(bt(this.gos,"print"))return;const{rowModel:i}=this.beans,o=i.getRowCount();if(typeof e!="number"||e<0||e>=o){$(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=i.getRow(e);let u,h,p=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:m,stickyBottomHeight:v}=c,C=d.rowTop,w=d.rowHeight,b=r.getPixelOffset(),x=d.rowTop-b,y=x+d.rowHeight,S=this.getVScrollPosition(),E=a.divStretchOffset,F=S.top+E,R=S.bottom+E,D=R-F,T=a.getScrollPositionForPixel(x),P=a.getScrollPositionForPixel(y-D),M=Math.min((T+P)/2,x),N=F+m>x,K=R-v<y;let L=null;t==="top"?L=T-m:t==="bottom"?L=P+v:t==="middle"?L=M:N?L=T-m:K&&(P-T>D?L=T-m:L=P+v),L!==null&&(this.setVerticalScrollPosition(L),l.redraw({afterScroll:!0})),u=C!==d.rowTop||w!==d.rowHeight,h=m!==c.stickyTopHeight||v!==c.stickyBottomHeight,p++}while((u||h)&&p<10);if(this.animationFrameSvc?.flushAllFrames(),s<10&&(d?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const m=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const v=this.getVScrollPosition().top;m!==v&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=i.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:i}=this.beans,o=s.getCol(e);if(!o||o.isPinned()||!this.visibleCols.isColDisplayed(o))return;const n=this.getPositionedHorizontalScroll(o,t);i.wrapIncoming(()=>{n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:s,columnAfterEnd:i}=this.isColumnOutsideViewport(e),o=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?s:i)||o,l=r?i: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:i,colRight:o}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>o:s<o,a=n?s<i:t>i;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,s=this.visibleCols.bodyWidth,i=e.getActualWidth(),o=e.getLeft(),n=t?-1:1,r=t?s-o:o,a=r+i*n,l=r+i/2*n;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),s=t,i=e+t;return{start:s,end:i,width:e}}},ef={horizontal:{overflow:e=>e.scrollWidth-e.clientWidth,scrollSize:e=>e.scrollWidth,clientSize:e=>e.clientWidth,opposite:"vertical"},vertical:{overflow:e=>e.scrollHeight-e.clientHeight,scrollSize:e=>e.scrollHeight,clientSize:e=>e.clientHeight,opposite:"horizontal"}};function wF(e,t,s=Hh()||0,i,o){return DC(e,t,"horizontal",s,i,o)}function bF(e,t,s=Hh()||0,i,o){return DC(e,t,"vertical",s,i,o)}function DC(e,t,s,i,o,n){const r=ef[s],a=ef[r.opposite],l=o?xs(o):!0,c=n?xs(n):!0,d=r.overflow(e);if(d<=0)return!1;if(!t||i===0)return!0;const u=a.overflow(t);if(u<=0)return!0;if(d<=i){if(l&&c&&xF({candidateOverflow:u,candidateScrollSize:a.scrollSize(t),candidateClientSize:a.clientSize(t),scrollbarWidth:i}))return!1;const h=r.clientSize(e)+i;return r.scrollSize(e)<=h}return!0}function xF({candidateOverflow:e,candidateScrollSize:t,candidateClientSize:s,scrollbarWidth:i}){if(e<=0||e>i)return!1;const o=s+i;return t>s&&t<=o}var yF=class extends B{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,i=()=>{ii(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(i),s.registerBodyViewportResizeListener(i)}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=Sh(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{centerContainerCtrl:e,beans:t}=this,s=e.getCenterWidth(),i=e.getViewportScrollLeft();t.colViewport.setScrollPosition(s,i)}};function PC(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function il(e,t,s,i){const o=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return TC(e,t,s,i,o)}function SF(e,t,s,i){const o=t?.suppressMouseEventHandling;return TC(e,void 0,s,i,o)}function TC(e,t,s,i,o){return o?o(be(e,{column:t,node:s,event:i})):!1}function kC(e,t,s){let i=t;for(;i;){const o=jv(e,i,s);if(o)return o;i=i.parentElement}return null}var kl="cellCtrl";function Zh(e,t){return kC(e,t,kl)}var Il="renderedRow";function RF(e,t){return kC(e,t,Il)}function ku(e,t,s,i,o){const n=i?i.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=be(e,{event:t,editing:o,column:i,node:s,data:s.data,colDef:i.getColDef()});return!!(n&&n(r))}function FF(e){const{pinnedRowModel:t,rowModel:s,rangeSvc:i,visibleCols:o}=e;if(!i||o.allCols.length===0)return;const n=t?.isEmpty("top")??!0,r=t?.isEmpty("bottom")??!0,a=n?null:"top";let l,c;r?(l=null,c=s.getRowCount()-1):(l="bottom",c=t?.getPinnedBottomRowCount()??-1),i.setCellRange({rowStartIndex:0,rowStartPinned:a,rowEndIndex:c,rowEndPinned:l})}var EF=class extends B{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(){let e="mousedown";Cl("pointerdown")?e="pointerdown":Cl("touchstart")&&(e="touchstart");const t=["dblclick","contextmenu","mouseover","mouseout","click",e];for(const s of t){const i=this.processMouseEvent.bind(this,s);this.addManagedElementListeners(this.element,{[s]:i})}}processMouseEvent(e,t){if(!kr(this.beans,t)||Zs(t))return;const{cellCtrl:s,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(s?.column&&s.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,i,s)):(s&&s.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:Zh(t,e),rowCtrl:RF(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:s,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(s?this.processCellKeyboardEvent(s,e,t):i?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,s){const i=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!ku(this.gos,s,e.rowNode,e.column,i)&&t==="keydown"&&(!i&&this.beans.navigation?.handlePageScrollingKey(s)||e.onKeyDown(s),this.doGridOperations(s,i),PC(s)&&e.processCharacter(s)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(s,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,s){const{rowNode:i}=e,{focusSvc:o,navigation:n}=this.beans,a=o.getFocusedCell()?.column;if(!ku(this.gos,s,i,a,!1)){const c=s.key;if(t==="keydown")switch(c){case A.PAGE_HOME:case A.PAGE_END:case A.PAGE_UP:case A.PAGE_DOWN:n?.handlePageScrollingKey(s,!0);break;case A.LEFT:case A.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case A.UP:case A.DOWN:e.onKeyboardNavigate(s);break;case A.TAB:e.onTabKeyDown(s);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",s))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!kr(this.beans,e))return;const s=sC(e),{clipboardSvc:i,undoRedo:o}=this.beans;if(s===A.A)return this.onCtrlAndA(e);if(s===A.C)return this.onCtrlAndC(i,e);if(s===A.D)return this.onCtrlAndD(i,e);if(s===A.V)return this.onCtrlAndV(i,e);if(s===A.X)return this.onCtrlAndX(i,e);if(s===A.Y)return this.onCtrlAndY(o);if(s===A.Z)return this.onCtrlAndZ(o,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:s,selectionSvc:i},gos:o}=this;s&&Ri(o)&&!Q2(o)&&t.isRowsToRender()?FF(this.beans):i&&i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:Yv(o)}),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")}},Aa=e=>e.topRowCtrls,La=e=>e.getStickyTopRowCtrls(),Oa=e=>e.getStickyBottomRowCtrls(),Na=e=>e.bottomRowCtrls,Ha=e=>e.allRowCtrls,Sd=e=>e.getCtrls("top"),Rd=e=>e.getCtrls("center"),Fd=e=>e.getCtrls("bottom"),DF={center:{type:"center",name:"center-cols",getRowCtrls:Ha,getSpannedRowCtrls:Rd},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:Ha,getSpannedRowCtrls:Rd},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:Ha,getSpannedRowCtrls:Rd},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:Ha},topCenter:{type:"center",name:"floating-top",getRowCtrls:Aa,getSpannedRowCtrls:Sd},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:Aa,getSpannedRowCtrls:Sd},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:Aa,getSpannedRowCtrls:Sd},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:Aa},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:La},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:La},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:La},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:La},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:Oa},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:Oa},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:Oa},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:Oa},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:Na,getSpannedRowCtrls:Fd},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:Na,getSpannedRowCtrls:Fd},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:Na,getSpannedRowCtrls:Fd},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:Na}};function IC(e){return`ag-${$r(e).name}-viewport`}function MC(e){const t=$r(e);return t.container??`ag-${t.name}-container`}function PF(e){return`ag-${$r(e).name}-spanned-cells-container`}function $r(e){return DF[e]}var TF=["topCenter","topLeft","topRight"],kF=["bottomCenter","bottomLeft","bottomRight"],IF=["center","left","right"],MF=["center","left","right","fullWidth"],AF=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],LF=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],OF=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],AC=["stickyTopCenter","stickyTopLeft","stickyTopRight"],LC=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],NF=[...AC,"stickyTopFullWidth",...LC,"stickyBottomFullWidth"],HF=[...TF,...kF,...IF,...AC,...LC],BF=class extends B{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=$r(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new yF(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,i){this.comp=e,this.eContainer=t,this.eSpannedContainer=s,this.eViewport=i,this.createManagedBean(new EF(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:o,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(LF,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(o?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(OF,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(o?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(MF,()=>this.createManagedBean(new EC(this.eContainer,this.name==="center"?i:void 0))),n&&this.forContainers(HF,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(AF,()=>this.createManagedBean(new $h(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:i=>this.onDisplayedRowsChanged(i.afterScroll)}),s(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const i=this.options.getSpannedRowCtrls(e);i&&this.comp.setSpannedRowCtrls(i,!1)}})}listenOnDomOrder(){if(NF.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const s=this.gos.get("ensureDomOrder"),i=bt(this.gos,"print");this.comp.setDomOrder(s||i)};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 Pr(this.eViewport)}getCenterViewportScrollLeft(){return fl(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=si(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return xv(this.eViewport)}getViewportScrollLeft(){return fl(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){const{beans:e,gos:t,eViewport:s}=this,i=t.get("alwaysShowHorizontalScroll"),{ctrlsSvc:o}=e,n=o.getGridBodyCtrl()?.eBodyViewport,r=o.get("fakeHScrollComp")?.getGui(),a=o.get("fakeVScrollComp")?.getGui();return i||wF(s,n,void 0,r,a)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){ml(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=bt(this.gos,"print"),o=this.gos.get("embedFullWidthRows")||s,n=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!o&&a:o||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},GF="ag-force-vertical-scroll",VF="ag-selectable",zF="ag-column-moving",WF=class extends B{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,i,o,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=s,this.eTop=i,this.eBottom=o,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=s.querySelector(`.${IC("center")}`),this.eFullWidthContainer=s.querySelector(`.${MC("fullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new Yh(this.comp)),this.scrollFeature=this.createManagedBean(new CF(s)),this.beans.rowDragSvc?.setupRowDrag(s,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,s,o,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(i),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,i=uC()?16:0,o=`calc(100% + ${s+i}px)`;ii(this.beans,()=>this.comp.setBodyViewportWidth(o)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t,gos:s}=this;let i=s.get("treeData");if(!i){const o=t.isPivotMode();i=(e?e.columns.length:0)>=(o?2:1)}this.comp.setGridRootRole(i?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:s=>{const{target:i}=s,o=Qi(i,"ag-root",t);t.classList.toggle("ag-has-focus",!o)},focusout:s=>{const{target:i,relatedTarget:o}=s,n=t.contains(o),r=Qi(o,"ag-root",t);Qi(i,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(zF,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(VF,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,i=s===-1?-1:e+s;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const{gos:e,comp:t,ctrlsSvc:s}=this,i=e.get("alwaysShowVerticalScroll"),o=i?GF:null,n=bt(e,"normal");t.setAlwaysVerticalScrollClass(o,i);const r=s.get("center")?.eViewport,a=s.get("fakeHScrollComp")?.getGui(),l=s.get("fakeVScrollComp")?.getGui();return i||n&&bF(this.eBodyViewport,r,void 0,l,a)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let s=t.sizesMeasured;const i=()=>{const o=s&&ln(this.gos)&&!e.stretching,n=o?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,o)};i(),this.addManagedEventListeners({heightScaleChanged:i}),this.addManagedPropertyListener("animateRows",i),this.addManagedEventListeners({stylesChanged:()=>{!s&&t.sizesMeasured&&(s=!0,i())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:s,eTop:i,eBottom:o,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,i,o])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:i}=e;(i||Math.abs(t)>Math.abs(s))&&kr(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:i}=e;(i||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:i}=e||t;(i===this.eBodyViewport||i===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(),i=e?.getPinnedBottomTotalHeight(),o=t.getPinnedRowBorderWidth(),n=t.getRowBorderWidth(),r=o-n,a=s?r+s:0,l=i?r+i: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 i=0;t>0&&(i+=t),s>0&&(i+=s),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:s}=this,i=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=i+n;s.setStickyBottomBottom(`${r}px`)}};function Jt(e){return co(e)}var pn={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},OC=class extends Ot{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:s,eTopGuard:i,eBottomGuard:o,focusTrapActive:n,forceFocusOutWhenTabGuardsAreEmpty:r,isFocusableContainer:a,focusInnerElement:l,onFocusIn:c,onFocusOut:d,shouldStopEventPropagation:u,onTabKeyDown:h,handleKeyDown:p,isEmpty:m,eFocusableElement:v}=e;this.comp=s,this.eTopGuard=i,this.eBottomGuard=o,this.providedFocusInnerElement=l,this.eFocusableElement=v,this.focusTrapActive=!!n,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.isFocusableContainer=!!a,this.providedFocusIn=c,this.providedFocusOut=d,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=h,this.providedHandleKeyDown=p,this.providedIsEmpty=m}postConstruct(){this.createManagedBean(new gC(this.eFocusableElement,this.stopPropagationCallbacks,{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():io(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=ft(this.beans),s=io(t.body,null,!0),i=s.indexOf(e?this.eTopGuard:this.eBottomGuard);if(i===-1)return;let o,n;e?(o=0,n=i):(o=i+1,n=s.length);const r=s.slice(o,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=io(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return Fo(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}},jF=class extends Ot{constructor(e,t){super(),this.comp=e,this.stopPropagationCallbacks=t}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:s,eFocusableElement:i,stopPropagationCallbacks:o}=this,n=[t,s],r={setTabIndex:w=>{for(const b of n)w==null?b.removeAttribute("tabindex"):b.setAttribute("tabindex",w)}};this.addTabGuards(t,s);const{focusTrapActive:a=!1,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:p,isEmpty:m,forceFocusOutWhenTabGuardsAreEmpty:v,isFocusableContainer:C}=e;this.tabGuardCtrl=this.createManagedBean(new OC({comp:r,focusTrapActive:a,eTopGuard:t,eBottomGuard:s,eFocusableElement:i,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:p,isEmpty:m,forceFocusOutWhenTabGuardsAreEmpty:v,isFocusableContainer:C},o))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=ft(this.beans).createElement("div"),s=e==="top"?pn.TAB_GUARD_TOP:pn.TAB_GUARD_BOTTOM;return t.classList.add(pn.TAB_GUARD,s),lo(t,"presentation"),t}addTabGuards(e,t){const s=this.eFocusableElement;s.prepend(e),s.append(t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];jt(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,s){Eh(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.before(t):e(t,s)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;Qs(e),Qs(t),super.destroy()}},_F=class extends In{initialiseTabGuard(e,t){this.tabGuardFeature=this.createManagedBean(new jF(this,t)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},UF=class extends _F{initialiseTabGuard(t){super.initialiseTabGuard(t,Bh)}},tf=(e,t)=>wC(e,()=>po(e.getGui(),t,!1,!0)),sf=e=>e?.getFocusableContainerName()??"external",$F=e=>e==null?"external":typeof e=="string"?e:"gridBody",qF=class extends B{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:i,ctrlsSvc:o}=this.beans;i?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new Yh(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=si(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),o.register("gridCtrl",this)}isDetailGrid(){return pC(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;e===!1?t.setCursor(null):t.setCursor(e===1?"ew-resize":"ns-resize")}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:s,nextIndex:i}=this.getNextFocusableIndex(t,e),o=s===-1?e?t.length-1:0:i,{gos:n,beans:{focusSvc:r,navigation:a}}=this,l=n.getCallback("tabToNextGridContainer");if(l){const c=r.getDefaultTabToNextGridContainerTarget({backwards:e,focusableContainers:t,nextIndex:o}),d=sf(t[o]),u=c==null&&d==="gridBody"?"gridBody":$F(c),h=l({backwards:e,previousContainer:sf(t[s]),nextContainer:u,defaultTarget:c});if(h!==void 0){if(typeof h=="boolean")return h;if(typeof h=="string"){if(h==="gridBody")return this.focusGridBodyDefault(e)||void 0;const p=t.find(m=>m.getFocusableContainerName()===h);if(!p){kv(`tabToNextGridContainer - ${h} container not found`);return}return tf(p,e)?!0:void 0}return oF(h)?r.focusHeaderPosition({headerPosition:h})||void 0:(a?.ensureCellVisible(h),r.setFocusedCell({...h,forceBrowserFocus:!0}),r.isCellFocused(h)||void 0)}}return this.focusNextInnerContainerDefault({backwards:e,focusableContainers:t,indexWithFocus:s,nextIndex:o})||void 0}focusInnerElement(e){const{gos:t,beans:s,beans:{focusSvc:i,visibleCols:o}}=this;if(t.getCallback("focusGridInnerElement")?.({fromBottom:!!e}))return!0;const r=this.getFocusableContainers();if(e)return this.focusNextInnerContainerDefault({backwards:!0,focusableContainers:r,indexWithFocus:r.length,nextIndex:r.length-1})?!0:i.focusGridView({column:Ue(o.allCols),backwards:!0});const a=o.allCols;if(t.get("headerHeight")===0||ms(s)){if(i.focusGridView({column:a[0],backwards:e}))return!0;for(let l=1;l<r.length;l++)if(po(r[l].getGui(),e))return!0;return!1}return i.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}isFocusInsideGridBody(){const e=this.getFocusableContainers(),{indexWithFocus:t}=this.getNextFocusableIndex(e);return e[t]?.getFocusableContainerName()==="gridBody"}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{indexWithFocus:s,nextIndex:i}=this.getNextFocusableIndex(t,e);this.focusNextInnerContainerDefault({backwards:!!e,focusableContainers:t,indexWithFocus:s,nextIndex:i})||this.forceFocusOutOfContainer(e)}isFocusable(){const e=this.beans;return!Lr(e)||!ms(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const s=Je(this.beans),i=e.findIndex(o=>o.getGui().contains(s));return{indexWithFocus:i,nextIndex:i+(t?-1:1)}}focusGridBodyDefault(e){const{gos:t,beans:s,beans:{focusSvc:i,visibleCols:{allCols:o}}}=this;return e?i.focusGridView({column:Ue(o),backwards:!0}):t.get("headerHeight")===0||ms(s)?i.focusGridView({column:o[0]}):i.focusFirstHeader()}focusNextInnerContainerDefault(e){const{backwards:t,focusableContainers:s,indexWithFocus:i}=e,o=t?-1:1;for(let n=e.nextIndex;n>=0&&n<s.length;n+=o){const r=s[n];if(r.getFocusableContainerName()==="gridBody"&&(i===-1||(t?i>n:i<n))){if(this.focusGridBodyDefault(t))return!0;continue}if(tf(r,t))return!0}return!1}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},ye=(e,t)=>{for(const s of Object.keys(t))t[s]=e;return t},of={dispatchEvent:"CommunityCore",...ye("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...ye("GridState",{getState:0,setState:0}),...ye("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...ye("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...ye("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...ye("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...ye("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...ye("ValueCache",{expireValueCache:0}),...ye("CellApi",{getCellValue:0}),...ye("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...ye("Sort",{onSortChanged:0}),...ye("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...ye("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...ye("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...ye("HighlightChanges",{flashCells:0}),...ye("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...ye("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}),...ye("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...ye("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...ye("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...ye("ColumnResize",{setColumnWidths:0}),...ye("ColumnHover",{isColumnHovered:0}),...ye("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...ye("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...ye("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...ye("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...ye("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...ye("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...ye("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...ye("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...ye("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,resetRowGroupExpansion:0}),...ye("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...ye("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}),...ye("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...ye("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...ye("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...ye("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...ye("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...ye("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...ye("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...ye("ContextMenu",{showContextMenu:0}),...ye("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...ye("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...ye("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...ye("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...ye("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}),...ye("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...ye("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...ye("StatusBar",{getStatusPanel:0}),...ye("AiToolkit",{getStructuredSchema:0})},Ed={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},KF=(e,t)=>e.eventSvc.dispatchEvent(t),NC=class{};Reflect.defineProperty(NC,"name",{value:"GridApi"});var YF=class extends B{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new NC,this.fns={...Ed,dispatchEvent:KF},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(of))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:i}=this;s!==Ed&&(s[e]=i?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:s,fns:{[e]:i}}=this;return i?i(s,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:s,preDestroyLink:i}=this;if(!t)$(26,{fnName:e,preDestroyLink:i});else{const o=of[e];s.assertModuleRegistered(o,`api.${e}`)&&$(27,{fnName:e,module:o})}}destroy(){super.destroy(),this.fns=Ed,this.beans=null}};function HC(e){return e.context.getId()}function ZF(e){e.gridDestroySvc.destroy()}function XF(e){return e.gridDestroySvc.destroyCalled}function QF(e,t){return e.gos.get(t)}function JF(e,t,s){BC(e,{[t]:s})}function BC(e,t){e.gos.updateGridOptions({options:t})}function eE(e,t){const s=t.replace(/Module$/,"");return e.gos.isModuleRegistered(s)}function tE(e,t,s){const i=zt(e,t,s);if(i){const{className:n}=i;if(typeof n=="string"&&n.includes("ag-icon")||typeof n=="object"&&n["ag-icon"])return i}const o=Jt({tag:"span"});return o.appendChild(i),o}function zt(e,t,s){let i=null;e==="smallDown"?$(262):e==="smallLeft"?$(263):e==="smallRight"&&$(264);const o=s?.getColDef().icons;if(o&&(i=o[e]),t.gos&&!i){const n=t.gos.get("icons");n&&(i=n[e])}if(i){let n;if(typeof i=="function")n=i();else if(typeof i=="string")n=i;else{$(38,{iconName:e});return}if(typeof n=="string")return Rh(n);if(Eh(n))return n;$(133,{iconName:e});return}else{const n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),Jt({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var sE={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},iE=class extends it{constructor(e,t,s){super(sE),this.rowNode=e,this.column=t,this.eCell=s}postConstruct(){this.getGui().appendChild(zt("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:i,gos:o}=this,n=s.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(i,0,0),n){const a=be(o,{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)}},oE=".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)}",nE={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"}]}]},rE=class extends it{constructor(){super(),this.dragSource=null,this.eIcon=ue,this.eLabel=ue,this.eGhost=ue,this.registerCSS(oE)}postConstruct(){const e=t=>tE(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(nE),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:s,eIcon:i,dragSource:o,dropIconMap:n,gos:r}=this;jt(i);let a=null;e||(e=o?.getDefaultIconName?o.getDefaultIconName():"notAllowed"),a=n[e],s.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),i.classList.toggle("ag-shake-left-to-right",t),!(a===n.hide&&r.get("suppressDragLeaveHidesColumns"))&&a&&i.appendChild(a)}setLabel(e){this.eLabel.textContent=e}};function aE(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function lE(e,t){const s=e.dragAndDrop?.findExternalZone(t.getContainer());s&&e.dragAndDrop?.removeDropTarget(s)}function cE(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}function dE(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function uE(e,t){const s=e.rowDropHighlightSvc;if(!s)return;const i=t?.row;let o=t?.dropIndicatorPosition;o!=="above"&&o!=="below"&&o!=="inside"&&(o="none");const n=i?.rowIndex;n==null||o==="none"?s.clear():s.set(i,o)}var GC=(e,t)=>{if(t!=null&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},hE=(e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const s=t.pointerId;if(!GC(e,s))return null;const i={eElement:e,pointerId:s,onLost(o){gE(i,o)}};return e.addEventListener("lostpointercapture",i.onLost),i},pE=e=>{if(!e)return;VC(e);const{eElement:t,pointerId:s}=e;if(t){try{t.releasePointerCapture(s)}catch{}e.eElement=null}},VC=e=>{const{eElement:t,onLost:s}=e;t&&s&&(t.removeEventListener("lostpointercapture",s),e.onLost=null)},gE=(e,t)=>{VC(e);const{eElement:s,pointerId:i}=e;s&&t.pointerId===i&&GC(s,i)},$o,en,Dd={passive:!0},ui={passive:!1},Fs=e=>{if(!en)en=new WeakSet;else if(en.has(e))return!1;return en.add(e),!0},fE=class extends Ot{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!$o?.has(fs(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)nf(t);e.length=0,super.destroy()}removeDragSource(e){const t=this.dragSources;for(let s=0,i=t.length;s<i;++s){const o=t[s];if(o.params===e){t.splice(s,1),nf(o);break}}}addDragSource(e){if(!this.isAlive())return;const{eElement:t,includeTouch:s}=e,i=[];let o;if(s){const c=t.style;c&&(o=c.touchAction,c.touchAction="none")}const n={handlers:i,params:e,oldTouchAction:o};this.dragSources.push(n),Ya(i,[t,"pointerdown",c=>this.onPointerDown(e,c),ui],[t,"mousedown",c=>this.onMouseDown(e,c)]);const l=this.gos.get("suppressTouch");s&&!l&&Ya(i,[t,"touchstart",d=>this.onTouchStart(e,d),ui])}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&&kr(this.beans,e)&&!ur(Td(e))}initDrag(e,...t){this.drag=e;const s=this.beans,i=a=>this.onScroll(a),o=a=>this.onKeyDown(a),n=fs(s),r=ft(s);Ya(e.handlers,[n,"contextmenu",mi],[n,"keydown",o],[r,"scroll",i,{capture:!0}],[r.defaultView||window,"scroll",i],...t)}destroyDrag(){this.dragging=!1;const e=this.drag;if(e){const t=e.rootEl;$o?.get(t)===e&&$o.delete(t),this.drag=null,pE(e.pointerCapture),Dh(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const s=this.beans;if(en?.has(t))return;const i=t.pointerType;if(i==="touch"&&(s.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),ur(Td(t))))||!t.isPrimary||i==="mouse"&&t.button!==0)return;this.destroyDrag();const o=fs(s),n=e.eElement,r=t.pointerId,a=new Pd(o,e,t,r);$o??($o=new WeakMap),$o.set(o,a);const l=h=>{h.pointerId===r&&this.onMouseOrPointerMove(h)},c=h=>{h.pointerId===r&&this.onMouseOrPointerUp(h)},d=h=>{h.pointerId===r&&Fs(h)&&this.cancelDrag()},u=h=>this.draggingPreventDefault(h);this.initDrag(a,[o,"pointerup",c],[o,"pointercancel",d],[o,"pointermove",l,ui],[o,"touchmove",u,ui],[n,"mousemove",u,ui]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Fs(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!Fs(t)||ur(Td(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){this.dragging&&mi(t);return}this.destroyDrag();const i=this.beans,o=fs(i),n=new Pd(o,e,t.touches[0]),r=h=>this.onTouchMove(h),a=h=>this.onTouchUp(h),l=h=>this.onTouchCancel(h),c=h=>this.draggingPreventDefault(h),d=fs(i),u=t.target??e.eElement;this.initDrag(n,[u,"touchmove",r,Dd],[u,"touchend",a,Dd],[u,"touchcancel",l,Dd],[d,"touchmove",c,ui],[d,"touchend",a,ui],[d,"touchcancel",l,ui]),e.dragStartPixels===0&&this.onMove(n.start)}draggingPreventDefault(e){this.dragging&&mi(e)}onMouseDown(e,t){if(t.button!==0||en?.has(t)||this.isPointer())return;const s=this.beans;this.destroyDrag();const i=new Pd(fs(s),e,t),o=a=>this.onMouseOrPointerMove(a),n=a=>this.onMouseOrPointerUp(a),r=fs(s);this.initDrag(i,[r,"mousemove",o],[r,"mouseup",n]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Fs(t)}onScroll(e){if(!Fs(e))return;const t=this.drag,s=t?.lastDrag;s&&this.dragging&&t.params?.onDragging?.(s)}onMouseOrPointerMove(e){Fs(e)&&(Ai()&&ft(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&mi(e),this.onMove(e))}onTouchCancel(e){const t=this.drag;!t||!Fs(e)||nn(t.start,e.changedTouches)&&this.cancelDrag()}onTouchMove(e){const t=this.drag;if(!t||!Fs(e))return;const s=nn(t.start,e.touches);s&&(this.onMove(s),this.draggingPreventDefault(e))}onMove(e){const t=this.drag;if(!t)return;t.lastDrag=e;const s=t.params;if(!this.dragging){const i=t.start,n=s.dragStartPixels??4;if(Rv(e,i,n)||(this.dragging=!0,s.capturePointer&&(t.pointerCapture=hE(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:s.eElement}),s.onDragStart?.(i),this.drag!==t)||(s.onDragging?.(i),this.drag!==t))return}s.onDragging?.(e)}onTouchUp(e){const t=this.drag;t&&Fs(e)&&this.onUp(nn(t.start,e.changedTouches))}onMouseOrPointerUp(e){Fs(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===A.ESCAPE&&this.cancelDrag()}},nf=e=>{Dh(e.handlers);const t=e.oldTouchAction;if(t!=null){const s=e.params.eElement.style;s&&(s.touchAction=t)}},Pd=class{constructor(e,t,s,i=null){this.rootEl=e,this.params=t,this.start=s,this.pointerId=i,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},Td=e=>{const t=e.target;return t instanceof Element?t:null},mE=class extends fE{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},vE=class extends B{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)}},CE={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},Ba={skipAriaHidden:!0},wE=class extends it{constructor(e,t,s,i,o,n=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=s,this.customGui=i,this.dragStartPixels=o,this.alwaysVisible=n,this.dragSource=null,this.disabled=!1}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(CE),this.getGui().appendChild(zt("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,rowNode:t}=this,s=this.refreshVisibility.bind(this);this.addManagedListeners(e.eventSvc,{rowDragVisibilityChanged:s}),this.addManagedListeners(t,{dataChanged:s,cellChanged:s}),this.refreshVisibility()}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const{beans:e,column:t,rowNode:s}=this,{gos:i,dragAndDrop:o,rowDragSvc:n}=e,r=n?.visibility;let l=!(r==="suppress"||r==="hidden"&&!o?.hasExternalDropZones()),c=l;if(l&&!this.isCustomGui()&&t){const d=t.getColDef().rowDrag;if(d===!1)l=!1;else{const u=typeof d=="function";c=t.isRowDrag(s),l=u||c}}l&&c&&s.footer&&i.get("rowDragManaged")&&(c=!1,l=!0),c&&(c=l),l||this.setDisplayed(l,Ba),c||this.setVisible(c,Ba),this.setDisabled(!c||r==="disabled"&&!o?.hasExternalDropZones()),l&&this.setDisplayed(l,Ba),c&&this.setVisible(c,Ba)}setDisabled(e){e!==this.disabled&&(this.disabled=e,this.getGui()?.classList?.toggle("ag-drag-handle-disabled",e))}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()}}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();if(this.gos.get("enableCellTextSelection")){this.removeMouseDownListener();const i=Cl("pointerdown")?{pointerdown:mi}:{mousedown:mi};this.mouseDownListener=this.addManagedElementListeners(t,i)[0]}const s=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:i=>this.getDragItemName(i,s),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){const s=e?.dragItem||this.getDragItem(),i=(e?.dropTarget?.rows.length??s.rowNodes?.length)||1,o=this.column?.getColDef()?.rowDragText??this.gos.get("rowDragText");if(o)return o(s,i);if(i!==1)return`${i} ${t("rowDragRows","rows")}`;const n=this.cellValueFn();return n||`1 ${t("rowDragRow","rows")}`}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)}},bE=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??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=!this.scrollVertically||t||this.shouldSkipVerticalScroll(),i=!this.scrollHorizontally||this.shouldSkipHorizontalScroll();if(s&&i)return;const o=this.scrollContainer.getBoundingClientRect(),n=this.scrollByTick;this.tickLeft=!i&&e.clientX<o.left+n,this.tickRight=!i&&e.clientX>o.right-n,this.tickUp=!s&&e.clientY<o.top+n,this.tickDown=!s&&e.clientY>o.bottom-n,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)}},ol=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},Ml=e=>{let t=e.childrenAfterGroup;for(;t?.length;){const s=t[0];if(s.sourceRowIndex>=0)return s;t=s.childrenAfterGroup}},xE=(e,t,s,i)=>{if(!t.size||!e)return!1;let o=!1;const n=e.length??0;let r=-1;s&&(r=s.sourceRowIndex,s=r<0?Ml(s):null,s&&(r=s.sourceRowIndex)),r<0||r>=n?r=n:i||++r;let a=r,l=Math.min(r,n-1);for(const u of t){const h=u.sourceRowIndex;h<a&&(a=h),h>l&&(l=h)}let c=a;for(let u=a;u<r;++u){const h=e[u];t.has(h)||(h.sourceRowIndex!==c&&(h.sourceRowIndex=c,e[c]=h,o=!0),++c)}let d=l;for(let u=l;u>=r;--u){const h=e[u];t.has(h)||(h.sourceRowIndex!==d&&(h.sourceRowIndex=d,e[d]=h,o=!0),--d)}for(const u of t)u.sourceRowIndex!==c&&(u.sourceRowIndex=c,e[c]=u,o=!0),++c;return o};function yE(e,t){return Zh(e,t.target)?.getFocusedCellPosition()??null}function rf(e,t){const s=bt(e.gos,"normal"),i=t;let o,n;i.clientX!=null||i.clientY!=null?(o=i.clientX,n=i.clientY):(o=i.x,n=i.y);const{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(n+=r,s){const a=e.ctrlsSvc.getScrollFeature(),l=a.getVScrollPosition(),c=a.getHScrollPosition();o+=c.left,n+=l.top}return{x:o,y:n}}var SE=.25,RE=class extends B{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{const s=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,i=new bE({scrollContainer:t.gridBodyCtrl.eBodyViewport,scrollAxis:"y",getVerticalPosition:s,setVerticalPosition:o=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(o),onScrollCallback:()=>{const o=s();if(this.autoScrollOldV!==o){this.autoScrollOldV=o,this.autoScrollChanging=!0;return}const n=this.autoScrollChanging;this.autoScrollChanged=n,this.autoScrollChanging=!1,n&&(e.dragAndDrop?.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=i,this.clearAutoScroll()})}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){return e?.dropTarget?.allowed===!1||this.beans.rowDragSvc.visibility!=="visible"?"notAllowed":"move"}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(FE)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:s,beans:i}=this;if(t){const a=this.getRowNodes(e);e.dragItem.rowNodes=a,lf(a,!0)}this.lastDraggingEvent=e;const o=e.fromNudge,n=this.makeRowsDrop(s,e,o,!1);i.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e);const r=this.autoScroll;n?.rowDragManaged&&n.moved&&n.allowed&&n.sameGrid&&!n.suppressMoveWhenRowDragging&&(!o&&!r?.scrolling||this.autoScrollChanged)&&this.dropRows(n),r?.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,s,i){const{beans:o,gos:n}=this,r=this.newRowsDrop(t,i),a=o.rowModel;if(t.dropTarget=r,t.changed=!1,!r)return null;let{sameGrid:l,rootNode:c,source:d,target:u}=r;u??(u=a.getRow(a.getRowCount()-1)??null);const h=this.beans.groupEditSvc,p=!!h?.canSetParent(r);let m=null;if(u?.footer){const C=Du(a,-1,u)??Du(a,1,u);p&&(m=u.sibling??c),u=C??null}u?.detail&&(u=u.parent),r.moved&&(r.moved=d!==u);let v=.5;if(u&&(l&&r.moved&&(m||!p)?v=d.rowIndex>u.rowIndex?-.5:.5:v=(r.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!p&&l&&u&&r.moved&&st(n)){const C=EE(a,r);C&&(v=d.rowIndex>C.rowIndex?-.5:.5,u=C,r.moved&&(r.moved=d!==u))}return r.target=u,r.newParent=m,r.pointerPos=DE(u,r.y),r.yDelta=v,h?.fixRowsDrop(r,p,s,v),this.validateRowsDrop(r,p,i),t.changed||(t.changed=af(e?.dropTarget,r)),r}newRowsDrop(e,t){const{beans:s,gos:i}=this,o=s.rowModel.rootNode,n=st(i)?i.get("rowDragManaged"):!1,r=i.get("suppressMoveWhenRowDragging"),a=this.isFromThisGrid(e);let{rowNode:l,rowNodes:c}=e.dragItem;if(c||(c=l?[l]:[]),l||(l=c[0]),!l||!o)return null;const d=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;n&&(!c.length||s.rowDragSvc.visibility!=="visible"||(r||!a)&&!d)&&(u=!1);const h=rf(s,e).y,p=this.getOverNode(h);return{api:s.gridApi,context:s.gridOptions.context,draggingEvent:e,rowDragManaged:n,suppressMoveWhenRowDragging:r,sameGrid:a,withinGrid:d,treeData:!1,rootNode:o,moved:l!==p,y:h,overNode:p,overIndex:p?.rowIndex??-1,pointerPos:"none",position:"none",source:l,target:p??null,newParent:null,rows:c,allowed:u,highlight:!t&&n&&r&&(d||!a),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,s){const{source:i,target:o,yDelta:n,inside:r,moved:a,rowDragManaged:l,suppressMoveWhenRowDragging:c}=e;e.moved&&(e.moved=i!==o);const{position:d,fallbackPosition:u}=this.computeDropPosition(a,r,n);e.position=d,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,c,"initial");const h=(!l||e.allowed)&&this.gos.get("isRowValidDropPosition");h&&this.applyDropValidator(e,t,s,l,h),l&&(e.rows=this.filterRows(e)),this.beans.groupEditSvc?.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,c,"final"),e.position==="inside"&&(!e.allowed||!e.newParent)&&(e.position=u)}computeDropPosition(e,t,s){const i=s<0?"above":"below";return e?{position:t?"inside":i,fallbackPosition:i}:{position:"none",fallbackPosition:i}}enforceSuppressMoveWhenRowDragging(e,t,s){if(t){if(s==="initial"){e.moved||(e.allowed=!1);return}(!e.rows.length||e.position==="none")&&(e.allowed=!1)}}applyDropValidator(e,t,s,i,o){this.beans.groupEditSvc?.clearNewSameParent(e,t);const n=o(e);if(!n){e.allowed=!1;return}if(typeof n!="object")return;n.rows!==void 0&&(e.rows=n.rows??[]),t&&n.newParent!==void 0&&(e.newParent=n.newParent),n.target!==void 0&&(e.target=n.target),n.position&&(e.position=n.position),n.allowed!==void 0?e.allowed=n.allowed:i||(e.allowed=!0);const r=e.draggingEvent;n.changed&&r&&(r.changed=!0),!s&&n.highlight!==void 0&&(e.highlight=n.highlight)}addRowDropZone(e){if(!e.getContainer()){$(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){$(56);return}const s=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(o=>e.onDragEnter(this.rowDragEvent("rowDragEnter",o))),onDragLeave:e.onDragLeave&&(o=>e.onDragLeave(this.rowDragEvent("rowDragLeave",o))),onDragging:e.onDragging&&(o=>e.onDragging(this.rowDragEvent("rowDragMove",o))),onDragStop:e.onDragStop&&(o=>e.onDragStop(this.rowDragEvent("rowDragEnd",o))),onDragCancel:e.onDragCancel&&(o=>e.onDragCancel(this.rowDragEvent("rowDragCancel",o)))},i={isInterestedIn:o=>o===2,getIconName:()=>"move",external:!0,...s};t.addDropTarget(i),this.addDestroyFunc(()=>t.removeDropTarget(i))}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,o=e>t.getCurrentPagePixelRange().pageLastPixel?-1:s.getRowIndexAtPixel(e);return o>=0?s.getRow(o):void 0}rowDragEvent(e,t){const s=this.beans,{dragItem:i,dropTarget:o,event:n,vDirection:r}=t,a=o?.rootNode===s.rowModel.rootNode,l=a?o.y:rf(s,t).y,c=a?o.overNode:this.getOverNode(l),d=a?o.overIndex:c?.rowIndex??-1;return{api:s.gridApi,context:s.gridOptions.context,type:e,event:n,node:i.rowNode,nodes:i.rowNodes,overIndex:d,overNode:c,y:l,vDirection:r,rowsDrop:o}}dispatchGridEvent(e,t){const s=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(s)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e,!1)}onDragStop(e){const t=this.lastDraggingEvent?.dropTarget??null,s=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),s?.allowed&&s.rowDragManaged&&(!t?.droppedManaged||af(t,s))&&this.dropRows(s),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e,!0)}stopDragging(e,t){this.clearAutoScroll(),this.beans.groupEditSvc?.stopDragging(t),this.beans.rowDropHighlightSvc?.fromDrag(null),lf(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){this.autoScroll?.ensureCleared(),this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}dropRows(e){return e.droppedManaged=!0,e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:s}){const i=wn(this.gos),o=this.beans.rowModel,n=s.filter(({data:a,rowPinned:l})=>!o.getRowNode(i?.({data:a,level:0,rowPinned:l})??a.id)).map(({data:a})=>a);if(n.length===0)return!1;let r;if(t){const a=t.sourceRowIndex>=0?t:Ml(t);a&&(r=a.sourceRowIndex+(e==="above"?0:1))}return o.updateRowData({add:n,addIndex:r}),!0}filterRows(e){const{groupEditSvc:t}=this.beans,{rows:s,sameGrid:i}=e;let o;for(let n=0,r=s.length;n<r;++n){let a=!0;const l=s[n];(!l||l.footer||i&&l.destroyed&&!l.group||!this.csrmGetLeaf(l))&&(a=!1),a&&t&&!t.canDropRow(l,e)&&(a=!1),a?o?.push(l):o??(o=s.slice(0,n))}return o??s}csrmMoveRows(e){const t=this.beans.groupEditSvc;return t?.isGroupingDrop(e)?t.dropGroupEdit(e):this.csrmMoveRowsReorder(e)}csrmMoveRowsReorder({position:e,target:t,rows:s,newParent:i,rootNode:o}){let n=!1;const r=new Set;for(const h of s){i&&h.parent!==i&&(h.treeParent=i,n=!0);const p=this.csrmGetLeaf(h);p&&r.add(p)}if(!n&&r.size===0)return!1;const a=this.beans.focusSvc,l=a.getFocusedCell(),c=l&&Jo(this.beans,l);if(r.size&&xE(o._leafs,r,t,e==="above")&&(n=!0),!n)return!1;const d=this.beans.rowModel,u=new ol;return u.reordered=!0,d.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:u}),c?c.focusCell():a.clearFocusedCell(),!0}csrmGetLeaf(e){if(e.sourceRowIndex>=0)return e.destroyed?void 0:e;const t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):Ml(e)}},af=(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||!Ii(e.rows,t.rows)),FE=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,lf=(e,t)=>{for(let s=0,i=e?.length||0;s<i;++s){const o=e[s];o.dragging!==t&&(o.dragging=t,o.dispatchRowEvent("draggingChanged"))}},EE=(e,t)=>{let s=null,i=t.target;if(i&&t.rows.indexOf(i)<0)return null;const o=t.source;if(!i||!o)return null;let n=i.rowIndex-o.rowIndex;const r=n<0?-1:1;n=t.suppressMoveWhenRowDragging?Math.abs(n):1;const a=new Set(t.rows);do{const l=Du(e,r,i);if(!l)break;a.has(l)||(s=l,--n),i=l}while(n>0);return s},DE=(e,t)=>{const s=e?.rowTop,i=e?.rowHeight??0;if(s==null||!i||i<=0)return"none";const o=t-s,n=i*SE;return o<=n?"above":o>=i-n?"below":"inside"},PE=class extends B{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){const s=t.createManagedBean(new RE(e)),i=this.beans.dragAndDrop;i.addDropTarget(s),t.addDestroyFunc(()=>i.removeDropTarget(s)),this.rowDragFeature=s;const o=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],o),this.addManagedEventListeners({newColumnsLoaded:o,columnRowGroupChanged:o,columnPivotModeChanged:o,sortChanged:o,filterChanged:o}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,s,i,o,n){return new wE(e,t,s,i,o,n)}createRowDragCompForRow(e,t){if(Ri(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,i,o,n){const r=this.gos;return r.get("rowDragManaged")&&(!st(r)||r.get("pagination"))?void 0:this.createRowDragComp(s,e,t,i,o,n)}cancelRowDrag(){this.rowDragFeature?.lastDraggingEvent&&this.beans.dragSvc?.cancelDrag()}computeVisibility(){const e=this.beans,t=e.gos;if(t.get("suppressRowDrag"))return"suppress";if(!t.get("rowDragManaged"))return"visible";const i=e.colModel.isPivotMode();return(i||e.rowGroupColsSvc?.columns?.length)&&!t.get("refreshAfterGroupEdit")?"hidden":i||e.filterManager?.isAnyFilterPresent()||e.sortSvc?.isSortActive()?"disabled":"visible"}refreshVisibility(){const e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,this.eventSvc?.dispatchEvent({type:"rowDragVisibilityChanged"}))}},TE=class extends B{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,i=e.uiLevel,o=t!==this.position,n=i!==this.uiLevel;this.dragging=!1,(s||o||n)&&(s&&this.clear(),this.uiLevel=i,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:s,target:i,position:o}=t;if(s&&i&&o!=="none"){this.set(i,o),this.dragging=!0;return}}this.dragging&&this.clear()}},zC={moduleName:"Drag",version:Q,beans:[mE]},kE={moduleName:"DragAndDrop",version:Q,dynamicBeans:{dndSourceComp:iE},icons:{rowDrag:"grip"}},WC={moduleName:"SharedDragAndDrop",version:Q,beans:[d3],dependsOn:[zC],userComponents:{agDragAndDropImage:rE},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},IE={moduleName:"RowDrag",version:Q,beans:[TE,PE],apiFunctions:{addRowDropZone:aE,removeRowDropZone:lE,getRowDropZoneParams:cE,getRowDropPositionIndicator:dE,setRowDropPositionIndicator:uE},dependsOn:[WC]},ME={moduleName:"HorizontalResize",version:Q,beans:[vE],dependsOn:[zC]},AE=":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}}",LE=class extends B{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:i}=this;if(s.length===0&&i.length===0){e(),t();return}const o=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),o(s)},0),window.setTimeout(()=>{t(),o(i)},200)})}};function OE(e,t,s){e.colMoves?.moveColumnByIndex(t,s,"api")}function NE(e,t,s){e.colMoves?.moveColumns(t,s,"api")}var HE=class extends B{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:i}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&s?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&i?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function BE(e,t){!t||t.length<=1||t.filter(i=>e.indexOf(i)<0).length>0||t.sort((i,o)=>{const n=e.indexOf(i),r=e.indexOf(o);return n-r})}function GE(e){const t=[...e];for(const s of e){let i=null,o=s.getParent();for(;o!=null&&o.getDisplayedLeafColumns().length===1;)i=o,o=o.getParent();if(i!=null){const r=!!i.getColGroupDef()?.marryChildren?i.getProvidedColumnGroup().getLeafColumns():i.getLeafColumns();for(const a of r)t.includes(a)||t.push(a)}}return t}function VE(e,t,s,i){const o=i.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=>o.includes(h));if(r===null)r=d;else if(!Ii(d,r))break;const u=WE(c);(n===null||u<n.fragCount)&&(n={move:l,fragCount:u})}return n}function jC(e){const{isFromHeader:t,fromLeft:s,xPosition:i,fromEnter:o,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:c,visibleCols:d}=e;let{allMovingColumns:u}=e;t&&(u=GE(u));const h=u.slice();BE(l.getCols(),h);const p=_E({movingCols:h,draggingRight:s,xPosition:i,pinned:r,gos:a,colModel:l,visibleCols:d}),m=zE(h,l);if(p.length===0)return;const v=p[0];if(m!==null&&(t||!o)&&!n&&(!s&&v>=m||s&&v<=m))return;const w=VE(p,h,c,d);if(!w)return;const b=w.move;if(!(b>l.getCols().length-h.length))return{columns:h,toIndex:b}}function _C(e){const{columns:t,toIndex:s}=jC(e)||{},{finished:i,colMoves:o}=e;return!t||s==null?null:(o.moveColumns(t,s,"uiColumnMoved",i),i?null:{columns:t,toIndex:s})}function zE(e,t){const s=t.getCols(),i=e.map(l=>s.indexOf(l)).sort((l,c)=>l-c),o=i[0];return Ue(i)-o!==i.length-1?null:o}function WE(e){function t(i){const o=[];let n=i.getOriginalParent();for(;n!=null;)o.push(n),n=n.getOriginalParent();return o}let s=0;for(let i=0;i<e.length-1;i++){let o=t(e[i]),n=t(e[i+1]);[o,n]=o.length>n.length?[o,n]:[n,o];for(const r of o)n.indexOf(r)===-1&&s++}return s}function jE(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function _E(e){const{movingCols:t,draggingRight:s,xPosition:i,pinned:o,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(x=>x.getColDef().suppressMovable))return[];const c=jE(a,o),d=r.getCols(),u=c.filter(x=>t.includes(x)),h=c.filter(x=>!t.includes(x)),p=d.filter(x=>!t.includes(x));let m=0,v=i;if(s){let x=0;for(const y of u)x+=y.getActualWidth();v-=x}if(v>0){for(let x=0;x<h.length;x++){const y=h[x];if(v-=y.getActualWidth(),v<0)break;m++}s&&m++}let C;if(m>0){const x=h[m-1];C=p.indexOf(x)+1}else C=p.indexOf(h[0]),C===-1&&(C=0);const w=[C],b=(x,y)=>x-y;if(s){let x=C+1;const y=d.length-1;for(;x<=y;)w.push(x),x++;w.sort(b)}else{let x=C;const y=d.length-1;let S=d[x];for(;x<=y&&c.indexOf(S)<0;)x++,w.push(x),S=d[x];x=C-1;const E=0;for(;x>=E;)w.push(x),x--;w.sort(b).reverse()}return w}function Iu(e){const{pinned:t,fromKeyboard:s,gos:i,ctrlsSvc:o,useHeaderRow:n,skipScrollPadding:r}=e;let a=o.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(s&&(l-=a.getBoundingClientRect().left),i.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=o.get("center").getCenterViewportScrollLeft()),l):0}function kd(e,t){for(const s of e)s.moving=t,s.dispatchColEvent("movingChanged","uiColumnMoved")}var cf=7,Mu=100,Ga=Mu/2,UE=5,$E=100,qE=class extends B{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!ee(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:s}=t||{},i=s?.columns??[];for(const o of i){const n=o.getPinned();if(o.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 o=t.visibleState,n=(s||[]).filter(r=>o[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,i=!1){const{gos:o,ctrlsSvc:n}=this.beans,r=o.get("suppressMoveWhenColumnDragging");if(i&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!i&&tt(e.hDirection))return;const a=Iu({x:e.x,pinned:this.pinned,gos:o,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,s,a,i):this.handleColumnDragWhileAllowingMovement(e,t,s,a,i)}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 i=e.filter(o=>!o.getColDef().lockVisible);i.length&&this.beans.colModel.setColsVisible(i,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,i,o){const n=this.getAllMovingColumns(e,!0);if(o){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,i)}}handleColumnDragWhileAllowingMovement(e,t,s,i,o){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:a,xPosition:i,fromLeft:r,fromEnter:t,fakeEvent:s}),c=_C({...l,finished:o});c&&(this.lastMovedInfo=c)}getAllMovingColumns(e,t=!1){const s=e.dragSource.getDragItem();let i=null;t?(i=s.columnsInSplit,i||(i=s.columns)):i=s.columns;const o=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return i?i.filter(o):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:s,xPosition:i,fromLeft:o,fromEnter:n,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:c,visibleCols:d}=this.beans;return{allMovingColumns:t,isFromHeader:s,fromLeft:o,xPosition:i,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:c,visibleCols:d}}highlightHoveredColumn(e,t){const{gos:s,colModel:i}=this.beans,o=s.get("enableRtl"),n=i.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,o),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 p=h?.getDisplayedLeafColumns();if(p.length){l=Ue(p);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,o),a=l.getActualWidth()}if(l==null||r==null||a==null){this.lastHighlightedColumn?.column!==l&&this.clearHighlighted();return}let c;if(t-r<a/2){const d=n.indexOf(l);d===0?c=0:(c=1,l=n[d-1])}else c=1;(this.lastHighlightedColumn?.column!==l||this.lastHighlightedColumn?.position!==c)&&this.clearHighlighted(),df(l,c),this.lastHighlightedColumn={column:l,position:c}}getNormalisedXPositionInfo(e,t){const{gos:s,visibleCols:i}=this.beans,o=s.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,o);if(!n||!r||a==null)return;const l=i.allCols,c=l.indexOf(n),d=l.indexOf(r),u=a===0,h=c<d||c===d&&!u;let p=0;if(u?h&&(p-=1):h||(p+=1),d+p===c)return;const m=l[d+p];if(!m)return;const v=this.getNormalisedColumnLeft(m,20,o);return{fromLeft:h,xPosition:v}}getColumnMoveAndTargetInfo(e,t,s){const i=this.lastHighlightedColumn||{},{firstMovingCol:o,lastMovingCol:n}=KE(e);if(!o||!n||i.column||!t)return{firstMovingCol:o,...i};const a=this.getPinDirection()==="left";return{firstMovingCol:o,position:a?1:0,column:a!==s?o: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:i,ctrlsSvc:o}=this.beans,n=e.getLeft();if(n==null)return null;const r=e.getActualWidth();return Iu({x:s?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:s,skipScrollPadding:!0,gos:i,ctrlsSvc:o})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,s=this.failedMoveAttempts>cf;return t&&s||e.some(i=>i.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:s,fromEnter:i,fakeEvent:o,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:s,fromLeft:n,fromEnter:i,fakeEvent:o}),{columns:a,toIndex:l}=jC(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(df(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),s=t.getCenterViewportScrollLeft(),i=s+t.getCenterWidth();let o,n;this.gos.get("enableRtl")?(o=e<s+Ga,n=e>i-Ga):(n=e<s+Ga,o=e>i-Ga),this.needToMoveRight=o,this.needToMoveLeft=n,n||o?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),$E),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*UE,e>Mu&&(e=Mu);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:i,dragAndDrop:o,gos:n}=this.beans;if(this.failedMoveAttempts<=cf+1||!i)return;if(o.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 i=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!i.length)return 0;s&&(t=this.getPinDirection());const{pinnedCols:o,dragAndDrop:n}=this.beans;return o?.setColsPinned(i,t,"uiColumnDragged"),s&&n.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function df(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function KE(e){const t=e.length;let s,i;for(let o=0;o<t;o++){if(!s){const n=e[o];n.getLeft()!=null&&(s=n)}if(!i){const n=e[t-1-o];n.getLeft()!=null&&(i=n)}if(s&&i)break}return{firstMovingCol:s,lastMovingCol:i}}var YE=class extends B{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,s=this.pinned;e.whenReady(this,i=>{let o;const n=i.gridBodyCtrl.eBodyViewport;switch(s){case"left":o=[[n,i.left.eContainer],[i.bottomLeft.eContainer],[i.topLeft.eContainer]];break;case"right":o=[[n,i.right.eContainer],[i.bottomRight.eContainer],[i.topRight.eContainer]];break;default:o=[[n,i.center.eViewport],[i.bottomCenter.eViewport],[i.topCenter.eViewport]];break}this.eSecondaryContainers=o}),this.moveColumnFeature=this.createManagedBean(new qE(s)),this.bodyDropPivotTarget=this.createManagedBean(new HE(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()}};function UC(e,t){const s=[],i=[],o=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?o.push(r):a==="left"||a===!0?s.push(r):i.push(r)}),t.get("enableRtl")?[...o,...i,...s]:[...s,...i,...o]}function $C(e,t){let s=!0;return Ys(null,t,i=>{if(!Et(i))return;const o=i;if(!o.getColGroupDef()?.marryChildren)return;const a=[];for(const h of o.getLeafColumns()){const p=e.indexOf(h);a.push(p)}const l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),d=l-c,u=o.getLeafColumns().length-1;d>u&&(s=!1)}),s}var ZE=class extends B{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,s){const i=this.beans.colModel.getCols();if(!i)return;const o=i[e];this.moveColumns([o],t,s)}moveColumns(e,t,s,i=!0){const{colModel:o,colAnimation:n,visibleCols:r,eventSvc:a}=this.beans,l=o.getCols();if(!l)return;if(t>l.length-e.length){$(30,{toIndex:t});return}n?.start();const c=o.getColsForKeys(e);this.doesMovePassRules(c,t)&&(Eg(o.getCols(),c,t),r.refresh(s),a.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,toIndex:t,finished:i,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!(!$C(e,t.getColTree())||!(o=>{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 o){const d=n(c.getColDef().lockPosition);r?d>a&&(l=!1):d<a&&(l=!1),a=d}return l})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.getCols().slice();return Eg(i,e,t),i}createBodyDropTarget(e,t){return new YE(e,t)}moveHeader(e,t,s,i,o){const{ctrlsSvc:n,gos:r,colModel:a,visibleCols:l,focusSvc:c}=this.beans,d=t.getBoundingClientRect(),u=d.left,h=nt(s),p=h?d.width:s.getActualWidth(),m=e==="left"!==r.get("enableRtl"),v=Iu({x:m?u-20:u+p+20,pinned:i,fromKeyboard:!0,gos:r,ctrlsSvc:n}),C=c.focusedHeader;_C({allMovingColumns:h?s.getLeafColumns():[s],isFromHeader:!0,fromLeft:e==="right",xPosition:v,pinned:i,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let w;if(h){const b=s.getDisplayedLeafColumns();w=m?b[0]:Ue(b)}else w=s;if(n.getScrollFeature().ensureColumnVisible(w,"auto"),(!o.isAlive()||r.get("ensureDomOrder"))&&C){let b;if(h){const x=s.getGroupId(),y=s.getLeafColumns();if(!y.length)return;const S=y[0].getParent();if(!S)return;b=XE(S,x)}else b=s;b&&c.focusHeaderPosition({headerPosition:{...C,column:b}})}}setDragSourceForHeader(e,t,s){const{gos:i,colModel:o,dragAndDrop:n,visibleCols:r}=this.beans;let a=!i.get("suppressDragLeaveHidesColumns");const l=nt(t),c=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>JE(t,r.allCols):()=>QE(t),dragItemName:s,onDragStarted:()=>{a=!i.get("suppressDragLeaveHidesColumns"),kd(c,!0)},onDragStopped:()=>kd(c,!1),onDragCancelled:()=>kd(c,!1),onGridEnter:h=>{if(a){const{columns:p=[],visibleState:m}=h??{},v=l?w=>!m||m[w.getColId()]:()=>!0,C=p.filter(w=>!w.getColDef().lockVisible&&v(w));o.setColsVisible(C,!0,"uiColumnMoved")}},onGridExit:h=>{if(a){const p=h?.columns?.filter(m=>!m.getColDef().lockVisible)||[];o.setColsVisible(p,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function XE(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function QE(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function JE(e,t){const s=e.getProvidedColumnGroup().getLeafColumns(),i={};for(const a of s)i[a.getId()]=a.isVisible();const o=[];for(const a of t)s.indexOf(a)>=0&&(o.push(a),Ns(s,a));for(const a of s)o.push(a);const n=[],r=e.getLeafColumns();for(const a of o)r.indexOf(a)!==-1&&n.push(a);return{columns:o,columnsInSplit:n,visibleState:i,containerType:n[0]?.pinned}}var eD={moduleName:"ColumnMove",version:Q,beans:[ZE,LE],apiFunctions:{moveColumnByIndex:OE,moveColumns:NE},dependsOn:[WC],css:[AE]},tD=class extends B{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 i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(s),this.getPreferredWidthForElements(i)}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 i=this.centerRowContainerCtrl.eContainer;for(const n of e)this.cloneItemIntoDummy(n,s);i.appendChild(s);const o=Math.ceil(s.getBoundingClientRect().width);return s.remove(),t=t??this.gos.get("autoSizePadding"),o+t}getHeaderCellForColumn(e){let t=null;for(const s of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const i=s.getHtmlElementForColumnHeader(e);i!=null&&(t=i)}return t}cloneItemIntoDummy(e,t){const s=e.cloneNode(!0);s.style.width="",s.style.position="static",s.style.left="";const i=document.createElement("div"),o=i.classList;["ag-header-cell","ag-header-group-cell"].some(a=>s.classList.contains(a))?(o.add("ag-header","ag-header-row"),i.style.position="static"):o.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"&&o.add(c)}break}r=r.parentElement}i.appendChild(s),t.appendChild(i)}},qC={moduleName:"AutoWidth",version:Q,beans:[tD]};function sD(e,t,s=!0,i="api"){e.colResize?.setColumnWidths(t,!1,s,i)}function KC(e,t){if(!e||e.length==0)return;const s=t(e[0]);for(let i=1;i<e.length;i++)if(s!==t(e[i]))return;return s}function YC(e,t,s){if(!t.length)return;const i=t.length===1?t[0]:null,o=KC(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:o??null,columns:t,column:i,source:s})}function iD(e,t,s){if(!t.length)return;const i=t.length===1?t[0]:null,o=KC(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:o,columns:t,column:i,source:s})}function oD(e,t,s,i){e.dispatchEvent({type:t,columns:s,column:s&&s.length==1?s[0]:null,source:i})}function yn(e,t,s,i,o=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:o,finished:s,source:i})}var nD=class extends B{constructor(e,t,s,i){super(),this.comp=e,this.eResize=t,this.pinned=s,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:s}=this.beans,i=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(i),!t.get("suppressAutoSize")&&s&&this.addDestroyFunc(s.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:s,resizeRatios:i,groupAfterColumns:o,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=s,this.resizeRatios=i,this.resizeTakeFromCols=o,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,s="uiColumnResized"){const i=this.normaliseDragChange(t),o=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(o,s,e)}getInitialValues(e){const t=l=>l.reduce((c,d)=>c+d.getActualWidth(),0),s=(l,c)=>l.map(d=>d.getActualWidth()/c),i=this.getColumnsToResize(),o=t(i),n=s(i,o),r={columnsToResize:i,resizeStartWidth:o,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 i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(i,e,t,s)}resizeColumns(e,t,s,i=!0){const{columnsToResize:o,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:c}=e,d=[];if(d.push({columns:o,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:i,source:s}),i&&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}},rD=class extends B{constructor(e,t,s,i,o){super(),this.pinned=e,this.column=t,this.eResize=s,this.comp=i,this.ctrl=o}postConstruct(){const e=[];let t,s;const i=()=>{if(qe(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))},o=()=>{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,o(),i())};n(),this.addDestroyFunc(o),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:s,lastResizeAmount:i,resizeStartWidth:o,beans:n}=this,r=this.normaliseResizeAmount(t),a=o+r,l=[{key:s,newWidth:a}],{pinnedCols:c,ctrlsSvc:d,colResize:u}=n;if(this.column.getPinned()){const h=c?.leftWidth??0,p=c?.rightWidth??0,m=Pr(d.getGridBodyCtrl().eBodyViewport)-50;if(h+p+(r-i)>m)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",i=this.pinned==="right";return this.gos.get("enableRtl")?s&&(t*=-1):i&&(t*=-1),t}},aD=class extends B{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,s,i){const o=[],{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(o.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,p=u.getActualWidth()+h;o.push({width:p,ratios:[1],columns:[u]})}}o.length!==0&&this.resizeColumnSets({resizeSets:o,finished:s,source:i})}resizeColumnSets(e){const{resizeSets:t,finished:s,source:i}=e;if(!(!t||t.every(d=>lD(d)))){if(s){const d=t&&t.length>0?t[0].columns:null;yn(this.eventSvc,d,s,i)}return}const n=[],r=[];for(const d of t){const{width:u,columns:h,ratios:p}=d,m={},v={};for(const b of h)r.push(b);let C=!0,w=0;for(;C;){if(w++,w>1e3){je(31);break}C=!1;const b=[];let x=0,y=u;h.forEach((E,F)=>{if(v[E.getId()])y-=m[E.getId()];else{b.push(E);const D=p[F];x+=D}});const S=1/x;b.forEach((E,F)=>{const R=F===b.length-1;let D;R?D=y:(D=Math.round(p[F]*u*S),y-=D);const T=E.getMinWidth(),P=E.getMaxWidth();D<T?(D=T,v[E.getId()]=!0,C=!0):P>0&&D>P&&(D=P,v[E.getId()]=!0,C=!0),m[E.getId()]=D})}for(const b of h){const x=m[b.getId()];b.getActualWidth()!==x&&(b.setActualWidth(x,i),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(i),u.updateBodyWidths(),h.checkViewportColumns()}const c=r.concat(l);(a||s)&&yn(this.eventSvc,c,s,i,l)}resizeHeader(e,t,s){if(!e.isResizable())return;const i=e.getActualWidth(),o=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(i+t,o),n);this.setColumnWidths([{key:e,newWidth:r}],s,!0,"uiColumnResized")}createResizeFeature(e,t,s,i,o){return new rD(e,t,s,i,o)}createGroupResizeFeature(e,t,s,i){return new nD(e,t,s,i)}};function lD(e){const{columns:t,width:s}=e;let i=0,o=0,n=!0;for(const l of t){const c=l.getMinWidth();i+=c||0;const d=l.getMaxWidth();d>0?o+=d:n=!1}const r=s>=i,a=!n||s<=o;return r&&a}var cD={moduleName:"ColumnResize",version:Q,beans:[aD],apiFunctions:{setColumnWidths:sD},dependsOn:[ME,qC]},dD=class extends B{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)}},uD=class extends Kh{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,s,i,o){const{column:n,beans:r}=this,{context:a,colNames:l,colHover:c,rangeSvc:d,colResize:u}=r;this.comp=e,o=Ur(this,a,o),this.setGui(t,o),this.displayName=l.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(o),this.setupExpandable(o),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:i,compBean:o}),this.setupUserComp(),this.addHeaderMouseListeners(o,i),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,p=n.getProvidedColumnGroup().getLeafColumns();c?.createHoverFeature(o,p,t),d?.createRangeHighlightFeature(o,n,e),o.createManagedBean(new qh(n,t,r)),o.createManagedBean(new dD(e,n)),u?this.resizeFeature=o.createManagedBean(u.createGroupResizeFeature(e,s,h,n)):e.setResizableDisplayed(!1),o.createManagedBean(new jr(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(o,p),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),o.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(o),o.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.getDefinition();return be(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,i=Ue(t)===e;if(!s&&!i)return;const o=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=o===1,d=o===0;s&&(l?a=c:r=d),i&&(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 i=s.getInitialValues(t);s.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:s,enterpriseMenuFactory:i}=this.beans,o=this.column,n=o.getProvidedColumnGroup(),r=be(s,{displayName:this.displayName,columnGroup:o,setExpanded:l=>{e.setColumnGroupOpened(n,l,"gridInitializing")},setTooltip:(l,c)=>{s.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,c)},showColumnMenu:(l,c)=>i?.showMenuAfterButtonClick(n,l,"columnMenu",c),showColumnMenuAfterMouseClick:(l,c)=>i?.showMenuAfterMouseEvent(n,l,"columnMenu",c),eGridHeader:this.eGui}),a=e3(t,r);a&&this.comp.setUserCompDetails(a)}addHeaderMouseListeners(e,t){const{column:s,comp:i,beans:{rangeSvc:o},gos:n}=this,r=d=>this.handleMouseOverChange(d.type==="mouseenter"),a=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",s.getProvidedColumnGroup()),l=d=>this.handleContextMenuMouseEvent(d,void 0,s.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:r,mouseleave:r,click:a,contextmenu:l}),i.toggleCss("ag-header-group-cell-selectable",dn(n));const c=o?.createHeaderGroupCellMouseListenerFeature(this.column,t);c&&this.createManagedBean(c)}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=yC(t,this.gos,null,e);e.isPadding()?(s.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(o=>o.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 i of s)this.comp.toggleCss(i,!0)}setupMovingCss(e){const{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),o=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const n of i)e.addManagedListeners(n,{movingChanged:o});o()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;const{column:s,expandable:i,gos:o,beans:n}=this,r=dn(o);if(e.key==A.ENTER){if(r&&!e.altKey)n.rangeSvc?.handleColumnSelection(s,e);else if(i){const a=!s.isExpanded();n.colGroupSvc.setColumnGroupOpened(s.getProvidedColumnGroup(),a,"uiColumnExpanded")}}}refreshAnnouncement(){let e;const{gos:t}=this;dn(t)&&(e=this.getLocaleTextFunc()("ariaColumnGroupCellSelection","Press Enter to toggle selection for all visible cells in this column group")),this.ariaAnnouncement=e}announceAriaDescription(){const{beans:e,eGui:t,ariaAnnouncement:s}=this;!s||!t.contains(Je(e))||e.ariaAnnounce?.announceValue(s,"columnHeader")}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 hD(e,t,s){e.colGroupSvc?.setColumnGroupOpened(t,s,"api")}function pD(e,t,s){return e.colGroupSvc?.getColumnGroup(t,s)??null}function gD(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function fD(e,t,s){return e.colNames.getDisplayNameForColumnGroup(t,s)||""}function mD(e){return e.colGroupSvc?.getColumnGroupState()??[]}function vD(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function CD(e){e.colGroupSvc?.resetColumnGroupState("api")}function wD(e){return e.visibleCols.treeLeft}function bD(e){return e.visibleCols.treeCenter}function xD(e){return e.visibleCols.treeRight}function yD(e){return e.visibleCols.getAllTrees()}var ZC=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}};function SD(e,t){for(let s=0;s<t.length;s++){const i=e.indexOf(t[s]);i>=0&&(e[i]=e[e.length-1],e.pop())}}var RD=class extends B{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:i,colGroupSvc:o,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(i,o),o?.updateOpenClosedVisibility(),this.leftCols=Id(this.treeLeft),this.centerCols=Id(this.treeCenter),this.rightCols=Id(this.treeRight),r?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(i),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),s?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(i,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 i=s.getProvidedColumnGroup().getLevel()+1;i>e&&(e=i);break}s=s.getParent()}}return e}updateBodyWidths(){const e=$s(this.centerCols),t=$s(this.leftCols),s=$s(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,i){let o,n;this.gos.get("enableRtl")?(o=t?t[0]:null,n=s?Ue(s):null):(o=t?Ue(t):null,n=s?s[0]:null);for(const r of e.getCols())r.setLastLeftPinned(r===o,i),r.setFirstRightPinned(r===n,i)}buildTrees(e,t){const s=e.getColsToShow(),i=s.filter(l=>l.getPinned()=="left"),o=s.filter(l=>l.getPinned()=="right"),n=s.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new ZC,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:i,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:o,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=[],i=[],o=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?s.push(n):o.push(n):i.push(n)}this.ariaOrderColumns=s.concat(i).concat(o)}getAriaColIndex(e){let t;return nt(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)nt(t)&&t.checkLeft()}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const i=t.getCols().slice(0),o=this.gos.get("enableRtl");for(const n of[this.leftCols,this.rightCols,this.centerCols]){if(o){let r=$s(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()}SD(i,n)}for(const n of i)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,i){const o=[];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 p=1;p<=h;p++)d.push(t[r+p]);r+=h}let u;if(s){u=!1;for(const h of d)s(h)&&(u=!0)}else u=!0;u&&(o.length===0&&n&&i&&i(a)&&o.push(n),o.push(a)),n=a}return o}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};oo(this.treeCenter,!1,e),oo(this.treeLeft,!1,e),oo(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 i=this[t[s]];if(i.length)return e?Ue(i):i[0]}return null}getColAfter(e){const t=this.allCols,s=t.indexOf(e);return s<t.length-1?t[s+1]:null}getColsLeftWidth(){return $s(this.leftCols)}getDisplayedColumnsRightWidth(){return $s(this.rightCols)}isColAtEdge(e,t){const s=this.allCols;if(!s.length)return!1;const i=t==="first";let o;if(nt(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;o=i?n[0]:Ue(n)}else o=e;return(i?s[0]:Ue(s))===o}};function oo(e,t,s){if(e)for(let i=0;i<e.length;i++){const o=e[i];if(nt(o)){const n=t?o.getDisplayedChildren():o.getChildren();oo(n,t,s)}s(o)}}function Id(e){const t=[];return oo(e,!0,s=>{Fi(s)&&t.push(s)}),t}var FD=class extends B{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return Ys(null,t,s=>{Et(s)&&e.push({groupId:s.getGroupId(),open:s.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const s=[];Ys(null,t,i=>{if(Et(i)){const o=i.getColGroupDef(),n={groupId:i.getGroupId(),open:o?o.openByDefault:void 0};s.push(n)}}),this.setColumnGroupState(s,e)}setColumnGroupState(e,t){const{colModel:s,colAnimation:i,visibleCols:o,eventSvc:n}=this.beans;if(!s.getColTree().length)return;i?.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))}o.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),i?.finish()}setColumnGroupOpened(e,t,s){let i;Et(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],s)}getProvidedColGroup(e){let t=null;return Ys(null,this.beans.colModel.getColTree(),s=>{Et(s)&&s.getId()===e&&(t=s)}),t}getGroupAtDirection(e,t){const s=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),o=t==="After"?Ue(i):i[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](o);if(!r)return null;const a=this.getColGroupAtLevel(r,s);if(a!==e)return a}}getColGroupAtLevel(e,t){let s=e.getParent(),i,o;for(;i=s.getProvidedColumnGroup().getLevel(),o=s.getPaddingLevel(),!(i+o<=t);)s=s.getParent();return s}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();oo(e,!1,t=>{nt(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(nt(e))return e;const s=this.beans.visibleCols.getAllTrees(),i=typeof t=="number";let o=null;return oo(s,!1,n=>{if(nt(n)){const r=n;let a;i?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(o=r)}}),o}createColumnGroups(e){const{columns:t,idCreator:s,pinned:i,oldDisplayedGroups:o,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(o),a=[];let l=t;for(;l.length;){const c=l;l=[];let d=0;const u=h=>{const p=d;d=h;const m=c[p],C=(nt(m)?m.getProvidedColumnGroup():m).getOriginalParent();if(C==null){for(let b=p;b<h;b++)a.push(c[b]);return}const w=this.createColumnGroup(C,s,r,i,n);for(let b=p;b<h;b++)w.addChild(c[b]);l.push(w)};for(let h=1;h<c.length;h++){const p=c[h],v=(nt(p)?p.getProvidedColumnGroup():p).getOriginalParent(),C=c[d],b=(nt(C)?C.getProvidedColumnGroup():C).getOriginalParent();v!==b&&u(h)}d<c.length&&u(c.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,s,i,o,n,r){const a=o.getUniqueKey(t.groupId||null,null),l=Og(this.beans,t,a),c=new tl(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=Xv(this.beans,l.children,s+1,e,i,o,n,r);return c.setChildren(h),c}balanceColumnTree(e,t,s,i){const o=[];for(let n=0;n<e.length;n++){const r=e[n];if(Et(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,s,i);a.setChildren(l),o.push(a)}else{let a,l;for(let c=t;c<s;c++){const d=i.getUniqueKey(null,null),u=Og(this.beans,null,d),h=new tl(u,d,!0,c);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(o.push(a),e.some(d=>Et(d))){l.setChildren([r]);continue}else{l.setChildren(e);break}o.push(r)}}return o}findDepth(e){let t=0,s=e;for(;s?.[0]&&Et(s[0]);)t++,s=s[0].getChildren();return t}findMaxDepth(e,t){let s=t;for(let i=0;i<e.length;i++){const o=e[i];if(Et(o)){const n=o,r=this.findMaxDepth(n.getChildren(),t+1);s<r&&(s=r)}}return s}balanceTreeForAutoCols(e,t){const s=[];for(const i of e){let o=i;for(let n=t-1;n>=0;n--){const r=new tl(null,`FAKE_PATH_${i.getId()}_${n}`,!0,n);this.createBean(r),r.setChildren([o]),o.originalParent=r,o=r}t===0&&(i.originalParent=null),s.push(o)}return s}findExistingGroup(e,t){if(e.groupId!=null)for(let i=0;i<t.length;i++){const o=t[i];if(o.getColGroupDef()&&o.getId()===e.groupId)return{idx:i,group:o}}}createColumnGroup(e,t,s,i,o){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),a=tC(n,r);let l=s[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),ee(l)?l.reset():(l=new Ar(e,n,r,i),o||this.createBean(l)),l}mapOldGroupsById(e){const t={},s=i=>{for(const o of i)if(nt(o)){const n=o;t[o.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,nt(s)){const i=s;this.setupParentsIntoCols(i.getChildren(),i)}}},ED={moduleName:"ColumnGroup",version:Q,dynamicBeans:{headerGroupCellCtrl:uD},beans:[FD],apiFunctions:{getAllDisplayedColumnGroups:yD,getCenterDisplayedColumnGroups:bD,getColumnGroup:pD,getColumnGroupState:mD,getDisplayNameForColumnGroup:fD,getLeftDisplayedColumnGroups:wD,getProvidedColumnGroup:gD,getRightDisplayedColumnGroups:xD,resetColumnGroupState:CD,setColumnGroupOpened:hD,setColumnGroupState:vD}};function bs(e,t,s){const{colModel:i,rowGroupColsSvc:o,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:d,environment:u,valueColsSvc:h,eventSvc:p,gos:m}=e,v=i.getColDefCols()??[],C=a?.getColumns();if(!v.length&&!C?.length)return!1;if(t?.state&&!t.state.forEach)return $(32),!1;const w=(S,E,F,R,D)=>{if(!S)return;const T=RR(E,t.defaultState),P=T("flex").value1,M=T("sort").value1,N=T("sortType").value1,K=xi(M)||Mh(N),L=Js(N),H=nc(M),G=K?{type:L,direction:H}:void 0;if(Qv(e,S,T("hide").value1,G,T("sortIndex").value1,T("pinned").value1,P,s),P==null){const _=T("width").value1;if(_!=null){const te=S.getColDef().minWidth??u.getDefaultColumnMinWidth();te!=null&&_>=te&&S.setActualWidth(_,s)}}D||!S.isPrimary()||(h?.syncColumnWithState(S,s,T),o?.syncColumnWithState(S,s,T,F),n?.syncColumnWithState(S,s,T,R))},b=(S,E,F)=>{const R=XC(e,s),D=E.slice(),T={},P={},M=[],N=[],K=[];let L=0;const H=o?.columns.slice()??[],G=n?.columns.slice()??[];for(const I of S){const k=I.colId;if(k.startsWith(vi)){M.push(I),K.push(I);continue}if(Mi(k)){N.push(I),K.push(I);continue}const q=F(k);q?(w(q,I,T,P,!1),Ns(D,q)):(K.push(I),L+=1)}const _=I=>w(I,null,T,P,!1);D.forEach(_),o?.sortColumns(uf.bind(o,T,H)),n?.sortColumns(uf.bind(n,P,G)),i.refreshCols(!1,s);const te=(I,k,V=[])=>{for(const q of k){const ie=I(q.colId);Ns(V,ie),w(ie,q,null,null,!0)}V.forEach(_)};return te(I=>r?.getColumn(I)??null,M,r?.getColumns()?.slice()),te(I=>a?.getColumn(I)??null,N,a?.getColumns()?.slice()),PD(t,i,m),c.refresh(s),p.dispatchEvent({type:"columnEverythingChanged",source:s}),R(),{unmatchedAndAutoStates:K,unmatchedCount:L}};l?.start();let{unmatchedAndAutoStates:x,unmatchedCount:y}=b(t.state||[],v,S=>i.getColDefCol(S));if(x.length>0||ee(t.defaultState)){const S=d?.getPivotResultCols()?.list??[];y=b(x,S,E=>d?.getPivotResultCol(E)??null).unmatchedCount}return l?.finish(),y===0}function DD(e,t){const{colModel:s,autoColSvc:i,selectionColSvc:o,eventSvc:n,gos:r}=e,a=s.getColDefCols();if(!a?.length)return;const l=s.getColDefColTree(),c=Jv(l),d=[];let u=1e3,h=1e3;const p=b=>{const x=QC(b);tt(x.rowGroupIndex)&&x.rowGroup&&(x.rowGroupIndex=u++),tt(x.pivotIndex)&&x.pivot&&(x.pivotIndex=h++),d.push(x)};i?.getColumns()?.forEach(p),o?.getColumns()?.forEach(p),c?.forEach(p),bs(e,{state:d},t);const m=i?.getColumns()??[],w=[...o?.getColumns()??[],...m,...a].map(b=>({colId:b.colId}));bs(e,{state:w,applyOrder:!0},t),n.dispatchEvent(be(r,{type:"columnsReset",source:t}))}function XC(e,t){const{rowGroupColsSvc:s,pivotColsSvc:i,valueColsSvc:o,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:s?.columns.slice()??[],pivotColumns:i?.columns.slice()??[],valueColumns:o?.columns.slice()??[]},c=Al(e),d={};for(const u of c)d[u.colId]=u;return()=>{const u=(E,F,R,D)=>{const T=F.map(D),P=R.map(D);if(Ii(T,P))return;const N=new Set(F);for(const L of R)N.delete(L)||N.add(L);const K=[...N];a.dispatchEvent({type:E,columns:K,column:K.length===1?K[0]:null,source:t})},h=E=>{const F=[];return n.forAllCols(R=>{const D=d[R.getColId()];D&&E(D,R)&&F.push(R)}),F},p=E=>E.getColId();u("columnRowGroupChanged",l.rowGroupColumns,s?.columns??[],p),u("columnPivotChanged",l.pivotColumns,i?.columns??[],p);const v=h((E,F)=>{const R=E.aggFunc!=null,D=R!=F.isValueActive(),T=R&&E.aggFunc!=F.getAggFunc();return D||T});v.length>0&&oD(a,"columnValueChanged",v,t),yn(a,h((E,F)=>E.width!=F.getActualWidth()),!0,t),YC(a,h((E,F)=>E.pinned!=F.getPinned()),t),iD(a,h((E,F)=>E.hide==F.isVisible()),t);const y=h((E,F)=>!el(F.getSortDef(),{type:Js(E.sortType),direction:nc(E.sort)})||E.sortIndex!=F.getSortIndex());y.length>0&&r?.dispatchSortChangedEvents(t,y);const S=Al(e);kD(c,S,t,n,a)}}function Al(e){const{colModel:t,rowGroupColsSvc:s,pivotColsSvc:i}=e,o=t.getColDefCols();if(tt(o)||!t.isAlive())return[];const n=s?.columns,r=i?.columns,a=[],l=d=>{const u=d.isRowGroupActive()&&n?n.indexOf(d):null,h=d.isPivotActive()&&r?r.indexOf(d):null,p=d.isValueActive()?d.getAggFunc():null,m=d.getSortIndex()!=null?d.getSortIndex():null;a.push({colId:d.getColId(),width:d.getActualWidth(),hide:!d.isVisible(),pinned:d.getPinned(),sort:d.getSort(),sortType:d.getSortDef()?.type,sortIndex:m,aggFunc:p,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,p=c.has(u.colId)?c.get(u.colId):-1;return h-p}),a}function QC(e){const t=(C,w)=>C??w??null,s=e.getColDef(),i=ls(t(s.sort,s.initialSort)),o=i.direction,n=i.type,r=t(s.sortIndex,s.initialSortIndex),a=t(s.hide,s.initialHide),l=t(s.pinned,s.initialPinned),c=t(s.width,s.initialWidth),d=t(s.flex,s.initialFlex);let u=t(s.rowGroupIndex,s.initialRowGroupIndex),h=t(s.rowGroup,s.initialRowGroup);u==null&&!h&&(u=null,h=null);let p=t(s.pivotIndex,s.initialPivotIndex),m=t(s.pivot,s.initialPivot);p==null&&!m&&(p=null,m=null);const v=t(s.aggFunc,s.initialAggFunc);return{colId:e.getColId(),sort:o,sortType:n,sortIndex:r,hide:a,pinned:l,width:c,flex:d,rowGroup:h,rowGroupIndex:u,pivot:m,pivotIndex:p,aggFunc:v}}function PD(e,t,s){if(!e.applyOrder||!e.state)return;const i=[];for(const o of e.state)o.colId!=null&&i.push(o.colId);TD(t.cols,i,t,s)}function TD(e,t,s,i){if(e==null)return;let o=[];const n={};for(const a of t){if(n[a])continue;const l=e.map[a];l&&(o.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(vi)?o.splice(r++,0,a):o.push(a)}if(o=UC(o,i),!$C(o,s.getColTree())){$(39);return}e.list=o}function kD(e,t,s,i,o){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 p=i.getCol(h.colId);p&&c.push(p)}}),c.length&&o.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:s})}var uf=(e,t,s,i)=>{const o=e[s.getId()],n=e[i.getId()],r=o!=null,a=n!=null;if(r&&a)return o-n;if(r)return-1;if(a)return 1;const l=t.indexOf(s),c=t.indexOf(i),d=l>=0,u=c>=0;return d&&u?l-c:d?-1:1},ID=class extends B{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","groupHideColumnsUntilExpanded","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(hn(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),hn(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:s,colAutosize:i,rowGroupColsSvc:o,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,d=this.colDefs?XC(t,e):void 0;s?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,p=pR(t,this.colDefs,!0,h,e);Fl(t,this.colDefCols?.tree,p.columnTree);const m=p.columnTree,v=p.treeDepth,C=Jv(m),w={};for(const b of C)w[b.getId()]=b;this.colDefCols={tree:m,treeDepth:v,list:C,map:w},this.createColumnsForService([c],this.colDefCols,e),o?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,e),this.changeEventsDispatching=!1,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"&&i?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;const s=this.cols?.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:o,rowNumbersSvc:n,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:c,visibleCols:d,colViewport:u,eventSvc:h,formula:p}=this.beans,m=this.selectCols(a,this.colDefCols);p?.setFormulasActive(m),this.createColumnsForService([i,o,n],m,t);const v=z2(this.gos,this.showingPivotResult);(!e||v)&&this.restoreColOrder(m),this.positionLockedCols(m),l?.refresh(),r?.refreshCols(),this.setColSpanActive(),c?.setAutoHeightActive(m),d.clear(),u.clear(),Ii(s,this.cols.tree)||h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,s){for(const i of e)i&&(i.createColumns(t,o=>{this.lastOrder=o(this.lastOrder),this.lastPivotOrder=o(this.lastPivotOrder)},s),i.addColumns(t))}selectCols(e,t){const s=e?.getPivotResultCols()??null;this.showingPivotResult=s!=null;const{map:i,list:o,tree:n,treeDepth:r}=s??t;return this.cols={list:o.slice(),map:{...i},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{beans:e,showingPivotResult:t,cols:s}=this,{valueColsSvc:i,selectionColSvc:o,gos:n}=e,r=this.isPivotMode()&&!t,a=o?.isSelectionColumnEnabled(),l=W2(e),c=i?.columns,d=U2(n);return s.list.filter(h=>{const p=Oh(h);return r?c?.includes(h)||p&&(!d||h.isVisible())||a&&Mi(h)||l&&It(h):p&&!d||h.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,s){bs(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.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 i=u=>{const h=u.getOriginalParent();return h?h.getChildren().length>1?!0:i(h):!1};if(!s.some(u=>i(u))){const u=new Set(s);for(const h of e.list)u.has(h)||s.push(h);e.list=s;return}const o=new Map;for(let u=0;u<s.length;u++){const h=s[u];o.set(h,u)}const n=e.list.filter(u=>!o.has(u));if(n.length===0){e.list=s;return}const r=(u,h)=>{const p=h?h.getOriginalParent():u.getOriginalParent();if(!p)return null;let m=null,v=null;for(const C of p.getChildren())if(!(C===h||C===u)){if(C instanceof Ro){const w=o.get(C);if(w==null)continue;(m==null||m<w)&&(m=w,v=C);continue}C.forEachLeafColumn(w=>{const b=o.get(w);b!=null&&(m==null||m<b)&&(m=b,v=w)})}return v??r(u,p)},a=[],l=new Map;for(const u of n){const h=r(u,null);if(h==null){a.push(u);continue}const p=l.get(h);p===void 0?l.set(h,u):Array.isArray(p)?p.push(u):l.set(h,[p,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],p=l.get(h);if(p)if(Array.isArray(p))for(let m=p.length-1;m>=0;m--){const v=p[m];c[d--]=v}else c[d--]=p;c[d--]=h}e.list=c}positionLockedCols(e){e.list=UC(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:i}=this.beans;s.refresh(t),i.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=hn(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){Fl(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:i,groupHierarchyColSvc:o}=this.beans;Qn(this.colDefCols?.list,e)||Qn(s?.columns?.list,e)||Qn(i?.columns?.list,e)||Qn(o?.columns?.list,e)||Qn(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:i}=t;if(typeof e=="string"&&s[e])return s[e];for(let a=0;a<i.length;a++)if(gr(i[a],e))return i[a];const{autoColSvc:o,selectionColSvc:n,groupHierarchyColSvc:r}=this.beans;return o?.getColumn(e)??n?.getColumn(e)??r?.getColumn(e)??null}},MD=".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)}:where(.ag-label-align-right){.ag-label,.ag-wrapper{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column}:where(.ag-label-align-top){.ag-label,.ag-wrapper{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)}",AD=class extends In{constructor(e,t,s){super(t,s),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(MD)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:s,labelAlignment:i,disabled:o,labelEllipsis:n}=this.config;o!=null&&this.setDisabled(o),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),s!=null&&this.setLabelWidth(s),n!=null&&this.setLabelEllipsis(n),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;jt(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(qe(t,!1),lo(t,"presentation")):(qe(t,!0),lo(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:(vl(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Dr(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},JC=class extends AD{constructor(e,t,s,i){super(e,t,s),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:s,ariaLabel:i}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),s!=null&&this.onValueChange(s),i!=null&&this.setAriaLabel(i),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==""||jS(e)!==null?Er(e,""):Er(e,t??"")}setAriaLabel(e){return Cn(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 As(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 LD(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 Ki=class extends JC{constructor(e,t,s="text",i="input"){super(e,e?.template??LD(i),[],t),this.inputType=s,this.displayFieldTag=i,this.eLabel=ue,this.eWrapper=ue,this.eInput=ue}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:s,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),s.classList.add(`${i}-input`),this.addCss("ag-input-field"),s.id=s.id||`ag-${this.getCompId()}-input`;const{inputName:o,inputWidth:n,inputPlaceholder:r,autoComplete:a,tabIndex:l}=this.config;o!=null&&this.setInputName(o),n!=null&&this.setInputWidth(n),r!=null&&this.setInputPlaceholder(r),a!=null&&this.setAutoComplete(a),this.addInputListeners(),this.activateTabIndex([s],l)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,Gt(this.eInput,"type",e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return vl(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 Gt(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Cn(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Dr(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Gt(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Gt(this.eInput,"autocomplete",t)}return this}},Xh=class extends Ki{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,name:s}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t),s!=null&&this.setName(s)}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 i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.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)}},Qh={selector:"AG-CHECKBOX",component:Xh},OD=".ag-checkbox-cell{height:100%}",ND={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},HD=class extends it{constructor(){super(ND,[Qh]),this.eCheckbox=ue,this.registerCSS(OD)}init(e){this.refresh(e);const{eCheckbox:t,beans:s}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),gv(i,"polite"),this.addManagedListeners(i,{click:o=>{if(go(o),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:o=>{go(o)}}),this.addManagedElementListeners(e.eGridCell,{keydown:o=>{if(o.key===A.SPACE&&!t.isDisabled()){e.eGridCell===Je(s)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),o.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,s=!0;const{value:i,column:o,node:n}=e;if(n.group&&o)if(typeof i=="boolean")t=i;else{const u=o.getColId();u.startsWith(vi)?t=i==null||i===""?void 0:i==="true":n.aggData&&n.aggData[u]!==void 0||n.sourceRowIndex>=0?t=i??void 0:s=!1}else t=i??void 0;const{eCheckbox:r}=this;if(!s){r.setDisplayed(!1);return}r.setValue(t);const a=e.disabled??!o?.isCellEditable(n);r.setDisabled(a);const l=this.getLocaleTextFunc(),c=ic(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:i,value:o}=t,{editSvc:n}=this.beans;if(!s)return;const r={rowNode:i,column:s};n?.dispatchCellEvent(r,null,"cellEditingStarted",{value:o});const a=i.setDataValue(s,e,"ui");n?.dispatchCellEvent(r,null,"cellEditingStopped",{oldValue:o,newValue:e,valueChanged:a}),a||this.updateCheckbox(t)}},BD={tag:"div",cls:"ag-skeleton-container"},GD=class extends it{constructor(){super(BD)}init(t){const s=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",s),this.addDestroyFunc(()=>Er(t.eParentOfValue)),Er(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");Cn(this.getGui(),s)}setupLoading(t){const s=Jt({tag:"div",cls:"ag-skeleton-effect"}),i=t.node.rowIndex;if(i!=null){const r=75+25*(i%2===0?Math.sin(i):Math.cos(i));s.style.width=`${r}%`}this.getGui().appendChild(s);const o=this.getLocaleTextFunc(),n=t.deferRender?o("ariaDeferSkeletonCellLoading","Cell is loading"):o("ariaSkeletonCellLoading","Row data is loading");Cn(this.getGui(),n)}refresh(t){return!1}},VD={moduleName:"CheckboxCellRenderer",version:Q,userComponents:{agCheckboxCellRenderer:HD}},zD={moduleName:"SkeletonCellRenderer",version:Q,userComponents:{agSkeletonCellRenderer:GD}};function WD(e,t){const s=e.colModel.getColDefCol(t);return s?s.getColDef():null}function jD(e){return e.colModel.getColumnDefs(!0)}function _D(e,t,s){return e.colNames.getDisplayNameForColumn(t,s)||""}function UD(e,t){return e.colModel.getColDefCol(t)}function $D(e){return e.colModel.getColDefCols()}function qD(e,t){return bs(e,t,"api")}function KD(e){return Al(e)}function YD(e){DD(e,"api")}function ZD(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function XD(e){return e.visibleCols.isPinningLeft()}function QD(e){return e.visibleCols.isPinningRight()}function JD(e,t){return e.visibleCols.getColAfter(t)}function e5(e,t){return e.visibleCols.getColBefore(t)}function t5(e,t,s){e.colModel.setColsVisible(t,s,"api")}function s5(e,t,s){e.pinnedCols?.setColsPinned(t,s,"api")}function i5(e){return e.colModel.getCols()}function o5(e){return e.visibleCols.leftCols}function n5(e){return e.visibleCols.centerCols}function r5(e){return e.visibleCols.rightCols}function a5(e){return e.visibleCols.allCols}function l5(e){return e.colViewport.getViewportColumns()}function Au(e,t){if(!e)return;const s=e,i={};for(const o of Object.keys(s)){if(t&&t.indexOf(o)>=0||Ev.has(o))continue;const n=s[o];typeof n=="object"&&n!==null&&n.constructor===Object?i[o]=Au(n):i[o]=n}return i}var c5=class extends B{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,s,i,o=!1){const n=e.slice();t?n.sort((l,c)=>s.indexOf(l)-s.indexOf(c)):(s||o)&&n.sort((l,c)=>i.indexOf(l)-i.indexOf(c));const r=this.rowGroupColsSvc?.columns,a=this.pivotColsSvc?.columns;return this.buildColumnDefs(n,r,a)}buildColumnDefs(e,t=[],s=[]){const i=[],o={};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=o[c.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(c),u&&(u.children=[l],o[u.groupId]=u,l=u,c=c.getOriginalParent()),c!=null&&d===c){a=!1;break}d=c}a&&i.push(l)}return i}createDefFromGroup(e){const t=Au(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,s){const i=Au(e.getColDef());return i.colId=e.getColId(),i.width=e.getActualWidth(),i.rowGroup=e.isRowGroupActive(),i.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,i.pivot=e.isPivotActive(),i.pivotIndex=e.isPivotActive()?s.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=e.isVisible()?void 0:!0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSortDef(),i.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,i}},d5=class extends B{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:i,colDelayRenderSvc:o}=this.beans,n=i.centerCols;let r=-1;if(e.resizingCols){const v=new Set(e.resizingCols);for(let C=n.length-1;C>=0;C--)if(v.has(n[C])){r=C;break}}let a=!1;const l=n.map((v,C)=>{const w=v.getFlex(),b=w!=null&&w>0&&C>r;return a||(a=b),{col:v,isFlex:b,flex:Math.max(0,w??0),initialSize:v.getActualWidth(),min:v.getMinWidth(),max:v.getMaxWidth(),targetSize:0}});if(a?(o?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(o),!s||!a)return[];let c=l.length,d=l.reduce((v,C)=>v+C.flex,0),u=s;const h=(v,C)=>{v.frozenSize=C,v.col.setActualWidth(C,t),u-=C,d-=v.flex,c-=1},p=v=>v.frozenSize!=null;for(const v of l)v.isFlex||h(v,v.initialSize);for(;c>0;){const v=Math.round(d<1?u*d:u);let C,w=0,b=0;for(const S of l){if(p(S))continue;C=S,b+=v*(S.flex/d);const E=b-w,F=Math.round(E);S.targetSize=F,w+=F}C&&(C.targetSize+=v-w);let x=0;for(const S of l){if(p(S))continue;const E=S.targetSize,F=Math.min(Math.max(E,S.min),S.max);x+=F-E,S.violationType=F===E?void 0:F<E?"max":"min",S.targetSize=F}const y=x===0?"all":x>0?"min":"max";for(const S of l)p(S)||(y==="all"||S.violationType===y)&&h(S,S.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();const m=l.filter(v=>v.isFlex&&!v.violationType).map(v=>v.col);if(e.fireResizedEvent){const v=l.filter(w=>w.initialSize!==w.frozenSize).map(w=>w.col),C=l.filter(w=>w.flex).map(w=>w.col);yn(this.eventSvc,v,!0,t,C)}return this.revealColumns(o),m}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")}},_t=e=>{if(typeof e=="bigint")return e;let t;if(typeof e=="number")t=e;else if(typeof e=="string"&&(t=e.trim(),t===""||(t.endsWith("n")&&(t=t.slice(0,-1)),!/^[+-]?\d+$/.test(t))))return null;if(t==null)return null;try{return BigInt(t)}catch{return null}},Jh="T",u5=new RegExp(`[${Jh} ]`),h5=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${Jh}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function ks(e,t){return e.toString().padStart(t,"0")}function Mt(e,t=!0,s=Jh){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(o=>ks(o,2)).join("-");return t&&(i+=s+[e.getHours(),e.getMinutes(),e.getSeconds()].map(o=>ks(o,2)).join(":")),i}function Va(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),ks(e.getDate(),2),ks(e.getHours(),2),`:${ks(e.getMinutes(),2)}`,`:${ks(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,ks(e.getDate(),2)].map(String):null}var Md=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"},hf=["January","February","March","April","May","June","July","August","September","October","November","December"],Ad=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function p5(e,t){if(t==null)return Mt(e,!1);const s=ks(e.getFullYear(),4),i={YYYY:()=>s.slice(s.length-4,s.length),YY:()=>s.slice(s.length-2,s.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>hf[e.getMonth()],MMM:()=>hf[e.getMonth()].slice(0,3),MM:()=>ks(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${Md(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${Md(e.getDate())}`,DD:()=>ks(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>Ad[e.getDay()],ddd:()=>Ad[e.getDay()].slice(0,3),dd:()=>Ad[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${Md(e.getDay())}`,d:()=>`${e.getDay()}`},o=new RegExp(Object.keys(i).join("|"),"g");return t.replace(o,n=>n in i?i[n]():n)}function nl(e,t=!1){return!!At(e,t)}function g5(e){return nl(e,!0)}function At(e,t=!1,s){if(!e||!s&&!h5.test(e))return null;const[i,o]=e.split(u5);if(!i)return null;const n=i.split("-").map(p=>Number.parseInt(p,10));if(n.filter(p=>!isNaN(p)).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||!o&&t)return null;if(!o||o==="00:00:00")return c;const[d,u,h]=o.split(":").map(p=>Number.parseInt(p,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 mr(e,t,s){if(!t||!e)return;if(!s)return e[t];const i=t.split(".");let o=e;for(let n=0;n<i.length;n++){if(o==null)return;o=o[i[n]]}return o}var f5=["dateTimeString","dateString","text","number","bigint","boolean","date"],m5=class extends B{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},bigint({filterModuleBean:e}){return e?{cellEditor:"agTextCellEditor"}:{cellEditor:"agTextCellEditor",comparator:{default:b5,absolute:x5}}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:({node:e,event:t,column:s})=>t.key===A.SPACE&&s.isCellEditable(e)}},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:(i,o)=>{const n=t.getColDefCol(s),r=n?.getColDef();if(!n||!r)return 0;const a=i==null?"":e({column:n,node:null,value:i}),l=o==null?"":e({column:n,node:null,value:o});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={},i=d=>u=>{const{column:h,node:p,value:m}=u;let v=h.getColDef().valueFormatter;return v===d.groupSafeValueFormatter&&(v=d.valueFormatter),this.beans.valueSvc.formatValue(h,p,m,v)};for(const d of Object.keys(e)){const u=e[d],h={...u,groupSafeValueFormatter:ff(u,this.gos)};t[d]=h,s[d]=i(h)}const o=this.gos.get("dataTypeDefinitions")??{},n={};for(const d of Object.keys(o)){const u=o[d],h=this.processDataTypeDefinition(u,o,[d],e);h&&(t[d]=h,u.dataTypeMatcher&&(n[d]=u.dataTypeMatcher),s[d]=i(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 i of f5)delete s[i],s[i]=e[i]??t[i].dataTypeMatcher;return s}processDataTypeDefinition(e,t,s,i){let o;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=i[n];const a=t[n];if(r&&a&&(r=a),!gf(e,r,n))return;o=pf(r,e)}else{if(s.includes(n)){$(44);return}const r=t[n];if(!gf(e,r,n))return;const a=this.processDataTypeDefinition(r,t,[...s,n],i);if(!a)return;o=pf(a,e)}return{...o,groupSafeValueFormatter:ff(o,this.gos)}}updateColDefAndGetColumnType(e,t,s){let{cellDataType:i}=t;i===void 0&&(i=e.cellDataType);const{field:o}=t;if((i==null||i===!0)&&(i=this.canInferCellDataType(e,t)?this.inferCellDataType(o,s):!1),this.addFormulaCellEditorToColDef(e,t),!i){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[i];if(!n){$(47,{cellDataType:i});return}return e.cellDataType=i,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,n,s),n.columnTypes}addFormulaCellEditorToColDef(e,t){!(t.allowFormula??e.allowFormula)||t.cellEditor||(e.cellEditor="agFormulaCellEditor")}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const s=i=>{t.add(i.key)};e.__addEventListener("columnStateUpdated",s),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",s))}canInferCellDataType(e,t){const{gos:s}=this;if(!st(s))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(Ld(t,i))return!1;const o=t.type===null?e.type:t.type;if(o){const n=s.get("columnTypes")??{};if(El(o).some(a=>{const l=n[a.trim()];return l&&Ld(l,i)}))return!1}return!Ld(e,i)}inferCellDataType(e,t){if(!e)return;let s;const i=this.getInitialData();if(i){const n=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");s=mr(i,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:i}=this.beans;t&&s&&(s.shouldQueueResizeOperations=!0);const[o]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(o?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&s?.processResizeOperations(),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const s=[];this.destroyColumnStateUpdateListeners();const i={},o={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[n],a=this.colModel.getCol(n);if(!a)continue;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))continue;const c=a.getColDef();if(t&&c.type&&c.type!==l.type){const d=y5(a,r);d.rowGroup&&d.rowGroupIndex==null&&(i[n]=d),d.pivot&&d.pivotIndex==null&&(o[n]=d),s.push(d)}}t&&s.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,o)),s.length&&bs(this.beans,{state:s},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const s={},{rowGroupColsSvc:i,pivotColsSvc:o}=this.beans;return i?.restoreColumnOrder(s,e),o?.restoreColumnOrder(s,t),Object.values(s)}resetColDefIntoCol(e,t){const s=e.getUserProvidedColDef();if(!s)return!1;const i=yu(this.beans,s,e.getColId());return e.setColDef(i,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||e.getColDef().allowFormula&&this.beans.formula?.isFormula(t)?!0:s(t)}validateColDef(e,t,s,i){if(e.cellDataType==="object"){const o=l=>l?.cellDataType==null||l?.cellDataType===!0,n=o(t)&&o(s),r=l=>$(48,{property:l,inferred:n,colId:i}),{object:a}=this.dataTypeDefinitions;e.valueFormatter===a.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&r("Formatter"),e.editable&&e.valueParser===a.valueParser&&!this.hasObjectValueParser&&r("Parser")}}postProcess(e){const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:s,beans:i,formatValueFuncs:o}=this,n=s[t];n&&i.colFilter?.setColDefPropsForDataType(e,n,o[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,s,i){const o=this.formatValueFuncs[t],n=this.columnDefinitionPropsPerDataType[s.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:s,colId:i,formatValue:o,filterModuleBean:this.beans.filterManager});e.cellEditor==="agFormulaCellEditor"&&n.cellEditor!==e.cellEditor&&(n.cellEditor=e.cellEditor),Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),s=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:i=>At(i.newValue&&String(i.newValue)),valueFormatter:i=>i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):Mt(i.value,s)??"",dataTypeMatcher:i=>i instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:s=>At(s)??void 0,dateFormatter:s=>Mt(s??null,t)??void 0,valueParser:s=>nl(String(s.newValue))?s.newValue:null,valueFormatter:s=>nl(String(s.value))?String(s.value):"",dataTypeMatcher:s=>typeof s=="string"&&nl(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"},bigint:{baseDataType:"bigint",valueParser:t=>{const{newValue:s}=t;return s==null||typeof s=="string"&&s.trim()===""?null:_t(s)},valueFormatter:t=>t.value==null?"":typeof t.value!="bigint"?e("invalidBigInt","Invalid BigInt"):String(t.value),dataTypeMatcher:t=>typeof t=="bigint"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:gu(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"&&g5(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>gu(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 pf(e,t){const s={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(s.columnTypes=[...El(e.columnTypes),...El(t.columnTypes)]),s}function gf(e,t,s){return t?t.baseDataType!==e.baseDataType?($(46),!1):!0:($(45,{parentCellDataType:s}),!1)}var v5=e=>typeof e=="bigint"||typeof e=="number",C5=e=>e==="number"||e==="bigint";function ff(e,t){if(e.valueFormatter)return s=>{const{node:i,colDef:o,column:n,value:r}=s;if(i?.group){const a=(o.pivotValueColumn??n).getAggFunc();if(a){if(a==="first"||a==="last")return e.valueFormatter(s);const{baseDataType:l}=e;if(C5(l)&&a!=="count"){if(v5(r))return e.valueFormatter(s);if(r==null)return;if(typeof r=="object"){if(typeof r.toNumber=="function")return e.valueFormatter({...s,value:r.toNumber()});if("value"in r)return e.valueFormatter({...s,value:r.value})}}return}}else if(t.get("groupHideOpenParents")&&s.column.isRowGroupActive()&&typeof s.value=="string"&&!e.dataTypeMatcher?.(s.value))return;return e.valueFormatter(s)}}function w5(e,t,s,i){if(!t[s])return!1;const o=e[s];return o===null?(t[s]=!1,!1):i===void 0?!!o:o===i}function b5(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const s=_t(e),i=_t(t);return s!=null&&i!=null?s===i?0:s>i?1:-1:0}function x5(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const s=mf(e),i=mf(t);return s!=null&&i!=null?s===i?0:s>i?1:-1:0}function mf(e){const t=_t(e);return t==null?null:t<0n?-t:t}function Ld(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([s,i])=>w5(e,t,s,i))}function y5(e,t){const s=QC(e);for(const i of t)delete s[i],i==="rowGroup"?delete s.rowGroupIndex:i==="pivot"&&delete s.pivotIndex;return s}var S5={moduleName:"DataType",version:Q,beans:[m5],dependsOn:[VD]},R5={moduleName:"ColumnFlex",version:Q,beans:[d5]},ew={moduleName:"ColumnApi",version:Q,beans:[c5],apiFunctions:{getColumnDef:WD,getDisplayNameForColumn:_D,getColumn:UD,getColumns:$D,applyColumnState:qD,getColumnState:KD,resetColumnState:YD,isPinning:ZD,isPinningLeft:XD,isPinningRight:QD,getDisplayedColAfter:JD,getDisplayedColBefore:e5,setColumnsVisible:t5,setColumnsPinned:s5,getAllGridColumns:i5,getDisplayedLeftColumns:o5,getDisplayedCenterColumns:n5,getDisplayedRightColumns:r5,getAllDisplayedColumns:a5,getAllDisplayedVirtualColumns:l5,getColumnDefs:jD}},F5=class extends B{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,s=!1){if(!e)return null;const i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:o}=this.beans;return s&&o?o.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,s){const i=t?.getColGroupDef();return i?this.getHeaderName(i,null,e,t,s):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,s,i,o){const n=e.headerValueGetter;if(n){const r=be(this.gos,{colDef:e,column:t,columnGroup:s,providedColumnGroup:i,location:o});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 GS(e.field)}return""}},E5=class extends B{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")}getScrollPosition(){return this.scrollPosition}setScrollPosition(e,t,s=!1){const{visibleCols:i}=this,o=i.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!o)){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=i.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()||D5(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,s=t+e.getActualWidth(),i=this.viewportLeft-200,o=this.viewportRight+200,n=t<i&&s<i,r=t>o&&s>o;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 ee(r)&&r>this.viewportLeft},s=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:i}=this,o=i.centerCols;return i.getColsForRow(e,o,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=i=>{const o=new Set,n={};for(const r of i){let a=r.getParent();const l=r.isSpanHeaderHeight();for(;a&&!o.has(a);){if(l&&a.isPadding()){a=a.getParent();continue}const d=a.getProvidedColumnGroup().getLevel();n[d]??(n[d]=[]),n[d].push(a),o.add(a),a=a.getParent()}}return n};this.rowsOfHeadersToRenderLeft=s(e),this.rowsOfHeadersToRenderRight=s(t),this.rowsOfHeadersToRenderCenter=s(this.headerColsWithinViewport)}extractViewport(){const e=i=>`${i.getId()}-${i.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),s=this.colsWithinViewportHash!==t;return s&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),s}};function D5(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var P5=class extends B{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class s{refresh(){return!1}getGui(){return this.eGui}init(o){const n=t(o),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=Rh("<span>"+n+"</span>");return}if(n==null){this.eGui=Jt({tag:"span"});return}this.eGui=n}}return s}},T5={moduleName:"CellRendererFunction",version:Q,beans:[P5]},k5=class extends Ot{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 i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new i(...s)}};function I5(e){return typeof e=="object"&&!!e.getComp}var M5=class extends k5{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:i,selectors:o}=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(I5(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(i);for(const n of o??[])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:i}=this.beans,o=i.frameworkComponent(t,this.gos.get("components"));if(o!=null)return s(o,!0);const n=this.jsComps[t];if(n){const a=i.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?Ls(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??Ls(256)}},A5=23,L5=class extends B{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===A5&&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}},O5=':where([class^=ag-]),:where([class^=ag-]):after,:where([class^=ag-]):before{box-sizing:border-box}:where([class^=ag-]):where(button){color:inherit}:where([class^=ag-]):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([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block}.ag-measurement-element-border:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}.ag-popup-child{top:0;z-index:5}.ag-popup-child: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);font-weight:var(--ag-font-weight);--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 .ag-icon,[disabled] .ag-icon{opacity:.5}.ag-icon-grip.ag-disabled,.ag-icon-grip[disabled]{opacity:.35}.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-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}}.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}',ep=typeof window!="object"||!window?.document?.fonts?.forEach,tw=!1,fo=(e,t,s,i,o,n,r=!1)=>{if(ep||tw)return;let a=e;i&&(a=`@layer ${CSS.escape(i).replaceAll("\\.",".")} { ${e} }`);let l=Is.map.get(t);if(l||(l=[],Is.map.set(t,l)),l.some(h=>h.injectedCss===a))return;const c=document.createElement("style");n&&c.setAttribute("nonce",n),c.dataset.agCss=s,c.dataset.agCssVersion=Q,c.textContent=a;const d={rawCss:e,injectedCss:a,el:c,priority:o,isParams:r};let u;for(const h of l){if(h.priority>o)break;u=h}if(u){u.el.after(c);const h=l.indexOf(u);l.splice(h+1,0,d)}else t.nodeName==="STYLE"?t.after(c):t.insertBefore(c,t.querySelector(":not(title, meta)")),l.push(d)},sw=(e,t,s,i)=>{fo(O5,e,"shared",t,0,s),i?.forEach((o,n)=>o.forEach(r=>fo(r,e,n,t,0,s)))},N5=(e,t,s,i,o,n)=>{if(ep||tw)return;const r=Is.grids.get(e);r?r.paramsCss=t:Is.grids.set(e,{styleContainer:i,paramsCss:t}),Lu(i),t&&s&&fo(t,i,s,o,2,n,!0)},H5=e=>{const t=Is.grids.get(e)?.styleContainer;if(!t)return;Is.grids.delete(e),Array.from(Is.grids.values()).some(i=>i.styleContainer===t)?Lu(t):(Lu(t,!0),Is.map.delete(t))},Lu=(e,t=!1)=>{const s=new Set;for(const o of Is.grids.values())o.styleContainer===e&&s.add(o.paramsCss);const i=Is.map.get(e)??[];for(let o=i.length-1;o>=0;o--)(t||i[o].isParams&&!s.has(i[o].rawCss))&&(i[o].el.remove(),i.splice(o,1))},iw=()=>{const e=globalThis.agStyleInjectionVersions??(globalThis.agStyleInjectionVersions=new Map);let t=e.get(Q);return t||(t={map:new WeakMap,grids:new Map,paramsId:0},e.set(Q,t)),t},Is=iw(),Dt=e=>new ow(e),gi="$default",B5=0,ow=class{constructor({feature:e,params:t,modeParams:s={},css:i,cssImports:o}){this.feature=e,this.css=i,this.cssImports=o,this.modeParams={[gi]:{...s[gi]??{},...t??{}},...s}}use(e,t,s){let i=this._inject;if(i==null){let{css:o}=this;if(o){const n=`ag-theme-${this.feature??"part"}-${++B5}`;typeof o=="function"&&(o=o()),o=`:where(.${n}) {
9
9
  ${o}